diff --git a/Gopkg.lock b/Gopkg.lock
new file mode 100644
index 00000000000..0b9b74b2749
--- /dev/null
+++ b/Gopkg.lock
@@ -0,0 +1,479 @@
+# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
+
+
+[[projects]]
+ name = "cloud.google.com/go"
+ packages = ["compute/metadata"]
+ revision = "050b16d2314d5fc3d4c9a51e4cd5c7468e77f162"
+ version = "v0.17.0"
+
+[[projects]]
+ name = "github.com/BurntSushi/toml"
+ packages = ["."]
+ revision = "b26d9c308763d68093482582cea63d69be07a0f0"
+ version = "v0.3.0"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/Unknwon/com"
+ packages = ["."]
+ revision = "7677a1d7c1137cd3dd5ba7a076d0c898a1ef4520"
+
+[[projects]]
+ name = "github.com/apache/thrift"
+ packages = ["lib/go/thrift"]
+ revision = "b2a4d4ae21c789b689dd162deb819665567f481c"
+ version = "0.10.0"
+
+[[projects]]
+ name = "github.com/aws/aws-sdk-go"
+ packages = ["aws","aws/awserr","aws/awsutil","aws/client","aws/client/metadata","aws/corehandlers","aws/credentials","aws/credentials/ec2rolecreds","aws/credentials/endpointcreds","aws/credentials/stscreds","aws/defaults","aws/ec2metadata","aws/endpoints","aws/request","aws/session","aws/signer/v4","internal/shareddefaults","private/protocol","private/protocol/ec2query","private/protocol/query","private/protocol/query/queryutil","private/protocol/rest","private/protocol/restxml","private/protocol/xml/xmlutil","service/cloudwatch","service/ec2","service/ec2/ec2iface","service/s3","service/sts"]
+ revision = "c13a879e75646fe750d21bcb05bf2cabea9791c1"
+ version = "v1.12.65"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/benbjohnson/clock"
+ packages = ["."]
+ revision = "7dc76406b6d3c05b5f71a86293cbcf3c4ea03b19"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/beorn7/perks"
+ packages = ["quantile"]
+ revision = "4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9"
+
+[[projects]]
+ name = "github.com/bitly/go-simplejson"
+ packages = ["."]
+ revision = "aabad6e819789e569bd6aabf444c935aa9ba1e44"
+ version = "v0.5.0"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/bmizerany/assert"
+ packages = ["."]
+ revision = "b7ed37b82869576c289d7d97fb2bbd8b64a0cb28"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/bradfitz/gomemcache"
+ packages = ["memcache"]
+ revision = "1952afaa557dc08e8e0d89eafab110fb501c1a2b"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/codahale/hdrhistogram"
+ packages = ["."]
+ revision = "3a0bb77429bd3a61596f5e8a3172445844342120"
+
+[[projects]]
+ name = "github.com/codegangsta/cli"
+ packages = ["."]
+ revision = "cfb38830724cc34fedffe9a2a29fb54fa9169cd1"
+ version = "v1.20.0"
+
+[[projects]]
+ name = "github.com/davecgh/go-spew"
+ packages = ["spew"]
+ revision = "346938d642f2ec3594ed81d874461961cd0faa76"
+ version = "v1.1.0"
+
+[[projects]]
+ name = "github.com/fatih/color"
+ packages = ["."]
+ revision = "570b54cabe6b8eb0bc2dfce68d964677d63b5260"
+ version = "v1.5.0"
+
+[[projects]]
+ name = "github.com/go-ini/ini"
+ packages = ["."]
+ revision = "32e4c1e6bc4e7d0d8451aa6b75200d19e37a536a"
+ version = "v1.32.0"
+
+[[projects]]
+ name = "github.com/go-ldap/ldap"
+ packages = ["."]
+ revision = "bb7a9ca6e4fbc2129e3db588a34bc970ffe811a9"
+ version = "v2.5.1"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/go-macaron/binding"
+ packages = ["."]
+ revision = "ac54ee249c27dca7e76fad851a4a04b73bd1b183"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/go-macaron/gzip"
+ packages = ["."]
+ revision = "cad1c6580a07c56f5f6bc52d66002a05985c5854"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/go-macaron/inject"
+ packages = ["."]
+ revision = "d8a0b8677191f4380287cfebd08e462217bac7ad"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/go-macaron/session"
+ packages = [".","memcache","mysql","postgres","redis"]
+ revision = "b8e286a0dba8f4999042d6b258daf51b31d08938"
+
+[[projects]]
+ name = "github.com/go-sql-driver/mysql"
+ packages = ["."]
+ revision = "a0583e0143b1624142adab07e0e97fe106d99561"
+ version = "v1.3"
+
+[[projects]]
+ name = "github.com/go-stack/stack"
+ packages = ["."]
+ revision = "259ab82a6cad3992b4e21ff5cac294ccb06474bc"
+ version = "v1.7.0"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/go-xorm/builder"
+ packages = ["."]
+ revision = "488224409dd8aa2ce7a5baf8d10d55764a913738"
+
+[[projects]]
+ name = "github.com/go-xorm/core"
+ packages = ["."]
+ revision = "e8409d73255791843585964791443dbad877058c"
+
+[[projects]]
+ name = "github.com/go-xorm/xorm"
+ packages = ["."]
+ revision = "6687a2b4e824f4d87f2d65060ec5cb0d896dff1e"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/golang/protobuf"
+ packages = ["proto","ptypes","ptypes/any","ptypes/duration","ptypes/timestamp"]
+ revision = "1e59b77b52bf8e4b449a57e6f79f21226d571845"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/gopherjs/gopherjs"
+ packages = ["js"]
+ revision = "178c176a91fe05e3e6c58fa5c989bad19e6cdcb3"
+
+[[projects]]
+ name = "github.com/gorilla/websocket"
+ packages = ["."]
+ revision = "ea4d1f681babbce9545c9c5f3d5194a789c89f5b"
+ version = "v1.2.0"
+
+[[projects]]
+ name = "github.com/gosimple/slug"
+ packages = ["."]
+ revision = "e9f42fa127660e552d0ad2b589868d403a9be7c6"
+ version = "v1.1.1"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/grafana/grafana_plugin_model"
+ packages = ["go/datasource"]
+ revision = "dfe5dc0a6ce05825ba7fe2d0323d92e631bffa89"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/hashicorp/go-hclog"
+ packages = ["."]
+ revision = "ca137eb4b4389c9bc6f1a6d887f056bf16c00510"
+
+[[projects]]
+ name = "github.com/hashicorp/go-plugin"
+ packages = ["."]
+ revision = "3e6d191694b5a3a2b99755f31b47fa209e4bcd09"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/hashicorp/go-version"
+ packages = ["."]
+ revision = "4fe82ae3040f80a03d04d2cccb5606a626b8e1ee"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/hashicorp/yamux"
+ packages = ["."]
+ revision = "683f49123a33db61abfb241b7ac5e4af4dc54d55"
+
+[[projects]]
+ name = "github.com/inconshreveable/log15"
+ packages = ["."]
+ revision = "0decfc6c20d9ca0ad143b0e89dcaa20f810b4fb3"
+ version = "v2.13"
+
+[[projects]]
+ name = "github.com/jmespath/go-jmespath"
+ packages = ["."]
+ revision = "0b12d6b5"
+
+[[projects]]
+ name = "github.com/jtolds/gls"
+ packages = ["."]
+ revision = "77f18212c9c7edc9bd6a33d383a7b545ce62f064"
+ version = "v4.2.1"
+
+[[projects]]
+ name = "github.com/klauspost/compress"
+ packages = ["flate","gzip"]
+ revision = "6c8db69c4b49dd4df1fff66996cf556176d0b9bf"
+ version = "v1.2.1"
+
+[[projects]]
+ name = "github.com/klauspost/cpuid"
+ packages = ["."]
+ revision = "ae7887de9fa5d2db4eaa8174a7eff2c1ac00f2da"
+ version = "v1.1"
+
+[[projects]]
+ name = "github.com/klauspost/crc32"
+ packages = ["."]
+ revision = "cb6bfca970f6908083f26f39a79009d608efd5cd"
+ version = "v1.1"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/kr/pretty"
+ packages = ["."]
+ revision = "cfb55aafdaf3ec08f0db22699ab822c50091b1c4"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/kr/text"
+ packages = ["."]
+ revision = "7cafcd837844e784b526369c9bce262804aebc60"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/lib/pq"
+ packages = [".","oid"]
+ revision = "27ea5d92de30060e7121ddd543fe14e9a327e0cc"
+
+[[projects]]
+ name = "github.com/mattn/go-colorable"
+ packages = ["."]
+ revision = "167de6bfdfba052fa6b2d3664c8f5272e23c9072"
+ version = "v0.0.9"
+
+[[projects]]
+ name = "github.com/mattn/go-isatty"
+ packages = ["."]
+ revision = "0360b2af4f38e8d38c7fce2a9f4e702702d73a39"
+ version = "v0.0.3"
+
+[[projects]]
+ name = "github.com/mattn/go-sqlite3"
+ packages = ["."]
+ revision = "6c771bb9887719704b210e87e934f08be014bdb1"
+ version = "v1.6.0"
+
+[[projects]]
+ name = "github.com/matttproud/golang_protobuf_extensions"
+ packages = ["pbutil"]
+ revision = "3247c84500bff8d9fb6d579d800f20b3e091582c"
+ version = "v1.0.0"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/mitchellh/go-testing-interface"
+ packages = ["."]
+ revision = "a61a99592b77c9ba629d254a693acffaeb4b7e28"
+
+[[projects]]
+ name = "github.com/opentracing/opentracing-go"
+ packages = [".","ext","log"]
+ revision = "1949ddbfd147afd4d964a9f00b24eb291e0e7c38"
+ version = "v1.0.2"
+
+[[projects]]
+ name = "github.com/patrickmn/go-cache"
+ packages = ["."]
+ revision = "a3647f8e31d79543b2d0f0ae2fe5c379d72cedc0"
+ version = "v2.1.0"
+
+[[projects]]
+ name = "github.com/prometheus/client_golang"
+ packages = ["api","api/prometheus/v1","prometheus","prometheus/promhttp"]
+ revision = "967789050ba94deca04a5e84cce8ad472ce313c1"
+ version = "v0.9.0-pre1"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/prometheus/client_model"
+ packages = ["go"]
+ revision = "99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/prometheus/common"
+ packages = ["expfmt","internal/bitbucket.org/ww/goautoneg","model"]
+ revision = "89604d197083d4781071d3c65855d24ecfb0a563"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/prometheus/procfs"
+ packages = [".","xfs"]
+ revision = "b15cd069a83443be3154b719d0cc9fe8117f09fb"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/rainycape/unidecode"
+ packages = ["."]
+ revision = "cb7f23ec59bec0d61b19c56cd88cee3d0cc1870c"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/sergi/go-diff"
+ packages = ["diffmatchpatch"]
+ revision = "1744e2970ca51c86172c8190fadad617561ed6e7"
+
+[[projects]]
+ name = "github.com/smartystreets/assertions"
+ packages = [".","internal/go-render/render","internal/oglematchers"]
+ revision = "0b37b35ec7434b77e77a4bb29b79677cced992ea"
+ version = "1.8.1"
+
+[[projects]]
+ name = "github.com/smartystreets/goconvey"
+ packages = ["convey","convey/gotest","convey/reporting"]
+ revision = "9e8dc3f972df6c8fcc0375ef492c24d0bb204857"
+ version = "1.6.3"
+
+[[projects]]
+ name = "github.com/uber/jaeger-client-go"
+ packages = [".","config","internal/baggage","internal/baggage/remote","internal/spanlog","log","rpcmetrics","thrift-gen/agent","thrift-gen/baggage","thrift-gen/jaeger","thrift-gen/sampling","thrift-gen/zipkincore","utils"]
+ revision = "3ac96c6e679cb60a74589b0d0aa7c70a906183f7"
+ version = "v2.11.2"
+
+[[projects]]
+ name = "github.com/uber/jaeger-lib"
+ packages = ["metrics"]
+ revision = "7f95f4f7e80028096410abddaae2556e4c61b59f"
+ version = "v1.3.1"
+
+[[projects]]
+ name = "github.com/yudai/gojsondiff"
+ packages = [".","formatter"]
+ revision = "7b1b7adf999dab73a6eb02669c3d82dbb27a3dd6"
+ version = "1.0.0"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/yudai/golcs"
+ packages = ["."]
+ revision = "ecda9a501e8220fae3b4b600c3db4b0ba22cfc68"
+
+[[projects]]
+ branch = "master"
+ name = "golang.org/x/crypto"
+ packages = ["pbkdf2"]
+ revision = "13931e22f9e72ea58bb73048bc752b48c6d4d4ac"
+
+[[projects]]
+ branch = "master"
+ name = "golang.org/x/net"
+ packages = ["context","context/ctxhttp","http2","http2/hpack","idna","internal/timeseries","lex/httplex","trace"]
+ revision = "5ccada7d0a7ba9aeb5d3aca8d3501b4c2a509fec"
+
+[[projects]]
+ branch = "master"
+ name = "golang.org/x/oauth2"
+ packages = [".","google","internal","jws","jwt"]
+ revision = "b28fcf2b08a19742b43084fb40ab78ac6c3d8067"
+
+[[projects]]
+ branch = "master"
+ name = "golang.org/x/sync"
+ packages = ["errgroup"]
+ revision = "fd80eb99c8f653c847d294a001bdf2a3a6f768f5"
+
+[[projects]]
+ branch = "master"
+ name = "golang.org/x/sys"
+ packages = ["unix"]
+ revision = "2c42eef0765b9837fbdab12011af7830f55f88f0"
+
+[[projects]]
+ branch = "master"
+ name = "golang.org/x/text"
+ packages = ["collate","collate/build","internal/colltab","internal/gen","internal/tag","internal/triegen","internal/ucd","language","secure/bidirule","transform","unicode/bidi","unicode/cldr","unicode/norm","unicode/rangetable"]
+ revision = "e19ae1496984b1c655b8044a65c0300a3c878dd3"
+
+[[projects]]
+ name = "google.golang.org/appengine"
+ packages = [".","internal","internal/app_identity","internal/base","internal/datastore","internal/log","internal/modules","internal/remote_api","internal/urlfetch","urlfetch"]
+ revision = "150dc57a1b433e64154302bdc40b6bb8aefa313a"
+ version = "v1.0.0"
+
+[[projects]]
+ branch = "master"
+ name = "google.golang.org/genproto"
+ packages = ["googleapis/rpc/status"]
+ revision = "a8101f21cf983e773d0c1133ebc5424792003214"
+
+[[projects]]
+ name = "google.golang.org/grpc"
+ packages = [".","balancer","balancer/base","balancer/roundrobin","codes","connectivity","credentials","encoding","grpclb/grpc_lb_v1/messages","grpclog","health","health/grpc_health_v1","internal","keepalive","metadata","naming","peer","resolver","resolver/dns","resolver/passthrough","stats","status","tap","transport"]
+ revision = "7cea4cc846bcf00cbb27595b07da5de875ef7de9"
+ version = "v1.9.1"
+
+[[projects]]
+ branch = "v3"
+ name = "gopkg.in/alexcesaro/quotedprintable.v3"
+ packages = ["."]
+ revision = "2caba252f4dc53eaf6b553000885530023f54623"
+
+[[projects]]
+ name = "gopkg.in/asn1-ber.v1"
+ packages = ["."]
+ revision = "379148ca0225df7a432012b8df0355c2a2063ac0"
+ version = "v1.2"
+
+[[projects]]
+ name = "gopkg.in/bufio.v1"
+ packages = ["."]
+ revision = "567b2bfa514e796916c4747494d6ff5132a1dfce"
+ version = "v1"
+
+[[projects]]
+ branch = "v2"
+ name = "gopkg.in/gomail.v2"
+ packages = ["."]
+ revision = "81ebce5c23dfd25c6c67194b37d3dd3f338c98b1"
+
+[[projects]]
+ name = "gopkg.in/ini.v1"
+ packages = ["."]
+ revision = "32e4c1e6bc4e7d0d8451aa6b75200d19e37a536a"
+ version = "v1.32.0"
+
+[[projects]]
+ name = "gopkg.in/macaron.v1"
+ packages = ["."]
+ revision = "75f2e9b42e99652f0d82b28ccb73648f44615faa"
+ version = "v1.2.4"
+
+[[projects]]
+ name = "gopkg.in/redis.v2"
+ packages = ["."]
+ revision = "e6179049628164864e6e84e973cfb56335748dea"
+ version = "v2.3.2"
+
+[[projects]]
+ branch = "v2"
+ name = "gopkg.in/yaml.v2"
+ packages = ["."]
+ revision = "d670f9405373e636a5a2765eea47fac0c9bc91a4"
+
+[solve-meta]
+ analyzer-name = "dep"
+ analyzer-version = 1
+ inputs-digest = "1824c50aa4685fb22643ab89d45457238d9e6c8f7980315c2a41bb35222ea1a7"
+ solver-name = "gps-cdcl"
+ solver-version = 1
diff --git a/Gopkg.toml b/Gopkg.toml
new file mode 100644
index 00000000000..577bb1654a2
--- /dev/null
+++ b/Gopkg.toml
@@ -0,0 +1,194 @@
+
+# Gopkg.toml example
+#
+# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
+# 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"
+
+
+[[constraint]]
+ name = "github.com/BurntSushi/toml"
+ version = "0.3.0"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/Unknwon/com"
+ #version = "1.0.0"
+
+[[constraint]]
+ name = "github.com/aws/aws-sdk-go"
+ version = "1.12.65"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/benbjohnson/clock"
+
+[[constraint]]
+ name = "github.com/bitly/go-simplejson"
+ version = "0.5.0"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/bmizerany/assert"
+
+[[constraint]]
+ name = "github.com/codegangsta/cli"
+ version = "1.20.0"
+
+[[constraint]]
+ name = "github.com/davecgh/go-spew"
+ version = "1.1.0"
+
+[[constraint]]
+ name = "github.com/fatih/color"
+ version = "1.5.0"
+
+[[constraint]]
+ name = "github.com/go-ldap/ldap"
+ version = "2.5.1"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/go-macaron/binding"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/go-macaron/gzip"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/go-macaron/session"
+
+[[constraint]]
+ name = "github.com/go-sql-driver/mysql"
+ version = "1.3.0"
+
+[[constraint]]
+ name = "github.com/go-stack/stack"
+ version = "1.7.0"
+
+[[constraint]]
+ name = "github.com/go-xorm/core"
+ revision = "e8409d73255791843585964791443dbad877058c"
+ #version = "0.5.7" //keeping this since we would rather depend on version then commit
+
+[[constraint]]
+ name = "github.com/go-xorm/xorm"
+ revision = "6687a2b4e824f4d87f2d65060ec5cb0d896dff1e"
+ #version = "0.6.4" //keeping this since we would rather depend on version then commit
+
+[[constraint]]
+ name = "github.com/gorilla/websocket"
+ version = "1.2.0"
+
+[[constraint]]
+ name = "github.com/gosimple/slug"
+ version = "1.1.1"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/grafana/grafana_plugin_model"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/hashicorp/go-hclog"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/hashicorp/go-version"
+
+[[constraint]]
+ name = "github.com/inconshreveable/log15"
+ version = "2.13.0"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/lib/pq"
+
+[[constraint]]
+ name = "github.com/mattn/go-isatty"
+ version = "0.0.3"
+
+[[constraint]]
+ name = "github.com/mattn/go-sqlite3"
+ version = "1.6.0"
+
+[[constraint]]
+ name = "github.com/opentracing/opentracing-go"
+ version = "1.0.2"
+
+[[constraint]]
+ name = "github.com/patrickmn/go-cache"
+ version = "2.1.0"
+
+[[constraint]]
+ name = "github.com/prometheus/client_golang"
+ version = "0.9.0-pre1"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/prometheus/client_model"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/prometheus/common"
+
+[[constraint]]
+ name = "github.com/smartystreets/goconvey"
+ version = "1.6.3"
+
+[[constraint]]
+ name = "github.com/uber/jaeger-client-go"
+ version = "2.11.2"
+
+[[constraint]]
+ name = "github.com/yudai/gojsondiff"
+ version = "1.0.0"
+
+[[constraint]]
+ branch = "master"
+ name = "golang.org/x/net"
+
+[[constraint]]
+ branch = "master"
+ name = "golang.org/x/oauth2"
+
+[[constraint]]
+ branch = "master"
+ name = "golang.org/x/sync"
+
+[[constraint]]
+ name = "gopkg.in/gomail.v2"
+ branch = "v2"
+
+[[constraint]]
+ name = "gopkg.in/ini.v1"
+ version = "1.32.0"
+
+[[constraint]]
+ name = "gopkg.in/macaron.v1"
+ version = "1.2.4"
+
+[[constraint]]
+ branch = "v2"
+ name = "gopkg.in/yaml.v2"
+
+[prune]
+ non-go = true
+ test-go = true
+ unused-packages = true
diff --git a/build.go b/build.go
index 1c61c72d5dc..d55244246ff 100644
--- a/build.go
+++ b/build.go
@@ -347,11 +347,11 @@ func ChangeWorkingDir(dir string) {
}
func grunt(params ...string) {
- if runtime.GOOS == "windows" {
- runPrint(`.\node_modules\.bin\grunt`, params...)
- } else {
- runPrint("./node_modules/.bin/grunt", params...)
- }
+ if runtime.GOOS == "windows" {
+ runPrint(`.\node_modules\.bin\grunt`, params...)
+ } else {
+ runPrint("./node_modules/.bin/grunt", params...)
+ }
}
func gruntBuildArg(task string) []string {
@@ -371,7 +371,7 @@ func gruntBuildArg(task string) []string {
}
func setup() {
- runPrint("go", "get", "-v", "github.com/kardianos/govendor")
+ runPrint("go", "get", "-v", "github.com/golang/dep")
runPrint("go", "install", "-v", "./pkg/cmd/grafana-server")
}
diff --git a/package.json b/package.json
index fc00ae68c60..971e63053fc 100644
--- a/package.json
+++ b/package.json
@@ -147,7 +147,7 @@
"prop-types": "^15.6.0",
"react": "^16.2.0",
"react-dom": "^16.2.0",
- "react-grid-layout": "^0.16.1",
+ "react-grid-layout": "^0.16.2",
"react-popper": "^0.7.5",
"react-highlight-words": "^0.10.0",
"react-select": "^1.1.0",
diff --git a/pkg/services/alerting/notifiers/email.go b/pkg/services/alerting/notifiers/email.go
index f84dc886d83..095f7c7156a 100644
--- a/pkg/services/alerting/notifiers/email.go
+++ b/pkg/services/alerting/notifiers/email.go
@@ -20,7 +20,7 @@ func init() {
OptionsTemplate: `
You can enter multiple email addresses using a ";" separator
diff --git a/pkg/social/generic_oauth.go b/pkg/social/generic_oauth.go
index ec3c445ebb2..34830c2a348 100644
--- a/pkg/social/generic_oauth.go
+++ b/pkg/social/generic_oauth.go
@@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"net/http"
+ "net/mail"
"github.com/grafana/grafana/pkg/models"
@@ -165,15 +166,18 @@ func (s *GenericOAuth) FetchOrganizations(client *http.Client) ([]string, error)
return logins, nil
}
+type UserInfoJson struct {
+ Name string `json:"name"`
+ DisplayName string `json:"display_name"`
+ Login string `json:"login"`
+ Username string `json:"username"`
+ Email string `json:"email"`
+ Upn string `json:"upn"`
+ Attributes map[string][]string `json:"attributes"`
+}
+
func (s *GenericOAuth) UserInfo(client *http.Client) (*BasicUserInfo, error) {
- var data struct {
- Name string `json:"name"`
- DisplayName string `json:"display_name"`
- Login string `json:"login"`
- Username string `json:"username"`
- Email string `json:"email"`
- Attributes map[string][]string `json:"attributes"`
- }
+ var data UserInfoJson
response, err := HttpGet(client, s.apiUrl)
if err != nil {
@@ -185,33 +189,25 @@ func (s *GenericOAuth) UserInfo(client *http.Client) (*BasicUserInfo, error) {
return nil, fmt.Errorf("Error getting user info: %s", err)
}
+ name, err := s.extractName(data)
+ if err != nil {
+ return nil, err
+ }
+
+ email, err := s.extractEmail(data, client)
+ if err != nil {
+ return nil, err
+ }
+
+ login, err := s.extractLogin(data, email)
+ if err != nil {
+ return nil, err
+ }
+
userInfo := &BasicUserInfo{
- Name: data.Name,
- Login: data.Login,
- Email: data.Email,
- }
-
- if userInfo.Email == "" && data.Attributes["email:primary"] != nil {
- userInfo.Email = data.Attributes["email:primary"][0]
- }
-
- if userInfo.Email == "" {
- userInfo.Email, err = s.FetchPrivateEmail(client)
- if err != nil {
- return nil, err
- }
- }
-
- if userInfo.Name == "" && data.DisplayName != "" {
- userInfo.Name = data.DisplayName
- }
-
- if userInfo.Login == "" && data.Username != "" {
- userInfo.Login = data.Username
- }
-
- if userInfo.Login == "" {
- userInfo.Login = data.Email
+ Name: name,
+ Login: login,
+ Email: email,
}
if !s.IsTeamMember(client) {
@@ -224,3 +220,46 @@ func (s *GenericOAuth) UserInfo(client *http.Client) (*BasicUserInfo, error) {
return userInfo, nil
}
+
+func (s *GenericOAuth) extractEmail(data UserInfoJson, client *http.Client) (string, error) {
+ if data.Email != "" {
+ return data.Email, nil
+ }
+
+ if data.Attributes["email:primary"] != nil {
+ return data.Attributes["email:primary"][0], nil
+ }
+
+ if data.Upn != "" {
+ emailAddr, emailErr := mail.ParseAddress(data.Upn)
+ if emailErr == nil {
+ return emailAddr.Address, nil
+ }
+ }
+
+ return s.FetchPrivateEmail(client)
+}
+
+func (s *GenericOAuth) extractLogin(data UserInfoJson, email string) (string, error) {
+ if data.Login != "" {
+ return data.Login, nil
+ }
+
+ if data.Username != "" {
+ return data.Username, nil
+ }
+
+ return email, nil
+}
+
+func (s *GenericOAuth) extractName(data UserInfoJson) (string, error) {
+ if data.Name != "" {
+ return data.Name, nil
+ }
+
+ if data.DisplayName != "" {
+ return data.DisplayName, nil
+ }
+
+ return "", nil
+}
diff --git a/pkg/tsdb/cloudwatch/metric_find_query.go b/pkg/tsdb/cloudwatch/metric_find_query.go
index befaf8e1276..c6645647be9 100644
--- a/pkg/tsdb/cloudwatch/metric_find_query.go
+++ b/pkg/tsdb/cloudwatch/metric_find_query.go
@@ -3,6 +3,7 @@ package cloudwatch
import (
"context"
"errors"
+ "fmt"
"reflect"
"sort"
"strings"
@@ -191,11 +192,11 @@ func (e *CloudWatchExecutor) executeMetricFindQuery(ctx context.Context, queryCo
dsInfo := e.getDsInfo(region)
cfg, err := e.getAwsConfig(dsInfo)
if err != nil {
- return nil, errors.New("Failed to call ec2:DescribeInstances")
+ return nil, fmt.Errorf("Failed to call ec2:DescribeInstances, %v", err)
}
sess, err := session.NewSession(cfg)
if err != nil {
- return nil, errors.New("Failed to call ec2:DescribeInstances")
+ return nil, fmt.Errorf("Failed to call ec2:DescribeInstances, %v", err)
}
e.ec2Svc = ec2.New(sess, cfg)
@@ -478,7 +479,7 @@ func (e *CloudWatchExecutor) cloudwatchListMetrics(region string, namespace stri
return !lastPage
})
if err != nil {
- return nil, errors.New("Failed to call cloudwatch:ListMetrics")
+ return nil, fmt.Errorf("Failed to call cloudwatch:ListMetrics, %v", err)
}
return &resp, nil
diff --git a/pkg/tsdb/mysql/mysql.go b/pkg/tsdb/mysql/mysql.go
index e5c6b92f245..cf965b17a08 100644
--- a/pkg/tsdb/mysql/mysql.go
+++ b/pkg/tsdb/mysql/mysql.go
@@ -5,8 +5,8 @@ import (
"context"
"database/sql"
"fmt"
+ "reflect"
"strconv"
-
"time"
"github.com/go-sql-driver/mysql"
@@ -73,24 +73,36 @@ func (e MysqlQueryEndpoint) transformToTable(query *tsdb.Query, rows *core.Rows,
table.Columns[i].Text = name
}
- columnTypes, err := rows.ColumnTypes()
- if err != nil {
- return err
- }
-
rowLimit := 1000000
rowCount := 0
+ timeIndex := -1
+
+ // check if there is a column named time
+ for i, col := range columnNames {
+ switch col {
+ case "time_sec":
+ timeIndex = i
+ }
+ }
for ; rows.Next(); rowCount++ {
if rowCount > rowLimit {
return fmt.Errorf("MySQL query row limit exceeded, limit %d", rowLimit)
}
- values, err := e.getTypedRowData(columnTypes, rows)
+ values, err := e.getTypedRowData(rows)
if err != nil {
return err
}
+ // for annotations, convert to epoch
+ if timeIndex != -1 {
+ switch value := values[timeIndex].(type) {
+ case time.Time:
+ values[timeIndex] = float64(value.UnixNano() / 1e9)
+ }
+ }
+
table.Rows = append(table.Rows, values)
}
@@ -99,60 +111,20 @@ func (e MysqlQueryEndpoint) transformToTable(query *tsdb.Query, rows *core.Rows,
return nil
}
-func (e MysqlQueryEndpoint) getTypedRowData(types []*sql.ColumnType, rows *core.Rows) (tsdb.RowValues, error) {
+func (e MysqlQueryEndpoint) getTypedRowData(rows *core.Rows) (tsdb.RowValues, error) {
+ types, err := rows.ColumnTypes()
+ if err != nil {
+ return nil, err
+ }
+
values := make([]interface{}, len(types))
- for i, stype := range types {
- e.log.Debug("type", "type", stype)
- switch stype.DatabaseTypeName() {
- case mysql.FieldTypeNameTiny:
- values[i] = new(int8)
- case mysql.FieldTypeNameInt24:
- values[i] = new(int32)
- case mysql.FieldTypeNameShort:
- values[i] = new(int16)
- case mysql.FieldTypeNameVarString:
- values[i] = new(string)
- case mysql.FieldTypeNameVarChar:
- values[i] = new(string)
- case mysql.FieldTypeNameLong:
- values[i] = new(int)
- case mysql.FieldTypeNameLongLong:
- values[i] = new(int64)
- case mysql.FieldTypeNameDouble:
- values[i] = new(float64)
- case mysql.FieldTypeNameDecimal:
- values[i] = new(float32)
- case mysql.FieldTypeNameNewDecimal:
- values[i] = new(float64)
- case mysql.FieldTypeNameFloat:
- values[i] = new(float64)
- case mysql.FieldTypeNameTimestamp:
- values[i] = new(time.Time)
- case mysql.FieldTypeNameDateTime:
- values[i] = new(time.Time)
- case mysql.FieldTypeNameTime:
- values[i] = new(string)
- case mysql.FieldTypeNameYear:
- values[i] = new(int16)
- case mysql.FieldTypeNameNULL:
- values[i] = nil
- case mysql.FieldTypeNameBit:
+ for i := range values {
+ scanType := types[i].ScanType()
+ values[i] = reflect.New(scanType).Interface()
+
+ if types[i].DatabaseTypeName() == "BIT" {
values[i] = new([]byte)
- case mysql.FieldTypeNameBLOB:
- values[i] = new(string)
- case mysql.FieldTypeNameTinyBLOB:
- values[i] = new(string)
- case mysql.FieldTypeNameMediumBLOB:
- values[i] = new(string)
- case mysql.FieldTypeNameLongBLOB:
- values[i] = new(string)
- case mysql.FieldTypeNameString:
- values[i] = new(string)
- case mysql.FieldTypeNameDate:
- values[i] = new(string)
- default:
- return nil, fmt.Errorf("Database type %s not supported", stype.DatabaseTypeName())
}
}
@@ -160,14 +132,54 @@ func (e MysqlQueryEndpoint) getTypedRowData(types []*sql.ColumnType, rows *core.
return nil, err
}
+ for i := 0; i < len(types); i++ {
+ typeName := reflect.ValueOf(values[i]).Type().String()
+
+ switch typeName {
+ case "*sql.RawBytes":
+ values[i] = string(*values[i].(*sql.RawBytes))
+ case "*mysql.NullTime":
+ sqlTime := (*values[i].(*mysql.NullTime))
+ if sqlTime.Valid {
+ values[i] = sqlTime.Time
+ } else {
+ values[i] = nil
+ }
+ case "*sql.NullInt64":
+ nullInt64 := (*values[i].(*sql.NullInt64))
+ if nullInt64.Valid {
+ values[i] = nullInt64.Int64
+ } else {
+ values[i] = nil
+ }
+ case "*sql.NullFloat64":
+ nullFloat64 := (*values[i].(*sql.NullFloat64))
+ if nullFloat64.Valid {
+ values[i] = nullFloat64.Float64
+ } else {
+ values[i] = nil
+ }
+ }
+
+ if types[i].DatabaseTypeName() == "DECIMAL" {
+ f, err := strconv.ParseFloat(values[i].(string), 64)
+
+ if err == nil {
+ values[i] = f
+ } else {
+ values[i] = nil
+ }
+ }
+ }
+
return values, nil
}
func (e MysqlQueryEndpoint) transformToTimeSeries(query *tsdb.Query, rows *core.Rows, result *tsdb.QueryResult) error {
pointsBySeries := make(map[string]*tsdb.TimeSeries)
seriesByQueryOrder := list.New()
- columnNames, err := rows.Columns()
+ columnNames, err := rows.Columns()
if err != nil {
return err
}
diff --git a/pkg/tsdb/mysql/mysql_test.go b/pkg/tsdb/mysql/mysql_test.go
index 55def0b4129..fe2c82223d2 100644
--- a/pkg/tsdb/mysql/mysql_test.go
+++ b/pkg/tsdb/mysql/mysql_test.go
@@ -30,19 +30,19 @@ func TestMySQL(t *testing.T) {
defer sess.Close()
sql := "CREATE TABLE `mysql_types` ("
- sql += "`atinyint` tinyint(1),"
- sql += "`avarchar` varchar(3),"
+ sql += "`atinyint` tinyint(1) NOT NULL,"
+ sql += "`avarchar` varchar(3) NOT NULL,"
sql += "`achar` char(3),"
- sql += "`amediumint` mediumint,"
- sql += "`asmallint` smallint,"
- sql += "`abigint` bigint,"
- sql += "`aint` int(11),"
+ sql += "`amediumint` mediumint NOT NULL,"
+ sql += "`asmallint` smallint NOT NULL,"
+ sql += "`abigint` bigint NOT NULL,"
+ sql += "`aint` int(11) NOT NULL,"
sql += "`adouble` double(10,2),"
sql += "`anewdecimal` decimal(10,2),"
- sql += "`afloat` float(10,2),"
+ sql += "`afloat` float(10,2) NOT NULL,"
sql += "`atimestamp` timestamp NOT NULL,"
- sql += "`adatetime` datetime,"
- sql += "`atime` time,"
+ sql += "`adatetime` datetime NOT NULL,"
+ sql += "`atime` time NOT NULL,"
// sql += "`ayear` year," // Crashes xorm when running cleandb
sql += "`abit` bit(1),"
sql += "`atinytext` tinytext,"
@@ -55,7 +55,12 @@ func TestMySQL(t *testing.T) {
sql += "`alongblob` longblob,"
sql += "`aenum` enum('val1', 'val2'),"
sql += "`aset` set('a', 'b', 'c', 'd'),"
- sql += "`adate` date"
+ sql += "`adate` date,"
+ sql += "`time_sec` datetime(6),"
+ sql += "`aintnull` int(11),"
+ sql += "`afloatnull` float(10,2),"
+ sql += "`avarcharnull` varchar(3),"
+ sql += "`adecimalnull` decimal(10,2)"
sql += ") ENGINE=InnoDB DEFAULT CHARSET=latin1;"
_, err := sess.Exec(sql)
So(err, ShouldBeNil)
@@ -64,11 +69,11 @@ func TestMySQL(t *testing.T) {
sql += "(`atinyint`, `avarchar`, `achar`, `amediumint`, `asmallint`, `abigint`, `aint`, `adouble`, "
sql += "`anewdecimal`, `afloat`, `adatetime`, `atimestamp`, `atime`, `abit`, `atinytext`, "
sql += "`atinyblob`, `atext`, `ablob`, `amediumtext`, `amediumblob`, `alongtext`, `alongblob`, "
- sql += "`aenum`, `aset`, `adate`) "
+ sql += "`aenum`, `aset`, `adate`, `time_sec`) "
sql += "VALUES(1, 'abc', 'def', 1, 10, 100, 1420070400, 1.11, "
sql += "2.22, 3.33, now(), current_timestamp(), '11:11:11', 1, 'tinytext', "
sql += "'tinyblob', 'text', 'blob', 'mediumtext', 'mediumblob', 'longtext', 'longblob', "
- sql += "'val2', 'a,b', curdate());"
+ sql += "'val2', 'a,b', curdate(), '2018-01-01 00:01:01.123456');"
_, err = sess.Exec(sql)
So(err, ShouldBeNil)
@@ -90,32 +95,38 @@ func TestMySQL(t *testing.T) {
So(err, ShouldBeNil)
column := queryResult.Tables[0].Rows[0]
+
So(*column[0].(*int8), ShouldEqual, 1)
- So(*column[1].(*string), ShouldEqual, "abc")
- So(*column[2].(*string), ShouldEqual, "def")
+ So(column[1].(string), ShouldEqual, "abc")
+ So(column[2].(string), ShouldEqual, "def")
So(*column[3].(*int32), ShouldEqual, 1)
So(*column[4].(*int16), ShouldEqual, 10)
So(*column[5].(*int64), ShouldEqual, 100)
- So(*column[6].(*int), ShouldEqual, 1420070400)
- So(*column[7].(*float64), ShouldEqual, 1.11)
- So(*column[8].(*float64), ShouldEqual, 2.22)
- So(*column[9].(*float64), ShouldEqual, 3.33)
+ So(*column[6].(*int32), ShouldEqual, 1420070400)
+ So(column[7].(float64), ShouldEqual, 1.11)
+ So(column[8].(float64), ShouldEqual, 2.22)
+ So(*column[9].(*float32), ShouldEqual, 3.33)
_, offset := time.Now().Zone()
- So((*column[10].(*time.Time)), ShouldHappenWithin, time.Duration(10*time.Second), time.Now().Add(time.Duration(offset)*time.Second))
- So(*column[11].(*time.Time), ShouldHappenWithin, time.Duration(10*time.Second), time.Now().Add(time.Duration(offset)*time.Second))
- So(*column[12].(*string), ShouldEqual, "11:11:11")
+ So(column[10].(time.Time), ShouldHappenWithin, time.Duration(10*time.Second), time.Now().Add(time.Duration(offset)*time.Second))
+ So(column[11].(time.Time), ShouldHappenWithin, time.Duration(10*time.Second), time.Now().Add(time.Duration(offset)*time.Second))
+ So(column[12].(string), ShouldEqual, "11:11:11")
So(*column[13].(*[]byte), ShouldHaveSameTypeAs, []byte{1})
- So(*column[14].(*string), ShouldEqual, "tinytext")
- So(*column[15].(*string), ShouldEqual, "tinyblob")
- So(*column[16].(*string), ShouldEqual, "text")
- So(*column[17].(*string), ShouldEqual, "blob")
- So(*column[18].(*string), ShouldEqual, "mediumtext")
- So(*column[19].(*string), ShouldEqual, "mediumblob")
- So(*column[20].(*string), ShouldEqual, "longtext")
- So(*column[21].(*string), ShouldEqual, "longblob")
- So(*column[22].(*string), ShouldEqual, "val2")
- So(*column[23].(*string), ShouldEqual, "a,b")
- So(*column[24].(*string), ShouldEqual, time.Now().Format("2006-01-02T00:00:00Z"))
+ So(column[14].(string), ShouldEqual, "tinytext")
+ So(column[15].(string), ShouldEqual, "tinyblob")
+ So(column[16].(string), ShouldEqual, "text")
+ So(column[17].(string), ShouldEqual, "blob")
+ So(column[18].(string), ShouldEqual, "mediumtext")
+ So(column[19].(string), ShouldEqual, "mediumblob")
+ So(column[20].(string), ShouldEqual, "longtext")
+ So(column[21].(string), ShouldEqual, "longblob")
+ So(column[22].(string), ShouldEqual, "val2")
+ So(column[23].(string), ShouldEqual, "a,b")
+ So(column[24].(time.Time).Format("2006-01-02T00:00:00Z"), ShouldEqual, time.Now().Format("2006-01-02T00:00:00Z"))
+ So(column[25].(float64), ShouldEqual, 1514764861)
+ So(column[26], ShouldEqual, nil)
+ So(column[27], ShouldEqual, nil)
+ So(column[28], ShouldEqual, "")
+ So(column[29], ShouldEqual, nil)
})
})
}
diff --git a/public/app/plugins/datasource/mysql/response_parser.ts b/public/app/plugins/datasource/mysql/response_parser.ts
index 3db2dfe6ac3..50683578035 100644
--- a/public/app/plugins/datasource/mysql/response_parser.ts
+++ b/public/app/plugins/datasource/mysql/response_parser.ts
@@ -138,7 +138,7 @@ export default class ResponseParser {
list.push({
annotation: options.annotation,
time: Math.floor(row[timeColumnIndex]) * 1000,
- text: row[textColumnIndex],
+ text: row[textColumnIndex] ? row[textColumnIndex].toString() : '',
tags: row[tagsColumnIndex] ? row[tagsColumnIndex].trim().split(/\s*,\s*/) : [],
});
}
diff --git a/public/sass/_variables.dark.scss b/public/sass/_variables.dark.scss
index 2b734ea9533..676d0b6bc94 100644
--- a/public/sass/_variables.dark.scss
+++ b/public/sass/_variables.dark.scss
@@ -103,13 +103,7 @@ $component-active-bg: $brand-primary !default;
$panel-bg: #212124;
$panel-border-color: $dark-1;
$panel-border: solid 1px $panel-border-color;
-$panel-drop-zone-bg: repeating-linear-gradient(
- -128deg,
- #111,
- #111 10px,
- #191919 10px,
- #222 20px
-);
+$panel-drop-zone-bg: repeating-linear-gradient(-128deg, #111, #111 10px, #191919 10px, #222 20px);
$panel-header-hover-bg: $dark-4;
$panel-header-menu-hover-bg: $dark-5;
$panel-edit-shadow: 0 -30px 30px -30px $black;
@@ -134,8 +128,7 @@ $code-tag-border: lighten($code-tag-bg, 2%);
// cards
$card-background: linear-gradient(135deg, #2f2f32, #262628);
$card-background-hover: linear-gradient(135deg, #343436, #262628);
-$card-shadow: -1px -1px 0 0 hsla(0, 0%, 100%, 0.1),
- 1px 1px 0 0 rgba(0, 0, 0, 0.3);
+$card-shadow: -1px -1px 0 0 hsla(0, 0%, 100%, 0.1), 1px 1px 0 0 rgba(0, 0, 0, 0.3);
// Lists
$list-item-bg: $card-background;
@@ -188,7 +181,7 @@ $iconContainerBackground: $black;
$btn-divider-left: $dark-4;
$btn-divider-right: $dark-2;
-$btn-drag-image: "../img/grab_dark.svg";
+$btn-drag-image: '../img/grab_dark.svg';
// Forms
// -------------------------
@@ -259,7 +252,7 @@ $navbarDropdownShadow: inset 0px 4px 10px -4px $body-bg;
$navbarButtonBackground: $navbarBackground;
$navbarButtonBackgroundHighlight: $body-bg;
-$navbar-button-border: #151515;
+$navbar-button-border: #2f2f32;
// Sidemenu
// -------------------------
@@ -325,14 +318,10 @@ $tooltipLinkColor: $link-color;
$graph-tooltip-bg: $dark-1;
// images
-$checkboxImageUrl: "../img/checkbox.png";
+$checkboxImageUrl: '../img/checkbox.png';
// info box
-$info-box-background: linear-gradient(
- 100deg,
- $blue-dark,
- darken($blue-dark, 5%)
-);
+$info-box-background: linear-gradient(100deg, $blue-dark, darken($blue-dark, 5%));
$info-box-color: $gray-4;
// footer
diff --git a/public/sass/components/_dashboard_settings.scss b/public/sass/components/_dashboard_settings.scss
index af09ca3658a..8f2fd2e0fbb 100644
--- a/public/sass/components/_dashboard_settings.scss
+++ b/public/sass/components/_dashboard_settings.scss
@@ -26,7 +26,7 @@
}
.dashboard-settings__aside {
- padding: 30px 0 0 30px;
+ padding: 27px 0 0 30px;
background: $panel-bg;
display: flex;
flex-direction: column;
diff --git a/public/sass/components/_popper.scss b/public/sass/components/_popper.scss
index a4809535feb..82432d11b92 100644
--- a/public/sass/components/_popper.scss
+++ b/public/sass/components/_popper.scss
@@ -1,4 +1,4 @@
-.popper {
+.popper {
position: absolute;
background: $tooltipBackground;
color: $tooltipColor;
@@ -8,6 +8,7 @@
padding: 10px;
text-align: center;
}
+
.popper .popper__arrow {
width: 0;
height: 0;
@@ -23,6 +24,7 @@
.popper[data-placement^='top'] {
margin-bottom: 5px;
}
+
.popper[data-placement^='top'] .popper__arrow {
border-width: 5px 5px 0 5px;
border-left-color: transparent;
@@ -33,9 +35,11 @@
margin-top: 0;
margin-bottom: 0;
}
+
.popper[data-placement^='bottom'] {
margin-top: 5px;
}
+
.popper[data-placement^='bottom'] .popper__arrow {
border-width: 0 5px 5px 5px;
border-left-color: transparent;
@@ -59,9 +63,11 @@
margin-left: 0;
margin-right: 0;
}
+
.popper[data-placement^='left'] {
margin-right: 5px;
}
+
.popper[data-placement^='left'] .popper__arrow {
border-width: 5px 0 5px 5px;
border-top-color: transparent;
diff --git a/vendor/cloud.google.com/go/AUTHORS b/vendor/cloud.google.com/go/AUTHORS
new file mode 100644
index 00000000000..c364af1da09
--- /dev/null
+++ b/vendor/cloud.google.com/go/AUTHORS
@@ -0,0 +1,15 @@
+# This is the official list of cloud 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.
+
+Filippo Valsorda
+Google Inc.
+Ingo Oeser
+Palm Stone Games, Inc.
+Paweł Knap
+Péter Szilágyi
+Tyler Treat
diff --git a/vendor/cloud.google.com/go/CONTRIBUTING.md b/vendor/cloud.google.com/go/CONTRIBUTING.md
new file mode 100644
index 00000000000..95c94a48b42
--- /dev/null
+++ b/vendor/cloud.google.com/go/CONTRIBUTING.md
@@ -0,0 +1,152 @@
+# Contributing
+
+1. Sign one of the contributor license agreements below.
+1. `go get golang.org/x/review/git-codereview` to install the code reviewing tool.
+ 1. You will need to ensure that your `GOBIN` directory (by default
+ `$GOPATH/bin`) is in your `PATH` so that git can find the command.
+ 1. If you would like, you may want to set up aliases for git-codereview,
+ such that `git codereview change` becomes `git change`. See the
+ [godoc](https://godoc.org/golang.org/x/review/git-codereview) for details.
+ 1. Should you run into issues with the git-codereview tool, please note
+ that all error messages will assume that you have set up these
+ aliases.
+1. Get the cloud package by running `go get -d cloud.google.com/go`.
+ 1. If you have already checked out the source, make sure that the remote git
+ origin is https://code.googlesource.com/gocloud:
+
+ git remote set-url origin https://code.googlesource.com/gocloud
+1. Make sure your auth is configured correctly by visiting
+ https://code.googlesource.com, clicking "Generate Password", and following
+ the directions.
+1. Make changes and create a change by running `git codereview change `,
+provide a commit message, and use `git codereview mail` to create a Gerrit CL.
+1. Keep amending to the change with `git codereview change` and mail as your receive
+feedback. Each new mailed amendment will create a new patch set for your change in Gerrit.
+
+## Integration Tests
+
+In addition to the unit tests, you may run the integration test suite.
+
+To run the integrations tests, creating and configuration of a project in the
+Google Developers Console is required.
+
+After creating a project, you must [create a service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount).
+Ensure the project-level **Owner**
+[IAM role](console.cloud.google.com/iam-admin/iam/project) role is added to the
+service account. Alternatively, the account can be granted all of the following roles:
+- **Editor**
+- **Logs Configuration Writer**
+- **PubSub Admin**
+
+Once you create a project, set the following environment variables to be able to
+run the against the actual APIs.
+
+- **GCLOUD_TESTS_GOLANG_PROJECT_ID**: Developers Console project's ID (e.g. bamboo-shift-455)
+- **GCLOUD_TESTS_GOLANG_KEY**: The path to the JSON key file.
+- **GCLOUD_TESTS_API_KEY**: Your API key.
+
+Firestore requires a different project and key:
+
+- **GCLOUD_TESTS_GOLANG_FIRESTORE_PROJECT_ID**: Developers Console project's ID
+ supporting Firestore
+- **GCLOUD_TESTS_GOLANG_FIRESTORE_KEY**: The path to the JSON key file.
+
+Install the [gcloud command-line tool][gcloudcli] to your machine and use it
+to create some resources used in integration tests.
+
+From the project's root directory:
+
+``` sh
+# Set the default project in your env.
+$ gcloud config set project $GCLOUD_TESTS_GOLANG_PROJECT_ID
+
+# Authenticate the gcloud tool with your account.
+$ gcloud auth login
+
+# Create the indexes used in the datastore integration tests.
+$ gcloud preview datastore create-indexes datastore/testdata/index.yaml
+
+# Create a Google Cloud storage bucket with the same name as your test project,
+# and with the Stackdriver Logging service account as owner, for the sink
+# integration tests in logging.
+$ gsutil mb gs://$GCLOUD_TESTS_GOLANG_PROJECT_ID
+$ gsutil acl ch -g cloud-logs@google.com:O gs://$GCLOUD_TESTS_GOLANG_PROJECT_ID
+
+# Create a PubSub topic for integration tests of storage notifications.
+$ gcloud beta pubsub topics create go-storage-notification-test
+
+# Create a Spanner instance for the spanner integration tests.
+$ gcloud beta spanner instances create go-integration-test --config regional-us-central1 --nodes 1 --description 'Instance for go client test'
+# NOTE: Spanner instances are priced by the node-hour, so you may want to delete
+# the instance after testing with 'gcloud beta spanner instances delete'.
+
+
+```
+
+Once you've set the environment variables, you can run the integration tests by
+running:
+
+``` sh
+$ go test -v cloud.google.com/go/...
+```
+
+## Contributor License Agreements
+
+Before we can accept your pull requests you'll need to sign a Contributor
+License Agreement (CLA):
+
+- **If you are an individual writing original source code** and **you own the
+intellectual property**, then you'll need to sign an [individual CLA][indvcla].
+- **If you work for a company that wants to allow you to contribute your
+work**, then you'll need to sign a [corporate CLA][corpcla].
+
+You can sign these electronically (just scroll to the bottom). After that,
+we'll be able to accept your pull requests.
+
+## Contributor Code of Conduct
+
+As contributors and maintainers of this project,
+and in the interest of fostering an open and welcoming community,
+we pledge to respect all people who contribute through reporting issues,
+posting feature requests, updating documentation,
+submitting pull requests or patches, and other activities.
+
+We are committed to making participation in this project
+a harassment-free experience for everyone,
+regardless of level of experience, gender, gender identity and expression,
+sexual orientation, disability, personal appearance,
+body size, race, ethnicity, age, religion, or nationality.
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery
+* Personal attacks
+* Trolling or insulting/derogatory comments
+* Public or private harassment
+* Publishing other's private information,
+such as physical or electronic
+addresses, without explicit permission
+* Other unethical or unprofessional conduct.
+
+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.
+By adopting this Code of Conduct,
+project maintainers commit themselves to fairly and consistently
+applying these principles to every aspect of managing this project.
+Project maintainers who do not follow or enforce the Code of Conduct
+may be permanently removed from the project team.
+
+This code of conduct applies both within project spaces and in public spaces
+when an individual is representing the project or its community.
+
+Instances of abusive, harassing, or otherwise unacceptable behavior
+may be reported by opening an issue
+or contacting one or more of the project maintainers.
+
+This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0,
+available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
+
+[gcloudcli]: https://developers.google.com/cloud/sdk/gcloud/
+[indvcla]: https://developers.google.com/open-source/cla/individual
+[corpcla]: https://developers.google.com/open-source/cla/corporate
diff --git a/vendor/cloud.google.com/go/CONTRIBUTORS b/vendor/cloud.google.com/go/CONTRIBUTORS
new file mode 100644
index 00000000000..0d56acd9fa6
--- /dev/null
+++ b/vendor/cloud.google.com/go/CONTRIBUTORS
@@ -0,0 +1,38 @@
+# People who have agreed to one of the CLAs and can contribute patches.
+# 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.
+#
+# https://developers.google.com/open-source/cla/individual
+# https://developers.google.com/open-source/cla/corporate
+#
+# Names should be added to this file as:
+# Name
+
+# Keep the list alphabetically sorted.
+
+Alexis Hunt
+Andreas Litt
+Andrew Gerrand
+Brad Fitzpatrick
+Burcu Dogan
+Dave Day
+David Sansome
+David Symonds
+Filippo Valsorda
+Glenn Lewis
+Ingo Oeser
+Johan Euphrosine
+Jonathan Amsterdam
+Kunpei Sakai
+Luna Duclos
+Magnus Hiie
+Michael McGreevy
+Omar Jarjur
+Paweł Knap
+Péter Szilágyi
+Sarah Adams
+Thanatat Tamtan
+Toby Burress
+Tuo Shan
+Tyler Treat
diff --git a/vendor/cloud.google.com/go/MIGRATION.md b/vendor/cloud.google.com/go/MIGRATION.md
new file mode 100644
index 00000000000..791210de197
--- /dev/null
+++ b/vendor/cloud.google.com/go/MIGRATION.md
@@ -0,0 +1,54 @@
+# Code Changes
+
+## v0.10.0
+
+- pubsub: Replace
+
+ ```
+ sub.ModifyPushConfig(ctx, pubsub.PushConfig{Endpoint: "https://example.com/push"})
+ ```
+
+ with
+
+ ```
+ sub.Update(ctx, pubsub.SubscriptionConfigToUpdate{
+ PushConfig: &pubsub.PushConfig{Endpoint: "https://example.com/push"},
+ })
+ ```
+
+- trace: traceGRPCServerInterceptor will be provided from *trace.Client.
+Given an initialized `*trace.Client` named `tc`, instead of
+
+ ```
+ s := grpc.NewServer(grpc.UnaryInterceptor(trace.GRPCServerInterceptor(tc)))
+ ```
+
+ write
+
+ ```
+ s := grpc.NewServer(grpc.UnaryInterceptor(tc.GRPCServerInterceptor()))
+ ```
+
+- trace trace.GRPCClientInterceptor will also provided from *trace.Client.
+Instead of
+
+ ```
+ conn, err := grpc.Dial(srv.Addr, grpc.WithUnaryInterceptor(trace.GRPCClientInterceptor()))
+ ```
+
+ write
+
+ ```
+ conn, err := grpc.Dial(srv.Addr, grpc.WithUnaryInterceptor(tc.GRPCClientInterceptor()))
+ ```
+
+- trace: We removed the deprecated `trace.EnableGRPCTracing`. Use the gRPC
+interceptor as a dial option as shown below when initializing Cloud package
+clients:
+
+ ```
+ c, err := pubsub.NewClient(ctx, "project-id", option.WithGRPCDialOption(grpc.WithUnaryInterceptor(tc.GRPCClientInterceptor())))
+ if err != nil {
+ ...
+ }
+ ```
diff --git a/vendor/cloud.google.com/go/README.md b/vendor/cloud.google.com/go/README.md
new file mode 100644
index 00000000000..2f372a644c1
--- /dev/null
+++ b/vendor/cloud.google.com/go/README.md
@@ -0,0 +1,502 @@
+# Google Cloud Client Libraries for Go
+
+[](https://godoc.org/cloud.google.com/go)
+
+Go packages for [Google Cloud Platform](https://cloud.google.com) services.
+
+``` go
+import "cloud.google.com/go"
+```
+
+To install the packages on your system,
+
+```
+$ go get -u cloud.google.com/go/...
+```
+
+**NOTE:** Some of these packages are under development, and may occasionally
+make backwards-incompatible changes.
+
+**NOTE:** Github repo is a mirror of [https://code.googlesource.com/gocloud](https://code.googlesource.com/gocloud).
+
+ * [News](#news)
+ * [Supported APIs](#supported-apis)
+ * [Go Versions Supported](#go-versions-supported)
+ * [Authorization](#authorization)
+ * [Cloud Datastore](#cloud-datastore-)
+ * [Cloud Storage](#cloud-storage-)
+ * [Cloud Pub/Sub](#cloud-pub-sub-)
+ * [Cloud BigQuery](#cloud-bigquery-)
+ * [Stackdriver Logging](#stackdriver-logging-)
+ * [Cloud Spanner](#cloud-spanner-)
+
+
+## News
+
+_December 11, 2017_
+
+*v0.17.0*
+
+- firestore BREAKING CHANGES:
+ - Remove UpdateMap and UpdateStruct; rename UpdatePaths to Update.
+ Change
+ `docref.UpdateMap(ctx, map[string]interface{}{"a.b", 1})`
+ to
+ `docref.Update(ctx, []firestore.Update{{Path: "a.b", Value: 1}})`
+
+ Change
+ `docref.UpdateStruct(ctx, []string{"Field"}, aStruct)`
+ to
+ `docref.Update(ctx, []firestore.Update{{Path: "Field", Value: aStruct.Field}})`
+ - Rename MergePaths to Merge; require args to be FieldPaths
+ - A value stored as an integer can be read into a floating-point field, and vice versa.
+- bigtable/cmd/cbt:
+ - Support deleting a column.
+ - Add regex option for row read.
+- spanner: Mark stable.
+- storage:
+ - Add Reader.ContentEncoding method.
+ - Fix handling of SignedURL headers.
+- bigquery:
+ - If Uploader.Put is called with no rows, it returns nil without making a
+ call.
+ - Schema inference supports the "nullable" option in struct tags for
+ non-required fields.
+ - TimePartitioning supports "Field".
+
+
+_October 30, 2017_
+
+*v0.16.0*
+
+- Other bigquery changes:
+ - `JobIterator.Next` returns `*Job`; removed `JobInfo` (BREAKING CHANGE).
+ - UseStandardSQL is deprecated; set UseLegacySQL to true if you need
+ Legacy SQL.
+ - Uploader.Put will generate a random insert ID if you do not provide one.
+ - Support time partitioning for load jobs.
+ - Support dry-run queries.
+ - A `Job` remembers its last retrieved status.
+ - Support retrieving job configuration.
+ - Support labels for jobs and tables.
+ - Support dataset access lists.
+ - Improve support for external data sources, including data from Bigtable and
+ Google Sheets, and tables with external data.
+ - Support updating a table's view configuration.
+ - Fix uploading civil times with nanoseconds.
+
+- storage:
+ - Support PubSub notifications.
+ - Support Requester Pays buckets.
+
+- profiler: Support goroutine and mutex profile types.
+
+
+_October 3, 2017_
+
+*v0.15.0*
+
+- firestore: beta release. See the
+ [announcement](https://firebase.googleblog.com/2017/10/introducing-cloud-firestore.html).
+
+- errorreporting: The existing package has been redesigned.
+
+- errors: This package has been removed. Use errorreporting.
+
+
+[Older news](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/old-news.md)
+
+## Supported APIs
+
+Google API | Status | Package
+---------------------------------|--------------|-----------------------------------------------------------
+[Datastore][cloud-datastore] | stable | [`cloud.google.com/go/datastore`][cloud-datastore-ref]
+[Firestore][cloud-firestore] | beta | [`cloud.google.com/go/firestore`][cloud-firestore-ref]
+[Storage][cloud-storage] | stable | [`cloud.google.com/go/storage`][cloud-storage-ref]
+[Bigtable][cloud-bigtable] | beta | [`cloud.google.com/go/bigtable`][cloud-bigtable-ref]
+[BigQuery][cloud-bigquery] | beta | [`cloud.google.com/go/bigquery`][cloud-bigquery-ref]
+[Logging][cloud-logging] | stable | [`cloud.google.com/go/logging`][cloud-logging-ref]
+[Monitoring][cloud-monitoring] | beta | [`cloud.google.com/go/monitoring/apiv3`][cloud-monitoring-ref]
+[Pub/Sub][cloud-pubsub] | beta | [`cloud.google.com/go/pubsub`][cloud-pubsub-ref]
+[Vision][cloud-vision] | stable | [`cloud.google.com/go/vision/apiv1`][cloud-vision-ref]
+[Language][cloud-language] | stable | [`cloud.google.com/go/language/apiv1`][cloud-language-ref]
+[Speech][cloud-speech] | stable | [`cloud.google.com/go/speech/apiv1`][cloud-speech-ref]
+[Spanner][cloud-spanner] | stable | [`cloud.google.com/go/spanner`][cloud-spanner-ref]
+[Translation][cloud-translation] | stable | [`cloud.google.com/go/translate`][cloud-translation-ref]
+[Trace][cloud-trace] | alpha | [`cloud.google.com/go/trace`][cloud-trace-ref]
+[Video Intelligence][cloud-video]| beta | [`cloud.google.com/go/videointelligence/apiv1beta1`][cloud-video-ref]
+[ErrorReporting][cloud-errors] | alpha | [`cloud.google.com/go/errorreporting`][cloud-errors-ref]
+
+
+> **Alpha status**: the API is still being actively developed. As a
+> result, it might change in backward-incompatible ways and is not recommended
+> for production use.
+>
+> **Beta status**: the API is largely complete, but still has outstanding
+> features and bugs to be addressed. There may be minor backwards-incompatible
+> changes where necessary.
+>
+> **Stable status**: the API is mature and ready for production use. We will
+> continue addressing bugs and feature requests.
+
+Documentation and examples are available at
+https://godoc.org/cloud.google.com/go
+
+Visit or join the
+[google-api-go-announce group](https://groups.google.com/forum/#!forum/google-api-go-announce)
+for updates on these packages.
+
+## Go Versions Supported
+
+We support the two most recent major versions of Go. If Google App Engine uses
+an older version, we support that as well. You can see which versions are
+currently supported by looking at the lines following `go:` in
+[`.travis.yml`](.travis.yml).
+
+## Authorization
+
+By default, each API will use [Google Application Default Credentials][default-creds]
+for authorization credentials used in calling the API endpoints. This will allow your
+application to run in many environments without requiring explicit configuration.
+
+[snip]:# (auth)
+```go
+client, err := storage.NewClient(ctx)
+```
+
+To authorize using a
+[JSON key file](https://cloud.google.com/iam/docs/managing-service-account-keys),
+pass
+[`option.WithServiceAccountFile`](https://godoc.org/google.golang.org/api/option#WithServiceAccountFile)
+to the `NewClient` function of the desired package. For example:
+
+[snip]:# (auth-JSON)
+```go
+client, err := storage.NewClient(ctx, option.WithServiceAccountFile("path/to/keyfile.json"))
+```
+
+You can exert more control over authorization by using the
+[`golang.org/x/oauth2`](https://godoc.org/golang.org/x/oauth2) package to
+create an `oauth2.TokenSource`. Then pass
+[`option.WithTokenSource`](https://godoc.org/google.golang.org/api/option#WithTokenSource)
+to the `NewClient` function:
+[snip]:# (auth-ts)
+```go
+tokenSource := ...
+client, err := storage.NewClient(ctx, option.WithTokenSource(tokenSource))
+```
+
+## Cloud Datastore [](https://godoc.org/cloud.google.com/go/datastore)
+
+- [About Cloud Datastore][cloud-datastore]
+- [Activating the API for your project][cloud-datastore-activation]
+- [API documentation][cloud-datastore-docs]
+- [Go client documentation](https://godoc.org/cloud.google.com/go/datastore)
+- [Complete sample program](https://github.com/GoogleCloudPlatform/golang-samples/tree/master/datastore/tasks)
+
+### Example Usage
+
+First create a `datastore.Client` to use throughout your application:
+
+[snip]:# (datastore-1)
+```go
+client, err := datastore.NewClient(ctx, "my-project-id")
+if err != nil {
+ log.Fatal(err)
+}
+```
+
+Then use that client to interact with the API:
+
+[snip]:# (datastore-2)
+```go
+type Post struct {
+ Title string
+ Body string `datastore:",noindex"`
+ PublishedAt time.Time
+}
+keys := []*datastore.Key{
+ datastore.NameKey("Post", "post1", nil),
+ datastore.NameKey("Post", "post2", nil),
+}
+posts := []*Post{
+ {Title: "Post 1", Body: "...", PublishedAt: time.Now()},
+ {Title: "Post 2", Body: "...", PublishedAt: time.Now()},
+}
+if _, err := client.PutMulti(ctx, keys, posts); err != nil {
+ log.Fatal(err)
+}
+```
+
+## Cloud Storage [](https://godoc.org/cloud.google.com/go/storage)
+
+- [About Cloud Storage][cloud-storage]
+- [API documentation][cloud-storage-docs]
+- [Go client documentation](https://godoc.org/cloud.google.com/go/storage)
+- [Complete sample programs](https://github.com/GoogleCloudPlatform/golang-samples/tree/master/storage)
+
+### Example Usage
+
+First create a `storage.Client` to use throughout your application:
+
+[snip]:# (storage-1)
+```go
+client, err := storage.NewClient(ctx)
+if err != nil {
+ log.Fatal(err)
+}
+```
+
+[snip]:# (storage-2)
+```go
+// Read the object1 from bucket.
+rc, err := client.Bucket("bucket").Object("object1").NewReader(ctx)
+if err != nil {
+ log.Fatal(err)
+}
+defer rc.Close()
+body, err := ioutil.ReadAll(rc)
+if err != nil {
+ log.Fatal(err)
+}
+```
+
+## Cloud Pub/Sub [](https://godoc.org/cloud.google.com/go/pubsub)
+
+- [About Cloud Pubsub][cloud-pubsub]
+- [API documentation][cloud-pubsub-docs]
+- [Go client documentation](https://godoc.org/cloud.google.com/go/pubsub)
+- [Complete sample programs](https://github.com/GoogleCloudPlatform/golang-samples/tree/master/pubsub)
+
+### Example Usage
+
+First create a `pubsub.Client` to use throughout your application:
+
+[snip]:# (pubsub-1)
+```go
+client, err := pubsub.NewClient(ctx, "project-id")
+if err != nil {
+ log.Fatal(err)
+}
+```
+
+Then use the client to publish and subscribe:
+
+[snip]:# (pubsub-2)
+```go
+// Publish "hello world" on topic1.
+topic := client.Topic("topic1")
+res := topic.Publish(ctx, &pubsub.Message{
+ Data: []byte("hello world"),
+})
+// The publish happens asynchronously.
+// Later, you can get the result from res:
+...
+msgID, err := res.Get(ctx)
+if err != nil {
+ log.Fatal(err)
+}
+
+// Use a callback to receive messages via subscription1.
+sub := client.Subscription("subscription1")
+err = sub.Receive(ctx, func(ctx context.Context, m *pubsub.Message) {
+ fmt.Println(m.Data)
+ m.Ack() // Acknowledge that we've consumed the message.
+})
+if err != nil {
+ log.Println(err)
+}
+```
+
+## Cloud BigQuery [](https://godoc.org/cloud.google.com/go/bigquery)
+
+- [About Cloud BigQuery][cloud-bigquery]
+- [API documentation][cloud-bigquery-docs]
+- [Go client documentation][cloud-bigquery-ref]
+- [Complete sample programs](https://github.com/GoogleCloudPlatform/golang-samples/tree/master/bigquery)
+
+### Example Usage
+
+First create a `bigquery.Client` to use throughout your application:
+[snip]:# (bq-1)
+```go
+c, err := bigquery.NewClient(ctx, "my-project-ID")
+if err != nil {
+ // TODO: Handle error.
+}
+```
+
+Then use that client to interact with the API:
+[snip]:# (bq-2)
+```go
+// Construct a query.
+q := c.Query(`
+ SELECT year, SUM(number)
+ FROM [bigquery-public-data:usa_names.usa_1910_2013]
+ WHERE name = "William"
+ GROUP BY year
+ ORDER BY year
+`)
+// Execute the query.
+it, err := q.Read(ctx)
+if err != nil {
+ // TODO: Handle error.
+}
+// Iterate through the results.
+for {
+ var values []bigquery.Value
+ err := it.Next(&values)
+ if err == iterator.Done {
+ break
+ }
+ if err != nil {
+ // TODO: Handle error.
+ }
+ fmt.Println(values)
+}
+```
+
+
+## Stackdriver Logging [](https://godoc.org/cloud.google.com/go/logging)
+
+- [About Stackdriver Logging][cloud-logging]
+- [API documentation][cloud-logging-docs]
+- [Go client documentation][cloud-logging-ref]
+- [Complete sample programs](https://github.com/GoogleCloudPlatform/golang-samples/tree/master/logging)
+
+### Example Usage
+
+First create a `logging.Client` to use throughout your application:
+[snip]:# (logging-1)
+```go
+ctx := context.Background()
+client, err := logging.NewClient(ctx, "my-project")
+if err != nil {
+ // TODO: Handle error.
+}
+```
+
+Usually, you'll want to add log entries to a buffer to be periodically flushed
+(automatically and asynchronously) to the Stackdriver Logging service.
+[snip]:# (logging-2)
+```go
+logger := client.Logger("my-log")
+logger.Log(logging.Entry{Payload: "something happened!"})
+```
+
+Close your client before your program exits, to flush any buffered log entries.
+[snip]:# (logging-3)
+```go
+err = client.Close()
+if err != nil {
+ // TODO: Handle error.
+}
+```
+
+## Cloud Spanner [](https://godoc.org/cloud.google.com/go/spanner)
+
+- [About Cloud Spanner][cloud-spanner]
+- [API documentation][cloud-spanner-docs]
+- [Go client documentation](https://godoc.org/cloud.google.com/go/spanner)
+
+### Example Usage
+
+First create a `spanner.Client` to use throughout your application:
+
+[snip]:# (spanner-1)
+```go
+client, err := spanner.NewClient(ctx, "projects/P/instances/I/databases/D")
+if err != nil {
+ log.Fatal(err)
+}
+```
+
+[snip]:# (spanner-2)
+```go
+// Simple Reads And Writes
+_, err = client.Apply(ctx, []*spanner.Mutation{
+ spanner.Insert("Users",
+ []string{"name", "email"},
+ []interface{}{"alice", "a@example.com"})})
+if err != nil {
+ log.Fatal(err)
+}
+row, err := client.Single().ReadRow(ctx, "Users",
+ spanner.Key{"alice"}, []string{"email"})
+if err != nil {
+ log.Fatal(err)
+}
+```
+
+
+## Contributing
+
+Contributions are welcome. Please, see the
+[CONTRIBUTING](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/CONTRIBUTING.md)
+document for details. We're using Gerrit for our code reviews. Please don't open pull
+requests against this repo, new pull requests will be automatically closed.
+
+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/master/CONTRIBUTING.md#contributor-code-of-conduct)
+for more information.
+
+[cloud-datastore]: https://cloud.google.com/datastore/
+[cloud-datastore-ref]: https://godoc.org/cloud.google.com/go/datastore
+[cloud-datastore-docs]: https://cloud.google.com/datastore/docs
+[cloud-datastore-activation]: https://cloud.google.com/datastore/docs/activate
+
+[cloud-firestore]: https://cloud.google.com/firestore/
+[cloud-firestore-ref]: https://godoc.org/cloud.google.com/go/firestore
+[cloud-firestore-docs]: https://cloud.google.com/firestore/docs
+[cloud-firestore-activation]: https://cloud.google.com/firestore/docs/activate
+
+[cloud-pubsub]: https://cloud.google.com/pubsub/
+[cloud-pubsub-ref]: https://godoc.org/cloud.google.com/go/pubsub
+[cloud-pubsub-docs]: https://cloud.google.com/pubsub/docs
+
+[cloud-storage]: https://cloud.google.com/storage/
+[cloud-storage-ref]: https://godoc.org/cloud.google.com/go/storage
+[cloud-storage-docs]: https://cloud.google.com/storage/docs
+[cloud-storage-create-bucket]: https://cloud.google.com/storage/docs/cloud-console#_creatingbuckets
+
+[cloud-bigtable]: https://cloud.google.com/bigtable/
+[cloud-bigtable-ref]: https://godoc.org/cloud.google.com/go/bigtable
+
+[cloud-bigquery]: https://cloud.google.com/bigquery/
+[cloud-bigquery-docs]: https://cloud.google.com/bigquery/docs
+[cloud-bigquery-ref]: https://godoc.org/cloud.google.com/go/bigquery
+
+[cloud-logging]: https://cloud.google.com/logging/
+[cloud-logging-docs]: https://cloud.google.com/logging/docs
+[cloud-logging-ref]: https://godoc.org/cloud.google.com/go/logging
+
+[cloud-monitoring]: https://cloud.google.com/monitoring/
+[cloud-monitoring-ref]: https://godoc.org/cloud.google.com/go/monitoring/apiv3
+
+[cloud-vision]: https://cloud.google.com/vision
+[cloud-vision-ref]: https://godoc.org/cloud.google.com/go/vision/apiv1
+
+[cloud-language]: https://cloud.google.com/natural-language
+[cloud-language-ref]: https://godoc.org/cloud.google.com/go/language/apiv1
+
+[cloud-speech]: https://cloud.google.com/speech
+[cloud-speech-ref]: https://godoc.org/cloud.google.com/go/speech/apiv1
+
+[cloud-spanner]: https://cloud.google.com/spanner/
+[cloud-spanner-ref]: https://godoc.org/cloud.google.com/go/spanner
+[cloud-spanner-docs]: https://cloud.google.com/spanner/docs
+
+[cloud-translation]: https://cloud.google.com/translation
+[cloud-translation-ref]: https://godoc.org/cloud.google.com/go/translation
+
+[cloud-trace]: https://cloud.google.com/trace/
+[cloud-trace-ref]: https://godoc.org/cloud.google.com/go/trace
+
+[cloud-video]: https://cloud.google.com/video-intelligence/
+[cloud-video-ref]: https://godoc.org/cloud.google.com/go/videointelligence/apiv1beta1
+
+[cloud-errors]: https://cloud.google.com/error-reporting/
+[cloud-errors-ref]: https://godoc.org/cloud.google.com/go/errorreporting
+
+[default-creds]: https://developers.google.com/identity/protocols/application-default-credentials
diff --git a/vendor/cloud.google.com/go/storage/not_go17.go b/vendor/cloud.google.com/go/cloud.go
similarity index 62%
rename from vendor/cloud.google.com/go/storage/not_go17.go
rename to vendor/cloud.google.com/go/cloud.go
index 1f6f7ae95cf..6ba428dc639 100644
--- a/vendor/cloud.google.com/go/storage/not_go17.go
+++ b/vendor/cloud.google.com/go/cloud.go
@@ -1,4 +1,4 @@
-// Copyright 2017 Google Inc. All Rights Reserved.
+// Copyright 2014 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -12,15 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// +build !go1.7
-
-package storage
-
-import (
- "net/http"
-)
-
-func withContext(r *http.Request, _ interface{}) *http.Request {
- // In Go 1.6 and below, ignore the context.
- return r
-}
+// Package cloud is the root of the packages used to access Google Cloud
+// Services. See https://godoc.org/cloud.google.com/go for a full list
+// of sub-packages.
+//
+// This package documents how to authorize and authenticate the sub packages.
+package cloud // import "cloud.google.com/go"
diff --git a/vendor/cloud.google.com/go/iam/iam.go b/vendor/cloud.google.com/go/iam/iam.go
deleted file mode 100644
index 8722ee8838f..00000000000
--- a/vendor/cloud.google.com/go/iam/iam.go
+++ /dev/null
@@ -1,256 +0,0 @@
-// Copyright 2016 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT 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 iam supports the resource-specific operations of Google Cloud
-// IAM (Identity and Access Management) for the Google Cloud Libraries.
-// See https://cloud.google.com/iam for more about IAM.
-//
-// Users of the Google Cloud Libraries will typically not use this package
-// directly. Instead they will begin with some resource that supports IAM, like
-// a pubsub topic, and call its IAM method to get a Handle for that resource.
-package iam
-
-import (
- "golang.org/x/net/context"
- pb "google.golang.org/genproto/googleapis/iam/v1"
- "google.golang.org/grpc"
-)
-
-// client abstracts the IAMPolicy API to allow multiple implementations.
-type client interface {
- Get(ctx context.Context, resource string) (*pb.Policy, error)
- Set(ctx context.Context, resource string, p *pb.Policy) error
- Test(ctx context.Context, resource string, perms []string) ([]string, error)
-}
-
-// grpcClient implements client for the standard gRPC-based IAMPolicy service.
-type grpcClient struct {
- c pb.IAMPolicyClient
-}
-
-func (g *grpcClient) Get(ctx context.Context, resource string) (*pb.Policy, error) {
- proto, err := g.c.GetIamPolicy(ctx, &pb.GetIamPolicyRequest{Resource: resource})
- if err != nil {
- return nil, err
- }
- return proto, nil
-}
-func (g *grpcClient) Set(ctx context.Context, resource string, p *pb.Policy) error {
- _, err := g.c.SetIamPolicy(ctx, &pb.SetIamPolicyRequest{
- Resource: resource,
- Policy: p,
- })
- return err
-}
-
-func (g *grpcClient) Test(ctx context.Context, resource string, perms []string) ([]string, error) {
- res, err := g.c.TestIamPermissions(ctx, &pb.TestIamPermissionsRequest{
- Resource: resource,
- Permissions: perms,
- })
- if err != nil {
- return nil, err
- }
- return res.Permissions, nil
-}
-
-// A Handle provides IAM operations for a resource.
-type Handle struct {
- c client
- resource string
-}
-
-// InternalNewHandle is for use by the Google Cloud Libraries only.
-//
-// InternalNewHandle returns a Handle for resource.
-// The conn parameter refers to a server that must support the IAMPolicy service.
-func InternalNewHandle(conn *grpc.ClientConn, resource string) *Handle {
- return InternalNewHandleClient(&grpcClient{c: pb.NewIAMPolicyClient(conn)}, resource)
-}
-
-// InternalNewHandleClient is for use by the Google Cloud Libraries only.
-//
-// InternalNewHandleClient returns a Handle for resource using the given
-// client implementation.
-func InternalNewHandleClient(c client, resource string) *Handle {
- return &Handle{
- c: c,
- resource: resource,
- }
-}
-
-// Policy retrieves the IAM policy for the resource.
-func (h *Handle) Policy(ctx context.Context) (*Policy, error) {
- proto, err := h.c.Get(ctx, h.resource)
- if err != nil {
- return nil, err
- }
- return &Policy{InternalProto: proto}, nil
-}
-
-// SetPolicy replaces the resource's current policy with the supplied Policy.
-//
-// If policy was created from a prior call to Get, then the modification will
-// only succeed if the policy has not changed since the Get.
-func (h *Handle) SetPolicy(ctx context.Context, policy *Policy) error {
- return h.c.Set(ctx, h.resource, policy.InternalProto)
-}
-
-// TestPermissions returns the subset of permissions that the caller has on the resource.
-func (h *Handle) TestPermissions(ctx context.Context, permissions []string) ([]string, error) {
- return h.c.Test(ctx, h.resource, permissions)
-}
-
-// A RoleName is a name representing a collection of permissions.
-type RoleName string
-
-// Common role names.
-const (
- Owner RoleName = "roles/owner"
- Editor RoleName = "roles/editor"
- Viewer RoleName = "roles/viewer"
-)
-
-const (
- // AllUsers is a special member that denotes all users, even unauthenticated ones.
- AllUsers = "allUsers"
-
- // AllAuthenticatedUsers is a special member that denotes all authenticated users.
- AllAuthenticatedUsers = "allAuthenticatedUsers"
-)
-
-// A Policy is a list of Bindings representing roles
-// granted to members.
-//
-// The zero Policy is a valid policy with no bindings.
-type Policy struct {
- // TODO(jba): when type aliases are available, put Policy into an internal package
- // and provide an exported alias here.
-
- // This field is exported for use by the Google Cloud Libraries only.
- // It may become unexported in a future release.
- InternalProto *pb.Policy
-}
-
-// Members returns the list of members with the supplied role.
-// The return value should not be modified. Use Add and Remove
-// to modify the members of a role.
-func (p *Policy) Members(r RoleName) []string {
- b := p.binding(r)
- if b == nil {
- return nil
- }
- return b.Members
-}
-
-// HasRole reports whether member has role r.
-func (p *Policy) HasRole(member string, r RoleName) bool {
- return memberIndex(member, p.binding(r)) >= 0
-}
-
-// Add adds member member to role r if it is not already present.
-// A new binding is created if there is no binding for the role.
-func (p *Policy) Add(member string, r RoleName) {
- b := p.binding(r)
- if b == nil {
- if p.InternalProto == nil {
- p.InternalProto = &pb.Policy{}
- }
- p.InternalProto.Bindings = append(p.InternalProto.Bindings, &pb.Binding{
- Role: string(r),
- Members: []string{member},
- })
- return
- }
- if memberIndex(member, b) < 0 {
- b.Members = append(b.Members, member)
- return
- }
-}
-
-// Remove removes member from role r if it is present.
-func (p *Policy) Remove(member string, r RoleName) {
- bi := p.bindingIndex(r)
- if bi < 0 {
- return
- }
- bindings := p.InternalProto.Bindings
- b := bindings[bi]
- mi := memberIndex(member, b)
- if mi < 0 {
- return
- }
- // Order doesn't matter for bindings or members, so to remove, move the last item
- // into the removed spot and shrink the slice.
- if len(b.Members) == 1 {
- // Remove binding.
- last := len(bindings) - 1
- bindings[bi] = bindings[last]
- bindings[last] = nil
- p.InternalProto.Bindings = bindings[:last]
- return
- }
- // Remove member.
- // TODO(jba): worry about multiple copies of m?
- last := len(b.Members) - 1
- b.Members[mi] = b.Members[last]
- b.Members[last] = ""
- b.Members = b.Members[:last]
-}
-
-// Roles returns the names of all the roles that appear in the Policy.
-func (p *Policy) Roles() []RoleName {
- if p.InternalProto == nil {
- return nil
- }
- var rns []RoleName
- for _, b := range p.InternalProto.Bindings {
- rns = append(rns, RoleName(b.Role))
- }
- return rns
-}
-
-// binding returns the Binding for the suppied role, or nil if there isn't one.
-func (p *Policy) binding(r RoleName) *pb.Binding {
- i := p.bindingIndex(r)
- if i < 0 {
- return nil
- }
- return p.InternalProto.Bindings[i]
-}
-
-func (p *Policy) bindingIndex(r RoleName) int {
- if p.InternalProto == nil {
- return -1
- }
- for i, b := range p.InternalProto.Bindings {
- if b.Role == string(r) {
- return i
- }
- }
- return -1
-}
-
-// memberIndex returns the index of m in b's Members, or -1 if not found.
-func memberIndex(m string, b *pb.Binding) int {
- if b == nil {
- return -1
- }
- for i, mm := range b.Members {
- if mm == m {
- return i
- }
- }
- return -1
-}
diff --git a/vendor/cloud.google.com/go/internal/optional/optional.go b/vendor/cloud.google.com/go/internal/optional/optional.go
deleted file mode 100644
index f9102f36516..00000000000
--- a/vendor/cloud.google.com/go/internal/optional/optional.go
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright 2016 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT 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 optional provides versions of primitive types that can
-// be nil. These are useful in methods that update some of an API object's
-// fields.
-package optional
-
-import (
- "fmt"
- "strings"
-)
-
-type (
- // Bool is either a bool or nil.
- Bool interface{}
-
- // String is either a string or nil.
- String interface{}
-
- // Int is either an int or nil.
- Int interface{}
-
- // Uint is either a uint or nil.
- Uint interface{}
-
- // Float64 is either a float64 or nil.
- Float64 interface{}
-)
-
-// ToBool returns its argument as a bool.
-// It panics if its argument is nil or not a bool.
-func ToBool(v Bool) bool {
- x, ok := v.(bool)
- if !ok {
- doPanic("Bool", v)
- }
- return x
-}
-
-// ToString returns its argument as a string.
-// It panics if its argument is nil or not a string.
-func ToString(v String) string {
- x, ok := v.(string)
- if !ok {
- doPanic("String", v)
- }
- return x
-}
-
-// ToInt returns its argument as an int.
-// It panics if its argument is nil or not an int.
-func ToInt(v Int) int {
- x, ok := v.(int)
- if !ok {
- doPanic("Int", v)
- }
- return x
-}
-
-// ToUint returns its argument as a uint.
-// It panics if its argument is nil or not a uint.
-func ToUint(v Uint) uint {
- x, ok := v.(uint)
- if !ok {
- doPanic("Uint", v)
- }
- return x
-}
-
-// ToFloat64 returns its argument as a float64.
-// It panics if its argument is nil or not a float64.
-func ToFloat64(v Float64) float64 {
- x, ok := v.(float64)
- if !ok {
- doPanic("Float64", v)
- }
- return x
-}
-
-func doPanic(capType string, v interface{}) {
- panic(fmt.Sprintf("optional.%s value should be %s, got %T", capType, strings.ToLower(capType), v))
-}
diff --git a/vendor/cloud.google.com/go/internal/retry.go b/vendor/cloud.google.com/go/internal/retry.go
deleted file mode 100644
index f554fbf8f79..00000000000
--- a/vendor/cloud.google.com/go/internal/retry.go
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2016 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT 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 (
- "fmt"
- "time"
-
- gax "github.com/googleapis/gax-go"
-
- "golang.org/x/net/context"
-)
-
-// Retry calls the supplied function f repeatedly according to the provided
-// backoff parameters. It returns when one of the following occurs:
-// When f's first return value is true, Retry immediately returns with f's second
-// return value.
-// When the provided context is done, Retry returns with an error that
-// includes both ctx.Error() and the last error returned by f.
-func Retry(ctx context.Context, bo gax.Backoff, f func() (stop bool, err error)) error {
- return retry(ctx, bo, f, gax.Sleep)
-}
-
-func retry(ctx context.Context, bo gax.Backoff, f func() (stop bool, err error),
- sleep func(context.Context, time.Duration) error) error {
- var lastErr error
- for {
- stop, err := f()
- if stop {
- return err
- }
- // Remember the last "real" error from f.
- if err != nil && err != context.Canceled && err != context.DeadlineExceeded {
- lastErr = err
- }
- p := bo.Pause()
- if cerr := sleep(ctx, p); cerr != nil {
- if lastErr != nil {
- return fmt.Errorf("%v; last function err: %v", cerr, lastErr)
- }
- return cerr
- }
- }
-}
diff --git a/vendor/cloud.google.com/go/internal/version/update_version.sh b/vendor/cloud.google.com/go/internal/version/update_version.sh
deleted file mode 100755
index fecf1f03fde..00000000000
--- a/vendor/cloud.google.com/go/internal/version/update_version.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-
-today=$(date +%Y%m%d)
-
-sed -i -r -e 's/const Repo = "([0-9]{8})"/const Repo = "'$today'"/' $GOFILE
-
diff --git a/vendor/cloud.google.com/go/internal/version/version.go b/vendor/cloud.google.com/go/internal/version/version.go
deleted file mode 100644
index 5eb06bac550..00000000000
--- a/vendor/cloud.google.com/go/internal/version/version.go
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2016 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT 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:generate ./update_version.sh
-
-// Package version contains version information for Google Cloud Client
-// Libraries for Go, as reported in request headers.
-package version
-
-import (
- "runtime"
- "strings"
- "unicode"
-)
-
-// Repo is the current version of the client libraries in this
-// repo. It should be a date in YYYYMMDD format.
-const Repo = "20170621"
-
-// Go returns the Go runtime version. The returned string
-// has no whitespace.
-func Go() 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.IndexRune("0123456789.", r) < 0
-}
diff --git a/vendor/cloud.google.com/go/keys.tar.enc b/vendor/cloud.google.com/go/keys.tar.enc
new file mode 100644
index 00000000000..c54408c93a2
Binary files /dev/null and b/vendor/cloud.google.com/go/keys.tar.enc differ
diff --git a/vendor/cloud.google.com/go/old-news.md b/vendor/cloud.google.com/go/old-news.md
new file mode 100644
index 00000000000..0c8a224d0b4
--- /dev/null
+++ b/vendor/cloud.google.com/go/old-news.md
@@ -0,0 +1,557 @@
+_September 28, 2017_
+
+*v0.14.0*
+
+- bigquery BREAKING CHANGES:
+ - Standard SQL is the default for queries and views.
+ - `Table.Create` takes `TableMetadata` as a second argument, instead of
+ options.
+ - `Dataset.Create` takes `DatasetMetadata` as a second argument.
+ - `DatasetMetadata` field `ID` renamed to `FullID`
+ - `TableMetadata` field `ID` renamed to `FullID`
+
+- Other bigquery changes:
+ - The client will append a random suffix to a provided job ID if you set
+ `AddJobIDSuffix` to true in a job config.
+ - Listing jobs is supported.
+ - Better retry logic.
+
+- vision, language, speech: clients are now stable
+
+- monitoring: client is now beta
+
+- profiler:
+ - Rename InstanceName to Instance, ZoneName to Zone
+ - Auto-detect service name and version on AppEngine.
+
+_September 8, 2017_
+
+*v0.13.0*
+
+- bigquery: UseLegacySQL options for CreateTable and QueryConfig. Use these
+ options to continue using Legacy SQL after the client switches its default
+ to Standard SQL.
+
+- bigquery: Support for updating dataset labels.
+
+- bigquery: Set DatasetIterator.ProjectID to list datasets in a project other
+ than the client's. DatasetsInProject is no longer needed and is deprecated.
+
+- bigtable: Fail ListInstances when any zones fail.
+
+- spanner: support decoding of slices of basic types (e.g. []string, []int64,
+ etc.)
+
+- logging/logadmin: UpdateSink no longer creates a sink if it is missing
+ (actually a change to the underlying service, not the client)
+
+- profiler: Service and ServiceVersion replace Target in Config.
+
+_August 22, 2017_
+
+*v0.12.0*
+
+- pubsub: Subscription.Receive now uses streaming pull.
+
+- pubsub: add Client.TopicInProject to access topics in a different project
+ than the client.
+
+- errors: renamed errorreporting. The errors package will be removed shortly.
+
+- datastore: improved retry behavior.
+
+- bigquery: support updates to dataset metadata, with etags.
+
+- bigquery: add etag support to Table.Update (BREAKING: etag argument added).
+
+- bigquery: generate all job IDs on the client.
+
+- storage: support bucket lifecycle configurations.
+
+
+_July 31, 2017_
+
+*v0.11.0*
+
+- Clients for spanner, pubsub and video are now in beta.
+
+- New client for DLP.
+
+- spanner: performance and testing improvements.
+
+- storage: requester-pays buckets are supported.
+
+- storage, profiler, bigtable, bigquery: bug fixes and other minor improvements.
+
+- pubsub: bug fixes and other minor improvements
+
+_June 17, 2017_
+
+
+*v0.10.0*
+
+- pubsub: Subscription.ModifyPushConfig replaced with Subscription.Update.
+
+- pubsub: Subscription.Receive now runs concurrently for higher throughput.
+
+- vision: cloud.google.com/go/vision is deprecated. Use
+cloud.google.com/go/vision/apiv1 instead.
+
+- translation: now stable.
+
+- trace: several changes to the surface. See the link below.
+
+[Code changes required from v0.9.0.](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/MIGRATION.md)
+
+
+_March 17, 2017_
+
+Breaking Pubsub changes.
+* Publish is now asynchronous
+([announcement](https://groups.google.com/d/topic/google-api-go-announce/aaqRDIQ3rvU/discussion)).
+* Subscription.Pull replaced by Subscription.Receive, which takes a callback ([announcement](https://groups.google.com/d/topic/google-api-go-announce/8pt6oetAdKc/discussion)).
+* Message.Done replaced with Message.Ack and Message.Nack.
+
+_February 14, 2017_
+
+Release of a client library for Spanner. See
+the
+[blog post](https://cloudplatform.googleblog.com/2017/02/introducing-Cloud-Spanner-a-global-database-service-for-mission-critical-applications.html).
+
+Note that although the Spanner service is beta, the Go client library is alpha.
+
+_December 12, 2016_
+
+Beta release of BigQuery, DataStore, Logging and Storage. See the
+[blog post](https://cloudplatform.googleblog.com/2016/12/announcing-new-google-cloud-client.html).
+
+Also, BigQuery now supports structs. Read a row directly into a struct with
+`RowIterator.Next`, and upload a row directly from a struct with `Uploader.Put`.
+You can also use field tags. See the [package documentation][cloud-bigquery-ref]
+for details.
+
+_December 5, 2016_
+
+More changes to BigQuery:
+
+* The `ValueList` type was removed. It is no longer necessary. Instead of
+ ```go
+ var v ValueList
+ ... it.Next(&v) ..
+ ```
+ use
+
+ ```go
+ var v []Value
+ ... it.Next(&v) ...
+ ```
+
+* Previously, repeatedly calling `RowIterator.Next` on the same `[]Value` or
+ `ValueList` would append to the slice. Now each call resets the size to zero first.
+
+* Schema inference will infer the SQL type BYTES for a struct field of
+ type []byte. Previously it inferred STRING.
+
+* The types `uint`, `uint64` and `uintptr` are no longer supported in schema
+ inference. BigQuery's integer type is INT64, and those types may hold values
+ that are not correctly represented in a 64-bit signed integer.
+
+* The SQL types DATE, TIME and DATETIME are now supported. They correspond to
+ the `Date`, `Time` and `DateTime` types in the new `cloud.google.com/go/civil`
+ package.
+
+_November 17, 2016_
+
+Change to BigQuery: values from INTEGER columns will now be returned as int64,
+not int. This will avoid errors arising from large values on 32-bit systems.
+
+_November 8, 2016_
+
+New datastore feature: datastore now encodes your nested Go structs as Entity values,
+instead of a flattened list of the embedded struct's fields.
+This means that you may now have twice-nested slices, eg.
+```go
+type State struct {
+ Cities []struct{
+ Populations []int
+ }
+}
+```
+
+See [the announcement](https://groups.google.com/forum/#!topic/google-api-go-announce/79jtrdeuJAg) for
+more details.
+
+_November 8, 2016_
+
+Breaking changes to datastore: contexts no longer hold namespaces; instead you
+must set a key's namespace explicitly. Also, key functions have been changed
+and renamed.
+
+* The WithNamespace function has been removed. To specify a namespace in a Query, use the Query.Namespace method:
+ ```go
+ q := datastore.NewQuery("Kind").Namespace("ns")
+ ```
+
+* All the fields of Key are exported. That means you can construct any Key with a struct literal:
+ ```go
+ k := &Key{Kind: "Kind", ID: 37, Namespace: "ns"}
+ ```
+
+* As a result of the above, the Key methods Kind, ID, d.Name, Parent, SetParent and Namespace have been removed.
+
+* `NewIncompleteKey` has been removed, replaced by `IncompleteKey`. Replace
+ ```go
+ NewIncompleteKey(ctx, kind, parent)
+ ```
+ with
+ ```go
+ IncompleteKey(kind, parent)
+ ```
+ and if you do use namespaces, make sure you set the namespace on the returned key.
+
+* `NewKey` has been removed, replaced by `NameKey` and `IDKey`. Replace
+ ```go
+ NewKey(ctx, kind, name, 0, parent)
+ NewKey(ctx, kind, "", id, parent)
+ ```
+ with
+ ```go
+ NameKey(kind, name, parent)
+ IDKey(kind, id, parent)
+ ```
+ and if you do use namespaces, make sure you set the namespace on the returned key.
+
+* The `Done` variable has been removed. Replace `datastore.Done` with `iterator.Done`, from the package `google.golang.org/api/iterator`.
+
+* The `Client.Close` method will have a return type of error. It will return the result of closing the underlying gRPC connection.
+
+See [the announcement](https://groups.google.com/forum/#!topic/google-api-go-announce/hqXtM_4Ix-0) for
+more details.
+
+_October 27, 2016_
+
+Breaking change to bigquery: `NewGCSReference` is now a function,
+not a method on `Client`.
+
+New bigquery feature: `Table.LoaderFrom` now accepts a `ReaderSource`, enabling
+loading data into a table from a file or any `io.Reader`.
+
+_October 21, 2016_
+
+Breaking change to pubsub: removed `pubsub.Done`.
+
+Use `iterator.Done` instead, where `iterator` is the package
+`google.golang.org/api/iterator`.
+
+_October 19, 2016_
+
+Breaking changes to cloud.google.com/go/bigquery:
+
+* Client.Table and Client.OpenTable have been removed.
+ Replace
+ ```go
+ client.OpenTable("project", "dataset", "table")
+ ```
+ with
+ ```go
+ client.DatasetInProject("project", "dataset").Table("table")
+ ```
+
+* Client.CreateTable has been removed.
+ Replace
+ ```go
+ client.CreateTable(ctx, "project", "dataset", "table")
+ ```
+ with
+ ```go
+ client.DatasetInProject("project", "dataset").Table("table").Create(ctx)
+ ```
+
+* Dataset.ListTables have been replaced with Dataset.Tables.
+ Replace
+ ```go
+ tables, err := ds.ListTables(ctx)
+ ```
+ with
+ ```go
+ it := ds.Tables(ctx)
+ for {
+ table, err := it.Next()
+ if err == iterator.Done {
+ break
+ }
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: use table.
+ }
+ ```
+
+* Client.Read has been replaced with Job.Read, Table.Read and Query.Read.
+ Replace
+ ```go
+ it, err := client.Read(ctx, job)
+ ```
+ with
+ ```go
+ it, err := job.Read(ctx)
+ ```
+ and similarly for reading from tables or queries.
+
+* The iterator returned from the Read methods is now named RowIterator. Its
+ behavior is closer to the other iterators in these libraries. It no longer
+ supports the Schema method; see the next item.
+ Replace
+ ```go
+ for it.Next(ctx) {
+ var vals ValueList
+ if err := it.Get(&vals); err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: use vals.
+ }
+ if err := it.Err(); err != nil {
+ // TODO: Handle error.
+ }
+ ```
+ with
+ ```
+ for {
+ var vals ValueList
+ err := it.Next(&vals)
+ if err == iterator.Done {
+ break
+ }
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: use vals.
+ }
+ ```
+ Instead of the `RecordsPerRequest(n)` option, write
+ ```go
+ it.PageInfo().MaxSize = n
+ ```
+ Instead of the `StartIndex(i)` option, write
+ ```go
+ it.StartIndex = i
+ ```
+
+* ValueLoader.Load now takes a Schema in addition to a slice of Values.
+ Replace
+ ```go
+ func (vl *myValueLoader) Load(v []bigquery.Value)
+ ```
+ with
+ ```go
+ func (vl *myValueLoader) Load(v []bigquery.Value, s bigquery.Schema)
+ ```
+
+
+* Table.Patch is replace by Table.Update.
+ Replace
+ ```go
+ p := table.Patch()
+ p.Description("new description")
+ metadata, err := p.Apply(ctx)
+ ```
+ with
+ ```go
+ metadata, err := table.Update(ctx, bigquery.TableMetadataToUpdate{
+ Description: "new description",
+ })
+ ```
+
+* Client.Copy is replaced by separate methods for each of its four functions.
+ All options have been replaced by struct fields.
+
+ * To load data from Google Cloud Storage into a table, use Table.LoaderFrom.
+
+ Replace
+ ```go
+ client.Copy(ctx, table, gcsRef)
+ ```
+ with
+ ```go
+ table.LoaderFrom(gcsRef).Run(ctx)
+ ```
+ Instead of passing options to Copy, set fields on the Loader:
+ ```go
+ loader := table.LoaderFrom(gcsRef)
+ loader.WriteDisposition = bigquery.WriteTruncate
+ ```
+
+ * To extract data from a table into Google Cloud Storage, use
+ Table.ExtractorTo. Set fields on the returned Extractor instead of
+ passing options.
+
+ Replace
+ ```go
+ client.Copy(ctx, gcsRef, table)
+ ```
+ with
+ ```go
+ table.ExtractorTo(gcsRef).Run(ctx)
+ ```
+
+ * To copy data into a table from one or more other tables, use
+ Table.CopierFrom. Set fields on the returned Copier instead of passing options.
+
+ Replace
+ ```go
+ client.Copy(ctx, dstTable, srcTable)
+ ```
+ with
+ ```go
+ dst.Table.CopierFrom(srcTable).Run(ctx)
+ ```
+
+ * To start a query job, create a Query and call its Run method. Set fields
+ on the query instead of passing options.
+
+ Replace
+ ```go
+ client.Copy(ctx, table, query)
+ ```
+ with
+ ```go
+ query.Run(ctx)
+ ```
+
+* Table.NewUploader has been renamed to Table.Uploader. Instead of options,
+ configure an Uploader by setting its fields.
+ Replace
+ ```go
+ u := table.NewUploader(bigquery.UploadIgnoreUnknownValues())
+ ```
+ with
+ ```go
+ u := table.NewUploader(bigquery.UploadIgnoreUnknownValues())
+ u.IgnoreUnknownValues = true
+ ```
+
+_October 10, 2016_
+
+Breaking changes to cloud.google.com/go/storage:
+
+* AdminClient replaced by methods on Client.
+ Replace
+ ```go
+ adminClient.CreateBucket(ctx, bucketName, attrs)
+ ```
+ with
+ ```go
+ client.Bucket(bucketName).Create(ctx, projectID, attrs)
+ ```
+
+* BucketHandle.List replaced by BucketHandle.Objects.
+ Replace
+ ```go
+ for query != nil {
+ objs, err := bucket.List(d.ctx, query)
+ if err != nil { ... }
+ query = objs.Next
+ for _, obj := range objs.Results {
+ fmt.Println(obj)
+ }
+ }
+ ```
+ with
+ ```go
+ iter := bucket.Objects(d.ctx, query)
+ for {
+ obj, err := iter.Next()
+ if err == iterator.Done {
+ break
+ }
+ if err != nil { ... }
+ fmt.Println(obj)
+ }
+ ```
+ (The `iterator` package is at `google.golang.org/api/iterator`.)
+
+ Replace `Query.Cursor` with `ObjectIterator.PageInfo().Token`.
+
+ Replace `Query.MaxResults` with `ObjectIterator.PageInfo().MaxSize`.
+
+
+* ObjectHandle.CopyTo replaced by ObjectHandle.CopierFrom.
+ Replace
+ ```go
+ attrs, err := src.CopyTo(ctx, dst, nil)
+ ```
+ with
+ ```go
+ attrs, err := dst.CopierFrom(src).Run(ctx)
+ ```
+
+ Replace
+ ```go
+ attrs, err := src.CopyTo(ctx, dst, &storage.ObjectAttrs{ContextType: "text/html"})
+ ```
+ with
+ ```go
+ c := dst.CopierFrom(src)
+ c.ContextType = "text/html"
+ attrs, err := c.Run(ctx)
+ ```
+
+* ObjectHandle.ComposeFrom replaced by ObjectHandle.ComposerFrom.
+ Replace
+ ```go
+ attrs, err := dst.ComposeFrom(ctx, []*storage.ObjectHandle{src1, src2}, nil)
+ ```
+ with
+ ```go
+ attrs, err := dst.ComposerFrom(src1, src2).Run(ctx)
+ ```
+
+* ObjectHandle.Update's ObjectAttrs argument replaced by ObjectAttrsToUpdate.
+ Replace
+ ```go
+ attrs, err := obj.Update(ctx, &storage.ObjectAttrs{ContextType: "text/html"})
+ ```
+ with
+ ```go
+ attrs, err := obj.Update(ctx, storage.ObjectAttrsToUpdate{ContextType: "text/html"})
+ ```
+
+* ObjectHandle.WithConditions replaced by ObjectHandle.If.
+ Replace
+ ```go
+ obj.WithConditions(storage.Generation(gen), storage.IfMetaGenerationMatch(mgen))
+ ```
+ with
+ ```go
+ obj.Generation(gen).If(storage.Conditions{MetagenerationMatch: mgen})
+ ```
+
+ Replace
+ ```go
+ obj.WithConditions(storage.IfGenerationMatch(0))
+ ```
+ with
+ ```go
+ obj.If(storage.Conditions{DoesNotExist: true})
+ ```
+
+* `storage.Done` replaced by `iterator.Done` (from package `google.golang.org/api/iterator`).
+
+_October 6, 2016_
+
+Package preview/logging deleted. Use logging instead.
+
+_September 27, 2016_
+
+Logging client replaced with preview version (see below).
+
+_September 8, 2016_
+
+* New clients for some of Google's Machine Learning APIs: Vision, Speech, and
+Natural Language.
+
+* Preview version of a new [Stackdriver Logging][cloud-logging] client in
+[`cloud.google.com/go/preview/logging`](https://godoc.org/cloud.google.com/go/preview/logging).
+This client uses gRPC as its transport layer, and supports log reading, sinks
+and metrics. It will replace the current client at `cloud.google.com/go/logging` shortly.
+
diff --git a/vendor/cloud.google.com/go/run-tests.sh b/vendor/cloud.google.com/go/run-tests.sh
new file mode 100755
index 00000000000..f47ff50a5e9
--- /dev/null
+++ b/vendor/cloud.google.com/go/run-tests.sh
@@ -0,0 +1,88 @@
+#!/bin/bash
+
+# Selectively run tests for this repo, based on what has changed
+# in a commit. Runs short tests for the whole repo, and full tests
+# for changed directories.
+
+set -e
+
+prefix=cloud.google.com/go
+
+dryrun=false
+if [[ $1 == "-n" ]]; then
+ dryrun=true
+ shift
+fi
+
+if [[ $1 == "" ]]; then
+ echo >&2 "usage: $0 [-n] COMMIT"
+ exit 1
+fi
+
+# Files or directories that cause all tests to run if modified.
+declare -A run_all
+run_all=([.travis.yml]=1 [run-tests.sh]=1)
+
+function run {
+ if $dryrun; then
+ echo $*
+ else
+ (set -x; $*)
+ fi
+}
+
+
+# Find all the packages that have changed in this commit.
+declare -A changed_packages
+
+for f in $(git diff-tree --no-commit-id --name-only -r $1); do
+ if [[ ${run_all[$f]} == 1 ]]; then
+ # This change requires a full test. Do it and exit.
+ run go test -race -v $prefix/...
+ exit
+ fi
+ # Map, e.g., "spanner/client.go" to "$prefix/spanner".
+ d=$(dirname $f)
+ if [[ $d == "." ]]; then
+ pkg=$prefix
+ else
+ pkg=$prefix/$d
+ fi
+ changed_packages[$pkg]=1
+done
+
+echo "changed packages: ${!changed_packages[*]}"
+
+
+# Reports whether its argument, a package name, depends (recursively)
+# on a changed package.
+function depends_on_changed_package {
+ # According to go list, a package does not depend on itself, so
+ # we test that separately.
+ if [[ ${changed_packages[$1]} == 1 ]]; then
+ return 0
+ fi
+ for dep in $(go list -f '{{range .Deps}}{{.}} {{end}}' $1); do
+ if [[ ${changed_packages[$dep]} == 1 ]]; then
+ return 0
+ fi
+ done
+ return 1
+}
+
+# Collect the packages into two separate lists. (It is faster go test a list of
+# packages than to individually go test each one.)
+
+shorts=
+fulls=
+for pkg in $(go list $prefix/...); do # for each package in the repo
+ if depends_on_changed_package $pkg; then # if it depends on a changed package
+ fulls="$fulls $pkg" # run the full test
+ else # otherwise
+ shorts="$shorts $pkg" # run the short test
+ fi
+done
+run go test -race -v -short $shorts
+if [[ $fulls != "" ]]; then
+ run go test -race -v $fulls
+fi
diff --git a/vendor/cloud.google.com/go/storage/acl.go b/vendor/cloud.google.com/go/storage/acl.go
deleted file mode 100644
index a1b2b6d3ddd..00000000000
--- a/vendor/cloud.google.com/go/storage/acl.go
+++ /dev/null
@@ -1,252 +0,0 @@
-// Copyright 2014 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT 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 storage
-
-import (
- "fmt"
- "net/http"
- "reflect"
-
- "golang.org/x/net/context"
- "google.golang.org/api/googleapi"
- raw "google.golang.org/api/storage/v1"
-)
-
-// ACLRole is the level of access to grant.
-type ACLRole string
-
-const (
- RoleOwner ACLRole = "OWNER"
- RoleReader ACLRole = "READER"
- RoleWriter ACLRole = "WRITER"
-)
-
-// ACLEntity refers to a user or group.
-// They are sometimes referred to as grantees.
-//
-// It could be in the form of:
-// "user-", "user-", "group-", "group-",
-// "domain-" and "project-team-".
-//
-// Or one of the predefined constants: AllUsers, AllAuthenticatedUsers.
-type ACLEntity string
-
-const (
- AllUsers ACLEntity = "allUsers"
- AllAuthenticatedUsers ACLEntity = "allAuthenticatedUsers"
-)
-
-// ACLRule represents a grant for a role to an entity (user, group or team) for a Google Cloud Storage object or bucket.
-type ACLRule struct {
- Entity ACLEntity
- Role ACLRole
-}
-
-// ACLHandle provides operations on an access control list for a Google Cloud Storage bucket or object.
-type ACLHandle struct {
- c *Client
- bucket string
- object string
- isDefault bool
- userProject string // for requester-pays buckets
-}
-
-// Delete permanently deletes the ACL entry for the given entity.
-func (a *ACLHandle) Delete(ctx context.Context, entity ACLEntity) error {
- if a.object != "" {
- return a.objectDelete(ctx, entity)
- }
- if a.isDefault {
- return a.bucketDefaultDelete(ctx, entity)
- }
- return a.bucketDelete(ctx, entity)
-}
-
-// Set sets the permission level for the given entity.
-func (a *ACLHandle) Set(ctx context.Context, entity ACLEntity, role ACLRole) error {
- if a.object != "" {
- return a.objectSet(ctx, entity, role, false)
- }
- if a.isDefault {
- return a.objectSet(ctx, entity, role, true)
- }
- return a.bucketSet(ctx, entity, role)
-}
-
-// List retrieves ACL entries.
-func (a *ACLHandle) List(ctx context.Context) ([]ACLRule, error) {
- if a.object != "" {
- return a.objectList(ctx)
- }
- if a.isDefault {
- return a.bucketDefaultList(ctx)
- }
- return a.bucketList(ctx)
-}
-
-func (a *ACLHandle) bucketDefaultList(ctx context.Context) ([]ACLRule, error) {
- var acls *raw.ObjectAccessControls
- var err error
- err = runWithRetry(ctx, func() error {
- req := a.c.raw.DefaultObjectAccessControls.List(a.bucket)
- a.configureCall(req, ctx)
- acls, err = req.Do()
- return err
- })
- if err != nil {
- return nil, fmt.Errorf("storage: error listing default object ACL for bucket %q: %v", a.bucket, err)
- }
- return toACLRules(acls.Items), nil
-}
-
-func (a *ACLHandle) bucketDefaultDelete(ctx context.Context, entity ACLEntity) error {
- err := runWithRetry(ctx, func() error {
- req := a.c.raw.DefaultObjectAccessControls.Delete(a.bucket, string(entity))
- a.configureCall(req, ctx)
- return req.Do()
- })
- if err != nil {
- return fmt.Errorf("storage: error deleting default ACL entry for bucket %q, entity %q: %v", a.bucket, entity, err)
- }
- return nil
-}
-
-func (a *ACLHandle) bucketList(ctx context.Context) ([]ACLRule, error) {
- var acls *raw.BucketAccessControls
- var err error
- err = runWithRetry(ctx, func() error {
- req := a.c.raw.BucketAccessControls.List(a.bucket)
- a.configureCall(req, ctx)
- acls, err = req.Do()
- return err
- })
- if err != nil {
- return nil, fmt.Errorf("storage: error listing bucket ACL for bucket %q: %v", a.bucket, err)
- }
- r := make([]ACLRule, len(acls.Items))
- for i, v := range acls.Items {
- r[i].Entity = ACLEntity(v.Entity)
- r[i].Role = ACLRole(v.Role)
- }
- return r, nil
-}
-
-func (a *ACLHandle) bucketSet(ctx context.Context, entity ACLEntity, role ACLRole) error {
- acl := &raw.BucketAccessControl{
- Bucket: a.bucket,
- Entity: string(entity),
- Role: string(role),
- }
- err := runWithRetry(ctx, func() error {
- req := a.c.raw.BucketAccessControls.Update(a.bucket, string(entity), acl)
- a.configureCall(req, ctx)
- _, err := req.Do()
- return err
- })
- if err != nil {
- return fmt.Errorf("storage: error updating bucket ACL entry for bucket %q, entity %q: %v", a.bucket, entity, err)
- }
- return nil
-}
-
-func (a *ACLHandle) bucketDelete(ctx context.Context, entity ACLEntity) error {
- err := runWithRetry(ctx, func() error {
- req := a.c.raw.BucketAccessControls.Delete(a.bucket, string(entity))
- a.configureCall(req, ctx)
- return req.Do()
- })
- if err != nil {
- return fmt.Errorf("storage: error deleting bucket ACL entry for bucket %q, entity %q: %v", a.bucket, entity, err)
- }
- return nil
-}
-
-func (a *ACLHandle) objectList(ctx context.Context) ([]ACLRule, error) {
- var acls *raw.ObjectAccessControls
- var err error
- err = runWithRetry(ctx, func() error {
- req := a.c.raw.ObjectAccessControls.List(a.bucket, a.object)
- a.configureCall(req, ctx)
- acls, err = req.Do()
- return err
- })
- if err != nil {
- return nil, fmt.Errorf("storage: error listing object ACL for bucket %q, file %q: %v", a.bucket, a.object, err)
- }
- return toACLRules(acls.Items), nil
-}
-
-func (a *ACLHandle) objectSet(ctx context.Context, entity ACLEntity, role ACLRole, isBucketDefault bool) error {
- type setRequest interface {
- Do(opts ...googleapi.CallOption) (*raw.ObjectAccessControl, error)
- Header() http.Header
- }
-
- acl := &raw.ObjectAccessControl{
- Bucket: a.bucket,
- Entity: string(entity),
- Role: string(role),
- }
- var req setRequest
- if isBucketDefault {
- req = a.c.raw.DefaultObjectAccessControls.Update(a.bucket, string(entity), acl)
- } else {
- req = a.c.raw.ObjectAccessControls.Update(a.bucket, a.object, string(entity), acl)
- }
- a.configureCall(req, ctx)
- err := runWithRetry(ctx, func() error {
- _, err := req.Do()
- return err
- })
- if err != nil {
- if isBucketDefault {
- return fmt.Errorf("storage: error updating default ACL entry for bucket %q, entity %q: %v", a.bucket, entity, err)
- } else {
- return fmt.Errorf("storage: error updating object ACL entry for bucket %q, object %q, entity %q: %v", a.bucket, a.object, entity, err)
- }
- }
- return nil
-}
-
-func (a *ACLHandle) objectDelete(ctx context.Context, entity ACLEntity) error {
- err := runWithRetry(ctx, func() error {
- req := a.c.raw.ObjectAccessControls.Delete(a.bucket, a.object, string(entity))
- a.configureCall(req, ctx)
- return req.Do()
- })
- if err != nil {
- return fmt.Errorf("storage: error deleting object ACL entry for bucket %q, file %q, entity %q: %v", a.bucket, a.object, entity, err)
- }
- return nil
-}
-
-func (a *ACLHandle) configureCall(call interface {
- Header() http.Header
-}, ctx context.Context) {
- vc := reflect.ValueOf(call)
- vc.MethodByName("Context").Call([]reflect.Value{reflect.ValueOf(ctx)})
- if a.userProject != "" {
- vc.MethodByName("UserProject").Call([]reflect.Value{reflect.ValueOf(a.userProject)})
- }
- setClientHeader(call.Header())
-}
-
-func toACLRules(items []*raw.ObjectAccessControl) []ACLRule {
- r := make([]ACLRule, 0, len(items))
- for _, item := range items {
- r = append(r, ACLRule{Entity: ACLEntity(item.Entity), Role: ACLRole(item.Role)})
- }
- return r
-}
diff --git a/vendor/cloud.google.com/go/storage/bucket.go b/vendor/cloud.google.com/go/storage/bucket.go
deleted file mode 100644
index 68f298e843c..00000000000
--- a/vendor/cloud.google.com/go/storage/bucket.go
+++ /dev/null
@@ -1,590 +0,0 @@
-// Copyright 2014 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT 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 storage
-
-import (
- "fmt"
- "net/http"
- "reflect"
- "time"
-
- "cloud.google.com/go/internal/optional"
- "golang.org/x/net/context"
- "google.golang.org/api/googleapi"
- "google.golang.org/api/iterator"
- raw "google.golang.org/api/storage/v1"
-)
-
-// BucketHandle provides operations on a Google Cloud Storage bucket.
-// Use Client.Bucket to get a handle.
-type BucketHandle struct {
- c *Client
- name string
- acl ACLHandle
- defaultObjectACL ACLHandle
- conds *BucketConditions
- userProject string // project for requester-pays buckets
-}
-
-// Bucket returns a BucketHandle, which provides operations on the named bucket.
-// This call does not perform any network operations.
-//
-// The supplied name must contain only lowercase letters, numbers, dashes,
-// underscores, and dots. The full specification for valid bucket names can be
-// found at:
-// https://cloud.google.com/storage/docs/bucket-naming
-func (c *Client) Bucket(name string) *BucketHandle {
- return &BucketHandle{
- c: c,
- name: name,
- acl: ACLHandle{
- c: c,
- bucket: name,
- },
- defaultObjectACL: ACLHandle{
- c: c,
- bucket: name,
- isDefault: true,
- },
- }
-}
-
-// Create creates the Bucket in the project.
-// If attrs is nil the API defaults will be used.
-func (b *BucketHandle) Create(ctx context.Context, projectID string, attrs *BucketAttrs) error {
- var bkt *raw.Bucket
- if attrs != nil {
- bkt = attrs.toRawBucket()
- } else {
- bkt = &raw.Bucket{}
- }
- bkt.Name = b.name
- req := b.c.raw.Buckets.Insert(projectID, bkt)
- setClientHeader(req.Header())
- return runWithRetry(ctx, func() error { _, err := req.Context(ctx).Do(); return err })
-}
-
-// Delete deletes the Bucket.
-func (b *BucketHandle) Delete(ctx context.Context) error {
- req, err := b.newDeleteCall()
- if err != nil {
- return err
- }
- return runWithRetry(ctx, func() error { return req.Context(ctx).Do() })
-}
-
-func (b *BucketHandle) newDeleteCall() (*raw.BucketsDeleteCall, error) {
- req := b.c.raw.Buckets.Delete(b.name)
- setClientHeader(req.Header())
- if err := applyBucketConds("BucketHandle.Delete", b.conds, req); err != nil {
- return nil, err
- }
- if b.userProject != "" {
- req.UserProject(b.userProject)
- }
- return req, nil
-}
-
-// ACL returns an ACLHandle, which provides access to the bucket's access control list.
-// This controls who can list, create or overwrite the objects in a bucket.
-// This call does not perform any network operations.
-func (b *BucketHandle) ACL() *ACLHandle {
- return &b.acl
-}
-
-// DefaultObjectACL returns an ACLHandle, which provides access to the bucket's default object ACLs.
-// These ACLs are applied to newly created objects in this bucket that do not have a defined ACL.
-// This call does not perform any network operations.
-func (b *BucketHandle) DefaultObjectACL() *ACLHandle {
- return &b.defaultObjectACL
-}
-
-// Object returns an ObjectHandle, which provides operations on the named object.
-// This call does not perform any network operations.
-//
-// name must consist entirely of valid UTF-8-encoded runes. The full specification
-// for valid object names can be found at:
-// https://cloud.google.com/storage/docs/bucket-naming
-func (b *BucketHandle) Object(name string) *ObjectHandle {
- return &ObjectHandle{
- c: b.c,
- bucket: b.name,
- object: name,
- acl: ACLHandle{
- c: b.c,
- bucket: b.name,
- object: name,
- userProject: b.userProject,
- },
- gen: -1,
- userProject: b.userProject,
- }
-}
-
-// Attrs returns the metadata for the bucket.
-func (b *BucketHandle) Attrs(ctx context.Context) (*BucketAttrs, error) {
- req, err := b.newGetCall()
- if err != nil {
- return nil, err
- }
- var resp *raw.Bucket
- err = runWithRetry(ctx, func() error {
- resp, err = req.Context(ctx).Do()
- return err
- })
- if e, ok := err.(*googleapi.Error); ok && e.Code == http.StatusNotFound {
- return nil, ErrBucketNotExist
- }
- if err != nil {
- return nil, err
- }
- return newBucket(resp), nil
-}
-
-func (b *BucketHandle) newGetCall() (*raw.BucketsGetCall, error) {
- req := b.c.raw.Buckets.Get(b.name).Projection("full")
- setClientHeader(req.Header())
- if err := applyBucketConds("BucketHandle.Attrs", b.conds, req); err != nil {
- return nil, err
- }
- if b.userProject != "" {
- req.UserProject(b.userProject)
- }
- return req, nil
-}
-
-func (b *BucketHandle) Update(ctx context.Context, uattrs BucketAttrsToUpdate) (*BucketAttrs, error) {
- req, err := b.newPatchCall(&uattrs)
- if err != nil {
- return nil, err
- }
- // TODO(jba): retry iff metagen is set?
- rb, err := req.Context(ctx).Do()
- if err != nil {
- return nil, err
- }
- return newBucket(rb), nil
-}
-
-func (b *BucketHandle) newPatchCall(uattrs *BucketAttrsToUpdate) (*raw.BucketsPatchCall, error) {
- rb := uattrs.toRawBucket()
- req := b.c.raw.Buckets.Patch(b.name, rb).Projection("full")
- setClientHeader(req.Header())
- if err := applyBucketConds("BucketHandle.Update", b.conds, req); err != nil {
- return nil, err
- }
- if b.userProject != "" {
- req.UserProject(b.userProject)
- }
- return req, nil
-}
-
-// BucketAttrs represents the metadata for a Google Cloud Storage bucket.
-type BucketAttrs struct {
- // Name is the name of the bucket.
- Name string
-
- // ACL is the list of access control rules on the bucket.
- ACL []ACLRule
-
- // DefaultObjectACL is the list of access controls to
- // apply to new objects when no object ACL is provided.
- DefaultObjectACL []ACLRule
-
- // Location is the location of the bucket. It defaults to "US".
- Location string
-
- // MetaGeneration is the metadata generation of the bucket.
- MetaGeneration int64
-
- // StorageClass is the default storage class of the bucket. This defines
- // how objects in the bucket are stored and determines the SLA
- // and the cost of storage. Typical values are "MULTI_REGIONAL",
- // "REGIONAL", "NEARLINE", "COLDLINE", "STANDARD" and
- // "DURABLE_REDUCED_AVAILABILITY". Defaults to "STANDARD", which
- // is equivalent to "MULTI_REGIONAL" or "REGIONAL" depending on
- // the bucket's location settings.
- StorageClass string
-
- // Created is the creation time of the bucket.
- Created time.Time
-
- // VersioningEnabled reports whether this bucket has versioning enabled.
- // This field is read-only.
- VersioningEnabled bool
-
- // Labels are the bucket's labels.
- Labels map[string]string
-
- // RequesterPays reports whether the bucket is a Requester Pays bucket.
- RequesterPays bool
-}
-
-func newBucket(b *raw.Bucket) *BucketAttrs {
- if b == nil {
- return nil
- }
- bucket := &BucketAttrs{
- Name: b.Name,
- Location: b.Location,
- MetaGeneration: b.Metageneration,
- StorageClass: b.StorageClass,
- Created: convertTime(b.TimeCreated),
- VersioningEnabled: b.Versioning != nil && b.Versioning.Enabled,
- Labels: b.Labels,
- RequesterPays: b.Billing != nil && b.Billing.RequesterPays,
- }
- acl := make([]ACLRule, len(b.Acl))
- for i, rule := range b.Acl {
- acl[i] = ACLRule{
- Entity: ACLEntity(rule.Entity),
- Role: ACLRole(rule.Role),
- }
- }
- bucket.ACL = acl
- objACL := make([]ACLRule, len(b.DefaultObjectAcl))
- for i, rule := range b.DefaultObjectAcl {
- objACL[i] = ACLRule{
- Entity: ACLEntity(rule.Entity),
- Role: ACLRole(rule.Role),
- }
- }
- bucket.DefaultObjectACL = objACL
- return bucket
-}
-
-// toRawBucket copies the editable attribute from b to the raw library's Bucket type.
-func (b *BucketAttrs) toRawBucket() *raw.Bucket {
- var acl []*raw.BucketAccessControl
- if len(b.ACL) > 0 {
- acl = make([]*raw.BucketAccessControl, len(b.ACL))
- for i, rule := range b.ACL {
- acl[i] = &raw.BucketAccessControl{
- Entity: string(rule.Entity),
- Role: string(rule.Role),
- }
- }
- }
- dACL := toRawObjectACL(b.DefaultObjectACL)
- // Copy label map.
- var labels map[string]string
- if len(b.Labels) > 0 {
- labels = make(map[string]string, len(b.Labels))
- for k, v := range b.Labels {
- labels[k] = v
- }
- }
- // Ignore VersioningEnabled if it is false. This is OK because
- // we only call this method when creating a bucket, and by default
- // new buckets have versioning off.
- var v *raw.BucketVersioning
- if b.VersioningEnabled {
- v = &raw.BucketVersioning{Enabled: true}
- }
- var bb *raw.BucketBilling
- if b.RequesterPays {
- bb = &raw.BucketBilling{RequesterPays: true}
- }
- return &raw.Bucket{
- Name: b.Name,
- DefaultObjectAcl: dACL,
- Location: b.Location,
- StorageClass: b.StorageClass,
- Acl: acl,
- Versioning: v,
- Labels: labels,
- Billing: bb,
- }
-}
-
-type BucketAttrsToUpdate struct {
- // VersioningEnabled, if set, updates whether the bucket uses versioning.
- VersioningEnabled optional.Bool
-
- // RequesterPays, if set, updates whether the bucket is a Requester Pays bucket.
- RequesterPays optional.Bool
-
- setLabels map[string]string
- deleteLabels map[string]bool
-}
-
-// SetLabel causes a label to be added or modified when ua is used
-// in a call to Bucket.Update.
-func (ua *BucketAttrsToUpdate) SetLabel(name, value string) {
- if ua.setLabels == nil {
- ua.setLabels = map[string]string{}
- }
- ua.setLabels[name] = value
-}
-
-// DeleteLabel causes a label to be deleted when ua is used in a
-// call to Bucket.Update.
-func (ua *BucketAttrsToUpdate) DeleteLabel(name string) {
- if ua.deleteLabels == nil {
- ua.deleteLabels = map[string]bool{}
- }
- ua.deleteLabels[name] = true
-}
-
-func (ua *BucketAttrsToUpdate) toRawBucket() *raw.Bucket {
- rb := &raw.Bucket{}
- if ua.VersioningEnabled != nil {
- rb.Versioning = &raw.BucketVersioning{
- Enabled: optional.ToBool(ua.VersioningEnabled),
- ForceSendFields: []string{"Enabled"},
- }
- }
- if ua.RequesterPays != nil {
- rb.Billing = &raw.BucketBilling{
- RequesterPays: optional.ToBool(ua.RequesterPays),
- ForceSendFields: []string{"RequesterPays"},
- }
- }
- if ua.setLabels != nil || ua.deleteLabels != nil {
- rb.Labels = map[string]string{}
- for k, v := range ua.setLabels {
- rb.Labels[k] = v
- }
- if len(rb.Labels) == 0 && len(ua.deleteLabels) > 0 {
- rb.ForceSendFields = append(rb.ForceSendFields, "Labels")
- }
- for l := range ua.deleteLabels {
- rb.NullFields = append(rb.NullFields, "Labels."+l)
- }
- }
- return rb
-}
-
-// If returns a new BucketHandle that applies a set of preconditions.
-// Preconditions already set on the BucketHandle are ignored.
-// Operations on the new handle will only occur if the preconditions are
-// satisfied. The only valid preconditions for buckets are MetagenerationMatch
-// and MetagenerationNotMatch.
-func (b *BucketHandle) If(conds BucketConditions) *BucketHandle {
- b2 := *b
- b2.conds = &conds
- return &b2
-}
-
-// BucketConditions constrain bucket methods to act on specific metagenerations.
-//
-// The zero value is an empty set of constraints.
-type BucketConditions struct {
- // MetagenerationMatch specifies that the bucket must have the given
- // metageneration for the operation to occur.
- // If MetagenerationMatch is zero, it has no effect.
- MetagenerationMatch int64
-
- // MetagenerationNotMatch specifies that the bucket must not have the given
- // metageneration for the operation to occur.
- // If MetagenerationNotMatch is zero, it has no effect.
- MetagenerationNotMatch int64
-}
-
-func (c *BucketConditions) validate(method string) error {
- if *c == (BucketConditions{}) {
- return fmt.Errorf("storage: %s: empty conditions", method)
- }
- if c.MetagenerationMatch != 0 && c.MetagenerationNotMatch != 0 {
- return fmt.Errorf("storage: %s: multiple conditions specified for metageneration", method)
- }
- return nil
-}
-
-// UserProject returns a new BucketHandle that passes the project ID as the user
-// project for all subsequent calls. A user project is required for all operations
-// on requester-pays buckets.
-func (b *BucketHandle) UserProject(projectID string) *BucketHandle {
- b2 := *b
- b2.userProject = projectID
- b2.acl.userProject = projectID
- b2.defaultObjectACL.userProject = projectID
- return &b2
-}
-
-// applyBucketConds modifies the provided call using the conditions in conds.
-// call is something that quacks like a *raw.WhateverCall.
-func applyBucketConds(method string, conds *BucketConditions, call interface{}) error {
- if conds == nil {
- return nil
- }
- if err := conds.validate(method); err != nil {
- return err
- }
- cval := reflect.ValueOf(call)
- switch {
- case conds.MetagenerationMatch != 0:
- if !setConditionField(cval, "IfMetagenerationMatch", conds.MetagenerationMatch) {
- return fmt.Errorf("storage: %s: ifMetagenerationMatch not supported", method)
- }
- case conds.MetagenerationNotMatch != 0:
- if !setConditionField(cval, "IfMetagenerationNotMatch", conds.MetagenerationNotMatch) {
- return fmt.Errorf("storage: %s: ifMetagenerationNotMatch not supported", method)
- }
- }
- return nil
-}
-
-// Objects returns an iterator over the objects in the bucket that match the Query q.
-// If q is nil, no filtering is done.
-func (b *BucketHandle) Objects(ctx context.Context, q *Query) *ObjectIterator {
- it := &ObjectIterator{
- ctx: ctx,
- bucket: b,
- }
- it.pageInfo, it.nextFunc = iterator.NewPageInfo(
- it.fetch,
- func() int { return len(it.items) },
- func() interface{} { b := it.items; it.items = nil; return b })
- if q != nil {
- it.query = *q
- }
- return it
-}
-
-// An ObjectIterator is an iterator over ObjectAttrs.
-type ObjectIterator struct {
- ctx context.Context
- bucket *BucketHandle
- query Query
- pageInfo *iterator.PageInfo
- nextFunc func() error
- items []*ObjectAttrs
-}
-
-// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
-func (it *ObjectIterator) PageInfo() *iterator.PageInfo { return it.pageInfo }
-
-// Next returns the next result. Its second return value is iterator.Done if
-// there are no more results. Once Next returns iterator.Done, all subsequent
-// calls will return iterator.Done.
-//
-// If Query.Delimiter is non-empty, some of the ObjectAttrs returned by Next will
-// have a non-empty Prefix field, and a zero value for all other fields. These
-// represent prefixes.
-func (it *ObjectIterator) Next() (*ObjectAttrs, error) {
- if err := it.nextFunc(); err != nil {
- return nil, err
- }
- item := it.items[0]
- it.items = it.items[1:]
- return item, nil
-}
-
-func (it *ObjectIterator) fetch(pageSize int, pageToken string) (string, error) {
- req := it.bucket.c.raw.Objects.List(it.bucket.name)
- setClientHeader(req.Header())
- req.Projection("full")
- req.Delimiter(it.query.Delimiter)
- req.Prefix(it.query.Prefix)
- req.Versions(it.query.Versions)
- req.PageToken(pageToken)
- if it.bucket.userProject != "" {
- req.UserProject(it.bucket.userProject)
- }
- if pageSize > 0 {
- req.MaxResults(int64(pageSize))
- }
- var resp *raw.Objects
- var err error
- err = runWithRetry(it.ctx, func() error {
- resp, err = req.Context(it.ctx).Do()
- return err
- })
- if err != nil {
- if e, ok := err.(*googleapi.Error); ok && e.Code == http.StatusNotFound {
- err = ErrBucketNotExist
- }
- return "", err
- }
- for _, item := range resp.Items {
- it.items = append(it.items, newObject(item))
- }
- for _, prefix := range resp.Prefixes {
- it.items = append(it.items, &ObjectAttrs{Prefix: prefix})
- }
- return resp.NextPageToken, nil
-}
-
-// TODO(jbd): Add storage.buckets.update.
-
-// Buckets returns an iterator over the buckets in the project. You may
-// optionally set the iterator's Prefix field to restrict the list to buckets
-// whose names begin with the prefix. By default, all buckets in the project
-// are returned.
-func (c *Client) Buckets(ctx context.Context, projectID string) *BucketIterator {
- it := &BucketIterator{
- ctx: ctx,
- client: c,
- projectID: projectID,
- }
- it.pageInfo, it.nextFunc = iterator.NewPageInfo(
- it.fetch,
- func() int { return len(it.buckets) },
- func() interface{} { b := it.buckets; it.buckets = nil; return b })
- return it
-}
-
-// A BucketIterator is an iterator over BucketAttrs.
-type BucketIterator struct {
- // Prefix restricts the iterator to buckets whose names begin with it.
- Prefix string
-
- ctx context.Context
- client *Client
- projectID string
- buckets []*BucketAttrs
- pageInfo *iterator.PageInfo
- nextFunc func() error
-}
-
-// Next returns the next result. Its second return value is iterator.Done if
-// there are no more results. Once Next returns iterator.Done, all subsequent
-// calls will return iterator.Done.
-func (it *BucketIterator) Next() (*BucketAttrs, error) {
- if err := it.nextFunc(); err != nil {
- return nil, err
- }
- b := it.buckets[0]
- it.buckets = it.buckets[1:]
- return b, nil
-}
-
-// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
-func (it *BucketIterator) PageInfo() *iterator.PageInfo { return it.pageInfo }
-
-func (it *BucketIterator) fetch(pageSize int, pageToken string) (string, error) {
- req := it.client.raw.Buckets.List(it.projectID)
- setClientHeader(req.Header())
- req.Projection("full")
- req.Prefix(it.Prefix)
- req.PageToken(pageToken)
- if pageSize > 0 {
- req.MaxResults(int64(pageSize))
- }
- var resp *raw.Buckets
- var err error
- err = runWithRetry(it.ctx, func() error {
- resp, err = req.Context(it.ctx).Do()
- return err
- })
- if err != nil {
- return "", err
- }
- for _, item := range resp.Items {
- it.buckets = append(it.buckets, newBucket(item))
- }
- return resp.NextPageToken, nil
-}
diff --git a/vendor/cloud.google.com/go/storage/copy.go b/vendor/cloud.google.com/go/storage/copy.go
deleted file mode 100644
index d0a999c1b2f..00000000000
--- a/vendor/cloud.google.com/go/storage/copy.go
+++ /dev/null
@@ -1,201 +0,0 @@
-// Copyright 2016 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT 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 storage
-
-import (
- "errors"
- "fmt"
-
- "golang.org/x/net/context"
- raw "google.golang.org/api/storage/v1"
-)
-
-// CopierFrom creates a Copier that can copy src to dst.
-// You can immediately call Run on the returned Copier, or
-// you can configure it first.
-//
-// For Requester Pays buckets, the user project of dst is billed, unless it is empty,
-// in which case the user project of src is billed.
-func (dst *ObjectHandle) CopierFrom(src *ObjectHandle) *Copier {
- return &Copier{dst: dst, src: src}
-}
-
-// A Copier copies a source object to a destination.
-type Copier struct {
- // ObjectAttrs are optional attributes to set on the destination object.
- // Any attributes must be initialized before any calls on the Copier. Nil
- // or zero-valued attributes are ignored.
- ObjectAttrs
-
- // RewriteToken can be set before calling Run to resume a copy
- // operation. After Run returns a non-nil error, RewriteToken will
- // have been updated to contain the value needed to resume the copy.
- RewriteToken string
-
- // ProgressFunc can be used to monitor the progress of a multi-RPC copy
- // operation. If ProgressFunc is not nil and copying requires multiple
- // calls to the underlying service (see
- // https://cloud.google.com/storage/docs/json_api/v1/objects/rewrite), then
- // ProgressFunc will be invoked after each call with the number of bytes of
- // content copied so far and the total size in bytes of the source object.
- //
- // ProgressFunc is intended to make upload progress available to the
- // application. For example, the implementation of ProgressFunc may update
- // a progress bar in the application's UI, or log the result of
- // float64(copiedBytes)/float64(totalBytes).
- //
- // ProgressFunc should return quickly without blocking.
- ProgressFunc func(copiedBytes, totalBytes uint64)
-
- dst, src *ObjectHandle
-}
-
-// Run performs the copy.
-func (c *Copier) Run(ctx context.Context) (*ObjectAttrs, error) {
- if err := c.src.validate(); err != nil {
- return nil, err
- }
- if err := c.dst.validate(); err != nil {
- return nil, err
- }
- // Convert destination attributes to raw form, omitting the bucket.
- // If the bucket is included but name or content-type aren't, the service
- // returns a 400 with "Required" as the only message. Omitting the bucket
- // does not cause any problems.
- rawObject := c.ObjectAttrs.toRawObject("")
- for {
- res, err := c.callRewrite(ctx, rawObject)
- if err != nil {
- return nil, err
- }
- if c.ProgressFunc != nil {
- c.ProgressFunc(uint64(res.TotalBytesRewritten), uint64(res.ObjectSize))
- }
- if res.Done { // Finished successfully.
- return newObject(res.Resource), nil
- }
- }
-}
-
-func (c *Copier) callRewrite(ctx context.Context, rawObj *raw.Object) (*raw.RewriteResponse, error) {
- call := c.dst.c.raw.Objects.Rewrite(c.src.bucket, c.src.object, c.dst.bucket, c.dst.object, rawObj)
-
- call.Context(ctx).Projection("full")
- if c.RewriteToken != "" {
- call.RewriteToken(c.RewriteToken)
- }
- if err := applyConds("Copy destination", c.dst.gen, c.dst.conds, call); err != nil {
- return nil, err
- }
- if c.dst.userProject != "" {
- call.UserProject(c.dst.userProject)
- } else if c.src.userProject != "" {
- call.UserProject(c.src.userProject)
- }
- if err := applySourceConds(c.src.gen, c.src.conds, call); err != nil {
- return nil, err
- }
- if err := setEncryptionHeaders(call.Header(), c.dst.encryptionKey, false); err != nil {
- return nil, err
- }
- if err := setEncryptionHeaders(call.Header(), c.src.encryptionKey, true); err != nil {
- return nil, err
- }
- var res *raw.RewriteResponse
- var err error
- setClientHeader(call.Header())
- err = runWithRetry(ctx, func() error { res, err = call.Do(); return err })
- if err != nil {
- return nil, err
- }
- c.RewriteToken = res.RewriteToken
- return res, nil
-}
-
-// ComposerFrom creates a Composer that can compose srcs into dst.
-// You can immediately call Run on the returned Composer, or you can
-// configure it first.
-//
-// The encryption key for the destination object will be used to decrypt all
-// source objects and encrypt the destination object. It is an error
-// to specify an encryption key for any of the source objects.
-func (dst *ObjectHandle) ComposerFrom(srcs ...*ObjectHandle) *Composer {
- return &Composer{dst: dst, srcs: srcs}
-}
-
-// A Composer composes source objects into a destination object.
-//
-// For Requester Pays buckets, the user project of dst is billed.
-type Composer struct {
- // ObjectAttrs are optional attributes to set on the destination object.
- // Any attributes must be initialized before any calls on the Composer. Nil
- // or zero-valued attributes are ignored.
- ObjectAttrs
-
- dst *ObjectHandle
- srcs []*ObjectHandle
-}
-
-// Run performs the compose operation.
-func (c *Composer) Run(ctx context.Context) (*ObjectAttrs, error) {
- if err := c.dst.validate(); err != nil {
- return nil, err
- }
- if len(c.srcs) == 0 {
- return nil, errors.New("storage: at least one source object must be specified")
- }
-
- req := &raw.ComposeRequest{}
- // Compose requires a non-empty Destination, so we always set it,
- // even if the caller-provided ObjectAttrs is the zero value.
- req.Destination = c.ObjectAttrs.toRawObject(c.dst.bucket)
- for _, src := range c.srcs {
- if err := src.validate(); err != nil {
- return nil, err
- }
- if src.bucket != c.dst.bucket {
- return nil, fmt.Errorf("storage: all source objects must be in bucket %q, found %q", c.dst.bucket, src.bucket)
- }
- if src.encryptionKey != nil {
- return nil, fmt.Errorf("storage: compose source %s.%s must not have encryption key", src.bucket, src.object)
- }
- srcObj := &raw.ComposeRequestSourceObjects{
- Name: src.object,
- }
- if err := applyConds("ComposeFrom source", src.gen, src.conds, composeSourceObj{srcObj}); err != nil {
- return nil, err
- }
- req.SourceObjects = append(req.SourceObjects, srcObj)
- }
-
- call := c.dst.c.raw.Objects.Compose(c.dst.bucket, c.dst.object, req).Context(ctx)
- if err := applyConds("ComposeFrom destination", c.dst.gen, c.dst.conds, call); err != nil {
- return nil, err
- }
- if c.dst.userProject != "" {
- call.UserProject(c.dst.userProject)
- }
- if err := setEncryptionHeaders(call.Header(), c.dst.encryptionKey, false); err != nil {
- return nil, err
- }
- var obj *raw.Object
- var err error
- setClientHeader(call.Header())
- err = runWithRetry(ctx, func() error { obj, err = call.Do(); return err })
- if err != nil {
- return nil, err
- }
- return newObject(obj), nil
-}
diff --git a/vendor/cloud.google.com/go/storage/doc.go b/vendor/cloud.google.com/go/storage/doc.go
deleted file mode 100644
index 951391f5489..00000000000
--- a/vendor/cloud.google.com/go/storage/doc.go
+++ /dev/null
@@ -1,161 +0,0 @@
-// Copyright 2016 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT 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 storage provides an easy way to work with Google Cloud Storage.
-Google Cloud Storage stores data in named objects, which are grouped into buckets.
-
-More information about Google Cloud Storage is available at
-https://cloud.google.com/storage/docs.
-
-All of the methods of this package use exponential backoff to retry calls
-that fail with certain errors, as described in
-https://cloud.google.com/storage/docs/exponential-backoff.
-
-Note: This package is in beta. Some backwards-incompatible changes may occur.
-
-
-Creating a Client
-
-To start working with this package, create a client:
-
- ctx := context.Background()
- client, err := storage.NewClient(ctx)
- if err != nil {
- // TODO: Handle error.
- }
-
-Buckets
-
-A Google Cloud Storage bucket is a collection of objects. To work with a
-bucket, make a bucket handle:
-
- bkt := client.Bucket(bucketName)
-
-A handle is a reference to a bucket. You can have a handle even if the
-bucket doesn't exist yet. To create a bucket in Google Cloud Storage,
-call Create on the handle:
-
- if err := bkt.Create(ctx, projectID, nil); err != nil {
- // TODO: Handle error.
- }
-
-Note that although buckets are associated with projects, bucket names are
-global across all projects.
-
-Each bucket has associated metadata, represented in this package by
-BucketAttrs. The third argument to BucketHandle.Create allows you to set
-the intial BucketAttrs of a bucket. To retrieve a bucket's attributes, use
-Attrs:
-
- attrs, err := bkt.Attrs(ctx)
- if err != nil {
- // TODO: Handle error.
- }
- fmt.Printf("bucket %s, created at %s, is located in %s with storage class %s\n",
- attrs.Name, attrs.Created, attrs.Location, attrs.StorageClass)
-
-Objects
-
-An object holds arbitrary data as a sequence of bytes, like a file. You
-refer to objects using a handle, just as with buckets. You can use the
-standard Go io.Reader and io.Writer interfaces to read and write
-object data:
-
- obj := bkt.Object("data")
- // Write something to obj.
- // w implements io.Writer.
- w := obj.NewWriter(ctx)
- // Write some text to obj. This will overwrite whatever is there.
- if _, err := fmt.Fprintf(w, "This object contains text.\n"); err != nil {
- // TODO: Handle error.
- }
- // Close, just like writing a file.
- if err := w.Close(); err != nil {
- // TODO: Handle error.
- }
-
- // Read it back.
- r, err := obj.NewReader(ctx)
- if err != nil {
- // TODO: Handle error.
- }
- defer r.Close()
- if _, err := io.Copy(os.Stdout, r); err != nil {
- // TODO: Handle error.
- }
- // Prints "This object contains text."
-
-Objects also have attributes, which you can fetch with Attrs:
-
- objAttrs, err := obj.Attrs(ctx)
- if err != nil {
- // TODO: Handle error.
- }
- fmt.Printf("object %s has size %d and can be read using %s\n",
- objAttrs.Name, objAttrs.Size, objAttrs.MediaLink)
-
-ACLs
-
-Both objects and buckets have ACLs (Access Control Lists). An ACL is a list of
-ACLRules, each of which specifies the role of a user, group or project. ACLs
-are suitable for fine-grained control, but you may prefer using IAM to control
-access at the project level (see
-https://cloud.google.com/storage/docs/access-control/iam).
-
-To list the ACLs of a bucket or object, obtain an ACLHandle and call its List method:
-
- acls, err := obj.ACL().List(ctx)
- if err != nil {
- // TODO: Handle error.
- }
- for _, rule := range acls {
- fmt.Printf("%s has role %s\n", rule.Entity, rule.Role)
- }
-
-You can also set and delete ACLs.
-
-Conditions
-
-Every object has a generation and a metageneration. The generation changes
-whenever the content changes, and the metageneration changes whenever the
-metadata changes. Conditions let you check these values before an operation;
-the operation only executes if the conditions match. You can use conditions to
-prevent race conditions in read-modify-write operations.
-
-For example, say you've read an object's metadata into objAttrs. Now
-you want to write to that object, but only if its contents haven't changed
-since you read it. Here is how to express that:
-
- w = obj.If(storage.Conditions{GenerationMatch: objAttrs.Generation}).NewWriter(ctx)
- // Proceed with writing as above.
-
-Signed URLs
-
-You can obtain a URL that lets anyone read or write an object for a limited time.
-You don't need to create a client to do this. See the documentation of
-SignedURL for details.
-
- url, err := storage.SignedURL(bucketName, "shared-object", opts)
- if err != nil {
- // TODO: Handle error.
- }
- fmt.Println(url)
-
-Authentication
-
-See examples of authorization and authentication at
-https://godoc.org/cloud.google.com/go#pkg-examples.
-*/
-package storage // import "cloud.google.com/go/storage"
diff --git a/vendor/cloud.google.com/go/storage/go17.go b/vendor/cloud.google.com/go/storage/go17.go
deleted file mode 100644
index 982db4e1a16..00000000000
--- a/vendor/cloud.google.com/go/storage/go17.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2017 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// +build go1.7
-
-package storage
-
-import (
- "context"
- "net/http"
-)
-
-func withContext(r *http.Request, ctx context.Context) *http.Request {
- return r.WithContext(ctx)
-}
diff --git a/vendor/cloud.google.com/go/storage/iam.go b/vendor/cloud.google.com/go/storage/iam.go
deleted file mode 100644
index 6607d8cc2c0..00000000000
--- a/vendor/cloud.google.com/go/storage/iam.go
+++ /dev/null
@@ -1,108 +0,0 @@
-// Copyright 2017 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT 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 storage
-
-import (
- "cloud.google.com/go/iam"
- "golang.org/x/net/context"
- raw "google.golang.org/api/storage/v1"
- iampb "google.golang.org/genproto/googleapis/iam/v1"
-)
-
-// IAM provides access to IAM access control for the bucket.
-func (b *BucketHandle) IAM() *iam.Handle {
- return iam.InternalNewHandleClient(&iamClient{raw: b.c.raw}, b.name)
-}
-
-// iamClient implements the iam.client interface.
-type iamClient struct {
- raw *raw.Service
-}
-
-func (c *iamClient) Get(ctx context.Context, resource string) (*iampb.Policy, error) {
- req := c.raw.Buckets.GetIamPolicy(resource)
- setClientHeader(req.Header())
- var rp *raw.Policy
- var err error
- err = runWithRetry(ctx, func() error {
- rp, err = req.Context(ctx).Do()
- return err
- })
- if err != nil {
- return nil, err
- }
- return iamFromStoragePolicy(rp), nil
-}
-
-func (c *iamClient) Set(ctx context.Context, resource string, p *iampb.Policy) error {
- rp := iamToStoragePolicy(p)
- req := c.raw.Buckets.SetIamPolicy(resource, rp)
- setClientHeader(req.Header())
- return runWithRetry(ctx, func() error {
- _, err := req.Context(ctx).Do()
- return err
- })
-}
-
-func (c *iamClient) Test(ctx context.Context, resource string, perms []string) ([]string, error) {
- req := c.raw.Buckets.TestIamPermissions(resource, perms)
- setClientHeader(req.Header())
- var res *raw.TestIamPermissionsResponse
- var err error
- err = runWithRetry(ctx, func() error {
- res, err = req.Context(ctx).Do()
- return err
- })
- if err != nil {
- return nil, err
- }
- return res.Permissions, nil
-}
-
-func iamToStoragePolicy(ip *iampb.Policy) *raw.Policy {
- return &raw.Policy{
- Bindings: iamToStorageBindings(ip.Bindings),
- Etag: string(ip.Etag),
- }
-}
-
-func iamToStorageBindings(ibs []*iampb.Binding) []*raw.PolicyBindings {
- var rbs []*raw.PolicyBindings
- for _, ib := range ibs {
- rbs = append(rbs, &raw.PolicyBindings{
- Role: ib.Role,
- Members: ib.Members,
- })
- }
- return rbs
-}
-
-func iamFromStoragePolicy(rp *raw.Policy) *iampb.Policy {
- return &iampb.Policy{
- Bindings: iamFromStorageBindings(rp.Bindings),
- Etag: []byte(rp.Etag),
- }
-}
-
-func iamFromStorageBindings(rbs []*raw.PolicyBindings) []*iampb.Binding {
- var ibs []*iampb.Binding
- for _, rb := range rbs {
- ibs = append(ibs, &iampb.Binding{
- Role: rb.Role,
- Members: rb.Members,
- })
- }
- return ibs
-}
diff --git a/vendor/cloud.google.com/go/storage/invoke.go b/vendor/cloud.google.com/go/storage/invoke.go
deleted file mode 100644
index e8fc924eade..00000000000
--- a/vendor/cloud.google.com/go/storage/invoke.go
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2014 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT 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 storage
-
-import (
- "cloud.google.com/go/internal"
- gax "github.com/googleapis/gax-go"
- "golang.org/x/net/context"
- "google.golang.org/api/googleapi"
-)
-
-// runWithRetry calls the function until it returns nil or a non-retryable error, or
-// the context is done.
-func runWithRetry(ctx context.Context, call func() error) error {
- return internal.Retry(ctx, gax.Backoff{}, func() (stop bool, err error) {
- err = call()
- if err == nil {
- return true, nil
- }
- e, ok := err.(*googleapi.Error)
- if !ok {
- return true, err
- }
- // Retry on 429 and 5xx, according to
- // https://cloud.google.com/storage/docs/exponential-backoff.
- if e.Code == 429 || (e.Code >= 500 && e.Code < 600) {
- return false, nil
- }
- return true, err
- })
-}
diff --git a/vendor/cloud.google.com/go/storage/reader.go b/vendor/cloud.google.com/go/storage/reader.go
deleted file mode 100644
index aa103c17574..00000000000
--- a/vendor/cloud.google.com/go/storage/reader.go
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2016 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT 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 storage
-
-import (
- "fmt"
- "hash/crc32"
- "io"
-)
-
-var crc32cTable = crc32.MakeTable(crc32.Castagnoli)
-
-// Reader reads a Cloud Storage object.
-// It implements io.Reader.
-type Reader struct {
- body io.ReadCloser
- remain, size int64
- contentType string
- checkCRC bool // should we check the CRC?
- wantCRC uint32 // the CRC32c value the server sent in the header
- gotCRC uint32 // running crc
-}
-
-// Close closes the Reader. It must be called when done reading.
-func (r *Reader) Close() error {
- return r.body.Close()
-}
-
-func (r *Reader) Read(p []byte) (int, error) {
- n, err := r.body.Read(p)
- if r.remain != -1 {
- r.remain -= int64(n)
- }
- if r.checkCRC {
- r.gotCRC = crc32.Update(r.gotCRC, crc32cTable, p[:n])
- // Check CRC here. It would be natural to check it in Close, but
- // everybody defers Close on the assumption that it doesn't return
- // anything worth looking at.
- if r.remain == 0 && r.gotCRC != r.wantCRC {
- return n, fmt.Errorf("storage: bad CRC on read: got %d, want %d",
- r.gotCRC, r.wantCRC)
- }
- }
- return n, err
-}
-
-// Size returns the size of the object in bytes.
-// The returned value is always the same and is not affected by
-// calls to Read or Close.
-func (r *Reader) Size() int64 {
- return r.size
-}
-
-// Remain returns the number of bytes left to read, or -1 if unknown.
-func (r *Reader) Remain() int64 {
- return r.remain
-}
-
-// ContentType returns the content type of the object.
-func (r *Reader) ContentType() string {
- return r.contentType
-}
diff --git a/vendor/cloud.google.com/go/storage/storage.go b/vendor/cloud.google.com/go/storage/storage.go
deleted file mode 100644
index fd6c0455ebf..00000000000
--- a/vendor/cloud.google.com/go/storage/storage.go
+++ /dev/null
@@ -1,1117 +0,0 @@
-// Copyright 2014 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT 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 storage
-
-import (
- "bytes"
- "crypto"
- "crypto/rand"
- "crypto/rsa"
- "crypto/sha256"
- "crypto/x509"
- "encoding/base64"
- "encoding/pem"
- "errors"
- "fmt"
- "io"
- "io/ioutil"
- "net/http"
- "net/url"
- "reflect"
- "strconv"
- "strings"
- "time"
- "unicode/utf8"
-
- "google.golang.org/api/option"
- htransport "google.golang.org/api/transport/http"
-
- "cloud.google.com/go/internal/optional"
- "cloud.google.com/go/internal/version"
- "golang.org/x/net/context"
- "google.golang.org/api/googleapi"
- raw "google.golang.org/api/storage/v1"
-)
-
-var (
- ErrBucketNotExist = errors.New("storage: bucket doesn't exist")
- ErrObjectNotExist = errors.New("storage: object doesn't exist")
-)
-
-const userAgent = "gcloud-golang-storage/20151204"
-
-const (
- // ScopeFullControl grants permissions to manage your
- // data and permissions in Google Cloud Storage.
- ScopeFullControl = raw.DevstorageFullControlScope
-
- // ScopeReadOnly grants permissions to
- // view your data in Google Cloud Storage.
- ScopeReadOnly = raw.DevstorageReadOnlyScope
-
- // ScopeReadWrite grants permissions to manage your
- // data in Google Cloud Storage.
- ScopeReadWrite = raw.DevstorageReadWriteScope
-)
-
-var xGoogHeader = fmt.Sprintf("gl-go/%s gccl/%s", version.Go(), version.Repo)
-
-func setClientHeader(headers http.Header) {
- headers.Set("x-goog-api-client", xGoogHeader)
-}
-
-// Client is a client for interacting with Google Cloud Storage.
-//
-// Clients should be reused instead of created as needed.
-// The methods of Client are safe for concurrent use by multiple goroutines.
-type Client struct {
- hc *http.Client
- raw *raw.Service
-}
-
-// NewClient creates a new Google Cloud Storage client.
-// The default scope is ScopeFullControl. To use a different scope, like ScopeReadOnly, use option.WithScopes.
-func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) {
- o := []option.ClientOption{
- option.WithScopes(ScopeFullControl),
- option.WithUserAgent(userAgent),
- }
- opts = append(o, opts...)
- hc, ep, err := htransport.NewClient(ctx, opts...)
- if err != nil {
- return nil, fmt.Errorf("dialing: %v", err)
- }
- rawService, err := raw.New(hc)
- if err != nil {
- return nil, fmt.Errorf("storage client: %v", err)
- }
- if ep != "" {
- rawService.BasePath = ep
- }
- return &Client{
- hc: hc,
- raw: rawService,
- }, nil
-}
-
-// Close closes the Client.
-//
-// Close need not be called at program exit.
-func (c *Client) Close() error {
- c.hc = nil
- return nil
-}
-
-// SignedURLOptions allows you to restrict the access to the signed URL.
-type SignedURLOptions struct {
- // GoogleAccessID represents the authorizer of the signed URL generation.
- // It is typically the Google service account client email address from
- // the Google Developers Console in the form of "xxx@developer.gserviceaccount.com".
- // Required.
- GoogleAccessID string
-
- // PrivateKey is the Google service account private key. It is obtainable
- // from the Google Developers Console.
- // At https://console.developers.google.com/project//apiui/credential,
- // create a service account client ID or reuse one of your existing service account
- // credentials. Click on the "Generate new P12 key" to generate and download
- // a new private key. Once you download the P12 file, use the following command
- // to convert it into a PEM file.
- //
- // $ openssl pkcs12 -in key.p12 -passin pass:notasecret -out key.pem -nodes
- //
- // Provide the contents of the PEM file as a byte slice.
- // Exactly one of PrivateKey or SignBytes must be non-nil.
- PrivateKey []byte
-
- // SignBytes is a function for implementing custom signing.
- // If your application is running on Google App Engine, you can use appengine's internal signing function:
- // ctx := appengine.NewContext(request)
- // acc, _ := appengine.ServiceAccount(ctx)
- // url, err := SignedURL("bucket", "object", &SignedURLOptions{
- // GoogleAccessID: acc,
- // SignBytes: func(b []byte) ([]byte, error) {
- // _, signedBytes, err := appengine.SignBytes(ctx, b)
- // return signedBytes, err
- // },
- // // etc.
- // })
- //
- // Exactly one of PrivateKey or SignBytes must be non-nil.
- SignBytes func([]byte) ([]byte, error)
-
- // Method is the HTTP method to be used with the signed URL.
- // Signed URLs can be used with GET, HEAD, PUT, and DELETE requests.
- // Required.
- Method string
-
- // Expires is the expiration time on the signed URL. It must be
- // a datetime in the future.
- // Required.
- Expires time.Time
-
- // ContentType is the content type header the client must provide
- // to use the generated signed URL.
- // Optional.
- ContentType string
-
- // Headers is a list of extention headers the client must provide
- // in order to use the generated signed URL.
- // Optional.
- Headers []string
-
- // MD5 is the base64 encoded MD5 checksum of the file.
- // If provided, the client should provide the exact value on the request
- // header in order to use the signed URL.
- // Optional.
- MD5 string
-}
-
-// SignedURL returns a URL for the specified object. Signed URLs allow
-// the users access to a restricted resource for a limited time without having a
-// Google account or signing in. For more information about the signed
-// URLs, see https://cloud.google.com/storage/docs/accesscontrol#Signed-URLs.
-func SignedURL(bucket, name string, opts *SignedURLOptions) (string, error) {
- if opts == nil {
- return "", errors.New("storage: missing required SignedURLOptions")
- }
- if opts.GoogleAccessID == "" {
- return "", errors.New("storage: missing required GoogleAccessID")
- }
- if (opts.PrivateKey == nil) == (opts.SignBytes == nil) {
- return "", errors.New("storage: exactly one of PrivateKey or SignedBytes must be set")
- }
- if opts.Method == "" {
- return "", errors.New("storage: missing required method option")
- }
- if opts.Expires.IsZero() {
- return "", errors.New("storage: missing required expires option")
- }
- if opts.MD5 != "" {
- md5, err := base64.StdEncoding.DecodeString(opts.MD5)
- if err != nil || len(md5) != 16 {
- return "", errors.New("storage: invalid MD5 checksum")
- }
- }
-
- signBytes := opts.SignBytes
- if opts.PrivateKey != nil {
- key, err := parseKey(opts.PrivateKey)
- if err != nil {
- return "", err
- }
- signBytes = func(b []byte) ([]byte, error) {
- sum := sha256.Sum256(b)
- return rsa.SignPKCS1v15(
- rand.Reader,
- key,
- crypto.SHA256,
- sum[:],
- )
- }
- }
-
- u := &url.URL{
- Path: fmt.Sprintf("/%s/%s", bucket, name),
- }
-
- buf := &bytes.Buffer{}
- fmt.Fprintf(buf, "%s\n", opts.Method)
- fmt.Fprintf(buf, "%s\n", opts.MD5)
- fmt.Fprintf(buf, "%s\n", opts.ContentType)
- fmt.Fprintf(buf, "%d\n", opts.Expires.Unix())
- if len(opts.Headers) > 0 {
- fmt.Fprintf(buf, "%s\n", strings.Join(opts.Headers, "\n"))
- }
- fmt.Fprintf(buf, "%s", u.String())
-
- b, err := signBytes(buf.Bytes())
- if err != nil {
- return "", err
- }
- encoded := base64.StdEncoding.EncodeToString(b)
- u.Scheme = "https"
- u.Host = "storage.googleapis.com"
- q := u.Query()
- q.Set("GoogleAccessId", opts.GoogleAccessID)
- q.Set("Expires", fmt.Sprintf("%d", opts.Expires.Unix()))
- q.Set("Signature", string(encoded))
- u.RawQuery = q.Encode()
- return u.String(), nil
-}
-
-// ObjectHandle provides operations on an object in a Google Cloud Storage bucket.
-// Use BucketHandle.Object to get a handle.
-type ObjectHandle struct {
- c *Client
- bucket string
- object string
- acl ACLHandle
- gen int64 // a negative value indicates latest
- conds *Conditions
- encryptionKey []byte // AES-256 key
- userProject string // for requester-pays buckets
-}
-
-// ACL provides access to the object's access control list.
-// This controls who can read and write this object.
-// This call does not perform any network operations.
-func (o *ObjectHandle) ACL() *ACLHandle {
- return &o.acl
-}
-
-// Generation returns a new ObjectHandle that operates on a specific generation
-// of the object.
-// By default, the handle operates on the latest generation. Not
-// all operations work when given a specific generation; check the API
-// endpoints at https://cloud.google.com/storage/docs/json_api/ for details.
-func (o *ObjectHandle) Generation(gen int64) *ObjectHandle {
- o2 := *o
- o2.gen = gen
- return &o2
-}
-
-// If returns a new ObjectHandle that applies a set of preconditions.
-// Preconditions already set on the ObjectHandle are ignored.
-// Operations on the new handle will only occur if the preconditions are
-// satisfied. See https://cloud.google.com/storage/docs/generations-preconditions
-// for more details.
-func (o *ObjectHandle) If(conds Conditions) *ObjectHandle {
- o2 := *o
- o2.conds = &conds
- return &o2
-}
-
-// Key returns a new ObjectHandle that uses the supplied encryption
-// key to encrypt and decrypt the object's contents.
-//
-// Encryption key must be a 32-byte AES-256 key.
-// See https://cloud.google.com/storage/docs/encryption for details.
-func (o *ObjectHandle) Key(encryptionKey []byte) *ObjectHandle {
- o2 := *o
- o2.encryptionKey = encryptionKey
- return &o2
-}
-
-// Attrs returns meta information about the object.
-// ErrObjectNotExist will be returned if the object is not found.
-func (o *ObjectHandle) Attrs(ctx context.Context) (*ObjectAttrs, error) {
- if err := o.validate(); err != nil {
- return nil, err
- }
- call := o.c.raw.Objects.Get(o.bucket, o.object).Projection("full").Context(ctx)
- if err := applyConds("Attrs", o.gen, o.conds, call); err != nil {
- return nil, err
- }
- if o.userProject != "" {
- call.UserProject(o.userProject)
- }
- if err := setEncryptionHeaders(call.Header(), o.encryptionKey, false); err != nil {
- return nil, err
- }
- var obj *raw.Object
- var err error
- setClientHeader(call.Header())
- err = runWithRetry(ctx, func() error { obj, err = call.Do(); return err })
- if e, ok := err.(*googleapi.Error); ok && e.Code == http.StatusNotFound {
- return nil, ErrObjectNotExist
- }
- if err != nil {
- return nil, err
- }
- return newObject(obj), nil
-}
-
-// Update updates an object with the provided attributes.
-// All zero-value attributes are ignored.
-// ErrObjectNotExist will be returned if the object is not found.
-func (o *ObjectHandle) Update(ctx context.Context, uattrs ObjectAttrsToUpdate) (*ObjectAttrs, error) {
- if err := o.validate(); err != nil {
- return nil, err
- }
- var attrs ObjectAttrs
- // Lists of fields to send, and set to null, in the JSON.
- var forceSendFields, nullFields []string
- if uattrs.ContentType != nil {
- attrs.ContentType = optional.ToString(uattrs.ContentType)
- forceSendFields = append(forceSendFields, "ContentType")
- }
- if uattrs.ContentLanguage != nil {
- attrs.ContentLanguage = optional.ToString(uattrs.ContentLanguage)
- // For ContentLanguage It's an error to send the empty string.
- // Instead we send a null.
- if attrs.ContentLanguage == "" {
- nullFields = append(nullFields, "ContentLanguage")
- } else {
- forceSendFields = append(forceSendFields, "ContentLanguage")
- }
- }
- if uattrs.ContentEncoding != nil {
- attrs.ContentEncoding = optional.ToString(uattrs.ContentEncoding)
- forceSendFields = append(forceSendFields, "ContentEncoding")
- }
- if uattrs.ContentDisposition != nil {
- attrs.ContentDisposition = optional.ToString(uattrs.ContentDisposition)
- forceSendFields = append(forceSendFields, "ContentDisposition")
- }
- if uattrs.CacheControl != nil {
- attrs.CacheControl = optional.ToString(uattrs.CacheControl)
- forceSendFields = append(forceSendFields, "CacheControl")
- }
- if uattrs.Metadata != nil {
- attrs.Metadata = uattrs.Metadata
- if len(attrs.Metadata) == 0 {
- // Sending the empty map is a no-op. We send null instead.
- nullFields = append(nullFields, "Metadata")
- } else {
- forceSendFields = append(forceSendFields, "Metadata")
- }
- }
- if uattrs.ACL != nil {
- attrs.ACL = uattrs.ACL
- // It's an error to attempt to delete the ACL, so
- // we don't append to nullFields here.
- forceSendFields = append(forceSendFields, "Acl")
- }
- rawObj := attrs.toRawObject(o.bucket)
- rawObj.ForceSendFields = forceSendFields
- rawObj.NullFields = nullFields
- call := o.c.raw.Objects.Patch(o.bucket, o.object, rawObj).Projection("full").Context(ctx)
- if err := applyConds("Update", o.gen, o.conds, call); err != nil {
- return nil, err
- }
- if o.userProject != "" {
- call.UserProject(o.userProject)
- }
- if err := setEncryptionHeaders(call.Header(), o.encryptionKey, false); err != nil {
- return nil, err
- }
- var obj *raw.Object
- var err error
- setClientHeader(call.Header())
- err = runWithRetry(ctx, func() error { obj, err = call.Do(); return err })
- if e, ok := err.(*googleapi.Error); ok && e.Code == http.StatusNotFound {
- return nil, ErrObjectNotExist
- }
- if err != nil {
- return nil, err
- }
- return newObject(obj), nil
-}
-
-// ObjectAttrsToUpdate is used to update the attributes of an object.
-// Only fields set to non-nil values will be updated.
-// Set a field to its zero value to delete it.
-//
-// For example, to change ContentType and delete ContentEncoding and
-// Metadata, use
-// ObjectAttrsToUpdate{
-// ContentType: "text/html",
-// ContentEncoding: "",
-// Metadata: map[string]string{},
-// }
-type ObjectAttrsToUpdate struct {
- ContentType optional.String
- ContentLanguage optional.String
- ContentEncoding optional.String
- ContentDisposition optional.String
- CacheControl optional.String
- Metadata map[string]string // set to map[string]string{} to delete
- ACL []ACLRule
-}
-
-// Delete deletes the single specified object.
-func (o *ObjectHandle) Delete(ctx context.Context) error {
- if err := o.validate(); err != nil {
- return err
- }
- call := o.c.raw.Objects.Delete(o.bucket, o.object).Context(ctx)
- if err := applyConds("Delete", o.gen, o.conds, call); err != nil {
- return err
- }
- if o.userProject != "" {
- call.UserProject(o.userProject)
- }
- // Encryption doesn't apply to Delete.
- setClientHeader(call.Header())
- err := runWithRetry(ctx, func() error { return call.Do() })
- switch e := err.(type) {
- case nil:
- return nil
- case *googleapi.Error:
- if e.Code == http.StatusNotFound {
- return ErrObjectNotExist
- }
- }
- return err
-}
-
-// NewReader creates a new Reader to read the contents of the
-// object.
-// ErrObjectNotExist will be returned if the object is not found.
-//
-// The caller must call Close on the returned Reader when done reading.
-func (o *ObjectHandle) NewReader(ctx context.Context) (*Reader, error) {
- return o.NewRangeReader(ctx, 0, -1)
-}
-
-// NewRangeReader reads part of an object, reading at most length bytes
-// starting at the given offset. If length is negative, the object is read
-// until the end.
-func (o *ObjectHandle) NewRangeReader(ctx context.Context, offset, length int64) (*Reader, error) {
- if err := o.validate(); err != nil {
- return nil, err
- }
- if offset < 0 {
- return nil, fmt.Errorf("storage: invalid offset %d < 0", offset)
- }
- if o.conds != nil {
- if err := o.conds.validate("NewRangeReader"); err != nil {
- return nil, err
- }
- }
- u := &url.URL{
- Scheme: "https",
- Host: "storage.googleapis.com",
- Path: fmt.Sprintf("/%s/%s", o.bucket, o.object),
- RawQuery: conditionsQuery(o.gen, o.conds),
- }
- verb := "GET"
- if length == 0 {
- verb = "HEAD"
- }
- req, err := http.NewRequest(verb, u.String(), nil)
- if err != nil {
- return nil, err
- }
- req = withContext(req, ctx)
- if length < 0 && offset > 0 {
- req.Header.Set("Range", fmt.Sprintf("bytes=%d-", offset))
- } else if length > 0 {
- req.Header.Set("Range", fmt.Sprintf("bytes=%d-%d", offset, offset+length-1))
- }
- if o.userProject != "" {
- req.Header.Set("X-Goog-User-Project", o.userProject)
- }
- if err := setEncryptionHeaders(req.Header, o.encryptionKey, false); err != nil {
- return nil, err
- }
- var res *http.Response
- err = runWithRetry(ctx, func() error {
- res, err = o.c.hc.Do(req)
- if err != nil {
- return err
- }
- if res.StatusCode == http.StatusNotFound {
- res.Body.Close()
- return ErrObjectNotExist
- }
- if res.StatusCode < 200 || res.StatusCode > 299 {
- body, _ := ioutil.ReadAll(res.Body)
- res.Body.Close()
- return &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- Body: string(body),
- }
- }
- if offset > 0 && length != 0 && res.StatusCode != http.StatusPartialContent {
- res.Body.Close()
- return errors.New("storage: partial request not satisfied")
- }
- return nil
- })
- if err != nil {
- return nil, err
- }
-
- var size int64 // total size of object, even if a range was requested.
- if res.StatusCode == http.StatusPartialContent {
- cr := strings.TrimSpace(res.Header.Get("Content-Range"))
- if !strings.HasPrefix(cr, "bytes ") || !strings.Contains(cr, "/") {
- return nil, fmt.Errorf("storage: invalid Content-Range %q", cr)
- }
- size, err = strconv.ParseInt(cr[strings.LastIndex(cr, "/")+1:], 10, 64)
- if err != nil {
- return nil, fmt.Errorf("storage: invalid Content-Range %q", cr)
- }
- } else {
- size = res.ContentLength
- }
-
- remain := res.ContentLength
- body := res.Body
- if length == 0 {
- remain = 0
- body.Close()
- body = emptyBody
- }
- var (
- checkCRC bool
- crc uint32
- )
- // Even if there is a CRC header, we can't compute the hash on partial data.
- if remain == size {
- crc, checkCRC = parseCRC32c(res)
- }
- return &Reader{
- body: body,
- size: size,
- remain: remain,
- contentType: res.Header.Get("Content-Type"),
- wantCRC: crc,
- checkCRC: checkCRC,
- }, nil
-}
-
-func parseCRC32c(res *http.Response) (uint32, bool) {
- const prefix = "crc32c="
- for _, spec := range res.Header["X-Goog-Hash"] {
- if strings.HasPrefix(spec, prefix) {
- c, err := decodeUint32(spec[len(prefix):])
- if err == nil {
- return c, true
- }
- }
- }
- return 0, false
-}
-
-var emptyBody = ioutil.NopCloser(strings.NewReader(""))
-
-// NewWriter returns a storage Writer that writes to the GCS object
-// associated with this ObjectHandle.
-//
-// A new object will be created unless an object with this name already exists.
-// Otherwise any previous object with the same name will be replaced.
-// The object will not be available (and any previous object will remain)
-// until Close has been called.
-//
-// Attributes can be set on the object by modifying the returned Writer's
-// ObjectAttrs field before the first call to Write. If no ContentType
-// attribute is specified, the content type will be automatically sniffed
-// using net/http.DetectContentType.
-//
-// It is the caller's responsibility to call Close when writing is done.
-func (o *ObjectHandle) NewWriter(ctx context.Context) *Writer {
- return &Writer{
- ctx: ctx,
- o: o,
- donec: make(chan struct{}),
- ObjectAttrs: ObjectAttrs{Name: o.object},
- ChunkSize: googleapi.DefaultUploadChunkSize,
- }
-}
-
-func (o *ObjectHandle) validate() error {
- if o.bucket == "" {
- return errors.New("storage: bucket name is empty")
- }
- if o.object == "" {
- return errors.New("storage: object name is empty")
- }
- if !utf8.ValidString(o.object) {
- return fmt.Errorf("storage: object name %q is not valid UTF-8", o.object)
- }
- return nil
-}
-
-// parseKey converts the binary contents of a private key file
-// to an *rsa.PrivateKey. 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) (*rsa.PrivateKey, error) {
- if block, _ := pem.Decode(key); block != nil {
- key = block.Bytes
- }
- parsedKey, err := x509.ParsePKCS8PrivateKey(key)
- if err != nil {
- parsedKey, err = x509.ParsePKCS1PrivateKey(key)
- if err != nil {
- return nil, err
- }
- }
- parsed, ok := parsedKey.(*rsa.PrivateKey)
- if !ok {
- return nil, errors.New("oauth2: private key is invalid")
- }
- return parsed, nil
-}
-
-func toRawObjectACL(oldACL []ACLRule) []*raw.ObjectAccessControl {
- var acl []*raw.ObjectAccessControl
- if len(oldACL) > 0 {
- acl = make([]*raw.ObjectAccessControl, len(oldACL))
- for i, rule := range oldACL {
- acl[i] = &raw.ObjectAccessControl{
- Entity: string(rule.Entity),
- Role: string(rule.Role),
- }
- }
- }
- return acl
-}
-
-// toRawObject copies the editable attributes from o to the raw library's Object type.
-func (o *ObjectAttrs) toRawObject(bucket string) *raw.Object {
- acl := toRawObjectACL(o.ACL)
- return &raw.Object{
- Bucket: bucket,
- Name: o.Name,
- ContentType: o.ContentType,
- ContentEncoding: o.ContentEncoding,
- ContentLanguage: o.ContentLanguage,
- CacheControl: o.CacheControl,
- ContentDisposition: o.ContentDisposition,
- StorageClass: o.StorageClass,
- Acl: acl,
- Metadata: o.Metadata,
- }
-}
-
-// ObjectAttrs represents the metadata for a Google Cloud Storage (GCS) object.
-type ObjectAttrs struct {
- // Bucket is the name of the bucket containing this GCS object.
- // This field is read-only.
- Bucket string
-
- // Name is the name of the object within the bucket.
- // This field is read-only.
- Name string
-
- // ContentType is the MIME type of the object's content.
- ContentType string
-
- // ContentLanguage is the content language of the object's content.
- ContentLanguage string
-
- // CacheControl is the Cache-Control header to be sent in the response
- // headers when serving the object data.
- CacheControl string
-
- // ACL is the list of access control rules for the object.
- ACL []ACLRule
-
- // Owner is the owner of the object. This field is read-only.
- //
- // If non-zero, it is in the form of "user-".
- Owner string
-
- // Size is the length of the object's content. This field is read-only.
- Size int64
-
- // ContentEncoding is the encoding of the object's content.
- ContentEncoding string
-
- // ContentDisposition is the optional Content-Disposition header of the object
- // sent in the response headers.
- ContentDisposition string
-
- // MD5 is the MD5 hash of the object's content. This field is read-only.
- MD5 []byte
-
- // CRC32C is the CRC32 checksum of the object's content using
- // the Castagnoli93 polynomial. This field is read-only.
- CRC32C uint32
-
- // MediaLink is an URL to the object's content. This field is read-only.
- MediaLink string
-
- // Metadata represents user-provided metadata, in key/value pairs.
- // It can be nil if no metadata is provided.
- Metadata map[string]string
-
- // Generation is the generation number of the object's content.
- // This field is read-only.
- Generation int64
-
- // Metageneration is the version of the metadata for this
- // object at this generation. This field is used for preconditions
- // and for detecting changes in metadata. A metageneration number
- // is only meaningful in the context of a particular generation
- // of a particular object. This field is read-only.
- Metageneration int64
-
- // StorageClass is the storage class of the object.
- // This value defines how objects in the bucket are stored and
- // determines the SLA and the cost of storage. Typical values are
- // "MULTI_REGIONAL", "REGIONAL", "NEARLINE", "COLDLINE", "STANDARD"
- // and "DURABLE_REDUCED_AVAILABILITY".
- // It defaults to "STANDARD", which is equivalent to "MULTI_REGIONAL"
- // or "REGIONAL" depending on the bucket's location settings.
- StorageClass string
-
- // Created is the time the object was created. This field is read-only.
- Created time.Time
-
- // Deleted is the time the object was deleted.
- // If not deleted, it is the zero value. This field is read-only.
- Deleted time.Time
-
- // Updated is the creation or modification time of the object.
- // For buckets with versioning enabled, changing an object's
- // metadata does not change this property. This field is read-only.
- Updated time.Time
-
- // CustomerKeySHA256 is the base64-encoded SHA-256 hash of the
- // customer-supplied encryption key for the object. It is empty if there is
- // no customer-supplied encryption key.
- // See // https://cloud.google.com/storage/docs/encryption for more about
- // encryption in Google Cloud Storage.
- CustomerKeySHA256 string
-
- // Prefix is set only for ObjectAttrs which represent synthetic "directory
- // entries" when iterating over buckets using Query.Delimiter. See
- // ObjectIterator.Next. When set, no other fields in ObjectAttrs will be
- // populated.
- Prefix string
-}
-
-// convertTime converts a time in RFC3339 format to time.Time.
-// If any error occurs in parsing, the zero-value time.Time is silently returned.
-func convertTime(t string) time.Time {
- var r time.Time
- if t != "" {
- r, _ = time.Parse(time.RFC3339, t)
- }
- return r
-}
-
-func newObject(o *raw.Object) *ObjectAttrs {
- if o == nil {
- return nil
- }
- acl := make([]ACLRule, len(o.Acl))
- for i, rule := range o.Acl {
- acl[i] = ACLRule{
- Entity: ACLEntity(rule.Entity),
- Role: ACLRole(rule.Role),
- }
- }
- owner := ""
- if o.Owner != nil {
- owner = o.Owner.Entity
- }
- md5, _ := base64.StdEncoding.DecodeString(o.Md5Hash)
- crc32c, _ := decodeUint32(o.Crc32c)
- var sha256 string
- if o.CustomerEncryption != nil {
- sha256 = o.CustomerEncryption.KeySha256
- }
- return &ObjectAttrs{
- Bucket: o.Bucket,
- Name: o.Name,
- ContentType: o.ContentType,
- ContentLanguage: o.ContentLanguage,
- CacheControl: o.CacheControl,
- ACL: acl,
- Owner: owner,
- ContentEncoding: o.ContentEncoding,
- Size: int64(o.Size),
- MD5: md5,
- CRC32C: crc32c,
- MediaLink: o.MediaLink,
- Metadata: o.Metadata,
- Generation: o.Generation,
- Metageneration: o.Metageneration,
- StorageClass: o.StorageClass,
- CustomerKeySHA256: sha256,
- Created: convertTime(o.TimeCreated),
- Deleted: convertTime(o.TimeDeleted),
- Updated: convertTime(o.Updated),
- }
-}
-
-// Decode a uint32 encoded in Base64 in big-endian byte order.
-func decodeUint32(b64 string) (uint32, error) {
- d, err := base64.StdEncoding.DecodeString(b64)
- if err != nil {
- return 0, err
- }
- if len(d) != 4 {
- return 0, fmt.Errorf("storage: %q does not encode a 32-bit value", d)
- }
- return uint32(d[0])<<24 + uint32(d[1])<<16 + uint32(d[2])<<8 + uint32(d[3]), nil
-}
-
-// Encode a uint32 as Base64 in big-endian byte order.
-func encodeUint32(u uint32) string {
- b := []byte{byte(u >> 24), byte(u >> 16), byte(u >> 8), byte(u)}
- return base64.StdEncoding.EncodeToString(b)
-}
-
-// Query represents a query to filter objects from a bucket.
-type Query struct {
- // Delimiter returns results in a directory-like fashion.
- // Results will contain only objects whose names, aside from the
- // prefix, do not contain delimiter. Objects whose names,
- // aside from the prefix, contain delimiter will have their name,
- // truncated after the delimiter, returned in prefixes.
- // Duplicate prefixes are omitted.
- // Optional.
- Delimiter string
-
- // Prefix is the prefix filter to query objects
- // whose names begin with this prefix.
- // Optional.
- Prefix string
-
- // Versions indicates whether multiple versions of the same
- // object will be included in the results.
- Versions bool
-}
-
-// contentTyper implements ContentTyper to enable an
-// io.ReadCloser to specify its MIME type.
-type contentTyper struct {
- io.Reader
- t string
-}
-
-func (c *contentTyper) ContentType() string {
- return c.t
-}
-
-// Conditions constrain methods to act on specific generations of
-// objects.
-//
-// The zero value is an empty set of constraints. Not all conditions or
-// combinations of conditions are applicable to all methods.
-// See https://cloud.google.com/storage/docs/generations-preconditions
-// for details on how these operate.
-type Conditions struct {
- // Generation constraints.
- // At most one of the following can be set to a non-zero value.
-
- // GenerationMatch specifies that the object must have the given generation
- // for the operation to occur.
- // If GenerationMatch is zero, it has no effect.
- // Use DoesNotExist to specify that the object does not exist in the bucket.
- GenerationMatch int64
-
- // GenerationNotMatch specifies that the object must not have the given
- // generation for the operation to occur.
- // If GenerationNotMatch is zero, it has no effect.
- GenerationNotMatch int64
-
- // DoesNotExist specifies that the object must not exist in the bucket for
- // the operation to occur.
- // If DoesNotExist is false, it has no effect.
- DoesNotExist bool
-
- // Metadata generation constraints.
- // At most one of the following can be set to a non-zero value.
-
- // MetagenerationMatch specifies that the object must have the given
- // metageneration for the operation to occur.
- // If MetagenerationMatch is zero, it has no effect.
- MetagenerationMatch int64
-
- // MetagenerationNotMatch specifies that the object must not have the given
- // metageneration for the operation to occur.
- // If MetagenerationNotMatch is zero, it has no effect.
- MetagenerationNotMatch int64
-}
-
-func (c *Conditions) validate(method string) error {
- if *c == (Conditions{}) {
- return fmt.Errorf("storage: %s: empty conditions", method)
- }
- if !c.isGenerationValid() {
- return fmt.Errorf("storage: %s: multiple conditions specified for generation", method)
- }
- if !c.isMetagenerationValid() {
- return fmt.Errorf("storage: %s: multiple conditions specified for metageneration", method)
- }
- return nil
-}
-
-func (c *Conditions) isGenerationValid() bool {
- n := 0
- if c.GenerationMatch != 0 {
- n++
- }
- if c.GenerationNotMatch != 0 {
- n++
- }
- if c.DoesNotExist {
- n++
- }
- return n <= 1
-}
-
-func (c *Conditions) isMetagenerationValid() bool {
- return c.MetagenerationMatch == 0 || c.MetagenerationNotMatch == 0
-}
-
-// applyConds modifies the provided call using the conditions in conds.
-// call is something that quacks like a *raw.WhateverCall.
-func applyConds(method string, gen int64, conds *Conditions, call interface{}) error {
- cval := reflect.ValueOf(call)
- if gen >= 0 {
- if !setConditionField(cval, "Generation", gen) {
- return fmt.Errorf("storage: %s: generation not supported", method)
- }
- }
- if conds == nil {
- return nil
- }
- if err := conds.validate(method); err != nil {
- return err
- }
- switch {
- case conds.GenerationMatch != 0:
- if !setConditionField(cval, "IfGenerationMatch", conds.GenerationMatch) {
- return fmt.Errorf("storage: %s: ifGenerationMatch not supported", method)
- }
- case conds.GenerationNotMatch != 0:
- if !setConditionField(cval, "IfGenerationNotMatch", conds.GenerationNotMatch) {
- return fmt.Errorf("storage: %s: ifGenerationNotMatch not supported", method)
- }
- case conds.DoesNotExist:
- if !setConditionField(cval, "IfGenerationMatch", int64(0)) {
- return fmt.Errorf("storage: %s: DoesNotExist not supported", method)
- }
- }
- switch {
- case conds.MetagenerationMatch != 0:
- if !setConditionField(cval, "IfMetagenerationMatch", conds.MetagenerationMatch) {
- return fmt.Errorf("storage: %s: ifMetagenerationMatch not supported", method)
- }
- case conds.MetagenerationNotMatch != 0:
- if !setConditionField(cval, "IfMetagenerationNotMatch", conds.MetagenerationNotMatch) {
- return fmt.Errorf("storage: %s: ifMetagenerationNotMatch not supported", method)
- }
- }
- return nil
-}
-
-func applySourceConds(gen int64, conds *Conditions, call *raw.ObjectsRewriteCall) error {
- if gen >= 0 {
- call.SourceGeneration(gen)
- }
- if conds == nil {
- return nil
- }
- if err := conds.validate("CopyTo source"); err != nil {
- return err
- }
- switch {
- case conds.GenerationMatch != 0:
- call.IfSourceGenerationMatch(conds.GenerationMatch)
- case conds.GenerationNotMatch != 0:
- call.IfSourceGenerationNotMatch(conds.GenerationNotMatch)
- case conds.DoesNotExist:
- call.IfSourceGenerationMatch(0)
- }
- switch {
- case conds.MetagenerationMatch != 0:
- call.IfSourceMetagenerationMatch(conds.MetagenerationMatch)
- case conds.MetagenerationNotMatch != 0:
- call.IfSourceMetagenerationNotMatch(conds.MetagenerationNotMatch)
- }
- return nil
-}
-
-// setConditionField sets a field on a *raw.WhateverCall.
-// We can't use anonymous interfaces because the return type is
-// different, since the field setters are builders.
-func setConditionField(call reflect.Value, name string, value interface{}) bool {
- m := call.MethodByName(name)
- if !m.IsValid() {
- return false
- }
- m.Call([]reflect.Value{reflect.ValueOf(value)})
- return true
-}
-
-// conditionsQuery returns the generation and conditions as a URL query
-// string suitable for URL.RawQuery. It assumes that the conditions
-// have been validated.
-func conditionsQuery(gen int64, conds *Conditions) string {
- // URL escapes are elided because integer strings are URL-safe.
- var buf []byte
-
- appendParam := func(s string, n int64) {
- if len(buf) > 0 {
- buf = append(buf, '&')
- }
- buf = append(buf, s...)
- buf = strconv.AppendInt(buf, n, 10)
- }
-
- if gen >= 0 {
- appendParam("generation=", gen)
- }
- if conds == nil {
- return string(buf)
- }
- switch {
- case conds.GenerationMatch != 0:
- appendParam("ifGenerationMatch=", conds.GenerationMatch)
- case conds.GenerationNotMatch != 0:
- appendParam("ifGenerationNotMatch=", conds.GenerationNotMatch)
- case conds.DoesNotExist:
- appendParam("ifGenerationMatch=", 0)
- }
- switch {
- case conds.MetagenerationMatch != 0:
- appendParam("ifMetagenerationMatch=", conds.MetagenerationMatch)
- case conds.MetagenerationNotMatch != 0:
- appendParam("ifMetagenerationNotMatch=", conds.MetagenerationNotMatch)
- }
- return string(buf)
-}
-
-// composeSourceObj wraps a *raw.ComposeRequestSourceObjects, but adds the methods
-// that modifyCall searches for by name.
-type composeSourceObj struct {
- src *raw.ComposeRequestSourceObjects
-}
-
-func (c composeSourceObj) Generation(gen int64) {
- c.src.Generation = gen
-}
-
-func (c composeSourceObj) IfGenerationMatch(gen int64) {
- // It's safe to overwrite ObjectPreconditions, since its only field is
- // IfGenerationMatch.
- c.src.ObjectPreconditions = &raw.ComposeRequestSourceObjectsObjectPreconditions{
- IfGenerationMatch: gen,
- }
-}
-
-func setEncryptionHeaders(headers http.Header, key []byte, copySource bool) error {
- if key == nil {
- return nil
- }
- // TODO(jbd): Ask the API team to return a more user-friendly error
- // and avoid doing this check at the client level.
- if len(key) != 32 {
- return errors.New("storage: not a 32-byte AES-256 key")
- }
- var cs string
- if copySource {
- cs = "copy-source-"
- }
- headers.Set("x-goog-"+cs+"encryption-algorithm", "AES256")
- headers.Set("x-goog-"+cs+"encryption-key", base64.StdEncoding.EncodeToString(key))
- keyHash := sha256.Sum256(key)
- headers.Set("x-goog-"+cs+"encryption-key-sha256", base64.StdEncoding.EncodeToString(keyHash[:]))
- return nil
-}
-
-// TODO(jbd): Add storage.objects.watch.
diff --git a/vendor/cloud.google.com/go/storage/writer.go b/vendor/cloud.google.com/go/storage/writer.go
deleted file mode 100644
index 19f4f0e1059..00000000000
--- a/vendor/cloud.google.com/go/storage/writer.go
+++ /dev/null
@@ -1,192 +0,0 @@
-// Copyright 2014 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT 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 storage
-
-import (
- "encoding/base64"
- "errors"
- "fmt"
- "io"
- "unicode/utf8"
-
- "golang.org/x/net/context"
- "google.golang.org/api/googleapi"
- raw "google.golang.org/api/storage/v1"
-)
-
-// A Writer writes a Cloud Storage object.
-type Writer struct {
- // ObjectAttrs are optional attributes to set on the object. Any attributes
- // must be initialized before the first Write call. Nil or zero-valued
- // attributes are ignored.
- ObjectAttrs
-
- // SendCRC specifies whether to transmit a CRC32C field. It should be set
- // to true in addition to setting the Writer's CRC32C field, because zero
- // is a valid CRC and normally a zero would not be transmitted.
- SendCRC32C bool
-
- // ChunkSize controls the maximum number of bytes of the object that the
- // Writer will attempt to send to the server in a single request. Objects
- // smaller than the size will be sent in a single request, while larger
- // objects will be split over multiple requests. The size will be rounded up
- // to the nearest multiple of 256K. If zero, chunking will be disabled and
- // the object will be uploaded in a single request.
- //
- // ChunkSize will default to a reasonable value. Any custom configuration
- // must be done before the first Write call.
- ChunkSize int
-
- // ProgressFunc can be used to monitor the progress of a large write.
- // operation. If ProgressFunc is not nil and writing requires multiple
- // calls to the underlying service (see
- // https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload),
- // then ProgressFunc will be invoked after each call with the number of bytes of
- // content copied so far.
- //
- // ProgressFunc should return quickly without blocking.
- ProgressFunc func(int64)
-
- ctx context.Context
- o *ObjectHandle
-
- opened bool
- pw *io.PipeWriter
-
- donec chan struct{} // closed after err and obj are set.
- err error
- obj *ObjectAttrs
-}
-
-func (w *Writer) open() error {
- attrs := w.ObjectAttrs
- // Check the developer didn't change the object Name (this is unfortunate, but
- // we don't want to store an object under the wrong name).
- if attrs.Name != w.o.object {
- return fmt.Errorf("storage: Writer.Name %q does not match object name %q", attrs.Name, w.o.object)
- }
- if !utf8.ValidString(attrs.Name) {
- return fmt.Errorf("storage: object name %q is not valid UTF-8", attrs.Name)
- }
- pr, pw := io.Pipe()
- w.pw = pw
- w.opened = true
-
- if w.ChunkSize < 0 {
- return errors.New("storage: Writer.ChunkSize must non-negative")
- }
- mediaOpts := []googleapi.MediaOption{
- googleapi.ChunkSize(w.ChunkSize),
- }
- if c := attrs.ContentType; c != "" {
- mediaOpts = append(mediaOpts, googleapi.ContentType(c))
- }
-
- go func() {
- defer close(w.donec)
-
- rawObj := attrs.toRawObject(w.o.bucket)
- if w.SendCRC32C {
- rawObj.Crc32c = encodeUint32(attrs.CRC32C)
- }
- if w.MD5 != nil {
- rawObj.Md5Hash = base64.StdEncoding.EncodeToString(w.MD5)
- }
- call := w.o.c.raw.Objects.Insert(w.o.bucket, rawObj).
- Media(pr, mediaOpts...).
- Projection("full").
- Context(w.ctx)
- if w.ProgressFunc != nil {
- call.ProgressUpdater(func(n, _ int64) { w.ProgressFunc(n) })
- }
- if err := setEncryptionHeaders(call.Header(), w.o.encryptionKey, false); err != nil {
- w.err = err
- pr.CloseWithError(w.err)
- return
- }
- var resp *raw.Object
- err := applyConds("NewWriter", w.o.gen, w.o.conds, call)
- if err == nil {
- if w.o.userProject != "" {
- call.UserProject(w.o.userProject)
- }
- setClientHeader(call.Header())
- // We will only retry here if the initial POST, which obtains a URI for
- // the resumable upload, fails with a retryable error. The upload itself
- // has its own retry logic.
- err = runWithRetry(w.ctx, func() error {
- var err2 error
- resp, err2 = call.Do()
- return err2
- })
- }
- if err != nil {
- w.err = err
- pr.CloseWithError(w.err)
- return
- }
- w.obj = newObject(resp)
- }()
- return nil
-}
-
-// Write appends to w. It implements the io.Writer interface.
-//
-// Since writes happen asynchronously, Write may return a nil
-// error even though the write failed (or will fail). Always
-// use the error returned from Writer.Close to determine if
-// the upload was successful.
-func (w *Writer) Write(p []byte) (n int, err error) {
- if w.err != nil {
- return 0, w.err
- }
- if !w.opened {
- if err := w.open(); err != nil {
- return 0, err
- }
- }
- return w.pw.Write(p)
-}
-
-// Close completes the write operation and flushes any buffered data.
-// If Close doesn't return an error, metadata about the written object
-// can be retrieved by calling Attrs.
-func (w *Writer) Close() error {
- if !w.opened {
- if err := w.open(); err != nil {
- return err
- }
- }
- if err := w.pw.Close(); err != nil {
- return err
- }
- <-w.donec
- return w.err
-}
-
-// CloseWithError aborts the write operation with the provided error.
-// CloseWithError always returns nil.
-func (w *Writer) CloseWithError(err error) error {
- if !w.opened {
- return nil
- }
- return w.pw.CloseWithError(err)
-}
-
-// Attrs returns metadata about a successfully-written object.
-// It's only valid to call it after Close returns nil.
-func (w *Writer) Attrs() *ObjectAttrs {
- return w.obj
-}
diff --git a/vendor/github.com/BurntSushi/toml/.travis.yml b/vendor/github.com/BurntSushi/toml/.travis.yml
index 43caf6d0211..8b8afc4f0e0 100644
--- a/vendor/github.com/BurntSushi/toml/.travis.yml
+++ b/vendor/github.com/BurntSushi/toml/.travis.yml
@@ -2,6 +2,10 @@ language: go
go:
- 1.1
- 1.2
+ - 1.3
+ - 1.4
+ - 1.5
+ - 1.6
- tip
install:
- go install ./...
@@ -9,4 +13,3 @@ install:
script:
- export PATH="$PATH:$HOME/gopath/bin"
- make test
-
diff --git a/vendor/github.com/BurntSushi/toml/COMPATIBLE b/vendor/github.com/BurntSushi/toml/COMPATIBLE
index 21e0938caef..6efcfd0ce55 100644
--- a/vendor/github.com/BurntSushi/toml/COMPATIBLE
+++ b/vendor/github.com/BurntSushi/toml/COMPATIBLE
@@ -1,3 +1,3 @@
Compatible with TOML version
-[v0.2.0](https://github.com/mojombo/toml/blob/master/versions/toml-v0.2.0.md)
+[v0.4.0](https://github.com/toml-lang/toml/blob/v0.4.0/versions/en/toml-v0.4.0.md)
diff --git a/vendor/github.com/BurntSushi/toml/README.md b/vendor/github.com/BurntSushi/toml/README.md
index 5a5df637094..7c1b37ecc7a 100644
--- a/vendor/github.com/BurntSushi/toml/README.md
+++ b/vendor/github.com/BurntSushi/toml/README.md
@@ -1,17 +1,17 @@
## TOML parser and encoder for Go with reflection
TOML stands for Tom's Obvious, Minimal Language. This Go package provides a
-reflection interface similar to Go's standard library `json` and `xml`
+reflection interface similar to Go's standard library `json` and `xml`
packages. This package also supports the `encoding.TextUnmarshaler` and
-`encoding.TextMarshaler` interfaces so that you can define custom data
+`encoding.TextMarshaler` interfaces so that you can define custom data
representations. (There is an example of this below.)
-Spec: https://github.com/mojombo/toml
+Spec: https://github.com/toml-lang/toml
Compatible with TOML version
-[v0.2.0](https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.2.0.md)
+[v0.4.0](https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md)
-Documentation: http://godoc.org/github.com/BurntSushi/toml
+Documentation: https://godoc.org/github.com/BurntSushi/toml
Installation:
@@ -26,8 +26,7 @@ go get github.com/BurntSushi/toml/cmd/tomlv
tomlv some-toml-file.toml
```
-[](https://travis-ci.org/BurntSushi/toml)
-
+[](https://travis-ci.org/BurntSushi/toml) [](https://godoc.org/github.com/BurntSushi/toml)
### Testing
@@ -87,7 +86,7 @@ type TOML struct {
### Using the `encoding.TextUnmarshaler` interface
-Here's an example that automatically parses duration strings into
+Here's an example that automatically parses duration strings into
`time.Duration` values:
```toml
@@ -120,7 +119,7 @@ for _, s := range favorites.Song {
}
```
-And you'll also need a `duration` type that satisfies the
+And you'll also need a `duration` type that satisfies the
`encoding.TextUnmarshaler` interface:
```go
@@ -217,4 +216,3 @@ Note that a case insensitive match will be tried if an exact match can't be
found.
A working example of the above can be found in `_examples/example.{go,toml}`.
-
diff --git a/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/COPYING b/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/COPYING
deleted file mode 100644
index 5a8e332545f..00000000000
--- a/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/COPYING
+++ /dev/null
@@ -1,14 +0,0 @@
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- Version 2, December 2004
-
- Copyright (C) 2004 Sam Hocevar
-
- Everyone is permitted to copy and distribute verbatim or modified
- copies of this license document, and changing it is allowed as long
- as the name is changed.
-
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. You just DO WHAT THE FUCK YOU WANT TO.
-
diff --git a/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/README.md b/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/README.md
deleted file mode 100644
index 24421eb7034..00000000000
--- a/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# Implements the TOML test suite interface
-
-This is an implementation of the interface expected by
-[toml-test](https://github.com/BurntSushi/toml-test) for my
-[toml parser written in Go](https://github.com/BurntSushi/toml).
-In particular, it maps TOML data on `stdin` to a JSON format on `stdout`.
-
-
-Compatible with TOML version
-[v0.2.0](https://github.com/mojombo/toml/blob/master/versions/toml-v0.2.0.md)
-
-Compatible with `toml-test` version
-[v0.2.0](https://github.com/BurntSushi/toml-test/tree/v0.2.0)
-
diff --git a/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/main.go b/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/main.go
deleted file mode 100644
index 14e7557005d..00000000000
--- a/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/main.go
+++ /dev/null
@@ -1,90 +0,0 @@
-// Command toml-test-decoder satisfies the toml-test interface for testing
-// TOML decoders. Namely, it accepts TOML on stdin and outputs JSON on stdout.
-package main
-
-import (
- "encoding/json"
- "flag"
- "fmt"
- "log"
- "os"
- "path"
- "time"
-
- "github.com/BurntSushi/toml"
-)
-
-func init() {
- log.SetFlags(0)
-
- flag.Usage = usage
- flag.Parse()
-}
-
-func usage() {
- log.Printf("Usage: %s < toml-file\n", path.Base(os.Args[0]))
- flag.PrintDefaults()
-
- os.Exit(1)
-}
-
-func main() {
- if flag.NArg() != 0 {
- flag.Usage()
- }
-
- var tmp interface{}
- if _, err := toml.DecodeReader(os.Stdin, &tmp); err != nil {
- log.Fatalf("Error decoding TOML: %s", err)
- }
-
- typedTmp := translate(tmp)
- if err := json.NewEncoder(os.Stdout).Encode(typedTmp); err != nil {
- log.Fatalf("Error encoding JSON: %s", err)
- }
-}
-
-func translate(tomlData interface{}) interface{} {
- switch orig := tomlData.(type) {
- case map[string]interface{}:
- typed := make(map[string]interface{}, len(orig))
- for k, v := range orig {
- typed[k] = translate(v)
- }
- return typed
- case []map[string]interface{}:
- typed := make([]map[string]interface{}, len(orig))
- for i, v := range orig {
- typed[i] = translate(v).(map[string]interface{})
- }
- return typed
- case []interface{}:
- typed := make([]interface{}, len(orig))
- for i, v := range orig {
- typed[i] = translate(v)
- }
-
- // We don't really need to tag arrays, but let's be future proof.
- // (If TOML ever supports tuples, we'll need this.)
- return tag("array", typed)
- case time.Time:
- return tag("datetime", orig.Format("2006-01-02T15:04:05Z"))
- case bool:
- return tag("bool", fmt.Sprintf("%v", orig))
- case int64:
- return tag("integer", fmt.Sprintf("%d", orig))
- case float64:
- return tag("float", fmt.Sprintf("%v", orig))
- case string:
- return tag("string", orig)
- }
-
- panic(fmt.Sprintf("Unknown type: %T", tomlData))
-}
-
-func tag(typeName string, data interface{}) map[string]interface{} {
- return map[string]interface{}{
- "type": typeName,
- "value": data,
- }
-}
diff --git a/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/COPYING b/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/COPYING
deleted file mode 100644
index 5a8e332545f..00000000000
--- a/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/COPYING
+++ /dev/null
@@ -1,14 +0,0 @@
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- Version 2, December 2004
-
- Copyright (C) 2004 Sam Hocevar
-
- Everyone is permitted to copy and distribute verbatim or modified
- copies of this license document, and changing it is allowed as long
- as the name is changed.
-
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. You just DO WHAT THE FUCK YOU WANT TO.
-
diff --git a/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/README.md b/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/README.md
deleted file mode 100644
index 45a603f2980..00000000000
--- a/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# Implements the TOML test suite interface for TOML encoders
-
-This is an implementation of the interface expected by
-[toml-test](https://github.com/BurntSushi/toml-test) for the
-[TOML encoder](https://github.com/BurntSushi/toml).
-In particular, it maps JSON data on `stdin` to a TOML format on `stdout`.
-
-
-Compatible with TOML version
-[v0.2.0](https://github.com/mojombo/toml/blob/master/versions/toml-v0.2.0.md)
-
-Compatible with `toml-test` version
-[v0.2.0](https://github.com/BurntSushi/toml-test/tree/v0.2.0)
-
diff --git a/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/main.go b/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/main.go
deleted file mode 100644
index 092cc684496..00000000000
--- a/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/main.go
+++ /dev/null
@@ -1,131 +0,0 @@
-// Command toml-test-encoder satisfies the toml-test interface for testing
-// TOML encoders. Namely, it accepts JSON on stdin and outputs TOML on stdout.
-package main
-
-import (
- "encoding/json"
- "flag"
- "log"
- "os"
- "path"
- "strconv"
- "time"
-
- "github.com/BurntSushi/toml"
-)
-
-func init() {
- log.SetFlags(0)
-
- flag.Usage = usage
- flag.Parse()
-}
-
-func usage() {
- log.Printf("Usage: %s < json-file\n", path.Base(os.Args[0]))
- flag.PrintDefaults()
-
- os.Exit(1)
-}
-
-func main() {
- if flag.NArg() != 0 {
- flag.Usage()
- }
-
- var tmp interface{}
- if err := json.NewDecoder(os.Stdin).Decode(&tmp); err != nil {
- log.Fatalf("Error decoding JSON: %s", err)
- }
-
- tomlData := translate(tmp)
- if err := toml.NewEncoder(os.Stdout).Encode(tomlData); err != nil {
- log.Fatalf("Error encoding TOML: %s", err)
- }
-}
-
-func translate(typedJson interface{}) interface{} {
- switch v := typedJson.(type) {
- case map[string]interface{}:
- if len(v) == 2 && in("type", v) && in("value", v) {
- return untag(v)
- }
- m := make(map[string]interface{}, len(v))
- for k, v2 := range v {
- m[k] = translate(v2)
- }
- return m
- case []interface{}:
- tabArray := make([]map[string]interface{}, len(v))
- for i := range v {
- if m, ok := translate(v[i]).(map[string]interface{}); ok {
- tabArray[i] = m
- } else {
- log.Fatalf("JSON arrays may only contain objects. This " +
- "corresponds to only tables being allowed in " +
- "TOML table arrays.")
- }
- }
- return tabArray
- }
- log.Fatalf("Unrecognized JSON format '%T'.", typedJson)
- panic("unreachable")
-}
-
-func untag(typed map[string]interface{}) interface{} {
- t := typed["type"].(string)
- v := typed["value"]
- switch t {
- case "string":
- return v.(string)
- case "integer":
- v := v.(string)
- n, err := strconv.Atoi(v)
- if err != nil {
- log.Fatalf("Could not parse '%s' as integer: %s", v, err)
- }
- return n
- case "float":
- v := v.(string)
- f, err := strconv.ParseFloat(v, 64)
- if err != nil {
- log.Fatalf("Could not parse '%s' as float64: %s", v, err)
- }
- return f
- case "datetime":
- v := v.(string)
- t, err := time.Parse("2006-01-02T15:04:05Z", v)
- if err != nil {
- log.Fatalf("Could not parse '%s' as a datetime: %s", v, err)
- }
- return t
- case "bool":
- v := v.(string)
- switch v {
- case "true":
- return true
- case "false":
- return false
- }
- log.Fatalf("Could not parse '%s' as a boolean.", v)
- case "array":
- v := v.([]interface{})
- array := make([]interface{}, len(v))
- for i := range v {
- if m, ok := v[i].(map[string]interface{}); ok {
- array[i] = untag(m)
- } else {
- log.Fatalf("Arrays may only contain other arrays or "+
- "primitive values, but found a '%T'.", m)
- }
- }
- return array
- }
- log.Fatalf("Unrecognized tag type '%s'.", t)
- panic("unreachable")
-}
-
-func in(key string, m map[string]interface{}) bool {
- _, ok := m[key]
- return ok
-}
diff --git a/vendor/github.com/BurntSushi/toml/cmd/tomlv/COPYING b/vendor/github.com/BurntSushi/toml/cmd/tomlv/COPYING
deleted file mode 100644
index 5a8e332545f..00000000000
--- a/vendor/github.com/BurntSushi/toml/cmd/tomlv/COPYING
+++ /dev/null
@@ -1,14 +0,0 @@
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- Version 2, December 2004
-
- Copyright (C) 2004 Sam Hocevar
-
- Everyone is permitted to copy and distribute verbatim or modified
- copies of this license document, and changing it is allowed as long
- as the name is changed.
-
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. You just DO WHAT THE FUCK YOU WANT TO.
-
diff --git a/vendor/github.com/BurntSushi/toml/cmd/tomlv/README.md b/vendor/github.com/BurntSushi/toml/cmd/tomlv/README.md
deleted file mode 100644
index 5df0dc32bbf..00000000000
--- a/vendor/github.com/BurntSushi/toml/cmd/tomlv/README.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# TOML Validator
-
-If Go is installed, it's simple to try it out:
-
-```bash
-go get github.com/BurntSushi/toml/cmd/tomlv
-tomlv some-toml-file.toml
-```
-
-You can see the types of every key in a TOML file with:
-
-```bash
-tomlv -types some-toml-file.toml
-```
-
-At the moment, only one error message is reported at a time. Error messages
-include line numbers. No output means that the files given are valid TOML, or
-there is a bug in `tomlv`.
-
-Compatible with TOML version
-[v0.1.0](https://github.com/mojombo/toml/blob/master/versions/toml-v0.1.0.md)
-
diff --git a/vendor/github.com/BurntSushi/toml/cmd/tomlv/main.go b/vendor/github.com/BurntSushi/toml/cmd/tomlv/main.go
deleted file mode 100644
index c7d689a7e91..00000000000
--- a/vendor/github.com/BurntSushi/toml/cmd/tomlv/main.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Command tomlv validates TOML documents and prints each key's type.
-package main
-
-import (
- "flag"
- "fmt"
- "log"
- "os"
- "path"
- "strings"
- "text/tabwriter"
-
- "github.com/BurntSushi/toml"
-)
-
-var (
- flagTypes = false
-)
-
-func init() {
- log.SetFlags(0)
-
- flag.BoolVar(&flagTypes, "types", flagTypes,
- "When set, the types of every defined key will be shown.")
-
- flag.Usage = usage
- flag.Parse()
-}
-
-func usage() {
- log.Printf("Usage: %s toml-file [ toml-file ... ]\n",
- path.Base(os.Args[0]))
- flag.PrintDefaults()
-
- os.Exit(1)
-}
-
-func main() {
- if flag.NArg() < 1 {
- flag.Usage()
- }
- for _, f := range flag.Args() {
- var tmp interface{}
- md, err := toml.DecodeFile(f, &tmp)
- if err != nil {
- log.Fatalf("Error in '%s': %s", f, err)
- }
- if flagTypes {
- printTypes(md)
- }
- }
-}
-
-func printTypes(md toml.MetaData) {
- tabw := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0)
- for _, key := range md.Keys() {
- fmt.Fprintf(tabw, "%s%s\t%s\n",
- strings.Repeat(" ", len(key)-1), key, md.Type(key...))
- }
- tabw.Flush()
-}
diff --git a/vendor/github.com/BurntSushi/toml/decode.go b/vendor/github.com/BurntSushi/toml/decode.go
index 6c7d398b89a..b0fd51d5b6e 100644
--- a/vendor/github.com/BurntSushi/toml/decode.go
+++ b/vendor/github.com/BurntSushi/toml/decode.go
@@ -10,7 +10,9 @@ import (
"time"
)
-var e = fmt.Errorf
+func e(format string, args ...interface{}) error {
+ return fmt.Errorf("toml: "+format, args...)
+}
// Unmarshaler is the interface implemented by objects that can unmarshal a
// TOML description of themselves.
@@ -103,6 +105,13 @@ func (md *MetaData) PrimitiveDecode(primValue Primitive, v interface{}) error {
// This decoder will not handle cyclic types. If a cyclic type is passed,
// `Decode` will not terminate.
func Decode(data string, v interface{}) (MetaData, error) {
+ rv := reflect.ValueOf(v)
+ if rv.Kind() != reflect.Ptr {
+ return MetaData{}, e("Decode of non-pointer %s", reflect.TypeOf(v))
+ }
+ if rv.IsNil() {
+ return MetaData{}, e("Decode of nil %s", reflect.TypeOf(v))
+ }
p, err := parse(data)
if err != nil {
return MetaData{}, err
@@ -111,7 +120,7 @@ func Decode(data string, v interface{}) (MetaData, error) {
p.mapping, p.types, p.ordered,
make(map[string]bool, len(p.ordered)), nil,
}
- return md, md.unify(p.mapping, rvalue(v))
+ return md, md.unify(p.mapping, indirect(rv))
}
// DecodeFile is just like Decode, except it will automatically read the
@@ -211,7 +220,7 @@ func (md *MetaData) unify(data interface{}, rv reflect.Value) error {
case reflect.Interface:
// we only support empty interfaces.
if rv.NumMethod() > 0 {
- return e("Unsupported type '%s'.", rv.Kind())
+ return e("unsupported type %s", rv.Type())
}
return md.unifyAnything(data, rv)
case reflect.Float32:
@@ -219,13 +228,17 @@ func (md *MetaData) unify(data interface{}, rv reflect.Value) error {
case reflect.Float64:
return md.unifyFloat64(data, rv)
}
- return e("Unsupported type '%s'.", rv.Kind())
+ return e("unsupported type %s", rv.Kind())
}
func (md *MetaData) unifyStruct(mapping interface{}, rv reflect.Value) error {
tmap, ok := mapping.(map[string]interface{})
if !ok {
- return mismatch(rv, "map", mapping)
+ if mapping == nil {
+ return nil
+ }
+ return e("type mismatch for %s: expected table but found %T",
+ rv.Type().String(), mapping)
}
for key, datum := range tmap {
@@ -250,14 +263,13 @@ func (md *MetaData) unifyStruct(mapping interface{}, rv reflect.Value) error {
md.decoded[md.context.add(key).String()] = true
md.context = append(md.context, key)
if err := md.unify(datum, subv); err != nil {
- return e("Type mismatch for '%s.%s': %s",
- rv.Type().String(), f.name, err)
+ return err
}
md.context = md.context[0 : len(md.context)-1]
} else if f.name != "" {
// Bad user! No soup for you!
- return e("Field '%s.%s' is unexported, and therefore cannot "+
- "be loaded with reflection.", rv.Type().String(), f.name)
+ return e("cannot write unexported field %s.%s",
+ rv.Type().String(), f.name)
}
}
}
@@ -267,6 +279,9 @@ func (md *MetaData) unifyStruct(mapping interface{}, rv reflect.Value) error {
func (md *MetaData) unifyMap(mapping interface{}, rv reflect.Value) error {
tmap, ok := mapping.(map[string]interface{})
if !ok {
+ if tmap == nil {
+ return nil
+ }
return badtype("map", mapping)
}
if rv.IsNil() {
@@ -292,6 +307,9 @@ func (md *MetaData) unifyMap(mapping interface{}, rv reflect.Value) error {
func (md *MetaData) unifyArray(data interface{}, rv reflect.Value) error {
datav := reflect.ValueOf(data)
if datav.Kind() != reflect.Slice {
+ if !datav.IsValid() {
+ return nil
+ }
return badtype("slice", data)
}
sliceLen := datav.Len()
@@ -305,12 +323,16 @@ func (md *MetaData) unifyArray(data interface{}, rv reflect.Value) error {
func (md *MetaData) unifySlice(data interface{}, rv reflect.Value) error {
datav := reflect.ValueOf(data)
if datav.Kind() != reflect.Slice {
+ if !datav.IsValid() {
+ return nil
+ }
return badtype("slice", data)
}
- sliceLen := datav.Len()
- if rv.IsNil() {
- rv.Set(reflect.MakeSlice(rv.Type(), sliceLen, sliceLen))
+ n := datav.Len()
+ if rv.IsNil() || rv.Cap() < n {
+ rv.Set(reflect.MakeSlice(rv.Type(), n, n))
}
+ rv.SetLen(n)
return md.unifySliceArray(datav, rv)
}
@@ -365,15 +387,15 @@ func (md *MetaData) unifyInt(data interface{}, rv reflect.Value) error {
// No bounds checking necessary.
case reflect.Int8:
if num < math.MinInt8 || num > math.MaxInt8 {
- return e("Value '%d' is out of range for int8.", num)
+ return e("value %d is out of range for int8", num)
}
case reflect.Int16:
if num < math.MinInt16 || num > math.MaxInt16 {
- return e("Value '%d' is out of range for int16.", num)
+ return e("value %d is out of range for int16", num)
}
case reflect.Int32:
if num < math.MinInt32 || num > math.MaxInt32 {
- return e("Value '%d' is out of range for int32.", num)
+ return e("value %d is out of range for int32", num)
}
}
rv.SetInt(num)
@@ -384,15 +406,15 @@ func (md *MetaData) unifyInt(data interface{}, rv reflect.Value) error {
// No bounds checking necessary.
case reflect.Uint8:
if num < 0 || unum > math.MaxUint8 {
- return e("Value '%d' is out of range for uint8.", num)
+ return e("value %d is out of range for uint8", num)
}
case reflect.Uint16:
if num < 0 || unum > math.MaxUint16 {
- return e("Value '%d' is out of range for uint16.", num)
+ return e("value %d is out of range for uint16", num)
}
case reflect.Uint32:
if num < 0 || unum > math.MaxUint32 {
- return e("Value '%d' is out of range for uint32.", num)
+ return e("value %d is out of range for uint32", num)
}
}
rv.SetUint(unum)
@@ -458,7 +480,7 @@ func rvalue(v interface{}) reflect.Value {
// interest to us (like encoding.TextUnmarshaler).
func indirect(v reflect.Value) reflect.Value {
if v.Kind() != reflect.Ptr {
- if v.CanAddr() {
+ if v.CanSet() {
pv := v.Addr()
if _, ok := pv.Interface().(TextUnmarshaler); ok {
return pv
@@ -483,10 +505,5 @@ func isUnifiable(rv reflect.Value) bool {
}
func badtype(expected string, data interface{}) error {
- return e("Expected %s but found '%T'.", expected, data)
-}
-
-func mismatch(user reflect.Value, expected string, data interface{}) error {
- return e("Type mismatch for %s. Expected %s but found '%T'.",
- user.Type().String(), expected, data)
+ return e("cannot load TOML value of type %T into a Go %s", data, expected)
}
diff --git a/vendor/github.com/BurntSushi/toml/decode_meta.go b/vendor/github.com/BurntSushi/toml/decode_meta.go
index ef6f545fa1b..b9914a6798c 100644
--- a/vendor/github.com/BurntSushi/toml/decode_meta.go
+++ b/vendor/github.com/BurntSushi/toml/decode_meta.go
@@ -77,9 +77,8 @@ func (k Key) maybeQuoted(i int) string {
}
if quote {
return "\"" + strings.Replace(k[i], "\"", "\\\"", -1) + "\""
- } else {
- return k[i]
}
+ return k[i]
}
func (k Key) add(piece string) Key {
diff --git a/vendor/github.com/BurntSushi/toml/decode_test.go b/vendor/github.com/BurntSushi/toml/decode_test.go
index 3805931f2d3..0c36b33e061 100644
--- a/vendor/github.com/BurntSushi/toml/decode_test.go
+++ b/vendor/github.com/BurntSushi/toml/decode_test.go
@@ -3,15 +3,13 @@ package toml
import (
"fmt"
"log"
+ "math"
"reflect"
+ "strings"
"testing"
"time"
)
-func init() {
- log.SetFlags(0)
-}
-
func TestDecodeSimple(t *testing.T) {
var testSimple = `
age = 250
@@ -67,7 +65,7 @@ cauchy = "cat 2"
{"cyan", "magenta", "yellow", "black"},
},
My: map[string]cats{
- "Cats": cats{Plato: "cat 1", Cauchy: "cat 2"},
+ "Cats": {Plato: "cat 1", Cauchy: "cat 2"},
},
}
if !reflect.DeepEqual(val, answer) {
@@ -79,46 +77,73 @@ cauchy = "cat 2"
func TestDecodeEmbedded(t *testing.T) {
type Dog struct{ Name string }
type Age int
+ type cat struct{ Name string }
- tests := map[string]struct {
+ for _, test := range []struct {
+ label string
input string
decodeInto interface{}
wantDecoded interface{}
}{
- "embedded struct": {
+ {
+ label: "embedded struct",
input: `Name = "milton"`,
decodeInto: &struct{ Dog }{},
wantDecoded: &struct{ Dog }{Dog{"milton"}},
},
- "embedded non-nil pointer to struct": {
+ {
+ label: "embedded non-nil pointer to struct",
input: `Name = "milton"`,
decodeInto: &struct{ *Dog }{},
wantDecoded: &struct{ *Dog }{&Dog{"milton"}},
},
- "embedded nil pointer to struct": {
+ {
+ label: "embedded nil pointer to struct",
input: ``,
decodeInto: &struct{ *Dog }{},
wantDecoded: &struct{ *Dog }{nil},
},
- "embedded int": {
+ {
+ label: "unexported embedded struct",
+ input: `Name = "socks"`,
+ decodeInto: &struct{ cat }{},
+ wantDecoded: &struct{ cat }{cat{"socks"}},
+ },
+ {
+ label: "embedded int",
input: `Age = -5`,
decodeInto: &struct{ Age }{},
wantDecoded: &struct{ Age }{-5},
},
- }
-
- for label, test := range tests {
+ } {
_, err := Decode(test.input, test.decodeInto)
if err != nil {
t.Fatal(err)
}
if !reflect.DeepEqual(test.wantDecoded, test.decodeInto) {
t.Errorf("%s: want decoded == %+v, got %+v",
- label, test.wantDecoded, test.decodeInto)
+ test.label, test.wantDecoded, test.decodeInto)
}
}
}
+func TestDecodeIgnoredFields(t *testing.T) {
+ type simple struct {
+ Number int `toml:"-"`
+ }
+ const input = `
+Number = 123
+- = 234
+`
+ var s simple
+ if _, err := Decode(input, &s); err != nil {
+ t.Fatal(err)
+ }
+ if s.Number != 0 {
+ t.Errorf("got: %d; want 0", s.Number)
+ }
+}
+
func TestTableArrays(t *testing.T) {
var tomlTableArrays = `
[[albums]]
@@ -166,6 +191,49 @@ name = "Born in the USA"
}
}
+func TestTableNesting(t *testing.T) {
+ for _, tt := range []struct {
+ t string
+ want []string
+ }{
+ {"[a.b.c]", []string{"a", "b", "c"}},
+ {`[a."b.c"]`, []string{"a", "b.c"}},
+ {`[a.'b.c']`, []string{"a", "b.c"}},
+ {`[a.' b ']`, []string{"a", " b "}},
+ {"[ d.e.f ]", []string{"d", "e", "f"}},
+ {"[ g . h . i ]", []string{"g", "h", "i"}},
+ {`[ j . "ʞ" . 'l' ]`, []string{"j", "ʞ", "l"}},
+ } {
+ var m map[string]interface{}
+ if _, err := Decode(tt.t, &m); err != nil {
+ t.Errorf("Decode(%q): got error: %s", tt.t, err)
+ continue
+ }
+ if keys := extractNestedKeys(m); !reflect.DeepEqual(keys, tt.want) {
+ t.Errorf("Decode(%q): got nested keys %#v; want %#v",
+ tt.t, keys, tt.want)
+ }
+ }
+}
+
+func extractNestedKeys(v map[string]interface{}) []string {
+ var result []string
+ for {
+ if len(v) != 1 {
+ return result
+ }
+ for k, m := range v {
+ result = append(result, k)
+ var ok bool
+ v, ok = m.(map[string]interface{})
+ if !ok {
+ return result
+ }
+ }
+
+ }
+}
+
// Case insensitive matching tests.
// A bit more comprehensive than needed given the current implementation,
// but implementations change.
@@ -285,6 +353,83 @@ Description = "da base"
}
}
+func TestDecodeDatetime(t *testing.T) {
+ const noTimestamp = "2006-01-02T15:04:05"
+ for _, tt := range []struct {
+ s string
+ t string
+ format string
+ }{
+ {"1979-05-27T07:32:00Z", "1979-05-27T07:32:00Z", time.RFC3339},
+ {"1979-05-27T00:32:00-07:00", "1979-05-27T00:32:00-07:00", time.RFC3339},
+ {
+ "1979-05-27T00:32:00.999999-07:00",
+ "1979-05-27T00:32:00.999999-07:00",
+ time.RFC3339,
+ },
+ {"1979-05-27T07:32:00", "1979-05-27T07:32:00", noTimestamp},
+ {
+ "1979-05-27T00:32:00.999999",
+ "1979-05-27T00:32:00.999999",
+ noTimestamp,
+ },
+ {"1979-05-27", "1979-05-27T00:00:00", noTimestamp},
+ } {
+ var x struct{ D time.Time }
+ input := "d = " + tt.s
+ if _, err := Decode(input, &x); err != nil {
+ t.Errorf("Decode(%q): got error: %s", input, err)
+ continue
+ }
+ want, err := time.ParseInLocation(tt.format, tt.t, time.Local)
+ if err != nil {
+ panic(err)
+ }
+ if !x.D.Equal(want) {
+ t.Errorf("Decode(%q): got %s; want %s", input, x.D, want)
+ }
+ }
+}
+
+func TestDecodeBadDatetime(t *testing.T) {
+ var x struct{ T time.Time }
+ for _, s := range []string{
+ "123",
+ "2006-01-50T00:00:00Z",
+ "2006-01-30T00:00",
+ "2006-01-30T",
+ } {
+ input := "T = " + s
+ if _, err := Decode(input, &x); err == nil {
+ t.Errorf("Expected invalid DateTime error for %q", s)
+ }
+ }
+}
+
+func TestDecodeMultilineStrings(t *testing.T) {
+ var x struct {
+ S string
+ }
+ const s0 = `s = """
+a b \n c
+d e f
+"""`
+ if _, err := Decode(s0, &x); err != nil {
+ t.Fatal(err)
+ }
+ if want := "a b \n c\nd e f\n"; x.S != want {
+ t.Errorf("got: %q; want: %q", x.S, want)
+ }
+ const s1 = `s = """a b c\
+"""`
+ if _, err := Decode(s1, &x); err != nil {
+ t.Fatal(err)
+ }
+ if want := "a b c"; x.S != want {
+ t.Errorf("got: %q; want: %q", x.S, want)
+ }
+}
+
type sphere struct {
Center [3]float64
Radius float64
@@ -349,6 +494,111 @@ func TestDecodeSizedInts(t *testing.T) {
}
}
+func TestDecodeInts(t *testing.T) {
+ for _, tt := range []struct {
+ s string
+ want int64
+ }{
+ {"0", 0},
+ {"+99", 99},
+ {"-10", -10},
+ {"1_234_567", 1234567},
+ {"1_2_3_4", 1234},
+ {"-9_223_372_036_854_775_808", math.MinInt64},
+ {"9_223_372_036_854_775_807", math.MaxInt64},
+ } {
+ var x struct{ N int64 }
+ input := "n = " + tt.s
+ if _, err := Decode(input, &x); err != nil {
+ t.Errorf("Decode(%q): got error: %s", input, err)
+ continue
+ }
+ if x.N != tt.want {
+ t.Errorf("Decode(%q): got %d; want %d", input, x.N, tt.want)
+ }
+ }
+}
+
+func TestDecodeFloats(t *testing.T) {
+ for _, tt := range []struct {
+ s string
+ want float64
+ }{
+ {"+1.0", 1},
+ {"3.1415", 3.1415},
+ {"-0.01", -0.01},
+ {"5e+22", 5e22},
+ {"1e6", 1e6},
+ {"-2E-2", -2e-2},
+ {"6.626e-34", 6.626e-34},
+ {"9_224_617.445_991_228_313", 9224617.445991228313},
+ {"9_876.54_32e1_0", 9876.5432e10},
+ } {
+ var x struct{ N float64 }
+ input := "n = " + tt.s
+ if _, err := Decode(input, &x); err != nil {
+ t.Errorf("Decode(%q): got error: %s", input, err)
+ continue
+ }
+ if x.N != tt.want {
+ t.Errorf("Decode(%q): got %f; want %f", input, x.N, tt.want)
+ }
+ }
+}
+
+func TestDecodeMalformedNumbers(t *testing.T) {
+ for _, tt := range []struct {
+ s string
+ want string
+ }{
+ {"++99", "expected a digit"},
+ {"0..1", "must be followed by one or more digits"},
+ {"0.1.2", "Invalid float value"},
+ {"1e2.3", "Invalid float value"},
+ {"1e2e3", "Invalid float value"},
+ {"_123", "expected value"},
+ {"123_", "surrounded by digits"},
+ {"1._23", "surrounded by digits"},
+ {"1e__23", "surrounded by digits"},
+ {"123.", "must be followed by one or more digits"},
+ {"1.e2", "must be followed by one or more digits"},
+ } {
+ var x struct{ N interface{} }
+ input := "n = " + tt.s
+ _, err := Decode(input, &x)
+ if err == nil {
+ t.Errorf("Decode(%q): got nil, want error containing %q",
+ input, tt.want)
+ continue
+ }
+ if !strings.Contains(err.Error(), tt.want) {
+ t.Errorf("Decode(%q): got %q, want error containing %q",
+ input, err, tt.want)
+ }
+ }
+}
+
+func TestDecodeBadValues(t *testing.T) {
+ for _, tt := range []struct {
+ v interface{}
+ want string
+ }{
+ {3, "non-pointer int"},
+ {(*int)(nil), "nil"},
+ } {
+ _, err := Decode(`x = 3`, tt.v)
+ if err == nil {
+ t.Errorf("Decode(%v): got nil; want error containing %q",
+ tt.v, tt.want)
+ continue
+ }
+ if !strings.Contains(err.Error(), tt.want) {
+ t.Errorf("Decode(%v): got %q; want error containing %q",
+ tt.v, err, tt.want)
+ }
+ }
+}
+
func TestUnmarshaler(t *testing.T) {
var tomlBlob = `
@@ -383,7 +633,7 @@ name = "Rice"
`
m := &menu{}
if _, err := Decode(tomlBlob, m); err != nil {
- log.Fatal(err)
+ t.Fatal(err)
}
if len(m.Dishes) != 2 {
@@ -419,11 +669,123 @@ name = "Rice"
// test on a value - must be passed as *
o := menu{}
if _, err := Decode(tomlBlob, &o); err != nil {
- log.Fatal(err)
+ t.Fatal(err)
}
}
+func TestDecodeInlineTable(t *testing.T) {
+ input := `
+[CookieJar]
+Types = {Chocolate = "yummy", Oatmeal = "best ever"}
+
+[Seasons]
+Locations = {NY = {Temp = "not cold", Rating = 4}, MI = {Temp = "freezing", Rating = 9}}
+`
+ type cookieJar struct {
+ Types map[string]string
+ }
+ type properties struct {
+ Temp string
+ Rating int
+ }
+ type seasons struct {
+ Locations map[string]properties
+ }
+ type wrapper struct {
+ CookieJar cookieJar
+ Seasons seasons
+ }
+ var got wrapper
+
+ meta, err := Decode(input, &got)
+ if err != nil {
+ t.Fatal(err)
+ }
+ want := wrapper{
+ CookieJar: cookieJar{
+ Types: map[string]string{
+ "Chocolate": "yummy",
+ "Oatmeal": "best ever",
+ },
+ },
+ Seasons: seasons{
+ Locations: map[string]properties{
+ "NY": {
+ Temp: "not cold",
+ Rating: 4,
+ },
+ "MI": {
+ Temp: "freezing",
+ Rating: 9,
+ },
+ },
+ },
+ }
+ if !reflect.DeepEqual(got, want) {
+ t.Fatalf("after decode, got:\n\n%#v\n\nwant:\n\n%#v", got, want)
+ }
+ if len(meta.keys) != 12 {
+ t.Errorf("after decode, got %d meta keys; want 12", len(meta.keys))
+ }
+ if len(meta.types) != 12 {
+ t.Errorf("after decode, got %d meta types; want 12", len(meta.types))
+ }
+}
+
+func TestDecodeInlineTableArray(t *testing.T) {
+ type point struct {
+ X, Y, Z int
+ }
+ var got struct {
+ Points []point
+ }
+ // Example inline table array from the spec.
+ const in = `
+points = [ { x = 1, y = 2, z = 3 },
+ { x = 7, y = 8, z = 9 },
+ { x = 2, y = 4, z = 8 } ]
+
+`
+ if _, err := Decode(in, &got); err != nil {
+ t.Fatal(err)
+ }
+ want := []point{
+ {X: 1, Y: 2, Z: 3},
+ {X: 7, Y: 8, Z: 9},
+ {X: 2, Y: 4, Z: 8},
+ }
+ if !reflect.DeepEqual(got.Points, want) {
+ t.Errorf("got %#v; want %#v", got.Points, want)
+ }
+}
+
+func TestDecodeMalformedInlineTable(t *testing.T) {
+ for _, tt := range []struct {
+ s string
+ want string
+ }{
+ {"{,}", "unexpected comma"},
+ {"{x = 3 y = 4}", "expected a comma or an inline table terminator"},
+ {"{x=3,,y=4}", "unexpected comma"},
+ {"{x=3,\ny=4}", "newlines not allowed"},
+ {"{x=3\n,y=4}", "newlines not allowed"},
+ } {
+ var x struct{ A map[string]int }
+ input := "a = " + tt.s
+ _, err := Decode(input, &x)
+ if err == nil {
+ t.Errorf("Decode(%q): got nil, want error containing %q",
+ input, tt.want)
+ continue
+ }
+ if !strings.Contains(err.Error(), tt.want) {
+ t.Errorf("Decode(%q): got %q, want error containing %q",
+ input, err, tt.want)
+ }
+ }
+}
+
type menu struct {
Dishes map[string]dish
}
@@ -468,6 +830,141 @@ type ingredient struct {
Name string
}
+func TestDecodeSlices(t *testing.T) {
+ type T struct {
+ S []string
+ }
+ for i, tt := range []struct {
+ v T
+ input string
+ want T
+ }{
+ {T{}, "", T{}},
+ {T{[]string{}}, "", T{[]string{}}},
+ {T{[]string{"a", "b"}}, "", T{[]string{"a", "b"}}},
+ {T{}, "S = []", T{[]string{}}},
+ {T{[]string{}}, "S = []", T{[]string{}}},
+ {T{[]string{"a", "b"}}, "S = []", T{[]string{}}},
+ {T{}, `S = ["x"]`, T{[]string{"x"}}},
+ {T{[]string{}}, `S = ["x"]`, T{[]string{"x"}}},
+ {T{[]string{"a", "b"}}, `S = ["x"]`, T{[]string{"x"}}},
+ } {
+ if _, err := Decode(tt.input, &tt.v); err != nil {
+ t.Errorf("[%d] %s", i, err)
+ continue
+ }
+ if !reflect.DeepEqual(tt.v, tt.want) {
+ t.Errorf("[%d] got %#v; want %#v", i, tt.v, tt.want)
+ }
+ }
+}
+
+func TestDecodePrimitive(t *testing.T) {
+ type S struct {
+ P Primitive
+ }
+ type T struct {
+ S []int
+ }
+ slicep := func(s []int) *[]int { return &s }
+ arrayp := func(a [2]int) *[2]int { return &a }
+ mapp := func(m map[string]int) *map[string]int { return &m }
+ for i, tt := range []struct {
+ v interface{}
+ input string
+ want interface{}
+ }{
+ // slices
+ {slicep(nil), "", slicep(nil)},
+ {slicep([]int{}), "", slicep([]int{})},
+ {slicep([]int{1, 2, 3}), "", slicep([]int{1, 2, 3})},
+ {slicep(nil), "P = [1,2]", slicep([]int{1, 2})},
+ {slicep([]int{}), "P = [1,2]", slicep([]int{1, 2})},
+ {slicep([]int{1, 2, 3}), "P = [1,2]", slicep([]int{1, 2})},
+
+ // arrays
+ {arrayp([2]int{2, 3}), "", arrayp([2]int{2, 3})},
+ {arrayp([2]int{2, 3}), "P = [3,4]", arrayp([2]int{3, 4})},
+
+ // maps
+ {mapp(nil), "", mapp(nil)},
+ {mapp(map[string]int{}), "", mapp(map[string]int{})},
+ {mapp(map[string]int{"a": 1}), "", mapp(map[string]int{"a": 1})},
+ {mapp(nil), "[P]\na = 2", mapp(map[string]int{"a": 2})},
+ {mapp(map[string]int{}), "[P]\na = 2", mapp(map[string]int{"a": 2})},
+ {mapp(map[string]int{"a": 1, "b": 3}), "[P]\na = 2", mapp(map[string]int{"a": 2, "b": 3})},
+
+ // structs
+ {&T{nil}, "[P]", &T{nil}},
+ {&T{[]int{}}, "[P]", &T{[]int{}}},
+ {&T{[]int{1, 2, 3}}, "[P]", &T{[]int{1, 2, 3}}},
+ {&T{nil}, "[P]\nS = [1,2]", &T{[]int{1, 2}}},
+ {&T{[]int{}}, "[P]\nS = [1,2]", &T{[]int{1, 2}}},
+ {&T{[]int{1, 2, 3}}, "[P]\nS = [1,2]", &T{[]int{1, 2}}},
+ } {
+ var s S
+ md, err := Decode(tt.input, &s)
+ if err != nil {
+ t.Errorf("[%d] Decode error: %s", i, err)
+ continue
+ }
+ if err := md.PrimitiveDecode(s.P, tt.v); err != nil {
+ t.Errorf("[%d] PrimitiveDecode error: %s", i, err)
+ continue
+ }
+ if !reflect.DeepEqual(tt.v, tt.want) {
+ t.Errorf("[%d] got %#v; want %#v", i, tt.v, tt.want)
+ }
+ }
+}
+
+func TestDecodeErrors(t *testing.T) {
+ for _, s := range []string{
+ `x="`,
+ `x='`,
+ `x='''`,
+
+ // Cases found by fuzzing in
+ // https://github.com/BurntSushi/toml/issues/155.
+ `""�`, // used to panic with index out of range
+ `e="""`, // used to hang
+ } {
+ var x struct{}
+ _, err := Decode(s, &x)
+ if err == nil {
+ t.Errorf("Decode(%q): got nil error", s)
+ }
+ }
+}
+
+// Test for https://github.com/BurntSushi/toml/pull/166.
+func TestDecodeBoolArray(t *testing.T) {
+ for _, tt := range []struct {
+ s string
+ got interface{}
+ want interface{}
+ }{
+ {
+ "a = [true, false]",
+ &struct{ A []bool }{},
+ &struct{ A []bool }{[]bool{true, false}},
+ },
+ {
+ "a = {a = true, b = false}",
+ &struct{ A map[string]bool }{},
+ &struct{ A map[string]bool }{map[string]bool{"a": true, "b": false}},
+ },
+ } {
+ if _, err := Decode(tt.s, tt.got); err != nil {
+ t.Errorf("Decode(%q): %s", tt.s, err)
+ continue
+ }
+ if !reflect.DeepEqual(tt.got, tt.want) {
+ t.Errorf("Decode(%q): got %#v; want %#v", tt.s, tt.got, tt.want)
+ }
+ }
+}
+
func ExampleMetaData_PrimitiveDecode() {
var md MetaData
var err error
@@ -553,7 +1050,7 @@ ip = "10.0.0.2"
}
type server struct {
- IP string `toml:"ip"`
+ IP string `toml:"ip,omitempty"`
Config serverConfig `toml:"config"`
}
@@ -715,7 +1212,7 @@ rating = 3.1
// // NOTE the example below contains detailed type casting to show how
// // the 'data' is retrieved. In operational use, a type cast wrapper
- // // may be prefered e.g.
+ // // may be preferred e.g.
// //
// // func AsMap(v interface{}) (map[string]interface{}, error) {
// // return v.(map[string]interface{})
@@ -842,7 +1339,7 @@ func (o *order) UnmarshalTOML(data interface{}) error {
// NOTE the example below contains detailed type casting to show how
// the 'data' is retrieved. In operational use, a type cast wrapper
- // may be prefered e.g.
+ // may be preferred e.g.
//
// func AsMap(v interface{}) (map[string]interface{}, error) {
// return v.(map[string]interface{})
diff --git a/vendor/github.com/BurntSushi/toml/doc.go b/vendor/github.com/BurntSushi/toml/doc.go
index fe26800041b..b371f396edc 100644
--- a/vendor/github.com/BurntSushi/toml/doc.go
+++ b/vendor/github.com/BurntSushi/toml/doc.go
@@ -4,7 +4,7 @@ files via reflection. There is also support for delaying decoding with
the Primitive type, and querying the set of keys in a TOML document with the
MetaData type.
-The specification implemented: https://github.com/mojombo/toml
+The specification implemented: https://github.com/toml-lang/toml
The sub-command github.com/BurntSushi/toml/cmd/tomlv can be used to verify
whether a file is a valid TOML document. It can also be used to print the
diff --git a/vendor/github.com/BurntSushi/toml/encode.go b/vendor/github.com/BurntSushi/toml/encode.go
index c7e227c7f4f..d905c21a246 100644
--- a/vendor/github.com/BurntSushi/toml/encode.go
+++ b/vendor/github.com/BurntSushi/toml/encode.go
@@ -16,17 +16,17 @@ type tomlEncodeError struct{ error }
var (
errArrayMixedElementTypes = errors.New(
- "can't encode array with mixed element types")
+ "toml: cannot encode array with mixed element types")
errArrayNilElement = errors.New(
- "can't encode array with nil element")
+ "toml: cannot encode array with nil element")
errNonString = errors.New(
- "can't encode a map with non-string key type")
+ "toml: cannot encode a map with non-string key type")
errAnonNonStruct = errors.New(
- "can't encode an anonymous field that is not a struct")
+ "toml: cannot encode an anonymous field that is not a struct")
errArrayNoTable = errors.New(
- "TOML array element can't contain a table")
+ "toml: TOML array element cannot contain a table")
errNoKey = errors.New(
- "top-level values must be a Go map or struct")
+ "toml: top-level values must be Go maps or structs")
errAnything = errors.New("") // used in testing
)
@@ -148,7 +148,7 @@ func (enc *Encoder) encode(key Key, rv reflect.Value) {
case reflect.Struct:
enc.eTable(key, rv)
default:
- panic(e("Unsupported type for key '%s': %s", key, k))
+ panic(e("unsupported type for key '%s': %s", key, k))
}
}
@@ -160,7 +160,7 @@ func (enc *Encoder) eElement(rv reflect.Value) {
// Special case time.Time as a primitive. Has to come before
// TextMarshaler below because time.Time implements
// encoding.TextMarshaler, but we need to always use UTC.
- enc.wf(v.In(time.FixedZone("UTC", 0)).Format("2006-01-02T15:04:05Z"))
+ enc.wf(v.UTC().Format("2006-01-02T15:04:05Z"))
return
case TextMarshaler:
// Special case. Use text marshaler if it's available for this value.
@@ -191,7 +191,7 @@ func (enc *Encoder) eElement(rv reflect.Value) {
case reflect.String:
enc.writeQuoted(rv.String())
default:
- panic(e("Unexpected primitive type: %s", rv.Kind()))
+ panic(e("unexpected primitive type: %s", rv.Kind()))
}
}
@@ -241,7 +241,7 @@ func (enc *Encoder) eArrayOfTables(key Key, rv reflect.Value) {
func (enc *Encoder) eTable(key Key, rv reflect.Value) {
panicIfInvalidKey(key)
if len(key) == 1 {
- // Output an extra new line between top-level tables.
+ // Output an extra newline between top-level tables.
// (The newline isn't written if nothing else has been written though.)
enc.newline()
}
@@ -306,19 +306,36 @@ func (enc *Encoder) eStruct(key Key, rv reflect.Value) {
addFields = func(rt reflect.Type, rv reflect.Value, start []int) {
for i := 0; i < rt.NumField(); i++ {
f := rt.Field(i)
- // skip unexporded fields
- if f.PkgPath != "" {
+ // skip unexported fields
+ if f.PkgPath != "" && !f.Anonymous {
continue
}
frv := rv.Field(i)
if f.Anonymous {
- frv := eindirect(frv)
- t := frv.Type()
- if t.Kind() != reflect.Struct {
- encPanic(errAnonNonStruct)
+ t := f.Type
+ switch t.Kind() {
+ case reflect.Struct:
+ // Treat anonymous struct fields with
+ // tag names as though they are not
+ // anonymous, like encoding/json does.
+ if getOptions(f.Tag).name == "" {
+ addFields(t, frv, f.Index)
+ continue
+ }
+ case reflect.Ptr:
+ if t.Elem().Kind() == reflect.Struct &&
+ getOptions(f.Tag).name == "" {
+ if !frv.IsNil() {
+ addFields(t.Elem(), frv.Elem(), f.Index)
+ }
+ continue
+ }
+ // Fall through to the normal field encoding logic below
+ // for non-struct anonymous fields.
}
- addFields(t, frv, f.Index)
- } else if typeIsHash(tomlTypeOfGo(frv)) {
+ }
+
+ if typeIsHash(tomlTypeOfGo(frv)) {
fieldsSub = append(fieldsSub, append(start, f.Index...))
} else {
fieldsDirect = append(fieldsDirect, append(start, f.Index...))
@@ -336,18 +353,18 @@ func (enc *Encoder) eStruct(key Key, rv reflect.Value) {
continue
}
- keyName := sft.Tag.Get("toml")
- if keyName == "-" {
+ opts := getOptions(sft.Tag)
+ if opts.skip {
continue
}
- if keyName == "" {
- keyName = sft.Name
+ keyName := sft.Name
+ if opts.name != "" {
+ keyName = opts.name
}
-
- keyName, opts := getOptions(keyName)
- if _, ok := opts["omitempty"]; ok && isEmpty(sf) {
+ if opts.omitempty && isEmpty(sf) {
continue
- } else if _, ok := opts["omitzero"]; ok && isZero(sf) {
+ }
+ if opts.omitzero && isZero(sf) {
continue
}
@@ -382,9 +399,8 @@ func tomlTypeOfGo(rv reflect.Value) tomlType {
case reflect.Array, reflect.Slice:
if typeEqual(tomlHash, tomlArrayType(rv)) {
return tomlArrayHash
- } else {
- return tomlArray
}
+ return tomlArray
case reflect.Ptr, reflect.Interface:
return tomlTypeOfGo(rv.Elem())
case reflect.String:
@@ -441,50 +457,51 @@ func tomlArrayType(rv reflect.Value) tomlType {
return firstType
}
-func getOptions(keyName string) (string, map[string]struct{}) {
- opts := make(map[string]struct{})
- ss := strings.Split(keyName, ",")
- name := ss[0]
- if len(ss) > 1 {
- for _, opt := range ss {
- opts[opt] = struct{}{}
+type tagOptions struct {
+ skip bool // "-"
+ name string
+ omitempty bool
+ omitzero bool
+}
+
+func getOptions(tag reflect.StructTag) tagOptions {
+ t := tag.Get("toml")
+ if t == "-" {
+ return tagOptions{skip: true}
+ }
+ var opts tagOptions
+ parts := strings.Split(t, ",")
+ opts.name = parts[0]
+ for _, s := range parts[1:] {
+ switch s {
+ case "omitempty":
+ opts.omitempty = true
+ case "omitzero":
+ opts.omitzero = true
}
}
-
- return name, opts
+ return opts
}
func isZero(rv reflect.Value) bool {
switch rv.Kind() {
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- if rv.Int() == 0 {
- return true
- }
+ return rv.Int() == 0
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
- if rv.Uint() == 0 {
- return true
- }
+ return rv.Uint() == 0
case reflect.Float32, reflect.Float64:
- if rv.Float() == 0.0 {
- return true
- }
+ return rv.Float() == 0.0
}
-
return false
}
func isEmpty(rv reflect.Value) bool {
switch rv.Kind() {
- case reflect.String:
- if len(strings.TrimSpace(rv.String())) == 0 {
- return true
- }
- case reflect.Array, reflect.Slice, reflect.Map:
- if rv.Len() == 0 {
- return true
- }
+ case reflect.Array, reflect.Slice, reflect.Map, reflect.String:
+ return rv.Len() == 0
+ case reflect.Bool:
+ return !rv.Bool()
}
-
return false
}
diff --git a/vendor/github.com/BurntSushi/toml/encode_test.go b/vendor/github.com/BurntSushi/toml/encode_test.go
index 445ca8e2110..673b7b0093c 100644
--- a/vendor/github.com/BurntSushi/toml/encode_test.go
+++ b/vendor/github.com/BurntSushi/toml/encode_test.go
@@ -36,7 +36,7 @@ func TestEncodeRoundTrip(t *testing.T) {
}
var outputs Config
if _, err := Decode(firstBuffer.String(), &outputs); err != nil {
- log.Printf("Could not decode:\n-----\n%s\n-----\n",
+ t.Logf("Could not decode:\n-----\n%s\n-----\n",
firstBuffer.String())
t.Fatal(err)
}
@@ -336,6 +336,10 @@ ArrayOfMixedSlices = [[1, 2], ["a", "b"]]
}{struct{ *Embedded }{&Embedded{1}}},
wantOutput: "[_struct]\n _int = 1\n",
},
+ "embedded non-struct": {
+ input: struct{ NonStruct }{5},
+ wantOutput: "NonStruct = 5\n",
+ },
"array of tables": {
input: struct {
Structs []*struct{ Int int } `toml:"struct"`
@@ -349,7 +353,7 @@ ArrayOfMixedSlices = [[1, 2], ["a", "b"]]
"map": map[string]interface{}{
"zero": 5,
"arr": []map[string]int{
- map[string]int{
+ {
"friend": 5,
},
},
@@ -373,10 +377,6 @@ ArrayOfMixedSlices = [[1, 2], ["a", "b"]]
input: map[int]string{1: ""},
wantError: errNonString,
},
- "(error) anonymous non-struct": {
- input: struct{ NonStruct }{5},
- wantError: errAnonNonStruct,
- },
"(error) empty key name": {
input: map[string]int{"": 1},
wantError: errAnything,
@@ -457,16 +457,30 @@ func TestEncodeArrayHashWithNormalHashOrder(t *testing.T) {
func TestEncodeWithOmitEmpty(t *testing.T) {
type simple struct {
- User string `toml:"user"`
- Pass string `toml:"password,omitempty"`
+ Bool bool `toml:"bool,omitempty"`
+ String string `toml:"string,omitempty"`
+ Array [0]byte `toml:"array,omitempty"`
+ Slice []int `toml:"slice,omitempty"`
+ Map map[string]string `toml:"map,omitempty"`
}
- value := simple{"Testing", ""}
- expected := fmt.Sprintf("user = %q\n", value.User)
- encodeExpected(t, "simple with omitempty, is empty", value, expected, nil)
- value.Pass = "some password"
- expected = fmt.Sprintf("user = %q\npassword = %q\n", value.User, value.Pass)
- encodeExpected(t, "simple with omitempty, not empty", value, expected, nil)
+ var v simple
+ encodeExpected(t, "fields with omitempty are omitted when empty", v, "", nil)
+ v = simple{
+ Bool: true,
+ String: " ",
+ Slice: []int{2, 3, 4},
+ Map: map[string]string{"foo": "bar"},
+ }
+ expected := `bool = true
+string = " "
+slice = [2, 3, 4]
+
+[map]
+ foo = "bar"
+`
+ encodeExpected(t, "fields with omitempty are not omitted when non-empty",
+ v, expected, nil)
}
func TestEncodeWithOmitZero(t *testing.T) {
@@ -491,6 +505,65 @@ unsigned = 5
encodeExpected(t, "simple with omitzero, non-zero", value, expected, nil)
}
+func TestEncodeOmitemptyWithEmptyName(t *testing.T) {
+ type simple struct {
+ S []int `toml:",omitempty"`
+ }
+ v := simple{[]int{1, 2, 3}}
+ expected := "S = [1, 2, 3]\n"
+ encodeExpected(t, "simple with omitempty, no name, non-empty field",
+ v, expected, nil)
+}
+
+func TestEncodeAnonymousStruct(t *testing.T) {
+ type Inner struct{ N int }
+ type Outer0 struct{ Inner }
+ type Outer1 struct {
+ Inner `toml:"inner"`
+ }
+
+ v0 := Outer0{Inner{3}}
+ expected := "N = 3\n"
+ encodeExpected(t, "embedded anonymous untagged struct", v0, expected, nil)
+
+ v1 := Outer1{Inner{3}}
+ expected = "[inner]\n N = 3\n"
+ encodeExpected(t, "embedded anonymous tagged struct", v1, expected, nil)
+}
+
+func TestEncodeAnonymousStructPointerField(t *testing.T) {
+ type Inner struct{ N int }
+ type Outer0 struct{ *Inner }
+ type Outer1 struct {
+ *Inner `toml:"inner"`
+ }
+
+ v0 := Outer0{}
+ expected := ""
+ encodeExpected(t, "nil anonymous untagged struct pointer field", v0, expected, nil)
+
+ v0 = Outer0{&Inner{3}}
+ expected = "N = 3\n"
+ encodeExpected(t, "non-nil anonymous untagged struct pointer field", v0, expected, nil)
+
+ v1 := Outer1{}
+ expected = ""
+ encodeExpected(t, "nil anonymous tagged struct pointer field", v1, expected, nil)
+
+ v1 = Outer1{&Inner{3}}
+ expected = "[inner]\n N = 3\n"
+ encodeExpected(t, "non-nil anonymous tagged struct pointer field", v1, expected, nil)
+}
+
+func TestEncodeIgnoredFields(t *testing.T) {
+ type simple struct {
+ Number int `toml:"-"`
+ }
+ value := simple{}
+ expected := ""
+ encodeExpected(t, "ignored field", value, expected, nil)
+}
+
func encodeExpected(
t *testing.T, label string, val interface{}, wantStr string, wantErr error,
) {
diff --git a/vendor/github.com/BurntSushi/toml/lex.go b/vendor/github.com/BurntSushi/toml/lex.go
index 219122857e3..6dee7fc7925 100644
--- a/vendor/github.com/BurntSushi/toml/lex.go
+++ b/vendor/github.com/BurntSushi/toml/lex.go
@@ -3,6 +3,7 @@ package toml
import (
"fmt"
"strings"
+ "unicode"
"unicode/utf8"
)
@@ -29,24 +30,28 @@ const (
itemArrayTableEnd
itemKeyStart
itemCommentStart
+ itemInlineTableStart
+ itemInlineTableEnd
)
const (
- eof = 0
- tableStart = '['
- tableEnd = ']'
- arrayTableStart = '['
- arrayTableEnd = ']'
- tableSep = '.'
- keySep = '='
- arrayStart = '['
- arrayEnd = ']'
- arrayValTerm = ','
- commentStart = '#'
- stringStart = '"'
- stringEnd = '"'
- rawStringStart = '\''
- rawStringEnd = '\''
+ eof = 0
+ comma = ','
+ tableStart = '['
+ tableEnd = ']'
+ arrayTableStart = '['
+ arrayTableEnd = ']'
+ tableSep = '.'
+ keySep = '='
+ arrayStart = '['
+ arrayEnd = ']'
+ commentStart = '#'
+ stringStart = '"'
+ stringEnd = '"'
+ rawStringStart = '\''
+ rawStringEnd = '\''
+ inlineTableStart = '{'
+ inlineTableEnd = '}'
)
type stateFn func(lx *lexer) stateFn
@@ -55,11 +60,18 @@ type lexer struct {
input string
start int
pos int
- width int
line int
state stateFn
items chan item
+ // Allow for backing up up to three runes.
+ // This is necessary because TOML contains 3-rune tokens (""" and ''').
+ prevWidths [3]int
+ nprev int // how many of prevWidths are in use
+ // If we emit an eof, we can still back up, but it is not OK to call
+ // next again.
+ atEOF bool
+
// A stack of state functions used to maintain context.
// The idea is to reuse parts of the state machine in various places.
// For example, values can appear at the top level or within arbitrarily
@@ -87,7 +99,7 @@ func (lx *lexer) nextItem() item {
func lex(input string) *lexer {
lx := &lexer{
- input: input + "\n",
+ input: input,
state: lexTop,
line: 1,
items: make(chan item, 10),
@@ -102,7 +114,7 @@ func (lx *lexer) push(state stateFn) {
func (lx *lexer) pop() stateFn {
if len(lx.stack) == 0 {
- return lx.errorf("BUG in lexer: no states to pop.")
+ return lx.errorf("BUG in lexer: no states to pop")
}
last := lx.stack[len(lx.stack)-1]
lx.stack = lx.stack[0 : len(lx.stack)-1]
@@ -124,16 +136,25 @@ func (lx *lexer) emitTrim(typ itemType) {
}
func (lx *lexer) next() (r rune) {
+ if lx.atEOF {
+ panic("next called after EOF")
+ }
if lx.pos >= len(lx.input) {
- lx.width = 0
+ lx.atEOF = true
return eof
}
if lx.input[lx.pos] == '\n' {
lx.line++
}
- r, lx.width = utf8.DecodeRuneInString(lx.input[lx.pos:])
- lx.pos += lx.width
+ lx.prevWidths[2] = lx.prevWidths[1]
+ lx.prevWidths[1] = lx.prevWidths[0]
+ if lx.nprev < 3 {
+ lx.nprev++
+ }
+ r, w := utf8.DecodeRuneInString(lx.input[lx.pos:])
+ lx.prevWidths[0] = w
+ lx.pos += w
return r
}
@@ -142,9 +163,20 @@ func (lx *lexer) ignore() {
lx.start = lx.pos
}
-// backup steps back one rune. Can be called only once per call of next.
+// backup steps back one rune. Can be called only twice between calls to next.
func (lx *lexer) backup() {
- lx.pos -= lx.width
+ if lx.atEOF {
+ lx.atEOF = false
+ return
+ }
+ if lx.nprev < 1 {
+ panic("backed up too far")
+ }
+ w := lx.prevWidths[0]
+ lx.prevWidths[0] = lx.prevWidths[1]
+ lx.prevWidths[1] = lx.prevWidths[2]
+ lx.nprev--
+ lx.pos -= w
if lx.pos < len(lx.input) && lx.input[lx.pos] == '\n' {
lx.line--
}
@@ -166,9 +198,22 @@ func (lx *lexer) peek() rune {
return r
}
+// skip ignores all input that matches the given predicate.
+func (lx *lexer) skip(pred func(rune) bool) {
+ for {
+ r := lx.next()
+ if pred(r) {
+ continue
+ }
+ lx.backup()
+ lx.ignore()
+ return
+ }
+}
+
// errorf stops all lexing by emitting an error and returning `nil`.
// Note that any value that is a character is escaped if it's a special
-// character (new lines, tabs, etc.).
+// character (newlines, tabs, etc.).
func (lx *lexer) errorf(format string, values ...interface{}) stateFn {
lx.items <- item{
itemError,
@@ -184,7 +229,6 @@ func lexTop(lx *lexer) stateFn {
if isWhitespace(r) || isNL(r) {
return lexSkip(lx, lexTop)
}
-
switch r {
case commentStart:
lx.push(lexTop)
@@ -193,7 +237,7 @@ func lexTop(lx *lexer) stateFn {
return lexTableStart
case eof:
if lx.pos > lx.start {
- return lx.errorf("Unexpected EOF.")
+ return lx.errorf("unexpected EOF")
}
lx.emit(itemEOF)
return nil
@@ -208,12 +252,12 @@ func lexTop(lx *lexer) stateFn {
// lexTopEnd is entered whenever a top-level item has been consumed. (A value
// or a table.) It must see only whitespace, and will turn back to lexTop
-// upon a new line. If it sees EOF, it will quit the lexer successfully.
+// upon a newline. If it sees EOF, it will quit the lexer successfully.
func lexTopEnd(lx *lexer) stateFn {
r := lx.next()
switch {
case r == commentStart:
- // a comment will read to a new line for us.
+ // a comment will read to a newline for us.
lx.push(lexTop)
return lexCommentStart
case isWhitespace(r):
@@ -222,11 +266,11 @@ func lexTopEnd(lx *lexer) stateFn {
lx.ignore()
return lexTop
case r == eof:
- lx.ignore()
- return lexTop
+ lx.emit(itemEOF)
+ return nil
}
- return lx.errorf("Expected a top-level item to end with a new line, "+
- "comment or EOF, but got %q instead.", r)
+ return lx.errorf("expected a top-level item to end with a newline, "+
+ "comment, or EOF, but got %q instead", r)
}
// lexTable lexes the beginning of a table. Namely, it makes sure that
@@ -253,50 +297,47 @@ func lexTableEnd(lx *lexer) stateFn {
func lexArrayTableEnd(lx *lexer) stateFn {
if r := lx.next(); r != arrayTableEnd {
- return lx.errorf("Expected end of table array name delimiter %q, "+
- "but got %q instead.", arrayTableEnd, r)
+ return lx.errorf("expected end of table array name delimiter %q, "+
+ "but got %q instead", arrayTableEnd, r)
}
lx.emit(itemArrayTableEnd)
return lexTopEnd
}
func lexTableNameStart(lx *lexer) stateFn {
+ lx.skip(isWhitespace)
switch r := lx.peek(); {
case r == tableEnd || r == eof:
- return lx.errorf("Unexpected end of table name. (Table names cannot " +
- "be empty.)")
+ return lx.errorf("unexpected end of table name " +
+ "(table names cannot be empty)")
case r == tableSep:
- return lx.errorf("Unexpected table separator. (Table names cannot " +
- "be empty.)")
+ return lx.errorf("unexpected table separator " +
+ "(table names cannot be empty)")
case r == stringStart || r == rawStringStart:
lx.ignore()
lx.push(lexTableNameEnd)
return lexValue // reuse string lexing
- case isWhitespace(r):
- return lexTableNameStart
default:
return lexBareTableName
}
}
-// lexTableName lexes the name of a table. It assumes that at least one
+// lexBareTableName lexes the name of a table. It assumes that at least one
// valid character for the table has already been read.
func lexBareTableName(lx *lexer) stateFn {
- switch r := lx.next(); {
- case isBareKeyChar(r):
+ r := lx.next()
+ if isBareKeyChar(r) {
return lexBareTableName
- case r == tableSep || r == tableEnd:
- lx.backup()
- lx.emitTrim(itemText)
- return lexTableNameEnd
- default:
- return lx.errorf("Bare keys cannot contain %q.", r)
}
+ lx.backup()
+ lx.emit(itemText)
+ return lexTableNameEnd
}
// lexTableNameEnd reads the end of a piece of a table name, optionally
// consuming whitespace.
func lexTableNameEnd(lx *lexer) stateFn {
+ lx.skip(isWhitespace)
switch r := lx.next(); {
case isWhitespace(r):
return lexTableNameEnd
@@ -306,8 +347,8 @@ func lexTableNameEnd(lx *lexer) stateFn {
case r == tableEnd:
return lx.pop()
default:
- return lx.errorf("Expected '.' or ']' to end table name, but got %q "+
- "instead.", r)
+ return lx.errorf("expected '.' or ']' to end table name, "+
+ "but got %q instead", r)
}
}
@@ -317,7 +358,7 @@ func lexKeyStart(lx *lexer) stateFn {
r := lx.peek()
switch {
case r == keySep:
- return lx.errorf("Unexpected key separator %q.", keySep)
+ return lx.errorf("unexpected key separator %q", keySep)
case isWhitespace(r) || isNL(r):
lx.next()
return lexSkip(lx, lexKeyStart)
@@ -340,14 +381,15 @@ func lexBareKey(lx *lexer) stateFn {
case isBareKeyChar(r):
return lexBareKey
case isWhitespace(r):
- lx.emitTrim(itemText)
+ lx.backup()
+ lx.emit(itemText)
return lexKeyEnd
case r == keySep:
lx.backup()
- lx.emitTrim(itemText)
+ lx.emit(itemText)
return lexKeyEnd
default:
- return lx.errorf("Bare keys cannot contain %q.", r)
+ return lx.errorf("bare keys cannot contain %q", r)
}
}
@@ -360,7 +402,7 @@ func lexKeyEnd(lx *lexer) stateFn {
case isWhitespace(r):
return lexSkip(lx, lexKeyEnd)
default:
- return lx.errorf("Expected key separator %q, but got %q instead.",
+ return lx.errorf("expected key separator %q, but got %q instead",
keySep, r)
}
}
@@ -369,20 +411,26 @@ func lexKeyEnd(lx *lexer) stateFn {
// lexValue will ignore whitespace.
// After a value is lexed, the last state on the next is popped and returned.
func lexValue(lx *lexer) stateFn {
- // We allow whitespace to precede a value, but NOT new lines.
- // In array syntax, the array states are responsible for ignoring new
- // lines.
+ // We allow whitespace to precede a value, but NOT newlines.
+ // In array syntax, the array states are responsible for ignoring newlines.
r := lx.next()
- if isWhitespace(r) {
- return lexSkip(lx, lexValue)
- }
-
switch {
- case r == arrayStart:
+ case isWhitespace(r):
+ return lexSkip(lx, lexValue)
+ case isDigit(r):
+ lx.backup() // avoid an extra state and use the same as above
+ return lexNumberOrDateStart
+ }
+ switch r {
+ case arrayStart:
lx.ignore()
lx.emit(itemArray)
return lexArrayValue
- case r == stringStart:
+ case inlineTableStart:
+ lx.ignore()
+ lx.emit(itemInlineTableStart)
+ return lexInlineTableValue
+ case stringStart:
if lx.accept(stringStart) {
if lx.accept(stringStart) {
lx.ignore() // Ignore """
@@ -392,7 +440,7 @@ func lexValue(lx *lexer) stateFn {
}
lx.ignore() // ignore the '"'
return lexString
- case r == rawStringStart:
+ case rawStringStart:
if lx.accept(rawStringStart) {
if lx.accept(rawStringStart) {
lx.ignore() // Ignore """
@@ -402,23 +450,24 @@ func lexValue(lx *lexer) stateFn {
}
lx.ignore() // ignore the "'"
return lexRawString
- case r == 't':
- return lexTrue
- case r == 'f':
- return lexFalse
- case r == '-':
+ case '+', '-':
return lexNumberStart
- case isDigit(r):
- lx.backup() // avoid an extra state and use the same as above
- return lexNumberOrDateStart
- case r == '.': // special error case, be kind to users
- return lx.errorf("Floats must start with a digit, not '.'.")
+ case '.': // special error case, be kind to users
+ return lx.errorf("floats must start with a digit, not '.'")
}
- return lx.errorf("Expected value but found %q instead.", r)
+ if unicode.IsLetter(r) {
+ // Be permissive here; lexBool will give a nice error if the
+ // user wrote something like
+ // x = foo
+ // (i.e. not 'true' or 'false' but is something else word-like.)
+ lx.backup()
+ return lexBool
+ }
+ return lx.errorf("expected value but found %q instead", r)
}
// lexArrayValue consumes one value in an array. It assumes that '[' or ','
-// have already been consumed. All whitespace and new lines are ignored.
+// have already been consumed. All whitespace and newlines are ignored.
func lexArrayValue(lx *lexer) stateFn {
r := lx.next()
switch {
@@ -427,10 +476,11 @@ func lexArrayValue(lx *lexer) stateFn {
case r == commentStart:
lx.push(lexArrayValue)
return lexCommentStart
- case r == arrayValTerm:
- return lx.errorf("Unexpected array value terminator %q.",
- arrayValTerm)
+ case r == comma:
+ return lx.errorf("unexpected comma")
case r == arrayEnd:
+ // NOTE(caleb): The spec isn't clear about whether you can have
+ // a trailing comma or not, so we'll allow it.
return lexArrayEnd
}
@@ -439,8 +489,9 @@ func lexArrayValue(lx *lexer) stateFn {
return lexValue
}
-// lexArrayValueEnd consumes the cruft between values of an array. Namely,
-// it ignores whitespace and expects either a ',' or a ']'.
+// lexArrayValueEnd consumes everything between the end of an array value and
+// the next value (or the end of the array): it ignores whitespace and newlines
+// and expects either a ',' or a ']'.
func lexArrayValueEnd(lx *lexer) stateFn {
r := lx.next()
switch {
@@ -449,31 +500,88 @@ func lexArrayValueEnd(lx *lexer) stateFn {
case r == commentStart:
lx.push(lexArrayValueEnd)
return lexCommentStart
- case r == arrayValTerm:
+ case r == comma:
lx.ignore()
return lexArrayValue // move on to the next value
case r == arrayEnd:
return lexArrayEnd
}
- return lx.errorf("Expected an array value terminator %q or an array "+
- "terminator %q, but got %q instead.", arrayValTerm, arrayEnd, r)
+ return lx.errorf(
+ "expected a comma or array terminator %q, but got %q instead",
+ arrayEnd, r,
+ )
}
-// lexArrayEnd finishes the lexing of an array. It assumes that a ']' has
-// just been consumed.
+// lexArrayEnd finishes the lexing of an array.
+// It assumes that a ']' has just been consumed.
func lexArrayEnd(lx *lexer) stateFn {
lx.ignore()
lx.emit(itemArrayEnd)
return lx.pop()
}
+// lexInlineTableValue consumes one key/value pair in an inline table.
+// It assumes that '{' or ',' have already been consumed. Whitespace is ignored.
+func lexInlineTableValue(lx *lexer) stateFn {
+ r := lx.next()
+ switch {
+ case isWhitespace(r):
+ return lexSkip(lx, lexInlineTableValue)
+ case isNL(r):
+ return lx.errorf("newlines not allowed within inline tables")
+ case r == commentStart:
+ lx.push(lexInlineTableValue)
+ return lexCommentStart
+ case r == comma:
+ return lx.errorf("unexpected comma")
+ case r == inlineTableEnd:
+ return lexInlineTableEnd
+ }
+ lx.backup()
+ lx.push(lexInlineTableValueEnd)
+ return lexKeyStart
+}
+
+// lexInlineTableValueEnd consumes everything between the end of an inline table
+// key/value pair and the next pair (or the end of the table):
+// it ignores whitespace and expects either a ',' or a '}'.
+func lexInlineTableValueEnd(lx *lexer) stateFn {
+ r := lx.next()
+ switch {
+ case isWhitespace(r):
+ return lexSkip(lx, lexInlineTableValueEnd)
+ case isNL(r):
+ return lx.errorf("newlines not allowed within inline tables")
+ case r == commentStart:
+ lx.push(lexInlineTableValueEnd)
+ return lexCommentStart
+ case r == comma:
+ lx.ignore()
+ return lexInlineTableValue
+ case r == inlineTableEnd:
+ return lexInlineTableEnd
+ }
+ return lx.errorf("expected a comma or an inline table terminator %q, "+
+ "but got %q instead", inlineTableEnd, r)
+}
+
+// lexInlineTableEnd finishes the lexing of an inline table.
+// It assumes that a '}' has just been consumed.
+func lexInlineTableEnd(lx *lexer) stateFn {
+ lx.ignore()
+ lx.emit(itemInlineTableEnd)
+ return lx.pop()
+}
+
// lexString consumes the inner contents of a string. It assumes that the
// beginning '"' has already been consumed and ignored.
func lexString(lx *lexer) stateFn {
r := lx.next()
switch {
+ case r == eof:
+ return lx.errorf("unexpected EOF")
case isNL(r):
- return lx.errorf("Strings cannot contain new lines.")
+ return lx.errorf("strings cannot contain newlines")
case r == '\\':
lx.push(lexString)
return lexStringEscape
@@ -490,11 +598,12 @@ func lexString(lx *lexer) stateFn {
// lexMultilineString consumes the inner contents of a string. It assumes that
// the beginning '"""' has already been consumed and ignored.
func lexMultilineString(lx *lexer) stateFn {
- r := lx.next()
- switch {
- case r == '\\':
+ switch lx.next() {
+ case eof:
+ return lx.errorf("unexpected EOF")
+ case '\\':
return lexMultilineStringEscape
- case r == stringEnd:
+ case stringEnd:
if lx.accept(stringEnd) {
if lx.accept(stringEnd) {
lx.backup()
@@ -518,8 +627,10 @@ func lexMultilineString(lx *lexer) stateFn {
func lexRawString(lx *lexer) stateFn {
r := lx.next()
switch {
+ case r == eof:
+ return lx.errorf("unexpected EOF")
case isNL(r):
- return lx.errorf("Strings cannot contain new lines.")
+ return lx.errorf("strings cannot contain newlines")
case r == rawStringEnd:
lx.backup()
lx.emit(itemRawString)
@@ -531,12 +642,13 @@ func lexRawString(lx *lexer) stateFn {
}
// lexMultilineRawString consumes a raw string. Nothing can be escaped in such
-// a string. It assumes that the beginning "'" has already been consumed and
+// a string. It assumes that the beginning "'''" has already been consumed and
// ignored.
func lexMultilineRawString(lx *lexer) stateFn {
- r := lx.next()
- switch {
- case r == rawStringEnd:
+ switch lx.next() {
+ case eof:
+ return lx.errorf("unexpected EOF")
+ case rawStringEnd:
if lx.accept(rawStringEnd) {
if lx.accept(rawStringEnd) {
lx.backup()
@@ -560,13 +672,11 @@ func lexMultilineRawString(lx *lexer) stateFn {
func lexMultilineStringEscape(lx *lexer) stateFn {
// Handle the special case first:
if isNL(lx.next()) {
- lx.next()
return lexMultilineString
- } else {
- lx.backup()
- lx.push(lexMultilineString)
- return lexStringEscape(lx)
}
+ lx.backup()
+ lx.push(lexMultilineString)
+ return lexStringEscape(lx)
}
func lexStringEscape(lx *lexer) stateFn {
@@ -591,10 +701,9 @@ func lexStringEscape(lx *lexer) stateFn {
case 'U':
return lexLongUnicodeEscape
}
- return lx.errorf("Invalid escape character %q. Only the following "+
+ return lx.errorf("invalid escape character %q; only the following "+
"escape characters are allowed: "+
- "\\b, \\t, \\n, \\f, \\r, \\\", \\/, \\\\, "+
- "\\uXXXX and \\UXXXXXXXX.", r)
+ `\b, \t, \n, \f, \r, \", \\, \uXXXX, and \UXXXXXXXX`, r)
}
func lexShortUnicodeEscape(lx *lexer) stateFn {
@@ -602,8 +711,8 @@ func lexShortUnicodeEscape(lx *lexer) stateFn {
for i := 0; i < 4; i++ {
r = lx.next()
if !isHexadecimal(r) {
- return lx.errorf("Expected four hexadecimal digits after '\\u', "+
- "but got '%s' instead.", lx.current())
+ return lx.errorf(`expected four hexadecimal digits after '\u', `+
+ "but got %q instead", lx.current())
}
}
return lx.pop()
@@ -614,40 +723,43 @@ func lexLongUnicodeEscape(lx *lexer) stateFn {
for i := 0; i < 8; i++ {
r = lx.next()
if !isHexadecimal(r) {
- return lx.errorf("Expected eight hexadecimal digits after '\\U', "+
- "but got '%s' instead.", lx.current())
+ return lx.errorf(`expected eight hexadecimal digits after '\U', `+
+ "but got %q instead", lx.current())
}
}
return lx.pop()
}
-// lexNumberOrDateStart consumes either a (positive) integer, float or
-// datetime. It assumes that NO negative sign has been consumed.
+// lexNumberOrDateStart consumes either an integer, a float, or datetime.
func lexNumberOrDateStart(lx *lexer) stateFn {
r := lx.next()
- if !isDigit(r) {
- if r == '.' {
- return lx.errorf("Floats must start with a digit, not '.'.")
- } else {
- return lx.errorf("Expected a digit but got %q.", r)
- }
+ if isDigit(r) {
+ return lexNumberOrDate
}
- return lexNumberOrDate
+ switch r {
+ case '_':
+ return lexNumber
+ case 'e', 'E':
+ return lexFloat
+ case '.':
+ return lx.errorf("floats must start with a digit, not '.'")
+ }
+ return lx.errorf("expected a digit but got %q", r)
}
-// lexNumberOrDate consumes either a (positive) integer, float or datetime.
+// lexNumberOrDate consumes either an integer, float or datetime.
func lexNumberOrDate(lx *lexer) stateFn {
r := lx.next()
- switch {
- case r == '-':
- if lx.pos-lx.start != 5 {
- return lx.errorf("All ISO8601 dates must be in full Zulu form.")
- }
- return lexDateAfterYear
- case isDigit(r):
+ if isDigit(r) {
return lexNumberOrDate
- case r == '.':
- return lexFloatStart
+ }
+ switch r {
+ case '-':
+ return lexDatetime
+ case '_':
+ return lexNumber
+ case '.', 'e', 'E':
+ return lexFloat
}
lx.backup()
@@ -655,46 +767,34 @@ func lexNumberOrDate(lx *lexer) stateFn {
return lx.pop()
}
-// lexDateAfterYear consumes a full Zulu Datetime in ISO8601 format.
-// It assumes that "YYYY-" has already been consumed.
-func lexDateAfterYear(lx *lexer) stateFn {
- formats := []rune{
- // digits are '0'.
- // everything else is direct equality.
- '0', '0', '-', '0', '0',
- 'T',
- '0', '0', ':', '0', '0', ':', '0', '0',
- 'Z',
+// lexDatetime consumes a Datetime, to a first approximation.
+// The parser validates that it matches one of the accepted formats.
+func lexDatetime(lx *lexer) stateFn {
+ r := lx.next()
+ if isDigit(r) {
+ return lexDatetime
}
- for _, f := range formats {
- r := lx.next()
- if f == '0' {
- if !isDigit(r) {
- return lx.errorf("Expected digit in ISO8601 datetime, "+
- "but found %q instead.", r)
- }
- } else if f != r {
- return lx.errorf("Expected %q in ISO8601 datetime, "+
- "but found %q instead.", f, r)
- }
+ switch r {
+ case '-', 'T', ':', '.', 'Z':
+ return lexDatetime
}
+
+ lx.backup()
lx.emit(itemDatetime)
return lx.pop()
}
-// lexNumberStart consumes either an integer or a float. It assumes that
-// a negative sign has already been read, but that *no* digits have been
-// consumed. lexNumberStart will move to the appropriate integer or float
-// states.
+// lexNumberStart consumes either an integer or a float. It assumes that a sign
+// has already been read, but that *no* digits have been consumed.
+// lexNumberStart will move to the appropriate integer or float states.
func lexNumberStart(lx *lexer) stateFn {
- // we MUST see a digit. Even floats have to start with a digit.
+ // We MUST see a digit. Even floats have to start with a digit.
r := lx.next()
if !isDigit(r) {
if r == '.' {
- return lx.errorf("Floats must start with a digit, not '.'.")
- } else {
- return lx.errorf("Expected a digit but got %q.", r)
+ return lx.errorf("floats must start with a digit, not '.'")
}
+ return lx.errorf("expected a digit but got %q", r)
}
return lexNumber
}
@@ -702,11 +802,14 @@ func lexNumberStart(lx *lexer) stateFn {
// lexNumber consumes an integer or a float after seeing the first digit.
func lexNumber(lx *lexer) stateFn {
r := lx.next()
- switch {
- case isDigit(r):
+ if isDigit(r) {
return lexNumber
- case r == '.':
- return lexFloatStart
+ }
+ switch r {
+ case '_':
+ return lexNumber
+ case '.', 'e', 'E':
+ return lexFloat
}
lx.backup()
@@ -714,60 +817,42 @@ func lexNumber(lx *lexer) stateFn {
return lx.pop()
}
-// lexFloatStart starts the consumption of digits of a float after a '.'.
-// Namely, at least one digit is required.
-func lexFloatStart(lx *lexer) stateFn {
- r := lx.next()
- if !isDigit(r) {
- return lx.errorf("Floats must have a digit after the '.', but got "+
- "%q instead.", r)
- }
- return lexFloat
-}
-
-// lexFloat consumes the digits of a float after a '.'.
-// Assumes that one digit has been consumed after a '.' already.
+// lexFloat consumes the elements of a float. It allows any sequence of
+// float-like characters, so floats emitted by the lexer are only a first
+// approximation and must be validated by the parser.
func lexFloat(lx *lexer) stateFn {
r := lx.next()
if isDigit(r) {
return lexFloat
}
+ switch r {
+ case '_', '.', '-', '+', 'e', 'E':
+ return lexFloat
+ }
lx.backup()
lx.emit(itemFloat)
return lx.pop()
}
-// lexConst consumes the s[1:] in s. It assumes that s[0] has already been
-// consumed.
-func lexConst(lx *lexer, s string) stateFn {
- for i := range s[1:] {
- if r := lx.next(); r != rune(s[i+1]) {
- return lx.errorf("Expected %q, but found %q instead.", s[:i+1],
- s[:i]+string(r))
+// lexBool consumes a bool string: 'true' or 'false.
+func lexBool(lx *lexer) stateFn {
+ var rs []rune
+ for {
+ r := lx.next()
+ if !unicode.IsLetter(r) {
+ lx.backup()
+ break
}
+ rs = append(rs, r)
}
- return nil
-}
-
-// lexTrue consumes the "rue" in "true". It assumes that 't' has already
-// been consumed.
-func lexTrue(lx *lexer) stateFn {
- if fn := lexConst(lx, "true"); fn != nil {
- return fn
+ s := string(rs)
+ switch s {
+ case "true", "false":
+ lx.emit(itemBool)
+ return lx.pop()
}
- lx.emit(itemBool)
- return lx.pop()
-}
-
-// lexFalse consumes the "alse" in "false". It assumes that 'f' has already
-// been consumed.
-func lexFalse(lx *lexer) stateFn {
- if fn := lexConst(lx, "false"); fn != nil {
- return fn
- }
- lx.emit(itemBool)
- return lx.pop()
+ return lx.errorf("expected value but found %q instead", s)
}
// lexCommentStart begins the lexing of a comment. It will emit
@@ -779,7 +864,7 @@ func lexCommentStart(lx *lexer) stateFn {
}
// lexComment lexes an entire comment. It assumes that '#' has been consumed.
-// It will consume *up to* the first new line character, and pass control
+// It will consume *up to* the first newline character, and pass control
// back to the last state on the stack.
func lexComment(lx *lexer) stateFn {
r := lx.peek()
@@ -837,13 +922,7 @@ func (itype itemType) String() string {
return "EOF"
case itemText:
return "Text"
- case itemString:
- return "String"
- case itemRawString:
- return "String"
- case itemMultilineString:
- return "String"
- case itemRawMultilineString:
+ case itemString, itemRawString, itemMultilineString, itemRawMultilineString:
return "String"
case itemBool:
return "Bool"
diff --git a/vendor/github.com/BurntSushi/toml/parse.go b/vendor/github.com/BurntSushi/toml/parse.go
index c6069be1f17..50869ef9266 100644
--- a/vendor/github.com/BurntSushi/toml/parse.go
+++ b/vendor/github.com/BurntSushi/toml/parse.go
@@ -2,7 +2,6 @@ package toml
import (
"fmt"
- "log"
"strconv"
"strings"
"time"
@@ -81,7 +80,7 @@ func (p *parser) next() item {
}
func (p *parser) bug(format string, v ...interface{}) {
- log.Fatalf("BUG: %s\n\n", fmt.Sprintf(format, v...))
+ panic(fmt.Sprintf("BUG: "+format+"\n\n", v...))
}
func (p *parser) expect(typ itemType) item {
@@ -179,10 +178,18 @@ func (p *parser) value(it item) (interface{}, tomlType) {
}
p.bug("Expected boolean value, but got '%s'.", it.val)
case itemInteger:
- num, err := strconv.ParseInt(it.val, 10, 64)
+ if !numUnderscoresOK(it.val) {
+ p.panicf("Invalid integer %q: underscores must be surrounded by digits",
+ it.val)
+ }
+ val := strings.Replace(it.val, "_", "", -1)
+ num, err := strconv.ParseInt(val, 10, 64)
if err != nil {
- // See comment below for floats describing why we make a
- // distinction between a bug and a user error.
+ // Distinguish integer values. Normally, it'd be a bug if the lexer
+ // provides an invalid integer, but it's possible that the number is
+ // out of range of valid values (which the lexer cannot determine).
+ // So mark the former as a bug but the latter as a legitimate user
+ // error.
if e, ok := err.(*strconv.NumError); ok &&
e.Err == strconv.ErrRange {
@@ -194,29 +201,57 @@ func (p *parser) value(it item) (interface{}, tomlType) {
}
return num, p.typeOfPrimitive(it)
case itemFloat:
- num, err := strconv.ParseFloat(it.val, 64)
+ parts := strings.FieldsFunc(it.val, func(r rune) bool {
+ switch r {
+ case '.', 'e', 'E':
+ return true
+ }
+ return false
+ })
+ for _, part := range parts {
+ if !numUnderscoresOK(part) {
+ p.panicf("Invalid float %q: underscores must be "+
+ "surrounded by digits", it.val)
+ }
+ }
+ if !numPeriodsOK(it.val) {
+ // As a special case, numbers like '123.' or '1.e2',
+ // which are valid as far as Go/strconv are concerned,
+ // must be rejected because TOML says that a fractional
+ // part consists of '.' followed by 1+ digits.
+ p.panicf("Invalid float %q: '.' must be followed "+
+ "by one or more digits", it.val)
+ }
+ val := strings.Replace(it.val, "_", "", -1)
+ num, err := strconv.ParseFloat(val, 64)
if err != nil {
- // Distinguish float values. Normally, it'd be a bug if the lexer
- // provides an invalid float, but it's possible that the float is
- // out of range of valid values (which the lexer cannot determine).
- // So mark the former as a bug but the latter as a legitimate user
- // error.
- //
- // This is also true for integers.
if e, ok := err.(*strconv.NumError); ok &&
e.Err == strconv.ErrRange {
p.panicf("Float '%s' is out of the range of 64-bit "+
"IEEE-754 floating-point numbers.", it.val)
} else {
- p.bug("Expected float value, but got '%s'.", it.val)
+ p.panicf("Invalid float value: %q", it.val)
}
}
return num, p.typeOfPrimitive(it)
case itemDatetime:
- t, err := time.Parse("2006-01-02T15:04:05Z", it.val)
- if err != nil {
- p.bug("Expected Zulu formatted DateTime, but got '%s'.", it.val)
+ var t time.Time
+ var ok bool
+ var err error
+ for _, format := range []string{
+ "2006-01-02T15:04:05Z07:00",
+ "2006-01-02T15:04:05",
+ "2006-01-02",
+ } {
+ t, err = time.ParseInLocation(format, it.val, time.Local)
+ if err == nil {
+ ok = true
+ break
+ }
+ }
+ if !ok {
+ p.panicf("Invalid TOML Datetime: %q.", it.val)
}
return t, p.typeOfPrimitive(it)
case itemArray:
@@ -234,11 +269,75 @@ func (p *parser) value(it item) (interface{}, tomlType) {
types = append(types, typ)
}
return array, p.typeOfArray(types)
+ case itemInlineTableStart:
+ var (
+ hash = make(map[string]interface{})
+ outerContext = p.context
+ outerKey = p.currentKey
+ )
+
+ p.context = append(p.context, p.currentKey)
+ p.currentKey = ""
+ for it := p.next(); it.typ != itemInlineTableEnd; it = p.next() {
+ if it.typ != itemKeyStart {
+ p.bug("Expected key start but instead found %q, around line %d",
+ it.val, p.approxLine)
+ }
+ if it.typ == itemCommentStart {
+ p.expect(itemText)
+ continue
+ }
+
+ // retrieve key
+ k := p.next()
+ p.approxLine = k.line
+ kname := p.keyString(k)
+
+ // retrieve value
+ p.currentKey = kname
+ val, typ := p.value(p.next())
+ // make sure we keep metadata up to date
+ p.setType(kname, typ)
+ p.ordered = append(p.ordered, p.context.add(p.currentKey))
+ hash[kname] = val
+ }
+ p.context = outerContext
+ p.currentKey = outerKey
+ return hash, tomlHash
}
p.bug("Unexpected value type: %s", it.typ)
panic("unreachable")
}
+// numUnderscoresOK checks whether each underscore in s is surrounded by
+// characters that are not underscores.
+func numUnderscoresOK(s string) bool {
+ accept := false
+ for _, r := range s {
+ if r == '_' {
+ if !accept {
+ return false
+ }
+ accept = false
+ continue
+ }
+ accept = true
+ }
+ return accept
+}
+
+// numPeriodsOK checks whether every period in s is followed by a digit.
+func numPeriodsOK(s string) bool {
+ period := false
+ for _, r := range s {
+ if period && !isDigit(r) {
+ return false
+ }
+ period = r == '.'
+ }
+ return !period
+}
+
// establishContext sets the current context of the parser,
// where the context is either a hash or an array of hashes. Which one is
// set depends on the value of the `array` parameter.
@@ -401,7 +500,7 @@ func stripFirstNewline(s string) string {
if len(s) == 0 || s[0] != '\n' {
return s
}
- return s[1:len(s)]
+ return s[1:]
}
func stripEscapedWhitespace(s string) string {
@@ -481,12 +580,7 @@ func (p *parser) asciiEscapeToUnicode(bs []byte) rune {
p.bug("Could not parse '%s' as a hexadecimal number, but the "+
"lexer claims it's OK: %s", s, err)
}
-
- // BUG(burntsushi)
- // I honestly don't understand how this works. I can't seem
- // to find a way to make this fail. I figured this would fail on invalid
- // UTF-8 characters like U+DCFF, but it doesn't.
- if !utf8.ValidString(string(rune(hex))) {
+ if !utf8.ValidRune(rune(hex)) {
p.panicf("Escaped character '\\u%s' is not valid UTF-8.", s)
}
return rune(hex)
diff --git a/vendor/github.com/BurntSushi/toml/type_fields.go b/vendor/github.com/BurntSushi/toml/type_fields.go
index 7592f87a454..608997c22f6 100644
--- a/vendor/github.com/BurntSushi/toml/type_fields.go
+++ b/vendor/github.com/BurntSushi/toml/type_fields.go
@@ -92,11 +92,11 @@ func typeFields(t reflect.Type) []field {
// Scan f.typ for fields to include.
for i := 0; i < f.typ.NumField(); i++ {
sf := f.typ.Field(i)
- if sf.PkgPath != "" { // unexported
+ if sf.PkgPath != "" && !sf.Anonymous { // unexported
continue
}
- name := sf.Tag.Get("toml")
- if name == "-" {
+ opts := getOptions(sf.Tag)
+ if opts.skip {
continue
}
index := make([]int, len(f.index)+1)
@@ -110,8 +110,9 @@ func typeFields(t reflect.Type) []field {
}
// Record found field and index sequence.
- if name != "" || !sf.Anonymous || ft.Kind() != reflect.Struct {
- tagged := name != ""
+ if opts.name != "" || !sf.Anonymous || ft.Kind() != reflect.Struct {
+ tagged := opts.name != ""
+ name := opts.name
if name == "" {
name = sf.Name
}
diff --git a/vendor/github.com/Unknwon/com/.gitignore b/vendor/github.com/Unknwon/com/.gitignore
new file mode 100644
index 00000000000..0da157fe9ce
--- /dev/null
+++ b/vendor/github.com/Unknwon/com/.gitignore
@@ -0,0 +1,24 @@
+# Compiled Object files, Static and Dynamic libs (Shared Objects)
+*.o
+*.a
+*.so
+
+# Folders
+_obj
+_test
+.idea
+
+# Architecture specific extensions/prefixes
+*.[568vq]
+[568vq].out
+
+*.cgo1.go
+*.cgo2.c
+_cgo_defun.c
+_cgo_gotypes.go
+_cgo_export.*
+
+_testmain.go
+
+*.exe
+*.iml
diff --git a/vendor/github.com/Unknwon/com/convert.go b/vendor/github.com/Unknwon/com/convert.go
index 25b3e0e5620..bf24aa8bc30 100644
--- a/vendor/github.com/Unknwon/com/convert.go
+++ b/vendor/github.com/Unknwon/com/convert.go
@@ -41,6 +41,11 @@ func (f StrTo) Int64() (int64, error) {
return int64(v), err
}
+func (f StrTo) Float64() (float64, error) {
+ v, err := strconv.ParseFloat(f.String(), 64)
+ return float64(v), err
+}
+
func (f StrTo) MustUint8() uint8 {
v, _ := f.Uint8()
return v
@@ -56,6 +61,11 @@ func (f StrTo) MustInt64() int64 {
return v
}
+func (f StrTo) MustFloat64() float64 {
+ v, _ := f.Float64()
+ return v
+}
+
func (f StrTo) String() string {
if f.Exist() {
return string(f)
diff --git a/vendor/github.com/Unknwon/com/testdata/SaveFile.txt b/vendor/github.com/Unknwon/com/testdata/SaveFile.txt
deleted file mode 100644
index 0547fc82637..00000000000
--- a/vendor/github.com/Unknwon/com/testdata/SaveFile.txt
+++ /dev/null
@@ -1 +0,0 @@
-TestSaveFile
\ No newline at end of file
diff --git a/vendor/github.com/Unknwon/com/testdata/SaveFileS.txt b/vendor/github.com/Unknwon/com/testdata/SaveFileS.txt
deleted file mode 100644
index dfc332539f7..00000000000
--- a/vendor/github.com/Unknwon/com/testdata/SaveFileS.txt
+++ /dev/null
@@ -1 +0,0 @@
-TestSaveFileS
\ No newline at end of file
diff --git a/vendor/github.com/Unknwon/com/testdata/statDir/SaveFile.txt b/vendor/github.com/Unknwon/com/testdata/statDir/SaveFile.txt
deleted file mode 100644
index 0547fc82637..00000000000
--- a/vendor/github.com/Unknwon/com/testdata/statDir/SaveFile.txt
+++ /dev/null
@@ -1 +0,0 @@
-TestSaveFile
\ No newline at end of file
diff --git a/vendor/github.com/Unknwon/com/testdata/statDir/SaveFileS.txt b/vendor/github.com/Unknwon/com/testdata/statDir/SaveFileS.txt
deleted file mode 100644
index dfc332539f7..00000000000
--- a/vendor/github.com/Unknwon/com/testdata/statDir/SaveFileS.txt
+++ /dev/null
@@ -1 +0,0 @@
-TestSaveFileS
\ No newline at end of file
diff --git a/vendor/github.com/Unknwon/com/testdata/statDir/secondLevel/SaveFile.txt b/vendor/github.com/Unknwon/com/testdata/statDir/secondLevel/SaveFile.txt
deleted file mode 100644
index 0547fc82637..00000000000
--- a/vendor/github.com/Unknwon/com/testdata/statDir/secondLevel/SaveFile.txt
+++ /dev/null
@@ -1 +0,0 @@
-TestSaveFile
\ No newline at end of file
diff --git a/vendor/github.com/Unknwon/com/testdata/statDir/secondLevel/SaveFileS.txt b/vendor/github.com/Unknwon/com/testdata/statDir/secondLevel/SaveFileS.txt
deleted file mode 100644
index dfc332539f7..00000000000
--- a/vendor/github.com/Unknwon/com/testdata/statDir/secondLevel/SaveFileS.txt
+++ /dev/null
@@ -1 +0,0 @@
-TestSaveFileS
\ No newline at end of file
diff --git a/vendor/github.com/Unknwon/com/testdata/statDir/secondLevel/sample_file.txt b/vendor/github.com/Unknwon/com/testdata/statDir/secondLevel/sample_file.txt
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/vendor/github.com/apache/thrift/.clang-format b/vendor/github.com/apache/thrift/.clang-format
new file mode 100644
index 00000000000..a62eef8576c
--- /dev/null
+++ b/vendor/github.com/apache/thrift/.clang-format
@@ -0,0 +1,56 @@
+---
+Language: Cpp
+# BasedOnStyle: LLVM
+AccessModifierOffset: -2
+ConstructorInitializerIndentWidth: 2
+AlignEscapedNewlinesLeft: false
+AlignTrailingComments: true
+AllowAllParametersOfDeclarationOnNextLine: false
+AllowShortBlocksOnASingleLine: false
+AllowShortIfStatementsOnASingleLine: false
+AllowShortLoopsOnASingleLine: false
+AllowShortFunctionsOnASingleLine: Inline
+AlwaysBreakTemplateDeclarations: true
+AlwaysBreakBeforeMultilineStrings: true
+BreakBeforeBinaryOperators: true
+BreakBeforeTernaryOperators: true
+BreakConstructorInitializersBeforeComma: false
+BinPackParameters: false
+ColumnLimit: 100
+ConstructorInitializerAllOnOneLineOrOnePerLine: true
+DerivePointerAlignment: false
+IndentCaseLabels: false
+IndentWrappedFunctionNames: false
+IndentFunctionDeclarationAfterType: false
+MaxEmptyLinesToKeep: 1
+KeepEmptyLinesAtTheStartOfBlocks: true
+NamespaceIndentation: None
+ObjCSpaceAfterProperty: false
+ObjCSpaceBeforeProtocolList: true
+PenaltyBreakBeforeFirstCallParameter: 190
+PenaltyBreakComment: 300
+PenaltyBreakString: 10000
+PenaltyBreakFirstLessLess: 120
+PenaltyExcessCharacter: 1000000
+PenaltyReturnTypeOnItsOwnLine: 1200
+PointerAlignment: Left
+SpacesBeforeTrailingComments: 1
+Cpp11BracedListStyle: true
+Standard: Auto
+IndentWidth: 2
+TabWidth: 4
+UseTab: Never
+BreakBeforeBraces: Attach
+SpacesInParentheses: false
+SpacesInAngles: false
+SpaceInEmptyParentheses: false
+SpacesInCStyleCastParentheses: false
+SpacesInContainerLiterals: true
+SpaceBeforeAssignmentOperators: true
+ContinuationIndentWidth: 4
+CommentPragmas: '^ IWYU pragma:'
+ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
+SpaceBeforeParens: ControlStatements
+DisableFormat: false
+...
+
diff --git a/vendor/github.com/apache/thrift/.dockerignore b/vendor/github.com/apache/thrift/.dockerignore
new file mode 100644
index 00000000000..2d2ecd68da8
--- /dev/null
+++ b/vendor/github.com/apache/thrift/.dockerignore
@@ -0,0 +1 @@
+.git/
diff --git a/vendor/github.com/apache/thrift/.gitattributes b/vendor/github.com/apache/thrift/.gitattributes
new file mode 100644
index 00000000000..176a458f94e
--- /dev/null
+++ b/vendor/github.com/apache/thrift/.gitattributes
@@ -0,0 +1 @@
+* text=auto
diff --git a/vendor/github.com/apache/thrift/.gitignore b/vendor/github.com/apache/thrift/.gitignore
new file mode 100644
index 00000000000..140c93b003f
--- /dev/null
+++ b/vendor/github.com/apache/thrift/.gitignore
@@ -0,0 +1,326 @@
+# generic ignores
+*.la
+*.lo
+*.o
+*.deps
+*.dirstamp
+*.libs
+*.log
+*.trs
+*.suo
+*.pyc
+*.cache
+*.user
+*.ipch
+*.sdf
+*.jar
+*.exe
+*.dll
+*_ReSharper*
+*.opensdf
+*.swp
+*.hi
+*~
+
+.*project
+junit*.properties
+.idea
+gen-*
+Makefile
+Makefile.in
+aclocal.m4
+acinclude.m4
+autom4te.cache
+cmake-*
+node_modules
+compile
+test-driver
+erl_crash.dump
+
+.sonar
+.DS_Store
+.svn
+.vagrant
+
+/contrib/.vagrant/
+/aclocal/libtool.m4
+/aclocal/lt*.m4
+/autoscan.log
+/autoscan-*.log
+/cmake_*
+/compiler/cpp/compiler.VC.db
+/compiler/cpp/compiler.VC.VC.opendb
+/compiler/cpp/test/plugin/t_cpp_generator.cc
+/compiler/cpp/src/thrift/plugin/plugin_constants.cpp
+/compiler/cpp/src/thrift/plugin/plugin_constants.h
+/compiler/cpp/src/thrift/plugin/plugin_types.cpp
+/compiler/cpp/src/thrift/plugin/plugin_types.h
+/compiler/cpp/test/*test
+/compiler/cpp/test/thrift-gen-*
+/compiler/cpp/src/thrift/thrift-bootstrap
+/compiler/cpp/src/thrift/plugin/gen.stamp
+/compiler/cpp/Debug
+/compiler/cpp/Release
+/compiler/cpp/src/thrift/libparse.a
+/compiler/cpp/src/thrift/thriftl.cc
+/compiler/cpp/src/thrift/thrifty.cc
+/compiler/cpp/src/thrift/thrifty.hh
+/compiler/cpp/src/thrift/windows/version.h
+/compiler/cpp/thrift
+/compiler/cpp/thriftl.cc
+/compiler/cpp/thrifty.cc
+/compiler/cpp/lex.yythriftl.cc
+/compiler/cpp/thrifty.h
+/compiler/cpp/thrifty.hh
+/compiler/cpp/src/thrift/version.h
+/config.*
+/configure
+/configure.lineno
+/configure.scan
+/contrib/fb303/config.cache
+/contrib/fb303/config.log
+/contrib/fb303/config.status
+/contrib/fb303/configure
+/contrib/fb303/cpp/libfb303.a
+/contrib/fb303/java/build/
+/contrib/fb303/py/build/
+/contrib/fb303/py/fb303/FacebookService-remote
+/contrib/fb303/py/fb303/FacebookService.py
+/contrib/fb303/py/fb303/__init__.py
+/contrib/fb303/py/fb303/constants.py
+/contrib/fb303/py/fb303/ttypes.py
+/depcomp
+/install-sh
+/lib/cpp/Debug/
+/lib/cpp/Debug-mt/
+/lib/cpp/Release/
+/lib/cpp/Release-mt/
+/lib/cpp/src/thrift/qt/moc_TQTcpServer.cpp
+/lib/cpp/src/thrift/qt/moc__TQTcpServer.cpp
+/lib/cpp/src/thrift/config.h
+/lib/cpp/src/thrift/stamp-h2
+/lib/cpp/test/Benchmark
+/lib/cpp/test/AllProtocolsTest
+/lib/cpp/test/DebugProtoTest
+/lib/cpp/test/DenseProtoTest
+/lib/cpp/test/EnumTest
+/lib/cpp/test/JSONProtoTest
+/lib/cpp/test/OptionalRequiredTest
+/lib/cpp/test/SecurityTest
+/lib/cpp/test/SpecializationTest
+/lib/cpp/test/ReflectionTest
+/lib/cpp/test/RecursiveTest
+/lib/cpp/test/TFDTransportTest
+/lib/cpp/test/TFileTransportTest
+/lib/cpp/test/TInterruptTest
+/lib/cpp/test/TNonblockingServerTest
+/lib/cpp/test/TPipedTransportTest
+/lib/cpp/test/TServerIntegrationTest
+/lib/cpp/test/TSocketInterruptTest
+/lib/cpp/test/TransportTest
+/lib/cpp/test/UnitTests
+/lib/cpp/test/ZlibTest
+/lib/cpp/test/OpenSSLManualInitTest
+/lib/cpp/test/concurrency_test
+/lib/cpp/test/link_test
+/lib/cpp/test/processor_test
+/lib/cpp/test/tests.xml
+/lib/cpp/concurrency_test
+/lib/cpp/*.pc
+/lib/cpp/x64/Debug/
+/lib/cpp/x64/Debug-mt/
+/lib/cpp/x64/Release
+/lib/cpp/x64/Release-mt
+/lib/c_glib/*.gcda
+/lib/c_glib/*.gcno
+/lib/c_glib/*.loT
+/lib/c_glib/src/thrift/config.h
+/lib/c_glib/src/thrift/stamp-h3
+/lib/c_glib/test/*.gcno
+/lib/c_glib/test/testwrapper.sh
+/lib/c_glib/test/testwrapper-test*
+/lib/c_glib/test/testapplicationexception
+/lib/c_glib/test/testbinaryprotocol
+/lib/c_glib/test/testcompactprotocol
+/lib/c_glib/test/testbufferedtransport
+/lib/c_glib/test/testcontainertest
+/lib/c_glib/test/testdebugproto
+/lib/c_glib/test/testfdtransport
+/lib/c_glib/test/testframedtransport
+/lib/c_glib/test/testmemorybuffer
+/lib/c_glib/test/testoptionalrequired
+/lib/c_glib/test/testsimpleserver
+/lib/c_glib/test/teststruct
+/lib/c_glib/test/testthrifttest
+/lib/c_glib/test/testthrifttestclient
+/lib/c_glib/test/testtransportsocket
+/lib/c_glib/test/testserialization
+/lib/c_glib/thriftc.pc
+/lib/c_glib/thrift_c_glib.pc
+/lib/csharp/**/bin/
+/lib/csharp/**/obj/
+/lib/csharp/src/packages
+/lib/d/test/*.pem
+/lib/d/libthriftd*.a
+/lib/d/test/async_test
+/lib/d/test/client_pool_test
+/lib/d/test/serialization_benchmark
+/lib/d/test/stress_test_server
+/lib/d/test/thrift_test_client
+/lib/d/test/thrift_test_server
+/lib/d/test/transport_test
+/lib/d/unittest/
+/lib/dart/coverage
+/lib/dart/**/.packages
+/lib/dart/**/packages
+/lib/dart/**/.pub/
+/lib/dart/**/pubspec.lock
+/lib/delphi/src/*.dcu
+/lib/delphi/test/*.identcache
+/lib/delphi/test/*.local
+/lib/delphi/test/*.dcu
+/lib/delphi/test/*.2007
+/lib/delphi/test/*.dproj
+/lib/delphi/test/*.dproj
+/lib/delphi/test/codegen/*.bat
+/lib/delphi/test/skip/*.local
+/lib/delphi/test/skip/*.identcache
+/lib/delphi/test/skip/*.identcache
+/lib/delphi/test/skip/*.dproj
+/lib/delphi/test/skip/*.dproj
+/lib/delphi/test/skip/*.2007
+/lib/delphi/test/serializer/*.identcache
+/lib/delphi/test/serializer/*.dproj
+/lib/delphi/test/serializer/*.local
+/lib/delphi/test/serializer/*.2007
+/lib/delphi/test/serializer/*.dcu
+/lib/delphi/test/multiplexed/*.dproj
+/lib/delphi/test/multiplexed/*.2007
+/lib/delphi/test/multiplexed/*.local
+/lib/delphi/test/multiplexed/*.identcache
+/lib/delphi/test/multiplexed/*.dcu
+/lib/delphi/test/typeregistry/*.2007
+/lib/delphi/test/typeregistry/*.dproj
+/lib/delphi/test/typeregistry/*.identcache
+/lib/delphi/test/typeregistry/*.local
+/lib/delphi/test/typeregistry/*.dcu
+/lib/erl/.generated
+/lib/erl/.eunit
+/lib/erl/ebin
+/lib/erl/deps/
+/lib/erl/src/thrift.app.src
+/lib/erl/test/*.hrl
+/lib/erl/test/*.beam
+/lib/haxe/test/bin
+/lib/hs/dist
+/lib/java/build
+/lib/js/test/build
+/lib/nodejs/coverage
+/lib/nodejs/node_modules/
+/lib/perl/MANIFEST
+/lib/perl/MYMETA.json
+/lib/perl/MYMETA.yml
+/lib/perl/Makefile-perl.mk
+/lib/perl/blib
+/lib/perl/pm_to_blib
+/lib/py/build
+/lib/py/thrift.egg-info/
+/lib/rb/Gemfile.lock
+/lib/rb/debug_proto_test
+/lib/rb/.config
+/lib/rb/ext/conftest.dSYM/
+/lib/rb/ext/mkmf.log
+/lib/rb/ext/thrift_native.bundle
+/lib/rb/ext/thrift_native.so
+/lib/rb/test/
+/lib/rb/thrift-*.gem
+/lib/php/src/ext/thrift_protocol/Makefile.*
+/lib/php/src/ext/thrift_protocol/build/
+/lib/php/src/ext/thrift_protocol/config.*
+/lib/php/src/ext/thrift_protocol/configure
+/lib/php/src/ext/thrift_protocol/configure.in
+/lib/php/src/ext/thrift_protocol/install-sh
+/lib/php/src/ext/thrift_protocol/libtool
+/lib/php/src/ext/thrift_protocol/ltmain.sh
+/lib/php/src/ext/thrift_protocol/missing
+/lib/php/src/ext/thrift_protocol/mkinstalldirs
+/lib/php/src/ext/thrift_protocol/modules/
+/lib/php/src/ext/thrift_protocol/php_thrift_protocol.lo
+/lib/php/src/ext/thrift_protocol/run-tests.php
+/lib/php/src/ext/thrift_protocol/thrift_protocol.la
+/lib/php/src/ext/thrift_protocol/tmp-php.ini
+/lib/php/src/packages/
+/lib/php/test/TEST-*.xml
+/lib/php/test/packages/
+/lib/py/dist/
+/lib/erl/logs/
+/lib/go/test/gopath/
+/lib/go/test/ThriftTest.thrift
+/libtool
+/ltmain.sh
+/missing
+/node_modules/
+/stamp-h1
+/test/features/results.json
+/test/results.json
+/test/c_glib/test_client
+/test/c_glib/test_server
+/test/cpp/StressTest
+/test/cpp/StressTestNonBlocking
+/test/cpp/TestClient
+/test/cpp/TestServer
+/test/dart/**/.packages
+/test/dart/**/packages
+/test/dart/**/.pub/
+/test/dart/**/pubspec.lock
+/test/log/
+/test/test.log
+/test/erl/.generated
+/test/erl/ebin
+/test/go/bin/
+/test/go/ThriftTest.thrift
+/test/go/gopath
+/test/go/pkg/
+/test/go/src/code.google.com/
+/test/go/src/github.com/golang/
+/test/go/src/gen/
+/test/go/src/thrift
+/test/haxe/bin
+/test/hs/TestClient
+/test/hs/TestServer
+/test/py.twisted/_trial_temp/
+/test/rb/Gemfile.lock
+/tutorial/cpp/TutorialClient
+/tutorial/cpp/TutorialServer
+/tutorial/c_glib/tutorial_client
+/tutorial/c_glib/tutorial_server
+/tutorial/csharp/CsharpServer/obj
+/tutorial/csharp/CsharpServer/bin
+/tutorial/csharp/CsharpClient/obj
+/tutorial/csharp/CsharpClient/bin
+/tutorial/d/async_client
+/tutorial/d/client
+/tutorial/d/server
+/tutorial/dart/**/.packages
+/tutorial/dart/**/packages
+/tutorial/dart/**/.pub/
+/tutorial/dart/**/pubspec.lock
+/tutorial/delphi/*.dsk
+/tutorial/delphi/*.local
+/tutorial/delphi/*.tvsconfig
+/tutorial/delphi/DelphiClient/dcu
+/tutorial/delphi/DelphiServer/dcu
+/tutorial/delphi/DelphiClient/*.local
+/tutorial/delphi/DelphiClient/*.identcache
+/tutorial/delphi/DelphiServer/*.identcache
+/tutorial/delphi/DelphiServer/*.local
+/tutorial/go/go-tutorial
+/tutorial/go/calculator-remote
+/tutorial/go/src/shared
+/tutorial/go/src/tutorial
+/tutorial/go/src/git.apache.org
+/tutorial/haxe/bin
+/tutorial/hs/dist/
+/tutorial/java/build/
+/tutorial/js/build/
+/ylwrap
diff --git a/vendor/github.com/apache/thrift/CHANGES b/vendor/github.com/apache/thrift/CHANGES
new file mode 100644
index 00000000000..7b674d6f658
--- /dev/null
+++ b/vendor/github.com/apache/thrift/CHANGES
@@ -0,0 +1,2366 @@
+Apache Thrift Changelog
+
+Thrift 0.10.0
+--------------------------------------------------------------------------------
+## Bug
+ * [THRIFT-1840] - Thrift Generated Code Causes Global Variable Leaks
+ * [THRIFT-1828] - moc_TQTcpServer.cpp was removed from source tree but is in thrift-0.9.0.tar.gz
+ * [THRIFT-1790] - cocoa: Duplicate interface definition error
+ * [THRIFT-1776] - TPipeServer should implement "listen", so that TServerEventHandler preServe will work right
+ * [THRIFT-1351] - Compiler does not care about binary strings
+ * [THRIFT-1229] - Python fastbinary.c can not handle unicode as generated python code
+ * [THRIFT-749] - C++ TBufferedTransports do not flush their buffers on delete
+ * [THRIFT-747] - C++ TSocket->close calls shutdown breaking forked parent process
+ * [THRIFT-732] - server exits abnormally when client calls send_xxx function without calling recv_xxx function
+ * [THRIFT-3942] - TSSLSocket does not honor send and receive timeouts
+ * [THRIFT-3941] - WinXP version of thrift_poll() relies on undefined behavior by passing a destructed variable to select()
+ * [THRIFT-3940] - Visual Studio project file for compiler is broken
+ * [THRIFT-3943] - Coverity Scan identified some high severity defects
+ * [THRIFT-3929] - PHP "nsglobal" Option Results in Syntax Error in Generated Code (Trailing Backslash)
+ * [THRIFT-3936] - Cannot compile 0.10.0 development tip with VS2013 and earlier (snprintf, uint32_t)
+ * [THRIFT-3935] - Incorrect skipping of map and set
+ * [THRIFT-3920] - Ruby: Ensuring that HTTP failures will clear the http transport outbuf var
+ * [THRIFT-3919] - C# TTLSServerSocket does not use clientTimeout
+ * [THRIFT-3917] - Check backports.ssl_match_hostname module version
+ * [THRIFT-3909] - Fix c_glib static lib CMake build
+ * [THRIFT-3904] - Typo in node tutorial leads to wrong transport being used
+ * [THRIFT-3848] - As an implementer of a perl socket server, I do not want to have to remember to ignore SIGCHLD for it to work properly
+ * [THRIFT-3844] - thrift_protocol cannot compile in 7.0.7
+ * [THRIFT-3843] - integer issues with Haxe PHP targets cause ZigZag encoding to fail
+ * [THRIFT-3842] - Dart generates incorrect code for a const struct
+ * [THRIFT-3841] - dart compact protocol incorrectly serializes/deserialized doubles
+ * [THRIFT-3708] - NameError: global name 'TProtocol' is not defined
+ * [THRIFT-3704] - "TConnectedClient died: Could not refill buffer" message shown when using HTTP Server
+ * [THRIFT-3678] - Fix javadoc errors on JDK 8
+ * [THRIFT-3014] - AppVeyor support
+ * [THRIFT-2994] - Node.js TJSONProtocol cannot be used for object serialization.
+ * [THRIFT-2974] - writeToParcel throws NPE for optional enum fields
+ * [THRIFT-2948] - Python TJSONProtocol doesn't handle structs with binary fields containing invalid unicode.
+ * [THRIFT-2845] - ChildService.Plo: No such file or directory
+ * [THRIFT-3276] - Binary data does not decode correctly using the TJSONProtocol when the base64 encoded data is padded.
+ * [THRIFT-3253] - Using latest version of D gives deprecation notices
+ * [THRIFT-2883] - TTwisted.py, during ConnectionLost processing: exceptions.RuntimeError: dictionary changed size during iteration
+ * [THRIFT-2019] - Writing on a disconnected socket on Mac causes SIG PIPE
+ * [THRIFT-2020] - Thrift library has some empty files that haven't really been deleted
+ * [THRIFT-2049] - Go compiler doesn't build on native Windows
+ * [THRIFT-2024] - TServer.cpp warns on 64-bit platforms about truncating an rlim_t into an int
+ * [THRIFT-2023] - gettimeofday implementation on Windows errors when no time zone is passed in.
+ * [THRIFT-2022] - CoB and dense code generation still uses TR1 bind, even though that doesn't work with clang
+ * [THRIFT-2027] - Minor 64-bit and NOMINMAX issues in C++ library
+ * [THRIFT-2156] - TServerSocket::listen() is throwing exceptions with misleading information
+ * [THRIFT-2154] - Missing #deepCopy should return T
+ * [THRIFT-3157] - TBase signature should be TBase, F extends TFieldIdEnum>
+ * [THRIFT-3156] - Node TLS: server executes processing logic two full times
+ * [THRIFT-3154] - tutorial/py.tornado throw EOF exception
+ * [THRIFT-3063] - C++ build -Wunused-parameter warnings on processor_test, TransportTest
+ * [THRIFT-3056] - Add string/collection length limits for Python protocol readers
+ * [THRIFT-3237] - Fix TNamedPipeServer::createNamedPipe memory leak
+ * [THRIFT-3233] - Fix C++ ThreadManager::Impl::removeWorker worker join
+ * [THRIFT-3232] - Cannot deserialize json messages created with fieldNamesAsString
+ * [THRIFT-3206] - Fix Visual Studio build failure due 'pthread_self': identifier not found
+ * [THRIFT-3200] - JS and nodejs do not encode JSON protocol binary fields as base64
+ * [THRIFT-3199] - Exception field has basic metadata
+ * [THRIFT-3182] - TFramedTransport is in an invalid state after frame size exception
+ * [THRIFT-2536] - new TSocket, uninitialised value reported by valgrind
+ * [THRIFT-2527] - Apache Thrift IDL Compiler code generated for Node.js should be jshint clean
+ * [THRIFT-2519] - "processor" class is not being generated
+ * [THRIFT-2431] - TFileTransportTest fails with "check delta < XXX failed"
+ * [THRIFT-2708] - Erlang library does not support "oneway" message type
+ * [THRIFT-3377] - Deep copy is actually shallow when using typedef members
+ * [THRIFT-3376] - C# and Python JSON protocol double values lose precision
+ * [THRIFT-3373] - Various fixes for cross test servers and clients
+ * [THRIFT-3370] - errno extern variable redefined. Not compiling for Android
+ * [THRIFT-3379] - Potential out of range panic in Go JSON protocols
+ * [THRIFT-3371] - Abstract namespace Unix domain sockets broken in C++
+ * [THRIFT-3380] - nodejs: 0.9.2 -> 0.9.3 upgrade breaks Protocol and Transport requires
+ * [THRIFT-3367] - Fix bad links to coding_standards.md #634
+ * [THRIFT-3401] - Nested collections emit Objective-C code that cannot compile
+ * [THRIFT-3403] - JSON String reader doesn't recognize UTF-16 surrogate pairs
+ * [THRIFT-3362] - make check fails for C++ at the SecurityTest
+ * [THRIFT-3395] - Cocoa compiler produces corrupt code when boxing enums inside map.
+ * [THRIFT-3394] - compiler generates uncompilable code
+ * [THRIFT-3388] - hash doesn't work on set/list
+ * [THRIFT-3391] - Wrong bool formatting in test server
+ * [THRIFT-3390] - TTornado server doesn't handle closed connections properly
+ * [THRIFT-3382] - TBase class for C++ Library
+ * [THRIFT-3392] - Java TZlibTransport does not close its wrapper streams upon close()
+ * [THRIFT-3383] - i64 related warnings
+ * [THRIFT-3386] - misc. warnings with make check
+ * [THRIFT-3385] - warning: format ‘%lu’ expects ‘long unsigned int’, but has type ‘std::basic_string::size_type {aka unsigned int}
+ * [THRIFT-3355] - npm WARN package.json thrift@1.0.0-dev No license field.
+ * [THRIFT-3360] - Improve cross test servers and clients further
+ * [THRIFT-3359] - Binary field incompatibilities
+ * [THRIFT-3354] - Fix word-extraction substr bug in initialism code
+ * [THRIFT-3350] - Python JSON protocol does not encode binary as Base64
+ * [THRIFT-3577] - assertion failed at line 512 of testcontainertest.c
+ * [THRIFT-3576] - Boost test --log_format arg does not accept lowercase
+ * [THRIFT-3575] - Go compiler tries to use unexported library methods when using read_write_private
+ * [THRIFT-3574] - Cocoa generator makes uncompilable imports
+ * [THRIFT-3570] - Remove duplicate instances that are added by upstream
+ * [THRIFT-3571] - Make feature test result browsable
+ * [THRIFT-3569] - c_glib protocols do not check number of bytes read by transport
+ * [THRIFT-3568] - THeader server crashes on readSlow
+ * [THRIFT-3567] - GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
+ * [THRIFT-3566] - C++/Qt: TQTcpServerTest::test_communicate() is never executed
+ * [THRIFT-3564] - C++/Qt: potential core dump in TQTcpServer in case an exception occurs in TAsyncProcessor::process()
+ * [THRIFT-3558] - typos in c_glib tests
+ * [THRIFT-3559] - Fix awkward extra semi-colons with Cocoa container literals
+ * [THRIFT-3555] - 'configure' script does not honor --with-openssl= for libcrypto for BN_init
+ * [THRIFT-3554] - Constant decls may lead to "Error: internal error: prepare_member_name_mapping() already active for different struct"
+ * [THRIFT-3552] - glib_c Memory Leak
+ * [THRIFT-3551] - Thrift perl library missing package declaration
+ * [THRIFT-3549] - Exceptions are not properly stringified in Perl library
+ * [THRIFT-3546] - NodeJS code should not be namespaced (and is currently not strict-mode compliant)
+ * [THRIFT-3545] - Container type literals do not compile
+ * [THRIFT-3538] - Remove UnboundMethodType in TProtocolDecorator
+ * [THRIFT-3536] - Error 'char' does not contain a definition for 'IsLowSurrogate' for WP7 target
+ * [THRIFT-3534] - Link error when building with Qt5
+ * [THRIFT-3533] - Can not send nil pointer as service method argument
+ * [THRIFT-3507] - THttpClient does not use proxy from http_proxy, https_proxy environment variables
+ * [THRIFT-3502] - C++ TServerSocket passes small buffer to getsockname
+ * [THRIFT-3501] - Forward slash in comment causes compiler error
+ * [THRIFT-3498] - C++ library assumes optional function pthread_attr_setschedpolicy is available
+ * [THRIFT-3497] - Build fails with "invalid use of incomplete type"
+ * [THRIFT-3496] - C++: Cob style client fails when sending a consecutive request
+ * [THRIFT-3493] - libthrift does not compile on windows using visual studio
+ * [THRIFT-3488] - warning: unused variable 'program'
+ * [THRIFT-3489] - warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
+ * [THRIFT-3487] - Full support for newer Delphi versions
+ * [THRIFT-3528] - Fix warnings in thrift.ll
+ * [THRIFT-3527] - -gen py:dynamic,utf8strings ignores utf8strings option
+ * [THRIFT-3526] - Code generated by py:utf8strings does not work for Python3
+ * [THRIFT-3524] - dcc32 warning "W1000 Symbol 'IsLowSurrogate' is deprecated: 'Use TCharHelper'" in Thrift.Protocol.JSON.pas
+ * [THRIFT-3525] - py:dynamic fails to handle binary list/set/map element
+ * [THRIFT-3521] - TSimpleJSONProtocolTest is not deterministic (fails when run on JDK 8)
+ * [THRIFT-3520] - Dart TSocket onError stream should be typed as Object
+ * [THRIFT-3519] - fastbinary does not work with -gen py:utf8strings
+ * [THRIFT-3518] - TConcurrentClientSyncInfo files were missing for Visual Studio
+ * [THRIFT-3512] - c_glib: Build fails due to missing features.h
+ * [THRIFT-3483] - Incorrect empty binary handling introduced by THRIFT-3359
+ * [THRIFT-3479] - Oneway calls should not return exceptions to clients
+ * [THRIFT-3478] - Restore dropped method to THsHaServer.java
+ * [THRIFT-3477] - Parser fails on enum item that starts with 'E' letter and continues with number
+ * [THRIFT-3476] - Missing include in ./src/thrift/protocol/TJSONProtocol.cpp
+ * [THRIFT-3474] - Docker: thrift-compiler
+ * [THRIFT-3473] - When "optional' is used with a struct member, C++ server seems to not return it correctly
+ * [THRIFT-3468] - Dart TSocketTransport onError handler is too restrictive
+ * [THRIFT-3451] - thrift_protocol PHP extension missing config.m4 file
+ * [THRIFT-3456] - rounding issue in static assert
+ * [THRIFT-3455] - struct write method's return value is incorrect
+ * [THRIFT-3454] - Python Tornado tutorial is broken
+ * [THRIFT-3463] - Java can't be disabled in CMake build
+ * [THRIFT-3450] - NPE when using SSL
+ * [THRIFT-3449] - TBaseAsyncProcessor fb.responseReady() never called for oneway functions
+ * [THRIFT-3471] - Dart generator does not handle uppercase argument names
+ * [THRIFT-3470] - Sporadic timeouts with pipes
+ * [THRIFT-3465] - Go Code With Complex Const Initializer Compilation Depends On Struct Order
+ * [THRIFT-3464] - Fix several defects in c_glib code generator
+ * [THRIFT-3462] - Cocoa generates Incorrect #import header names
+ * [THRIFT-3453] - remove rat_exclude
+ * [THRIFT-3418] - Use of ciphers in ssl.wrap_socket() breaks python 2.6 compatibility
+ * [THRIFT-3417] - "namespace xsd" is not really working
+ * [THRIFT-3413] - Thrift code generation bug in Go when extending service
+ * [THRIFT-3420] - C++: TSSLSockets are not interruptable
+ * [THRIFT-3415] - include unistd.h conditionally
+ * [THRIFT-3414] - #include in THeaderTransport.h breaks windows build
+ * [THRIFT-3411] - Go generates remotes with wrong package qualifiers when including
+ * [THRIFT-3430] - Go THttpClient does not read HTTP response body to completion when closing
+ * [THRIFT-3423] - First call to thrift_transport:read_exact fails to dispatch correct function
+ * [THRIFT-3422] - Go TServerSocket doesn't close on Interrupt
+ * [THRIFT-3421] - rebar as dependency instead of bundling (was: rebar fails if PWD contains Unicode)
+ * [THRIFT-3428] - Go test fails when running make check
+ * [THRIFT-3445] - Throwable messages are hidden from JVM stack trace output
+ * [THRIFT-3443] - Thrift include can generate uncompilable code
+ * [THRIFT-3444] - Large 64 bit Integer does not preserve value through Node.js JSONProtocol
+ * [THRIFT-3436] - misc. cross test issues with UTF-8 path names
+ * [THRIFT-3435] - Put generated Java code for fullcamel tests in a separate package/namespace
+ * [THRIFT-3433] - Doubles aren't interpreted correctly
+ * [THRIFT-3437] - Mingw-w64 build fail
+ * [THRIFT-3434] - Dart generator produces empty name in pubspec.yaml for includes without namespaces
+ * [THRIFT-3408] - JSON generator emits incorrect types
+ * [THRIFT-3406] - Cocoa client should not schedule streams on main runloop
+ * [THRIFT-3404] - JSON String reader doesn't recognize UTF-16 surrogate pair
+ * [THRIFT-3636] - Double precision is not fully preserved in C++ TJSONProtocol
+ * [THRIFT-3632] - c_glib testserialization fails with glib assertion
+ * [THRIFT-3619] - Using Thrift 0.9.3 with googletest on Linux gcc 4.9 / C++11
+ * [THRIFT-3617] - CMake does not build gv/xml generators
+ * [THRIFT-3615] - Fix Python SSL client resource leak on connection failure
+ * [THRIFT-3616] - lib/py/test/test_sslsocket.py is flaky
+ * [THRIFT-3643] - Perl SSL server crushes if a client disconnect without handshake
+ * [THRIFT-3639] - C# Thrift library forces TLS 1.0, thwarting TLS 1.2 usage
+ * [THRIFT-3633] - Travis "C C++ - GCC" build was using clang
+ * [THRIFT-3634] - Fix Python TSocket resource leak on connection failure
+ * [THRIFT-3630] - Debian/Ubuntu install docs need an update
+ * [THRIFT-3629] - Parser sets exitcode on errors, but generator does not
+ * [THRIFT-3608] - lib/cpp/test/SecurityTest is flaky in jenkins Thrift-precommit build.
+ * [THRIFT-3601] - Better conformance to PEP8 for generated code
+ * [THRIFT-3599] - Validate client IP address against cert's SubjectAltName
+ * [THRIFT-3598] - TBufferedTransport doesn't instantiate client connection
+ * [THRIFT-3597] - `make check` hangs in go tests
+ * [THRIFT-3589] - Dart generator uses wrong name in constructor for uppercase arguments with defaults
+ * [THRIFT-3588] - Using TypeScript with --noImplicitAny fails
+ * [THRIFT-3584] - boolean false value cannot be transferred
+ * [THRIFT-3578] - Make THeaderTransport detect TCompact framed and unframed
+ * [THRIFT-3323] - Python library does not handle escaped forward slash ("/") in JSON
+ * [THRIFT-3322] - CMake generated "make check" failes on python_test
+ * [THRIFT-3321] - Thrift can't be added as a subdirectory of another CMake-based project
+ * [THRIFT-3314] - Dots in file names of includes causes dots in javascript variable names
+ * [THRIFT-3307] - Segfault in Ruby serializer
+ * [THRIFT-3309] - Missing TConstant.php in /lib/php/Makefile.am
+ * [THRIFT-3810] - unresolved external symbol public: virtual void __cdecl apache::thrift::server::TServerFramework::serve(void)
+ * [THRIFT-3736] - C++ library build fails if OpenSSL does not surrpot SSLv3
+ * [THRIFT-3878] - Compile error in TSSLSocket.cpp with new OpenSSL [CRYPTO_num_locks]
+ * [THRIFT-3949] - missing make dist entry for compiler/cpp/test
+ * [THRIFT-449] - The wire format of the JSON Protocol may not always be valid JSON if it contains non-UTF8 encoded strings
+ * [THRIFT-162] - Thrift structures are unhashable, preventing them from being used as set elements
+ * [THRIFT-3961] - TConnectedClient does not terminate the connection to the client if an exception while processing the received message occures.
+ * [THRIFT-3881] - Travis CI builds are failing due to docker failures (three retries, and gives up)
+ * [THRIFT-3937] - Cannot compile 0.10.0 development tip with gcc-4.6.x
+ * [THRIFT-3964] - Unsupported mechanism type ????? due to dependency on default OS-dependent charset
+ * [THRIFT-3038] - Use of volatile in cpp library
+ * [THRIFT-3301] - Java generated code uses imports that can lead to class name collisions with IDL defined types
+ * [THRIFT-3348] - PHP TCompactProtocol bool&int64 readvalue bug
+ * [THRIFT-3955] - TThreadedServer Memory Leak
+ * [THRIFT-3829] - Thrift does not install Python Libraries if Twisted is not installed
+ * [THRIFT-3932] - C++ ThreadManager has a rare termination race
+ * [THRIFT-3828] - cmake fails when Boost_INCLUDE_DIRS (and other variables passed to include_directories()) is empty
+ * [THRIFT-3958] - CMake WITH_MT option for windows static runtime linking does not support the cmake build type RelWithDebInfo
+ * [THRIFT-3957] - TConnectedClient does not disconnect from clients when their timeout is reached.
+ * [THRIFT-3953] - TSSLSocket::close should handle exceptions from waitForEvent because it is called by the destructor.
+ * [THRIFT-3977] - PHP extension creates undefined values when deserializing sets
+ * [THRIFT-3947] - sockaddr type isn't always large enough for the return of getsockname
+ * [THRIFT-2755] - ThreadSanitizer reports data race in ThreadManager::Impl::addWorker
+ * [THRIFT-3948] - errno is not the correct method of getting the error in windows
+ * [THRIFT-4008] - broken ci due to upstream dependency versioning break
+ * [THRIFT-3999] - Fix Debian & Ubuntu package dependencies
+ * [THRIFT-3886] - PHP cross test client returns 0 even when failing
+ * [THRIFT-3997] - building thrift libs does not support new openssl
+
+## Documentation
+ * [THRIFT-3867] - Specify BinaryProtocol and CompactProtocol
+
+## Epic
+ * [THRIFT-3049] - As an iOS developer, I want a generator and library that produces Swift code
+ * [THRIFT-2336] - UTF-8 sent by PHP as JSON is not understood by TJsonProtocol
+
+## Improvement
+ * [THRIFT-1867] - Python client/server should support client-side certificates.
+ * [THRIFT-1313] - c_glib compact support
+ * [THRIFT-1385] - make install doesn't install java library in the setted folder
+ * [THRIFT-1437] - Update RPM spec
+ * [THRIFT-847] - Test Framework harmonization across all languages
+ * [THRIFT-819] - add Enumeration for protocol, transport and server types
+ * [THRIFT-3927] - Emit an error instead of throw an error in the async callback
+ * [THRIFT-3931] - TSimpleServer: If process request encounter UNKNOWN_METHOD, don't close transport.
+ * [THRIFT-3934] - Automatically resolve OpenSSL binary version on Windows CI
+ * [THRIFT-3918] - Run subset of make cross
+ * [THRIFT-3908] - Remove redundant dependencies from Dockerfile
+ * [THRIFT-3907] - Skip Docker image build on CI when unchanged
+ * [THRIFT-3868] - Java struct equals should do identity check before field comparison
+ * [THRIFT-3849] - Port Go serializer and deserializer to dart
+ * [THRIFT-2989] - Complete CMake build for Apache Thrift
+ * [THRIFT-2980] - ThriftMemoryBuffer doesn't have a constructor option to take an existing buffer
+ * [THRIFT-2856] - refactor erlang basic transports and unify interfaces
+ * [THRIFT-2877] - Optimize generated hashCode
+ * [THRIFT-2869] - JSON: run schema validation from tests
+ * [THRIFT-3112] - [Java] AsyncMethodCallback should be typed in generated AsyncIface
+ * [THRIFT-3263] - PHP jsonSerialize() should cast scalar types
+ * [THRIFT-2905] - Cocoa compiler should have option to produce "modern" Objective-C
+ * [THRIFT-2821] - Enable the use of custom HTTP-Header in the Transport
+ * [THRIFT-2093] - added the ability to set compression level in C++ zlib transport
+ * [THRIFT-2089] - Compiler ignores duplicate typenames
+ * [THRIFT-2056] - Moved all #include config.h statements to #include
+ * [THRIFT-2031] - Make SO_KEEPALIVE configurable for C++ lib
+ * [THRIFT-2021] - Improve large binary protocol string performance
+ * [THRIFT-2028] - Cleanup threading headers / libraries
+ * [THRIFT-2014] - Change C++ lib includes to use style throughout
+ * [THRIFT-2312] - travis.yml: build everything
+ * [THRIFT-1915] - Multiplexing Services
+ * [THRIFT-1736] - Visual Studio top level project files within msvc
+ * [THRIFT-1735] - integrate tutorial into regular build
+ * [THRIFT-1533] - Make TTransport should be Closeable
+ * [THRIFT-35] - Move language tests into their appropriate library directory
+ * [THRIFT-1079] - Support i64 in AS3
+ * [THRIFT-1108] - SSL support for the Ruby library
+ * [THRIFT-3856] - update debian package deependencies
+ * [THRIFT-3833] - haxe http server implementation (by embeding into php web server)
+ * [THRIFT-3839] - Performance issue with big message deserialization using php extension
+ * [THRIFT-3820] - Erlang: Detect OTP >= 18 to use new time correction
+ * [THRIFT-3816] - Reduce docker build duration on Travis-CI
+ * [THRIFT-3815] - Put appveyor dependency versions to one place
+ * [THRIFT-3788] - Compatibility improvements and Win64 support
+ * [THRIFT-3792] - Timeouts for anonymous pipes should be configurable
+ * [THRIFT-3794] - Split Delphi application, protocol and transport exception subtypes into separate exceptions
+ * [THRIFT-3774] - The generated code should have exception_names meta info
+ * [THRIFT-3762] - Fix build warnings for deprecated Thrift "byte" fields
+ * [THRIFT-3756] - Improve requiredness documentation
+ * [THRIFT-3761] - Add debian package for Python3
+ * [THRIFT-3742] - haxe php cli support
+ * [THRIFT-3733] - Socket timeout improvements
+ * [THRIFT-3728] - http transport for thrift-lua
+ * [THRIFT-3905] - Dart compiler does not initialize bool, int, and double properties
+ * [THRIFT-3911] - Loosen Ruby dev dependency version requirements
+ * [THRIFT-3906] - Run C# tests with make check
+ * [THRIFT-3900] - Add Python SSL flags
+ * [THRIFT-3897] - Provide meaningful exception type based on WebExceptionStatus in case of timeout
+ * [THRIFT-3808] - Missing `DOUBLE` in thrift type enumeration
+ * [THRIFT-3803] - Remove "file" attribute from XML generator
+ * [THRIFT-3660] - Add V4 mapped address to test client cert's altname
+ * [THRIFT-3661] - Use https to download meck in erlang test build
+ * [THRIFT-3659] - Check configure result of CMake on CI
+ * [THRIFT-3667] - Add TLS SNI support to clients
+ * [THRIFT-3651] - Make backports.match_hostname and ipaddress optional
+ * [THRIFT-3666] - Build D tutorial as part of Autotools build
+ * [THRIFT-3665] - Add D libevent and OpenSSL to docker images
+ * [THRIFT-3664] - Remove md5.c
+ * [THRIFT-3662] - Add Haskell to debian docker image
+ * [THRIFT-3711] - Add D to cross language test
+ * [THRIFT-3691] - Run flake8 Python style check on Travis-CI
+ * [THRIFT-3692] - (Re)enable Appveyor C++ and Python build
+ * [THRIFT-3677] - Improve CMake Java build
+ * [THRIFT-3679] - Add stdout log to testBinary in Java test server
+ * [THRIFT-3718] - Reduce size of docker image for build environment
+ * [THRIFT-3698] - [Travis-CI] Introduce retry to apt commands
+ * [THRIFT-3127] - switch -recurse to --recurse and reserve -r
+ * [THRIFT-3087] - Pass on errors like "connection closed"
+ * [THRIFT-3240] - Thrift Python client should support subjectAltName and wildcard certs in TSSLSocket
+ * [THRIFT-3213] - make cross should indicate when it skips a known failing test
+ * [THRIFT-3208] - Fix Visual Studio solution build failure due to missing source
+ * [THRIFT-3186] - Add TServerHTTP to Go library
+ * [THRIFT-2342] - Add __FILE__ and __LINE__ to Thrift C++ excpetions
+ * [THRIFT-3372] - Add dart generator to Visual Studio project
+ * [THRIFT-3366] - ThriftTest to implement standard return values
+ * [THRIFT-3402] - Provide a perl Unix Socket implementation
+ * [THRIFT-3361] - Improve C# library
+ * [THRIFT-3393] - Introduce i8 to provide consistent set of Thrift IDL integer types
+ * [THRIFT-3339] - Support for database/sql
+ * [THRIFT-3565] - C++: T[Async]Processor::getEventHandler() should be declared as const member functions
+ * [THRIFT-3563] - C++/Qt: removed usage of macro QT_PREPEND_NAMESPACE as it isn't consequently used for all references to Qt types.
+ * [THRIFT-3562] - Removed unused TAsyncProcessor::getAsyncServer()
+ * [THRIFT-3561] - C++/Qt: make use of Q_DISABLE_COPY() to get rid of copy ctor and assignment operator
+ * [THRIFT-3556] - c_glib file descriptor transport
+ * [THRIFT-3544] - Make cross test fail when server process died unexpectedly
+ * [THRIFT-3540] - Make python tutorial more in line with PEP8
+ * [THRIFT-3535] - Dart generator argument to produce a file structure usable in parent library
+ * [THRIFT-3505] - Enhance Python TSSLSocket
+ * [THRIFT-3506] - Eliminate old style classes from library code
+ * [THRIFT-3503] - Enable py:utf8string by default
+ * [THRIFT-3499] - Add package_prefix to python generator
+ * [THRIFT-3495] - Minor enhancements and fixes for cross test
+ * [THRIFT-3486] - Java generated `getFieldValue` is incompatible with `setFieldValue` for binary values.
+ * [THRIFT-3484] - Consolidate temporary buffers in Java's TCompactProtocol
+ * [THRIFT-3516] - Add feature test for THeader TBinaryProtocol interop
+ * [THRIFT-3515] - Python 2.6 compatibility and test on CI
+ * [THRIFT-3514] - PHP 7 compatible version of binary protocol
+ * [THRIFT-3469] - Docker: Debian support
+ * [THRIFT-3416] - Retire old "xxx_namespace" declarations from the IDL
+ * [THRIFT-3426] - Align autogen comment in XSD
+ * [THRIFT-3424] - Add CMake android build option
+ * [THRIFT-3439] - Run make cross using Python3 when available
+ * [THRIFT-3440] - Python make check takes too much time
+ * [THRIFT-3441] - Stabilize Travis-CI builds
+ * [THRIFT-3431] - Avoid "schemes" HashMap lookups during struct reads/writes
+ * [THRIFT-3432] - Add a TByteBuffer transport to the Java library
+ * [THRIFT-3438] - Enable py:new_style by default
+ * [THRIFT-3405] - Go THttpClient misuses http.Client objects
+ * [THRIFT-3614] - Improve logging of test_sslsocket.py
+ * [THRIFT-3647] - Fix php extension build warnings
+ * [THRIFT-3642] - Speed up cross test runner
+ * [THRIFT-3637] - Implement compact protocol for dart
+ * [THRIFT-3613] - Port Python C extension to Python 3
+ * [THRIFT-3612] - Add Python C extension for compact protocol
+ * [THRIFT-3611] - Add --regex filter to cross test runner
+ * [THRIFT-3631] - JSON protocol implementation for Lua
+ * [THRIFT-3609] - Remove or replace TestPortFixture.h
+ * [THRIFT-3605] - Have the compiler complain about invalid arguments and options
+ * [THRIFT-3596] - Better conformance to PEP8
+ * [THRIFT-3585] - Compact protocol implementation for Lua
+ * [THRIFT-3582] - Erlang libraries should have service metadata
+ * [THRIFT-3579] - Introduce retry to make cross
+ * [THRIFT-3306] - Java: TBinaryProtocol: Use 1 temp buffer instead of allocating 8
+ * [THRIFT-3910] - Do not invoke pip as part of build process
+ * [THRIFT-1857] - Python 3.X Support
+ * [THRIFT-1944] - Binding to zero port
+ * [THRIFT-3954] - Enable the usage of structs called "Object" in Java
+ * [THRIFT-3981] - Enable analyzer strong mode in Dart library
+ * [THRIFT-3998] - Document ability to add custom tags to thrift structs
+ * [THRIFT-4006] - Add a removeEventListener method on TSocket
+
+## New Feature
+ * [THRIFT-640] - Support deprecation
+ * [THRIFT-948] - SSL socket support for PHP
+ * [THRIFT-764] - add Support for Vala language
+ * [THRIFT-3046] - Allow PSR4 class loading for generated classes (PHP)
+ * [THRIFT-2113] - Erlang SSL Socket Support
+ * [THRIFT-1482] - Unix domain socket support under PHP
+ * [THRIFT-519] - Support collections of types without having to explicitly define it
+ * [THRIFT-468] - Rack Middleware Application for Rails
+ * [THRIFT-1708] - Add event handlers for processor events
+ * [THRIFT-3834] - Erlang namespacing and exception metadata
+ * [THRIFT-2510] - Implement TNonblockingServer's ability to listen on unix domain sockets
+ * [THRIFT-3397] - Implement TProcessorFactory in C# to enable per-client processors
+ * [THRIFT-3523] - XML Generator
+ * [THRIFT-3510] - Add HttpTaskAsyncHandler implementation
+ * [THRIFT-3318] - PHP: SimpleJSONProtocol Implementation
+ * [THRIFT-3299] - Dart language bindings in Thrift
+ * [THRIFT-2835] - Add possibility to distribute generators separately from thrift core, and load them dynamically
+ * [THRIFT-184] - Add OSGi Manifest headers to the libthrift java library to be able to use Thrift in the OSGi runtime
+ * [THRIFT-141] - If a required field is not present on serialization, throw an exception
+ * [THRIFT-1891] - Add Windows ALPC transport which is right counterpart of Unix domain sockets
+
+## Question
+ * [THRIFT-1808] - The Thrift struct should be considered self-contained?
+ * [THRIFT-2895] - Tutorial cpp
+ * [THRIFT-3860] - Elephant-bird application Test fails for Thrift
+ * [THRIFT-3811] - HTTPS Support for C++ applications
+ * [THRIFT-3509] - "make check" error
+
+## Story
+ * [THRIFT-3452] - .travis.yml: Migrating from legacy to container-based infrastructure
+
+## Sub-task
+ * [THRIFT-1811] - ruby tutorial as part of the regular build
+ * [THRIFT-2779] - PHP TJSONProtocol encode unicode into UCS-4LE which can't be parsed by other language bindings
+ * [THRIFT-2110] - Erlang: Support for Multiplexing Services on any Transport, Protocol and Server
+ * [THRIFT-3852] - A Travis-CI job fails with "write error"
+ * [THRIFT-3740] - Fix haxelib.json classpath
+ * [THRIFT-3653] - incorrect union serialization
+ * [THRIFT-3652] - incorrect serialization of optionals
+ * [THRIFT-3655] - incorrect union serialization
+ * [THRIFT-3654] - incorrect serialization of optionals
+ * [THRIFT-3656] - incorrect serialization of optionals
+ * [THRIFT-3699] - Fix integer limit symbol includes in Python C extension
+ * [THRIFT-3693] - Fix include issue in C++ TSSLSocketInterruptTest on Windows
+ * [THRIFT-3694] - [Windows] Disable tests of a few servers that are not supported
+ * [THRIFT-3696] - Install pip to CentOS Docker images to fix Python builds
+ * [THRIFT-3638] - Fix haxelib.json
+ * [THRIFT-3251] - Add http transport for server to Go lib
+ * [THRIFT-2424] - Recursive Types
+ * [THRIFT-2423] - THeader
+ * [THRIFT-2413] - Python: UTF-8 sent by PHP as JSON is not understood by TJsonProtocol
+ * [THRIFT-2409] - Java: UTF-8 sent by PHP as JSON is not understood by TJsonProtocol
+ * [THRIFT-2412] - D: UTF-8 sent by PHP as JSON is not understood by TJsonProtocol
+ * [THRIFT-2411] - C++: UTF-8 sent by PHP as JSON is not understood by TJsonProtocol
+ * [THRIFT-2410] - JavaMe: UTF-8 sent by PHP as JSON is not understood by TJsonProtocol
+ * [THRIFT-2668] - TestSuite: detailed result on passed tests by feature
+ * [THRIFT-2659] - python Test Server fails when throwing TException
+ * [THRIFT-3398] - Add CMake build for Haskell library and tests
+ * [THRIFT-3396] - DART: UTF-8 sent by PHP as JSON is not understood by TJsonProtocol
+ * [THRIFT-3364] - Fix ruby binary field encoding in TJSONProtocol
+ * [THRIFT-3381] - Fix for misc. codegen issues with THRIFT-2905
+ * [THRIFT-3573] - No rule to make target `../../../test/c_glib/src/.deps/testthrifttest-thrift_test_handler.Po'.
+ * [THRIFT-3572] - "Unable to determine the behavior of a signed right shift"
+ * [THRIFT-3542] - Add length limit support to Java test server
+ * [THRIFT-3537] - Remove the (now obsolete) csharp:asyncctp flag
+ * [THRIFT-3532] - Add configurable string and container read size limit to Python protocols
+ * [THRIFT-3531] - Create cross lang feature test for string and container read length limit
+ * [THRIFT-3482] - Haskell JSON protocol does not encode binary field as Base64
+ * [THRIFT-3425] - Minor fixes + simplification for CentOS Dockerfile
+ * [THRIFT-3442] - Run CMake tests on Appveyor
+ * [THRIFT-3409] - NodeJS binary field issues
+ * [THRIFT-3621] - Fix lib/cpp/test/SecurityTest.cpp to use ephemeral ports
+ * [THRIFT-3628] - Fix lib/cpp/test/TServerIntegrationTest.cpp to use ephemeral ports
+ * [THRIFT-3625] - Kill unused #include "TestPortFixture.h" in lib/cpp/test/TServerTransportTest.cpp.
+ * [THRIFT-3646] - Fix Python extension build warnings
+ * [THRIFT-3626] - Fix lib/cpp/test/TSocketInterruptTest.cpp to use ephemeral ports.
+ * [THRIFT-3624] - Fix lib/cpp/test/TServerSocketTest.cpp to use ephemeral ports
+ * [THRIFT-3623] - Fix Fix cpp/lib/test/TSSLSocketInterruptTest.cpp to use ephemeral ports
+ * [THRIFT-3592] - Add basic test client
+ * [THRIFT-3980] - add TExtendedBinaryProtocol.java
+
+## Task
+ * [THRIFT-1801] - Sync up TApplicationException codes across languages and thrift implementations
+ * [THRIFT-1259] - Automate versioning
+
+## Test
+ * [THRIFT-3400] - Add Erlang to cross test
+ * [THRIFT-3504] - Fix FastbinaryTest.py
+
+## Wish
+ * [THRIFT-3923] - Maybe remove Aereo from the "Powered by" list
+ * [THRIFT-2149] - Add an option to disable the generation of default operators
+
+
+
+Thrift 0.9.3
+--------------------------------------------------------------------------------
+## Bug
+ * [THRIFT-2441] - Cannot shutdown TThreadedServer when clients are still connected
+ * [THRIFT-2465] - TBinaryProtocolT breaks if copied/moved
+ * [THRIFT-2474] - thrift.h causes a compile failure
+ * [THRIFT-2540] - Running configure from outside the source directory fails
+ * [THRIFT-2598] - Add check for minimum Go version to configure.ac
+ * [THRIFT-2647] - compiler-hs: don't decapitalize field names, do decapitalize argument bindings
+ * [THRIFT-2773] - Generated Java code for 'oneway' methods is incorrect.
+ * [THRIFT-2789] - TNonblockingServer leaks socket FD's under load
+ * [THRIFT-2682] - TThreadedServer leaks per-thread memory
+ * [THRIFT-2674] - JavaScript: declare Accept: and Content-Type: in request
+ * [THRIFT-3078] - TNonblockingServerSocket's logger is not named after TNonblockingServerSocket
+ * [THRIFT-3077] - C++ TFileTransport ignores return code from ftruncate
+ * [THRIFT-3067] - C++ cppcheck performance related warnings
+ * [THRIFT-3066] - C++ TDenseProtocol assert modifies instead of checks
+ * [THRIFT-3071] - bootstrap.sh on Ubuntu 12.04 (Precise) automake error
+ * [THRIFT-3069] - C++ TServerSocket leaks socket on fcntl get or set flags error
+ * [THRIFT-3079] - TNonblockingServerSocket's logger is not named after TNonblockingServerSocket
+ * [THRIFT-3080] - C++ TNonblockingServer connection leak while accept huge number connections.
+ * [THRIFT-3086] - C++ Valgrind Error Cleanup
+ * [THRIFT-3085] - thrift_reconnecting_client never try to reconnect
+ * [THRIFT-3123] - Missing include in compiler/cpp/src/main.h breaks build in some environments
+ * [THRIFT-3125] - Fix the list of exported headers in automake input
+ * [THRIFT-3126] - PHP JSON serializer converts empty or int-indexed maps to lists
+ * [THRIFT-3132] - Properly format date in Java @Generated annotations
+ * [THRIFT-3137] - Travis build hangs after failure
+ * [THRIFT-3138] - "make check" parallel execution is underministic
+ * [THRIFT-3139] - JS library test is flaky
+ * [THRIFT-3140] - ConcurrentModificationException is thrown by JavaScript test server
+ * [THRIFT-3124] - Some signed/unsigned warnings while building compiler
+ * [THRIFT-3128] - Go generated code produces name collisions between services
+ * [THRIFT-3146] - Graphviz generates function name collisions between services
+ * [THRIFT-3147] - Segfault while receiving data
+ * [THRIFT-3148] - Markdown links to coding_standards are dead
+ * [THRIFT-3090] - cmake build is broken on MacOSX
+ * [THRIFT-3097] - cmake targets unconditionally depend on optional libraries
+ * [THRIFT-3094] - master as of 2015-APR-13 fails -DBOOST_THREADS cmake build
+ * [THRIFT-3099] - cmake build is broken on FreeBSD
+ * [THRIFT-3089] - Assigning default ENUM values results in non-compilable java code if java namespace is not defined
+ * [THRIFT-3093] - mingw compile fixes for c++ library 0.9.2
+ * [THRIFT-3098] - Thrift does not pretty print binary typedefs the way it does binary fields
+ * [THRIFT-3091] - c_glib service method should return result from handler method
+ * [THRIFT-3088] - TThreadPoolServer with Sasl auth may leak CLOSE_WAIT socket
+ * [THRIFT-3109] - Cross test log file cannot be browsed when served in HTTP server
+ * [THRIFT-3113] - m4 C++11 macro issue
+ * [THRIFT-3105] - C++ libthriftnb library on Windows build failure
+ * [THRIFT-3115] - Uncompileable code due to name collision with predefined used types
+ * [THRIFT-3117] - Java TSSLTransportFactory can't load certificates within JAR archive
+ * [THRIFT-3102] - could not make check for Go Library
+ * [THRIFT-3120] - Minor spelling errors and an outdated URL
+ * [THRIFT-3121] - Librt does not exist on OS X
+ * [THRIFT-3152] - Compiler error on Mac OSX (missing #include )
+ * [THRIFT-3162] - make fails for dmd 2.067
+ * [THRIFT-3164] - Thrift C++ library SSL socket by default allows for unsecure SSLv3 negotiation
+ * [THRIFT-3168] - Fix Maven POM
+ * [THRIFT-3170] - Initialism code in the Go compiler causes chaos
+ * [THRIFT-3169] - Do not export thrift.TestStruct and thrift.TestEnum in thrift Go library
+ * [THRIFT-3191] - Perl compiler does not add support for unexpected exception handling
+ * [THRIFT-3178] - glib C does not compile
+ * [THRIFT-3189] - Perl ServerSocket should allow a specific interface to be listened to
+ * [THRIFT-3252] - Missing TConcurrentClientSyncInfo.h in cpp Makefile, so doesn't install
+ * [THRIFT-3255] - Thrift generator doesn't exclude 'package' keyword for thrift property names breaking java builds
+ * [THRIFT-3260] - multiple warnings in c_glib tutorial
+ * [THRIFT-3256] - Some D test timings are too aggressive for slow machines
+ * [THRIFT-3257] - warning: extra tokens at end of #endif directive
+ * [THRIFT-3184] - Thrift Go leaves file descriptors open
+ * [THRIFT-3203] - DOAP - please fix "Ocaml" => "OCaml"
+ * [THRIFT-3210] - (uncompileable) code generated for server events while are events not enabled
+ * [THRIFT-3215] - TJSONProtocol '(c++) uses "throw new" to throw exceptions instead of "throw"
+ * [THRIFT-3202] - Allow HSHAServer to configure min and max worker threads separately.
+ * [THRIFT-3205] - TCompactProtocol return a wrong error when the io.EOF happens
+ * [THRIFT-3209] - LGPL mentioned in license file
+ * [THRIFT-3197] - keepAliveTime is hard coded as 60 sec in TThreadPoolServer
+ * [THRIFT-3196] - Misspelling in lua TBinaryProtocol (stirctWrite => strictWrite)
+ * [THRIFT-3198] - Allow construction of TTransportFactory with a specified maxLength
+ * [THRIFT-3192] - Go import paths changed in 1.4, and expired June 1
+ * [THRIFT-3271] - Could not find or load main class configtest_ax_javac_and_java on some non-english systems
+ * [THRIFT-3273] - c_glib: Generated code tries to convert between function and void pointers
+ * [THRIFT-3264] - Fix Erlang 16 namespaced types
+ * [THRIFT-3270] - reusing TNonblockingServer::TConnection cause dirty TSocket
+ * [THRIFT-3267] - c_glib: "Critical" failure during unit tests
+ * [THRIFT-3277] - THttpClient leaks connections if it's used for multiple requests
+ * [THRIFT-3278] - NodeJS: Fix exception stack traces and names
+ * [THRIFT-3279] - Fix a bug in retry_max_delay (NodeJS)
+ * [THRIFT-3280] - Initialize retry variables on construction
+ * [THRIFT-3283] - c_glib: Tutorial server always exits with warning
+ * [THRIFT-3284] - c_glib: Empty service produces unused-variable warning
+ * [THRIFT-1925] - c_glib generated code does not compile
+ * [THRIFT-1849] - after transport->open() opens isOpen returns true and next open() goes thru when it shall not
+ * [THRIFT-1866] - java compiler generates non-compiling code with const's defined in a thrift when name includes non-identifier chars
+ * [THRIFT-1938] - FunctionRunner.h -- uses wrong path for Thread.h when installed
+ * [THRIFT-1844] - Password string not cleared
+ * [THRIFT-2004] - Thrift::Union violates :== method contract and crashes
+ * [THRIFT-2073] - Thrift C++ THttpClient error: cannot refill buffer
+ * [THRIFT-2127] - Autoconf scripting does not properly account for cross-compile
+ * [THRIFT-2180] - Integer types issues in Cocoa lib on ARM64
+ * [THRIFT-2189] - Go needs "isset" to fully support "union" type (and optionals)
+ * [THRIFT-2192] - autotools on Redhat based systems
+ * [THRIFT-2546] - cross language tests fails at 'TestMultiException' when using nodejs server
+ * [THRIFT-2547] - nodejs servers and clients fails to connect with cpp using compact protocol
+ * [THRIFT-2548] - Nodejs servers and clients does not work properly with -ssl
+ * [THRIFT-1471] - toString() does not print ByteBuffer values when nested in a List
+ * [THRIFT-1201] - getaddrinfo resource leak
+ * [THRIFT-615] - TThreadPoolServer doesn't call task_done after pulling tasks from it's clients queue
+ * [THRIFT-162] - Thrift structures are unhashable, preventing them from being used as set elements
+ * [THRIFT-810] - Crashed client on TSocket::close under loads
+ * [THRIFT-557] - charset problem with file Autogenerated by Thrift
+ * [THRIFT-233] - IDL doesn't support negative hex literals
+ * [THRIFT-1649] - contrib/zeromq does not build in 0.8.0
+ * [THRIFT-1642] - Miscalculation lead to throw unexpected "TTransportException::TIMED_OUT"(or called "EAGAIN (timed out)") exception
+ * [THRIFT-1587] - TSocket::setRecvTimeout error
+ * [THRIFT-1248] - pointer subtraction in TMemoryBuffer relies on undefined behavior
+ * [THRIFT-1774] - Sasl Transport client would hang when trying to connect non-sasl transport server
+ * [THRIFT-1754] - RangeError in buffer handling
+ * [THRIFT-1618] - static structMap in FieldMetaData is not thread safe and can lead to deadlocks
+ * [THRIFT-2335] - thrift incompatibility with py:tornado as server, java as client
+ * [THRIFT-2803] - TCP_DEFER_ACCEPT not supported with domain sockets
+ * [THRIFT-2799] - Build Problem(s): ld: library not found for -l:libboost_unit_test_framework.a
+ * [THRIFT-2801] - C++ test suite compilation warnings
+ * [THRIFT-2802] - C++ tutorial compilation warnings
+ * [THRIFT-2795] - thrift_binary_protocol.c: 'dereferencing type-punned pointer will break strict-aliasing rules'
+ * [THRIFT-2817] - TSimpleJSONProtocol reads beyond end of message
+ * [THRIFT-2826] - html:standalone sometimes ignored
+ * [THRIFT-2829] - Support haxelib installation via github
+ * [THRIFT-2828] - slightly wrong help screen indent
+ * [THRIFT-2831] - Removes dead code in web_server.js introduced in THRIFT-2819
+ * [THRIFT-2823] - All JS-tests are failing when run with grunt test
+ * [THRIFT-2827] - Thrift 0.9.2 fails to compile on Yosemite due to tr1/functional include in ProcessorTest.cpp
+ * [THRIFT-2843] - Automake configure.ac has possible typo related to Java
+ * [THRIFT-2813] - multiple haxe library fixes/improvements
+ * [THRIFT-2825] - Supplying unicode to python Thrift client can cause next request arguments to get overwritten
+ * [THRIFT-2840] - Cabal file points to LICENSE file outside the path of the Haskell project.
+ * [THRIFT-2818] - Trailing commas in array
+ * [THRIFT-2830] - Clean up ant warnings in tutorial dir
+ * [THRIFT-2842] - Erlang thrift client has infinite timeout
+ * [THRIFT-2810] - Do not leave the underlying ServerSocket open if construction of TServerSocket fails
+ * [THRIFT-2812] - Go server adding redundant buffering layer
+ * [THRIFT-2839] - TFramedTransport read bug
+ * [THRIFT-2844] - Nodejs support broken when running under Browserify
+ * [THRIFT-2814] - args/result classes not found when no namespace is set
+ * [THRIFT-2847] - function IfValue() is a duplicate of System.StrUtils.IfThen
+ * [THRIFT-2848] - certain Delphi tests do not build if TypeRegistry is used
+ * [THRIFT-2854] - Go Struct writer and reader looses important error information
+ * [THRIFT-2858] - Enable header field case insensitive match in THttpServer
+ * [THRIFT-2857] - C# generator creates uncompilable code for struct constants
+ * [THRIFT-2860] - Delphi server closes connection on unexpected exceptions
+ * [THRIFT-2868] - Enhance error handling in the Go client
+ * [THRIFT-2879] - TMemoryBuffer: using lua string in wrong way
+ * [THRIFT-2851] - Remove strange public Peek() from Go transports
+ * [THRIFT-2852] - Better Open/IsOpen/Close behavior for StreamTransport.
+ * [THRIFT-2871] - Missing semicolon in thrift.js
+ * [THRIFT-2872] - ThreadManager deadlock for task expiration
+ * [THRIFT-2881] - Handle errors from Accept() correctly
+ * [THRIFT-2849] - Spell errors reported by codespell tool
+ * [THRIFT-2870] - C++ TJSONProtocol using locale dependent formatting
+ * [THRIFT-2882] - Lua Generator: using string.len funtion to get struct(map,list,set) size
+ * [THRIFT-2864] - JSON generator missing from Visual Studio build project
+ * [THRIFT-2878] - Go validation support of required fields
+ * [THRIFT-2873] - TPipe and TPipeServer don't compile on Windows with UNICODE enabled
+ * [THRIFT-2888] - import of is missing in JSON generator
+ * [THRIFT-2900] - Python THttpClient does not reset socket timeout on exception
+ * [THRIFT-2907] - 'ntohll' macro redefined
+ * [THRIFT-2884] - Map does not serialize correctly for JSON protocol in Go library
+ * [THRIFT-2887] - --with-openssl configure flag is ignored
+ * [THRIFT-2894] - PHP json serializer skips maps with int/bool keys
+ * [THRIFT-2904] - json_protocol_test.go fails
+ * [THRIFT-2906] - library not found for -l:libboost_unit_test_framework.a
+ * [THRIFT-2890] - binary data may lose bytes with JSON transport under specific circumstances
+ * [THRIFT-2891] - binary data may cause a failure with JSON transport under specific circumstances
+ * [THRIFT-2901] - Fix for generated TypeScript functions + indentation of JavaScript maps
+ * [THRIFT-2916] - make check fails for D language
+ * [THRIFT-2918] - Race condition in Python TProcessPoolServer test
+ * [THRIFT-2920] - Erlang Thrift test uses wrong IDL file
+ * [THRIFT-2922] - $TRIAL is used with Python tests but not tested accordingly
+ * [THRIFT-2912] - Autotool build for C++ Qt library is invalid
+ * [THRIFT-2914] - explicit dependency to Lua5.2 fails on some systems
+ * [THRIFT-2910] - libevent is not really optional
+ * [THRIFT-2911] - fix c++ version zeromq transport, the old version cannot work
+ * [THRIFT-2915] - Lua generator missing from Visual Studio build project
+ * [THRIFT-2917] - "make clean" breaks test/c_glib
+ * [THRIFT-2919] - Haxe test server timeout too large
+ * [THRIFT-2923] - JavaScript client assumes a message being written
+ * [THRIFT-2924] - TNonblockingServer crashes when user-provided event_base is used
+ * [THRIFT-2925] - CMake build does not work with OpenSSL nor anything installed in non-system location
+ * [THRIFT-2931] - Access to undeclared static property: Thrift\Protocol\TProtocol::$TBINARYPROTOCOLACCELERATED
+ * [THRIFT-2893] - CMake build fails with boost thread or std thread
+ * [THRIFT-2902] - Generated c_glib code does not compile with clang
+ * [THRIFT-2903] - Qt4 library built with CMake does not work
+ * [THRIFT-2942] - CSharp generate invalid code for property named read or write
+ * [THRIFT-2932] - Node.js Thrift connection libraries throw Exceptions into event emitter
+ * [THRIFT-2933] - v0.9.2: doubles encoded in node with compact protocol cannot be decoded by python
+ * [THRIFT-2934] - createServer signature mismatch
+ * [THRIFT-2981] - IDL with no namespace produces unparsable PHP
+ * [THRIFT-2999] - Addition of .gitattributes text auto in THRIFT-2724 causes modified files on checkout
+ * [THRIFT-2949] - typo in compiler/cpp/README.md
+ * [THRIFT-2957] - warning: source file %s is in a subdirectory, but option 'subdir-objects' is disabled
+ * [THRIFT-2953] - TNamedPipeServerTransport is not Stop()able
+ * [THRIFT-2962] - Docker Thrift env for development and testing
+ * [THRIFT-2971] - C++ test and tutorial parallel build is unstable
+ * [THRIFT-2972] - Missing backslash in lib/cpp/test/Makefile.am
+ * [THRIFT-2951] - Fix Erlang name conflict test
+ * [THRIFT-2955] - Using list of typedefs does not compile on Go
+ * [THRIFT-2960] - namespace regression for Ruby
+ * [THRIFT-2959] - nodejs: fix binary unit tests
+ * [THRIFT-2966] - nodejs: Fix bad references to TProtocolException and TProtocolExceptionType
+ * [THRIFT-2970] - grunt-jsdoc fails due to dependency issues
+ * [THRIFT-3001] - C# Equals fails for binary fields (byte[])
+ * [THRIFT-3003] - Missing LICENSE file prevents package from being installed
+ * [THRIFT-3008] - Node.js server does not fully support exception
+ * [THRIFT-3007] - Travis build is broken because of directory conflict
+ * [THRIFT-3009] - TSSLSocket does not use the correct hostname (breaks certificate checks)
+ * [THRIFT-3011] - C# test server testException() not implemented according to specs
+ * [THRIFT-3012] - Timing problems in NamedPipe implementation due to unnecessary open/close
+ * [THRIFT-3019] - Golang generator missing docstring for structs
+ * [THRIFT-3021] - Service remote tool does not import stub package with package prefix
+ * [THRIFT-3026] - TMultiplexedProcessor does not have a constructor
+ * [THRIFT-3028] - Regression caused by THRIFT-2180
+ * [THRIFT-3017] - order of map key/value types incorrect for one CTOR
+ * [THRIFT-3020] - Cannot compile thrift as C++03
+ * [THRIFT-3024] - User-Agent "BattleNet" used in some Thrift library files
+ * [THRIFT-3047] - Uneven calls to indent_up and indent_down in Cocoa generator
+ * [THRIFT-3048] - NodeJS decoding of I64 is inconsistent across protocols
+ * [THRIFT-3043] - go compiler generator uses non C++98 code
+ * [THRIFT-3044] - Docker README.md paths to Dockerfiles are incorrect
+ * [THRIFT-3040] - bower.json wrong "main" path
+ * [THRIFT-3051] - Go Thrift generator creates bad go code
+ * [THRIFT-3057] - Java compiler build is broken
+ * [THRIFT-3061] - C++ TSSLSocket shutdown delay/vulnerability
+ * [THRIFT-3062] - C++ TServerSocket invalid port number (over 999999) causes stack corruption
+ * [THRIFT-3065] - Update libthrift dependencies (slf4j, httpcore, httpclient)
+ * [THRIFT-3244] - TypeScript: fix namespace of included types
+ * [THRIFT-3246] - Reduce the number of trivial warnings in Windows C++ CMake builds
+ * [THRIFT-3224] - Fix TNamedPipeServer unpredictable behavior on accept
+ * [THRIFT-3230] - Python compiler generates wrong code if there is function throwing a typedef of exception with another namespace
+ * [THRIFT-3236] - MaxSkipDepth never checked
+ * [THRIFT-3239] - Limit recursion depth
+ * [THRIFT-3241] - fatal error: runtime: cannot map pages in arena address space
+ * [THRIFT-3242] - OSGi Import-Package directive is missing the Apache HTTP packages
+ * [THRIFT-3234] - Limit recursion depth
+ * [THRIFT-3222] - TypeScript: Generated Enums are quoted
+ * [THRIFT-3229] - unexpected Timeout exception when desired bytes are only partially available
+ * [THRIFT-3231] - CPP: Limit recursion depth to 64
+ * [THRIFT-3235] - Limit recursion depth
+ * [THRIFT-3175] - fastbinary.c python deserialize can cause huge allocations from garbage
+ * [THRIFT-3176] - Union incorrectly implements ==
+ * [THRIFT-3177] - Fails to run rake test
+ * [THRIFT-3180] - lua plugin: framed transport do not work
+ * [THRIFT-3179] - lua plugin cant connect to remote server because function l_socket_create_and_connect always bind socket to localhost
+ * [THRIFT-3248] - TypeScript: additional comma in method signature without parameters
+ * [THRIFT-3302] - Go JSON protocol should encode Thrift byte type as signed integer string
+ * [THRIFT-3297] - c_glib: an abstract base class is not generated
+ * [THRIFT-3294] - TZlibTransport for Java does not write data correctly
+ * [THRIFT-3296] - Go cross test does not conform to spec
+ * [THRIFT-3295] - C# library does not build on Mono 4.0.2.5 or later
+ * [THRIFT-3293] - JavaScript: null values turn into empty structs in constructor
+ * [THRIFT-3310] - lib/erl/README.md has incorrect formatting
+ * [THRIFT-3319] - CSharp tutorial will not build using the *.sln
+ * [THRIFT-3335] - Ruby server does not handle processor exception
+ * [THRIFT-3338] - Stray underscore in generated go when service name starts with "New"
+ * [THRIFT-3324] - Update Go Docs for pulling all packages
+ * [THRIFT-3345] - Clients blocked indefinitely when a java.lang.Error is thrown
+ * [THRIFT-3332] - make dist fails on clean build
+ * [THRIFT-3326] - Tests do not compile under *BSD
+ * [THRIFT-3334] - Markdown notation of protocol spec is malformed
+ * [THRIFT-3331] - warning: ‘etype’ may be used uninitialized in this function
+ * [THRIFT-3349] - Python server does not handle processor exception
+ * [THRIFT-3343] - Fix haskell README
+ * [THRIFT-3340] - Python: enable json tests again
+ * [THRIFT-3311] - Top level README.md has incorrect formmating
+ * [THRIFT-2936] - Minor memory leak in SSL
+ * [THRIFT-3290] - Using from in variable names causes the generated Python code to have errors
+ * [THRIFT-3225] - Fix TPipeServer unpredictable behavior on interrupt()
+ * [THRIFT-3354] - Fix word-extraction substr bug in initialism code
+ * [THRIFT-2006] - TBinaryProtocol message header call name length is not validated and can be used to core the server
+ * [THRIFT-3329] - C++ library unit tests don't compile against the new boost-1.59 unit test framework
+ * [THRIFT-2630] - windows7 64bit pc. ipv4 and ipv6 pc.can't use
+ * [THRIFT-3336] - Thrift generated streaming operators added in 0.9.2 cannot be overridden
+ * [THRIFT-2681] - Core of unwind_cleanup
+ * [THRIFT-3317] - cpp namespace org.apache issue appears in 0.9
+
+## Documentation
+ * [THRIFT-3286] - Apache Ant is a necessary dependency
+
+## Improvement
+ * [THRIFT-227] - Byte[] in collections aren't pretty printed like regular binary fields
+ * [THRIFT-2744] - Vagrantfile for Centos 6.5
+ * [THRIFT-2644] - Haxe support
+ * [THRIFT-2756] - register Media Type @ IANA
+ * [THRIFT-3076] - Compatibility with Haxe 3.2.0
+ * [THRIFT-3081] - C++ Consolidate client processing loops in TServers
+ * [THRIFT-3083] - C++ Consolidate server processing loops in TSimpleServer, TThreadedServer, TThreadPoolServer
+ * [THRIFT-3084] - C++ add concurrent client limit to threaded servers
+ * [THRIFT-3074] - Add compiler/cpp/lex.yythriftl.cc to gitignore.
+ * [THRIFT-3134] - Remove use of deprecated "phantom.args"
+ * [THRIFT-3133] - Allow "make cross" and "make precross" to run without building all languages
+ * [THRIFT-3142] - Make JavaScript use downloaded libraries
+ * [THRIFT-3141] - Improve logging of JavaScript test
+ * [THRIFT-3144] - Proposal: make String representation of enums in generated go code less verbose
+ * [THRIFT-3130] - Remove the last vestiges of THRIFT_OVERLOAD_IF from THRIFT-1316
+ * [THRIFT-3131] - Consolidate suggested import path for go thrift library to git.apache.org in docs and code
+ * [THRIFT-3092] - Generated Haskell types should derive Generic
+ * [THRIFT-3110] - Print error log after cross test failures on Travis
+ * [THRIFT-3114] - Using local temp variables to not pollute the global table
+ * [THRIFT-3106] - CMake summary should give more information why a library is set to off
+ * [THRIFT-3119] - Java's TThreadedSelectorServer has indistinguishable log messages in run()
+ * [THRIFT-3122] - Javascript struct constructor should properly initialize struct and container members from plain js arguments
+ * [THRIFT-3151] - Fix links to git-wip* - should be git.apache.org
+ * [THRIFT-3167] - Windows build from source instructions need to be revised
+ * [THRIFT-3155] - move contrib/mingw32-toolchain.cmake to build/cmake/
+ * [THRIFT-3160] - Make generated go enums implement TextMarshaller and TextUnmarshaller interfaces
+ * [THRIFT-3150] - Add an option to thrift go generator to make Read and Write methods private
+ * [THRIFT-3149] - Make ReadFieldN methods in generated Go code private
+ * [THRIFT-3172] - Add tutorial to Thrift web site
+ * [THRIFT-3214] - Add Erlang option for using maps instead of dicts
+ * [THRIFT-3201] - Capture github test artifacts for failed builds
+ * [THRIFT-3266] - c_glib: Multiple compiler warnings building unit tests
+ * [THRIFT-3285] - c_glib: Build library with all warnings enabled, no warnings generated
+ * [THRIFT-1954] - Allow for a separate connection timeout value
+ * [THRIFT-2098] - Add support for Qt5+
+ * [THRIFT-2199] - Remove Dense protocol (was: move to Contrib)
+ * [THRIFT-406] - C++ Test suite cleanup
+ * [THRIFT-902] - socket and connect timeout in TSocket should be distinguished
+ * [THRIFT-388] - Use a separate wire format for async calls
+ * [THRIFT-727] - support native C++ language specific exception message
+ * [THRIFT-1784] - pep-3110 compliance for exception handling
+ * [THRIFT-1025] - C++ ServerSocket should inherit from Socket with the necessary Ctor to listen on connections from a specific host
+ * [THRIFT-2269] - Can deploy libthrift-source.jar to maven center repository
+ * [THRIFT-2804] - Pull an interface out of TBaseAsyncProcessor
+ * [THRIFT-2806] - more whitespace fixups
+ * [THRIFT-2811] - Make remote socket address accessible
+ * [THRIFT-2809] - .gitignore update for compiler's visual project
+ * [THRIFT-2846] - Expose ciphers parameter from ssl.wrap_socket()
+ * [THRIFT-2859] - JSON generator: output complete descriptors
+ * [THRIFT-2861] - add buffered transport
+ * [THRIFT-2865] - Test case for Go: SeqId out of sequence
+ * [THRIFT-2866] - Go generator source code is hard to read and maintain
+ * [THRIFT-2880] - Read the network address from the listener if available.
+ * [THRIFT-2875] - Typo in TDenseProtocol.h comment
+ * [THRIFT-2874] - TBinaryProtocol member variable "string_buf_" is never used.
+ * [THRIFT-2855] - Move contributing.md to the root of the repository
+ * [THRIFT-2862] - Enable RTTI and/or build macros for generated code
+ * [THRIFT-2876] - Add test for THRIFT-2526 Assignment operators and copy constructors in c++ don't copy the __isset struct
+ * [THRIFT-2897] - Generate -isEqual: and -hash methods
+ * [THRIFT-2909] - Improve travis build
+ * [THRIFT-2921] - Make Erlang impl ready for OTP 18 release (dict/0 and set/0 are deprecated)
+ * [THRIFT-2928] - Rename the erlang test_server module
+ * [THRIFT-2940] - Allow installing Thrift from git as NPM module by providing package.json in top level directory
+ * [THRIFT-2937] - Allow setting a maximum frame size in TFramedTransport
+ * [THRIFT-2976] - nodejs: xhr and websocket support for browserify
+ * [THRIFT-2996] - Test for Haxe 3.1.3 or better
+ * [THRIFT-2969] - nodejs: DRY up library tests
+ * [THRIFT-2973] - Update Haxe lib readme regarding Haxe 3.1.3
+ * [THRIFT-2952] - Improve handling of Server.Stop()
+ * [THRIFT-2964] - nodejs: move protocols and transports into separate files
+ * [THRIFT-2963] - nodejs - add test coverage
+ * [THRIFT-3006] - Attach 'omitempty' json tag for optional fields in Go
+ * [THRIFT-3027] - Go compiler does not ensure common initialisms have consistent case
+ * [THRIFT-3030] - TThreadedServer: Property for number of clientThreads
+ * [THRIFT-3023] - Go compiler is a little overly conservative with names of attributes
+ * [THRIFT-3018] - Compact protocol for Delphi
+ * [THRIFT-3025] - Change pure Int constants into @enums (where possible)
+ * [THRIFT-3031] - migrate "shouldStop" flag to TServer
+ * [THRIFT-3022] - Compact protocol for Haxe
+ * [THRIFT-3041] - Generate asynchronous clients for Cocoa
+ * [THRIFT-3053] - Perl SSL Socket Support (Encryption)
+ * [THRIFT-3247] - Generate a C++ thread-safe client
+ * [THRIFT-3217] - Provide a little endian variant of the binary protocol in C++
+ * [THRIFT-3223] - TypeScript: Add initial support for Enum Maps
+ * [THRIFT-3220] - Option to suppress @Generated Annotation entirely
+ * [THRIFT-3300] - Reimplement TZlibTransport in Java using streams
+ * [THRIFT-3288] - c_glib: Build unit tests with all warnings enabled, no warnings generated
+ * [THRIFT-3347] - Improve cross test servers and clients
+ * [THRIFT-3342] - Improve ruby cross test client and server compatibility
+ * [THRIFT-2296] - Add C++ Base class for service
+ * [THRIFT-3337] - Add testBool method to cross tests
+ * [THRIFT-3303] - Disable concurrent cabal jobs on Travis to avoid GHC crash
+ * [THRIFT-2623] - Docker container for Thrift
+ * [THRIFT-3298] - thrift endian converters may conflict with other libraries
+ * [THRIFT-1559] - Provide memory pool for TBinaryProtocol to eliminate memory fragmentation
+ * [THRIFT-424] - Steal ProtocolBuffers' VarInt implementation for C++
+
+## New Feature
+ * [THRIFT-3070] - Add ability to set the LocalCertificateSelectionCallback
+ * [THRIFT-1909] - Java: Add compiler flag to use the "option pattern" for optional fields
+ * [THRIFT-2099] - Stop TThreadPoolServer with alive connections.
+ * [THRIFT-123] - implement TZlibTransport in Java
+ * [THRIFT-2368] - New option: reuse-objects for Java generator
+ * [THRIFT-2836] - Optionally generate C++11 MoveConstructible types
+ * [THRIFT-2824] - Flag to disable html escaping doctext
+ * [THRIFT-2819] - Add WebsSocket client to node.js
+ * [THRIFT-3050] - Client certificate authentication for non-http TLS in C#
+ * [THRIFT-3292] - Implement TZlibTransport in Go
+
+## Question
+ * [THRIFT-2583] - Thrift on xPC target (SpeedGoat)
+ * [THRIFT-2592] - thrift server using c_glib
+ * [THRIFT-2832] - c_glib: Handle string lists correctly
+ * [THRIFT-3136] - thrift installation problem on mac
+ * [THRIFT-3346] - c_glib: Tutorials example crashes saying Calculator.ping implementation returned FALSE but did not set an error
+
+## Sub-task
+ * [THRIFT-2578] - Moving 'make cross' from test.sh to test.py
+ * [THRIFT-2734] - Go coding standards
+ * [THRIFT-2748] - Add Vagrantfile for Centos 6.5
+ * [THRIFT-2753] - Misc. Haxe improvements
+ * [THRIFT-2640] - Compact Protocol in Cocoa
+ * [THRIFT-3262] - warning: overflow in implicit constant conversion in DenseProtoTest.cpp
+ * [THRIFT-3194] - Can't build with go enabled. gomock SCC path incorrect.
+ * [THRIFT-3275] - c_glib tutorial warnings in generated code
+ * [THRIFT-1125] - Multiplexing support for the Ruby Library
+ * [THRIFT-2807] - PHP Code Style
+ * [THRIFT-2841] - Add comprehensive integration tests for the whole Go stack
+ * [THRIFT-2815] - Haxe: Support for Multiplexing Services on any Transport, Protocol and Server
+ * [THRIFT-2886] - Integrate binary type in standard Thrift cross test
+ * [THRIFT-2946] - Enhance usability of cross test framework
+ * [THRIFT-2967] - Add .editorconfig to root
+ * [THRIFT-3033] - Perl: Support for Multiplexing Services on any Transport, Protocol and Server
+ * [THRIFT-3174] - Initialism code in the Go compiler doesn't check first word
+ * [THRIFT-3193] - Option to supress date value in @Generated annotation
+ * [THRIFT-3305] - Missing dist files for 0.9.3 release candidate
+ * [THRIFT-3341] - Add testBool methods
+ * [THRIFT-3308] - Fix broken test cases for 0.9.3 release candidate
+
+## Task
+ * [THRIFT-2834] - Remove semi-colons from python code generator
+ * [THRIFT-2853] - Adjust comments not applying anymore after THRIFT-2852
+
+## Test
+ * [THRIFT-3211] - Add make cross support for php TCompactProtocol
+
+## Wish
+ * [THRIFT-2838] - TNonblockingServer can bind to port 0 (i.e., get an OS-assigned port) but there is no way to get the port number
+
+
+
+Thrift 0.9.2
+--------------------------------------------------------------------------------
+## Bug
+ * [THRIFT-2793] - Go compiler produces uncompilable code
+ * [THRIFT-1481] - Unix domain sockets in C++ do not support the abstract namespace
+ * [THRIFT-1455] - TBinaryProtocolT::writeString casts from size_t to uint32_t, which is not safe on 64-bit platforms
+ * [THRIFT-1579] - PHP Extention - function thrift_protocol_read_binary not working from TBinarySerializer::deserialize
+ * [THRIFT-1584] - Error: could not SetMinThreads in ThreadPool on single-core machines
+ * [THRIFT-1614] - Thrift build from svn repo sources fails with automake-1.12
+ * [THRIFT-1047] - rb_thrift_memory_buffer_write treats arg as string without check, segfaults if you pass non-string
+ * [THRIFT-1639] - Java/Python: Serialization/Deserialization of double type using CompactProtocol
+ * [THRIFT-1647] - NodeJS BufferedTransport does not work beyond the hello-world example
+ * [THRIFT-2130] - Thrift's D library/test: parts of "make check" code do not compile with recent dmd-2.062 through dmd-2.064alpha
+ * [THRIFT-2140] - Error compiling cpp tutorials
+ * [THRIFT-2139] - MSVC 2012 Error - Cannot compile due to BoostThreadFactory
+ * [THRIFT-2138] - pkgconfig file created with wrong include path
+ * [THRIFT-2160] - Warning in thrift.h when compiling with -Wunused and NDEBUG
+ * [THRIFT-2158] - Compact, JSON, and SimpleJSON protocols are not working correctly
+ * [THRIFT-2167] - nodejs lib throws error if options argument isn't passed
+ * [THRIFT-2288] - Go impl of Thrift JSON protocol wrongly writes/expects true/false for bools
+ * [THRIFT-2147] - Thrift IDL grammar allows for dotted identifier names
+ * [THRIFT-2145] - Rack and Thin are not just development dependencies
+ * [THRIFT-2267] - Should be able to choose socket family in Python TSocket
+ * [THRIFT-2276] - java path in spec file needs updating
+ * [THRIFT-2281] - Generated send/recv code ignores errors returned by the underlying protocol
+ * [THRIFT-2280] - TJSONProtocol.Flush() does not really flush the transport
+ * [THRIFT-2274] - TNonblockingServer and TThreadedSelectorServer do not close their channel selectors on exit and leak file descriptors
+ * [THRIFT-2265] - php library doesn't build
+ * [THRIFT-2232] - IsSet* broken in Go
+ * [THRIFT-2246] - Unset enum value is printed by ToString()
+ * [THRIFT-2240] - thrift.vim (contrib) does not correctly handle 'union'
+ * [THRIFT-2243] - TNonblockingServer in thrift crashes when TFramedTransport opens
+ * [THRIFT-2230] - Cannot Build on RHEL/Centos/Amazon Linux 6.x
+ * [THRIFT-2247] - Go generator doesn't deal well with map keys of type binary
+ * [THRIFT-2253] - Python Tornado TTornadoServer base class change
+ * [THRIFT-2261] - java: error: unmappable character for encoding ASCII
+ * [THRIFT-2259] - C#: unexpected null logDelegate() pointer causes AV in TServer.serve()
+ * [THRIFT-2225] - SSLContext destroy before cleanupOpenSSL
+ * [THRIFT-2224] - TSSLSocket.h and TSSLServerSocket.h should use the platfromsocket too
+ * [THRIFT-2229] - thrift failed to build on OSX 10.9 GM
+ * [THRIFT-2227] - Thrift compiler generates spurious warnings with Xlint
+ * [THRIFT-2219] - Thrift gem fails to build on OS X Mavericks with 1.9.3 rubies
+ * [THRIFT-2226] - TServerSocket - keepAlive wrong initialization order
+ * [THRIFT-2285] - TJsonProtocol implementation for Java doesn't allow a slash (/) to be escaped (\/)
+ * [THRIFT-2216] - Extraneous semicolon in TProtocolUtil.h makes clang mad
+ * [THRIFT-2215] - Generated HTML/Graphviz lists referenced enum identifiers as UNKNOWN.
+ * [THRIFT-2211] - Exception constructor does not contain namespace prefix.
+ * [THRIFT-2210] - lib/java TSimpleJSONProtocol can emit invalid JSON
+ * [THRIFT-2209] - Ruby generator -- please namespace classes
+ * [THRIFT-2202] - Delphi TServerImpl.DefaultLogDelegate may stop the server with I/O-Error 105
+ * [THRIFT-2201] - Ternary operator returns different types (build error for some compilers)
+ * [THRIFT-2200] - nested structs cause generate_fingerprint() to slow down at excessive CPU load
+ * [THRIFT-2197] - fix jar output directory in rpm spec file
+ * [THRIFT-2196] - Fix invalid dependency in Makefile.am
+ * [THRIFT-2194] - Node: Not actually prepending residual data in TFramedTransport.receiver
+ * [THRIFT-2193] - Java code generator emits spurious semicolon when deep copying binary data
+ * [THRIFT-2191] - Fix charp JSONProtocol.ReadJSONDouble (specify InvariantCulture)
+ * [THRIFT-2214] - System header sys/param.h is included inside the Thrift namespace
+ * [THRIFT-2178] - Thrift generator returns error exit code on --version
+ * [THRIFT-2171] - NodeJS implementation has extremely low test coverage
+ * [THRIFT-2183] - gem install fails on zsh
+ * [THRIFT-2182] - segfault in regression tests (GC bug in rb_thrift_memory_buffer_write)
+ * [THRIFT-2181] - oneway calls don't work in NodeJS
+ * [THRIFT-2169] - JavaME Thrift Library causes "java.io.IOException: No Response Entries Available" after using the Thrift client for some time
+ * [THRIFT-2168] - Node.js appears broken (at least, examples don't work as intended)
+ * [THRIFT-2293] - TSSLTransportFactory.createSSLContext() leaves files open
+ * [THRIFT-2279] - TSerializer only returns the first 1024 bytes serialized
+ * [THRIFT-2278] - Buffered transport doesn't support writes > buffer size
+ * [THRIFT-2275] - Fix memory leak in golang compact_protocol.
+ * [THRIFT-2282] - Incorect code generated for some typedefs
+ * [THRIFT-2009] - Go redeclaration error
+ * [THRIFT-1964] - 'Isset' causes problems with C#/.NET serializers
+ * [THRIFT-2026] - Fix TCompactProtocol 64 bit builds
+ * [THRIFT-2108] - Fix TAsyncClientManager timeout race
+ * [THRIFT-2068] - Multiple calls from same connection are not processed in node
+ * [THRIFT-1750] - Make compiler build cleanly under visual studio 10
+ * [THRIFT-1755] - Comment parsing bug
+ * [THRIFT-1771] - "make check" fails on x64 for libboost_unit_test_framework.a
+ * [THRIFT-1841] - NodeJS Thrift incorrectly parses non-UTF8-string types
+ * [THRIFT-1908] - Using php thrift_protocol accelerated transfer causes core dump
+ * [THRIFT-1892] - Socket timeouts are declared in milli-seconds, but are actually set in micro-seconds
+ * [THRIFT-2303] - TBufferredTransport not properly closing underlying transport
+ * [THRIFT-2313] - nodejs server crash after processing the first request when using MultiplexedProcessor/FramedBuffer/BinaryProtocol
+ * [THRIFT-2311] - Go: invalid code generated when exception name is a go keyword
+ * [THRIFT-2308] - node: TJSONProtocol parse error when reading from buffered message
+ * [THRIFT-2316] - ccp: TFileTransportTest
+ * [THRIFT-2352] - msvc failed to compile thrift tests
+ * [THRIFT-2337] - Golang does not report TIMED_OUT exceptions
+ * [THRIFT-2340] - Generated server implementation does not send response type EXCEPTION on the Thrift.TApplicationExceptionType.UNKNOWN_METHOD exception
+ * [THRIFT-2354] - Connection errors can lead to case_clause exceptions
+ * [THRIFT-2339] - Uncaught exception in thrift c# driver
+ * [THRIFT-2356] - c++ thrift client not working with ssl (SSL_connect hangs)
+ * [THRIFT-2331] - Missing call to ReadStructBegin() in TApplicationException.Read()
+ * [THRIFT-2323] - Uncompileable Delphi code generated for typedef'd structs
+ * [THRIFT-2322] - Correctly show the number of times ExecutorService (java) has rejected the client.
+ * [THRIFT-2389] - namespaces handled wrongly in acrionscript 3.0 implementation
+ * [THRIFT-2388] - GoLang - Fix data races in simple_server and server_socket
+ * [THRIFT-2386] - Thrift refuses to link yylex
+ * [THRIFT-2375] - Excessive
's in generated HTML
+ * [THRIFT-2373] - warning CS0414 in THttpClient.cs: private field 'Thrift.Transport.THttpClient.connection' assigned but never used
+ * [THRIFT-2372] - thrift/json_protocol.go:160: function ends without a return statement
+ * [THRIFT-2371] - ruby bundler version fails on ~1.3.1, remove and take latest avail
+ * [THRIFT-2370] - Compiler SEGFAULTs generating HTML documentation for complex strucre
+ * [THRIFT-2384] - Binary map keys produce uncompilable code in go
+ * [THRIFT-2380] - unreachable code (CID 1174546, CID 1174679)
+ * [THRIFT-2378] - service method arguments of binary type lead to uncompileable Go code
+ * [THRIFT-2363] - Issue with character encoding of Success returned from Login using Thrift Proxy and NodeJS
+ * [THRIFT-2359] - TBufferedTransport doesn't clear it's buffer on a failed flush call
+ * [THRIFT-2428] - Python 3 setup.py support
+ * [THRIFT-2367] - Build failure: stdlib and boost both define uint64_t
+ * [THRIFT-2365] - C# decodes too many binary bytes from JSON
+ * [THRIFT-2402] - byte count of FrameBuffer in AWAITING_CLOSE state is not subtracted from readBufferBytesAllocated
+ * [THRIFT-2396] - Build Error on MacOSX
+ * [THRIFT-2395] - thrift Ruby gem requires development dependency 'thin' regardless of environment
+ * [THRIFT-2414] - c_glib fix several bug.
+ * [THRIFT-2420] - Go argument parser for methods without arguments does not skip fields
+ * [THRIFT-2439] - Bug in TProtocolDecorator Class causes parsing errors
+ * [THRIFT-2419] - golang - Fix fmt.Errorf in generated code
+ * [THRIFT-2418] - Go handler function panics on internal error
+ * [THRIFT-2405] - Node.js Multiplexer tests fail (silently)
+ * [THRIFT-2581] - TFDTransport destructor should not throw
+ * [THRIFT-2575] - Thrift includes siginfo_t within apache::thrift::protocol namespace
+ * [THRIFT-2577] - TFileTransport missuse of closesocket on windows platform
+ * [THRIFT-2576] - Implement Thrift.Protocol.prototype.skip method in JavaScript library
+ * [THRIFT-2588] - Thrift compiler is not buildable in Visual Studio 2010
+ * [THRIFT-2594] - JS Compiler: Single quotes are not being escaped in constants.
+ * [THRIFT-2591] - TFramedTransport does not handle payloads split across packets correctly
+ * [THRIFT-2599] - Uncompileable Delphi code due to naming conflicts with IDL
+ * [THRIFT-2590] - C++ Visual Studio solution doesn't include Multiplexing support
+ * [THRIFT-2595] - Node.js: Fix global leaks and copy-paste errors
+ * [THRIFT-2565] - autoconf fails to find mingw-g++ cross compiler on travis CI
+ * [THRIFT-2555] - excessive "unused field" comments
+ * [THRIFT-2554] - double initialization in generated Read() method
+ * [THRIFT-2551] - OutOfMemoryError "unable to create new native thread" kills serve thread
+ * [THRIFT-2543] - Generated enum type in haskell should be qualified
+ * [THRIFT-2560] - Thrift compiler generator tries to concat ints with strings using +
+ * [THRIFT-2559] - Centos 6.5 unable to "make" with Thrift 0.9.1
+ * [THRIFT-2526] - Assignment operators and copy constructors in c++ don't copy the __isset struct
+ * [THRIFT-2454] - c_glib: There is no gethostbyname_r() in some OS.
+ * [THRIFT-2451] - Do not use pointers for optional fields with defaults. Do not write such fields if its value set to default. Also, do not use pointers for any optional fields mapped to go map or slice. generate Get accessors
+ * [THRIFT-2450] - include HowToContribute in the src repo
+ * [THRIFT-2448] - thrift/test/test.sh has incorrect Node.js test path
+ * [THRIFT-2460] - unopened socket fd must be less than zero.
+ * [THRIFT-2459] - --version should not exit 1
+ * [THRIFT-2468] - Timestamp handling
+ * [THRIFT-2467] - Unable to build contrib/fb303 on OSX 10.9.2
+ * [THRIFT-2466] - Improper error handling for SSL/TLS connections that don't complete a handshake
+ * [THRIFT-2463] - test/py/RunClientServer.py fails sometimes
+ * [THRIFT-2458] - Generated golang server code for "oneway" methods is incorrect
+ * [THRIFT-2456] - THttpClient fails when using async support outside Silverlight
+ * [THRIFT-2524] - Visual Studio project is missing TThreadedServer files
+ * [THRIFT-2523] - Visual Studio project is missing OverlappedSubmissionThread files
+ * [THRIFT-2520] - cpp:cob_style generates incorrect .tcc file
+ * [THRIFT-2508] - Uncompileable C# code due to language keywords in IDL
+ * [THRIFT-2506] - Update TProtocolException error codes to be used consistently throughout the library
+ * [THRIFT-2505] - go: struct should always be a pointer to avoid copying of potentially size-unbounded structs
+ * [THRIFT-2515] - TLS Method error during make
+ * [THRIFT-2503] - C++: Fix name collision when a struct has a member named "val"
+ * [THRIFT-2477] - thrift --help text with misplaced comma
+ * [THRIFT-2492] - test/cpp does not compile on mac
+ * [THRIFT-2500] - sending random data crashes thrift(golang) service
+ * [THRIFT-2475] - c_glib: buffered_transport_write function return always TRUE.
+ * [THRIFT-2495] - JavaScript/Node string constants lack proper escaping
+ * [THRIFT-2491] - unable to import generated ThriftTest service
+ * [THRIFT-2490] - c_glib: if fail to read a exception from server, client may be occurred double free
+ * [THRIFT-2470] - THttpHandler swallows exceptions from processor
+ * [THRIFT-2533] - Boost version in requirements should be updated
+ * [THRIFT-2532] - Java version in installation requirements should be updated
+ * [THRIFT-2529] - TBufferedTransport split Tcp data bug in nodeJs
+ * [THRIFT-2537] - Path for "go get" does not work (pull request 115)
+ * [THRIFT-2443] - Node fails cross lang tests
+ * [THRIFT-2437] - Author fields in Python setup.py must be strings not lists.
+ * [THRIFT-2435] - Java compiler doesn't like struct member names that are identical to an existing enum or struct type
+ * [THRIFT-2434] - Missing namespace import for php TMultiplexedProcessor implementation
+ * [THRIFT-2432] - Flaky parallel build
+ * [THRIFT-2430] - Crash during TThreadPoolServer shutdown
+ * [THRIFT-667] - Period should not be allowed in identifier names
+ * [THRIFT-1212] - Members capital case conflict
+ * [THRIFT-2584] - Error handler not listened on javascript client
+ * [THRIFT-2294] - Incorrect Makefile generation
+ * [THRIFT-2601] - Fix vagrant to work again for builds again
+ * [THRIFT-2092] - TNonblocking server should release handler as soon as connection closes
+ * [THRIFT-2557] - CS0542 member names cannot be the same as their enclosing type
+ * [THRIFT-2605] - TSocket warning on gcc 4.8.3
+ * [THRIFT-2607] - ThreadManager.cpp warning on clang++ 3.4
+ * [THRIFT-1998] - TCompactProtocol.tcc - one more warning on Visual 2010
+ * [THRIFT-2610] - MSVC warning in TSocket.cpp
+ * [THRIFT-2614] - TNonblockingServer.cpp warnings on MSVC
+ * [THRIFT-2608] - TNonblockingServer.cpp warnings on clang 3.4
+ * [THRIFT-2606] - ThreadManager.h warning in clang++ 3.4
+ * [THRIFT-2609] - TFileTransport.h unused field warning (clang 3.4)
+ * [THRIFT-2416] - Cannot use TCompactProtocol with MSVC
+ * [THRIFT-1803] - Ruby Thrift 0.9.0 tries to encode UUID to UTF8 and crashes
+ * [THRIFT-2385] - Problem with gethostbyname2 during make check
+ * [THRIFT-2262] - thrift server 'MutateRow' operation gives no indication of success / failure
+ * [THRIFT-2048] - Prefer boolean context to nullptr_t conversion
+ * [THRIFT-2528] - Thrift Erlang Library: Multiple thrift applications in one bundle
+ * [THRIFT-1999] - warning on gcc 4.7 while compiling BoostMutex.cpp
+ * [THRIFT-2104] - Structs lose binary data when transferred from server to client in Java
+ * [THRIFT-2184] - undefined method rspec_verify for Thrift::MemoryBufferTransport
+ * [THRIFT-2351] - PHP TCompactProtocol has fails to decode messages
+ * [THRIFT-2016] - Resource Leak in thrift struct under compiler/cpp/src/parse/t_function.h
+ * [THRIFT-2273] - Please delete old releases from mirroring system
+ * [THRIFT-2270] - Faulty library version numbering at build or documentation
+ * [THRIFT-2203] - Tests keeping failing on Jenkins and Travis CI
+ * [THRIFT-2399] - thrift.el: recognize "//"-style comments in emacs thrift-mode
+ * [THRIFT-2582] - "FileTransport error" exception is raised when trying to use Java's TFileTransport
+ * [THRIFT-1682] - Multiple thread calling a Service function unsafely causes message corruption and terminates with Broken Pipe
+ * [THRIFT-2357] - recurse option has no effect when generating php
+ * [THRIFT-2248] - Go generator doesn't deal well with map keys of type binary
+ * [THRIFT-2426] - clarify IP rights and contributions from fbthrift
+ * [THRIFT-2041] - TNonblocking server compilation on windows (ARITHMETIC_RIGHT_SHIFT)
+ * [THRIFT-2400] - thrift.el: recognize "//"-style comments in emacs thrift-mode
+ * [THRIFT-1717] - Fix deb build in jenkins
+ * [THRIFT-2266] - ThreadManager.h:24:10: fatal error: 'tr1/functional' file not found on Mac 10.9 (Mavericks)
+ * [THRIFT-1300] - Test failures with parallel builds (make -j)
+ * [THRIFT-2487] - Tutorial requires two IDL files but only one is linked from the Thrift web site
+ * [THRIFT-2329] - missing release tags within git
+ * [THRIFT-2306] - concurent client calls with nodejs
+ * [THRIFT-2222] - ruby gem cannot be compiled on OS X mavericks
+ * [THRIFT-2381] - code which generated by thrift2/hbase.thrift compile error
+ * [THRIFT-2390] - no close event when connection lost
+ * [THRIFT-2146] - Unable to pass multiple "--gen" options to the thrift compiler
+ * [THRIFT-2438] - Unexpected readFieldEnd call causes JSON Parsing errors
+ * [THRIFT-2498] - Error message "Invalid method name" while trying to call HBase Thrift API
+ * [THRIFT-841] - Build cruft
+ * [THRIFT-2570] - Wrong URL given in http://thrift.apache.org/developers
+ * [THRIFT-2604] - Fix debian packaging
+ * [THRIFT-2618] - Unignore /aclocal files required for build
+ * [THRIFT-2562] - ./configure create MakeFile in lib/d with errors
+ * [THRIFT-2593] - Unable to build thrift on ubuntu-12.04 (Precise)
+ * [THRIFT-2461] - Can't install thrift-0.8.0 on OS X 10.9.2
+ * [THRIFT-2602] - Fix missing dist files
+ * [THRIFT-2620] - Fix python packaging
+ * [THRIFT-2545] - Test CPP fails to build (possibly typo)
+
+## Documentation
+ * [THRIFT-2155] - Adding one liner guide to rename the version.h.in and rename thrifty.cc.h
+ * [THRIFT-1991] - Add exceptions to examples
+ * [THRIFT-2334] - add a tutorial for node JS
+ * [THRIFT-2392] - Actionscript tutorial
+ * [THRIFT-2383] - contrib: sample for connecting Thrift with Rebus
+ * [THRIFT-2382] - contrib: sample for connecting Thrift with STOMP
+
+## Improvement
+ * [THRIFT-1457] - Capacity of TframedTransport write buffer is never reset
+ * [THRIFT-1135] - Node.js tutorial
+ * [THRIFT-1371] - Socket timeouts (SO_RCVTIMEO and SO_SNDTIMEO) not supported on Solaris
+ * [THRIFT-2142] - Minor tweaks to thrift.el for better emacs package compatibility
+ * [THRIFT-2268] - Modify TSaslTransport to ignore TCP health checks from loadbalancers
+ * [THRIFT-2264] - GitHub page incorrectly states that Thrift is still incubating
+ * [THRIFT-2263] - Always generate good hashCode for Java
+ * [THRIFT-2233] - Java compiler should defensively copy its binary inputs
+ * [THRIFT-2239] - Address FindBugs errors
+ * [THRIFT-2249] - Add SMP Build option to thrift.spec (and three config defines)
+ * [THRIFT-2254] - Exceptions generated by Go compiler should implement error interface
+ * [THRIFT-2260] - Thrift imposes unneeded dependency on commons-lang3
+ * [THRIFT-2258] - Add TLS v1.1/1.2 support to TSSLSocket.cpp
+ * [THRIFT-2205] - Node.js Test Server to support test.js JavaScript Browser test and sundry fixes
+ * [THRIFT-2204] - SSL client for the cocoa client
+ * [THRIFT-2172] - Java compiler allocates optionals array for every struct with an optional field
+ * [THRIFT-2185] - use cabal instead of runhaskell in haskell library
+ * [THRIFT-1926] - PHP Constant Generation Refactoring
+ * [THRIFT-2029] - Port C++ tests to Windows
+ * [THRIFT-2054] - TSimpleFileTransport - Java Lib has no straight forward TTransport based file transport
+ * [THRIFT-2040] - "uninitialized variable" warnings on MSVC/windows
+ * [THRIFT-2034] - Give developers' C++ code direct access to socket FDs on server side
+ * [THRIFT-2095] - Use print function for Python 3 compatiblity
+ * [THRIFT-1868] - Make the TPC backlog configurable in the Java servers
+ * [THRIFT-1813] - Add @Generated annotation to generated classes
+ * [THRIFT-1815] - Code generators line buffer output
+ * [THRIFT-2305] - TFramedTransport empty constructor should probably be private
+ * [THRIFT-2304] - Move client assignments from construtor in method
+ * [THRIFT-2309] - Ruby (gem) & PHP RPM subpackages
+ * [THRIFT-2318] - perl: dependency Class::Accessor not checked
+ * [THRIFT-2317] - exclude tutorial from build
+ * [THRIFT-2320] - Program level doctext does not get attached by parser
+ * [THRIFT-2349] - Golang - improve tutorial
+ * [THRIFT-2348] - PHP Generator: add array typehint to functions
+ * [THRIFT-2344] - configure.ac: compiler-only option
+ * [THRIFT-2343] - Golang - Return a single error for all exceptions instead of multiple return values
+ * [THRIFT-2341] - Enable generation of Delphi XMLDoc comments (a.k.a. "Help Insight")
+ * [THRIFT-2355] - Add SSL and Web Socket Support to Node and JavaScript
+ * [THRIFT-2350] - Add async calls to normal JavaScript
+ * [THRIFT-2330] - Generate PHPDoc comments
+ * [THRIFT-2332] - RPMBUILD: run bootstrap (if needed)
+ * [THRIFT-2391] - simple socket transport for actionscript 3.0
+ * [THRIFT-2376] - nodejs: allow Promise style calls for client and server
+ * [THRIFT-2369] - Add ssl support for nodejs implementation
+ * [THRIFT-2401] - Haskell tutorial compiles
+ * [THRIFT-2417] - C# Union classes are not partial
+ * [THRIFT-2415] - Named pipes server performance & message mode
+ * [THRIFT-2404] - emit warning on (typically inefficient) list
+ * [THRIFT-2398] - Improve Node Server Library
+ * [THRIFT-2397] - Add CORS and CSP support for JavaScript and Node.js libraries
+ * [THRIFT-2407] - use markdown (rename README => README.md)
+ * [THRIFT-2300] - D configure info output should follow same format as other languages
+ * [THRIFT-2579] - Windows CE support
+ * [THRIFT-2574] - Compiler option to generate namespace directories for Ruby
+ * [THRIFT-2571] - Simplify cross compilation using CMake
+ * [THRIFT-2569] - Introduce file to specify third party library locations on Windows
+ * [THRIFT-2568] - Implement own certificate handler
+ * [THRIFT-2552] - eliminate warning from configure.ac
+ * [THRIFT-2549] - Generate json tag for struct members. use go.tag annotation to override the default generated tag.
+ * [THRIFT-2544] - Add support for socket transport for c# library when using Windows Phone projects
+ * [THRIFT-2453] - haskell tutorial: fix up division by 0 example
+ * [THRIFT-2449] - Enhance typedef structure to distinguish between forwards and real typedefs
+ * [THRIFT-2446] - There is no way to handle server stream errors
+ * [THRIFT-2455] - Allow client certificates to be used with THttpClient
+ * [THRIFT-2511] - Node.js needs the compact protocol
+ * [THRIFT-2493] - Node.js lib needs HTTP client
+ * [THRIFT-2502] - Optimize go implementations of binary and compact protocols for speed
+ * [THRIFT-2494] - Add enum toString helper function in c_glib
+ * [THRIFT-2471] - Make cpp.ref annotation language agnostic
+ * [THRIFT-2497] - server and client for test/go, also several fixes and improvements
+ * [THRIFT-2535] - TJSONProtocol when serialized yields TField ids rather than names
+ * [THRIFT-2220] - Add a new struct structv?
+ * [THRIFT-1352] - Thrift server
+ * [THRIFT-989] - Push boost m4 macros upstream
+ * [THRIFT-1349] - Remove unnecessary print outs
+ * [THRIFT-2496] - server and client for test/go, also several fixes and improvements
+ * [THRIFT-1114] - Maven publish shouldn't require passwords hardcoded in settings.xml
+ * [THRIFT-2043] - visual 2010 warnings - unreachable code
+ * [THRIFT-1683] - Implement alternatives to Javascript Client side Transport protocol, just as NPAPI and WebSocket.
+ * [THRIFT-1746] - provide a SPDX file
+ * [THRIFT-1772] - Serialization does not check types of embedded structures.
+ * [THRIFT-2387] - nodejs: external imports should be centralized in index.js
+ * [THRIFT-2037] - More general macro THRIFT_UNUSED_VARIABLE
+
+## New Feature
+ * [THRIFT-1012] - Transport for DataInput DataOutput interface
+ * [THRIFT-2256] - Using c++11/c++0x std library replace boost library
+ * [THRIFT-2250] - JSON and MemoryBuffer for JavaME
+ * [THRIFT-2114] - Python Service Remote SSL Option
+ * [THRIFT-1719] - SASL client support for Python
+ * [THRIFT-1894] - Thrift multi-threaded async Java Server using Java 7 AsynchronousChannelGroup
+ * [THRIFT-1893] - HTTP/JSON server/client for node js
+ * [THRIFT-2347] - C# TLS Transport based on THRIFT-181
+ * [THRIFT-2377] - Allow addition of custom HTTP Headers to an HTTP Transport
+ * [THRIFT-2408] - Named Pipe Transport Option for C#
+ * [THRIFT-2572] - Add string/collection length limit checks (from C++) to java protocol readers
+ * [THRIFT-2469] - "java:fullcamel" option to automatically camel-case underscored attribute names
+ * [THRIFT-795] - Importing service functions (simulation multiple inheritance)
+ * [THRIFT-2164] - Add a Get/Post Http Server to Node along with examples
+ * [THRIFT-2255] - add Parent Class for generated Struct class
+
+## Question
+ * [THRIFT-2539] - Tsocket.cpp addrinfo ai_flags = AI_ADDRCONFIG
+ * [THRIFT-2440] - how to connect as3 to java by thrift ,
+ * [THRIFT-2379] - Memmory leaking while using multithreading in C++ server.
+ * [THRIFT-2277] - Thrift: installing fb303 error
+ * [THRIFT-2567] - Csharp slow ?
+ * [THRIFT-2573] - thrift 0.9.2 release
+
+## Sub-task
+ * [THRIFT-981] - cocoa: add version Info to the library
+ * [THRIFT-2132] - Go: Support for Multiplexing Services on any Transport, Protocol and Server
+ * [THRIFT-2299] - TJsonProtocol implementation for Ruby does not allow for both possible slash (solidus) encodings
+ * [THRIFT-2298] - TJsonProtocol implementation for C# does not allow for both possible slash (solidus) encodings
+ * [THRIFT-2297] - TJsonProtocol implementation for Delphi does not allow for both possible slash (solidus) encodings
+ * [THRIFT-2271] - JavaScript: Support for Multiplexing Services
+ * [THRIFT-2251] - go test for compact protocol is not running
+ * [THRIFT-2195] - Delphi: Add event handlers for server and processing events
+ * [THRIFT-2176] - TSimpleJSONProtocol.ReadFieldBegin() does not return field type and ID
+ * [THRIFT-2175] - Wrong field type set for binary
+ * [THRIFT-2174] - Deserializing JSON fails in specific cases
+ * [THRIFT-2053] - NodeJS: Support for Multiplexing Services
+ * [THRIFT-1914] - Python: Support for Multiplexing Services on any Transport, Protocol and Server
+ * [THRIFT-1810] - add ruby to test/test.sh
+ * [THRIFT-2310] - PHP: Client-side support for Multiplexing Services
+ * [THRIFT-2346] - C#: UTF-8 sent by PHP as JSON is not understood by TJsonProtocol
+ * [THRIFT-2345] - Delphi: UTF-8 sent by PHP as JSON is not understood by TJsonProtocol
+ * [THRIFT-2338] - First doctext wrongly interpreted as program doctext in some cases
+ * [THRIFT-2325] - SSL test certificates
+ * [THRIFT-2358] - C++: add compact protocol to cross language test suite
+ * [THRIFT-2425] - PHP: Server-side support for Multiplexing Services
+ * [THRIFT-2421] - Tree/Recursive struct support in thrift
+ * [THRIFT-2290] - Update Go tutorial to align with THRIFT-2232
+ * [THRIFT-2558] - CSharp compiler generator tries to concat ints with strings using +
+ * [THRIFT-2507] - Additional LUA TProtocolException error code needed?
+ * [THRIFT-2499] - Compiler: allow annotations without "= value"
+ * [THRIFT-2534] - Cross language test results should recorded to a status.md or status.html file automatically
+ * [THRIFT-66] - Java: Allow multiplexing multiple services over a single TCP connection
+ * [THRIFT-1681] - Add Lua Support
+ * [THRIFT-1727] - Ruby-1.9: data loss: "binary" fields are re-encoded
+ * [THRIFT-1726] - Ruby-1.9: "binary" fields are represented by string whose encoding is "UTF-8"
+ * [THRIFT-988] - perl: add version Info to the library via configure
+ * [THRIFT-334] - Compact Protocol for PHP
+ * [THRIFT-2444] - pull request 88: thrift: clean up enum value assignment
+
+## Task
+ * [THRIFT-2223] - Spam links on wiki
+ * [THRIFT-2566] - Please create a DOAP file for your TLP
+ * [THRIFT-2237] - Update archive to contain all versions
+ * [THRIFT-962] - Tutorial page on our website is really unhelpful
+
+## Test
+ * [THRIFT-2327] - nodejs: nodejs test suite should be bundled with the library
+ * [THRIFT-2445] - THRIFT-2384 (code generation for go maps with binary keys) should be tested
+ * [THRIFT-2501] - C# The test parameters from the TestServer and TestClient are different from the http://thrift.apache.org/test/
+
+## Wish
+ * [THRIFT-2190] - Add the JavaScript thrift.js lib to the Bower registry
+ * [THRIFT-2076] - boost::optional instead of __isset
+
+
+
+Thrift 0.9.1
+--------------------------------------------------------------------------------
+## Bug
+ * [THRIFT-1440] - debian packaging: minor-ish policy problems
+ * [THRIFT-1402] - Generated Y_types.js does not require() X_types.js when an include in the IDL file was used
+ * [THRIFT-1551] - 2 thrift file define only struct (no service), one include another, the gen nodejs file didn't have "requires" at the top
+ * [THRIFT-1264] - TSocketClient is queried by run loop after deallocation in Cocoa
+ * [THRIFT-1600] - Thrift Go Compiler and Library out of date with Go 1 Release.
+ * [THRIFT-1603] - Thrift IDL allows for multiple exceptions, args or struct member names to be the same
+ * [THRIFT-1062] - Problems with python tutorials
+ * [THRIFT-864] - default value fails if identifier is a struct
+ * [THRIFT-930] - Ruby and Haskell bindings don't properly support DESTDIR (makes packaging painful)
+ * [THRIFT-820] - The readLength attribute of TBinaryProtocol is used as an instance variable and is decremented on each call of checkReadLength
+ * [THRIFT-1640] - None of the tutorials linked on the website contain content
+ * [THRIFT-1637] - NPM registry does not include version 0.8
+ * [THRIFT-1648] - NodeJS clients always receive 0 for 'double' values.
+ * [THRIFT-1660] - Python Thrift library can be installed with pip but not easy_install
+ * [THRIFT-1657] - Chrome browser sending OPTIONS method before POST in xmlHttpRequest
+ * [THRIFT-2118] - Certificate error handling still incorrect
+ * [THRIFT-2137] - Ruby test lib fails jenkins build #864
+ * [THRIFT-2136] - Vagrant build not compiling java, ruby, php, go libs due to missing dependencies
+ * [THRIFT-2135] - GO lib leaves behind test files that are auto generated
+ * [THRIFT-2134] - mingw-cross-compile script failing with strip errors
+ * [THRIFT-2133] - java TestTBinaryProtocol.java test failing
+ * [THRIFT-2126] - lib/cpp/src/thrift/concurrency/STD* files missing from DIST
+ * [THRIFT-2125] - debian missing from DIST
+ * [THRIFT-2124] - .o, .so, .la, .deps, .libs, gen-* files left tutorials, test and lib/cpp when making DIST
+ * [THRIFT-2123] - GO lib missing files in DIST build
+ * [THRIFT-2121] - Compilation bug for Node.js
+ * [THRIFT-2129] - php ext missing from dist
+ * [THRIFT-2128] - lib GO tests fail with funct ends without a return statement
+ * [THRIFT-2286] - Failed to compile Thrift0.9.1 with boost1.55 by VS2010 if select Debug-mt&x64 mode.
+ * [THRIFT-1973] - TCompactProtocol in C# lib does not serialize and deserialize negative int32 and int64 number correctly
+ * [THRIFT-1992] - casts in TCompactProtocol.tcc causing "dereferencing type-punned pointer will break strict-aliasing rules" warnings from gcc
+ * [THRIFT-1930] - C# generates unsigned byte for Thrift "byte" type
+ * [THRIFT-1929] - Update website to use Mirrors for downloads
+ * [THRIFT-1928] - Race may still exist in TFileTransport::flush()
+ * [THRIFT-1934] - Tabs in Example section on main page are not working
+ * [THRIFT-1933] - Delphi generator crashes when a typedef references another typedef from an included file
+ * [THRIFT-1942] - Binary accelerated cpp extension does not use Thrift namespaces for Exceptions
+ * [THRIFT-1959] - C#: Add Union TMemoryBuffer support
+ * [THRIFT-1958] - C#: Use static Object.Equals instead of .Equals() calls in equals
+ * [THRIFT-1957] - NodeJS TFramedTransport and TBufferedTransport read bytes as unsigned
+ * [THRIFT-1955] - Union Type writer generated in C# does not WriteStructBegin
+ * [THRIFT-1952] - Travis CI
+ * [THRIFT-1949] - WP7 build broken
+ * [THRIFT-1943] - docstrings for enum values are ignored
+ * [THRIFT-2070] - Improper `HexChar' and 'HexVal' implementation in TJSONProtocol.cs
+ * [THRIFT-2017] - Resource Leak in thrift struct under compiler/cpp/src/parse/t_program.h
+ * [THRIFT-2032] - C# client leaks sockets/handles
+ * [THRIFT-1996] - JavaME Constants generation is broken / inconsistent with regular Java generation
+ * [THRIFT-2002] - Haskell: Test use Data.Maybe instead of Maybe
+ * [THRIFT-2051] - Vagrant fails to build erlang
+ * [THRIFT-2050] - Vagrant C# lib compile fails with TException missing
+ * [THRIFT-1978] - Ruby: Thrift should allow for the SSL verify mode to be set
+ * [THRIFT-1984] - namespace collision in python bindings
+ * [THRIFT-1988] - When trying to build a debian package it fails as the file NEWS doesn't exist
+ * [THRIFT-1975] - TBinaryProtocol CheckLength can't be used for a client
+ * [THRIFT-1995] - '.' allowed at end of identifier generates non-compilable code
+ * [THRIFT-2112] - Error in Go generator when using typedefs in map keys
+ * [THRIFT-2088] - Typos in Thrift compiler help text
+ * [THRIFT-2080] - C# multiplex processor does not catch IOException
+ * [THRIFT-2082] - Executing "gmake clean" is broken
+ * [THRIFT-2102] - constants are not referencing to correct type when included from another thrift file
+ * [THRIFT-2100] - typedefs are not correctly referenced when including from other thrift files
+ * [THRIFT-2066] - 'make install' does not install two headers required for C++ bindings
+ * [THRIFT-2065] - Not valid constants filename in Java
+ * [THRIFT-2047] - Thrift.Protocol.TCompactProtocol, intToZigZag data lost (TCompactProtocol.cs)
+ * [THRIFT-2036] - Thrift gem warns about class variable access from top level
+ * [THRIFT-2057] - Vagrant fails on php tests
+ * [THRIFT-2105] - Generated code for default values of collections ignores t_field::T_REQUIRED
+ * [THRIFT-2091] - Unnecessary 'friend' declaration causes warning in TWinsockSingleton
+ * [THRIFT-2090] - Go generator, fix including of other thrift files
+ * [THRIFT-2106] - Fix support for namespaces in GO generator
+ * [THRIFT-1783] - C# doesn't handle required fields correctly
+ * [THRIFT-1782] - async only defined in silverlight
+ * [THRIFT-1779] - Missing process_XXXX method in generated TProcessor implementation for all 'oneway' service functions
+ * [THRIFT-1692] - SO_REUSEADDR allows for socket hijacking on Windows
+ * [THRIFT-1720] - JRuby times out on successful connection
+ * [THRIFT-1713] - Named and Anonymous Pipe transport (Delphi)
+ * [THRIFT-1699] - Native Union#read has extra read_field_end call
+ * [THRIFT-1749] - Python TSSLSocket error handling obscures actual error
+ * [THRIFT-1748] - Guard and RWGuard macros defined in global namespace
+ * [THRIFT-1734] - Front webpage is still advertising v0.8 as current release
+ * [THRIFT-1729] - C glib refactor left empty folders in svn
+ * [THRIFT-1767] - unions can't have required fields (Delphi)
+ * [THRIFT-1765] - Incorrect error message printed for null or negative keys
+ * [THRIFT-1778] - Configure requires manual intervention due to tar failure
+ * [THRIFT-1777] - TPipeServer is UNSTOPPABLE
+ * [THRIFT-1753] - Multiple C++ Windows, OSX, and iOS portability issues
+ * [THRIFT-1756] - 'make -j 8' fails with "unterminated #ifdef" error
+ * [THRIFT-1773] - Python library should run on python 2.4
+ * [THRIFT-1769] - unions can't have required fields (C++)
+ * [THRIFT-1768] - unions can't have required fields (Compiler)
+ * [THRIFT-1666] - htonll usage in TBinaryProtocol.tcc generates warning with MSVC2010
+ * [THRIFT-1919] - libthrift depends on httpcore-4.1.3 (directly) and httpcore-4.1.4 (transitively)
+ * [THRIFT-1864] - implement event handler for non-blocking server
+ * [THRIFT-1859] - Generated error c++ code with -out and include_prefix param
+ * [THRIFT-1869] - TThreadPoolServer (java) dies when threadpool is consumed
+ * [THRIFT-1842] - Memory leak with Pipes
+ * [THRIFT-1838] - Can't build compiler on OS X because of missing thrifty.h
+ * [THRIFT-1846] - Restore socket.h header to support builds with Android NDK
+ * [THRIFT-1850] - make check hangs on TSocket tests in TransportTest.cpp
+ * [THRIFT-1873] - Binary protocol factory ignores struct read/write flags
+ * [THRIFT-1872] - issues with TBufferedTransport buffer
+ * [THRIFT-1904] - Incorrect code is generated for typedefs which use included types
+ * [THRIFT-1903] - PHP namespaces cause binary protocols to not be used
+ * [THRIFT-1895] - Delphi: reserved variable name "result" not detected properly
+ * [THRIFT-1881] - TNonblockingServer does not release open connections or threads on shutdown
+ * [THRIFT-1888] - Java Thrift client can't connect to Python Thrift server on same host
+ * [THRIFT-1831] - Bug in list deserializer
+ * [THRIFT-1824] - many compile warning, becase Thread.h includes config.h
+ * [THRIFT-1823] - Missing parenthesis breaks "IS_..." macro in generated code
+ * [THRIFT-1806] - Python generation always truncates __init__.py files
+ * [THRIFT-1795] - Race condition in TThreadedServerPool java implementation
+ * [THRIFT-1794] - C# asyncctp broken
+ * [THRIFT-1804] - Binary+compact protocol single byte error in Ruby library (ARM architecture): caused by different char signedness
+ * [THRIFT-1800] - Documentation text not always escaped correctly when rendered to HTML
+ * [THRIFT-1788] - C#: Constants static constructor does not compile
+ * [THRIFT-1816] - Need "require" included thrift files in "xxx_types.js"
+ * [THRIFT-1907] - Compiling namespace and sub-namespace directives for unrecognized generators should only be a warning
+ * [THRIFT-1913] - skipping unknown fields in java unions
+ * [THRIFT-2553] - C++ linker error - transport/TSocket
+ * [THRIFT-274] - Towards a working release/versioning process
+
+## Documentation
+ * [THRIFT-1971] - [Graphviz] Adds tutorial/general description documentation
+ * [THRIFT-2001] - http://thrift.apache.org/ Example "C++ Server" tab is broken
+
+## Improvement
+ * [THRIFT-1574] - Apache project branding requirements: DOAP file [PATCH]
+ * [THRIFT-1347] - Unify the exceptions returned in generated Go code
+ * [THRIFT-1353] - Switch to performance branch, get rid of BinaryParser
+ * [THRIFT-1629] - Ruby 1.9 Compatibility during Thrift configure, make, install
+ * [THRIFT-991] - Refactor Haskell code and generator
+ * [THRIFT-990] - Sanify gettimeofday usage codebase-wide
+ * [THRIFT-791] - Let C++ TSimpleServer be driven by an external main loop
+ * [THRIFT-2117] - Cocoa TBinaryProtocol strictWrite should be set to true by default
+ * [THRIFT-2014] - Change C++ lib includes to use style throughout
+ * [THRIFT-1972] - Add support for async processors
+ * [THRIFT-1970] - [Graphviz] Adds option to render exceptions relationships
+ * [THRIFT-1966] - Support different files for SSL certificates and keys
+ * [THRIFT-1965] - Adds Graphviz (graph description language) generator
+ * [THRIFT-1956] - Switch to Apache Commons Lang 3
+ * [THRIFT-1962] - Multiplex processor should send any TApplicationException back to client
+ * [THRIFT-1960] - main() declares 22 unused gen bools
+ * [THRIFT-1951] - libthrift.jar has source files in it
+ * [THRIFT-1997] - Add accept backlog configuration method to TServerSocket
+ * [THRIFT-2003] - Deprecate senum
+ * [THRIFT-2052] - Vagrant machine image defaults to only 384MB of RAM
+ * [THRIFT-1980] - Modernize Go tooling, fix go client libary.
+ * [THRIFT-1977] - C# compiler should generate constant files prefixed with thrift file name
+ * [THRIFT-1985] - add a Vagrantfile to build and test Apache Thrift fully reproducable
+ * [THRIFT-1994] - Deprecate slist
+ * [THRIFT-1993] - Factory to create instances from known (generated) interface types with Delphi
+ * [THRIFT-2081] - Specified timeout should be used in TSocket.Open()
+ * [THRIFT-2084] - Delphi: Ability to create entity Thrift-generated instances based on TypeInfo
+ * [THRIFT-2083] - Improve the go lib: buffered Transport, save memory allocation, handle concurrent request
+ * [THRIFT-2109] - Secure connections should be supported in Go
+ * [THRIFT-2107] - minor Go generator fixes
+ * [THRIFT-1695] - allow warning-free compilation in VS 2012 and GNU 4.6
+ * [THRIFT-1735] - integrate tutorial into regular build
+ * [THRIFT-1716] - max allowed connections should be PIPE_UNLIMITED_INSTANCES
+ * [THRIFT-1715] - Allow excluding python parts when building contrib/fb303
+ * [THRIFT-1733] - Fix RPM build issues on RHEL6/OL6 systems
+ * [THRIFT-1728] - Upgradation of httpcomponents
+ * [THRIFT-1876] - Use enum names instead of casted integers in assignments
+ * [THRIFT-1874] - timeout for the server-side end of a named pipe
+ * [THRIFT-1897] - Support validation of required fields
+ * [THRIFT-1896] - Add TBase protocol for Cocoa
+ * [THRIFT-1880] - Make named pipes server work asynchronously (overlapped) to allow for clean server stops
+ * [THRIFT-1878] - Add the possibility to send custom headers
+ * [THRIFT-1882] - Use single include
+ * [THRIFT-1793] - C#: Use static read instead of instance read
+ * [THRIFT-1799] - Option to generate HTML in "standalone mode"
+ * [THRIFT-1815] - Code generators line buffer output
+ * [THRIFT-1890] - C++: Make named pipes server work asynchronously
+ * [THRIFT-474] - Generating Ruby on Rails friendly code
+
+## New Feature
+ * [THRIFT-801] - Provide an interactive shell (irb) when generating ruby bindings
+ * [THRIFT-2292] - Android Library Project
+ * [THRIFT-2012] - Modernizing Go
+ * [THRIFT-1969] - C#: Tests not properly linked from the solution
+ * [THRIFT-1785] - C#: Add TMemoryBuffer serializer/deserializer
+ * [THRIFT-1780] - Add option to generate nullable values
+ * [THRIFT-1786] - C# Union Typing
+ * [THRIFT-591] - Make the C++ runtime library be compatible with Windows and Visual Studio
+ * [THRIFT-514] - Add option to configure compiler output directory
+
+## Question
+ * [THRIFT-1764] - how to get the context of client when on a rpc call in server side?
+ * [THRIFT-1791] - thrift's namespace directive when generating haskell code
+
+## Sub-task
+ * [THRIFT-1594] - Java test clients should have a return codes that reflect whether it succeeds or not.
+ * [THRIFT-1595] - Java test server should follow the documented behavior as of THRIFT-1590
+ * [THRIFT-986] - st: add version Info to the library
+ * [THRIFT-985] - php: add version Info to the library
+ * [THRIFT-984] - ocaml: add version Info to the library
+ * [THRIFT-1924] - Delphi: Inconsistency in serialization of optional fields
+ * [THRIFT-1922] - C#: Inconsistency in serialization of optional fields
+ * [THRIFT-1961] - C# tests should be in lib/csharp/test/...
+ * [THRIFT-1822] - PHP unit test does not work
+ * [THRIFT-1902] - C++: Support for Multiplexing Services on any Transport, Protocol and Server
+ * [THRIFT-1901] - C#: Support for Multiplexing Services on any Transport, Protocol and Server
+ * [THRIFT-1899] - Delphi: Support for Multiplexing Services on any Transport, Protocol and Server
+ * [THRIFT-563] - Support for Multiplexing Services on any Transport, Protocol and Server
+
+
+
+Thrift 0.9
+--------------------------------------------------------------------------------
+## Bug
+ * [THRIFT-1438] - lib/cpp/src/windows/config.h should read version from configure.ac rather than a #define
+ * [THRIFT-1446] - Compile error with Delphi 2009 in constant initializer
+ * [THRIFT-1450] - Problems building thrift 0.8.0 for Python and Ruby
+ * [THRIFT-1449] - Ruby client does not work on solaris (?)
+ * [THRIFT-1447] - NullpointerException in ProcessFunction.class :in "oneway" method
+ * [THRIFT-1433] - TServerSocket fix for MSVC
+ * [THRIFT-1429] - The nonblocking servers is supposed to use TransportFactory to read the data
+ * [THRIFT-1427] - PHP library uses non-multibyte safe functions with mbstring function overloading
+ * [THRIFT-1421] - Debian Packages can not be built
+ * [THRIFT-1394] - Treatment of optional fields is not consistent between C++ and Java
+ * [THRIFT-1511] - Server with oneway support ( JAVA )
+ * [THRIFT-1496] - PHP compiler not namespacing enums
+ * [THRIFT-1495] - PHP TestClient fatals on missing class
+ * [THRIFT-1508] - TServerSocket does not allow for the user to specify the IP address to bind to
+ * [THRIFT-1504] - Cocoa Generator should use local file imports for base Thrift headers
+ * [THRIFT-1512] - Thrift socket support for Windows XP
+ * [THRIFT-1502] - TSimpleServer::serve(): Do not print out error message if server was stopped.
+ * [THRIFT-1501] - PHP old namespaces not generated for enums
+ * [THRIFT-1483] - java compiler does not generate type parameters for services in extended clauses
+ * [THRIFT-1479] - Compiled PHP process functions missing writeMessageEnd()
+ * [THRIFT-1492] - enabling c_glib render thrift unusable (even for C++ code)
+ * [THRIFT-1491] - Uninitialize processorFactory_ member in TServer.h
+ * [THRIFT-1475] - Incomplete records generation for Erlang
+ * [THRIFT-1486] - Javascript manual testserver not returning content types
+ * [THRIFT-1488] - src/concurrency/Thread.h:91:58: error: invalid conversion from 'pthread_t {aka _opaque_pthread_t*}' to 'apache::thrift::concurrency::Thread::id_t {aka long long unsigned int}' [-fpermissive]
+ * [THRIFT-1490] - Windows-specific header files - fixes & tweaks
+ * [THRIFT-1526] - Union TupleSchemeFactory returns StandardSchemes
+ * [THRIFT-1527] - Generated implementation of tupleReadStruct in unions return null when the setfield is unrecognized
+ * [THRIFT-1524] - TNonBlockingServer does not compile in Visual Studio 2010
+ * [THRIFT-1529] - TupleProtocol can unintentionally include an extra byte in bit vectors when number of optional fields is an integral of 8
+ * [THRIFT-1473] - JSON context stack may be left in an incorrect state when an exception is thrown during read or write operations
+ * [THRIFT-1456] - System.Net.HttpWebRequest' does not contain a definition for 'Proxy'
+ * [THRIFT-1468] - Memory leak in TSaslServerTransport
+ * [THRIFT-1461] - Recent TNonblockingServer changes broke --enable-boostthreads=yes, Windows
+ * [THRIFT-1460] - why not add unicode strings support to python directly?
+ * [THRIFT-1464] - AbstractNonblockingServer.FrameBuffer TNonblockingTransport accessor changed from public to private
+ * [THRIFT-1467] - Possible AV with empty strings when using JSON protocol
+ * [THRIFT-1523] - clientTimeout not worked as expected in TServerSocket created by TSSLTransportFactory
+ * [THRIFT-1537] - TFramedTransport issues
+ * [THRIFT-1519] - Thirft Build Failure referencing rb_intern2 symbol
+ * [THRIFT-1518] - Generated C++ code only sends the first optional field in the write() function for a struct.
+ * [THRIFT-1515] - NameError: global name 'TApplicationException' is not defined
+ * [THRIFT-1554] - Inherited service methods are not resolved in derived service implementations
+ * [THRIFT-1553] - thrift nodejs service side can't read map structure, key as enum, value as Object
+ * [THRIFT-1575] - Typo in server/TThreadPoolServer.h
+ * [THRIFT-1327] - Fix Spec Suite under Ruby-1.8.7 (works for MRI Ruby-1.9.2)
+ * [THRIFT-1326] - on some platforms, #include is necessary to be included in Thrift.h
+ * [THRIFT-1159] - THttpClient->Flush() issue (connection thru proxy)
+ * [THRIFT-1277] - Node.js serializes false booleans as null
+ * [THRIFT-1224] - Cannot insert UTF-8 text
+ * [THRIFT-1267] - Node.js can't throw exceptions.
+ * [THRIFT-1338] - Do not use an unpatched autoconf 2.65 to generate release tarball
+ * [THRIFT-1128] - MAC OS X: thrift.h incompatibility with Thrift.h
+ * [THRIFT-1631] - Fix C++ server constructor typos
+ * [THRIFT-1602] - PHP C Extension is not Compatible with PHP 5.4
+ * [THRIFT-1610] - IWebProxy not available on WP7 platform
+ * [THRIFT-1606] - Race condition in BoostThreadFactory.cpp
+ * [THRIFT-1604] - Python exception handeling for changes from PEP 3110
+ * [THRIFT-1607] - Incorrect file modes for several source files
+ * [THRIFT-1583] - c_glib leaks memory
+ * [THRIFT-1582] - Bad includes of nested thrift files in c_glib
+ * [THRIFT-1578] - C_GLib generated code does not compile
+ * [THRIFT-1597] - TJSONProtocol.php is missing from Makefile.am
+ * [THRIFT-1591] - Enable TCP_NODELAY for ruby gem
+ * [THRIFT-1624] - Isset Generated differently on different platforms
+ * [THRIFT-1622] - Incorrect size returned on read
+ * [THRIFT-1621] - Memory leaks
+ * [THRIFT-1612] - Base64 encoding is broken
+ * [THRIFT-1627] - compiler built using compilers.vcxproj cannot be used to build some test .thrift files
+ * [THRIFT-1571] - Update Ruby HTTP transport for recent Ruby versions
+ * [THRIFT-1023] - Thrift encoding (UTF-8) issue with Ruby 1.9.2
+ * [THRIFT-1090] - Document the generation of a file called "Constants.java"
+ * [THRIFT-1082] - Thrift::FramedTransport sometimes calls close() on an undefined value
+ * [THRIFT-956] - Python module's version meta-data should be updated
+ * [THRIFT-973] - Cocoa library won't compile using clang
+ * [THRIFT-1632] - ruby: data corruption in thrift_native implementation of MemoryBufferTransport
+ * [THRIFT-1665] - TBinaryProtocol: exceeded message length raises generic TException
+ * [THRIFT-1664] - Reference to non-existing variable in build script
+ * [THRIFT-1663] - Java Thrift server is not throwing exceptions
+ * [THRIFT-1662] - "removeObject:" should be "removeObserver:" in [-TSocketServer dealloc]?
+ * [THRIFT-1643] - Denial of Service attack in TBinaryProtocol.readString
+ * [THRIFT-1674] - Update Thrift D library to be compatible with 2.060
+ * [THRIFT-1673] - Ruby compile flags for extension for multi arch builds (os x)
+ * [THRIFT-1655] - Configure still trying to use thrift_generators in output
+ * [THRIFT-1654] - c_glib thrift_socket_read() returns corrupted data
+ * [THRIFT-1653] - TThreadedSelectorServer leaks CLOSE_WAIT sockets
+ * [THRIFT-1658] - Java thrift server is not throwing TApplicationException
+ * [THRIFT-1656] - Setting proper headers in THttpServer.cpp so that "Cross-Origin Resource Sharing" on js client can work.
+ * [THRIFT-1652] - TSaslTransport does not log the error when kerberos auth fails
+ * [THRIFT-2272] - CLONE - Denial of Service attack in TBinaryProtocol.readString
+ * [THRIFT-2086] - Invalid generated code for Node.JS when using namespaces
+ * [THRIFT-1686] - t_php_generator.cc uses "and" instead of "&&", and causes compiler errors with Visual Studio
+ * [THRIFT-1693] - libthrift has dependency on two different versions of httpcore
+ * [THRIFT-1689] - don't exit(-1) in TNonblockingServer
+ * [THRIFT-1679] - NodeJS: protocol readString() should treat string as utf8, not binary
+ * [THRIFT-1721] - Dist broken due to 0.8.0 to 0.9.0 changes
+ * [THRIFT-1710] - Minor issues in test case code
+ * [THRIFT-1709] - Warning "Bitwise-or operator used on a sign-extended operand; consider casting to a smaller unsigned type first" in TBinaryProtocol.cs at ReadInt64()
+ * [THRIFT-1707] - [ruby] Adjust server_spec.rb for RSpec 2.11.x and Ruby 1.9.3
+ * [THRIFT-1671] - Cocoa code generator does not put keywords into generated method calls
+ * [THRIFT-1670] - Incompatibilities between different versions of a Thrift interface
+ * [THRIFT-1669] - NameError: global name 'TApplicationException' is not defined
+ * [THRIFT-1668] - Compile error in contrib/fb303, thrift/TDispatchProcessor.h: No such file or directory
+ * [THRIFT-1845] - Fix compiler warning caused by implicit string conversion with Xcode 4.6
+ * [THRIFT-304] - Building the Python library requires development headers
+ * [THRIFT-369] - sets and maps break equality
+ * [THRIFT-556] - Ruby compiler does not correctly referred to top-level modules when a submodule masks the top-level name
+ * [THRIFT-481] - indentation of ruby classes is off by a few
+
+## Improvement
+ * [THRIFT-1498] - Allow TThreadedPoolServer.Args to pass a ExecutorService
+ * [THRIFT-1444] - FunctionRunner - add syntactic sugar to create shared_ptrs
+ * [THRIFT-1443] - define a TProcessor helper class to implement process()
+ * [THRIFT-1441] - Generate constructor with parameters for exception class to let it update message property automatically.
+ * [THRIFT-1520] - Embed version number in erlang .app file
+ * [THRIFT-1480] - python: remove tabs, adjust whitespace and address PEP8 warnings
+ * [THRIFT-1485] - Performance: pass large and/or refcounted arguments as "const"
+ * [THRIFT-1484] - Introduce phpunit test suite
+ * [THRIFT-1532] - The type specifications in the generated Erlang code should include "undefined" where it's used as a default value
+ * [THRIFT-1534] - Required fields in the Delphi code generator.
+ * [THRIFT-1469] - Java isset space optimization
+ * [THRIFT-1465] - Visibility of methods in generated java code
+ * [THRIFT-1453] - Don't change types of arguments when serializing with thrift php extension
+ * [THRIFT-1452] - generate a swap() method for all generated structs
+ * [THRIFT-1451] - FramedTransport: Prevent infinite loop when writing
+ * [THRIFT-1521] - Two patches for more Performance
+ * [THRIFT-1555] - Delphi version of the tutorial code
+ * [THRIFT-1535] - Why thrift don't use wrapped class for optional fields ?
+ * [THRIFT-1204] - Ruby autogenerated files should require 'thrift' gem
+ * [THRIFT-1344] - Using the httpc module directly rather than the deprecated http layer
+ * [THRIFT-1343] - no_auto_import min/2 to avoid compile warning
+ * [THRIFT-1340] - Add support of ARC to Objective-C
+ * [THRIFT-1611] - Improved code generation for typedefs
+ * [THRIFT-1593] - Pass on errors like "connection closed" to the handler module
+ * [THRIFT-1615] - PHP Namespace
+ * [THRIFT-1567] - Thrift/cpp: Allow alternate classes to be used for
+ * [THRIFT-1072] - Missing - (id) initWithSharedProcessor in TSharedProcessorFactory.h
+ * [THRIFT-1650] - [ruby] Update clean items and svn:ignore entries for OS X artifacts
+ * [THRIFT-1661] - [PATCH] Add --with-qt4 configure option
+ * [THRIFT-1675] - Do we have any plan to support scala?
+ * [THRIFT-1645] - Replace Object#tee with more conventional Object#tap in specs
+ * [THRIFT-1644] - Upgrade RSpec to 2.10.x and refactor specs as needed
+ * [THRIFT-1672] - MonoTouch (and Mono for Android) compatibility
+ * [THRIFT-1702] - a thrift manual
+ * [THRIFT-1694] - Re-Enable serialization for WP7 Silverlight
+ * [THRIFT-1691] - Serializer/deserializer support for Delphi
+ * [THRIFT-1688] - Update IDL page markup
+ * [THRIFT-1725] - Tutorial web pages for Delphi and C#
+ * [THRIFT-1714] - [ruby] Explicitly add CWD to Ruby test_suites.rb
+ * [THRIFT-317] - Issues with Java struct validation
+ * [THRIFT-164] - Build web tutorial on Incubator web site
+ * [THRIFT-541] - Cocoa code generator doesn't put keywords before all arguments.
+ * [THRIFT-681] - The HTML generator does not handle JavaDoc style comments very well
+
+## New Feature
+ * [THRIFT-1500] - D programming language support
+ * [THRIFT-1510] - There should be an implementation of the JsonProtocol for ruby
+ * [THRIFT-1115] - python TBase class for dynamic (de)serialization, and __slots__ option for memory savings
+ * [THRIFT-1953] - support for asp.net mvc 3
+
+## Question
+ * [THRIFT-1235] - How could I use THttpServerTransportFactory withTNonBlockingServer
+ * [THRIFT-1368] - TNonblockingServer usage
+ * [THRIFT-1061] - Read an invalid frame size of 0. Are you using TFramedTransport on the client side?
+ * [THRIFT-491] - Ripping raw pthreads out of TFileTransport and associated test issues
+
+## Sub-task
+ * [THRIFT-1596] - Delphi: Test clients should have a return codes that reflect whether they succeeded or not
+ * [THRIFT-982] - javame: add version Info to the library
+ * [THRIFT-1722] - C# WP7 Assembly addition beaks mono build
+ * [THRIFT-336] - Compact Protocol in C#
+
+## Test
+ * [THRIFT-1613] - Add code back into empty source file ToStringTest.java
+ * [THRIFT-1718] - Incorrect check in TFileTransportTest
+
+## Wish
+ * [THRIFT-1463] - Decouple Thrift IDL from generators
+ * [THRIFT-1466] - Proper Documentation for Thrift C Glib
+ * [THRIFT-1539] - Build and distribute the fb303 python libraries along with thrift
+ * [THRIFT-1685] - Please add "aereo.com" to "Powered by Apache Thrift" list in about page
+ * [THRIFT-330] - TProcessor - additional method to called when connection is broken
+
+
+
+Thrift 0.8
+--------------------------------------------------------------------------------
+## Bug
+ * [THRIFT-1436] - pip install thrift fails on Windows with "Unable to find vcvarsall.bat"
+ * [THRIFT-1432] - Javascript struct constants declared in the same file as their struct definition will cause an error
+ * [THRIFT-1428] - shared.thrft does not include namespace for php, so thrift compiler generate incorrect name
+ * [THRIFT-1426] - Dist package missing files for release 0.8
+ * [THRIFT-1425] - The Node package is incompatible with latest node (0.6) & npm (1.0.27)
+ * [THRIFT-1416] - Python Unit test is broken on ci
+ * [THRIFT-1419] - AbstractNonBlockingServer does not catch errors when invoking the processor
+ * [THRIFT-1424] - Ruby specs fail when run with rake
+ * [THRIFT-1420] - Nonblocking and HsHa server should make sure to close all their socket connections when the selector exits
+ * [THRIFT-1413] - Generated code does not read MapEnd / ListEnd / SetEnd
+ * [THRIFT-1409] - Name conflict check does not work properly for exception object(Delphi).
+ * [THRIFT-1408] - Delphi Test Server: Exception test case fails due to naming conflict with e.message
+ * [THRIFT-1407] - Typo in Python socket server causes Thrift to fail when we enable a global socket timout
+ * [THRIFT-1397] - CI server fails during build due to unused parameters in delphi generator
+ * [THRIFT-1404] - Delphi compiler generates struct reader code with problem.
+ * [THRIFT-1400] - Ruby native extension aborts with __stack_chk_fail in OSX
+ * [THRIFT-1399] - One of the TServerImpl.Create CTORs lacks implementation
+ * [THRIFT-1390] - Debian packages build fix for Squeeze (build from the official 0.7.0 tarball)
+ * [THRIFT-1393] - TTransportException's thrown from THttpClient contain superfluous slashes in the Exception message
+ * [THRIFT-1392] - Enabling both namespaces and autoloading in generated PHP code won't work.
+ * [THRIFT-1406] - Build error after applying THRIFT-1395
+ * [THRIFT-1405] - Delphi compiler does not generates container serializer properly.
+ * [THRIFT-1411] - java generator does not provide type parameter for TBaseProcessor
+ * [THRIFT-1473] - JSON context stack may be left in an incorrect state when an exception is thrown during read or write operations
+ * [THRIFT-1331] - Ruby library deserializes an empty map to nil
+ * [THRIFT-1330] - PHP Namespaces no longer generated
+ * [THRIFT-1328] - TBaseHelper.toString(...) appends ByteBuffer data outside of valid buffer range
+ * [THRIFT-1322] - OCaml lib fail to compile: Thrift.ml line 305, int vs int32 mismatch
+ * [THRIFT-1143] - Build doesn't detect correct architecture type on 64bit osx
+ * [THRIFT-1205] - port server unduly fragile with arbitrary input
+ * [THRIFT-1279] - type set is handled incorrectly when writing object
+ * [THRIFT-1298] - Standard scheme doesn't read or write metadata along with field values
+ * [THRIFT-1265] - C++ container deserialize
+ * [THRIFT-1263] - publish ruby client to rubygems
+ * [THRIFT-1384] - Java help menu missing newline near javame flag
+ * [THRIFT-1382] - Bundle install doesnot work because thrift crashes
+ * [THRIFT-1381] - Thrift C++ libs have incorrectly versioned names
+ * [THRIFT-1350] - Go library code does not build as of r60 (most recent release)
+ * [THRIFT-1365] - TupleProtocol#writeBitSet unintentionally writes a variable length byte array
+ * [THRIFT-1359] - --gen-cob cpp:cob_style does not compile anymore
+ * [THRIFT-1319] - Mismatch between how a union reads and writes a container
+ * [THRIFT-1309] - libfb303-0.7.0.jar missing in maven repository
+ * [THRIFT-1238] - Thrift JS client cannot read map of structures
+ * [THRIFT-1254] - Code can't be compiled against a regular JRE: Object.clone() override has a different return type
+ * [THRIFT-1367] - Mac OSX build fails with "no such file to load -- spec/rake/spectask"
+ * [THRIFT-1355] - Running make in lib/rb doesn't build the native extensions
+ * [THRIFT-1370] - Debian packaging should Build-Depend on libglib2.0-dev
+ * [THRIFT-1342] - Compilation problem on Windows of fastbinary.c
+ * [THRIFT-1341] - TProtocol.h endian detection wrong with boost
+ * [THRIFT-1583] - c_glib leaks memory
+ * [THRIFT-1582] - Bad includes of nested thrift files in c_glib
+ * [THRIFT-1578] - C_GLib generated code does not compile
+ * [THRIFT-1027] - 'make -j 16' fails with "unterminated #ifdef" error
+ * [THRIFT-1121] - Java server performance regression in 0.6
+ * [THRIFT-857] - tests run by "make install" fail if generators are disabled
+ * [THRIFT-380] - Use setuptools for python build
+
+## Dependency upgrade
+ * [THRIFT-1257] - thrift's dependency scope on javax.servlet:servlet-api should be 'provided'
+
+## Improvement
+ * [THRIFT-1445] - minor C++ generator variable cleanup
+ * [THRIFT-1435] - make TException.Message property conformant to the usual expectations
+ * [THRIFT-1431] - Rename 'sys' module to 'util'
+ * [THRIFT-1396] - Dephi generator has dependacy on boost 1.42 later.
+ * [THRIFT-1395] - Patch to prevent warnings for integer types in some cases
+ * [THRIFT-1275] - thrift: always prefix namespaces with " ::"
+ * [THRIFT-1274] - thrift: fail compilation if an unexpected token is
+ * [THRIFT-1271] - thrift: fix missing namespace in generated local
+ * [THRIFT-1270] - thrift: add --allow-neg-keys argument to allow
+ * [THRIFT-1345] - Allow building without tests
+ * [THRIFT-1286] - Modernize the Thrift Ruby Library Dev Environment
+ * [THRIFT-1284] - thrift: fix processor inheritance
+ * [THRIFT-1283] - thrift: wrap t_cpp_generator::generate_process_function() to 80
+ * [THRIFT-1282] - Upgrade httpclient to 4.1.2 (from 4.0.1)
+ * [THRIFT-1281] - add @generated to the docblock
+ * [THRIFT-1280] - Thrift: Improve Monitor exception-free interfaces
+ * [THRIFT-1278] - javadoc warnings - compilation
+ * [THRIFT-1227] - Erlang implementation of thrift JSON protocol
+ * [THRIFT-1295] - Duplicate include in TSocket.cpp
+ * [THRIFT-1294] - thrift: fix log message typos in TSimpleServer
+ * [THRIFT-1293] - thrift: improve handling of exceptions thrown by
+ * [THRIFT-1292] - thrift: silence log spew from TThreadedServer
+ * [THRIFT-1288] - Allow typedefed exceptions in throws clauses
+ * [THRIFT-1290] - thrift: TNonblockingServer: clean up state in the
+ * [THRIFT-1287] - thrift: start refactoring some of the C++ processor
+ * [THRIFT-1289] - thrift: implement TNonblockingServer::stop()
+ * [THRIFT-1305] - thrift: make TConnection a private inner class of
+ * [THRIFT-1304] - TNonblockingServer: pass in the connection context to
+ * [THRIFT-1302] - thrift: raise an exception if send() times out in
+ * [THRIFT-1301] - thrift: consolidate common code in TNonblockingServer
+ * [THRIFT-1377] - abort PHP deserialization on unknown field type
+ * [THRIFT-1379] - fix uninitialized enum values in thrift C++ objects
+ * [THRIFT-1376] - Make port specification option in thrift remote
+ * [THRIFT-1375] - fixed a hex char conversion bug in TJSONProtocol
+ * [THRIFT-1373] - Fix user-defined exception generation in thrift (python)
+ * [THRIFT-1361] - Optional replacement of pthread by boost::thread
+ * [THRIFT-1320] - Consistency of configure generated config.h
+ * [THRIFT-1317] - Remove copy constructibility from
+ * [THRIFT-1316] - thrift: update server classes to accept
+ * [THRIFT-1315] - thrift: generate server interface factory classes
+ * [THRIFT-1314] - thrift: add TProcessorFactory
+ * [THRIFT-1335] - Add accept timeout to TServerSocket
+ * [THRIFT-1334] - Add more info to IllegalStateException
+ * [THRIFT-1333] - Make RWGuard not copyable
+ * [THRIFT-1332] - TSSLTransportParameters class uses hard coded value keyManagerType: SunX509
+ * [THRIFT-1251] - Generated java code should indicate which fields are required and which are optional
+ * [THRIFT-1387] - Build MSVC libraries with Boost Threads instead of Pthreads
+ * [THRIFT-1339] - Extend Tuple Protocol to TUnions
+ * [THRIFT-1031] - Patch to compile Thrift for vc++ 9.0 and 10.0
+ * [THRIFT-1130] - Add the ability to specify symbolic default value for optional boolean
+ * [THRIFT-1123] - Patch to compile Thrift server and client for vc++ 9.0 and 10.0
+ * [THRIFT-386] - Make it possible to build the Python library without the extension
+
+## New Feature
+ * [THRIFT-1401] - JSON-protocol for Delphi XE Libraries
+ * [THRIFT-1167] - Java nonblocking server with more than one thread for select and handling IO
+ * [THRIFT-1366] - Delphi generator, lirbrary and unit test.
+ * [THRIFT-1354] - Add rake task to build just the gem file
+ * [THRIFT-769] - Pluggable Serializers
+
+## Sub-task
+ * [THRIFT-1415] - delphi: add version Info to the library
+ * [THRIFT-1391] - Improved Delphi XE test cases
+
+
+
+Thrift 0.7
+--------------------------------------------------------------------------------
+## Bug
+ * [THRIFT-1140] - Framed Transport Client using C (Glib) Library hangs when connecting to Ruby Server
+ * [THRIFT-1154] - HttpClient does not specify the connection close parameter
+ * [THRIFT-1153] - HttpClient does not specify the connection close parameter
+ * [THRIFT-1149] - Nonblocking server fails when client connection is reset
+ * [THRIFT-1146] - Android Incompatibility : in Android < 2.3 java.io.IOException doesn't support for Throwable parameter in constructor
+ * [THRIFT-1133] - Java and JavaScript tutorial is broken since we have Java maven deployment
+ * [THRIFT-1132] - Deserialization error in TApplicationException C#
+ * [THRIFT-1131] - C# JSON Protocol is unable to decode escaped characters in string
+ * [THRIFT-1208] - python TCompactProtocol.py writeBool and readBool not follow the compact-proto-spec-2.txt spec for CONTAINER_WRITE, CONTAINER_READ
+ * [THRIFT-1200] - JS compiler generates code that clobbers existing namespaces
+ * [THRIFT-1183] - Pure-ruby CompactProtocol raises ArgumentError when deserializing under Ruby 1.9
+ * [THRIFT-1182] - Native deserializer segfaults on incorrect list element type
+ * [THRIFT-1181] - AS3 compiler generates incorrect code for setting default values in constructor
+ * [THRIFT-1234] - thrift --help is missing doc on py:utf8strings
+ * [THRIFT-1180] - AS3 compiler generates uncompilable code for binary types.
+ * [THRIFT-1194] - Java lib does not install artifacts to local dir correctly
+ * [THRIFT-1193] - Potential infinite loop in nonblocking_server
+ * [THRIFT-1192] - Typo: TProtocol.h tests for HAVE_SYS_PARAM_H_
+ * [THRIFT-1190] - readBufferBytesAllocated in TNonblockingServer.java should be AtomicLong to fix FD leakage and general server malfunction
+ * [THRIFT-1187] - nonblocking_server shutdown race under Ruby 1.9
+ * [THRIFT-1178] - Java: TBase signature should be T extends TBase,?>
+ * [THRIFT-1164] - Segmentation fault on NULL pointer in t_js_generator::generate_const
+ * [THRIFT-1171] - Perl write/readDouble assumes little-endian platform
+ * [THRIFT-1222] - Unhandled exception for TEvhttpServer request
+ * [THRIFT-1220] - TProcessor::process never returns false
+ * [THRIFT-1285] - Stable 0.7.0 Windows compiler exe available on the webside is not the good one
+ * [THRIFT-1218] - c_glib uses wrong name in pkg-config
+ * [THRIFT-1215] - Undefined property Thirft in lib/js/thrift.js
+ * [THRIFT-1211] - When using THttpClient, non 200 responses leave the connection open
+ * [THRIFT-1228] - The php accelerator module calls flush incorrectly
+ * [THRIFT-1308] - libfb303-0.7.0.jar missing in maven repository
+ * [THRIFT-1255] - Mismatch of method name between JavaME's lib and generated code (compareTo/compareObjects)
+ * [THRIFT-1253] - Code generated for maps is not compiling
+ * [THRIFT-1252] - Segfault in Ruby deserializer
+ * [THRIFT-1094] - bug in TCompactProto python readMessageEnd method and updated test cases
+ * [THRIFT-1093] - several bugs in python TCompactProtocol
+ * [THRIFT-1092] - generated validate() method has wrong indentation
+ * [THRIFT-1011] - Error generating package imports when using classes from other packages
+ * [THRIFT-1050] - Declaring an argument named "manager" to a service method produces code that fails compile due to name conflicts with protected ivars in TAsyncClient
+ * [THRIFT-1074] - .keystore and .truststore are missing from the 0.6.0 distribution
+ * [THRIFT-1067] - Tons of bugs in php implementation
+ * [THRIFT-1065] - Unexpected exceptions not proper handled on JS
+ * [THRIFT-1076] - Erlang Thrift socket server has a bug that causes java thrift client of framed binary client to throw "out of sequence" exception
+ * [THRIFT-1057] - casts in TBinaryProtocol.tcc causing "dereferencing type-punned pointer will break strict-aliasing rules" warnings from gcc
+ * [THRIFT-1055] - csharp TServerSocket and TSocket do not disable Nagle via Socket.NoDelay = true like cpp and java do
+ * [THRIFT-1054] - explicit call to PKG_PROG_PKG_CONFIG is missing and first use of PKG_CHECK_MODULES may not happen, causes mono detection to fail
+ * [THRIFT-1117] - JavaScript Unit Test does not work anymore because libthrift*.jar where moved by Maven Deployment
+ * [THRIFT-1111] - The HTML generator does not distinguish between string and binary types
+ * [THRIFT-1032] - "make dist" fails due to c_glib problem
+ * [THRIFT-1036] - Auto-generated C++ code fails to compile with "-Werror -Wextra -Wall" g++ compiler flags
+ * [THRIFT-1041] - TDeserializer holds onto a reference of the array it reads after it is done deserializing
+ * [THRIFT-1106] - C++ code TAsyncProtocolProcessor.h & TAsyncBufferProcessor.h dont have virtual functions but no virtual destructor. Causes warnings on -Wall
+ * [THRIFT-1105] - OCaml generator does not prefix methods of included structs with their type
+ * [THRIFT-1104] - INSTALLDIRS should be included in configure script
+ * [THRIFT-1102] - typo in configure.ac: "==" operator in 'test' (instead of"'=")
+ * [THRIFT-1101] - bytebuffer length calculation in TBinaryProtocol writeBinary
+ * [THRIFT-1098] - Undefined properties in TBinaryProtocolFactory
+ * [THRIFT-1081] - PHP tests broken and somewhat incomplete
+ * [THRIFT-1080] - erlang test's 'make' fails on Mac OSX
+ * [THRIFT-1078] - ThriftTest.thrift generates invalid PHP library
+ * [THRIFT-1120] - proto.WriteListEnd being called in the wrong place
+ * [THRIFT-1119] - TJSONProtocol fails to UTF8 decode strings
+ * [THRIFT-867] - PHP accelerator module's output transport is incompatible with TFramedTransport
+ * [THRIFT-826] - PHP TSocket Write Timeout
+ * [THRIFT-835] - Bad AS3 syntax in constructors that set default values
+ * [THRIFT-788] - thrift_protocol.so: multiget/multiget_slice does not handle more than 17 keys correctly
+ * [THRIFT-125] - OCaml libraries don't compile with 32-bit ocaml
+ * [THRIFT-342] - PHP: can't have sets of complex types
+ * [THRIFT-731] - configure doesn't check for ant >= 1.7
+ * [THRIFT-690] - Update TApplicationException codes
+ * [THRIFT-638] - BufferedTransport + C extensions block until recv timeout is reached on last fread call
+
+## Dependency upgrade
+ * [THRIFT-1177] - Update thrift to reflect changes in Go's networking libraries
+
+## Improvement
+ * [THRIFT-1155] - Remove log4j dependency from java client
+ * [THRIFT-1151] - Produce more informative runtime error in case of schema and data mismatch during serialization
+ * [THRIFT-1207] - Support DESTDIR on "make install" of ruby libs
+ * [THRIFT-1199] - Union structs should have generated methods to test whether a specific field is currently set
+ * [THRIFT-1233] - Remove unused include in generated C++ code
+ * [THRIFT-1189] - Ruby deserializer speed improvements
+ * [THRIFT-1170] - Thrift Generated Code and Java 5
+ * [THRIFT-1174] - Publish as3 client implementation via Maven for use by flex-mojos users
+ * [THRIFT-1225] - TCompactProtocol for PHP
+ * [THRIFT-1221] - Remove SimpleCallback.h
+ * [THRIFT-1217] - Use evutil_socketpair instead of pipe (Windows port)
+ * [THRIFT-1216] - build Java Library behind a proxy
+ * [THRIFT-1231] - Remove bogus include
+ * [THRIFT-1213] - Membuffer should provide a way to get back the buffer
+ * [THRIFT-1237] - Java fb303 missing some methods
+ * [THRIFT-1063] - Fix Erlang Tutorial Files
+ * [THRIFT-1053] - Make remote client's IP address available for all socket related transports
+ * [THRIFT-1109] - Deploy fb303 along side libthrift to maven repo
+ * [THRIFT-1107] - improvement for compiler-generated python for 'None' object comparisons
+ * [THRIFT-1069] - Add command line option to prevent thrift from inserting gen-* directories
+ * [THRIFT-1049] - Allow for TServerSocket python library to bind to a specific host
+ * [THRIFT-1126] - Extending struct_info for erlang bindings
+ * [THRIFT-1100] - python TSSLSocket improvements, including certificate validation
+ * [THRIFT-994] - Don't try to invoke phpize if we don't have it
+ * [THRIFT-993] - Some improvements in C++ stubs for oneway operations
+ * [THRIFT-997] - Using valueOf for base types in getFieldValue
+ * [THRIFT-418] - Don't do runtime sorting of struct fields
+ * [THRIFT-151] - TSSLServerSocket and TSSLSocket implementation
+ * [THRIFT-27] - Generated erlang types don't contain default values for records
+ * [THRIFT-113] - to-string methods should omit optional null fields from output
+ * [THRIFT-363] - Maven Deploy
+ * [THRIFT-447] - Make an abstract base Client class so we can generate less code
+ * [THRIFT-627] - should c++ have setters for optional fields?
+
+## New Feature
+ * [THRIFT-1236] - Erlang Reconnecting Thrift Client
+ * [THRIFT-1021] - Framed transport support for OCaml
+ * [THRIFT-1068] - Python SSL Socket Support
+ * [THRIFT-1103] - TZlibTransport for python, a zlib compressed transport
+ * [THRIFT-1083] - Preforking python process pool server
+ * [THRIFT-999] - Add TForkingServer
+
+## Sub-task
+ * [THRIFT-1152] - Attributes from private to protected
+ * [THRIFT-1038] - Generated Java code for structures containing binary fields (or collections thereof) are not serializable (in the Java sense) even though they implement java.io.Serializable
+
+## Task
+ * [THRIFT-892] - Refactor erlang build system with rebar
+
+## Wish
+ * [THRIFT-625] - Add support for 'Go'
+
+
+
+Thrift 0.6.1
+--------------------------------------------------------------------------------
+## Bug
+ * [THRIFT-1133] - Java and JavaScript tutorial is broken since we have Java maven deployment
+ * [THRIFT-1131] - C# JSON Protocol is unable to decode escaped characters in string
+ * [THRIFT-1074] - .keystore and .truststore are missing from the 0.6.0 distribution
+
+## Improvement
+ * [THRIFT-1109] - Deploy fb303 along side libthrift to maven repo
+ * [THRIFT-363] - Maven Deploy
+
+## Question
+ * [THRIFT-1206] - did the THRIFT 0.6.1 merge THRIFT-563 ?
+
+## Sub-task
+ * [THRIFT-1163] - How can i use multi service in one program?
+
+## Task
+ * [THRIFT-1112] - Apply THRIFT-363 to 0.6 branch
+ * [THRIFT-1113] - Apply THRIFT-1074 to 0.6 branch
+
+
+
+Thrift 0.6
+--------------------------------------------------------------------------------
+## Bug
+ * [THRIFT-1020] - OCaml compiler generates invalid OCaml
+ * [THRIFT-1015] - TUnion does not handle ByteBuffer in toString
+ * [THRIFT-1013] - generated java code may have name clashes with thrift library
+ * [THRIFT-1009] - TUnion does not correctly deep copy a ByteBuffer
+ * [THRIFT-1032] - "make dist" fails due to c_glib problem
+ * [THRIFT-868] - Referencing constant values doesn't work with with typedef types
+ * [THRIFT-971] - java module can't be compiled without ivy and network connection
+ * [THRIFT-970] - Under heavy load, THttpClient may fail with "too many open files"
+ * [THRIFT-969] - Java Tutorial broken, move CalculatorHandler to a separate file
+ * [THRIFT-807] - JavaScript: Initialization of Base Types with 0 instead of null
+ * [THRIFT-955] - Thrift compiler for Windows uses lowercase names and directories which is inconsistent with compiling on other platforms
+ * [THRIFT-992] - Naming convention in C# constructor is not consistent with other fields causes compile errors
+ * [THRIFT-1008] - byte[] accessors throw NPE on unset field
+ * [THRIFT-1006] - Impossible to correctly qualify an enum constant in an external thrift file
+ * [THRIFT-950] - Haskell bindings treat 'byte' as unsigned 8-bit int (Data.Word.Word8), java/cpp as signed (byte/int8_t).
+ * [THRIFT-975] - lib/c_glib/README is missing => breaks make dist
+ * [THRIFT-944] - Support all version-4s of base
+ * [THRIFT-939] - optional binary fields throw NPE on default byte[] getters
+ * [THRIFT-935] - PHP Extension aborts the build if php-config is not installed
+ * [THRIFT-933] - Haskell's Thrift.cabal has warnings
+ * [THRIFT-932] - Haskell tests need to be run through 'make check' (and probably 'cabal check') too
+ * [THRIFT-904] - C# TSocket should disable nagle and linger
+ * [THRIFT-941] - Make PHP C Extension use the defined Protocol writeMessageBegin function
+ * [THRIFT-940] - 'make check' fails if boost is not in the std include and link paths
+ * [THRIFT-924] - Fix generated php structure constants
+ * [THRIFT-979] - ruby bindings used to work on jruby
+ * [THRIFT-977] - Hex Conversion Bug in C++ TJSONProtocol
+ * [THRIFT-347] - PHP TSocket Timeout Issues
+ * [THRIFT-517] - TExceptions thrown by server result in cryptic error message on client - Tried to read 4 bytes, but only got 0 bytes
+
+## Improvement
+ * [THRIFT-1024] - Add Python Twisted example to the Tutorial
+ * [THRIFT-958] - Change accessmodifer on trans_ field in the FrameBuffer class to public.
+ * [THRIFT-957] - THsHaServer: Change access modifier of the invoker field.
+ * [THRIFT-1002] - CodeStyle: t_c_glib_generator.cc
+ * [THRIFT-1005] - Give unions byte[] signature methods to go along with their ByteBuffer counterparts
+ * [THRIFT-951] - Add a new isServing() method to TServer
+ * [THRIFT-943] - Silly readme typo fix.
+ * [THRIFT-961] - JavaScript TestSuite using ant/ivy and Java's ServerTestBase Handler
+ * [THRIFT-960] - add TestServer, TestNonblockingServer and TestClient again
+ * [THRIFT-949] - Modify the TEnum interface so it defines a method similar to findByValue
+ * [THRIFT-946] - Augment FieldValueMetaData so it differentiates 'string' and 'binary' fields.
+ * [THRIFT-903] - custom ThreadFactory in THsHaServer
+ * [THRIFT-913] - Test Case for Url encoded strings + simple enhancement to lib/js/test/RunTestServer.sh
+ * [THRIFT-926] - Miscellaneous C++ improvements
+ * [THRIFT-929] - Improvements to the C++ test suite
+ * [THRIFT-893] - add JavaScript to the tutorial examples
+ * [THRIFT-1003] - Polishing c_glib code
+ * [THRIFT-71] - Debian packaging for thrift
+
+## New Feature
+ * [THRIFT-1033] - Node.js language target
+ * [THRIFT-947] - Provide a helper method to determine the TProtocol used to serialize some data.
+ * [THRIFT-928] - Make more statistics available in C++ servers
+ * [THRIFT-922] - Templatized [de]serialization code for C++
+ * [THRIFT-923] - Event-driven client and server support for C++
+ * [THRIFT-925] - Provide name<->value map for enums in C++
+ * [THRIFT-927] - Add option to modify the PHP include path
+ * [THRIFT-377] - TFileTransport port in Java
+ * [THRIFT-106] - TSSLServerSocket
+ * [THRIFT-582] - C implementation of Thrift
+ * [THRIFT-745] - Make it easier to instantiate servers
+
+## Sub-task
+ * [THRIFT-1038] - Generated Java code for structures containing binary fields (or collections thereof) are not serializable (in the Java sense) even though they implement java.io.Serializable
+
+## Task
+ * [THRIFT-862] - Async client issues / improvements
+
+## Test
+ * [THRIFT-581] - Add a testsuite for txThrift (Twisted)
+
+
+
+Thrift 0.5.0 - Incubating
+--------------------------------------------------------------------------------
+THRIFT-505 Build Make configure give a summary of the enabled components (David Reiss)
+THRIFT-506 Build Allow Thrift to be built without the C++ library (David Reiss)
+THRIFT-844 Build Build Requirements state autoconf 2.59+ is required, but 2.60+ is needed (Harlan Lieberman-Berg)
+THRIFT-850 Build Perl runtime requires Bit::Vector which may not be installed by default, but configure does not fail (Michael Lum)
+THRIFT-854 Build Provide configure option and make rules to build/install php extension (Anthony Molinaro)
+THRIFT-858 Build Have bootstrap.sh check for a suitable autoconf version before running (David Reiss)
+THRIFT-871 Build Thrift compiler for WIndows (binary distribution) (David Reiss)
+THRIFT-323 C# TJSONProtocol (Roger Meier)
+THRIFT-634 C# C# Compiler Generates Incorrect Code For Fields which begin with an uppercase letter (Jon S Akhtar)
+THRIFT-881 C# add csharp to the tutorial (Roger Meier)
+THRIFT-856 C++ Building cpp library fails on OS X with malloc and free not being declared in scope (James Clarke)
+THRIFT-865 C++ C++ compiler build depends on libfl even when flex/lex not detected (David Reiss)
+THRIFT-900 C++ Unix domain socket (Roger Meier)
+THRIFT-920 C++ C++ Test and Tutorial does not compile anymore due to the change within Enum handling (Roger Meier)
+THRIFT-567 C++ Can't immediately stop a TSimpleServer thread that is idle (Rush Manbert)
+THRIFT-756 C++ Exposing TSocket(int) constructor to public (Rajat Goel)
+THRIFT-798 C++ TNonblockingServer leaks resources when destroyed (David Reiss)
+THRIFT-812 C++, Python Demo of Thrift over ZeroMQ (David Reiss)
+THRIFT-629 Cocoa Unused Field In TSocketServer Appears To Break iPhone Build (Jon S Akhtar)
+THRIFT-838 Cocoa Generated Cocoa classes have useless @dynamic declarations (Kevin Ballard)
+THRIFT-805 Cocoa Don't generate process_XXXX methods for oneway methods (Brad Taylor)
+THRIFT-507 Compiler Remove the compiler's dependency on Boost (David Reiss)
+THRIFT-895 Compiler (General) Thrift compiler does not allow two different enumerations to have the same key name for one of the enum values (David Reiss)
+THRIFT-852 Compiler (General) Missing newline causes many compiler warnings (Anthony Molinaro)
+THRIFT-877 Compiler (General) smalltalk namespace doesn't work (Bruce Lowekamp)
+THRIFT-897 Compiler (General) Don't allow unqualified constant access to enum values (Bryan Duxbury)
+THRIFT-9 Compiler (General) Add a default namespace declaration for all languages (David Reiss)
+THRIFT-599 Erlang Don't use unnecessary processes in the Erlang transports and clients (David Reiss)
+THRIFT-646 Erlang Erlang library is missing install target (David Reiss)
+THRIFT-698 Erlang Generated module list should contain atoms, not strings (Anthony Molinaro)
+THRIFT-866 Erlang term() in spec definitions seems to not work in erlang R12 (Anthony Molinaro)
+THRIFT-886 Erlang Dialyzer warning (Anthony Molinaro)
+THRIFT-785 Erlang Framed transport server problems (Anthony Molinaro)
+THRIFT-884 HTML HTML Generator: add Key attribute to the Data Types Tables (Roger Meier)
+THRIFT-652 Haskell Generated field name for strut is not capitalized correctly (Christian Lavoie)
+THRIFT-743 Haskell compile error with GHC 6.12.1 (Christian Lavoie)
+THRIFT-901 Haskell Allow the bindings to compile without -fglasgow-exts and with -Wall -Werror (Christian Lavoie)
+THRIFT-905 Haskell Make haskell thrift bindings use automake to compile and install (Christian Lavoie)
+THRIFT-906 Haskell Improve type mappings (Christian Lavoie)
+THRIFT-914 Haskell Make haskell bindings 'easily' compilable (Christian Lavoie)
+THRIFT-918 Haskell Make haskell tests run again (Christian Lavoie)
+THRIFT-919 Haskell Update Haskell bindings README (Christian Lavoie)
+THRIFT-787 Haskell Enums are not read correctly (Christian Lavoie)
+THRIFT-250 Java ExecutorService as a constructor parameter for TServer (Ed Ceaser)
+THRIFT-693 Java Thrift compiler generated java code that throws compiler warnings about deprecated methods. (Bryan Duxbury)
+THRIFT-843 Java TNonblockingSocket connects without a timeout (Bryan Duxbury)
+THRIFT-845 Java async client does not respect timeout (Ning Liang)
+THRIFT-870 Java Java constants don't get Javadoc comments (Bryan Duxbury)
+THRIFT-873 Java Java tests fail due to Too many open files (Todd Lipcon)
+THRIFT-876 Java Add SASL support (Aaron T. Myers)
+THRIFT-879 Java Remove @Override from TUnion.clear (Dave Engberg)
+THRIFT-882 Java deep copy of binary fields does not copy ByteBuffer characteristics (arrayOffset, position) (Bryan Duxbury)
+THRIFT-888 Java async client should also have nonblocking connect (Eric Jensen)
+THRIFT-890 Java Java tutorial doesn't work (Todd Lipcon)
+THRIFT-894 Java Make default accessors for binary fields return byte[]; provide new accessors to get ByteBuffer version (Bryan Duxbury)
+THRIFT-896 Java TNonblockingSocket.isOpen() returns true even after close() (Eric Jensen)
+THRIFT-907 Java libfb303 doesn't compile in 0.4.0 (Todd Lipcon)
+THRIFT-912 Java Improvements and bug fixes to SASL implementation (Todd Lipcon)
+THRIFT-917 Java THsHaServer should not accept an ExecutorService without catching RejectedExecutionException (Ed Ceaser)
+THRIFT-931 Java Use log4j for Java tests (Todd Lipcon)
+THRIFT-880 JavaME JavaME code generator and runtime library (Dave Engberg)
+THRIFT-846 JavaScript JavaScript Test Framwork: extended Testcases (Roger Meier)
+THRIFT-885 JavaScript Url encoded strings never get decoded? How do we fix this? (T Jake Luciani)
+THRIFT-911 JavaScript (JavaScript compiler) Const structs, maps, sets, and lists generate a trailing comma (T Jake Luciani)
+THRIFT-860 OCaml copy method and reset method (Lev Walkin)
+THRIFT-682 PHP PHP extension doesn't compile on Mac OS X (Bryan Duxbury)
+THRIFT-851 PHP php extension fails to compile on centos 5.x (Todd Lipcon)
+THRIFT-840 Perl Perl protocol handler could be more robust against unrecognised types (Conrad Hughes)
+THRIFT-758 Perl incorrect deference in exception handling (Yann Kerherve)
+THRIFT-257 Python Support validation of required fields (Esteve Fernandez)
+THRIFT-335 Python Compact Protocol for Python (David Reiss)
+THRIFT-596 Python Make Python's TBufferedTransport use a configurable input buffer (David Reiss)
+THRIFT-597 Python Python THttpServer performance improvements (David Reiss)
+THRIFT-598 Python Allow Python's threading servers to use daemon threads (David Reiss)
+THRIFT-666 Python Allow the handler to override HTTP responses in THttpServer (David Reiss)
+THRIFT-673 Python Generated Python code has whitespace issues (Ian Eure)
+THRIFT-721 Python THttpClient ignores url parameters (Thomas Kho)
+THRIFT-824 Python TApplicationException.__str__() refers to class constants as globals (Peter Schuller)
+THRIFT-855 Python Include optimized compiled python objects in install (Anthony Molinaro)
+THRIFT-859 Python Allow py:twisted to be generated in different namespace than py (Bruce Lowekamp)
+THRIFT-869 Python TSocket.py on Mac (and FreeBSD) doesn't handle ECONNRESET from recv() (Steven Knight)
+THRIFT-875 Python Include python setup.cfg in dist (Anthony Molinaro)
+THRIFT-610 Ruby binary_protocol.rb segfaults [line 86] (Unassigned)
+THRIFT-899 Ruby Ruby read timeouts can sometimes be 2x what they should be (Ryan King)
+THRIFT-909 Ruby allow block argument to struct constructor (Michael Stockton)
+THRIFT-456 Test Suite Bad IP address string in test/cpp/src/main.cpp (Rush Manbert)
+
+
+Thrift 0.4.0 - Incubating
+--------------------------------------------------------------------------------
+THRIFT-650 Build Make Check fails on Centos/OSX with 0.2.0 tarball (Anthony Molinaro)
+THRIFT-770 Build Get 'make dist' to work without first compiling source code (Anthony Molinaro)
+THRIFT-160 C# Created THttpTransport for the C# library based on WebHttpRequest (Michael Greene)
+THRIFT-834 C# THttpClient resends contents of message after transport errors (Anatoly Fayngelerin)
+THRIFT-247 C++ THttpServer Transport (Unassigned)
+THRIFT-676 C++ Change C++ code generator so that generated classes can be wrapped with SWIG (Unassigned)
+THRIFT-570 Compiler Thrift compiler does not error when duplicate method names are present (Bruce Simpson)
+THRIFT-808 Compiler Segfault when constant declaration references a struct field that doesn't exist (Bryan Duxbury)
+THRIFT-646 Erlang Erlang library is missing install target (Anthony Molinaro)
+THRIFT-544 General multiple enums with the same key generate invalid code (Ben Taitelbaum)
+THRIFT-434 General ruby compiler should warn when a reserved word is used (Michael Stockton)
+THRIFT-799 General Files missing proper Apache license header (Bryan Duxbury)
+THRIFT-832 HTML HTML generator shows unspecified struct fields as 'required' (Bryan Duxbury)
+THRIFT-226 Java Collections with binary keys or values break equals() (Bryan Duxbury)
+THRIFT-484 Java Ability to use a slice of a buffer instead of a direct byte[] for binary fields (Bryan Duxbury)
+THRIFT-714 Java maxWorkerThreads parameter to THsHaServer has no effect (Bryan Duxbury)
+THRIFT-751 Java Add clear() method to TBase (Bryan Duxbury)
+THRIFT-765 Java Improved string encoding and decoding performance (Bryan Duxbury)
+THRIFT-768 Java Async client for Java (Bryan Duxbury)
+THRIFT-774 Java TDeserializer should provide a partialDeserialize method for primitive types (Piotr Kozikowski)
+THRIFT-783 Java .equals java method is broken on structs containing binary-type fields (Unassigned)
+THRIFT-804 Java CompareTo is broken for unions set to map, set, or list (Bryan Duxbury)
+THRIFT-814 Java Include a TServlet in the standard Thrift distribution (Mathias Herberts)
+THRIFT-818 Java Async client doesn't send method args (Bryan Duxbury)
+THRIFT-830 Java Switch binary field implementation from byte[] to ByteBuffer (Bryan Duxbury)
+THRIFT-831 Java FramedTransport implementation that reuses its buffers (Bryan Duxbury)
+THRIFT-833 Java build.xml in lib/java is missing a classpathref attribute for the javadoc task (Bryan Duxbury)
+THRIFT-836 Java Race condition causes CancelledKeyException in TAsyncClientManager (Bryan Duxbury)
+THRIFT-842 Java Upgrade to current version of commons-lang (2.5 instead of 2.4) and/or change dependency in ivy.xml to not be exact (Bryan Duxbury)
+THRIFT-815 JavaScript Deserialization of lists is critically broken. (T Jake Luciani)
+THRIFT-827 OCaml OCaml generator to take default values into account (Lev Walkin)
+THRIFT-647 PHP PHP library is missing install target (Anthony Molinaro)
+THRIFT-682 PHP PHP extension doesn't compile on Mac OS X (Bryan Duxbury)
+THRIFT-718 PHP Thrift PHP library includes closing tags and extraneous whitespace (Nicholas Telford)
+THRIFT-778 PHP PHP socket listening server (Nick Jones)
+THRIFT-780 PHP PHP extension sometimes causes an abort with two exceptions at the same time (David Reiss)
+THRIFT-837 PHP PHP accelerator bug for writes > 8k (Thomas Kho)
+THRIFT-782 Perl Perl code for writing containers doesn't count length of write*Begin or write*End (Conrad Hughes)
+THRIFT-395 Python Python library + compiler does not support unicode strings (Unassigned)
+THRIFT-133 Ruby 'namespace ruby' should error out, or be an alias to 'namespace rb' (Bryan Duxbury)
+THRIFT-664 Ruby Ruby extension fails to build with Ruby 1.9.1 (Rajesh Malepati)
+THRIFT-699 Ruby Excise unused "native protocol method table" stuff from thrift_native (Bryan Duxbury)
+THRIFT-767 Ruby ruby compiler does not keep comments for enum values (Bryan Duxbury)
+THRIFT-811 Ruby http_client_transport.rb: allow custom http headers (Tony Kamenick)
+THRIFT-459 Ruby Ruby installation always tries to write to /Library/Ruby/site (Matthieu Imbert)
+
+
+Thrift 0.1.0 - Incubating (not released)
+--------------------------------------------------------------------------------
+Compatibility Breaking Changes:
+ C++:
+ * It's quite possible that regenerating code and rebuilding will be
+ required. Make sure your headers match your libs!
+
+ Java:
+
+ Python:
+
+ Ruby:
+ * Generated files now have underscored names [THRIFT-421]
+ * The library has been rearranged to be more Ruby-like [THRIFT-276]
+
+ Erlang:
+ * Generated code will have to be regenerated, and the new code will
+ have to be deployed atomically with the new library code [THRIFT-136]
+
+New Features and Bug Fixes:
+ C++:
+ * Support for TCompactProtocol [THRIFT-333]
+
+ Java:
+ * Support for TCompactProtocol [THRIFT-110]
+
+ Python:
+ * Support for Twisted [THRIFT-148]
+
+ Ruby:
+ * Support for TCompactProtocol [THRIFT-332]
+
diff --git a/vendor/github.com/apache/thrift/CMakeLists.txt b/vendor/github.com/apache/thrift/CMakeLists.txt
new file mode 100644
index 00000000000..93ed8d2ac58
--- /dev/null
+++ b/vendor/github.com/apache/thrift/CMakeLists.txt
@@ -0,0 +1,117 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+cmake_minimum_required(VERSION 2.8.12)
+
+project("Apache Thrift")
+
+set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake")
+
+# TODO: add `git rev-parse --short HEAD`
+# Read the version information from the Autoconf file
+file (STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/configure.ac" CONFIGURE_AC REGEX "AC_INIT\\(.*\\)" )
+
+# The following variable is used in the version.h.in file
+string(REGEX REPLACE "AC_INIT\\(\\[.*\\], \\[([0-9]+\\.[0-9]+\\.[0-9]+(-dev)?)\\]\\)" "\\1" PACKAGE_VERSION ${CONFIGURE_AC})
+message(STATUS "Parsed Thrift package version: ${PACKAGE_VERSION}")
+
+# These are internal to CMake
+string(REGEX REPLACE "([0-9]+\\.[0-9]+\\.[0-9]+)(-dev)?" "\\1" thrift_VERSION ${PACKAGE_VERSION})
+string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" thrift_VERSION_MAJOR ${thrift_VERSION})
+string(REGEX REPLACE "[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" thrift_VERSION_MINOR ${thrift_VERSION})
+string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" thrift_VERSION_PATCH ${thrift_VERSION})
+message(STATUS "Parsed Thrift version: ${thrift_VERSION} (${thrift_VERSION_MAJOR}.${thrift_VERSION_MINOR}.${thrift_VERSION_PATCH})")
+
+# Some default settings
+include(DefineCMakeDefaults)
+
+# Build time options are defined here
+include(DefineOptions)
+include(DefineInstallationPaths)
+
+# Based on the options set some platform specifics
+include(DefinePlatformSpecifc)
+
+# Generate the config.h file
+include(ConfigureChecks)
+
+# Package it
+include(CPackConfig)
+
+
+find_package(Threads)
+
+include(CTest)
+if(BUILD_TESTING)
+ message(STATUS "Building with unittests")
+
+ enable_testing()
+ # Define "make check" as alias for "make test"
+ add_custom_target(check COMMAND ctest)
+else ()
+ message(STATUS "Building without tests")
+endif ()
+
+if(BUILD_COMPILER)
+ if(NOT EXISTS ${THRIFT_COMPILER})
+ set(THRIFT_COMPILER $)
+ endif()
+ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/compiler/cpp)
+elseif(EXISTS ${THRIFT_COMPILER})
+ add_executable(thrift-compiler IMPORTED)
+ set_property(TARGET thrift-compiler PROPERTY IMPORTED_LOCATION ${THRIFT_COMPILER})
+endif()
+
+if(BUILD_CPP)
+ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/lib/cpp)
+ if(BUILD_TUTORIALS)
+ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tutorial/cpp)
+ endif()
+ if(BUILD_TESTING)
+ if(WITH_LIBEVENT AND WITH_ZLIB AND WITH_OPENSSL)
+ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test/cpp)
+ else()
+ message(WARNING "libevent and/or ZLIB and/or OpenSSL not found or disabled; will not build some tests")
+ endif()
+ endif()
+endif()
+
+if(BUILD_C_GLIB)
+ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/lib/c_glib)
+endif()
+
+if(BUILD_JAVA)
+ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/lib/java)
+endif()
+
+if(BUILD_PYTHON)
+ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/lib/py)
+ if(BUILD_TESTING)
+ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test/py)
+ endif()
+endif()
+
+if(BUILD_HASKELL)
+ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/lib/hs)
+ if(BUILD_TESTING)
+ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test/hs)
+ endif()
+endif()
+
+PRINT_CONFIG_SUMMARY()
diff --git a/vendor/github.com/apache/thrift/CONTRIBUTING.md b/vendor/github.com/apache/thrift/CONTRIBUTING.md
new file mode 100644
index 00000000000..316da9a00de
--- /dev/null
+++ b/vendor/github.com/apache/thrift/CONTRIBUTING.md
@@ -0,0 +1,49 @@
+## How to contribute
+ 1. Help to review and verify existing patches
+ 1. Make sure your issue is not all ready in the [Jira issue tracker](http://issues.apache.org/jira/browse/THRIFT)
+ 1. If not, create a ticket describing the change you're proposing in the [Jira issue tracker](http://issues.apache.org/jira/browse/THRIFT)
+ 1. Contribute your patch using one of the two methods below
+
+### Contributing via a patch
+
+1. Check out the latest version of the source code
+
+ * git clone https://git-wip-us.apache.org/repos/asf/thrift.git thrift
+
+1. Modify the source to include the improvement/bugfix
+
+ * Remember to provide *tests* for all submited changes
+ * When bugfixing: add test that will isolate bug *before* applying change that fixes it
+ * Verify that you follow [Thrift Coding Standards](/docs/coding_standards) (you can run 'make style', which ensures proper format for some languages)
+
+1. Create a patch from project root directory (e.g. you@dev:~/thrift $ ):
+
+ * git diff > ../thrift-XXX-my-new-feature.patch
+
+1. Attach the newly generated patch to the issue
+1. Wait for other contributors or committers to review your new addition
+1. Wait for a committer to commit your patch
+
+### Contributing via GitHub pull requests
+
+1. Create a fork for http://github.com/apache/thrift
+1. Create a branch for your changes(best practice is issue as branch name, e.g. THRIFT-9999)
+1. Modify the source to include the improvement/bugfix
+
+ * Remember to provide *tests* for all submited changes
+ * When bugfixing: add test that will isolate bug *before* applying change that fixes it
+ * Verify that you follow [Thrift Coding Standards](/docs/coding_standards) (you can run 'make style', which ensures proper format for some languages)
+ * Verify that your change works on other platforms by adding a GitHub service hook to [Travis CI](http://docs.travis-ci.com/user/getting-started/#Step-one%3A-Sign-in) and [AppVeyor](http://www.appveyor.com/docs)
+
+1. Commit and push changes to your branch (please use issue name and description as commit title, e.g. THRIFT-9999 make it perfect)
+1. Issue a pull request with the jira ticket number you are working on in it's name
+1. Wait for other contributors or committers to review your new addition
+1. Wait for a committer to commit your patch
+
+### More info
+
+ Plenty of information on why and how to contribute is available on the Apache Software Foundation (ASF) web site. In particular, we recommend the following:
+
+ * [Contributors Tech Guide](http://www.apache.org/dev/contributors)
+ * [Get involved!](http://www.apache.org/foundation/getinvolved.html)
+ * [Legal aspects on Submission of Contributions (Patches)](http://www.apache.org/licenses/LICENSE-2.0.html#contributions)
diff --git a/vendor/github.com/apache/thrift/Dockerfile b/vendor/github.com/apache/thrift/Dockerfile
new file mode 100644
index 00000000000..0d7ad2175e3
--- /dev/null
+++ b/vendor/github.com/apache/thrift/Dockerfile
@@ -0,0 +1,61 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# Goal: provide a thrift-compiler Docker image
+#
+# Usage:
+# docker run -v "${PWD}:/data" thrift/thrift-compiler -gen cpp -o /data/ /data/test/ThriftTest.thrift
+#
+# further details on docker for thrift is here build/docker/
+#
+# TODO: push to apache/thrift-compiler instead of thrift/thrift-compiler
+
+FROM debian:jessie
+MAINTAINER Apache Thrift
+
+ENV DEBIAN_FRONTEND noninteractive
+
+ADD . /thrift
+
+RUN buildDeps=" \
+ flex \
+ bison \
+ g++ \
+ make \
+ cmake \
+ curl \
+ "; \
+ apt-get update && apt-get install -y --no-install-recommends $buildDeps \
+ && mkdir /tmp/cmake-build && cd /tmp/cmake-build \
+ && cmake \
+ -DBUILD_COMPILER=ON \
+ -DBUILD_LIBRARIES=OFF \
+ -DBUILD_TESTING=OFF \
+ -DBUILD_EXAMPLES=OFF \
+ /thrift \
+ && cmake --build . --config Release \
+ && make install \
+ && curl -k -sSL "https://storage.googleapis.com/golang/go1.5.2.linux-amd64.tar.gz" -o /tmp/go.tar.gz \
+ && tar xzf /tmp/go.tar.gz -C /tmp \
+ && cp /tmp/go/bin/gofmt /usr/bin/gofmt \
+ && apt-get purge -y --auto-remove $buildDeps \
+ && apt-get clean \
+ && rm -rf /tmp/* \
+ && rm -rf /var/lib/apt/lists/*
+
+ENTRYPOINT ["thrift"]
diff --git a/vendor/github.com/apache/thrift/Makefile.am b/vendor/github.com/apache/thrift/Makefile.am
new file mode 100755
index 00000000000..ed58265acef
--- /dev/null
+++ b/vendor/github.com/apache/thrift/Makefile.am
@@ -0,0 +1,131 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+ACLOCAL_AMFLAGS = -I ./aclocal
+
+if WITH_PLUGIN
+# To enable bootstrap, build order is lib/cpp -> compiler -> others
+SUBDIRS = lib/cpp compiler/cpp lib
+if WITH_TESTS
+SUBDIRS += lib/cpp/test
+endif
+else
+SUBDIRS = compiler/cpp lib
+endif
+
+if WITH_TESTS
+SUBDIRS += test
+endif
+
+if WITH_TUTORIAL
+SUBDIRS += tutorial
+endif
+
+dist-hook:
+ find $(distdir) -type f \( -iname ".DS_Store" -or -iname "._*" -or -iname ".gitignore" \) | xargs rm -rf
+ find $(distdir) -type d \( -iname ".deps" -or -iname ".libs" \) | xargs rm -rf
+ find $(distdir) -type d \( -iname ".svn" -or -iname ".git" \) | xargs rm -rf
+
+print-version:
+ @echo $(VERSION)
+
+.PHONY: precross cross
+precross-%: all
+ $(MAKE) -C $* precross
+precross: all precross-test precross-lib
+
+empty :=
+space := $(empty) $(empty)
+comma := ,
+
+CROSS_LANGS = @MAYBE_CPP@ @MAYBE_C_GLIB@ @MAYBE_D@ @MAYBE_JAVA@ @MAYBE_CSHARP@ @MAYBE_PYTHON@ @MAYBE_PY3@ @MAYBE_RUBY@ @MAYBE_HASKELL@ @MAYBE_PERL@ @MAYBE_PHP@ @MAYBE_GO@ @MAYBE_NODEJS@ @MAYBE_DART@ @MAYBE_ERLANG@ @MAYBE_LUA@
+CROSS_LANGS_COMMA_SEPARATED = $(subst $(space),$(comma),$(CROSS_LANGS))
+
+if WITH_PY3
+CROSS_PY=$(PYTHON3)
+else
+CROSS_PY=$(PYTHON)
+endif
+
+if WITH_PYTHON
+crossfeature: precross
+ $(CROSS_PY) test/test.py --retry-count 3 --features .* --skip-known-failures --server $(CROSS_LANGS_COMMA_SEPARATED)
+else
+# feature test needs python build
+crossfeature:
+endif
+
+cross-%: precross crossfeature
+ $(CROSS_PY) test/test.py --retry-count 3 --skip-known-failures --server $(CROSS_LANGS_COMMA_SEPARATED) --client $(CROSS_LANGS_COMMA_SEPARATED) --regex "$*"
+
+cross: cross-.*
+
+TIMES = 1 2 3
+fail: precross
+ $(CROSS_PY) test/test.py || true
+ $(CROSS_PY) test/test.py --update-expected-failures=overwrite
+ $(foreach var,$(TIMES),test/test.py -s || true;test/test.py --update-expected-failures=merge;)
+
+codespell_skip_files = \
+ *.jar \
+ *.class \
+ *.so \
+ *.a \
+ *.la \
+ *.o \
+ *.p12 \
+ *OCamlMakefile \
+ .keystore \
+ .truststore \
+ CHANGES \
+ config.sub \
+ configure \
+ depcomp \
+ libtool.m4 \
+ output.* \
+ rebar \
+ thrift
+
+skipped_files = $(subst $(space),$(comma),$(codespell_skip_files))
+
+style-local:
+ codespell --write-changes --skip=$(skipped_files) --disable-colors
+
+EXTRA_DIST = \
+ .clang-format \
+ .editorconfig \
+ .travis.yml \
+ appveyor.yml \
+ bower.json \
+ build \
+ CMakeLists.txt \
+ composer.json \
+ contrib \
+ CONTRIBUTING.md \
+ debian \
+ doc \
+ doap.rdf \
+ package.json \
+ sonar-project.properties \
+ Dockerfile \
+ LICENSE \
+ CHANGES \
+ NOTICE \
+ README.md \
+ Thrift.podspec
diff --git a/vendor/github.com/apache/thrift/README.md b/vendor/github.com/apache/thrift/README.md
new file mode 100644
index 00000000000..07cd32f0982
--- /dev/null
+++ b/vendor/github.com/apache/thrift/README.md
@@ -0,0 +1,166 @@
+Apache Thrift
+=============
+
++[](https://travis-ci.org/apache/thrift)
+- +[](https://ci.appveyor.com/project/apache/thrift)
+
+
+Introduction
+============
+
+Thrift is a lightweight, language-independent software stack with an
+associated code generation mechanism for RPC. Thrift provides clean
+abstractions for data transport, data serialization, and application
+level processing. The code generation system takes a simple definition
+language as its input and generates code across programming languages that
+uses the abstracted stack to build interoperable RPC clients and servers.
+
+Thrift is specifically designed to support non-atomic version changes
+across client and server code.
+
+For more details on Thrift's design and implementation, take a gander at
+the Thrift whitepaper included in this distribution or at the README.md files
+in your particular subdirectory of interest.
+
+Hierarchy
+=========
+
+thrift/
+
+ compiler/
+
+ Contains the Thrift compiler, implemented in C++.
+
+ lib/
+
+ Contains the Thrift software library implementation, subdivided by
+ language of implementation.
+
+ cpp/
+ go/
+ java/
+ php/
+ py/
+ rb/
+
+ test/
+
+ Contains sample Thrift files and test code across the target programming
+ languages.
+
+ tutorial/
+
+ Contains a basic tutorial that will teach you how to develop software
+ using Thrift.
+
+Requirements
+============
+
+See http://thrift.apache.org/docs/install for an up-to-date list of build requirements.
+
+Resources
+=========
+
+More information about Thrift can be obtained on the Thrift webpage at:
+
+ http://thrift.apache.org
+
+Acknowledgments
+===============
+
+Thrift was inspired by pillar, a lightweight RPC tool written by Adam D'Angelo,
+and also by Google's protocol buffers.
+
+Installation
+============
+
+If you are building from the first time out of the source repository, you will
+need to generate the configure scripts. (This is not necessary if you
+downloaded a tarball.) From the top directory, do:
+
+ ./bootstrap.sh
+
+Once the configure scripts are generated, thrift can be configured.
+From the top directory, do:
+
+ ./configure
+
+You may need to specify the location of the boost files explicitly.
+If you installed boost in /usr/local, you would run configure as follows:
+
+ ./configure --with-boost=/usr/local
+
+Note that by default the thrift C++ library is typically built with debugging
+symbols included. If you want to customize these options you should use the
+CXXFLAGS option in configure, as such:
+
+ ./configure CXXFLAGS='-g -O2'
+ ./configure CFLAGS='-g -O2'
+ ./configure CPPFLAGS='-DDEBUG_MY_FEATURE'
+
+To enable gcov required options -fprofile-arcs -ftest-coverage enable them:
+
+ ./configure --enable-coverage
+
+Run ./configure --help to see other configuration options
+
+Please be aware that the Python library will ignore the --prefix option
+and just install wherever Python's distutils puts it (usually along
+the lines of /usr/lib/pythonX.Y/site-packages/). If you need to control
+where the Python modules are installed, set the PY_PREFIX variable.
+(DESTDIR is respected for Python and C++.)
+
+Make thrift:
+
+ make
+
+From the top directory, become superuser and do:
+
+ make install
+
+Note that some language packages must be installed manually using build tools
+better suited to those languages (at the time of this writing, this applies
+to Java, Ruby, PHP).
+
+Look for the README.md file in the lib// folder for more details on the
+installation of each language library package.
+
+Testing
+=======
+
+There are a large number of client library tests that can all be run
+from the top-level directory.
+
+ make -k check
+
+This will make all of the libraries (as necessary), and run through
+the unit tests defined in each of the client libraries. If a single
+language fails, the make check will continue on and provide a synopsis
+at the end.
+
+To run the cross-language test suite, please run:
+
+ make cross
+
+This will run a set of tests that use different language clients and
+servers.
+
+License
+=======
+
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT 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/apache/thrift/Thrift.podspec b/vendor/github.com/apache/thrift/Thrift.podspec
new file mode 100644
index 00000000000..2ead0e93df3
--- /dev/null
+++ b/vendor/github.com/apache/thrift/Thrift.podspec
@@ -0,0 +1,18 @@
+Pod::Spec.new do |s|
+ s.name = "Thrift"
+ s.version = "0.10.0"
+ s.summary = "Apache Thrift is a lightweight, language-independent software stack with an associated code generation mechanism for RPC."
+ s.description = <<-DESC
+The Apache Thrift software framework, for scalable cross-language services development, combines a software stack with a code generation engine to build services that work efficiently and seamlessly between C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, OCaml and Delphi and other languages.
+ DESC
+ s.homepage = "http://thrift.apache.org"
+ s.license = { :type => 'Apache License, Version 2.0', :url => 'https://raw.github.com/apache/thrift/thrift-0.9.0/LICENSE' }
+ s.author = { "The Apache Software Foundation" => "apache@apache.org" }
+ s.requires_arc = true
+ s.ios.deployment_target = '7.0'
+ s.osx.deployment_target = '10.8'
+ s.ios.framework = 'CFNetwork'
+ s.osx.framework = 'CoreServices'
+ s.source = { :git => "https://github.com/apache/thrift.git", :tag => "thrift-0.10.0" }
+ s.source_files = 'lib/cocoa/src/**/*.{h,m,swift}'
+end
\ No newline at end of file
diff --git a/vendor/github.com/apache/thrift/bootstrap.sh b/vendor/github.com/apache/thrift/bootstrap.sh
new file mode 100755
index 00000000000..52ecda47b3a
--- /dev/null
+++ b/vendor/github.com/apache/thrift/bootstrap.sh
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+./cleanup.sh
+if test -d lib/php/src/ext/thrift_protocol ; then
+ if phpize -v >/dev/null 2>/dev/null ; then
+ (cd lib/php/src/ext/thrift_protocol && phpize)
+ fi
+fi
+
+set -e
+
+# libtoolize is called "glibtoolize" on OSX.
+if libtoolize --version 1 >/dev/null 2>/dev/null; then
+ LIBTOOLIZE=libtoolize
+elif glibtoolize --version 1 >/dev/null 2>/dev/null; then
+ LIBTOOLIZE=glibtoolize
+else
+ echo >&2 "Couldn't find libtoolize!"
+ exit 1
+fi
+
+# we require automake 1.13 or later
+# check must happen externally due to use of newer macro
+AUTOMAKE_VERSION=`automake --version | grep automake | egrep -o '([0-9]{1,}\.)+[0-9]{1,}'`
+if [ "$AUTOMAKE_VERSION" \< "1.13" ]; then
+ echo >&2 "automake version $AUTOMAKE_VERSION is too old (need 1.13 or later)"
+ exit 1
+fi
+
+autoscan
+$LIBTOOLIZE --copy --automake
+aclocal -I ./aclocal
+autoheader
+autoconf
+automake --copy --add-missing --foreign
diff --git a/vendor/github.com/apache/thrift/bower.json b/vendor/github.com/apache/thrift/bower.json
new file mode 100644
index 00000000000..9ec59fcb5dc
--- /dev/null
+++ b/vendor/github.com/apache/thrift/bower.json
@@ -0,0 +1,16 @@
+{
+ "name": "thrift",
+ "version": "0.10.0",
+ "homepage": "https://git-wip-us.apache.org/repos/asf/thrift.git",
+ "authors": [
+ "Apache Thrift "
+ ],
+ "description": "Apache Thrift",
+ "main": "lib/js/src/thrift.js",
+ "keywords": [
+ "thrift"
+ ],
+ "license": "Apache v2",
+ "ignore": [
+ ]
+}
diff --git a/vendor/github.com/apache/thrift/cleanup.sh b/vendor/github.com/apache/thrift/cleanup.sh
new file mode 100755
index 00000000000..f110721ac9f
--- /dev/null
+++ b/vendor/github.com/apache/thrift/cleanup.sh
@@ -0,0 +1,89 @@
+#!/bin/sh
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+topsrcdir="`dirname $0`"
+cd "$topsrcdir"
+
+make -k clean >/dev/null 2>&1
+make -k distclean >/dev/null 2>&1
+find . -name Makefile.in -exec rm -f {} \;
+rm -rf \
+AUTHORS \
+ChangeLog \
+INSTALL \
+Makefile \
+Makefile.in \
+Makefile.orig \
+aclocal/libtool.m4 \
+aclocal/ltoptions.m4 \
+aclocal/ltsugar.m4 \
+aclocal/ltversion.m4 \
+aclocal/lt~obsolete.m4 \
+aclocal.m4 \
+autom4te.cache \
+autoscan.log \
+config.guess \
+config.h \
+config.hin \
+config.hin~ \
+config.log \
+config.status \
+config.status.lineno \
+config.sub \
+configure \
+configure.lineno \
+configure.scan \
+depcomp \
+.deps \
+install-sh \
+.libs \
+libtool \
+ltmain.sh \
+missing \
+ylwrap \
+if/gen-* \
+test/gen-* \
+lib/php/src/ext/thrift_protocol/.deps \
+lib/php/src/ext/thrift_protocol/Makefile \
+lib/php/src/ext/thrift_protocol/Makefile.fragments \
+lib/php/src/ext/thrift_protocol/Makefile.global \
+lib/php/src/ext/thrift_protocol/Makefile.objects \
+lib/php/src/ext/thrift_protocol/acinclude.m4 \
+lib/php/src/ext/thrift_protocol/aclocal.m4 \
+lib/php/src/ext/thrift_protocol/autom4te.cache \
+lib/php/src/ext/thrift_protocol/build \
+lib/php/src/ext/thrift_protocol/config.guess \
+lib/php/src/ext/thrift_protocol/config.h \
+lib/php/src/ext/thrift_protocol/config.h.in \
+lib/php/src/ext/thrift_protocol/config.log \
+lib/php/src/ext/thrift_protocol/config.nice \
+lib/php/src/ext/thrift_protocol/config.status \
+lib/php/src/ext/thrift_protocol/config.sub \
+lib/php/src/ext/thrift_protocol/configure \
+lib/php/src/ext/thrift_protocol/configure.in \
+lib/php/src/ext/thrift_protocol/include \
+lib/php/src/ext/thrift_protocol/install-sh \
+lib/php/src/ext/thrift_protocol/libtool \
+lib/php/src/ext/thrift_protocol/ltmain.sh \
+lib/php/src/ext/thrift_protocol/missing \
+lib/php/src/ext/thrift_protocol/mkinstalldirs \
+lib/php/src/ext/thrift_protocol/modules \
+lib/php/src/ext/thrift_protocol/run-tests.php
diff --git a/vendor/github.com/apache/thrift/composer.json b/vendor/github.com/apache/thrift/composer.json
new file mode 100644
index 00000000000..d937bc7ac21
--- /dev/null
+++ b/vendor/github.com/apache/thrift/composer.json
@@ -0,0 +1,30 @@
+{
+ "name": "apache/thrift",
+ "description": "Apache Thrift RPC system",
+ "homepage": "http://thrift.apache.org/",
+ "type": "library",
+ "license": "Apache-2.0",
+ "authors": [
+ {
+ "name": "Apache Thrift Developers",
+ "email": "dev@thrift.apache.org",
+ "homepage": "http://thrift.apache.org"
+ }
+ ],
+ "support": {
+ "email": "dev@thrift.apache.org",
+ "issues": "https://issues.apache.org/jira/browse/THRIFT"
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "autoload": {
+ "psr-0": {"Thrift": "lib/php/lib/"}
+ },
+ "minimum-stability": "dev",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "0.10.0"
+ }
+ }
+}
diff --git a/vendor/github.com/apache/thrift/configure.ac b/vendor/github.com/apache/thrift/configure.ac
new file mode 100755
index 00000000000..0972abfc9d9
--- /dev/null
+++ b/vendor/github.com/apache/thrift/configure.ac
@@ -0,0 +1,959 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+AC_PREREQ(2.65)
+AC_CONFIG_MACRO_DIR([./aclocal])
+
+AC_INIT([thrift], [0.10.0])
+
+AC_CONFIG_AUX_DIR([.])
+
+AM_INIT_AUTOMAKE([1.13 subdir-objects tar-ustar])
+PKG_PROG_PKG_CONFIG
+
+AC_ARG_VAR([PY_PREFIX], [Prefix for installing Python modules.
+ (Normal --prefix is ignored for Python because
+ Python has different conventions.)
+ Default = "/usr"])
+AS_IF([test "x$PY_PREFIX" = x], [PY_PREFIX="/usr"])
+
+AC_ARG_VAR([JAVA_PREFIX], [Prefix for installing the Java lib jar.
+ Default = "/usr/local/lib"])
+AS_IF([test "x$JAVA_PREFIX" != x], [JAVA_PREFIX="$JAVA_PREFIX/usr/local/lib"],
+ [test "x$PREFIX" != x], [JAVA_PREFIX="$PREFIX/usr/local/lib"],
+ [JAVA_PREFIX="/usr/local/lib"])
+
+AC_ARG_VAR([RUBY_PREFIX], [Prefix for installing Ruby modules.
+ (Normal --prefix is ignored for Ruby because
+ Ruby has different conventions.)
+ Default = none, let ruby setup decide])
+
+AC_ARG_VAR([PHP_PREFIX], [Prefix for installing PHP modules.
+ (Normal --prefix is ignored for PHP because
+ PHP has different conventions.)
+ Default = "/usr/lib/php"])
+AS_IF([test "x$PHP_PREFIX" = x], [PHP_PREFIX="/usr/lib/php"])
+
+AC_ARG_VAR([PHP_CONFIG_PREFIX],
+ [Prefix for installing PHP extension module .ini file.
+ (Normal --prefix is ignored for PHP because PHP has
+ different conventions.)
+ Default = "/etc/php.d"])
+AS_IF([test "x$PHP_CONFIG_PREFIX" = x], [PHP_CONFIG_PREFIX="/etc/php.d"])
+
+AC_ARG_VAR([INSTALLDIRS], [When installing Perl modules, specifies which
+ of the sets of installation directories
+ to choose: perl, site or vendor.
+ Default = "vendor"])
+AS_IF([test "x$INSTALLDIRS" = x], [INSTALLDIRS="vendor"])
+
+AC_ARG_VAR([PERL_PREFIX], [Prefix for installing Perl modules.
+ (Normal --prefix is ignored for Perl because
+ Perl has different conventions.)
+ Ignored, when INSTALLDIRS set to site or vendor.
+ Default = "/usr/local/lib"])
+AS_IF([test "x$PERL_PREFIX" = x], [PERL_PREFIX="/usr/local"])
+
+AC_ARG_VAR([CABAL_CONFIGURE_FLAGS],
+ [Extra flags to pass to cabal: "cabal Setup.lhs configure $CABAL_CONFIGURE_FLAGS".
+ (Typically used to set --user or force --global.)])
+
+AC_SUBST(CABAL_CONFIGURE_FLAGS)
+
+AC_ARG_VAR([D_IMPORT_PREFIX], [Prefix for installing D modules.
+ [INCLUDEDIR/d2]])
+AS_IF([test "x$D_IMPORT_PREFIX" = x], [D_IMPORT_PREFIX="${includedir}/d2"])
+
+AC_ARG_VAR([DMD_LIBEVENT_FLAGS], [DMD flags for linking libevent (auto-detected if not set).])
+AC_ARG_VAR([DMD_OPENSSL_FLAGS], [DMD flags for linking OpenSSL (auto-detected if not set).])
+
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_CXX
+AC_PROG_INSTALL
+AC_PROG_LIBTOOL
+AC_PROG_MAKE_SET
+AC_PROG_BISON(2.5)
+AC_PROG_YACC
+AC_PROG_LEX
+AM_PROG_LEX
+AC_PROG_LN_S
+AC_PROG_MKDIR_P
+AC_PROG_AWK
+AC_PROG_RANLIB
+
+AC_LANG([C++])
+AX_CXX_COMPILE_STDCXX_11([noext], [optional])
+
+AM_EXTRA_RECURSIVE_TARGETS([style])
+AC_SUBST(CPPSTYLE_CMD, 'find . -type f \( -iname "*.h" -or -iname "*.cpp" -or -iname "*.cc" -or -iname "*.tcc" \) -printf "Reformatting: %h/%f\n" -exec clang-format -i {} \;')
+
+AC_ARG_ENABLE([libs],
+ AS_HELP_STRING([--enable-libs], [build the Apache Thrift libraries [default=yes]]),
+ [], enable_libs=yes
+)
+have_libs=yes
+if test "$enable_libs" = "no"; then
+ have_libs="no"
+ with_cpp="no"
+ with_c_glib="no"
+ with_java="no"
+ with_csharp="no"
+ with_python="no"
+ with_ruby="no"
+ with_haskell="no"
+ with_haxe="no"
+ with_perl="no"
+ with_php="no"
+ with_php_extension="no"
+ with_dart="no"
+ with_erlang="no"
+ with_go="no"
+ with_d="no"
+ with_nodejs="no"
+ with_lua="no"
+fi
+
+
+AX_THRIFT_LIB(cpp, [C++], yes)
+have_cpp=no
+if test "$with_cpp" = "yes"; then
+ AX_BOOST_BASE([1.53.0])
+ if test "x$succeeded" = "xyes" ; then
+ AC_SUBST([BOOST_LIB_DIR], [$(echo "$BOOST_LDFLAGS" | sed -e 's/^\-L//')])
+ AC_SUBST([BOOST_CHRONO_LDADD], [$(echo "$BOOST_LIB_DIR/libboost_chrono.a")])
+ AC_SUBST([BOOST_FILESYSTEM_LDADD], [$(echo "$BOOST_LIB_DIR/libboost_filesystem.a")])
+ AC_SUBST([BOOST_SYSTEM_LDADD], [$(echo "$BOOST_LIB_DIR/libboost_system.a")])
+ AC_SUBST([BOOST_TEST_LDADD], [$(echo "$BOOST_LIB_DIR/libboost_unit_test_framework.a")])
+ AC_SUBST([BOOST_THREAD_LDADD], [$(echo "$BOOST_LIB_DIR/libboost_thread.a")])
+ have_cpp="yes"
+ fi
+
+ AX_CHECK_OPENSSL()
+
+ AX_LIB_EVENT([1.0])
+ have_libevent=$success
+
+ AX_LIB_ZLIB([1.2.3])
+ have_zlib=$success
+
+ AX_THRIFT_LIB(qt4, [Qt], yes)
+ have_qt=no
+ if test "$with_qt4" = "yes"; then
+ PKG_CHECK_MODULES([QT], [QtCore >= 4.3, QtNetwork >= 4.3], have_qt=yes, have_qt=no)
+ fi
+ if test "$have_qt" = "yes"; then
+ AC_PATH_PROGS([QT_MOC], [moc-qt4 moc], "fail")
+ if test "$QT_MOC" = "fail"; then
+ have_qt=no
+ fi
+ fi
+
+ AX_THRIFT_LIB(qt5, [Qt5], yes)
+ have_qt5=no
+ qt_reduce_reloc=""
+ if test "$with_qt5" = "yes"; then
+ PKG_CHECK_MODULES([QT5], [Qt5Core >= 5.0, Qt5Network >= 5.0],
+ [have_qt5=yes;qt_reduce_reloc=`$PKG_CONFIG --variable=qt_config Qt5Core | grep "reduce_relocations"`],
+ [have_qt5=no])
+ fi
+ if test "$have_qt5" = "yes"; then
+ AC_PATH_PROGS([QT5_MOC], [moc-qt5 moc], "fail")
+ if test "$QT5_MOC" = "fail"; then
+ have_qt5=no
+ fi
+ fi
+fi
+AM_CONDITIONAL([WITH_CPP], [test "$have_cpp" = "yes"])
+AM_CONDITIONAL([AMX_HAVE_LIBEVENT], [test "$have_libevent" = "yes"])
+AM_CONDITIONAL([AMX_HAVE_ZLIB], [test "$have_zlib" = "yes"])
+AM_CONDITIONAL([AMX_HAVE_QT], [test "$have_qt" = "yes"])
+AM_CONDITIONAL([AMX_HAVE_QT5], [test "$have_qt5" = "yes"])
+AM_CONDITIONAL([QT5_REDUCE_RELOCATIONS], [test "x$qt_reduce_reloc" != "x"])
+
+AX_THRIFT_LIB(c_glib, [C (GLib)], yes)
+if test "$with_c_glib" = "yes"; then
+ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.0], have_glib2=yes, have_glib2=no)
+ PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.0], have_gobject2=yes, have_gobject2=no)
+ if test "$have_glib2" = "yes" -a "$have_gobject2" = "yes" ; then
+ have_c_glib="yes"
+ fi
+fi
+AM_CONDITIONAL(WITH_C_GLIB, [test "$have_glib2" = "yes" -a "$have_gobject2" = "yes"])
+
+AX_THRIFT_LIB(csharp, [C#], yes)
+if test "$with_csharp" = "yes"; then
+ PKG_CHECK_MODULES(MONO, mono >= 2.11.0, mono_2_11=yes, mono_2_11=no)
+ if test "$mono_2_11" == "yes"; then
+ AC_PATH_PROG([MCS], [mcs])
+ if test "x$MCS" != "x"; then
+ mono_mcs="yes"
+ fi
+ fi
+ PKG_CHECK_MODULES(MONO, mono >= 2.0.0, net_3_5=yes, net_3_5=no)
+ PKG_CHECK_MODULES(MONO, mono >= 1.2.4, have_mono=yes, have_mono=no)
+ if test "$have_mono" = "yes" ; then
+ have_csharp="yes"
+ fi
+fi
+AM_CONDITIONAL(WITH_MONO, [test "$have_csharp" = "yes"])
+AM_CONDITIONAL(NET_2_0, [test "$net_3_5" = "no"])
+AM_CONDITIONAL(MONO_MCS, [test "$mono_mcs" = "yes"])
+
+AX_THRIFT_LIB(java, [Java], yes)
+if test "$with_java" = "yes"; then
+ AX_JAVAC_AND_JAVA
+ AC_PATH_PROG([ANT], [ant])
+ AX_CHECK_ANT_VERSION($ANT, 1.7)
+ AC_SUBST(CLASSPATH)
+ AC_SUBST(ANT_FLAGS)
+ if test "x$JAVA" != "x" && test "x$JAVAC" != "x" && test "x$ANT" != "x" ; then
+ have_java="yes"
+ fi
+fi
+AM_CONDITIONAL([WITH_JAVA], [test "$have_java" = "yes"])
+
+AX_THRIFT_LIB(erlang, [Erlang], yes)
+if test "$with_erlang" = "yes"; then
+ AC_ERLANG_PATH_ERL
+ AC_ERLANG_PATH_ERLC
+ AC_PATH_PROG([REBAR], [rebar])
+ if test -n "$ERLC" ; then
+ AC_ERLANG_SUBST_LIB_DIR
+ # Install into the detected Erlang directory instead of $libdir/erlang/lib
+ ERLANG_INSTALL_LIB_DIR="$ERLANG_LIB_DIR"
+ AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
+ fi
+ if test -n "$ERL" -a -n "$ERLC" && test "x$REBAR" != "x" ; then
+ have_erlang="yes"
+
+ # otp_release is simply a number (like "17") for OTP17+ while "R16..." for OTP16 or less.
+ # OTP version is currently only used for running tests.
+ if $ERL -eval 'erlang:display(erlang:system_info(otp_release)),halt().' -noshell | grep "^\"R" >/dev/null; then
+ erlang_otp16_or_less="yes"
+ fi
+ fi
+fi
+AM_CONDITIONAL(WITH_ERLANG, [test "$have_erlang" = "yes"])
+AM_CONDITIONAL(ERLANG_OTP16, [test "$erlang_otp16_or_less" = "yes"])
+
+AX_THRIFT_LIB(nodejs, [Nodejs], yes)
+have_nodejs=no
+if test "$with_nodejs" = "yes"; then
+ AC_PATH_PROGS([NODEJS], [nodejs node])
+ AC_PATH_PROG([NPM], [npm])
+ if test "x$NODEJS" != "x" -a "x$NPM" != "x"; then
+ have_nodejs="yes"
+ fi
+fi
+AM_CONDITIONAL(WITH_NODEJS, [test "$have_nodejs" = "yes"])
+AM_CONDITIONAL(HAVE_NPM, [test "x$NPM" != "x"])
+
+AX_THRIFT_LIB(lua, [Lua], yes)
+have_lua=no
+if test "$with_lua" = "yes"; then
+ AX_PROG_LUA(5.2,, have_lua="yes", have_lua="no")
+ if test "$have_lua" = "yes"; then
+ AX_LUA_HEADERS(, have_lua="no")
+ AX_LUA_LIBS(, have_lua="no")
+ fi
+fi
+AM_CONDITIONAL(WITH_LUA, [test "$have_lua" = "yes"])
+
+# Find python regardless of with_python value, because it's needed by make cross
+AM_PATH_PYTHON(2.6,, :)
+AX_THRIFT_LIB(python, [Python], yes)
+if test "$with_python" = "yes"; then
+ if test -n "$PYTHON"; then
+ have_python="yes"
+ fi
+ AC_PATH_PROG([TRIAL], [trial])
+ if test -n "$TRIAL"; then
+ have_trial="yes"
+ fi
+fi
+AM_CONDITIONAL(WITH_PYTHON, [test "$have_python" = "yes"])
+AM_CONDITIONAL(WITH_TWISTED_TEST, [test "$have_trial" = "yes"])
+
+# Find "python3" executable.
+# It's distro specific and far from ideal but needed to cross test py2-3 at once.
+# TODO: find "python2" if it's 3.x
+if python --version 2>&1 | grep -q "Python 2"; then
+ AC_PATH_PROGS([PYTHON3], [python3 python3.5 python35 python3.4 python34])
+ if test -n "$PYTHON3"; then
+ have_py3="yes"
+ fi
+fi
+AM_CONDITIONAL(WITH_PY3, [test "$have_py3" = "yes"])
+
+AX_THRIFT_LIB(perl, [Perl], yes)
+if test "$with_perl" = "yes"; then
+ AC_PATH_PROG([PERL], [perl])
+ if test -n "$PERL" ; then
+ AC_PROG_PERL_MODULES([Bit::Vector], success="yes", success="no")
+ have_perl_bit_vector="$success"
+ AC_PROG_PERL_MODULES([Class::Accessor], success="yes", success="no")
+ have_perl_class_accessor="$success"
+ fi
+ if test -n "$PERL" -a "$have_perl_bit_vector" = "yes" ; then
+ if test -n "$PERL" -a "$have_perl_class_accessor" = "yes" ; then
+ have_perl="yes"
+ fi
+ fi
+fi
+AM_CONDITIONAL(WITH_PERL, [test "$have_perl" = "yes"])
+
+AX_THRIFT_LIB(php, [PHP], yes)
+if test "$with_php" = "yes"; then
+ AC_PATH_PROG([PHP], [php])
+ if test -n "$PHP" ; then
+ have_php="yes"
+ fi
+fi
+AM_CONDITIONAL(WITH_PHP, [test "$have_php" = "yes"])
+
+AX_THRIFT_LIB(php_extension, [PHP_EXTENSION], yes)
+if test "$with_php_extension" = "yes"; then
+ if test -f "lib/php/src/ext/thrift_protocol/configure"; then
+ AC_PATH_PROG([PHP_CONFIG], [php-config])
+ if test -n "$PHP_CONFIG" ; then
+ AC_CONFIG_SUBDIRS([lib/php/src/ext/thrift_protocol])
+ have_php_extension="yes"
+ fi
+ fi
+fi
+AM_CONDITIONAL(WITH_PHP_EXTENSION, [test "$have_php_extension" = "yes"])
+
+AC_PATH_PROG([PHPUNIT], [phpunit])
+AM_CONDITIONAL(HAVE_PHPUNIT, [test "x$PHPUNIT" != "x"])
+
+AX_THRIFT_LIB(dart, [DART], yes)
+if test "$with_dart" = "yes"; then
+ AC_PATH_PROG([DART], [dart])
+ AC_PATH_PROG([DARTPUB], [pub])
+ if test "x$DART" != "x" -a "x$DARTPUB" != "x"; then
+ have_dart="yes"
+ fi
+fi
+AM_CONDITIONAL(WITH_DART, [test "$have_dart" = "yes"])
+
+AX_THRIFT_LIB(ruby, [Ruby], yes)
+have_ruby=no
+if test "$with_ruby" = "yes"; then
+ AC_PATH_PROG([RUBY], [ruby])
+ AC_PATH_PROG([BUNDLER], [bundle])
+ if test "x$RUBY" != "x" -a "x$BUNDLER" != "x"; then
+ have_ruby="yes"
+ fi
+fi
+AM_CONDITIONAL(WITH_RUBY, [test "$have_ruby" = "yes"])
+AM_CONDITIONAL(HAVE_BUNDLER, [test "x$BUNDLER" != "x"])
+
+AX_THRIFT_LIB(haskell, [Haskell], yes)
+have_haskell=no
+RUNHASKELL=true
+CABAL=true
+if test "$with_haskell" = "yes"; then
+ AC_PATH_PROG([CABAL], [cabal])
+ AC_PATH_PROG([RUNHASKELL], [runhaskell])
+ if test "x$CABAL" != "x" -a "x$RUNHASKELL" != "x"; then
+ have_haskell="yes"
+ else
+ RUNHASKELL=true
+ CABAL=true
+ fi
+fi
+AC_SUBST(CABAL)
+AC_SUBST(RUNHASKELL)
+AM_CONDITIONAL(WITH_HASKELL, [test "$have_haskell" = "yes"])
+
+AX_THRIFT_LIB(go, [Go], yes)
+if test "$with_go" = "yes"; then
+ AC_PATH_PROG([GO], [go])
+ if [[ -x "$GO" ]] ; then
+ AS_IF([test -n "$GO"],[
+ ax_go_version="1.4"
+
+ AC_MSG_CHECKING([for Go version])
+ golang_version=`$GO version 2>&1 | $SED -e 's/\(go \)\(version \)\(go\)\(@<:@0-9@:>@.@<:@0-9@:>@.@<:@0-9@:>@\)\(@<:@\*@:>@*\).*/\4/'`
+ AC_MSG_RESULT($golang_version)
+ AC_SUBST([golang_version],[$golang_version])
+ AX_COMPARE_VERSION([$ax_go_version],[le],[$golang_version],[
+ :
+ have_go="yes"
+ ],[
+ :
+ have_go="no"
+ ])
+ ],[
+ AC_MSG_WARN([could not find Go ])
+ have_go="no"
+ ])
+ fi
+fi
+AM_CONDITIONAL(WITH_GO, [test "$have_go" = "yes"])
+
+
+AX_THRIFT_LIB(haxe, [Haxe], yes)
+if test "$with_haxe" = "yes"; then
+ AC_PATH_PROG([HAXE], [haxe])
+ if [[ -x "$HAXE" ]] ; then
+ AX_PROG_HAXE_VERSION( [3.1.3], have_haxe="yes", have_haxe="no")
+ fi
+fi
+AM_CONDITIONAL(WITH_HAXE, [test "$have_haxe" = "yes"])
+
+
+AX_THRIFT_LIB(d, [D], yes)
+if test "$with_d" = "yes"; then
+ AX_DMD
+ AC_SUBST(DMD)
+ if test "x$DMD" != "x"; then
+ have_d="yes"
+ fi
+fi
+
+# Determine actual name of the generated D library for use in the command line
+# when compiling tests. This is needed because the -l syntax doesn't work
+# with OPTLINK (Windows).
+lib_prefix=lib
+lib_suffix=a
+case "$host_os" in
+ cygwin* | mingw* | pw32* | cegcc*)
+ lib_prefix=""
+ lib_suffix=lib
+ ;;
+esac
+D_LIB_NAME="${lib_prefix}thriftd.${lib_suffix}"
+AC_SUBST(D_LIB_NAME)
+D_EVENT_LIB_NAME="${lib_prefix}thriftd-event.${lib_suffix}"
+AC_SUBST(D_EVENT_LIB_NAME)
+D_SSL_LIB_NAME="${lib_prefix}thriftd-ssl.${lib_suffix}"
+AC_SUBST(D_SSL_LIB_NAME)
+
+if test "$have_d" = "yes"; then
+ AX_CHECK_D_MODULE(deimos.event2.event)
+ have_deimos_event2=$success
+
+ with_d_event_tests="no"
+ if test "$have_deimos_event2" = "yes"; then
+ if test "x$DMD_LIBEVENT_FLAGS" = "x"; then
+ if test "$dmd_optlink" = "yes"; then
+ AC_MSG_WARN([D libevent interface found, but cannot auto-detect \
+linker flags for OPTLINK. Please set DMD_LIBEVENT_FLAGS manually.])
+ else
+ AX_LIB_EVENT([2.0])
+ if test "$success" = "yes"; then
+ DMD_LIBEVENT_FLAGS=$(echo "$LIBEVENT_LDFLAGS $LIBEVENT_LIBS" | \
+ sed -e 's/^ *//g;s/ *$//g;s/^\(.\)/-L\1/g;s/ */ -L/g')
+ with_d_event_tests="yes"
+ else
+ AC_MSG_WARN([D libevent interface present, but libevent library not found.])
+ fi
+ fi
+ else
+ with_d_event_tests="yes"
+ fi
+ fi
+
+ AX_CHECK_D_MODULE(deimos.openssl.ssl)
+ have_deimos_openssl=$success
+
+ with_d_ssl_tests="no"
+ if test "$have_deimos_openssl" = "yes"; then
+ if test "x$DMD_OPENSSL_FLAGS" = "x"; then
+ if test "$dmd_optlink" = "yes"; then
+ AC_MSG_WARN([D OpenSSL interface found, but cannot auto-detect \
+linker flags for OPTLINK. Please set DMD_OPENSSL_FLAGS manually.])
+ else
+ AX_CHECK_OPENSSL([with_d_ssl_tests="yes"])
+ if test "$with_d_ssl_tests" = "yes"; then
+ DMD_OPENSSL_FLAGS=$(echo "$OPENSSL_LDFLAGS $OPENSSL_LIBS" | \
+ sed -e 's/^ *//g;s/ *$//g;s/^\(.\)/-L\1/g;s/ */ -L/g')
+ else
+ AC_MSG_WARN([D OpenSSL interface present, but OpenSSL library not found.])
+ fi
+ fi
+ else
+ with_d_ssl_tests="yes"
+ fi
+ fi
+fi
+
+AM_CONDITIONAL(WITH_D, [test "$have_d" = "yes"])
+AM_CONDITIONAL(DMD_OPTLINK, [test "$dmd_optlink" = "yes"])
+AC_SUBST(DMD_OF_DIRSEP, "$dmd_of_dirsep")
+AM_CONDITIONAL(HAVE_DEIMOS_EVENT2, [test "$have_deimos_event2" = "yes"])
+AM_CONDITIONAL(WITH_D_EVENT_TESTS, [test "$with_d_event_tests" = "yes"])
+AC_SUBST(DMD_LIBEVENT_FLAGS)
+AM_CONDITIONAL(HAVE_DEIMOS_OPENSSL, [test "$have_deimos_openssl" = "yes"])
+AM_CONDITIONAL(WITH_D_SSL_TESTS, [test "$with_d_ssl_tests" = "yes"])
+AC_SUBST(DMD_OPENSSL_FLAGS)
+
+AC_ARG_ENABLE([tests],
+ AS_HELP_STRING([--enable-tests], [build tests [default=yes]]),
+ [], enable_tests=yes
+)
+have_tests=yes
+if test "$enable_tests" = "no"; then
+ have_tests="no"
+fi
+AM_CONDITIONAL(WITH_TESTS, [test "$have_tests" = "yes"])
+
+AC_ARG_ENABLE([plugin],
+ AS_HELP_STRING([--enable-plugin], [build compiler plugin support [default=yes]]),
+ [], enable_plugin=yes
+)
+have_plugin=yes
+if test "$have_cpp" = "no" ; then
+ have_plugin="no"
+fi
+if test "$enable_plugin" = "no"; then
+ have_plugin="no"
+fi
+if test "$have_plugin" = "yes" ; then
+ AC_CONFIG_LINKS([compiler/cpp/test/plugin/t_cpp_generator.cc:compiler/cpp/src/thrift/generate/t_cpp_generator.cc])
+fi
+AM_CONDITIONAL(WITH_PLUGIN, [test "$have_plugin" = "yes"])
+
+AC_ARG_ENABLE([tutorial],
+ AS_HELP_STRING([--enable-tutorial], [build tutorial [default=yes]]),
+ [], enable_tutorial=yes
+)
+have_tutorial=yes
+if test "$enable_tutorial" = "no"; then
+ have_tutorial="no"
+fi
+AM_CONDITIONAL(WITH_TUTORIAL, [test "$have_tutorial" = "yes"])
+
+AM_CONDITIONAL(MINGW, false)
+case "${host_os}" in
+*mingw*)
+ mingw32_support="yes"
+ AC_CHECK_HEADER(windows.h)
+ AM_CONDITIONAL(MINGW, true)
+ ;;
+*)
+ AC_ISC_POSIX
+ ;;
+esac
+
+AC_C_CONST
+AC_C_INLINE
+AC_C_VOLATILE
+
+AC_HEADER_STDBOOL
+AC_HEADER_STDC
+AC_HEADER_TIME
+AC_HEADER_SYS_WAIT
+AC_TYPE_SIGNAL
+AC_CHECK_HEADERS([arpa/inet.h])
+AC_CHECK_HEADERS([sys/param.h])
+AC_CHECK_HEADERS([fcntl.h])
+AC_CHECK_HEADERS([inttypes.h])
+AC_CHECK_HEADERS([limits.h])
+AC_CHECK_HEADERS([netdb.h])
+AC_CHECK_HEADERS([netinet/in.h])
+AC_CHECK_HEADERS([pthread.h])
+AC_CHECK_HEADERS([stddef.h])
+AC_CHECK_HEADERS([stdlib.h])
+AC_CHECK_HEADERS([sys/socket.h])
+AC_CHECK_HEADERS([sys/time.h])
+AC_CHECK_HEADERS([sys/un.h])
+AC_CHECK_HEADERS([sys/poll.h])
+AC_CHECK_HEADERS([sys/resource.h])
+AC_CHECK_HEADERS([unistd.h])
+AC_CHECK_HEADERS([libintl.h])
+AC_CHECK_HEADERS([malloc.h])
+AC_CHECK_HEADERS([openssl/ssl.h])
+AC_CHECK_HEADERS([openssl/rand.h])
+AC_CHECK_HEADERS([openssl/x509v3.h])
+AC_CHECK_HEADERS([sched.h])
+AC_CHECK_HEADERS([wchar.h])
+
+AC_CHECK_LIB(pthread, pthread_create)
+dnl NOTE(dreiss): I haven't been able to find any really solid docs
+dnl on what librt is and how it fits into various Unix systems.
+dnl My best guess is that it is where glibc stashes its implementation
+dnl of the POSIX Real-Time Extensions. This seems necessary on Linux,
+dnl and we haven't yet found a system where this is a problem.
+AC_CHECK_LIB(rt, clock_gettime)
+AC_CHECK_LIB(socket, setsockopt)
+
+AC_TYPE_INT16_T
+AC_TYPE_INT32_T
+AC_TYPE_INT64_T
+AC_TYPE_INT8_T
+AC_TYPE_MODE_T
+AC_TYPE_OFF_T
+AC_TYPE_SIZE_T
+AC_TYPE_SSIZE_T
+AC_TYPE_UINT16_T
+AC_TYPE_UINT32_T
+AC_TYPE_UINT64_T
+AC_TYPE_UINT8_T
+AC_CHECK_TYPES([ptrdiff_t], [], [exit 1])
+
+AC_STRUCT_TM
+
+dnl NOTE(dreiss): AI_ADDRCONFIG is not defined on OpenBSD.
+AC_CHECK_DECL([AI_ADDRCONFIG], [],
+ [AC_DEFINE([AI_ADDRCONFIG], 0,
+ [Define if the AI_ADDRCONFIG symbol is unavailable])],
+ [
+ #include
+ #include
+ #include
+])
+
+AC_FUNC_ALLOCA
+AC_FUNC_FORK
+AC_FUNC_MALLOC
+AC_FUNC_MEMCMP
+AC_FUNC_REALLOC
+AC_FUNC_SELECT_ARGTYPES
+AC_FUNC_STAT
+AC_FUNC_STRERROR_R
+AC_FUNC_STRFTIME
+AC_FUNC_VPRINTF
+AC_CHECK_FUNCS([strtoul])
+AC_CHECK_FUNCS([bzero])
+AC_CHECK_FUNCS([ftruncate])
+AC_CHECK_FUNCS([gethostbyname])
+AC_CHECK_FUNCS([gethostbyname_r])
+AC_CHECK_FUNCS([gettimeofday])
+AC_CHECK_FUNCS([memmove])
+AC_CHECK_FUNCS([memset])
+AC_CHECK_FUNCS([mkdir])
+AC_CHECK_FUNCS([realpath])
+AC_CHECK_FUNCS([select])
+AC_CHECK_FUNCS([setlocale])
+AC_CHECK_FUNCS([socket])
+AC_CHECK_FUNCS([strchr])
+AC_CHECK_FUNCS([strdup])
+AC_CHECK_FUNCS([strerror])
+AC_CHECK_FUNCS([strstr])
+AC_CHECK_FUNCS([strtol])
+AC_CHECK_FUNCS([sqrt])
+dnl The following functions are optional.
+AC_CHECK_FUNCS([alarm])
+AC_CHECK_FUNCS([clock_gettime])
+AC_CHECK_FUNCS([sched_get_priority_min])
+AC_CHECK_FUNCS([sched_get_priority_max])
+AC_CHECK_FUNCS([inet_ntoa])
+AC_CHECK_FUNCS([pow])
+
+if test "$cross_compiling" = "no" ; then
+ AX_SIGNED_RIGHT_SHIFT
+fi
+
+dnl autoscan thinks we need this macro because we have a member function
+dnl called "error". Invoke the macro but don't run the check so autoscan
+dnl thinks we are in the clear. It's highly unlikely that we will ever
+dnl actually use the function that this checks for.
+if false ; then
+ AC_FUNC_ERROR_AT_LINE
+fi
+
+# --- Coverage hooks ---
+
+AC_ARG_ENABLE(coverage,
+ [ --enable-coverage turn on -fprofile-arcs -ftest-coverage],
+ [case "${enableval}" in
+ yes) ENABLE_COVERAGE=1 ;;
+ no) ENABLE_COVERAGE=0 ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-cov) ;;
+ esac],
+ [ENABLE_COVERAGE=2])
+
+if test "x[$]ENABLE_COVERAGE" = "x1"; then
+ AC_MSG_WARN(enable coverage)
+ GCOV_CFLAGS="`echo \"[$]CFLAGS\" | perl -pe 's/-O\d+//g;'` -fprofile-arcs -ftest-coverage"
+ GCOV_CXXFLAGS="`echo \"[$]CXXFLAGS\" | perl -pe 's/-O\d+//g;'` -fprofile-arcs -ftest-coverage"
+ GCOV_LDFLAGS="-XCClinker -fprofile-arcs -XCClinker -ftest-coverage"
+fi
+
+AC_SUBST(ENABLE_COVERAGE)
+AC_SUBST(GCOV_CFLAGS)
+AC_SUBST(GCOV_CXXFLAGS)
+AC_SUBST(GCOV_LDFLAGS)
+
+AC_ARG_ENABLE(boostthreads,
+ [ --enable-boostthreads use boost threads, instead of POSIX pthread (experimental) ],
+ [case "${enableval}" in
+ yes) ENABLE_BOOSTTHREADS=1 ;;
+ no) ENABLE_BOOSTTHREADS=0 ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-cov) ;;
+ esac],
+ [ENABLE_BOOSTTHREADS=2])
+
+
+if test "x[$]ENABLE_BOOSTTHREADS" = "x1"; then
+ AC_MSG_WARN(enable boostthreads)
+ AC_DEFINE([USE_BOOST_THREAD], [1], [experimental --enable-boostthreads that replaces POSIX pthread by boost::thread])
+ LIBS="-lboost_thread $LIBS"
+fi
+
+AM_CONDITIONAL([WITH_BOOSTTHREADS], [test "x[$]ENABLE_BOOSTTHREADS" = "x1"])
+
+AC_CONFIG_HEADERS(config.h:config.hin)
+AC_CONFIG_HEADERS(lib/cpp/src/thrift/config.h:config.hin)
+AC_CONFIG_HEADERS(lib/c_glib/src/thrift/config.h:config.hin)
+# gruard against pre defined config.h
+AH_TOP([
+#ifndef CONFIG_H
+#define CONFIG_H
+])
+AH_BOTTOM([
+#endif
+])
+
+
+AC_CONFIG_FILES([
+ Makefile
+ compiler/cpp/Makefile
+ compiler/cpp/src/Makefile
+ compiler/cpp/src/thrift/plugin/Makefile
+ compiler/cpp/test/Makefile
+ compiler/cpp/src/thrift/version.h
+ lib/Makefile
+ lib/cpp/Makefile
+ lib/cpp/test/Makefile
+ lib/cpp/thrift-nb.pc
+ lib/cpp/thrift-z.pc
+ lib/cpp/thrift-qt.pc
+ lib/cpp/thrift-qt5.pc
+ lib/cpp/thrift.pc
+ lib/c_glib/Makefile
+ lib/c_glib/thrift_c_glib.pc
+ lib/c_glib/test/Makefile
+ lib/csharp/Makefile
+ lib/csharp/test/Multiplex/Makefile
+ lib/d/Makefile
+ lib/d/test/Makefile
+ lib/erl/Makefile
+ lib/go/Makefile
+ lib/go/test/Makefile
+ lib/haxe/test/Makefile
+ lib/hs/Makefile
+ lib/java/Makefile
+ lib/js/Makefile
+ lib/js/test/Makefile
+ lib/json/Makefile
+ lib/json/test/Makefile
+ lib/nodejs/Makefile
+ lib/perl/Makefile
+ lib/perl/test/Makefile
+ lib/php/Makefile
+ lib/php/test/Makefile
+ lib/dart/Makefile
+ lib/py/Makefile
+ lib/rb/Makefile
+ lib/lua/Makefile
+ lib/xml/Makefile
+ lib/xml/test/Makefile
+ test/Makefile
+ test/features/Makefile
+ test/c_glib/Makefile
+ test/cpp/Makefile
+ test/csharp/Makefile
+ test/erl/Makefile
+ test/go/Makefile
+ test/haxe/Makefile
+ test/hs/Makefile
+ test/lua/Makefile
+ test/php/Makefile
+ test/dart/Makefile
+ test/perl/Makefile
+ test/py/Makefile
+ test/py.twisted/Makefile
+ test/py.tornado/Makefile
+ test/rb/Makefile
+ tutorial/Makefile
+ tutorial/c_glib/Makefile
+ tutorial/cpp/Makefile
+ tutorial/d/Makefile
+ tutorial/go/Makefile
+ tutorial/haxe/Makefile
+ tutorial/hs/Makefile
+ tutorial/java/Makefile
+ tutorial/js/Makefile
+ tutorial/nodejs/Makefile
+ tutorial/dart/Makefile
+ tutorial/py/Makefile
+ tutorial/py.twisted/Makefile
+ tutorial/py.tornado/Makefile
+ tutorial/rb/Makefile
+])
+
+if test "$have_cpp" = "yes" ; then MAYBE_CPP="cpp" ; else MAYBE_CPP="" ; fi
+AC_SUBST([MAYBE_CPP])
+if test "$have_c_glib" = "yes" ; then MAYBE_C_GLIB="c_glib" ; else MAYBE_C_GLIB="" ; fi
+AC_SUBST([MAYBE_C_GLIB])
+if test "$have_d" = "yes" -a "$have_deimos_event2" = "yes" -a "$have_deimos_openssl" = "yes"; then MAYBE_D="d" ; else MAYBE_D="" ; fi
+AC_SUBST([MAYBE_D])
+if test "$have_java" = "yes" ; then MAYBE_JAVA="java" ; else MAYBE_JAVA="" ; fi
+AC_SUBST([MAYBE_JAVA])
+if test "$have_csharp" = "yes" ; then MAYBE_CSHARP="csharp" ; else MAYBE_CSHARP="" ; fi
+AC_SUBST([MAYBE_CSHARP])
+if test "$have_python" = "yes" ; then MAYBE_PYTHON="py" ; else MAYBE_PYTHON="" ; fi
+AC_SUBST([MAYBE_PYTHON])
+if test "$have_py3" = "yes" ; then MAYBE_PY3="py3" ; else MAYBE_PY3="" ; fi
+AC_SUBST([MAYBE_PY3])
+if test "$have_ruby" = "yes" ; then MAYBE_RUBY="rb" ; else MAYBE_RUBY="" ; fi
+AC_SUBST([MAYBE_RUBY])
+if test "$have_haskell" = "yes" ; then MAYBE_HASKELL="hs" ; else MAYBE_HASKELL="" ; fi
+AC_SUBST([MAYBE_HASKELL])
+if test "$have_perl" = "yes" ; then MAYBE_PERL="perl" ; else MAYBE_PERL="" ; fi
+AC_SUBST([MAYBE_PERL])
+if test "$have_php" = "yes" ; then MAYBE_PHP="php" ; else MAYBE_PHP="" ; fi
+AC_SUBST([MAYBE_PHP])
+if test "$have_dart" = "yes" ; then MAYBE_DART="dart" ; else MAYBE_DART="" ; fi
+AC_SUBST([MAYBE_DART])
+if test "$have_go" = "yes" ; then MAYBE_GO="go" ; else MAYBE_GO="" ; fi
+AC_SUBST([MAYBE_GO])
+if test "$have_nodejs" = "yes" ; then MAYBE_NODEJS="nodejs" ; else MAYBE_NODEJS="" ; fi
+AC_SUBST([MAYBE_NODEJS])
+if test "$have_erlang" = "yes" ; then MAYBE_ERLANG="erl" ; else MAYBE_ERLANG="" ; fi
+AC_SUBST([MAYBE_ERLANG])
+if test "$have_lua" = "yes" ; then MAYBE_LUA="lua" ; else MAYBE_LUA="" ; fi
+AC_SUBST([MAYBE_LUA])
+
+AC_OUTPUT
+
+
+echo
+echo "$PACKAGE $VERSION"
+echo
+echo "Building Plugin Support ...... : $have_plugin"
+echo "Building C++ Library ......... : $have_cpp"
+echo "Building C (GLib) Library .... : $have_c_glib"
+echo "Building Java Library ........ : $have_java"
+echo "Building C# Library .......... : $have_csharp"
+echo "Building Python Library ...... : $have_python"
+echo "Building Ruby Library ........ : $have_ruby"
+echo "Building Haxe Library ........ : $have_haxe"
+echo "Building Haskell Library ..... : $have_haskell"
+echo "Building Perl Library ........ : $have_perl"
+echo "Building PHP Library ......... : $have_php"
+echo "Building Dart Library ........ : $have_dart"
+echo "Building Erlang Library ...... : $have_erlang"
+echo "Building Go Library .......... : $have_go"
+echo "Building D Library ........... : $have_d"
+echo "Building NodeJS Library ...... : $have_nodejs"
+echo "Building Lua Library ......... : $have_lua"
+
+if test "$have_cpp" = "yes" ; then
+ echo
+ echo "C++ Library:"
+ echo " Build TZlibTransport ...... : $have_zlib"
+ echo " Build TNonblockingServer .. : $have_libevent"
+ echo " Build TQTcpServer (Qt4) .... : $have_qt"
+ echo " Build TQTcpServer (Qt5) .... : $have_qt5"
+fi
+if test "$have_java" = "yes" ; then
+ echo
+ echo "Java Library:"
+ echo " Using javac ............... : $JAVAC"
+ echo " Using java ................ : $JAVA"
+ echo " Using ant ................. : $ANT"
+fi
+if test "$have_csharp" = "yes" ; then
+ echo
+ echo "C# Library:"
+ echo " Using .NET 3.5 ............ : $net_3_5"
+fi
+if test "$have_python" = "yes" ; then
+ echo
+ echo "Python Library:"
+ echo " Using Python .............. : $PYTHON"
+ if test "$have_py3" = "yes" ; then
+ echo " Using Python3 ............. : $PYTHON3"
+ fi
+ if test "$have_trial" = "yes"; then
+ echo " Using trial ............... : $TRIAL"
+ fi
+fi
+if test "$have_php" = "yes" ; then
+ echo
+ echo "PHP Library:"
+ echo " Using php-config .......... : $PHP_CONFIG"
+fi
+if test "$have_dart" = "yes" ; then
+ echo
+ echo "Dart Library:"
+ echo " Using Dart ................ : $DART"
+ echo " Using Pub ................. : $DARTPUB"
+fi
+if test "$have_ruby" = "yes" ; then
+ echo
+ echo "Ruby Library:"
+ echo " Using Ruby ................ : $RUBY"
+fi
+if test "$have_haskell" = "yes" ; then
+ echo
+ echo "Haskell Library:"
+ echo " Using Haskell ............. : $RUNHASKELL"
+ echo " Using Cabal ............... : $CABAL"
+fi
+if test "$have_haxe" = "yes" ; then
+ echo
+ echo "Haxe Library:"
+ echo " Using Haxe ................ : $HAXE"
+ echo " Using Haxe version ........ : $HAXE_VERSION"
+fi
+if test "$have_perl" = "yes" ; then
+ echo
+ echo "Perl Library:"
+ echo " Using Perl ................ : $PERL"
+fi
+if test "$have_erlang" = "yes" ; then
+ echo
+ echo "Erlang Library:"
+ echo " Using erlc ................ : $ERLC"
+ echo " Using rebar ............... : $REBAR"
+fi
+if test "$have_go" = "yes" ; then
+ echo
+ echo "Go Library:"
+ echo " Using Go................... : $GO"
+ echo " Using Go version........... : $($GO version)"
+fi
+if test "$have_d" = "yes" ; then
+ echo
+ echo "D Library:"
+ echo " Using D Compiler .......... : $DMD"
+ echo " Building D libevent tests . : $with_d_event_tests"
+ echo " Building D SSL tests ...... : $with_d_ssl_tests"
+fi
+if test "$have_nodejs" = "yes" ; then
+ echo
+ echo "NodeJS Library:"
+ echo " Using NodeJS .............. : $NODEJS"
+ echo " Using NodeJS version....... : $($NODEJS --version)"
+fi
+if test "$have_lua" = "yes" ; then
+ echo
+ echo "Lua Library:"
+ echo " Using Lua .............. : $LUA"
+fi
+echo
+echo "If something is missing that you think should be present,"
+echo "please skim the output of configure to find the missing"
+echo "component. Details are present in config.log."
diff --git a/vendor/github.com/apache/thrift/doap.rdf b/vendor/github.com/apache/thrift/doap.rdf
new file mode 100755
index 00000000000..14a8d6638d5
--- /dev/null
+++ b/vendor/github.com/apache/thrift/doap.rdf
@@ -0,0 +1,132 @@
+
+
+
+
+
+ 2012-04-14
+
+ Apache Thrift
+
+
+ Apache Thrift software provides a framework for scalable cross-language services development, combines a software stack with a code generation engine to build services that work efficiently and seamlessly between C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, OCaml and Delphi and other languages.
+ Apache Thrift allows you to define data types and service interfaces in a simple definition file. Taking that file as input, the compiler generates code to be used to easily build RPC clients and servers that communicate seamlessly across programming languages. Instead of writing a load of boilerplate code to serialize and transport your objects and invoke remote methods, you can get right down to business.
+
+
+
+ ActionScript
+ C
+ C#
+ C++
+ Cocoa
+ D
+ Delphi
+ Erlang
+ Go
+ Haskell
+ Java
+ JavaScript
+ node.js
+ OCaml
+ Perl
+ PHP
+ Python
+ SmallTalk
+
+
+
+
+
+
+ Apache Thrift
+ 2015-09-25
+ 0.9.3
+
+
+ Apache Thrift
+ 2014-11-05
+ 0.9.2
+
+
+ Apache Thrift
+ 2013-08-22
+ 0.9.1
+
+
+ Apache Thrift
+ 2012-10-15
+ 0.9.0
+
+
+ Apache Thrift
+ 2011-11-29
+ 0.8.0
+
+
+ Apache Thrift
+ 2011-08-13
+ 0.7.0
+
+
+ Apache Thrift
+ 2011-04-25
+ 0.6.1
+
+
+ Apache Thrift
+ 2011-02-08
+ 0.6.0
+
+
+ Apache Thrift (incubating)
+ 2010-10-07
+ 0.5.0
+
+
+ Apache Thrift (incubating)
+ 2010-08-23
+ 0.4.0
+
+
+ Apache Thrift (incubating)
+ 2010-08-04
+ 0.3.0
+
+
+ Apache Thrift (incubating)
+ 2009-12-11
+ 0.2.0
+
+
+
+
+
+
+
+
+
+
+ Apache Thrift PMC
+
+
+
+
+
diff --git a/vendor/github.com/apache/thrift/lib/Makefile.am b/vendor/github.com/apache/thrift/lib/Makefile.am
new file mode 100644
index 00000000000..5f17fca882d
--- /dev/null
+++ b/vendor/github.com/apache/thrift/lib/Makefile.am
@@ -0,0 +1,109 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+SUBDIRS = json xml
+PRECROSS_TARGET =
+
+if WITH_CPP
+# cpp dir is picked directly by plugin build
+if !WITH_PLUGIN
+SUBDIRS += cpp
+endif
+endif
+
+if WITH_C_GLIB
+SUBDIRS += c_glib
+endif
+
+if WITH_MONO
+SUBDIRS += csharp
+endif
+
+if WITH_JAVA
+SUBDIRS += java
+PRECROSS_TARGET += precross-java
+# JavaScript unit test depends on java
+# so test only if java, ant & co is available
+SUBDIRS += js
+endif
+
+if WITH_PYTHON
+SUBDIRS += py
+endif
+
+if WITH_ERLANG
+SUBDIRS += erl
+endif
+
+if WITH_RUBY
+SUBDIRS += rb
+endif
+
+if WITH_HASKELL
+SUBDIRS += hs
+endif
+
+if WITH_PERL
+SUBDIRS += perl
+endif
+
+if WITH_PHP
+SUBDIRS += php
+endif
+
+if WITH_DART
+SUBDIRS += dart
+endif
+
+if WITH_GO
+SUBDIRS += go
+endif
+
+if WITH_D
+SUBDIRS += d
+PRECROSS_TARGET += precross-d
+endif
+
+if WITH_NODEJS
+SUBDIRS += nodejs
+PRECROSS_TARGET += precross-nodejs
+endif
+
+if WITH_LUA
+SUBDIRS += lua
+endif
+
+# All of the libs that don't use Automake need to go in here
+# so they will end up in our release tarballs.
+EXTRA_DIST = \
+ as3 \
+ cocoa \
+ d \
+ dart \
+ delphi \
+ haxe \
+ javame \
+ js \
+ ocaml \
+ st \
+ ts
+
+precross-%:
+ $(MAKE) -C $* precross
+precross: $(PRECROSS_TARGET)
diff --git a/vendor/github.com/apache/thrift/lib/go/Makefile.am b/vendor/github.com/apache/thrift/lib/go/Makefile.am
new file mode 100644
index 00000000000..ff946ea8d0c
--- /dev/null
+++ b/vendor/github.com/apache/thrift/lib/go/Makefile.am
@@ -0,0 +1,42 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+SUBDIRS = .
+
+if WITH_TESTS
+SUBDIRS += test
+endif
+
+install:
+ @echo '##############################################################'
+ @echo '##############################################################'
+ @echo 'The Go client library should be installed via "go get", please see /lib/go/README.md'
+ @echo '##############################################################'
+ @echo '##############################################################'
+
+check-local:
+ $(GO) test ./thrift
+
+all-local:
+ $(GO) build ./thrift
+
+EXTRA_DIST = \
+ thrift \
+ coding_standards.md \
+ README.md
diff --git a/vendor/github.com/apache/thrift/lib/go/README.md b/vendor/github.com/apache/thrift/lib/go/README.md
new file mode 100644
index 00000000000..7440474c325
--- /dev/null
+++ b/vendor/github.com/apache/thrift/lib/go/README.md
@@ -0,0 +1,81 @@
+Thrift Go Software Library
+
+License
+=======
+
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+
+
+Using Thrift with Go
+====================
+
+In following Go conventions, we recommend you use the 'go' tool to install
+Thrift for go.
+
+ $ go get git.apache.org/thrift.git/lib/go/thrift/...
+
+Will retrieve and install the most recent version of the package.
+
+
+A note about optional fields
+============================
+
+The thrift-to-Go compiler tries to represent thrift IDL structs as Go structs.
+We must be able to distinguish between optional fields that are set to their
+default value and optional values which are actually unset, so the generated
+code represents optional fields via pointers.
+
+This is generally intuitive and works well much of the time, but Go does not
+have a syntax for creating a pointer to a constant in a single expression. That
+is, given a struct like
+
+ struct SomeIDLType {
+ OptionalField *int32
+ }
+
+, the following will not compile:
+
+ x := &SomeIDLType{
+ OptionalField: &(3),
+ }
+
+(Nor is there any other syntax that's built in to the language)
+
+As such, we provide some helpers that do just this under lib/go/thrift/. E.g.,
+
+ x := &SomeIDLType{
+ OptionalField: thrift.Int32Ptr(3),
+ }
+
+And so on. The code generator also creates analogous helpers for user-defined
+typedefs and enums.
+
+Adding custom tags to generated Thrift structs
+==============================================
+
+You can add tags to the auto-generated thrift structs using the following format:
+
+ struct foo {
+ 1: required string Bar (go.tag = "some_tag:\"some_tag_value\"")
+ }
+
+which will generate:
+
+ type Foo struct {
+ Bar string `thrift:"bar,1,required" some_tag:"some_tag_value"`
+ }
diff --git a/vendor/github.com/apache/thrift/lib/go/coding_standards.md b/vendor/github.com/apache/thrift/lib/go/coding_standards.md
new file mode 100644
index 00000000000..fa0390bb577
--- /dev/null
+++ b/vendor/github.com/apache/thrift/lib/go/coding_standards.md
@@ -0,0 +1 @@
+Please follow [General Coding Standards](/doc/coding_standards.md)
diff --git a/vendor/github.com/apache/thrift/package.json b/vendor/github.com/apache/thrift/package.json
new file mode 100644
index 00000000000..edfc3553ed5
--- /dev/null
+++ b/vendor/github.com/apache/thrift/package.json
@@ -0,0 +1,54 @@
+{
+ "name": "thrift",
+ "description": "node.js bindings for the Apache Thrift RPC system",
+ "homepage": "http://thrift.apache.org/",
+ "repository": {
+ "type": "git",
+ "url": "https://git-wip-us.apache.org/repos/asf/thrift.git"
+ },
+ "version": "0.10.0",
+ "author": {
+ "name": "Apache Thrift Developers",
+ "email": "dev@thrift.apache.org",
+ "url": "http://thrift.apache.org"
+ },
+ "license": "Apache-2.0",
+ "licenses": [
+ {
+ "type": "Apache-2.0",
+ "url": "http://www.apache.org/licenses/LICENSE-2.0"
+ }
+ ],
+ "bugs": {
+ "mail": "dev@thrift.apache.org",
+ "url": "https://issues.apache.org/jira/browse/THRIFT"
+ },
+ "files": [
+ "lib/nodejs/lib/thrift",
+ "lib/nodejs/README.md"
+ ],
+ "directories": {
+ "lib": "./lib/nodejs/lib/thrift"
+ },
+ "main": "./lib/nodejs/lib/thrift",
+ "engines": {
+ "node": ">= 0.2.4"
+ },
+ "dependencies": {
+ "node-int64": "~0.3.0",
+ "q": "1.0.x",
+ "ws": "~0.4.32"
+ },
+ "devDependencies": {
+ "buffer-equals": "^1.0.3",
+ "commander": "2.1.x",
+ "connect": "2.7.x",
+ "istanbul": "^0.3.5",
+ "run-browser": "^2.0.1",
+ "tape": "~3.5.0"
+ },
+ "scripts": {
+ "cover": "lib/nodejs/test/testAll.sh COVER",
+ "test": "lib/nodejs/test/testAll.sh"
+ }
+}
diff --git a/vendor/github.com/apache/thrift/sonar-project.properties b/vendor/github.com/apache/thrift/sonar-project.properties
new file mode 100755
index 00000000000..6e6c5db90d1
--- /dev/null
+++ b/vendor/github.com/apache/thrift/sonar-project.properties
@@ -0,0 +1,140 @@
+# Apache Thrift © The Apache Software Foundation
+# http://www.apache.org/licenses/LICENSE-2.0
+# SPDX-License-Identifier: Apache-2.0
+
+# File: sonar-project.properties
+# Apache Thrift configuration file for Sonar https://analysis.apache.org/
+# Sonar is an open platform to manage code quality http://www.sonarsource.org/
+
+
+# required metadata
+sonar.projectKey=org.apache.thrift
+sonar.projectName=Apache Thrift
+sonar.projectDescription=
+The Apache Thrift software framework, for scalable cross-language services
+development, combines a software stack with a code generation engine to build
+services that work efficiently and seamlessly between all major languages.
+
+# Apache Thrift Version
+sonar.projectVersion=0.10.0
+# use this to set another version string
+# $ sonar-runner -D sonar.projectVersion=`git rev-parse HEAD`
+# set projectDate in combination with projectVersion for imports of old releases
+#sonar.projectDate=yyyy-MM-dd
+
+# TODO add website (sonar.projectUrl does not work)
+#sonar.XXXX=http//thrift.apache.org
+
+# Some properties that will be inherited by the modules
+sonar.sources=src
+sonar.language=java,js,c++,py,c
+sonar.sourceEncoding=UTF-8
+
+# scm
+sonar.scm.url=scm:git:https://git-wip-us.apache.org/repos/asf/thrift
+
+# cppcheck -q --error-exitcode=0 --xml . 2> cppcheck-result.xml
+sonar.cxx.cppcheck.reportPath=cppcheck-result.xml
+
+# List of the module identifiers
+sonar.modules=module1,module3,module4,module5,module6,module7,module8,module9,module10,module11,module12,module14
+
+
+
+# we need sonar-runner 2.1 for this, see http://jira.codehaus.org/browse/SONARPLUGINS-2421
+#sonar.modules=module2
+
+# delph plugin is broken
+#sonar.modules=module13
+
+# phpunit plugin is broken
+#sonar.modules=module15
+
+module1.sonar.projectName=Apache Thrift - Java Library
+module1.sonar.projectBaseDir=lib/java
+module1.sonar.sources=src
+module1.sonar.tests=test
+module1.sonar.binaries=build/libthrift-0.10.0.jar
+module1.sonar.libraries=build/lib/*.jar
+module1.sonar.language=java
+
+module2.sonar.projectName=Apache Thrift - Java Tutorial
+module2.sonar.projectBaseDir=.
+module2.sonar.sources=tutorial/java/src, tutorial/java/gen-java
+module2.sonar.binaries=tutorial/java/tutorial.jar
+module2.sonar.libraries=lib/java/build/lib/*.jar,lib/java/build/libthrift-1.0.0.jar
+module2.sonar.language=java
+
+module3.sonar.projectName=Apache Thrift - JavaScript Library
+module3.sonar.projectBaseDir=lib/js
+module3.sonar.sources=.
+module3.sonar.exclusions=test/**/*
+module3.sonar.language=js
+
+module4.sonar.projectName=Apache Thrift - JavaScript Tutorial
+module4.sonar.projectBaseDir=tutorial/js
+module4.sonar.sources=.
+module4.sonar.language=web
+
+module5.sonar.projectName=Apache Thrift - C++ Library
+module5.sonar.projectBaseDir=lib/cpp
+module5.sonar.sources=src
+module5.sonar.tests=test
+module5.sonar.language=c++
+
+module6.sonar.projectName=Apache Thrift - C++ Tutorial
+module6.sonar.projectBaseDir=tutorial/cpp
+module6.sonar.sources=.
+module6.sonar.exclusions=gen-cpp/**/*
+module6.sonar.language=c++
+
+module7.sonar.projectName=Apache Thrift - C++ Cross Language Test
+module7.sonar.projectBaseDir=test/cpp
+module7.sonar.sources=src
+module7.sonar.language=c++
+
+module8.sonar.projectName=Apache Thrift - Compiler
+module8.sonar.projectBaseDir=compiler/cpp
+module8.sonar.sources=src
+module8.sonar.language=c++
+
+module9.sonar.projectName=Apache Thrift - Python Library
+module9.sonar.projectBaseDir=lib/py
+module9.sonar.sources=src
+module9.sonar.language=py
+
+module10.sonar.projectName=Apache Thrift - Python Tutorial
+module10.sonar.projectBaseDir=tutorial/py
+module10.sonar.sources=.
+module10.sonar.exclusions=gen-py/**/*
+module10.sonar.language=py
+
+module11.sonar.projectName=Apache Thrift - Python Cross Language Test
+module11.sonar.projectBaseDir=test/py
+module11.sonar.sources=.
+module11.sonar.exclusions=gen-*/**/*
+module11.sonar.language=py
+
+module12.sonar.projectName=Apache Thrift - c_glib Library
+module12.sonar.projectBaseDir=lib/c_glib
+module12.sonar.sources=src
+module12.sonar.language=c
+
+module13.sonar.projectName=Apache Thrift - Delphi Library
+module13.sonar.projectBaseDir=lib/delphi
+module13.sonar.sources=src
+module13.sonar.tests=test
+module13.sonar.language=delph
+
+module14.sonar.projectName=Apache Thrift - Flex (as3) Library
+module14.sonar.projectBaseDir=lib/as3
+module14.sonar.sources=src
+module14.sonar.language=flex
+
+module15.sonar.projectName=Apache Thrift - PHP Library
+module15.sonar.projectBaseDir=lib/php
+module15.sonar.sources=src
+module15.sonar.language=php
+
+# TODO add some more languages here
+
diff --git a/vendor/github.com/aws/aws-sdk-go/.gitignore b/vendor/github.com/aws/aws-sdk-go/.gitignore
new file mode 100644
index 00000000000..fb11ceca011
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/.gitignore
@@ -0,0 +1,11 @@
+dist
+/doc
+/doc-staging
+.yardoc
+Gemfile.lock
+awstesting/integration/smoke/**/importmarker__.go
+awstesting/integration/smoke/_test/
+/vendor/bin/
+/vendor/pkg/
+/vendor/src/
+/private/model/cli/gen-api/gen-api
diff --git a/vendor/github.com/aws/aws-sdk-go/.godoc_config b/vendor/github.com/aws/aws-sdk-go/.godoc_config
new file mode 100644
index 00000000000..395878d6cc4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/.godoc_config
@@ -0,0 +1,14 @@
+{
+ "PkgHandler": {
+ "Pattern": "/sdk-for-go/api/",
+ "StripPrefix": "/sdk-for-go/api",
+ "Include": ["/src/github.com/aws/aws-sdk-go/aws", "/src/github.com/aws/aws-sdk-go/service"],
+ "Exclude": ["/src/cmd", "/src/github.com/aws/aws-sdk-go/awstesting", "/src/github.com/aws/aws-sdk-go/awsmigrate"],
+ "IgnoredSuffixes": ["iface"]
+ },
+ "Github": {
+ "Tag": "master",
+ "Repo": "/aws/aws-sdk-go",
+ "UseGithub": true
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md
index 5e57ef2ece2..dab3dc13bc5 100644
--- a/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md
@@ -1,3 +1,1110 @@
+Release v1.12.65 (2018-01-18)
+===
+
+### Service Client Updates
+* `service/sagemaker`: Updates service API and documentation
+ * CreateTrainingJob and CreateEndpointConfig now supports KMS Key for volume encryption.
+
+Release v1.12.64 (2018-01-17)
+===
+
+### Service Client Updates
+* `service/autoscaling-plans`: Updates service documentation
+* `service/ec2`: Updates service documentation
+ * Documentation updates for EC2
+
+Release v1.12.63 (2018-01-17)
+===
+
+### Service Client Updates
+* `service/application-autoscaling`: Updates service API and documentation
+* `service/autoscaling-plans`: Adds new service
+* `service/rds`: Updates service API and documentation
+ * With this release you can now integrate RDS DB instances with CloudWatch Logs. We have added parameters to the operations for creating and modifying DB instances (for example CreateDBInstance) to allow you to take advantage of this capability through the CLI and API. Once you enable this feature, a stream of log events will publish to CloudWatch Logs for each log type you enable.
+
+Release v1.12.62 (2018-01-15)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/lambda`: Updates service API and documentation
+ * Support for creating Lambda Functions using 'dotnetcore2.0' and 'go1.x'.
+
+Release v1.12.61 (2018-01-12)
+===
+
+### Service Client Updates
+* `service/glue`: Updates service API and documentation
+ * Support is added to generate ETL scripts in Scala which can now be run by AWS Glue ETL jobs. In addition, the trigger API now supports firing when any conditions are met (in addition to all conditions). Also, jobs can be triggered based on a "failed" or "stopped" job run (in addition to a "succeeded" job run).
+
+Release v1.12.60 (2018-01-11)
+===
+
+### Service Client Updates
+* `service/elasticloadbalancing`: Updates service API and documentation
+* `service/elasticloadbalancingv2`: Updates service API and documentation
+* `service/rds`: Updates service API and documentation
+ * Read Replicas for Amazon RDS for MySQL, MariaDB, and PostgreSQL now support Multi-AZ deployments.Amazon RDS Read Replicas enable you to create one or more read-only copies of your database instance within the same AWS Region or in a different AWS Region. Updates made to the source database are asynchronously copied to the Read Replicas. In addition to providing scalability for read-heavy workloads, you can choose to promote a Read Replica to become standalone a DB instance when needed.Amazon RDS Multi-AZ Deployments provide enhanced availability for database instances within a single AWS Region. With Multi-AZ, your data is synchronously replicated to a standby in a different Availability Zone (AZ). In case of an infrastructure failure, Amazon RDS performs an automatic failover to the standby, minimizing disruption to your applications.You can now combine Read Replicas with Multi-AZ as part of a disaster recovery strategy for your production databases. A well-designed and tested plan is critical for maintaining business continuity after a disaster. Since Read Replicas can also be created in different regions than the source database, your Read Replica can be promoted to become the new production database in case of a regional disruption.You can also combine Read Replicas with Multi-AZ for your database engine upgrade process. You can create a Read Replica of your production database instance and upgrade it to a new database engine version. When the upgrade is complete, you can stop applications, promote the Read Replica to a standalone database instance and switch over your applications. Since the database instance is already a Multi-AZ deployment, no additional steps are needed.For more information, see the Amazon RDS User Guide.
+* `service/ssm`: Updates service documentation
+ * Updates documentation for the HierarchyLevelLimitExceededException error.
+
+Release v1.12.59 (2018-01-09)
+===
+
+### Service Client Updates
+* `service/kms`: Updates service documentation
+ * Documentation updates for AWS KMS
+
+Release v1.12.58 (2018-01-09)
+===
+
+### Service Client Updates
+* `service/ds`: Updates service API and documentation
+ * On October 24 we introduced AWS Directory Service for Microsoft Active Directory (Standard Edition), also known as AWS Microsoft AD (Standard Edition), which is a managed Microsoft Active Directory (AD) that is optimized for small and midsize businesses (SMBs). With this SDK release, you can now create an AWS Microsoft AD directory using API. This enables you to run typical SMB workloads using a cost-effective, highly available, and managed Microsoft AD in the AWS Cloud.
+
+Release v1.12.57 (2018-01-08)
+===
+
+### Service Client Updates
+* `service/codedeploy`: Updates service API and documentation
+ * The AWS CodeDeploy API was updated to support DeleteGitHubAccountToken, a new method that deletes a GitHub account connection.
+* `service/discovery`: Updates service API and documentation
+ * Documentation updates for AWS Application Discovery Service.
+* `service/route53`: Updates service API and documentation
+ * This release adds an exception to the CreateTrafficPolicyVersion API operation.
+
+Release v1.12.56 (2018-01-05)
+===
+
+### Service Client Updates
+* `service/inspector`: Updates service API, documentation, and examples
+ * Added 2 new attributes to the DescribeAssessmentTemplate response, indicating the total number of assessment runs and last assessment run ARN (if present.)
+* `service/snowball`: Updates service documentation
+ * Documentation updates for snowball
+* `service/ssm`: Updates service documentation
+ * Documentation updates for ssm
+
+Release v1.12.55 (2018-01-02)
+===
+
+### Service Client Updates
+* `service/rds`: Updates service documentation
+ * Documentation updates for rds
+
+Release v1.12.54 (2017-12-29)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/workspaces`: Updates service API and documentation
+ * Modify WorkSpaces have been updated with flexible storage and switching of hardware bundles feature. The following configurations have been added to ModifyWorkSpacesProperties: storage and compute. This update provides the capability to configure the storage of a WorkSpace. It also adds the capability of switching hardware bundle of a WorkSpace by specifying an eligible compute (Value, Standard, Performance, Power).
+
+Release v1.12.53 (2017-12-22)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API
+ * This release fixes an issue with tags not showing in DescribeAddresses responses.
+* `service/ecs`: Updates service API and documentation
+ * Amazon ECS users can now set a health check initialization wait period of their ECS services, the services that are associated with an Elastic Load Balancer (ELB) will wait for a period of time before the ELB become healthy. You can now configure this in Create and Update Service.
+* `service/inspector`: Updates service API and documentation
+ * PreviewAgents API now returns additional fields within the AgentPreview data type. The API now shows the agent health and availability status for all instances included in the assessment target. This allows users to check the health status of Inspector Agents before running an assessment. In addition, it shows the instance ID, hostname, and IP address of the targeted instances.
+* `service/sagemaker`: Updates service API and documentation
+ * SageMaker Models no longer support SupplementalContainers. API's that have been affected are CreateModel and DescribeModel.
+
+Release v1.12.52 (2017-12-21)
+===
+
+### Service Client Updates
+* `service/codebuild`: Updates service API and documentation
+ * Adding support allowing AWS CodeBuild customers to select specific curated image versions.
+* `service/ec2`: Updates service API and documentation
+ * Elastic IP tagging enables you to add key and value metadata to your Elastic IPs so that you can search, filter, and organize them according to your organization's needs.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/kinesisanalytics`: Updates service API and documentation
+ * Kinesis Analytics now supports AWS Lambda functions as output.
+
+Release v1.12.51 (2017-12-21)
+===
+
+### Service Client Updates
+* `service/config`: Updates service API
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/iot`: Updates service API and documentation
+ * This release adds support for code signed Over-the-air update functionality for Amazon FreeRTOS. Users can now create and schedule Over-the-air updates to their Amazon FreeRTOS devices using these new APIs.
+
+Release v1.12.50 (2017-12-19)
+===
+
+### Service Client Updates
+* `service/apigateway`: Updates service API and documentation
+ * API Gateway now adds support for calling API with compressed payloads using one of the supported content codings, tagging an API stage for cost allocation, and returning API keys from a custom authorizer for use with a usage plan.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/mediastore-data`: Updates service documentation
+* `service/route53`: Updates service API and documentation
+ * Route 53 added support for a new China (Ningxia) region, cn-northwest-1. You can now specify cn-northwest-1 as the region for latency-based or geoproximity routing. Route 53 also added support for a new EU (Paris) region, eu-west-3. You can now associate VPCs in eu-west-3 with private hosted zones and create alias records that route traffic to resources in eu-west-3.
+
+Release v1.12.49 (2017-12-19)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/monitoring`: Updates service documentation
+ * Documentation updates for monitoring
+
+Release v1.12.48 (2017-12-15)
+===
+
+### Service Client Updates
+* `service/appstream`: Updates service API and documentation
+ * This API update is to enable customers to add tags to their Amazon AppStream 2.0 resources
+
+Release v1.12.47 (2017-12-14)
+===
+
+### Service Client Updates
+* `service/apigateway`: Updates service API and documentation
+ * Adds support for Cognito Authorizer scopes at the API method level.
+* `service/email`: Updates service documentation
+ * Added information about the maximum number of transactions per second for the SendCustomVerificationEmail operation.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.12.46 (2017-12-12)
+===
+
+### Service Client Updates
+* `service/workmail`: Adds new service
+ * Today, Amazon WorkMail released an administrative SDK and enabled AWS CloudTrail integration. With the administrative SDK, you can natively integrate WorkMail with your existing services. The SDK enables programmatic user, resource, and group management through API calls. This means your existing IT tools and workflows can now automate WorkMail management, and third party applications can streamline WorkMail migrations and account actions.
+
+Release v1.12.45 (2017-12-11)
+===
+
+### Service Client Updates
+* `service/cognito-idp`: Updates service API and documentation
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/lex-models`: Updates service API and documentation
+* `service/sagemaker`: Updates service API
+ * CreateModel API Update: The request parameter 'ExecutionRoleArn' has changed from optional to required.
+
+Release v1.12.44 (2017-12-08)
+===
+
+### Service Client Updates
+* `service/appstream`: Updates service API and documentation
+ * This API update is to support the feature that allows customers to automatically consume the latest Amazon AppStream 2.0 agent as and when published by AWS.
+* `service/ecs`: Updates service documentation
+ * Documentation updates for Windows containers.
+* `service/monitoring`: Updates service API and documentation
+ * With this launch, you can now create a CloudWatch alarm that alerts you when M out of N datapoints of a metric are breaching your predefined threshold, such as three out of five times in any given five minutes interval or two out of six times in a thirty minutes interval. When M out of N datapoints are not breaching your threshold in an interval, the alarm will be in OK state. Please note that the M datapoints out of N datapoints in an interval can be of any order and does not need to be consecutive. Consequently, you can now get alerted even when the spikes in your metrics are intermittent over an interval.
+
+Release v1.12.43 (2017-12-07)
+===
+
+### Service Client Updates
+* `service/email`: Updates service API, documentation, and paginators
+ * Customers can customize the emails that Amazon SES sends when verifying new identities. This feature is helpful for developers whose applications send email through Amazon SES on behalf of their customers.
+* `service/es`: Updates service API and documentation
+ * Added support for encryption of data at rest on Amazon Elasticsearch Service using AWS KMS
+
+### SDK Bugs
+* `models/apis` Fixes removes colliding sagemaker models folders ([#1686](https://github.com/aws/aws-sdk-go/pull/1686))
+ * Fixes Release v1.12.42's SageMaker vs sagemaker model folders.
+Release v1.12.42 (2017-12-06)
+===
+
+### Service Client Updates
+* `service/clouddirectory`: Updates service API and documentation
+ * Amazon Cloud Directory makes it easier for you to apply schema changes across your directories with in-place schema upgrades. Your directories now remain available while backward-compatible schema changes are being applied, such as the addition of new fields. You also can view the history of your schema changes in Cloud Directory by using both major and minor version identifiers, which can help you track and audit schema versions across directories.
+* `service/elasticbeanstalk`: Updates service documentation
+ * Documentation updates for AWS Elastic Beanstalk.
+* `service/sagemaker`: Adds new service
+ * Initial waiters for common SageMaker workflows.
+
+Release v1.12.41 (2017-12-05)
+===
+
+### Service Client Updates
+* `service/iot`: Updates service API and documentation
+ * Add error action API for RulesEngine.
+* `service/servicecatalog`: Updates service API and documentation
+ * ServiceCatalog has two distinct personas for its use, an "admin" persona (who creates sets of products with different versions and prescribes who has access to them) and an "end-user" persona (who can launch cloud resources based on the configuration data their admins have given them access to). This API update will allow admin users to deactivate/activate product versions, end-user will only be able to access and launch active product versions.
+* `service/servicediscovery`: Adds new service
+ * Amazon Route 53 Auto Naming lets you configure public or private namespaces that your microservice applications run in. When instances of the service become available, you can call the Auto Naming API to register the instance, and Amazon Route 53 automatically creates up to five DNS records and an optional health check. Clients that submit DNS queries for the service receive an answer that contains up to eight healthy records.
+
+Release v1.12.40 (2017-12-04)
+===
+
+### Service Client Updates
+* `service/budgets`: Updates service API and documentation
+ * Add additional costTypes to support finer control for different charges included in a cost budget.
+* `service/ecs`: Updates service documentation
+ * Documentation updates for ecs
+
+Release v1.12.39 (2017-12-01)
+===
+
+### Service Client Updates
+* `service/SageMaker`: Updates service waiters
+
+Release v1.12.38 (2017-11-30)
+===
+
+### Service Client Updates
+* `service/AWSMoneypenny`: Adds new service
+* `service/Cloud9`: Adds new service
+* `service/Serverless Registry`: Adds new service
+* `service/apigateway`: Updates service API, documentation, and paginators
+ * Added support Private Integration and VPC Link features in API Gateway. This allows to create an API with the API Gateway private integration, thus providing clients access to HTTP/HTTPS resources in an Amazon VPC from outside of the VPC through a VpcLink resource.
+* `service/ec2`: Updates service API and documentation
+ * Adds the following updates: 1. Spread Placement ensures that instances are placed on distinct hardware in order to reduce correlated failures. 2. Inter-region VPC Peering allows customers to peer VPCs across different AWS regions without requiring additional gateways, VPN connections or physical hardware
+* `service/lambda`: Updates service API and documentation
+ * AWS Lambda now supports the ability to set the concurrency limits for individual functions, and increasing memory to 3008 MB.
+
+Release v1.12.37 (2017-11-30)
+===
+
+### Service Client Updates
+* `service/Ardi`: Adds new service
+* `service/autoscaling`: Updates service API and documentation
+ * You can now use Auto Scaling with EC2 Launch Templates via the CreateAutoScalingGroup and UpdateAutoScalingGroup APIs.
+* `service/ec2`: Updates service API and documentation
+ * Adds the following updates: 1. T2 Unlimited enables high CPU performance for any period of time whenever required 2. You are now able to create and launch EC2 m5 and h1 instances
+* `service/lightsail`: Updates service API and documentation
+ * This release adds support for load balancer and TLS/SSL certificate management. This set of APIs allows customers to create, manage, and scale secure load balanced applications on Lightsail infrastructure. To provide support for customers who manage their DNS on Lightsail, we've added the ability create an Alias A type record which can point to a load balancer DNS name via the CreateDomainEntry API http://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_CreateDomainEntry.html.
+* `service/ssm`: Updates service API and documentation
+ * This release updates AWS Systems Manager APIs to enable executing automations at controlled rate, target resources in a resource groups and execute entire automation at once or single step at a time. It is now also possible to use YAML, in addition to JSON, when creating Systems Manager documents.
+* `service/waf`: Updates service API and documentation
+ * This release adds support for rule group and managed rule group. Rule group is a container of rules that customers can create, put rules in it and associate the rule group to a WebACL. All rules in a rule group will function identically as they would if each rule was individually associated to the WebACL. Managed rule group is a pre-configured rule group composed by our security partners and made available via the AWS Marketplace. Customers can subscribe to these managed rule groups, associate the managed rule group to their WebACL and start using them immediately to protect their resources.
+* `service/waf-regional`: Updates service API and documentation
+
+Release v1.12.36 (2017-11-29)
+===
+
+### Service Client Updates
+* `service/DeepInsight`: Adds new service
+* `service/IronmanRuntime`: Adds new service
+* `service/Orchestra - Laser`: Adds new service
+* `service/SageMaker`: Adds new service
+* `service/Shine`: Adds new service
+* `service/archived.kinesisvideo`: Adds new service
+* `service/data.kinesisvideo`: Adds new service
+* `service/dynamodb`: Updates service API and documentation
+ * Amazon DynamoDB now supports the following features: Global Table and On-Demand Backup. Global Table is a fully-managed, multi-region, multi-master database. DynamoDB customers can now write anywhere and read anywhere with single-digit millisecond latency by performing database operations closest to where end users reside. Global Table also enables customers to disaster-proof their applications, keeping them running and data accessible even in the face of natural disasters or region disruptions. Customers can set up Global Table with just a few clicks in the AWS Management Console-no application rewrites required. On-Demand Backup capability is to protect data from loss due to application errors, and meet customers' archival needs for compliance and regulatory reasons. Customers can backup and restore their DynamoDB table data anytime, with a single-click in the AWS management console or a single API call. Backup and restore actions execute with zero impact on table performance or availability. For more information, see the Amazon DynamoDB Developer Guide.
+* `service/ecs`: Updates service API and documentation
+ * Amazon Elastic Container Service (Amazon ECS) released a new launch type for running containers on a serverless infrastructure. The Fargate launch type allows you to run your containerized applications without the need to provision and manage the backend infrastructure. Just register your task definition and Fargate launches the container for you.
+* `service/glacier`: Updates service API and documentation
+ * This release includes support for Glacier Select, a new feature that allows you to filter and analyze your Glacier archives and store the results in a user-specified S3 location.
+* `service/greengrass`: Updates service API and documentation
+ * Greengrass OTA feature allows updating Greengrass Core and Greengrass OTA Agent. Local Resource Access feature allows Greengrass Lambdas to access local resources such as peripheral devices and volumes.
+* `service/iot`: Updates service API and documentation
+ * This release adds support for a number of new IoT features, including AWS IoT Device Management (Jobs, Fleet Index and Thing Registration), Thing Groups, Policies on Thing Groups, Registry & Job Events, JSON Logs, Fine-Grained Logging Controls, Custom Authorization and AWS Service Authentication Using X.509 Certificates.
+* `service/kinesisvideo`: Adds new service
+ * Announcing Amazon Kinesis Video Streams, a fully managed video ingestion and storage service. Kinesis Video Streams makes it easy to securely stream video from connected devices to AWS for machine learning, analytics, and processing. You can also stream other time-encoded data like RADAR and LIDAR signals using Kinesis Video Streams.
+* `service/rekognition`: Updates service API, documentation, and paginators
+ * This release introduces Amazon Rekognition support for video analysis.
+* `service/s3`: Updates service API and documentation
+ * This release includes support for Glacier Select, a new feature that allows you to filter and analyze your Glacier storage class objects and store the results in a user-specified S3 location.
+
+Release v1.12.35 (2017-11-29)
+===
+
+### Service Client Updates
+* `service/AmazonMQ`: Adds new service
+* `service/GuardDuty`: Adds new service
+* `service/apigateway`: Updates service API and documentation
+ * Changes related to CanaryReleaseDeployment feature. Enables API developer to create a deployment as canary deployment and test API changes with percentage of customers before promoting changes to all customers.
+* `service/batch`: Updates service API and documentation
+ * Add support for Array Jobs which allow users to easily submit many copies of a job with a single API call. This change also enhances the job dependency model to support N_TO_N and sequential dependency chains. The ListJobs and DescribeJobs APIs now have the ability to list or describe the status of entire Array Jobs or individual elements within the array.
+* `service/cognito-idp`: Updates service API and documentation
+* `service/deepdish`: Adds new service
+ * AWS AppSync is an enterprise-level, fully managed GraphQL service with real-time data synchronization and offline programming features.
+* `service/ec2`: Updates service API and documentation
+ * Adds the following updates: 1. You are now able to host a service powered by AWS PrivateLink to provide private connectivity to other VPCs. You are now also able to create endpoints to other services powered by PrivateLink including AWS services, Marketplace Seller services or custom services created by yourself or other AWS VPC customers. 2. You are now able to save launch parameters in a single template that can be used with Auto Scaling, Spot Fleet, Spot, and On Demand instances. 3. You are now able to launch Spot instances via the RunInstances API, using a single additional parameter. RunInstances will response synchronously with an instance ID should capacity be available for your Spot request. 4. A simplified Spot pricing model which delivers low, predictable prices that adjust gradually, based on long-term trends in supply and demand. 5. Amazon EC2 Spot can now hibernate Amazon EBS-backed instances in the event of an interruption, so your workloads pick up from where they left off. Spot can fulfill your request by resuming instances from a hibernated state when capacity is available.
+* `service/lambda`: Updates service API and documentation
+ * Lambda aliases can now shift traffic between two function versions, based on preassigned weights.
+
+Release v1.12.34 (2017-11-27)
+===
+
+### Service Client Updates
+* `service/data.mediastore`: Adds new service
+* `service/mediaconvert`: Adds new service
+ * AWS Elemental MediaConvert is a file-based video conversion service that transforms media into formats required for traditional broadcast and for internet streaming to multi-screen devices.
+* `service/medialive`: Adds new service
+ * AWS Elemental MediaLive is a video service that lets you easily create live outputs for broadcast and streaming delivery.
+* `service/mediapackage`: Adds new service
+ * AWS Elemental MediaPackage is a just-in-time video packaging and origination service that lets you format highly secure and reliable live outputs for a variety of devices.
+* `service/mediastore`: Adds new service
+ * AWS Elemental MediaStore is an AWS storage service optimized for media. It gives you the performance, consistency, and low latency required to deliver live and on-demand video content. AWS Elemental MediaStore acts as the origin store in your video workflow.
+
+Release v1.12.33 (2017-11-22)
+===
+
+### Service Client Updates
+* `service/acm`: Updates service API and documentation
+ * AWS Certificate Manager now supports the ability to import domainless certs and additional Key Types as well as an additional validation method for DNS.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.12.32 (2017-11-22)
+===
+
+### Service Client Updates
+* `service/apigateway`: Updates service API and documentation
+ * Add support for Access logs and customizable integration timeouts
+* `service/cloudformation`: Updates service API and documentation
+ * 1) Instance-level parameter overrides (CloudFormation-StackSet feature): This feature will allow the customers to override the template parameters on specific stackInstances. Customers will also have ability to update their existing instances with/without parameter-overrides using a new API "UpdateStackInstances" 2) Add support for SSM parameters in CloudFormation - This feature will allow the customers to use Systems Manager parameters in CloudFormation templates. They will be able to see values for these parameters in Describe APIs.
+* `service/codebuild`: Updates service API and documentation
+ * Adding support for accessing Amazon VPC resources from AWS CodeBuild, dependency caching and build badges.
+* `service/elasticmapreduce`: Updates service API and documentation
+ * Enable Kerberos on Amazon EMR.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/rekognition`: Updates service API and documentation
+ * This release includes updates to Amazon Rekognition for the following APIs. The new DetectText API allows you to recognize and extract textual content from images. Face Model Versioning has been added to operations that deal with face detection.
+* `service/shield`: Updates service API, documentation, and paginators
+ * The AWS Shield SDK has been updated in order to support Elastic IP address protections, the addition of AttackProperties objects in DescribeAttack responses, and a new GetSubscriptionState operation.
+* `service/storagegateway`: Updates service API and documentation
+ * AWS Storage Gateway now enables you to get notification when all your files written to your NFS file share have been uploaded to Amazon S3. Storage Gateway also enables guessing of the MIME type for uploaded objects based on file extensions.
+* `service/xray`: Updates service API, documentation, and paginators
+ * Added automatic pagination support for AWS X-Ray APIs in the SDKs that support this feature.
+
+Release v1.12.31 (2017-11-20)
+===
+
+### Service Client Updates
+* `service/apigateway`: Updates service documentation
+ * Documentation updates for Apigateway
+* `service/codecommit`: Updates service API, documentation, and paginators
+ * AWS CodeCommit now supports pull requests. You can use pull requests to collaboratively review code changes for minor changes or fixes, major feature additions, or new versions of your released software.
+* `service/firehose`: Updates service API and documentation
+ * This release includes a new Kinesis Firehose feature that supports Splunk as Kinesis Firehose delivery destination. You can now use Kinesis Firehose to ingest real-time data to Splunk in a serverless, reliable, and salable manner. This release also includes a new feature that allows you to configure Lambda buffer size in Kinesis Firehose data transformation feature. You can now customize the data buffer size before invoking Lambda function in Kinesis Firehose for data transformation. This feature allows you to flexibly trade-off processing and delivery latency with cost and efficiency based on your specific use cases and requirements.
+* `service/iis`: Adds new service
+ * The AWS Cost Explorer API gives customers programmatic access to AWS cost and usage information, allowing them to perform adhoc queries and build interactive cost management applications that leverage this dataset.
+* `service/kinesis`: Updates service API and documentation
+ * Customers can now obtain the important characteristics of their stream with DescribeStreamSummary. The response will not include the shard list for the stream but will have the number of open shards, and all the other fields included in the DescribeStream response.
+* `service/workdocs`: Updates service API and documentation
+ * DescribeGroups API and miscellaneous enhancements
+
+### SDK Bugs
+* `aws/client`: Retry delays for throttled exception were not limited to 5 mintues [#1654](https://github.com/aws/aws-sdk-go/pull/1654)
+ * Fixes [#1653](https://github.com/aws/aws-sdk-go/issues/1653)
+Release v1.12.30 (2017-11-17)
+===
+
+### Service Client Updates
+* `service/application-autoscaling`: Updates service API and documentation
+* `service/dms`: Updates service API, documentation, and paginators
+ * Support for migration task assessment. Support for data validation after the migration.
+* `service/elasticloadbalancingv2`: Updates service API and documentation
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/rds`: Updates service API and documentation
+ * Amazon RDS now supports importing MySQL databases by using backup files from Amazon S3.
+* `service/s3`: Updates service API
+ * Added ORC to the supported S3 Inventory formats.
+
+### SDK Bugs
+* `private/protocol/restjson`: Define JSONValue marshaling for body and querystring ([#1640](https://github.com/aws/aws-sdk-go/pull/1640))
+ * Adds support for APIs which use JSONValue for body and querystring targets.
+ * Fixes [#1636](https://github.com/aws/aws-sdk-go/issues/1636)
+Release v1.12.29 (2017-11-16)
+===
+
+### Service Client Updates
+* `service/application-autoscaling`: Updates service API and documentation
+* `service/ec2`: Updates service API
+ * You are now able to create and launch EC2 x1e smaller instance sizes
+* `service/glue`: Updates service API and documentation
+ * API update for AWS Glue. New crawler configuration attribute enables customers to specify crawler behavior. New XML classifier enables classification of XML data.
+* `service/opsworkscm`: Updates service API, documentation, and waiters
+ * Documentation updates for OpsWorks-cm: a new feature, OpsWorks for Puppet Enterprise, that allows users to create and manage OpsWorks-hosted Puppet Enterprise servers.
+* `service/organizations`: Updates service API, documentation, and paginators
+ * This release adds APIs that you can use to enable and disable integration with AWS services designed to work with AWS Organizations. This integration allows the AWS service to perform operations on your behalf on all of the accounts in your organization. Although you can use these APIs yourself, we recommend that you instead use the commands provided in the other AWS service to enable integration with AWS Organizations.
+* `service/route53`: Updates service API and documentation
+ * You can use Route 53's GetAccountLimit/GetHostedZoneLimit/GetReusableDelegationSetLimit APIs to view your current limits (including custom set limits) on Route 53 resources such as hosted zones and health checks. These APIs also return the number of each resource you're currently using to enable comparison against your current limits.
+
+Release v1.12.28 (2017-11-15)
+===
+
+### Service Client Updates
+* `service/apigateway`: Updates service API and documentation
+ * 1. Extended GetDocumentationParts operation to support retrieving documentation parts resources without contents. 2. Added hosted zone ID in the custom domain response.
+* `service/email`: Updates service API, documentation, and examples
+ * SES launches Configuration Set Reputation Metrics and Email Pausing Today, two features that build upon the capabilities of the reputation dashboard. The first is the ability to export reputation metrics for individual configuration sets. The second is the ability to temporarily pause email sending, either at the configuration set level, or across your entire Amazon SES account.
+* `service/polly`: Updates service API
+ * Amazon Polly adds Korean language support with new female voice - "Seoyeon" and new Indian English female voice - "Aditi"
+* `service/states`: Updates service API and documentation
+ * You can now use the UpdateStateMachine API to update your state machine definition and role ARN. Existing executions will continue to use the previous definition and role ARN. You can use the DescribeStateMachineForExecution API to determine which state machine definition and role ARN is associated with an execution
+
+Release v1.12.27 (2017-11-14)
+===
+
+### Service Client Updates
+* `service/ecs`: Updates service API and documentation
+ * Added new mode for Task Networking in ECS, called awsvpc mode. Mode configuration parameters to be passed in via awsvpcConfiguration. Updated APIs now use/show this new mode - RegisterTaskDefinition, CreateService, UpdateService, RunTask, StartTask.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/lightsail`: Updates service API and documentation
+ * Lightsail now supports attached block storage, which allows you to scale your applications and protect application data with additional SSD-backed storage disks. This feature allows Lightsail customers to attach secure storage disks to their Lightsail instances and manage their attached disks, including creating and deleting disks, attaching and detaching disks from instances, and backing up disks via snapshot.
+* `service/route53`: Updates service API and documentation
+ * When a Route 53 health check or hosted zone is created by a linked AWS service, the object now includes information about the service that created it. Hosted zones or health checks that are created by a linked service can't be updated or deleted using Route 53.
+* `service/ssm`: Updates service API and documentation
+ * EC2 Systems Manager GetInventory API adds support for aggregation.
+
+### SDK Enhancements
+* `aws/request`: Remove default port from HTTP host header ([#1618](https://github.com/aws/aws-sdk-go/pull/1618))
+ * Updates the SDK to automatically remove default ports based on the URL's scheme when setting the HTTP Host header's value.
+ * Fixes [#1537](https://github.com/aws/aws-sdk-go/issues/1537)
+
+Release v1.12.26 (2017-11-09)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API and documentation
+ * Introduces the following features: 1. Create a default subnet in an Availability Zone if no default subnet exists. 2. Spot Fleet integrates with Elastic Load Balancing to enable you to attach one or more load balancers to a Spot Fleet request. When you attach the load balancer, it automatically registers the instance in the Spot Fleet to the load balancers which distributes incoming traffic across the instances.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.12.25 (2017-11-08)
+===
+
+### Service Client Updates
+* `service/application-autoscaling`: Updates service API and documentation
+* `service/batch`: Updates service documentation
+ * Documentation updates for AWS Batch.
+* `service/ec2`: Updates service API and documentation
+ * AWS PrivateLink for Amazon Services - Customers can now privately access Amazon services from their Amazon Virtual Private Cloud (VPC), without using public IPs, and without requiring the traffic to traverse across the Internet.
+* `service/elasticache`: Updates service API and documentation
+ * This release adds online resharding for ElastiCache for Redis offering, providing the ability to add and remove shards from a running cluster. Developers can now dynamically scale-out or scale-in their Redis cluster workloads to adapt to changes in demand. ElastiCache will resize the cluster by adding or removing shards and redistribute hash slots uniformly across the new shard configuration, all while the cluster continues to stay online and serves requests.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.12.24 (2017-11-07)
+===
+
+### Service Client Updates
+* `service/elasticloadbalancingv2`: Updates service documentation
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/rds`: Updates service API and documentation
+ * DescribeOrderableDBInstanceOptions now returns the minimum and maximum allowed values for storage size, total provisioned IOPS, and provisioned IOPS per GiB for a DB instance.
+* `service/s3`: Updates service API, documentation, and examples
+ * This releases adds support for 4 features: 1. Default encryption for S3 Bucket, 2. Encryption status in inventory and Encryption support for inventory. 3. Cross region replication of KMS-encrypted objects, and 4. ownership overwrite for CRR.
+
+Release v1.12.23 (2017-11-07)
+===
+
+### Service Client Updates
+* `service/api.pricing`: Adds new service
+* `service/ec2`: Updates service API
+ * You are now able to create and launch EC2 C5 instances, the next generation of EC2's compute-optimized instances, in us-east-1, us-west-2 and eu-west-1. C5 instances offer up to 72 vCPUs, 144 GiB of DDR4 instance memory, 25 Gbps in Network bandwidth and improved EBS and Networking bandwidth on smaller instance sizes to deliver improved performance for compute-intensive workloads.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/kms`: Updates service API, documentation, and examples
+ * Documentation updates for AWS KMS.
+* `service/organizations`: Updates service documentation
+ * This release updates permission statements for several API operations, and corrects some other minor errors.
+* `service/states`: Updates service API, documentation, and paginators
+ * Documentation update.
+
+Release v1.12.22 (2017-11-03)
+===
+
+### Service Client Updates
+* `service/ecs`: Updates service API and documentation
+ * Amazon ECS users can now add devices to their containers and enable init process in containers through the use of docker's 'devices' and 'init' features. These fields can be specified under linuxParameters in ContainerDefinition in the Task Definition Template.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.12.21 (2017-11-02)
+===
+
+### Service Client Updates
+* `service/apigateway`: Updates service API and documentation
+ * This release supports creating and managing Regional and Edge-Optimized API endpoints.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+### SDK Bugs
+* `aws/request`: Fix bug in request presign creating invalide URL ([#1624](https://github.com/aws/aws-sdk-go/pull/1624))
+ * Fixes a bug the Request Presign and PresignRequest methods that would allow a invalid expire duration as input. A expire time of 0 would be interpreted by the SDK to generate a normal request signature, not a presigned URL. This caused the returned URL unusable.
+ * Fixes [#1617](https://github.com/aws/aws-sdk-go/issues/1617)
+Release v1.12.20 (2017-11-01)
+===
+
+### Service Client Updates
+* `service/acm`: Updates service documentation
+ * Documentation updates for ACM
+* `service/cloudhsmv2`: Updates service documentation
+ * Minor documentation update for AWS CloudHSM (cloudhsmv2).
+* `service/directconnect`: Updates service API and documentation
+ * AWS DirectConnect now provides support for Global Access for Virtual Private Cloud (VPC) via a new feature called Direct Connect Gateway. A Direct Connect Gateway will allow you to group multiple Direct Connect Private Virtual Interfaces (DX-VIF) and Private Virtual Gateways (VGW) from different AWS regions (but belonging to the same AWS Account) and pass traffic from any DX-VIF to any VPC in the grouping.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+### SDK Enhancements
+* `aws/client`: Adding status code 429 to throttlable status codes in default retryer (#1621)
+
+Release v1.12.19 (2017-10-26)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.12.18 (2017-10-26)
+===
+
+### Service Client Updates
+* `service/cloudfront`: Updates service API and documentation
+ * You can now specify additional options for MinimumProtocolVersion, which controls the SSL/TLS protocol that CloudFront uses to communicate with viewers. The minimum protocol version that you choose also determines the ciphers that CloudFront uses to encrypt the content that it returns to viewers.
+* `service/ec2`: Updates service API
+ * You are now able to create and launch EC2 P3 instance, next generation GPU instances, optimized for machine learning and high performance computing applications. With up to eight NVIDIA Tesla V100 GPUs, P3 instances provide up to one petaflop of mixed-precision, 125 teraflops of single-precision, and 62 teraflops of double-precision floating point performance, as well as a 300 GB/s second-generation NVLink interconnect that enables high-speed, low-latency GPU-to-GPU communication. P3 instances also feature up to 64 vCPUs based on custom Intel Xeon E5 (Broadwell) processors, 488 GB of DRAM, and 25 Gbps of dedicated aggregate network bandwidth using the Elastic Network Adapter (ENA).
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.12.17 (2017-10-24)
+===
+
+### Service Client Updates
+* `service/config`: Updates service API
+* `service/elasticache`: Updates service API, documentation, and examples
+ * Amazon ElastiCache for Redis today announced support for data encryption both for data in-transit and data at-rest. The new encryption in-transit functionality enables ElastiCache for Redis customers to encrypt data for all communication between clients and Redis engine, and all intra-cluster Redis communication. The encryption at-rest functionality allows customers to encrypt their S3 based backups. Customers can begin using the new functionality by simply enabling this functionality via AWS console, and a small configuration change in their Redis clients. The ElastiCache for Redis service automatically manages life cycle of the certificates required for encryption, including the issuance, renewal and expiration of certificates. Additionally, as part of this launch, customers will gain the ability to start using the Redis AUTH command that provides an added level of authentication.
+* `service/glue`: Adds new service
+ * AWS Glue: Adding a new API, BatchStopJobRun, to stop one or more job runs for a specified Job.
+* `service/pinpoint`: Updates service API and documentation
+ * Added support for APNs VoIP messages. Added support for collapsible IDs, message priority, and TTL for APNs and FCM/GCM.
+
+Release v1.12.16 (2017-10-23)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/organizations`: Updates service API and documentation
+ * This release supports integrating other AWS services with AWS Organizations through the use of an IAM service-linked role called AWSServiceRoleForOrganizations. Certain operations automatically create that role if it does not already exist.
+
+Release v1.12.15 (2017-10-20)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API and documentation
+ * Adding pagination support for DescribeSecurityGroups for EC2 Classic and VPC Security Groups
+
+Release v1.12.14 (2017-10-19)
+===
+
+### Service Client Updates
+* `service/sqs`: Updates service API and documentation
+ * Added support for tracking cost allocation by adding, updating, removing, and listing the metadata tags of Amazon SQS queues.
+* `service/ssm`: Updates service API and documentation
+ * EC2 Systems Manager versioning support for Parameter Store. Also support for referencing parameter versions in SSM Documents.
+
+Release v1.12.13 (2017-10-18)
+===
+
+### Service Client Updates
+* `service/lightsail`: Updates service API and documentation
+ * This release adds support for Windows Server-based Lightsail instances. The GetInstanceAccessDetails API now returns the password of your Windows Server-based instance when using the default key pair. GetInstanceAccessDetails also returns a PasswordData object for Windows Server instances containing the ciphertext and keyPairName. The Blueprint data type now includes a list of platform values (LINUX_UNIX or WINDOWS). The Bundle data type now includes a list of SupportedPlatforms values (LINUX_UNIX or WINDOWS).
+
+Release v1.12.12 (2017-10-17)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/es`: Updates service API and documentation
+ * This release adds support for VPC access to Amazon Elasticsearch Service.
+ * This release adds support for VPC access to Amazon Elasticsearch Service.
+
+Release v1.12.11 (2017-10-16)
+===
+
+### Service Client Updates
+* `service/cloudhsm`: Updates service API and documentation
+ * Documentation updates for AWS CloudHSM Classic.
+* `service/ec2`: Updates service API and documentation
+ * You can now change the tenancy of your VPC from dedicated to default with a single API operation. For more details refer to the documentation for changing VPC tenancy.
+* `service/es`: Updates service API and documentation
+ * AWS Elasticsearch adds support for enabling slow log publishing. Using slow log publishing options customers can configure and enable index/query slow log publishing of their domain to preferred AWS Cloudwatch log group.
+* `service/rds`: Updates service API and waiters
+ * Adds waiters for DBSnapshotAvailable and DBSnapshotDeleted.
+* `service/waf`: Updates service API and documentation
+ * This release adds support for regular expressions as match conditions in rules, and support for geographical location by country of request IP address as a match condition in rules.
+* `service/waf-regional`: Updates service API and documentation
+
+Release v1.12.10 (2017-10-12)
+===
+
+### Service Client Updates
+* `service/codecommit`: Updates service API and documentation
+ * This release includes the DeleteBranch API and a change to the contents of a Commit object.
+* `service/dms`: Updates service API and documentation
+ * This change includes addition of new optional parameter to an existing API
+* `service/elasticbeanstalk`: Updates service API and documentation
+ * Added the ability to add, delete or update Tags
+* `service/polly`: Updates service API
+ * Amazon Polly exposes two new voices: "Matthew" (US English) and "Takumi" (Japanese)
+* `service/rds`: Updates service API and documentation
+ * You can now call DescribeValidDBInstanceModifications to learn what modifications you can make to your DB instance. You can use this information when you call ModifyDBInstance.
+
+Release v1.12.9 (2017-10-11)
+===
+
+### Service Client Updates
+* `service/ecr`: Updates service API, documentation, and paginators
+ * Adds support for new API set used to manage Amazon ECR repository lifecycle policies. Amazon ECR lifecycle policies enable you to specify the lifecycle management of images in a repository. The configuration is a set of one or more rules, where each rule defines an action for Amazon ECR to apply to an image. This allows the automation of cleaning up unused images, for example expiring images based on age or status. A lifecycle policy preview API is provided as well, which allows you to see the impact of a lifecycle policy on an image repository before you execute it
+* `service/email`: Updates service API and documentation
+ * Added content related to email template management and templated email sending operations.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.12.8 (2017-10-10)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API and documentation
+ * This release includes updates to AWS Virtual Private Gateway.
+* `service/elasticloadbalancingv2`: Updates service API and documentation
+* `service/opsworkscm`: Updates service API and documentation
+ * Provide engine specific information for node associations.
+
+Release v1.12.7 (2017-10-06)
+===
+
+### Service Client Updates
+* `service/sqs`: Updates service documentation
+ * Documentation updates regarding availability of FIFO queues and miscellaneous corrections.
+
+Release v1.12.6 (2017-10-05)
+===
+
+### Service Client Updates
+* `service/redshift`: Updates service API and documentation
+ * DescribeEventSubscriptions API supports tag keys and tag values as request parameters.
+
+Release v1.12.5 (2017-10-04)
+===
+
+### Service Client Updates
+* `service/kinesisanalytics`: Updates service API and documentation
+ * Kinesis Analytics now supports schema discovery on objects in S3. Additionally, Kinesis Analytics now supports input data preprocessing through Lambda.
+* `service/route53domains`: Updates service API and documentation
+ * Added a new API that checks whether a domain name can be transferred to Amazon Route 53.
+
+### SDK Bugs
+* `service/s3/s3crypto`: Correct PutObjectRequest documentation ([#1568](https://github.com/aws/aws-sdk-go/pull/1568))
+ * s3Crypto's PutObjectRequest docstring example was using an incorrect value. Corrected the type used in the example.
+Release v1.12.4 (2017-10-03)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API, documentation, and waiters
+ * This release includes service updates to AWS VPN.
+* `service/ssm`: Updates service API and documentation
+ * EC2 Systems Manager support for tagging SSM Documents. Also support for tag-based permissions to restrict access to SSM Documents based on these tags.
+
+Release v1.12.3 (2017-10-02)
+===
+
+### Service Client Updates
+* `service/cloudhsm`: Updates service documentation and paginators
+ * Documentation updates for CloudHSM
+
+Release v1.12.2 (2017-09-29)
+===
+
+### Service Client Updates
+* `service/appstream`: Updates service API and documentation
+ * Includes APIs for managing and accessing image builders, and deleting images.
+* `service/codebuild`: Updates service API and documentation
+ * Adding support for Building GitHub Pull Requests in AWS CodeBuild
+* `service/mturk-requester`: Updates service API and documentation
+* `service/organizations`: Updates service API and documentation
+ * This release flags the HandshakeParty structure's Type and Id fields as 'required'. They effectively were required in the past, as you received an error if you did not include them. This is now reflected at the API definition level.
+* `service/route53`: Updates service API and documentation
+ * This change allows customers to reset elements of health check.
+
+### SDK Bugs
+* `private/protocol/query`: Fix query protocol handling of nested byte slices ([#1557](https://github.com/aws/aws-sdk-go/issues/1557))
+ * Fixes the query protocol to correctly marshal nested []byte values of API operations.
+* `service/s3`: Fix PutObject and UploadPart API to include ContentMD5 field ([#1559](https://github.com/aws/aws-sdk-go/pull/1559))
+ * Fixes the SDK's S3 PutObject and UploadPart API code generation to correctly render the ContentMD5 field into the associated input types for these two API operations.
+ * Fixes [#1553](https://github.com/aws/aws-sdk-go/pull/1553)
+Release v1.12.1 (2017-09-27)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/pinpoint`: Updates service API and documentation
+ * Added two new push notification channels: Amazon Device Messaging (ADM) and, for push notification support in China, Baidu Cloud Push. Added support for APNs auth via .p8 key file. Added operation for direct message deliveries to user IDs, enabling you to message an individual user on multiple endpoints.
+
+Release v1.12.0 (2017-09-26)
+===
+
+### SDK Bugs
+* `API Marshaler`: Revert REST JSON and XML protocol marshaler improvements
+ * Bug [#1550](https://github.com/aws/aws-sdk-go/issues/1550) identified a missed condition in the Amazon Route 53 RESTXML protocol marshaling causing requests to that service to fail. Reverting the marshaler improvements until the bug can be fixed.
+
+Release v1.11.0 (2017-09-26)
+===
+
+### Service Client Updates
+* `service/cloudformation`: Updates service API and documentation
+ * You can now prevent a stack from being accidentally deleted by enabling termination protection on the stack. If you attempt to delete a stack with termination protection enabled, the deletion fails and the stack, including its status, remains unchanged. You can enable termination protection on a stack when you create it. Termination protection on stacks is disabled by default. After creation, you can set termination protection on a stack whose status is CREATE_COMPLETE, UPDATE_COMPLETE, or UPDATE_ROLLBACK_COMPLETE.
+
+### SDK Features
+* Add dep Go dependency management metadata files (#1544)
+ * Adds the Go `dep` dependency management metadata files to the SDK.
+ * Fixes [#1451](https://github.com/aws/aws-sdk-go/issues/1451)
+ * Fixes [#634](https://github.com/aws/aws-sdk-go/issues/634)
+* `service/dynamodb/expression`: Add expression building utility for DynamoDB ([#1527](https://github.com/aws/aws-sdk-go/pull/1527))
+ * Adds a new package, expression, to the SDK providing builder utilities to create DynamoDB expressions safely taking advantage of type safety.
+* `API Marshaler`: Add generated marshalers for RESTXML protocol ([#1409](https://github.com/aws/aws-sdk-go/pull/1409))
+ * Updates the RESTXML protocol marshaler to use generated code instead of reflection for REST XML based services.
+* `API Marshaler`: Add generated marshalers for RESTJSON protocol ([#1547](https://github.com/aws/aws-sdk-go/pull/1547))
+ * Updates the RESTJSON protocol marshaler to use generated code instead of reflection for REST JSON based services.
+
+### SDK Enhancements
+* `private/protocol`: Update format of REST JSON and XMl benchmarks ([#1546](https://github.com/aws/aws-sdk-go/pull/1546))
+ * Updates the format of the REST JSON and XML benchmarks to be readable. RESTJSON benchmarks were updated to more accurately bench building of the protocol.
+
+Release v1.10.51 (2017-09-22)
+===
+
+### Service Client Updates
+* `service/config`: Updates service API and documentation
+* `service/ecs`: Updates service API and documentation
+ * Amazon ECS users can now add and drop Linux capabilities to their containers through the use of docker's cap-add and cap-drop features. Customers can specify the capabilities they wish to add or drop for each container in their task definition.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/rds`: Updates service documentation
+ * Documentation updates for rds
+
+Release v1.10.50 (2017-09-21)
+===
+
+### Service Client Updates
+* `service/budgets`: Updates service API
+ * Including "DuplicateRecordException" in UpdateNotification and UpdateSubscriber.
+* `service/ec2`: Updates service API and documentation
+ * Add EC2 APIs to copy Amazon FPGA Images (AFIs) within the same region and across multiple regions, delete AFIs, and modify AFI attributes. AFI attributes include name, description and granting/denying other AWS accounts to load the AFI.
+* `service/logs`: Updates service API and documentation
+ * Adds support for associating LogGroups with KMS Keys.
+
+### SDK Bugs
+* Fix greengrass service model being duplicated with different casing. ([#1541](https://github.com/aws/aws-sdk-go/pull/1541))
+ * Fixes [#1540](https://github.com/aws/aws-sdk-go/issues/1540)
+ * Fixes [#1539](https://github.com/aws/aws-sdk-go/issues/1539)
+Release v1.10.49 (2017-09-20)
+===
+
+### Service Client Updates
+* `service/Greengrass`: Adds new service
+* `service/appstream`: Updates service API and documentation
+ * API updates for supporting On-Demand fleets.
+* `service/codepipeline`: Updates service API and documentation
+ * This change includes a PipelineMetadata object that is part of the output from the GetPipeline API that includes the Pipeline ARN, created, and updated timestamp.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/rds`: Updates service API and documentation
+ * Introduces the --option-group-name parameter to the ModifyDBSnapshot CLI command. You can specify this parameter when you upgrade an Oracle DB snapshot. The same option group considerations apply when upgrading a DB snapshot as when upgrading a DB instance. For more information, see http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Oracle.html#USER_UpgradeDBInstance.Oracle.OGPG.OG
+* `service/runtime.lex`: Updates service API and documentation
+
+Release v1.10.48 (2017-09-19)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API
+ * Fixed bug in EC2 clients preventing ElasticGpuSet from being set.
+
+### SDK Enhancements
+* `aws/credentials`: Add EnvProviderName constant. ([#1531](https://github.com/aws/aws-sdk-go/issues/1531))
+ * Adds the "EnvConfigCredentials" string literal as EnvProviderName constant.
+ * Fixes [#1444](https://github.com/aws/aws-sdk-go/issues/1444)
+
+Release v1.10.47 (2017-09-18)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API and documentation
+ * Amazon EC2 now lets you opt for Spot instances to be stopped in the event of an interruption instead of being terminated. Your Spot request can be fulfilled again by restarting instances from a previously stopped state, subject to availability of capacity at or below your preferred price. When you submit a persistent Spot request, you can choose from "terminate" or "stop" as the instance interruption behavior. Choosing "stop" will shutdown your Spot instances so you can continue from this stopped state later on. This feature is only available for instances with Amazon EBS volume as their root device.
+* `service/email`: Updates service API and documentation
+ * Amazon Simple Email Service (Amazon SES) now lets you customize the domains used for tracking open and click events. Previously, open and click tracking links referred to destinations hosted on domains operated by Amazon SES. With this feature, you can use your own branded domains for capturing open and click events.
+* `service/iam`: Updates service API and documentation
+ * A new API, DeleteServiceLinkedRole, submits a service-linked role deletion request and returns a DeletionTaskId, which you can use to check the status of the deletion.
+
+Release v1.10.46 (2017-09-15)
+===
+
+### Service Client Updates
+* `service/apigateway`: Updates service API and documentation
+ * Add a new enum "REQUEST" to '--type ' field in the current create-authorizer API, and make "identitySource" optional.
+
+Release v1.10.45 (2017-09-14)
+===
+
+### Service Client Updates
+* `service/codebuild`: Updates service API and documentation
+ * Supporting Parameter Store in environment variables for AWS CodeBuild
+* `service/organizations`: Updates service documentation
+ * Documentation updates for AWS Organizations
+* `service/servicecatalog`: Updates service API, documentation, and paginators
+ * This release of Service Catalog adds API support to copy products.
+
+Release v1.10.44 (2017-09-13)
+===
+
+### Service Client Updates
+* `service/autoscaling`: Updates service API and documentation
+ * Customers can create Life Cycle Hooks at the time of creating Auto Scaling Groups through the CreateAutoScalingGroup API
+* `service/batch`: Updates service documentation and examples
+ * Documentation updates for batch
+* `service/ec2`: Updates service API
+ * You are now able to create and launch EC2 x1e.32xlarge instance, a new EC2 instance in the X1 family, in us-east-1, us-west-2, eu-west-1, and ap-northeast-1. x1e.32xlarge offers 128 vCPUs, 3,904 GiB of DDR4 instance memory, high memory bandwidth, large L3 caches, and leading reliability capabilities to boost the performance and reliability of in-memory applications.
+* `service/events`: Updates service API and documentation
+ * Exposes ConcurrentModificationException as one of the valid exceptions for PutPermission and RemovePermission operation.
+
+### SDK Enhancements
+* `service/autoscaling`: Fix documentation for PutScalingPolicy.AutoScalingGroupName [#1522](https://github.com/aws/aws-sdk-go/pull/1522)
+* `service/s3/s3manager`: Clarify S3 Upload manager Concurrency config [#1521](https://github.com/aws/aws-sdk-go/pull/1521)
+ * Fixes [#1458](https://github.com/aws/aws-sdk-go/issues/1458)
+* `service/dynamodb/dynamodbattribute`: Add support for time alias. [#1520](https://github.com/aws/aws-sdk-go/pull/1520)
+ * Related to [#1505](https://github.com/aws/aws-sdk-go/pull/1505)
+
+Release v1.10.43 (2017-09-12)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API
+ * Fixed bug in EC2 clients preventing HostOfferingSet from being set
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.10.42 (2017-09-12)
+===
+
+### Service Client Updates
+* `service/devicefarm`: Updates service API and documentation
+ * DeviceFarm has added support for two features - RemoteDebugging and Customer Artifacts. Customers can now do remote Debugging on their Private Devices and can now retrieve custom files generated by their tests on the device and the device host (execution environment) on both public and private devices.
+
+Release v1.10.41 (2017-09-08)
+===
+
+### Service Client Updates
+* `service/logs`: Updates service API and documentation
+ * Adds support for the PutResourcePolicy, DescribeResourcePolicy and DeleteResourcePolicy APIs.
+
+Release v1.10.40 (2017-09-07)
+===
+
+### Service Client Updates
+* `service/application-autoscaling`: Updates service documentation
+* `service/ec2`: Updates service API and documentation
+ * With Tagging support, you can add Key and Value metadata to search, filter and organize your NAT Gateways according to your organization's needs.
+* `service/elasticloadbalancingv2`: Updates service API and documentation
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/lex-models`: Updates service API and documentation
+* `service/route53`: Updates service API and documentation
+ * You can configure Amazon Route 53 to log information about the DNS queries that Amazon Route 53 receives for your domains and subdomains. When you configure query logging, Amazon Route 53 starts to send logs to CloudWatch Logs. You can use various tools, including the AWS console, to access the query logs.
+
+Release v1.10.39 (2017-09-06)
+===
+
+### Service Client Updates
+* `service/budgets`: Updates service API and documentation
+ * Add an optional "thresholdType" to notifications to support percentage or absolute value thresholds.
+
+Release v1.10.38 (2017-09-05)
+===
+
+### Service Client Updates
+* `service/codestar`: Updates service API and documentation
+ * Added support to tag CodeStar projects. Tags can be used to organize and find CodeStar projects on key-value pairs that you can choose. For example, you could add a tag with a key of "Release" and a value of "Beta" to projects your organization is working on for an upcoming beta release.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.10.37 (2017-09-01)
+===
+
+### Service Client Updates
+* `service/MobileHub`: Adds new service
+* `service/gamelift`: Updates service API and documentation
+ * GameLift VPC resources can be peered with any other AWS VPC. R4 memory-optimized instances now available to deploy.
+* `service/ssm`: Updates service API and documentation
+ * Adding KMS encryption support to SSM Inventory Resource Data Sync. Exposes the ClientToken parameter on SSM StartAutomationExecution to provide idempotent execution requests.
+
+Release v1.10.36 (2017-08-31)
+===
+
+### Service Client Updates
+* `service/codebuild`: Updates service API, documentation, and examples
+ * The AWS CodeBuild HTTP API now provides the BatchDeleteBuilds operation, which enables you to delete existing builds.
+* `service/ec2`: Updates service API and documentation
+ * Descriptions for Security Group Rules enables customers to be able to define a description for ingress and egress security group rules . The Descriptions for Security Group Rules feature supports one description field per Security Group rule for both ingress and egress rules . Descriptions for Security Group Rules provides a simple way to describe the purpose or function of a Security Group Rule allowing for easier customer identification of configuration elements . Prior to the release of Descriptions for Security Group Rules , customers had to maintain a separate system outside of AWS if they wanted to track Security Group Rule mapping and their purpose for being implemented. If a security group rule has already been created and you would like to update or change your description for that security group rule you can use the UpdateSecurityGroupRuleDescription API.
+* `service/elasticloadbalancingv2`: Updates service API and documentation
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/lex-models`: Updates service API and documentation
+
+### SDK Bugs
+* `aws/signer/v4`: Revert [#1491](https://github.com/aws/aws-sdk-go/issues/1491) as change conflicts with an undocumented AWS v4 signature test case.
+ * Related to: [#1495](https://github.com/aws/aws-sdk-go/issues/1495).
+Release v1.10.35 (2017-08-30)
+===
+
+### Service Client Updates
+* `service/application-autoscaling`: Updates service API and documentation
+* `service/organizations`: Updates service API and documentation
+ * The exception ConstraintViolationException now contains a new reason subcode MASTERACCOUNT_MISSING_CONTACT_INFO to make it easier to understand why attempting to remove an account from an Organization can fail. We also improved several other of the text descriptions and examples.
+
+Release v1.10.34 (2017-08-29)
+===
+
+### Service Client Updates
+* `service/config`: Updates service API and documentation
+* `service/ec2`: Updates service API and documentation
+ * Provides capability to add secondary CIDR blocks to a VPC.
+
+### SDK Bugs
+* `aws/signer/v4`: Fix Signing Unordered Multi Value Query Parameters ([#1491](https://github.com/aws/aws-sdk-go/pull/1491))
+ * Removes sorting of query string values when calculating v4 signing as this is not part of the spec. The spec only requires the keys, not values, to be sorted which is achieved by Query.Encode().
+Release v1.10.33 (2017-08-25)
+===
+
+### Service Client Updates
+* `service/cloudformation`: Updates service API and documentation
+ * Rollback triggers enable you to have AWS CloudFormation monitor the state of your application during stack creation and updating, and to roll back that operation if the application breaches the threshold of any of the alarms you've specified.
+* `service/gamelift`: Updates service API
+ * Update spelling of MatchmakingTicket status values for internal consistency.
+* `service/rds`: Updates service API and documentation
+ * Option group options now contain additional properties that identify requirements for certain options. Check these properties to determine if your DB instance must be in a VPC or have auto minor upgrade turned on before you can use an option. Check to see if you can downgrade the version of an option after you have installed it.
+
+### SDK Enhancements
+* `example/service/ec2`: Add EC2 list instances example ([#1492](https://github.com/aws/aws-sdk-go/pull/1492))
+
+Release v1.10.32 (2017-08-25)
+===
+
+### Service Client Updates
+* `service/rekognition`: Updates service API, documentation, and examples
+ * Update the enum value of LandmarkType and GenderType to be consistent with service response
+
+Release v1.10.31 (2017-08-23)
+===
+
+### Service Client Updates
+* `service/appstream`: Updates service documentation
+ * Documentation updates for appstream
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.10.30 (2017-08-22)
+===
+
+### Service Client Updates
+* `service/ssm`: Updates service API and documentation
+ * Changes to associations in Systems Manager State Manager can now be recorded. Previously, when you edited associations, you could not go back and review older association settings. Now, associations are versioned, and can be named using human-readable strings, allowing you to see a trail of association changes. You can also perform rate-based scheduling, which allows you to schedule associations more granularly.
+
+Release v1.10.29 (2017-08-21)
+===
+
+### Service Client Updates
+* `service/firehose`: Updates service API, documentation, and paginators
+ * This change will allow customers to attach a Firehose delivery stream to an existing Kinesis stream directly. You no longer need a forwarder to move data from a Kinesis stream to a Firehose delivery stream. You can now run your streaming applications on your Kinesis stream and easily attach a Firehose delivery stream to it for data delivery to S3, Redshift, or Elasticsearch concurrently.
+* `service/route53`: Updates service API and documentation
+ * Amazon Route 53 now supports CAA resource record type. A CAA record controls which certificate authorities are allowed to issue certificates for the domain or subdomain.
+
+Release v1.10.28 (2017-08-18)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.10.27 (2017-08-16)
+===
+
+### Service Client Updates
+* `service/gamelift`: Updates service API and documentation
+ * The Matchmaking Grouping Service is a new feature that groups player match requests for a given game together into game sessions based on developer configured rules.
+
+### SDK Enhancements
+* `aws/arn`: aws/arn: Package for parsing and producing ARNs ([#1463](https://github.com/aws/aws-sdk-go/pull/1463))
+ * Adds the `arn` package for AWS ARN parsing and building. Use this package to build AWS ARNs for services such as outlined in the [documentation](http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
+
+### SDK Bugs
+* `aws/signer/v4`: Correct V4 presign signature to include content sha25 in URL ([#1469](https://github.com/aws/aws-sdk-go/pull/1469))
+ * Updates the V4 signer so that when a Presign is generated the `X-Amz-Content-Sha256` header is added to the query string instead of being required to be in the header. This allows you to generate presigned URLs for GET requests, e.g S3.GetObject that do not require additional headers to be set by the downstream users of the presigned URL.
+ * Related To: [#1467](https://github.com/aws/aws-sdk-go/issues/1467)
+
+Release v1.10.26 (2017-08-15)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API
+ * Fixed bug in EC2 clients preventing HostReservation from being set
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.10.25 (2017-08-14)
+===
+
+### Service Client Updates
+* `service/AWS Glue`: Adds new service
+* `service/batch`: Updates service API and documentation
+ * This release enhances the DescribeJobs API to include the CloudWatch logStreamName attribute in ContainerDetail and ContainerDetailAttempt
+* `service/cloudhsmv2`: Adds new service
+ * CloudHSM provides hardware security modules for protecting sensitive data and cryptographic keys within an EC2 VPC, and enable the customer to maintain control over key access and use. This is a second-generation of the service that will improve security, lower cost and provide better customer usability.
+* `service/elasticfilesystem`: Updates service API, documentation, and paginators
+ * Customers can create encrypted EFS file systems and specify a KMS master key to encrypt it with.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/mgh`: Adds new service
+ * AWS Migration Hub provides a single location to track migrations across multiple AWS and partner solutions. Using Migration Hub allows you to choose the AWS and partner migration tools that best fit your needs, while providing visibility into the status of your entire migration portfolio. Migration Hub also provides key metrics and progress for individual applications, regardless of which tools are being used to migrate them. For example, you might use AWS Database Migration Service, AWS Server Migration Service, and partner migration tools to migrate an application comprised of a database, virtualized web servers, and a bare metal server. Using Migration Hub will provide you with a single screen that shows the migration progress of all the resources in the application. This allows you to quickly get progress updates across all of your migrations, easily identify and troubleshoot any issues, and reduce the overall time and effort spent on your migration projects. Migration Hub is available to all AWS customers at no additional charge. You only pay for the cost of the migration tools you use, and any resources being consumed on AWS.
+* `service/ssm`: Updates service API and documentation
+ * Systems Manager Maintenance Windows include the following changes or enhancements: New task options using Systems Manager Automation, AWS Lambda, and AWS Step Functions; enhanced ability to edit the targets of a Maintenance Window, including specifying a target name and description, and ability to edit the owner field; enhanced ability to edits tasks; enhanced support for Run Command parameters; and you can now use a --safe flag when attempting to deregister a target. If this flag is enabled when you attempt to deregister a target, the system returns an error if the target is referenced by any task. Also, Systems Manager now includes Configuration Compliance to scan your fleet of managed instances for patch compliance and configuration inconsistencies. You can collect and aggregate data from multiple AWS accounts and Regions, and then drill down into specific resources that aren't compliant.
+* `service/storagegateway`: Updates service API and documentation
+ * Add optional field ForceDelete to DeleteFileShare api.
+
+Release v1.10.24 (2017-08-11)
+===
+
+### Service Client Updates
+* `service/codedeploy`: Updates service API and documentation
+ * Adds support for specifying Application Load Balancers in deployment groups, for both in-place and blue/green deployments.
+* `service/cognito-idp`: Updates service API and documentation
+* `service/ec2`: Updates service API and documentation
+ * Provides customers an opportunity to recover an EIP that was released
+
+Release v1.10.23 (2017-08-10)
+===
+
+### Service Client Updates
+* `service/clouddirectory`: Updates service API and documentation
+ * Enable BatchDetachPolicy
+* `service/codebuild`: Updates service API
+ * Supporting Bitbucket as source type in AWS CodeBuild.
+
+Release v1.10.22 (2017-08-09)
+===
+
+### Service Client Updates
+* `service/rds`: Updates service documentation
+ * Documentation updates for RDS.
+
+Release v1.10.21 (2017-08-09)
+===
+
+### Service Client Updates
+* `service/elasticbeanstalk`: Updates service API and documentation
+ * Add support for paginating the result of DescribeEnvironments Include the ARN of described environments in DescribeEnvironments output
+
+### SDK Enhancements
+* `aws`: Add pointer conversion utilities to transform int64 to time.Time [#1433](https://github.com/aws/aws-sdk-go/pull/1433)
+ * Adds `SecondsTimeValue` and `MillisecondsTimeValue` utilities.
+
+Release v1.10.20 (2017-08-01)
+===
+
+### Service Client Updates
+* `service/codedeploy`: Updates service API and documentation
+ * AWS CodeDeploy now supports the use of multiple tag groups in a single deployment group (an intersection of tags) to identify the instances for a deployment. When you create or update a deployment group, use the new ec2TagSet and onPremisesTagSet structures to specify up to three groups of tags. Only instances that are identified by at least one tag in each of the tag groups are included in the deployment group.
+* `service/config`: Updates service API and documentation
+* `service/ec2`: Updates service waiters
+ * Ec2 SpotInstanceRequestFulfilled waiter update
+* `service/elasticloadbalancingv2`: Updates service waiters
+* `service/email`: Updates service API, documentation, paginators, and examples
+ * This update adds information about publishing email open and click events. This update also adds information about publishing email events to Amazon Simple Notification Service (Amazon SNS).
+* `service/pinpoint`: Updates service API and documentation
+ * This release of the Pinpoint SDK enables App management - create, delete, update operations, Raw Content delivery for APNs and GCM campaign messages and From Address override.
+
+Release v1.10.19 (2017-08-01)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/inspector`: Updates service API, documentation, and paginators
+ * Inspector's StopAssessmentRun API has been updated with a new input option - stopAction. This request parameter can be set to either START_EVALUATION or SKIP_EVALUATION. START_EVALUATION (the default value, and the previous behavior) stops the AWS agent data collection and begins the results evaluation for findings generation based on the data collected so far. SKIP_EVALUATION cancels the assessment run immediately, after which no findings are generated.
+* `service/ssm`: Updates service API and documentation
+ * Adds a SendAutomationSignal API to SSM Service. This API is used to send a signal to an automation execution to change the current behavior or status of the execution.
+
Release v1.10.18 (2017-07-27)
===
diff --git a/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md b/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md
index 7c0186f0c9e..6f422a95edb 100644
--- a/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md
+++ b/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md
@@ -67,7 +67,7 @@ Please be aware of the following notes prior to opening a pull request:
5. The JSON files under the SDK's `models` folder are sourced from outside the SDK.
Such as `models/apis/ec2/2016-11-15/api.json`. We will not accept pull requests
directly on these models. If you discover an issue with the models please
- create a Github [issue](issues) describing the issue.
+ create a [GitHub issue][issues] describing the issue.
### Testing
diff --git a/vendor/github.com/aws/aws-sdk-go/Gopkg.lock b/vendor/github.com/aws/aws-sdk-go/Gopkg.lock
new file mode 100644
index 00000000000..854c94fdf04
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/Gopkg.lock
@@ -0,0 +1,20 @@
+# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
+
+
+[[projects]]
+ name = "github.com/go-ini/ini"
+ packages = ["."]
+ revision = "300e940a926eb277d3901b20bdfcc54928ad3642"
+ version = "v1.25.4"
+
+[[projects]]
+ name = "github.com/jmespath/go-jmespath"
+ packages = ["."]
+ revision = "0b12d6b5"
+
+[solve-meta]
+ analyzer-name = "dep"
+ analyzer-version = 1
+ inputs-digest = "51a86a867df617990082dec6b868e4efe2fdb2ed0e02a3daa93cd30f962b5085"
+ solver-name = "gps-cdcl"
+ solver-version = 1
diff --git a/vendor/github.com/aws/aws-sdk-go/Gopkg.toml b/vendor/github.com/aws/aws-sdk-go/Gopkg.toml
new file mode 100644
index 00000000000..664fc59553f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/Gopkg.toml
@@ -0,0 +1,48 @@
+
+# Gopkg.toml example
+#
+# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
+# 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"
+
+ignored = [
+ # Testing/Example/Codegen dependencies
+ "github.com/stretchr/testify",
+ "github.com/stretchr/testify/assert",
+ "github.com/stretchr/testify/require",
+ "github.com/go-sql-driver/mysql",
+ "github.com/gucumber/gucumber",
+ "github.com/pkg/errors",
+ "golang.org/x/net",
+ "golang.org/x/net/html",
+ "golang.org/x/net/http2",
+ "golang.org/x/text",
+ "golang.org/x/text/html",
+ "golang.org/x/tools",
+ "golang.org/x/tools/go/loader",
+]
+
+
+[[constraint]]
+ name = "github.com/go-ini/ini"
+ version = "1.25.4"
+
+[[constraint]]
+ name = "github.com/jmespath/go-jmespath"
+ revision = "0b12d6b5"
+ #version = "0.2.2"
diff --git a/vendor/github.com/aws/aws-sdk-go/Makefile b/vendor/github.com/aws/aws-sdk-go/Makefile
index df9803c2a2b..83ccc1e62fd 100644
--- a/vendor/github.com/aws/aws-sdk-go/Makefile
+++ b/vendor/github.com/aws/aws-sdk-go/Makefile
@@ -74,7 +74,7 @@ smoke-tests: get-deps-tests
performance: get-deps-tests
AWS_TESTING_LOG_RESULTS=${log-detailed} AWS_TESTING_REGION=$(region) AWS_TESTING_DB_TABLE=$(table) gucumber -go-tags "integration" ./awstesting/performance
-sandbox-tests: sandbox-test-go15 sandbox-test-go15-novendorexp sandbox-test-go16 sandbox-test-go17 sandbox-test-go18 sandbox-test-gotip
+sandbox-tests: sandbox-test-go15 sandbox-test-go15-novendorexp sandbox-test-go16 sandbox-test-go17 sandbox-test-go18 sandbox-test-go19 sandbox-test-gotip
sandbox-build-go15:
docker build -f ./awstesting/sandbox/Dockerfile.test.go1.5 -t "aws-sdk-go-1.5" .
@@ -111,6 +111,13 @@ sandbox-go18: sandbox-build-go18
sandbox-test-go18: sandbox-build-go18
docker run -t aws-sdk-go-1.8
+sandbox-build-go19:
+ docker build -f ./awstesting/sandbox/Dockerfile.test.go1.8 -t "aws-sdk-go-1.9" .
+sandbox-go19: sandbox-build-go19
+ docker run -i -t aws-sdk-go-1.9 bash
+sandbox-test-go19: sandbox-build-go19
+ docker run -t aws-sdk-go-1.9
+
sandbox-build-gotip:
@echo "Run make update-aws-golang-tip, if this test fails because missing aws-golang:tip container"
docker build -f ./awstesting/sandbox/Dockerfile.test.gotip -t "aws-sdk-go-tip" .
diff --git a/vendor/github.com/aws/aws-sdk-go/README.md b/vendor/github.com/aws/aws-sdk-go/README.md
index 559697f66b9..c32774491c7 100644
--- a/vendor/github.com/aws/aws-sdk-go/README.md
+++ b/vendor/github.com/aws/aws-sdk-go/README.md
@@ -6,6 +6,8 @@ aws-sdk-go is the official AWS SDK for the Go programming language.
Checkout our [release notes](https://github.com/aws/aws-sdk-go/releases) for information about the latest bug fixes, updates, and features added to the SDK.
+We [announced](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-2-0-developer-preview/) the Developer Preview for the [v2 AWS SDK for Go](). The v2 SDK is available at https://github.com/aws/aws-sdk-go-v2, and `go get github.com/aws/aws-sdk-go-v2` via `go get`. Check out the v2 SDK's [changes and updates](https://github.com/aws/aws-sdk-go-v2/blob/master/CHANGELOG.md), and let us know what you think. We want your feedback.
+
## Installing
If you are using Go 1.5 with the `GO15VENDOREXPERIMENT=1` vendoring flag, or 1.6 and higher you can use the following command to retrieve the SDK. The SDK's non-testing dependencies will be included and are vendored in the `vendor` folder.
@@ -167,7 +169,7 @@ and configures the S3 service client to use that role for API requests.
// Create service client value configured for credentials
// from assumed role.
- svc := s3.New(sess, &aws.Config{Credentials: creds})/
+ svc := s3.New(sess, &aws.Config{Credentials: creds})
```
See the [credentials][credentials_pkg] package documentation for more information on credential
@@ -185,7 +187,7 @@ Option's SharedConfigState parameter.
}))
```
-[credentials_pkg]: ttps://docs.aws.amazon.com/sdk-for-go/api/aws/credentials
+[credentials_pkg]: https://docs.aws.amazon.com/sdk-for-go/api/aws/credentials
### Configuring AWS Region
@@ -305,7 +307,7 @@ documentation for the errors that could be returned.
// will leak connections.
defer result.Body.Close()
- fmt.Println("Object Size:", aws.StringValue(result.ContentLength))
+ fmt.Println("Object Size:", aws.Int64Value(result.ContentLength))
```
### API Request Pagination and Resource Waiters
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go b/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go
index e25a460fbaa..63d2df67c63 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go
@@ -2,6 +2,7 @@ package client
import (
"math/rand"
+ "strconv"
"sync"
"time"
@@ -38,14 +39,18 @@ func (d DefaultRetryer) RetryRules(r *request.Request) time.Duration {
minTime := 30
throttle := d.shouldThrottle(r)
if throttle {
+ if delay, ok := getRetryDelay(r); ok {
+ return delay
+ }
+
minTime = 500
}
retryCount := r.RetryCount
- if retryCount > 13 {
- retryCount = 13
- } else if throttle && retryCount > 8 {
+ if throttle && retryCount > 8 {
retryCount = 8
+ } else if retryCount > 13 {
+ retryCount = 13
}
delay := (1 << uint(retryCount)) * (seededRand.Intn(minTime) + minTime)
@@ -68,12 +73,49 @@ func (d DefaultRetryer) ShouldRetry(r *request.Request) bool {
// ShouldThrottle returns true if the request should be throttled.
func (d DefaultRetryer) shouldThrottle(r *request.Request) bool {
- if r.HTTPResponse.StatusCode == 502 ||
- r.HTTPResponse.StatusCode == 503 ||
- r.HTTPResponse.StatusCode == 504 {
- return true
+ switch r.HTTPResponse.StatusCode {
+ case 429:
+ case 502:
+ case 503:
+ case 504:
+ default:
+ return r.IsErrorThrottle()
}
- return r.IsErrorThrottle()
+
+ return true
+}
+
+// This will look in the Retry-After header, RFC 7231, for how long
+// it will wait before attempting another request
+func getRetryDelay(r *request.Request) (time.Duration, bool) {
+ if !canUseRetryAfterHeader(r) {
+ return 0, false
+ }
+
+ delayStr := r.HTTPResponse.Header.Get("Retry-After")
+ if len(delayStr) == 0 {
+ return 0, false
+ }
+
+ delay, err := strconv.Atoi(delayStr)
+ if err != nil {
+ return 0, false
+ }
+
+ return time.Duration(delay) * time.Second, true
+}
+
+// Will look at the status code to see if the retry header pertains to
+// the status code.
+func canUseRetryAfterHeader(r *request.Request) bool {
+ switch r.HTTPResponse.StatusCode {
+ case 429:
+ case 503:
+ default:
+ return false
+ }
+
+ return true
}
// lockedSource is a thread-safe implementation of rand.Source
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/config.go b/vendor/github.com/aws/aws-sdk-go/aws/config.go
index ae3a286960d..4fd0d072474 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/config.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/config.go
@@ -168,7 +168,7 @@ type Config struct {
//
EC2MetadataDisableTimeoutOverride *bool
- // Instructs the endpiont to be generated for a service client to
+ // Instructs the endpoint to be generated for a service client to
// be the dual stack endpoint. The dual stack endpoint will support
// both IPv4 and IPv6 addressing.
//
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go b/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go
index e8cf93d2699..8fdda530338 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go
@@ -4,9 +4,9 @@ package aws
import "time"
-// An emptyCtx is a copy of the the Go 1.7 context.emptyCtx type. This
-// is copied to provide a 1.6 and 1.5 safe version of context that is compatible
-// with Go 1.7's Context.
+// An emptyCtx is a copy of the Go 1.7 context.emptyCtx type. This is copied to
+// provide a 1.6 and 1.5 safe version of context that is compatible with Go
+// 1.7's Context.
//
// An emptyCtx is never canceled, has no values, and has no deadline. It is not
// struct{}, since vars of this type must have distinct addresses.
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go b/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go
index 3b73a7da7f9..ff5d58e0683 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go
@@ -311,6 +311,24 @@ func TimeValue(v *time.Time) time.Time {
return time.Time{}
}
+// SecondsTimeValue converts an int64 pointer to a time.Time value
+// representing seconds since Epoch or time.Time{} if the pointer is nil.
+func SecondsTimeValue(v *int64) time.Time {
+ if v != nil {
+ return time.Unix((*v / 1000), 0)
+ }
+ return time.Time{}
+}
+
+// MillisecondsTimeValue converts an int64 pointer to a time.Time value
+// representing milliseconds sinch Epoch or time.Time{} if the pointer is nil.
+func MillisecondsTimeValue(v *int64) time.Time {
+ if v != nil {
+ return time.Unix(0, (*v * 1000000))
+ }
+ return time.Time{}
+}
+
// TimeUnixMilli returns a Unix timestamp in milliseconds from "January 1, 1970 UTC".
// The result is undefined if the Unix time cannot be represented by an int64.
// Which includes calling TimeUnixMilli on a zero Time is undefined.
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go
index 07afe3b8e6d..2cb08182fb0 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go
@@ -9,6 +9,7 @@ package defaults
import (
"fmt"
+ "net"
"net/http"
"net/url"
"os"
@@ -118,14 +119,43 @@ func RemoteCredProvider(cfg aws.Config, handlers request.Handlers) credentials.P
return ec2RoleProvider(cfg, handlers)
}
+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
+ }
+ for _, addr := range addrs {
+ if !net.ParseIP(addr).IsLoopback() {
+ return false, nil
+ }
+ }
+
+ return true, nil
+}
+
func localHTTPCredProvider(cfg aws.Config, handlers request.Handlers, u string) credentials.Provider {
var errMsg string
parsed, err := url.Parse(u)
if err != nil {
errMsg = fmt.Sprintf("invalid URL, %v", err)
- } else if host := aws.URLHostname(parsed); !(host == "localhost" || host == "127.0.0.1") {
- errMsg = fmt.Sprintf("invalid host address, %q, only localhost and 127.0.0.1 are valid.", host)
+ } else {
+ host := aws.URLHostname(parsed)
+ if len(host) == 0 {
+ errMsg = "unable to parse host from local HTTP cred provider URL"
+ } else if isLoopback, loopbackErr := isLoopbackHost(host); loopbackErr != nil {
+ errMsg = fmt.Sprintf("failed to resolve host %q, %v", host, loopbackErr)
+ } else if !isLoopback {
+ errMsg = fmt.Sprintf("invalid endpoint host, %q, only loopback hosts are allowed.", host)
+ }
}
if len(errMsg) > 0 {
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
index ba0c07b25b1..709f648ea1d 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
@@ -24,6 +24,7 @@ const (
EuCentral1RegionID = "eu-central-1" // EU (Frankfurt).
EuWest1RegionID = "eu-west-1" // EU (Ireland).
EuWest2RegionID = "eu-west-2" // EU (London).
+ EuWest3RegionID = "eu-west-3" // EU (Paris).
SaEast1RegionID = "sa-east-1" // South America (Sao Paulo).
UsEast1RegionID = "us-east-1" // US East (N. Virginia).
UsEast2RegionID = "us-east-2" // US East (Ohio).
@@ -33,7 +34,8 @@ const (
// AWS China partition's regions.
const (
- CnNorth1RegionID = "cn-north-1" // China (Beijing).
+ CnNorth1RegionID = "cn-north-1" // China (Beijing).
+ CnNorthwest1RegionID = "cn-northwest-1" // China (Ningxia).
)
// AWS GovCloud (US) partition's regions.
@@ -44,6 +46,7 @@ const (
// Service identifiers
const (
AcmServiceID = "acm" // Acm.
+ ApiPricingServiceID = "api.pricing" // ApiPricing.
ApigatewayServiceID = "apigateway" // Apigateway.
ApplicationAutoscalingServiceID = "application-autoscaling" // ApplicationAutoscaling.
Appstream2ServiceID = "appstream2" // Appstream2.
@@ -55,6 +58,7 @@ const (
CloudformationServiceID = "cloudformation" // Cloudformation.
CloudfrontServiceID = "cloudfront" // Cloudfront.
CloudhsmServiceID = "cloudhsm" // Cloudhsm.
+ Cloudhsmv2ServiceID = "cloudhsmv2" // Cloudhsmv2.
CloudsearchServiceID = "cloudsearch" // Cloudsearch.
CloudtrailServiceID = "cloudtrail" // Cloudtrail.
CodebuildServiceID = "codebuild" // Codebuild.
@@ -68,6 +72,7 @@ const (
ConfigServiceID = "config" // Config.
CurServiceID = "cur" // Cur.
DatapipelineServiceID = "datapipeline" // Datapipeline.
+ DaxServiceID = "dax" // Dax.
DevicefarmServiceID = "devicefarm" // Devicefarm.
DirectconnectServiceID = "directconnect" // Directconnect.
DiscoveryServiceID = "discovery" // Discovery.
@@ -91,6 +96,7 @@ const (
FirehoseServiceID = "firehose" // Firehose.
GameliftServiceID = "gamelift" // Gamelift.
GlacierServiceID = "glacier" // Glacier.
+ GlueServiceID = "glue" // Glue.
GreengrassServiceID = "greengrass" // Greengrass.
HealthServiceID = "health" // Health.
IamServiceID = "iam" // Iam.
@@ -106,6 +112,7 @@ const (
MachinelearningServiceID = "machinelearning" // Machinelearning.
MarketplacecommerceanalyticsServiceID = "marketplacecommerceanalytics" // Marketplacecommerceanalytics.
MeteringMarketplaceServiceID = "metering.marketplace" // MeteringMarketplace.
+ MghServiceID = "mgh" // Mgh.
MobileanalyticsServiceID = "mobileanalytics" // Mobileanalytics.
ModelsLexServiceID = "models.lex" // ModelsLex.
MonitoringServiceID = "monitoring" // Monitoring.
@@ -217,6 +224,9 @@ var awsPartition = partition{
"eu-west-2": region{
Description: "EU (London)",
},
+ "eu-west-3": region{
+ Description: "EU (Paris)",
+ },
"sa-east-1": region{
Description: "South America (Sao Paulo)",
},
@@ -246,6 +256,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -253,6 +264,17 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "api.pricing": service{
+ Defaults: endpoint{
+ CredentialScope: credentialScope{
+ Service: "pricing",
+ },
+ },
+ Endpoints: endpoints{
+ "ap-south-1": endpoint{},
+ "us-east-1": endpoint{},
+ },
+ },
"apigateway": service{
Endpoints: endpoints{
@@ -265,6 +287,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -290,6 +313,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -316,6 +340,8 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
"ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -336,6 +362,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -347,6 +374,7 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
+ "ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
@@ -393,6 +421,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -429,6 +458,22 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "cloudhsmv2": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-south-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"cloudsearch": service{
Endpoints: endpoints{
@@ -456,6 +501,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -467,6 +513,7 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"ca-central-1": endpoint{},
@@ -510,6 +557,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -521,6 +569,8 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"ca-central-1": endpoint{},
@@ -537,10 +587,17 @@ var awsPartition = partition{
"codestar": service{
Endpoints: endpoints{
- "eu-west-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-2": endpoint{},
+ "ap-northeast-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"cognito-identity": service{
@@ -549,6 +606,7 @@ var awsPartition = partition{
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
+ "ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
@@ -564,6 +622,7 @@ var awsPartition = partition{
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
+ "ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
@@ -579,6 +638,7 @@ var awsPartition = partition{
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
+ "ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
@@ -600,6 +660,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -623,6 +684,18 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "dax": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-south-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"devicefarm": service{
Endpoints: endpoints{
@@ -641,6 +714,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -666,6 +740,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -678,14 +753,17 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
+ "us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
@@ -703,6 +781,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"local": endpoint{
Hostname: "localhost:8000",
Protocols: []string{"http"},
@@ -731,6 +810,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -753,12 +833,16 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-1": endpoint{},
@@ -769,12 +853,16 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-1": endpoint{},
@@ -793,6 +881,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -812,6 +901,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -823,6 +913,7 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -831,7 +922,7 @@ var awsPartition = partition{
},
"elasticloadbalancing": service{
Defaults: endpoint{
- Protocols: []string{"http", "https"},
+ Protocols: []string{"https"},
},
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
@@ -843,6 +934,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -867,6 +959,7 @@ var awsPartition = partition{
},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{
SSLCommonName: "{service}.{region}.{dnsSuffix}",
@@ -919,6 +1012,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -938,6 +1032,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -948,9 +1043,12 @@ var awsPartition = partition{
"firehose": service{
Endpoints: endpoints{
- "eu-west-1": endpoint{},
- "us-east-1": endpoint{},
- "us-west-2": endpoint{},
+ "ap-northeast-1": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
},
},
"gamelift": service{
@@ -960,10 +1058,15 @@ var awsPartition = partition{
"ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
@@ -975,23 +1078,35 @@ var awsPartition = partition{
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
+ "ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
+ "glue": service{
+
+ Endpoints: endpoints{
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"greengrass": service{
IsRegionalized: boxedTrue,
Defaults: endpoint{
Protocols: []string{"https"},
},
Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"eu-central-1": endpoint{},
"us-east-1": endpoint{},
@@ -1039,6 +1154,7 @@ var awsPartition = partition{
"ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"us-east-1": endpoint{},
"us-west-1": endpoint{},
@@ -1076,6 +1192,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1103,6 +1220,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1122,6 +1240,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1156,6 +1275,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1199,6 +1319,12 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "mgh": service{
+
+ Endpoints: endpoints{
+ "us-west-2": endpoint{},
+ },
+ },
"mobileanalytics": service{
Endpoints: endpoints{
@@ -1229,6 +1355,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1257,6 +1384,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1298,10 +1426,21 @@ var awsPartition = partition{
"polly": service{
Endpoints: endpoints{
- "eu-west-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-2": endpoint{},
+ "ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"rds": service{
@@ -1316,6 +1455,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{
SSLCommonName: "{service}.{dnsSuffix}",
@@ -1337,6 +1477,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1378,6 +1519,7 @@ var awsPartition = partition{
},
},
Endpoints: endpoints{
+ "eu-west-1": endpoint{},
"us-east-1": endpoint{},
},
},
@@ -1393,26 +1535,27 @@ var awsPartition = partition{
},
Endpoints: endpoints{
"ap-northeast-1": endpoint{
- Hostname: "s3-ap-northeast-1.amazonaws.com",
+ Hostname: "s3.ap-northeast-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
"ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
"ap-southeast-1": endpoint{
- Hostname: "s3-ap-southeast-1.amazonaws.com",
+ Hostname: "s3.ap-southeast-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
"ap-southeast-2": endpoint{
- Hostname: "s3-ap-southeast-2.amazonaws.com",
+ Hostname: "s3.ap-southeast-2.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{
- Hostname: "s3-eu-west-1.amazonaws.com",
+ Hostname: "s3.eu-west-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"s3-external-1": endpoint{
Hostname: "s3-external-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
@@ -1421,7 +1564,7 @@ var awsPartition = partition{
},
},
"sa-east-1": endpoint{
- Hostname: "s3-sa-east-1.amazonaws.com",
+ Hostname: "s3.sa-east-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
"us-east-1": endpoint{
@@ -1430,11 +1573,11 @@ var awsPartition = partition{
},
"us-east-2": endpoint{},
"us-west-1": endpoint{
- Hostname: "s3-us-west-1.amazonaws.com",
+ Hostname: "s3.us-west-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
"us-west-2": endpoint{
- Hostname: "s3-us-west-2.amazonaws.com",
+ Hostname: "s3.us-west-2.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
},
@@ -1461,14 +1604,19 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
+ "us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
@@ -1492,19 +1640,24 @@ var awsPartition = partition{
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-3": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
+ "us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
"snowball": service{
Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
"ap-south-1": endpoint{},
"ap-southeast-2": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-1": endpoint{},
@@ -1525,6 +1678,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1547,6 +1701,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{
SSLCommonName: "queue.{dnsSuffix}",
@@ -1568,6 +1723,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1582,6 +1738,7 @@ var awsPartition = partition{
"ap-southeast-2": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-2": endpoint{},
@@ -1599,6 +1756,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1623,6 +1781,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"local": endpoint{
Hostname: "localhost:8000",
Protocols: []string{"http"},
@@ -1661,6 +1820,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-1-fips": endpoint{
@@ -1710,6 +1870,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1755,6 +1916,7 @@ var awsPartition = partition{
"ap-northeast-1": endpoint{},
"eu-west-1": endpoint{},
"us-east-1": endpoint{},
+ "us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
@@ -1777,6 +1939,7 @@ var awsPartition = partition{
"ap-southeast-2": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"us-east-1": endpoint{},
"us-west-2": endpoint{},
},
@@ -1827,30 +1990,62 @@ var awscnPartition = partition{
"cn-north-1": region{
Description: "China (Beijing)",
},
+ "cn-northwest-1": region{
+ Description: "China (Ningxia)",
+ },
},
Services: services{
+ "apigateway": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ },
+ },
+ "application-autoscaling": service{
+ Defaults: endpoint{
+ Hostname: "autoscaling.{region}.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ CredentialScope: credentialScope{
+ Service: "application-autoscaling",
+ },
+ },
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
"autoscaling": service{
Defaults: endpoint{
Protocols: []string{"http", "https"},
},
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"cloudformation": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"cloudtrail": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"codedeploy": service{
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
+ "cognito-identity": service{
+
Endpoints: endpoints{
"cn-north-1": endpoint{},
},
@@ -1858,13 +2053,15 @@ var awscnPartition = partition{
"config": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"directconnect": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"dynamodb": service{
@@ -1872,7 +2069,8 @@ var awscnPartition = partition{
Protocols: []string{"http", "https"},
},
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"ec2": service{
@@ -1880,7 +2078,8 @@ var awscnPartition = partition{
Protocols: []string{"http", "https"},
},
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"ec2metadata": service{
@@ -1909,21 +2108,24 @@ var awscnPartition = partition{
"elasticache": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"elasticbeanstalk": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"elasticloadbalancing": service{
Defaults: endpoint{
- Protocols: []string{"http", "https"},
+ Protocols: []string{"https"},
},
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"elasticmapreduce": service{
@@ -1931,13 +2133,21 @@ var awscnPartition = partition{
Protocols: []string{"http", "https"},
},
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
+ "es": service{
+
+ Endpoints: endpoints{
+ "cn-northwest-1": endpoint{},
},
},
"events": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"glacier": service{
@@ -1945,7 +2155,8 @@ var awscnPartition = partition{
Protocols: []string{"http", "https"},
},
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"iam": service{
@@ -1961,8 +2172,25 @@ var awscnPartition = partition{
},
},
},
+ "iot": service{
+ Defaults: endpoint{
+ CredentialScope: credentialScope{
+ Service: "execute-api",
+ },
+ },
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ },
+ },
"kinesis": service{
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
+ "lambda": service{
+
Endpoints: endpoints{
"cn-north-1": endpoint{},
},
@@ -1970,7 +2198,8 @@ var awscnPartition = partition{
"logs": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"monitoring": service{
@@ -1978,19 +2207,22 @@ var awscnPartition = partition{
Protocols: []string{"http", "https"},
},
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"rds": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"redshift": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"s3": service{
@@ -1998,6 +2230,13 @@ var awscnPartition = partition{
Protocols: []string{"http", "https"},
SignatureVersions: []string{"s3v4"},
},
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
+ "snowball": service{
+
Endpoints: endpoints{
"cn-north-1": endpoint{},
},
@@ -2007,7 +2246,8 @@ var awscnPartition = partition{
Protocols: []string{"http", "https"},
},
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"sqs": service{
@@ -2016,13 +2256,15 @@ var awscnPartition = partition{
Protocols: []string{"http", "https"},
},
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"ssm": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"storagegateway": service{
@@ -2039,19 +2281,22 @@ var awscnPartition = partition{
},
},
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"sts": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"swf": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"tagging": service{
@@ -2089,6 +2334,18 @@ var awsusgovPartition = partition{
},
},
Services: services{
+ "acm": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
+ "apigateway": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"autoscaling": service{
Endpoints: endpoints{
@@ -2133,10 +2390,22 @@ var awsusgovPartition = partition{
"us-gov-west-1": endpoint{},
},
},
+ "dms": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"dynamodb": service{
Endpoints: endpoints{
"us-gov-west-1": endpoint{},
+ "us-gov-west-1-fips": endpoint{
+ Hostname: "dynamodb.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
},
},
"ec2": service{
@@ -2162,6 +2431,12 @@ var awsusgovPartition = partition{
"us-gov-west-1": endpoint{},
},
},
+ "elasticbeanstalk": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"elasticloadbalancing": service{
Endpoints: endpoints{
@@ -2265,7 +2540,7 @@ var awsusgovPartition = partition{
},
},
"us-gov-west-1": endpoint{
- Hostname: "s3-us-gov-west-1.amazonaws.com",
+ Hostname: "s3.us-gov-west-1.amazonaws.com",
Protocols: []string{"http", "https"},
},
},
@@ -2313,6 +2588,12 @@ var awsusgovPartition = partition{
},
Endpoints: endpoints{
"us-gov-west-1": endpoint{},
+ "us-gov-west-1-fips": endpoint{
+ Hostname: "dynamodb.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
},
},
"sts": service{
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go
index 299dc379d1b..5c7db4982c9 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go
@@ -24,10 +24,14 @@ const (
// ErrCodeRead is an error that is returned during HTTP reads.
ErrCodeRead = "ReadError"
- // ErrCodeResponseTimeout is the connection timeout error that is recieved
+ // ErrCodeResponseTimeout is the connection timeout error that is received
// during body reads.
ErrCodeResponseTimeout = "ResponseTimeout"
+ // ErrCodeInvalidPresignExpire is returned when the expire time provided to
+ // presign is invalid
+ ErrCodeInvalidPresignExpire = "InvalidPresignExpireError"
+
// CanceledErrorCode is the error code that will be returned by an
// API request that was canceled. Requests given a aws.Context may
// return this error when canceled.
@@ -42,7 +46,6 @@ type Request struct {
Retryer
Time time.Time
- ExpireTime time.Duration
Operation *Operation
HTTPRequest *http.Request
HTTPResponse *http.Response
@@ -60,6 +63,11 @@ type Request struct {
LastSignedAt time.Time
DisableFollowRedirects bool
+ // A value greater than 0 instructs the request to be signed as Presigned URL
+ // You should not set this field directly. Instead use Request's
+ // Presign or PresignRequest methods.
+ ExpireTime time.Duration
+
context aws.Context
built bool
@@ -104,6 +112,8 @@ func New(cfg aws.Config, clientInfo metadata.ClientInfo, handlers Handlers,
err = awserr.New("InvalidEndpointURL", "invalid endpoint uri", err)
}
+ SanitizeHostForHeader(httpReq)
+
r := &Request{
Config: cfg,
ClientInfo: clientInfo,
@@ -250,34 +260,59 @@ func (r *Request) SetReaderBody(reader io.ReadSeeker) {
// Presign returns the request's signed URL. Error will be returned
// if the signing fails.
-func (r *Request) Presign(expireTime time.Duration) (string, error) {
- r.ExpireTime = expireTime
+//
+// It is invalid to create a presigned URL with a expire duration 0 or less. An
+// error is returned if expire duration is 0 or less.
+func (r *Request) Presign(expire time.Duration) (string, error) {
+ r = r.copy()
+
+ // Presign requires all headers be hoisted. There is no way to retrieve
+ // the signed headers not hoisted without this. Making the presigned URL
+ // useless.
r.NotHoist = false
+ u, _, err := getPresignedURL(r, expire)
+ return u, err
+}
+
+// PresignRequest behaves just like presign, with the addition of returning a
+// set of headers that were signed.
+//
+// It is invalid to create a presigned URL with a expire duration 0 or less. An
+// error is returned if expire duration is 0 or less.
+//
+// Returns the URL string for the API operation with signature in the query string,
+// and the HTTP headers that were included in the signature. These headers must
+// be included in any HTTP request made with the presigned URL.
+//
+// To prevent hoisting any headers to the query string set NotHoist to true on
+// this Request value prior to calling PresignRequest.
+func (r *Request) PresignRequest(expire time.Duration) (string, http.Header, error) {
+ r = r.copy()
+ return getPresignedURL(r, expire)
+}
+
+func getPresignedURL(r *Request, expire time.Duration) (string, http.Header, error) {
+ if expire <= 0 {
+ return "", nil, awserr.New(
+ ErrCodeInvalidPresignExpire,
+ "presigned URL requires an expire duration greater than 0",
+ nil,
+ )
+ }
+
+ r.ExpireTime = expire
+
if r.Operation.BeforePresignFn != nil {
- r = r.copy()
- err := r.Operation.BeforePresignFn(r)
- if err != nil {
- return "", err
+ if err := r.Operation.BeforePresignFn(r); err != nil {
+ return "", nil, err
}
}
- r.Sign()
- if r.Error != nil {
- return "", r.Error
+ if err := r.Sign(); err != nil {
+ return "", nil, err
}
- return r.HTTPRequest.URL.String(), nil
-}
-// PresignRequest behaves just like presign, but hoists all headers and signs them.
-// Also returns the signed hash back to the user
-func (r *Request) PresignRequest(expireTime time.Duration) (string, http.Header, error) {
- r.ExpireTime = expireTime
- r.NotHoist = true
- r.Sign()
- if r.Error != nil {
- return "", nil, r.Error
- }
return r.HTTPRequest.URL.String(), r.SignedHeaderVals, nil
}
@@ -573,3 +608,72 @@ func shouldRetryCancel(r *Request) bool {
errStr != "net/http: request canceled while waiting for connection")
}
+
+// 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/aws/request/retryer.go b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go
index 2c05dbdc2e1..f35fef213ed 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go
@@ -70,8 +70,8 @@ func isCodeExpiredCreds(code string) bool {
}
var validParentCodes = map[string]struct{}{
- ErrCodeSerialization: struct{}{},
- ErrCodeRead: struct{}{},
+ ErrCodeSerialization: {},
+ ErrCodeRead: {},
}
type temporaryError interface {
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go
index 7357e545acd..f1adcf48198 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go
@@ -7,6 +7,9 @@ import (
"github.com/aws/aws-sdk-go/aws/credentials"
)
+// EnvProviderName provides a name of the provider when config is loaded from environment.
+const EnvProviderName = "EnvConfigCredentials"
+
// 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
@@ -76,7 +79,7 @@ type envConfig struct {
SharedConfigFile string
// Sets the path to a custom Credentials Authroity (CA) Bundle PEM file
- // that the SDK will use instead of the the system's root CA bundle.
+ // 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.
//
@@ -157,7 +160,7 @@ func envConfigLoad(enableSharedConfig bool) envConfig {
if len(cfg.Creds.AccessKeyID) == 0 || len(cfg.Creds.SecretAccessKey) == 0 {
cfg.Creds = credentials.Value{}
} else {
- cfg.Creds.ProviderName = "EnvConfigCredentials"
+ cfg.Creds.ProviderName = EnvProviderName
}
regionKeys := regionEnvKeys
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config b/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config
deleted file mode 100644
index e41fe213779..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config
+++ /dev/null
@@ -1,60 +0,0 @@
-[default]
-s3 =
- unsupported_key=123
- other_unsupported=abc
-
-region = default_region
-
-[profile alt_profile_name]
-region = alt_profile_name_region
-
-[short_profile_name_first]
-region = short_profile_name_first_short
-
-[profile short_profile_name_first]
-region = short_profile_name_first_alt
-
-[partial_creds]
-aws_access_key_id = partial_creds_akid
-
-[complete_creds]
-aws_access_key_id = complete_creds_akid
-aws_secret_access_key = complete_creds_secret
-
-[complete_creds_with_token]
-aws_access_key_id = complete_creds_with_token_akid
-aws_secret_access_key = complete_creds_with_token_secret
-aws_session_token = complete_creds_with_token_token
-
-[full_profile]
-aws_access_key_id = full_profile_akid
-aws_secret_access_key = full_profile_secret
-region = full_profile_region
-
-[config_file_load_order]
-region = shared_config_region
-aws_access_key_id = shared_config_akid
-aws_secret_access_key = shared_config_secret
-
-[partial_assume_role]
-role_arn = partial_assume_role_role_arn
-
-[assume_role]
-role_arn = assume_role_role_arn
-source_profile = complete_creds
-
-[assume_role_invalid_source_profile]
-role_arn = assume_role_invalid_source_profile_role_arn
-source_profile = profile_not_exists
-
-[assume_role_w_creds]
-role_arn = assume_role_w_creds_role_arn
-source_profile = assume_role_w_creds
-external_id = 1234
-role_session_name = assume_role_w_creds_session_name
-aws_access_key_id = assume_role_w_creds_akid
-aws_secret_access_key = assume_role_w_creds_secret
-
-[assume_role_wo_creds]
-role_arn = assume_role_wo_creds_role_arn
-source_profile = assume_role_wo_creds
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config_invalid_ini b/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config_invalid_ini
deleted file mode 100644
index 4db038952af..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config_invalid_ini
+++ /dev/null
@@ -1 +0,0 @@
-[profile_nam
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config_other b/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config_other
deleted file mode 100644
index 615831b1afa..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config_other
+++ /dev/null
@@ -1,17 +0,0 @@
-[default]
-region = default_region
-
-[partial_creds]
-aws_access_key_id = AKID
-
-[profile alt_profile_name]
-region = alt_profile_name_region
-
-[creds_from_credentials]
-aws_access_key_id = creds_from_config_akid
-aws_secret_access_key = creds_from_config_secret
-
-[config_file_load_order]
-region = shared_config_other_region
-aws_access_key_id = shared_config_other_akid
-aws_secret_access_key = shared_config_other_secret
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go
index d68905acbb1..ccc88b4ac1c 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go
@@ -268,7 +268,7 @@ type signingCtx struct {
// "X-Amz-Content-Sha256" header with a precomputed value. The signer will
// only compute the hash if the request header value is empty.
func (v4 Signer) Sign(r *http.Request, body io.ReadSeeker, service, region string, signTime time.Time) (http.Header, error) {
- return v4.signWithBody(r, body, service, region, 0, signTime)
+ return v4.signWithBody(r, body, service, region, 0, false, signTime)
}
// Presign signs AWS v4 requests with the provided body, service name, region
@@ -302,10 +302,10 @@ func (v4 Signer) Sign(r *http.Request, body io.ReadSeeker, service, region strin
// presigned request's signature you can set the "X-Amz-Content-Sha256"
// HTTP header and that will be included in the request's signature.
func (v4 Signer) Presign(r *http.Request, body io.ReadSeeker, service, region string, exp time.Duration, signTime time.Time) (http.Header, error) {
- return v4.signWithBody(r, body, service, region, exp, signTime)
+ return v4.signWithBody(r, body, service, region, exp, true, signTime)
}
-func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, region string, exp time.Duration, signTime time.Time) (http.Header, error) {
+func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, region string, exp time.Duration, isPresign bool, signTime time.Time) (http.Header, error) {
currentTimeFn := v4.currentTimeFn
if currentTimeFn == nil {
currentTimeFn = time.Now
@@ -317,7 +317,7 @@ func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, regi
Query: r.URL.Query(),
Time: signTime,
ExpireTime: exp,
- isPresign: exp != 0,
+ isPresign: isPresign,
ServiceName: service,
Region: region,
DisableURIPathEscaping: v4.DisableURIPathEscaping,
@@ -339,6 +339,7 @@ func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, regi
return http.Header{}, err
}
+ ctx.sanitizeHostForHeader()
ctx.assignAmzQueryValues()
ctx.build(v4.DisableHeaderHoisting)
@@ -363,6 +364,10 @@ func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, regi
return ctx.SignedHeaderVals, nil
}
+func (ctx *signingCtx) sanitizeHostForHeader() {
+ request.SanitizeHostForHeader(ctx.Request)
+}
+
func (ctx *signingCtx) handlePresignRemoval() {
if !ctx.isPresign {
return
@@ -467,7 +472,7 @@ func signSDKRequestWithCurrTime(req *request.Request, curTimeFn func() time.Time
}
signedHeaders, err := v4.signWithBody(req.HTTPRequest, req.GetBody(),
- name, region, req.ExpireTime, signingTime,
+ name, region, req.ExpireTime, req.ExpireTime > 0, signingTime,
)
if err != nil {
req.Error = err
@@ -502,6 +507,8 @@ func (ctx *signingCtx) build(disableHeaderHoisting bool) {
ctx.buildTime() // no depends
ctx.buildCredentialString() // no depends
+ ctx.buildBodyDigest()
+
unsignedHeaders := ctx.Request.Header
if ctx.isPresign {
if !disableHeaderHoisting {
@@ -513,7 +520,6 @@ func (ctx *signingCtx) build(disableHeaderHoisting bool) {
}
}
- ctx.buildBodyDigest()
ctx.buildCanonicalHeaders(ignoredHeaders, unsignedHeaders)
ctx.buildCanonicalString() // depends on canon headers / signed headers
ctx.buildStringToSign() // depends on canon string
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go
index 971b08bcd06..3dc39005d2b 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/version.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go
@@ -5,4 +5,4 @@ package aws
const SDKName = "aws-sdk-go"
// SDKVersion is the version of this SDK
-const SDKVersion = "1.10.18"
+const SDKVersion = "1.12.65"
diff --git a/vendor/github.com/aws/aws-sdk-go/doc.go b/vendor/github.com/aws/aws-sdk-go/doc.go
index 3e077e51da9..32b806a4a2d 100644
--- a/vendor/github.com/aws/aws-sdk-go/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go/doc.go
@@ -197,7 +197,7 @@
// regions different from the Session's region.
//
// svc := s3.New(sess, &aws.Config{
-// Region: aws.String(ednpoints.UsWest2RegionID),
+// Region: aws.String(endpoints.UsWest2RegionID),
// })
//
// See the Config type in the aws package for more information and additional
diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/api.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/api.go
deleted file mode 100644
index 46e54f859b3..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/model/api/api.go
+++ /dev/null
@@ -1,800 +0,0 @@
-// +build codegen
-
-// Package api represents API abstractions for rendering service generated files.
-package api
-
-import (
- "bytes"
- "encoding/json"
- "fmt"
- "io/ioutil"
- "path"
- "path/filepath"
- "regexp"
- "sort"
- "strings"
- "text/template"
-)
-
-// An API defines a service API's definition. and logic to serialize the definition.
-type API struct {
- Metadata Metadata
- Operations map[string]*Operation
- Shapes map[string]*Shape
- Waiters []Waiter
- Documentation string
- Examples Examples
-
- // Set to true to avoid removing unused shapes
- NoRemoveUnusedShapes bool
-
- // Set to true to avoid renaming to 'Input/Output' postfixed shapes
- NoRenameToplevelShapes bool
-
- // Set to true to ignore service/request init methods (for testing)
- NoInitMethods bool
-
- // Set to true to ignore String() and GoString methods (for generated tests)
- NoStringerMethods bool
-
- // Set to true to not generate API service name constants
- NoConstServiceNames bool
-
- // Set to true to not generate validation shapes
- NoValidataShapeMethods bool
-
- // Set to true to not generate struct field accessors
- NoGenStructFieldAccessors bool
-
- SvcClientImportPath string
-
- initialized bool
- imports map[string]bool
- name string
- path string
-
- BaseCrosslinkURL string
-}
-
-// A Metadata is the metadata about an API's definition.
-type Metadata struct {
- APIVersion string
- EndpointPrefix string
- SigningName string
- ServiceAbbreviation string
- ServiceFullName string
- SignatureVersion string
- JSONVersion string
- TargetPrefix string
- Protocol string
- UID string
- EndpointsID string
-
- NoResolveEndpoint bool
-}
-
-var serviceAliases map[string]string
-
-func Bootstrap() error {
- b, err := ioutil.ReadFile(filepath.Join("..", "models", "customizations", "service-aliases.json"))
- if err != nil {
- return err
- }
-
- return json.Unmarshal(b, &serviceAliases)
-}
-
-// PackageName name of the API package
-func (a *API) PackageName() string {
- return strings.ToLower(a.StructName())
-}
-
-// InterfacePackageName returns the package name for the interface.
-func (a *API) InterfacePackageName() string {
- return a.PackageName() + "iface"
-}
-
-var nameRegex = regexp.MustCompile(`^Amazon|AWS\s*|\(.*|\s+|\W+`)
-
-// StructName returns the struct name for a given API.
-func (a *API) StructName() string {
- if a.name == "" {
- name := a.Metadata.ServiceAbbreviation
- if name == "" {
- name = a.Metadata.ServiceFullName
- }
-
- name = nameRegex.ReplaceAllString(name, "")
-
- a.name = name
- if name, ok := serviceAliases[strings.ToLower(name)]; ok {
- a.name = name
- }
- }
- return a.name
-}
-
-// UseInitMethods returns if the service's init method should be rendered.
-func (a *API) UseInitMethods() bool {
- return !a.NoInitMethods
-}
-
-// NiceName returns the human friendly API name.
-func (a *API) NiceName() string {
- if a.Metadata.ServiceAbbreviation != "" {
- return a.Metadata.ServiceAbbreviation
- }
- return a.Metadata.ServiceFullName
-}
-
-// ProtocolPackage returns the package name of the protocol this API uses.
-func (a *API) ProtocolPackage() string {
- switch a.Metadata.Protocol {
- case "json":
- return "jsonrpc"
- case "ec2":
- return "ec2query"
- default:
- return strings.Replace(a.Metadata.Protocol, "-", "", -1)
- }
-}
-
-// OperationNames returns a slice of API operations supported.
-func (a *API) OperationNames() []string {
- i, names := 0, make([]string, len(a.Operations))
- for n := range a.Operations {
- names[i] = n
- i++
- }
- sort.Strings(names)
- return names
-}
-
-// OperationList returns a slice of API operation pointers
-func (a *API) OperationList() []*Operation {
- list := make([]*Operation, len(a.Operations))
- for i, n := range a.OperationNames() {
- list[i] = a.Operations[n]
- }
- return list
-}
-
-// OperationHasOutputPlaceholder returns if any of the API operation input
-// or output shapes are place holders.
-func (a *API) OperationHasOutputPlaceholder() bool {
- for _, op := range a.Operations {
- if op.OutputRef.Shape.Placeholder {
- return true
- }
- }
- return false
-}
-
-// ShapeNames returns a slice of names for each shape used by the API.
-func (a *API) ShapeNames() []string {
- i, names := 0, make([]string, len(a.Shapes))
- for n := range a.Shapes {
- names[i] = n
- i++
- }
- sort.Strings(names)
- return names
-}
-
-// ShapeList returns a slice of shape pointers used by the API.
-//
-// Will exclude error shapes from the list of shapes returned.
-func (a *API) ShapeList() []*Shape {
- list := make([]*Shape, 0, len(a.Shapes))
- for _, n := range a.ShapeNames() {
- // Ignore error shapes in list
- if s := a.Shapes[n]; !s.IsError {
- list = append(list, s)
- }
- }
- return list
-}
-
-// ShapeListErrors returns a list of the errors defined by the API model
-func (a *API) ShapeListErrors() []*Shape {
- list := []*Shape{}
- for _, n := range a.ShapeNames() {
- // Ignore error shapes in list
- if s := a.Shapes[n]; s.IsError {
- list = append(list, s)
- }
- }
- return list
-}
-
-// resetImports resets the import map to default values.
-func (a *API) resetImports() {
- a.imports = map[string]bool{
- "github.com/aws/aws-sdk-go/aws": true,
- }
-}
-
-// importsGoCode returns the generated Go import code.
-func (a *API) importsGoCode() string {
- if len(a.imports) == 0 {
- return ""
- }
-
- corePkgs, extPkgs := []string{}, []string{}
- for i := range a.imports {
- if strings.Contains(i, ".") {
- extPkgs = append(extPkgs, i)
- } else {
- corePkgs = append(corePkgs, i)
- }
- }
- sort.Strings(corePkgs)
- sort.Strings(extPkgs)
-
- code := "import (\n"
- for _, i := range corePkgs {
- code += fmt.Sprintf("\t%q\n", i)
- }
- if len(corePkgs) > 0 {
- code += "\n"
- }
- for _, i := range extPkgs {
- code += fmt.Sprintf("\t%q\n", i)
- }
- code += ")\n\n"
- return code
-}
-
-// A tplAPI is the top level template for the API
-var tplAPI = template.Must(template.New("api").Parse(`
-{{ range $_, $o := .OperationList }}
-{{ $o.GoCode }}
-
-{{ end }}
-
-{{ range $_, $s := .ShapeList }}
-{{ if and $s.IsInternal (eq $s.Type "structure") }}{{ $s.GoCode }}{{ end }}
-
-{{ end }}
-
-{{ range $_, $s := .ShapeList }}
-{{ if $s.IsEnum }}{{ $s.GoCode }}{{ end }}
-
-{{ end }}
-`))
-
-// APIGoCode renders the API in Go code. Returning it as a string
-func (a *API) APIGoCode() string {
- a.resetImports()
- a.imports["github.com/aws/aws-sdk-go/aws/awsutil"] = true
- a.imports["github.com/aws/aws-sdk-go/aws/request"] = true
- if a.OperationHasOutputPlaceholder() {
- a.imports["github.com/aws/aws-sdk-go/private/protocol/"+a.ProtocolPackage()] = true
- a.imports["github.com/aws/aws-sdk-go/private/protocol"] = true
- }
-
- for _, op := range a.Operations {
- if op.AuthType == "none" {
- a.imports["github.com/aws/aws-sdk-go/aws/credentials"] = true
- break
- }
- }
-
- var buf bytes.Buffer
- err := tplAPI.Execute(&buf, a)
- if err != nil {
- panic(err)
- }
-
- code := a.importsGoCode() + strings.TrimSpace(buf.String())
- return code
-}
-
-var noCrossLinkServices = map[string]struct{}{
- "apigateway": struct{}{},
- "budgets": struct{}{},
- "cloudsearch": struct{}{},
- "cloudsearchdomain": struct{}{},
- "discovery": struct{}{},
- "elastictranscoder": struct{}{},
- "es": struct{}{},
- "glacier": struct{}{},
- "importexport": struct{}{},
- "iot": struct{}{},
- "iot-data": struct{}{},
- "lambda": struct{}{},
- "machinelearning": struct{}{},
- "rekognition": struct{}{},
- "sdb": struct{}{},
- "swf": struct{}{},
-}
-
-func GetCrosslinkURL(baseURL, name, uid string, params ...string) string {
- _, ok := noCrossLinkServices[strings.ToLower(name)]
- if uid != "" && baseURL != "" && !ok {
- return strings.Join(append([]string{baseURL, "goto", "WebAPI", uid}, params...), "/")
- }
- return ""
-}
-
-func (a *API) APIName() string {
- return a.name
-}
-
-var tplServiceDoc = template.Must(template.New("service docs").Funcs(template.FuncMap{
- "GetCrosslinkURL": GetCrosslinkURL,
-}).
- Parse(`
-// Package {{ .PackageName }} provides the client and types for making API
-// requests to {{ .Metadata.ServiceFullName }}.
-{{ if .Documentation -}}
-//
-{{ .Documentation }}
-{{ end -}}
-{{ $crosslinkURL := GetCrosslinkURL $.BaseCrosslinkURL $.APIName $.Metadata.UID -}}
-{{ if $crosslinkURL -}}
-//
-// See {{ $crosslinkURL }} for more information on this service.
-{{ end -}}
-//
-// See {{ .PackageName }} package documentation for more information.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/{{ .PackageName }}/
-//
-// Using the Client
-//
-// To use the client for {{ .Metadata.ServiceFullName }} you will first need
-// to create a new instance of it.
-//
-// When creating a client for an AWS service you'll first need to have a Session
-// already created. The Session provides configuration that can be shared
-// between multiple service clients. Additional configuration can be applied to
-// the Session and service's client when they are constructed. The aws package's
-// Config type contains several fields such as Region for the AWS Region the
-// client should make API requests too. The optional Config value can be provided
-// as the variadic argument for Sessions and client creation.
-//
-// Once the service's client is created you can use it to make API requests the
-// AWS service. These clients are safe to use concurrently.
-//
-// // Create a session to share configuration, and load external configuration.
-// sess := session.Must(session.NewSession())
-//
-// // Create the service's client with the session.
-// svc := {{ .PackageName }}.New(sess)
-//
-// See the SDK's documentation for more information on how to use service clients.
-// https://docs.aws.amazon.com/sdk-for-go/api/
-//
-// See aws package's Config type for more information on configuration options.
-// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
-//
-// See the {{ .Metadata.ServiceFullName }} client {{ .StructName }} for more
-// information on creating the service's client.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/{{ .PackageName }}/#New
-//
-{{ $opts := .OperationNames -}}
-{{ $optName := index $opts 0 -}}
-{{ $opt := index .Operations $optName -}}
-{{ $optInputName := $opt.InputRef.GoTypeWithPkgName -}}
-// Once the client is created you can make an API request to the service.
-// Each API method takes a input parameter, and returns the service response
-// and an error.
-//
-// The API method will document which error codes the service can be returned
-// by the operation if the service models the API operation's errors. These
-// errors will also be available as const strings prefixed with "ErrCode".
-//
-// result, err := svc.{{ $opt.ExportedName }}(params)
-// if err != nil {
-// // Cast err to awserr.Error to handle specific error codes.
-// aerr, ok := err.(awserr.Error)
-// if ok && aerr.Code() == {
-// // Specific error code handling
-// }
-// return err
-// }
-//
-// fmt.Println("{{ $optName }} result:")
-// fmt.Println(result)
-//
-// Using the Client with Context
-//
-// The service's client also provides methods to make API requests with a Context
-// value. This allows you to control the timeout, and cancellation of pending
-// requests. These methods also take request Option as variadic parameter to apply
-// additional configuration to the API request.
-//
-// ctx := context.Background()
-//
-// result, err := svc.{{ $opt.ExportedName }}WithContext(ctx, params)
-//
-// See the request package documentation for more information on using Context pattern
-// with the SDK.
-// https://docs.aws.amazon.com/sdk-for-go/api/aws/request/
-`))
-
-// A tplService defines the template for the service generated code.
-var tplService = template.Must(template.New("service").Funcs(template.FuncMap{
- "ServiceNameValue": func(a *API) string {
- if a.NoConstServiceNames {
- return fmt.Sprintf("%q", a.Metadata.EndpointPrefix)
- }
- return "ServiceName"
- },
- "EndpointsIDConstValue": func(a *API) string {
- if a.NoConstServiceNames {
- return fmt.Sprintf("%q", a.Metadata.EndpointPrefix)
- }
- if a.Metadata.EndpointPrefix == a.Metadata.EndpointsID {
- return "ServiceName"
- }
- return fmt.Sprintf("%q", a.Metadata.EndpointsID)
- },
- "EndpointsIDValue": func(a *API) string {
- if a.NoConstServiceNames {
- return fmt.Sprintf("%q", a.Metadata.EndpointPrefix)
- }
-
- return "EndpointsID"
- },
-}).Parse(`
-// {{ .StructName }} provides the API operation methods for making requests to
-// {{ .Metadata.ServiceFullName }}. See this package's package overview docs
-// for details on the service.
-//
-// {{ .StructName }} methods are safe to use concurrently. It is not safe to
-// modify mutate any of the struct's properties though.
-type {{ .StructName }} struct {
- *client.Client
-}
-
-{{ if .UseInitMethods }}// Used for custom client initialization logic
-var initClient func(*client.Client)
-
-// Used for custom request initialization logic
-var initRequest func(*request.Request)
-{{ end }}
-
-
-{{ if not .NoConstServiceNames -}}
-// Service information constants
-const (
- ServiceName = "{{ .Metadata.EndpointPrefix }}" // Service endpoint prefix API calls made to.
- EndpointsID = {{ EndpointsIDConstValue . }} // Service ID for Regions and Endpoints metadata.
-)
-{{- end }}
-
-// New creates a new instance of the {{ .StructName }} client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// // Create a {{ .StructName }} client from just a session.
-// svc := {{ .PackageName }}.New(mySession)
-//
-// // Create a {{ .StructName }} client with additional configuration
-// svc := {{ .PackageName }}.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func New(p client.ConfigProvider, cfgs ...*aws.Config) *{{ .StructName }} {
- {{ if .Metadata.NoResolveEndpoint -}}
- var c client.Config
- if v, ok := p.(client.ConfigNoResolveEndpointProvider); ok {
- c = v.ClientConfigNoResolveEndpoint(cfgs...)
- } else {
- c = p.ClientConfig({{ EndpointsIDValue . }}, cfgs...)
- }
- {{- else -}}
- c := p.ClientConfig({{ EndpointsIDValue . }}, cfgs...)
- {{- end }}
- return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *{{ .StructName }} {
- {{- if .Metadata.SigningName }}
- if len(signingName) == 0 {
- signingName = "{{ .Metadata.SigningName }}"
- }
- {{- end }}
- svc := &{{ .StructName }}{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: {{ ServiceNameValue . }},
- SigningName: signingName,
- SigningRegion: signingRegion,
- Endpoint: endpoint,
- APIVersion: "{{ .Metadata.APIVersion }}",
- {{ if .Metadata.JSONVersion -}}
- JSONVersion: "{{ .Metadata.JSONVersion }}",
- {{- end }}
- {{ if .Metadata.TargetPrefix -}}
- TargetPrefix: "{{ .Metadata.TargetPrefix }}",
- {{- end }}
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBackNamed({{if eq .Metadata.SignatureVersion "v2"}}v2{{else}}v4{{end}}.SignRequestHandler)
- {{- if eq .Metadata.SignatureVersion "v2" }}
- svc.Handlers.Sign.PushBackNamed(corehandlers.BuildContentLengthHandler)
- {{- end }}
- svc.Handlers.Build.PushBackNamed({{ .ProtocolPackage }}.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed({{ .ProtocolPackage }}.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed({{ .ProtocolPackage }}.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed({{ .ProtocolPackage }}.UnmarshalErrorHandler)
-
- {{ if .UseInitMethods }}// Run custom client initialization if present
- if initClient != nil {
- initClient(svc.Client)
- }
- {{ end }}
-
- return svc
-}
-
-// newRequest creates a new request for a {{ .StructName }} operation and runs any
-// custom request initialization.
-func (c *{{ .StructName }}) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- {{ if .UseInitMethods }}// Run custom request initialization if present
- if initRequest != nil {
- initRequest(req)
- }
- {{ end }}
-
- return req
-}
-`))
-
-// ServicePackageDoc generates the contents of the doc file for the service.
-//
-// Will also read in the custom doc templates for the service if found.
-func (a *API) ServicePackageDoc() string {
- a.imports = map[string]bool{}
-
- var buf bytes.Buffer
- if err := tplServiceDoc.Execute(&buf, a); err != nil {
- panic(err)
- }
-
- return buf.String()
-}
-
-// ServiceGoCode renders service go code. Returning it as a string.
-func (a *API) ServiceGoCode() string {
- a.resetImports()
- a.imports["github.com/aws/aws-sdk-go/aws/client"] = true
- a.imports["github.com/aws/aws-sdk-go/aws/client/metadata"] = true
- a.imports["github.com/aws/aws-sdk-go/aws/request"] = true
- if a.Metadata.SignatureVersion == "v2" {
- a.imports["github.com/aws/aws-sdk-go/private/signer/v2"] = true
- a.imports["github.com/aws/aws-sdk-go/aws/corehandlers"] = true
- } else {
- a.imports["github.com/aws/aws-sdk-go/aws/signer/v4"] = true
- }
- a.imports["github.com/aws/aws-sdk-go/private/protocol/"+a.ProtocolPackage()] = true
-
- var buf bytes.Buffer
- err := tplService.Execute(&buf, a)
- if err != nil {
- panic(err)
- }
-
- code := a.importsGoCode() + buf.String()
- return code
-}
-
-// ExampleGoCode renders service example code. Returning it as a string.
-func (a *API) ExampleGoCode() string {
- exs := []string{}
- imports := map[string]bool{}
- for _, o := range a.OperationList() {
- o.imports = map[string]bool{}
- exs = append(exs, o.Example())
- for k, v := range o.imports {
- imports[k] = v
- }
- }
-
- code := fmt.Sprintf("import (\n%q\n%q\n%q\n\n%q\n%q\n%q\n",
- "bytes",
- "fmt",
- "time",
- "github.com/aws/aws-sdk-go/aws",
- "github.com/aws/aws-sdk-go/aws/session",
- path.Join(a.SvcClientImportPath, a.PackageName()),
- )
- for k, _ := range imports {
- code += fmt.Sprintf("%q\n", k)
- }
- code += ")\n\n"
- code += "var _ time.Duration\nvar _ bytes.Buffer\n\n"
- code += strings.Join(exs, "\n\n")
- return code
-}
-
-// A tplInterface defines the template for the service interface type.
-var tplInterface = template.Must(template.New("interface").Parse(`
-// {{ .StructName }}API provides an interface to enable mocking the
-// {{ .PackageName }}.{{ .StructName }} service client's API operation,
-// paginators, and waiters. This make unit testing your code that calls out
-// to the SDK's service client's calls easier.
-//
-// The best way to use this interface is so the SDK's service client's calls
-// can be stubbed out for unit testing your code with the SDK without needing
-// to inject custom request handlers into the the SDK's request pipeline.
-//
-// // myFunc uses an SDK service client to make a request to
-// // {{.Metadata.ServiceFullName}}. {{ $opts := .OperationList }}{{ $opt := index $opts 0 }}
-// func myFunc(svc {{ .InterfacePackageName }}.{{ .StructName }}API) bool {
-// // Make svc.{{ $opt.ExportedName }} request
-// }
-//
-// func main() {
-// sess := session.New()
-// svc := {{ .PackageName }}.New(sess)
-//
-// myFunc(svc)
-// }
-//
-// In your _test.go file:
-//
-// // Define a mock struct to be used in your unit tests of myFunc.
-// type mock{{ .StructName }}Client struct {
-// {{ .InterfacePackageName }}.{{ .StructName }}API
-// }
-// func (m *mock{{ .StructName }}Client) {{ $opt.ExportedName }}(input {{ $opt.InputRef.GoTypeWithPkgName }}) ({{ $opt.OutputRef.GoTypeWithPkgName }}, error) {
-// // mock response/functionality
-// }
-//
-// func TestMyFunc(t *testing.T) {
-// // Setup Test
-// mockSvc := &mock{{ .StructName }}Client{}
-//
-// myfunc(mockSvc)
-//
-// // Verify myFunc's functionality
-// }
-//
-// It is important to note that this interface will have breaking changes
-// when the service model is updated and adds new API operations, paginators,
-// and waiters. Its suggested to use the pattern above for testing, or using
-// tooling to generate mocks to satisfy the interfaces.
-type {{ .StructName }}API interface {
- {{ range $_, $o := .OperationList }}
- {{ $o.InterfaceSignature }}
- {{ end }}
- {{ range $_, $w := .Waiters }}
- {{ $w.InterfaceSignature }}
- {{ end }}
-}
-
-var _ {{ .StructName }}API = (*{{ .PackageName }}.{{ .StructName }})(nil)
-`))
-
-// InterfaceGoCode returns the go code for the service's API operations as an
-// interface{}. Assumes that the interface is being created in a different
-// package than the service API's package.
-func (a *API) InterfaceGoCode() string {
- a.resetImports()
- a.imports = map[string]bool{
- "github.com/aws/aws-sdk-go/aws": true,
- "github.com/aws/aws-sdk-go/aws/request": true,
- path.Join(a.SvcClientImportPath, a.PackageName()): true,
- }
-
- var buf bytes.Buffer
- err := tplInterface.Execute(&buf, a)
-
- if err != nil {
- panic(err)
- }
-
- code := a.importsGoCode() + strings.TrimSpace(buf.String())
- return code
-}
-
-// NewAPIGoCodeWithPkgName returns a string of instantiating the API prefixed
-// with its package name. Takes a string depicting the Config.
-func (a *API) NewAPIGoCodeWithPkgName(cfg string) string {
- return fmt.Sprintf("%s.New(%s)", a.PackageName(), cfg)
-}
-
-// computes the validation chain for all input shapes
-func (a *API) addShapeValidations() {
- for _, o := range a.Operations {
- resolveShapeValidations(o.InputRef.Shape)
- }
-}
-
-// Updates the source shape and all nested shapes with the validations that
-// could possibly be needed.
-func resolveShapeValidations(s *Shape, ancestry ...*Shape) {
- for _, a := range ancestry {
- if a == s {
- return
- }
- }
-
- children := []string{}
- for _, name := range s.MemberNames() {
- ref := s.MemberRefs[name]
-
- if s.IsRequired(name) && !s.Validations.Has(ref, ShapeValidationRequired) {
- s.Validations = append(s.Validations, ShapeValidation{
- Name: name, Ref: ref, Type: ShapeValidationRequired,
- })
- }
-
- if ref.Shape.Min != 0 && !s.Validations.Has(ref, ShapeValidationMinVal) {
- s.Validations = append(s.Validations, ShapeValidation{
- Name: name, Ref: ref, Type: ShapeValidationMinVal,
- })
- }
-
- switch ref.Shape.Type {
- case "map", "list", "structure":
- children = append(children, name)
- }
- }
-
- ancestry = append(ancestry, s)
- for _, name := range children {
- ref := s.MemberRefs[name]
- // Since this is a grab bag we will just continue since
- // we can't validate because we don't know the valued shape.
- if ref.JSONValue {
- continue
- }
-
- nestedShape := ref.Shape.NestedShape()
-
- var v *ShapeValidation
- if len(nestedShape.Validations) > 0 {
- v = &ShapeValidation{
- Name: name, Ref: ref, Type: ShapeValidationNested,
- }
- } else {
- resolveShapeValidations(nestedShape, ancestry...)
- if len(nestedShape.Validations) > 0 {
- v = &ShapeValidation{
- Name: name, Ref: ref, Type: ShapeValidationNested,
- }
- }
- }
-
- if v != nil && !s.Validations.Has(v.Ref, v.Type) {
- s.Validations = append(s.Validations, *v)
- }
- }
- ancestry = ancestry[:len(ancestry)-1]
-}
-
-// A tplAPIErrors is the top level template for the API
-var tplAPIErrors = template.Must(template.New("api").Parse(`
-const (
-{{ range $_, $s := $.ShapeListErrors }}
- // {{ $s.ErrorCodeName }} for service response error code
- // {{ printf "%q" $s.ErrorName }}.
- {{ if $s.Docstring -}}
- //
- {{ $s.Docstring }}
- {{ end -}}
- {{ $s.ErrorCodeName }} = {{ printf "%q" $s.ErrorName }}
-{{ end }}
-)
-`))
-
-func (a *API) APIErrorsGoCode() string {
- var buf bytes.Buffer
- err := tplAPIErrors.Execute(&buf, a)
-
- if err != nil {
- panic(err)
- }
-
- return strings.TrimSpace(buf.String())
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/customization_passes.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/customization_passes.go
deleted file mode 100644
index 9a441a3163f..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/model/api/customization_passes.go
+++ /dev/null
@@ -1,172 +0,0 @@
-// +build codegen
-
-package api
-
-import (
- "io/ioutil"
- "path/filepath"
- "strings"
-)
-
-type service struct {
- srcName string
- dstName string
-
- serviceVersion string
-}
-
-var mergeServices = map[string]service{
- "dynamodbstreams": service{
- dstName: "dynamodb",
- srcName: "streams.dynamodb",
- },
- "wafregional": service{
- dstName: "waf",
- srcName: "waf-regional",
- serviceVersion: "2015-08-24",
- },
-}
-
-// customizationPasses Executes customization logic for the API by package name.
-func (a *API) customizationPasses() {
- var svcCustomizations = map[string]func(*API){
- "s3": s3Customizations,
- "cloudfront": cloudfrontCustomizations,
- "rds": rdsCustomizations,
-
- // Disable endpoint resolving for services that require customer
- // to provide endpoint them selves.
- "cloudsearchdomain": disableEndpointResolving,
- "iotdataplane": disableEndpointResolving,
- }
-
- for k, _ := range mergeServices {
- svcCustomizations[k] = mergeServicesCustomizations
- }
-
- if fn := svcCustomizations[a.PackageName()]; fn != nil {
- fn(a)
- }
-}
-
-// s3Customizations customizes the API generation to replace values specific to S3.
-func s3Customizations(a *API) {
- var strExpires *Shape
-
- for name, s := range a.Shapes {
- // Remove ContentMD5 members
- if _, ok := s.MemberRefs["ContentMD5"]; ok {
- delete(s.MemberRefs, "ContentMD5")
- }
-
- for _, refName := range []string{"Bucket", "SSECustomerKey", "CopySourceSSECustomerKey"} {
- if ref, ok := s.MemberRefs[refName]; ok {
- ref.GenerateGetter = true
- }
- }
-
- // Expires should be a string not time.Time since the format is not
- // enforced by S3, and any value can be set to this field outside of the SDK.
- if strings.HasSuffix(name, "Output") {
- if ref, ok := s.MemberRefs["Expires"]; ok {
- if strExpires == nil {
- newShape := *ref.Shape
- strExpires = &newShape
- strExpires.Type = "string"
- strExpires.refs = []*ShapeRef{}
- }
- ref.Shape.removeRef(ref)
- ref.Shape = strExpires
- ref.Shape.refs = append(ref.Shape.refs, &s.MemberRef)
- }
- }
- }
- s3CustRemoveHeadObjectModeledErrors(a)
-}
-
-// S3 HeadObject API call incorrect models NoSuchKey as valid
-// error code that can be returned. This operation does not
-// return error codes, all error codes are derived from HTTP
-// status codes.
-//
-// aws/aws-sdk-go#1208
-func s3CustRemoveHeadObjectModeledErrors(a *API) {
- op, ok := a.Operations["HeadObject"]
- if !ok {
- return
- }
- op.Documentation += `
-//
-// See http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses
-// for more information on returned errors.`
- op.ErrorRefs = []ShapeRef{}
-}
-
-// cloudfrontCustomizations customized the API generation to replace values
-// specific to CloudFront.
-func cloudfrontCustomizations(a *API) {
- // MaxItems members should always be integers
- for _, s := range a.Shapes {
- if ref, ok := s.MemberRefs["MaxItems"]; ok {
- ref.ShapeName = "Integer"
- ref.Shape = a.Shapes["Integer"]
- }
- }
-}
-
-// mergeServicesCustomizations references any duplicate shapes from DynamoDB
-func mergeServicesCustomizations(a *API) {
- info := mergeServices[a.PackageName()]
-
- p := strings.Replace(a.path, info.srcName, info.dstName, -1)
-
- if info.serviceVersion != "" {
- index := strings.LastIndex(p, "/")
- files, _ := ioutil.ReadDir(p[:index])
- if len(files) > 1 {
- panic("New version was introduced")
- }
- p = p[:index] + "/" + info.serviceVersion
- }
-
- file := filepath.Join(p, "api-2.json")
-
- serviceAPI := API{}
- serviceAPI.Attach(file)
- serviceAPI.Setup()
-
- for n := range a.Shapes {
- if _, ok := serviceAPI.Shapes[n]; ok {
- a.Shapes[n].resolvePkg = "github.com/aws/aws-sdk-go/service/" + info.dstName
- }
- }
-}
-
-// rdsCustomizations are customization for the service/rds. This adds non-modeled fields used for presigning.
-func rdsCustomizations(a *API) {
- inputs := []string{
- "CopyDBSnapshotInput",
- "CreateDBInstanceReadReplicaInput",
- "CopyDBClusterSnapshotInput",
- "CreateDBClusterInput",
- }
- for _, input := range inputs {
- if ref, ok := a.Shapes[input]; ok {
- ref.MemberRefs["SourceRegion"] = &ShapeRef{
- Documentation: docstring(`SourceRegion is the source region where the resource exists. This is not sent over the wire and is only used for presigning. This value should always have the same region as the source ARN.`),
- ShapeName: "String",
- Shape: a.Shapes["String"],
- Ignore: true,
- }
- ref.MemberRefs["DestinationRegion"] = &ShapeRef{
- Documentation: docstring(`DestinationRegion is used for presigning the request to a given region.`),
- ShapeName: "String",
- Shape: a.Shapes["String"],
- }
- }
- }
-}
-
-func disableEndpointResolving(a *API) {
- a.Metadata.NoResolveEndpoint = true
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/docstring.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/docstring.go
deleted file mode 100644
index ae0c692b1ac..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/model/api/docstring.go
+++ /dev/null
@@ -1,411 +0,0 @@
-// +build codegen
-
-package api
-
-import (
- "bytes"
- "encoding/json"
- "fmt"
- "html"
- "os"
- "regexp"
- "strings"
-
- xhtml "golang.org/x/net/html"
-)
-
-type apiDocumentation struct {
- *API
- Operations map[string]string
- Service string
- Shapes map[string]shapeDocumentation
-}
-
-type shapeDocumentation struct {
- Base string
- Refs map[string]string
-}
-
-// AttachDocs attaches documentation from a JSON filename.
-func (a *API) AttachDocs(filename string) {
- d := apiDocumentation{API: a}
-
- f, err := os.Open(filename)
- defer f.Close()
- if err != nil {
- panic(err)
- }
- err = json.NewDecoder(f).Decode(&d)
- if err != nil {
- panic(err)
- }
-
- d.setup()
-
-}
-
-func (d *apiDocumentation) setup() {
- d.API.Documentation = docstring(d.Service)
-
- for op, doc := range d.Operations {
- d.API.Operations[op].Documentation = docstring(doc)
- }
-
- for shape, info := range d.Shapes {
- if sh := d.API.Shapes[shape]; sh != nil {
- sh.Documentation = docstring(info.Base)
- }
-
- for ref, doc := range info.Refs {
- if doc == "" {
- continue
- }
-
- parts := strings.Split(ref, "$")
- if len(parts) != 2 {
- fmt.Fprintf(os.Stderr, "Shape Doc %s has unexpected reference format, %q\n", shape, ref)
- continue
- }
- if sh := d.API.Shapes[parts[0]]; sh != nil {
- if m := sh.MemberRefs[parts[1]]; m != nil {
- m.Documentation = docstring(doc)
- }
- }
- }
- }
-}
-
-var reNewline = regexp.MustCompile(`\r?\n`)
-var reMultiSpace = regexp.MustCompile(`\s+`)
-var reComments = regexp.MustCompile(``)
-var reFullnameBlock = regexp.MustCompile(`(.+?)<\/fullname>`)
-var reFullname = regexp.MustCompile(`(.*?)`)
-var reExamples = regexp.MustCompile(`.+?<\/examples?>`)
-var reEndNL = regexp.MustCompile(`\n+$`)
-
-// docstring rewrites a string to insert godocs formatting.
-func docstring(doc string) string {
- doc = strings.TrimSpace(doc)
- if doc == "" {
- return ""
- }
-
- doc = reNewline.ReplaceAllString(doc, "")
- doc = reMultiSpace.ReplaceAllString(doc, " ")
- doc = reComments.ReplaceAllString(doc, "")
-
- var fullname string
- parts := reFullnameBlock.FindStringSubmatch(doc)
- if len(parts) > 1 {
- fullname = parts[1]
- }
- // Remove full name block from doc string
- doc = reFullname.ReplaceAllString(doc, "")
-
- doc = reExamples.ReplaceAllString(doc, "")
- doc = generateDoc(doc)
- doc = reEndNL.ReplaceAllString(doc, "")
- doc = html.UnescapeString(doc)
-
- // Replace doc with full name if doc is empty.
- doc = strings.TrimSpace(doc)
- if len(doc) == 0 {
- doc = fullname
- }
-
- return commentify(doc)
-}
-
-const (
- indent = " "
-)
-
-// style is what we want to prefix a string with.
-// For instance, FooBar, will generate
-// * Foo
-// * Bar
-var style = map[string]string{
- "ul": indent + "* ",
- "li": indent + "* ",
- "code": indent,
- "pre": indent,
-}
-
-// commentify converts a string to a Go comment
-func commentify(doc string) string {
- if len(doc) == 0 {
- return ""
- }
-
- lines := strings.Split(doc, "\n")
- out := make([]string, 0, len(lines))
- for i := 0; i < len(lines); i++ {
- line := lines[i]
-
- if i > 0 && line == "" && lines[i-1] == "" {
- continue
- }
- out = append(out, line)
- }
-
- if len(out) > 0 {
- out[0] = "// " + out[0]
- return strings.Join(out, "\n// ")
- }
- return ""
-}
-
-// wrap returns a rewritten version of text to have line breaks
-// at approximately length characters. Line breaks will only be
-// inserted into whitespace.
-func wrap(text string, length int, isIndented bool) string {
- var buf bytes.Buffer
- var last rune
- var lastNL bool
- var col int
-
- for _, c := range text {
- switch c {
- case '\r': // ignore this
- continue // and also don't track `last`
- case '\n': // ignore this too, but reset col
- if col >= length || last == '\n' {
- buf.WriteString("\n")
- }
- buf.WriteString("\n")
- col = 0
- case ' ', '\t': // opportunity to split
- if col >= length {
- buf.WriteByte('\n')
- col = 0
- if isIndented {
- buf.WriteString(indent)
- col += 3
- }
- } else {
- // We only want to write a leading space if the col is greater than zero.
- // This will provide the proper spacing for documentation.
- buf.WriteRune(c)
- col++ // count column
- }
- default:
- buf.WriteRune(c)
- col++
- }
- lastNL = c == '\n'
- _ = lastNL
- last = c
- }
- return buf.String()
-}
-
-type tagInfo struct {
- tag string
- key string
- val string
- txt string
- raw string
- closingTag bool
-}
-
-// generateDoc will generate the proper doc string for html encoded or plain text doc entries.
-func generateDoc(htmlSrc string) string {
- tokenizer := xhtml.NewTokenizer(strings.NewReader(htmlSrc))
- tokens := buildTokenArray(tokenizer)
- scopes := findScopes(tokens)
- return walk(scopes)
-}
-
-func buildTokenArray(tokenizer *xhtml.Tokenizer) []tagInfo {
- tokens := []tagInfo{}
- for tt := tokenizer.Next(); tt != xhtml.ErrorToken; tt = tokenizer.Next() {
- switch tt {
- case xhtml.TextToken:
- txt := string(tokenizer.Text())
- if len(tokens) == 0 {
- info := tagInfo{
- raw: txt,
- }
- tokens = append(tokens, info)
- }
- tn, _ := tokenizer.TagName()
- key, val, _ := tokenizer.TagAttr()
- info := tagInfo{
- tag: string(tn),
- key: string(key),
- val: string(val),
- txt: txt,
- }
- tokens = append(tokens, info)
- case xhtml.StartTagToken:
- tn, _ := tokenizer.TagName()
- key, val, _ := tokenizer.TagAttr()
- info := tagInfo{
- tag: string(tn),
- key: string(key),
- val: string(val),
- }
- tokens = append(tokens, info)
- case xhtml.SelfClosingTagToken, xhtml.EndTagToken:
- tn, _ := tokenizer.TagName()
- key, val, _ := tokenizer.TagAttr()
- info := tagInfo{
- tag: string(tn),
- key: string(key),
- val: string(val),
- closingTag: true,
- }
- tokens = append(tokens, info)
- }
- }
- return tokens
-}
-
-// walk is used to traverse each scoped block. These scoped
-// blocks will act as blocked text where we do most of our
-// text manipulation.
-func walk(scopes [][]tagInfo) string {
- doc := ""
- // Documentation will be chunked by scopes.
- // Meaning, for each scope will be divided by one or more newlines.
- for _, scope := range scopes {
- indentStr, isIndented := priorityIndentation(scope)
- block := ""
- href := ""
- after := false
- level := 0
- lastTag := ""
- for _, token := range scope {
- if token.closingTag {
- endl := closeTag(token, level)
- block += endl
- level--
- lastTag = ""
- } else if token.txt == "" {
- if token.val != "" {
- href, after = formatText(token, "")
- }
- if level == 1 && isIndented {
- block += indentStr
- }
- level++
- lastTag = token.tag
- } else {
- if token.txt != " " {
- str, _ := formatText(token, lastTag)
- block += str
- if after {
- block += href
- after = false
- }
- } else {
- fmt.Println(token.tag)
- str, _ := formatText(tagInfo{}, lastTag)
- block += str
- }
- }
- }
- if !isIndented {
- block = strings.TrimPrefix(block, " ")
- }
- block = wrap(block, 72, isIndented)
- doc += block
- }
- return doc
-}
-
-// closeTag will divide up the blocks of documentation to be formated properly.
-func closeTag(token tagInfo, level int) string {
- switch token.tag {
- case "pre", "li", "div":
- return "\n"
- case "p", "h1", "h2", "h3", "h4", "h5", "h6":
- return "\n\n"
- case "code":
- // indented code is only at the 0th level.
- if level == 0 {
- return "\n"
- }
- }
- return ""
-}
-
-// formatText will format any sort of text based off of a tag. It will also return
-// a boolean to add the string after the text token.
-func formatText(token tagInfo, lastTag string) (string, bool) {
- switch token.tag {
- case "a":
- if token.val != "" {
- return fmt.Sprintf(" (%s)", token.val), true
- }
- }
-
- // We don't care about a single space nor no text.
- if len(token.txt) == 0 || token.txt == " " {
- return "", false
- }
-
- // Here we want to indent code blocks that are newlines
- if lastTag == "code" {
- // Greater than one, because we don't care about newlines in the beginning
- block := ""
- if lines := strings.Split(token.txt, "\n"); len(lines) > 1 {
- for _, line := range lines {
- block += indent + line
- }
- block += "\n"
- return block, false
- }
- }
- return token.txt, false
-}
-
-// This is a parser to check what type of indention is needed.
-func priorityIndentation(blocks []tagInfo) (string, bool) {
- if len(blocks) == 0 {
- return "", false
- }
-
- v, ok := style[blocks[0].tag]
- return v, ok
-}
-
-// Divides into scopes based off levels.
-// For instance,
-// Testing123
-// This has 2 scopes, the and
-func findScopes(tokens []tagInfo) [][]tagInfo {
- level := 0
- scope := []tagInfo{}
- scopes := [][]tagInfo{}
- for _, token := range tokens {
- // we will clear empty tagged tokens from the array
- txt := strings.TrimSpace(token.txt)
- tag := strings.TrimSpace(token.tag)
- if len(txt) == 0 && len(tag) == 0 {
- continue
- }
-
- scope = append(scope, token)
-
- // If it is a closing tag then we check what level
- // we are on. If it is 0, then that means we have found a
- // scoped block.
- if token.closingTag {
- level--
- if level == 0 {
- scopes = append(scopes, scope)
- scope = []tagInfo{}
- }
- // Check opening tags and increment the level
- } else if token.txt == "" {
- level++
- }
- }
- // In this case, we did not run into a closing tag. This would mean
- // we have plaintext for documentation.
- if len(scopes) == 0 {
- scopes = append(scopes, scope)
- }
- return scopes
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/example.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/example.go
deleted file mode 100644
index ad790399076..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/model/api/example.go
+++ /dev/null
@@ -1,318 +0,0 @@
-// +build codegen
-
-package api
-
-import (
- "bytes"
- "encoding/json"
- "fmt"
- "os"
- "sort"
- "strings"
- "text/template"
-
- "github.com/aws/aws-sdk-go/private/util"
-)
-
-type Examples map[string][]Example
-
-// ExamplesDefinition is the structural representation of the examples-1.json file
-type ExamplesDefinition struct {
- *API `json:"-"`
- Examples Examples `json:"examples"`
-}
-
-// Example is a single entry within the examples-1.json file.
-type Example struct {
- API *API `json:"-"`
- Operation *Operation `json:"-"`
- OperationName string `json:"-"`
- Index string `json:"-"`
- Builder examplesBuilder `json:"-"`
- VisitedErrors map[string]struct{} `json:"-"`
- Title string `json:"title"`
- Description string `json:"description"`
- ID string `json:"id"`
- Comments Comments `json:"comments"`
- Input map[string]interface{} `json:"input"`
- Output map[string]interface{} `json:"output"`
-}
-
-type Comments struct {
- Input map[string]interface{} `json:"input"`
- Output map[string]interface{} `json:"output"`
-}
-
-var exampleFuncMap = template.FuncMap{
- "commentify": commentify,
- "wrap": wrap,
- "generateExampleInput": generateExampleInput,
- "generateTypes": generateTypes,
-}
-
-var exampleCustomizations = map[string]template.FuncMap{}
-
-var exampleTmpls = template.Must(template.New("example").Funcs(exampleFuncMap).Parse(`
-{{ generateTypes . }}
-{{ commentify (wrap .Title 80 false) }}
-//
-{{ commentify (wrap .Description 80 false) }}
-func Example{{ .API.StructName }}_{{ .MethodName }}() {
- svc := {{ .API.PackageName }}.New(session.New())
- input := &{{ .Operation.InputRef.Shape.GoTypeWithPkgNameElem }} {
- {{ generateExampleInput . -}}
- }
-
- result, err := svc.{{ .OperationName }}(input)
- if err != nil {
- if aerr, ok := err.(awserr.Error); ok {
- switch aerr.Code() {
- {{ range $_, $ref := .Operation.ErrorRefs -}}
- {{ if not ($.HasVisitedError $ref) -}}
- case {{ .API.PackageName }}.{{ $ref.Shape.ErrorCodeName }}:
- fmt.Println({{ .API.PackageName }}.{{ $ref.Shape.ErrorCodeName }}, aerr.Error())
- {{ end -}}
- {{ end -}}
- default:
- fmt.Println(aerr.Error())
- }
- } else {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- }
- return
- }
-
- fmt.Println(result)
-}
-`))
-
-// Names will return the name of the example. This will also be the name of the operation
-// that is to be tested.
-func (exs Examples) Names() []string {
- names := make([]string, 0, len(exs))
- for k := range exs {
- names = append(names, k)
- }
-
- sort.Strings(names)
- return names
-}
-
-func (exs Examples) GoCode() string {
- buf := bytes.NewBuffer(nil)
- for _, opName := range exs.Names() {
- examples := exs[opName]
- for _, ex := range examples {
- buf.WriteString(util.GoFmt(ex.GoCode()))
- buf.WriteString("\n")
- }
- }
- return buf.String()
-}
-
-// ExampleCode will generate the example code for the given Example shape.
-// TODO: Can delete
-func (ex Example) GoCode() string {
- var buf bytes.Buffer
- m := exampleFuncMap
- if fMap, ok := exampleCustomizations[ex.API.PackageName()]; ok {
- m = fMap
- }
- tmpl := exampleTmpls.Funcs(m)
- if err := tmpl.ExecuteTemplate(&buf, "example", &ex); err != nil {
- panic(err)
- }
-
- return strings.TrimSpace(buf.String())
-}
-
-func generateExampleInput(ex Example) string {
- if ex.Operation.HasInput() {
- return ex.Builder.BuildShape(&ex.Operation.InputRef, ex.Input, false)
- }
- return ""
-}
-
-// generateTypes will generate no types for default examples, but customizations may
-// require their own defined types.
-func generateTypes(ex Example) string {
- return ""
-}
-
-// correctType will cast the value to the correct type when printing the string.
-// This is due to the json decoder choosing numbers to be floats, but the shape may
-// actually be an int. To counter this, we pass the shape's type and properly do the
-// casting here.
-func correctType(memName string, t string, value interface{}) string {
- if value == nil {
- return ""
- }
-
- v := ""
- switch value.(type) {
- case string:
- v = value.(string)
- case int:
- v = fmt.Sprintf("%d", value.(int))
- case float64:
- if t == "integer" || t == "long" || t == "int64" {
- v = fmt.Sprintf("%d", int(value.(float64)))
- } else {
- v = fmt.Sprintf("%f", value.(float64))
- }
- case bool:
- v = fmt.Sprintf("%t", value.(bool))
- }
-
- return convertToCorrectType(memName, t, v)
-}
-
-func convertToCorrectType(memName, t, v string) string {
- return fmt.Sprintf("%s: %s,\n", memName, getValue(t, v))
-}
-
-func getValue(t, v string) string {
- if t[0] == '*' {
- t = t[1:]
- }
- switch t {
- case "string":
- return fmt.Sprintf("aws.String(%q)", v)
- case "integer", "long", "int64":
- return fmt.Sprintf("aws.Int64(%s)", v)
- case "float", "float64", "double":
- return fmt.Sprintf("aws.Float64(%s)", v)
- case "boolean":
- return fmt.Sprintf("aws.Bool(%s)", v)
- default:
- panic("Unsupported type: " + t)
- }
-}
-
-// AttachExamples will create a new ExamplesDefinition from the examples file
-// and reference the API object.
-func (a *API) AttachExamples(filename string) {
- p := ExamplesDefinition{API: a}
-
- f, err := os.Open(filename)
- defer f.Close()
- if err != nil {
- panic(err)
- }
- err = json.NewDecoder(f).Decode(&p)
- if err != nil {
- panic(err)
- }
-
- p.setup()
-}
-
-var examplesBuilderCustomizations = map[string]examplesBuilder{
- "wafregional": wafregionalExamplesBuilder{},
-}
-
-func (p *ExamplesDefinition) setup() {
- var builder examplesBuilder
- ok := false
- if builder, ok = examplesBuilderCustomizations[p.API.PackageName()]; !ok {
- builder = defaultExamplesBuilder{}
- }
-
- keys := p.Examples.Names()
- for _, n := range keys {
- examples := p.Examples[n]
- for i, e := range examples {
- n = p.ExportableName(n)
- e.OperationName = n
- e.API = p.API
- e.Index = fmt.Sprintf("shared%02d", i)
-
- e.Builder = builder
-
- e.VisitedErrors = map[string]struct{}{}
- op := p.API.Operations[e.OperationName]
- e.OperationName = p.ExportableName(e.OperationName)
- e.Operation = op
- p.Examples[n][i] = e
- }
- }
-
- p.API.Examples = p.Examples
-}
-
-var exampleHeader = template.Must(template.New("exampleHeader").Parse(`
-import (
- {{ .Builder.Imports .API }}
-)
-
-var _ time.Duration
-var _ strings.Reader
-var _ aws.Config
-
-func parseTime(layout, value string) *time.Time {
- t, err := time.Parse(layout, value)
- if err != nil {
- panic(err)
- }
- return &t
-}
-
-`))
-
-type exHeader struct {
- Builder examplesBuilder
- API *API
-}
-
-// ExamplesGoCode will return a code representation of the entry within the
-// examples.json file.
-func (a *API) ExamplesGoCode() string {
- var buf bytes.Buffer
- var builder examplesBuilder
- ok := false
- if builder, ok = examplesBuilderCustomizations[a.PackageName()]; !ok {
- builder = defaultExamplesBuilder{}
- }
-
- if err := exampleHeader.ExecuteTemplate(&buf, "exampleHeader", &exHeader{builder, a}); err != nil {
- panic(err)
- }
-
- code := a.Examples.GoCode()
- if len(code) == 0 {
- return ""
- }
-
- buf.WriteString(code)
- return buf.String()
-}
-
-// TODO: In the operation docuentation where we list errors, this needs to be done
-// there as well.
-func (ex *Example) HasVisitedError(errRef *ShapeRef) bool {
- errName := errRef.Shape.ErrorCodeName()
- _, ok := ex.VisitedErrors[errName]
- ex.VisitedErrors[errName] = struct{}{}
- return ok
-}
-
-func parseTimeString(ref *ShapeRef, memName, v string) string {
- if ref.Location == "header" {
- return fmt.Sprintf("%s: parseTime(%q, %q),\n", memName, "Mon, 2 Jan 2006 15:04:05 GMT", v)
- } else {
- switch ref.API.Metadata.Protocol {
- case "json", "rest-json":
- return fmt.Sprintf("%s: parseTime(%q, %q),\n", memName, "2006-01-02T15:04:05Z", v)
- case "rest-xml", "ec2", "query":
- return fmt.Sprintf("%s: parseTime(%q, %q),\n", memName, "2006-01-02T15:04:05Z", v)
- default:
- panic("Unsupported time type: " + ref.API.Metadata.Protocol)
- }
- }
-}
-
-func (ex *Example) MethodName() string {
- return fmt.Sprintf("%s_%s", ex.OperationName, ex.Index)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/examples_builder.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/examples_builder.go
deleted file mode 100644
index eece69c806d..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/model/api/examples_builder.go
+++ /dev/null
@@ -1,256 +0,0 @@
-// +build codegen
-
-package api
-
-import (
- "bytes"
- "fmt"
- "reflect"
- "sort"
- "strings"
-)
-
-type examplesBuilder interface {
- BuildShape(*ShapeRef, map[string]interface{}, bool) string
- BuildList(string, string, *ShapeRef, []interface{}) string
- BuildComplex(string, string, *ShapeRef, map[string]interface{}) string
- Imports(*API) string
-}
-
-type defaultExamplesBuilder struct{}
-
-// BuildShape will recursively build the referenced shape based on the json object
-// provided.
-// isMap will dictate how the field name is specified. If isMap is true, we will expect
-// the member name to be quotes like "Foo".
-func (builder defaultExamplesBuilder) BuildShape(ref *ShapeRef, shapes map[string]interface{}, isMap bool) string {
- order := make([]string, len(shapes))
- for k := range shapes {
- order = append(order, k)
- }
- sort.Strings(order)
-
- ret := ""
- for _, name := range order {
- if name == "" {
- continue
- }
- shape := shapes[name]
-
- // If the shape isn't a map, we want to export the value, since every field
- // defined in our shapes are exported.
- if len(name) > 0 && !isMap && strings.ToLower(name[0:1]) == name[0:1] {
- name = strings.Title(name)
- }
-
- memName := name
- if isMap {
- memName = fmt.Sprintf("%q", memName)
- }
-
- switch v := shape.(type) {
- case map[string]interface{}:
- ret += builder.BuildComplex(name, memName, ref, v)
- case []interface{}:
- ret += builder.BuildList(name, memName, ref, v)
- default:
- ret += builder.BuildScalar(name, memName, ref, v)
- }
- }
- return ret
-}
-
-// BuildList will construct a list shape based off the service's definition
-// of that list.
-func (builder defaultExamplesBuilder) BuildList(name, memName string, ref *ShapeRef, v []interface{}) string {
- ret := ""
-
- if len(v) == 0 || ref == nil {
- return ""
- }
-
- t := ""
- dataType := ""
- format := ""
- isComplex := false
- passRef := ref
- isMap := false
-
- if ref.Shape.MemberRefs[name] != nil {
- t = builder.GoType(&ref.Shape.MemberRefs[name].Shape.MemberRef, false)
- dataType = ref.Shape.MemberRefs[name].Shape.MemberRef.Shape.Type
- passRef = ref.Shape.MemberRefs[name]
- if dataType == "map" {
- t = fmt.Sprintf("map[string]%s", builder.GoType(&ref.Shape.MemberRefs[name].Shape.MemberRef.Shape.ValueRef, false))
- passRef = &ref.Shape.MemberRefs[name].Shape.MemberRef.Shape.ValueRef
- isMap = true
- }
- } else if ref.Shape.MemberRef.Shape != nil && ref.Shape.MemberRef.Shape.MemberRefs[name] != nil {
- t = builder.GoType(&ref.Shape.MemberRef.Shape.MemberRefs[name].Shape.MemberRef, false)
- dataType = ref.Shape.MemberRef.Shape.MemberRefs[name].Shape.MemberRef.Shape.Type
- passRef = &ref.Shape.MemberRef.Shape.MemberRefs[name].Shape.MemberRef
- } else {
- t = builder.GoType(&ref.Shape.MemberRef, false)
- dataType = ref.Shape.MemberRef.Shape.Type
- passRef = &ref.Shape.MemberRef
- }
-
- switch v[0].(type) {
- case string:
- format = "%s"
- case bool:
- format = "%t"
- case float64:
- if dataType == "integer" || dataType == "int64" {
- format = "%d"
- } else {
- format = "%f"
- }
- default:
- if ref.Shape.MemberRefs[name] != nil {
- } else {
- passRef = ref.Shape.MemberRef.Shape.MemberRefs[name]
-
- // if passRef is nil that means we are either in a map or within a nested array
- if passRef == nil {
- passRef = &ref.Shape.MemberRef
- }
- }
- isComplex = true
- }
- ret += fmt.Sprintf("%s: []%s {\n", memName, t)
- for _, elem := range v {
- if isComplex {
- ret += fmt.Sprintf("{\n%s\n},\n", builder.BuildShape(passRef, elem.(map[string]interface{}), isMap))
- } else {
- if dataType == "integer" || dataType == "int64" || dataType == "long" {
- elem = int(elem.(float64))
- }
- ret += fmt.Sprintf("%s,\n", getValue(t, fmt.Sprintf(format, elem)))
- }
- }
- ret += "},\n"
- return ret
-}
-
-// BuildScalar will build atomic Go types.
-func (builder defaultExamplesBuilder) BuildScalar(name, memName string, ref *ShapeRef, shape interface{}) string {
- if ref == nil || ref.Shape == nil {
- return ""
- } else if ref.Shape.MemberRefs[name] == nil {
- if ref.Shape.MemberRef.Shape != nil && ref.Shape.MemberRef.Shape.MemberRefs[name] != nil {
- return correctType(memName, ref.Shape.MemberRef.Shape.MemberRefs[name].Shape.Type, shape)
- }
- if ref.Shape.Type != "structure" && ref.Shape.Type != "map" {
- return correctType(memName, ref.Shape.Type, shape)
- }
- return ""
- }
-
- switch v := shape.(type) {
- case bool:
- return convertToCorrectType(memName, ref.Shape.MemberRefs[name].Shape.Type, fmt.Sprintf("%t", v))
- case int:
- if ref.Shape.MemberRefs[name].Shape.Type == "timestamp" {
- return parseTimeString(ref, memName, fmt.Sprintf("%d", v))
- }
- return convertToCorrectType(memName, ref.Shape.MemberRefs[name].Shape.Type, fmt.Sprintf("%d", v))
- case float64:
- dataType := ref.Shape.MemberRefs[name].Shape.Type
- if dataType == "integer" || dataType == "int64" || dataType == "long" {
- return convertToCorrectType(memName, ref.Shape.MemberRefs[name].Shape.Type, fmt.Sprintf("%d", int(shape.(float64))))
- }
- return convertToCorrectType(memName, ref.Shape.MemberRefs[name].Shape.Type, fmt.Sprintf("%f", v))
- case string:
- t := ref.Shape.MemberRefs[name].Shape.Type
- switch t {
- case "timestamp":
- return parseTimeString(ref, memName, fmt.Sprintf("%s", v))
- case "blob":
- if (ref.Shape.MemberRefs[name].Streaming || ref.Shape.MemberRefs[name].Shape.Streaming) && ref.Shape.Payload == name {
- return fmt.Sprintf("%s: aws.ReadSeekCloser(strings.NewReader(%q)),\n", memName, v)
- }
-
- return fmt.Sprintf("%s: []byte(%q),\n", memName, v)
- default:
- return convertToCorrectType(memName, t, v)
- }
- default:
- panic(fmt.Errorf("Unsupported scalar type: %v", reflect.TypeOf(v)))
- }
- return ""
-}
-
-func (builder defaultExamplesBuilder) BuildComplex(name, memName string, ref *ShapeRef, v map[string]interface{}) string {
- t := ""
- if ref == nil {
- return builder.BuildShape(nil, v, true)
- }
-
- member := ref.Shape.MemberRefs[name]
-
- if member != nil && member.Shape != nil {
- t = ref.Shape.MemberRefs[name].Shape.Type
- } else {
- t = ref.Shape.Type
- }
-
- switch t {
- case "structure":
- passRef := ref.Shape.MemberRefs[name]
- // passRef will be nil if the entry is a map. In that case
- // we want to pass the reference, because the previous call
- // passed the value reference.
- if passRef == nil {
- passRef = ref
- }
- return fmt.Sprintf(`%s: &%s{
- %s
- },
- `, memName, builder.GoType(passRef, true), builder.BuildShape(passRef, v, false))
- case "map":
- return fmt.Sprintf(`%s: %s{
- %s
- },
- `, name, builder.GoType(ref.Shape.MemberRefs[name], false), builder.BuildShape(&ref.Shape.MemberRefs[name].Shape.ValueRef, v, true))
- }
-
- return ""
-}
-
-func (builder defaultExamplesBuilder) GoType(ref *ShapeRef, elem bool) string {
- prefix := ""
- if ref.Shape.Type == "list" {
- ref = &ref.Shape.MemberRef
- prefix = "[]*"
- }
-
- name := ref.GoTypeWithPkgName()
- if elem {
- name = ref.GoTypeElem()
- if !strings.Contains(name, ".") {
- name = strings.Join([]string{ref.API.PackageName(), name}, ".")
- }
- }
-
- if ref.Shape.Type != "structure" && ref.Shape.Type != "list" {
- return name
- }
-
- return prefix + name
-}
-
-func (builder defaultExamplesBuilder) Imports(a *API) string {
- buf := bytes.NewBuffer(nil)
- buf.WriteString(`"fmt"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/session"
- `)
-
- buf.WriteString(fmt.Sprintf("\"%s/%s\"", "github.com/aws/aws-sdk-go/service", a.PackageName()))
- return buf.String()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/examples_builder_customizations.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/examples_builder_customizations.go
deleted file mode 100644
index 058e999cb1f..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/model/api/examples_builder_customizations.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// +build codegen
-
-package api
-
-import (
- "bytes"
- "fmt"
-)
-
-type wafregionalExamplesBuilder struct {
- defaultExamplesBuilder
-}
-
-func (builder wafregionalExamplesBuilder) Imports(a *API) string {
- buf := bytes.NewBuffer(nil)
- buf.WriteString(`"fmt"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/session"
- "github.com/aws/aws-sdk-go/service/waf"
- `)
-
- buf.WriteString(fmt.Sprintf("\"%s/%s\"", "github.com/aws/aws-sdk-go/service", a.PackageName()))
- return buf.String()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/exportable_name.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/exportable_name.go
deleted file mode 100644
index 124e9008ea7..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/model/api/exportable_name.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// +build codegen
-
-package api
-
-import "strings"
-
-// ExportableName a name which is exportable as a value or name in Go code
-func (a *API) ExportableName(name string) string {
- if name == "" {
- return name
- }
-
- return strings.ToUpper(name[0:1]) + name[1:]
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/list_of_shame.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/list_of_shame.go
deleted file mode 100644
index 08ba24257b8..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/model/api/list_of_shame.go
+++ /dev/null
@@ -1,495 +0,0 @@
-package api
-
-// shamelist is used to not rename certain operation's input and output shapes.
-// We need to maintain backwards compatibility with pre-existing services. Since
-// not generating unique input/output shapes is not desired, we will generate
-// unique input/output shapes for new operations.
-var shamelist = map[string]map[string]struct {
- input bool
- output bool
-}{
- "APIGateway": {
- "CreateApiKey": {
- output: true,
- },
- "CreateAuthorizer": {
- output: true,
- },
- "CreateBasePathMapping": {
- output: true,
- },
- "CreateDeployment": {
- output: true,
- },
- "CreateDocumentationPart": {
- output: true,
- },
- "CreateDocumentationVersion": {
- output: true,
- },
- "CreateDomainName": {
- output: true,
- },
- "CreateModel": {
- output: true,
- },
- "CreateResource": {
- output: true,
- },
- "CreateRestApi": {
- output: true,
- },
- "CreateStage": {
- output: true,
- },
- "CreateUsagePlan": {
- output: true,
- },
- "CreateUsagePlanKey": {
- output: true,
- },
- "GenerateClientCertificate": {
- output: true,
- },
- "GetAccount": {
- output: true,
- },
- "GetApiKey": {
- output: true,
- },
- "GetAuthorizer": {
- output: true,
- },
- "GetBasePathMapping": {
- output: true,
- },
- "GetClientCertificate": {
- output: true,
- },
- "GetDeployment": {
- output: true,
- },
- "GetDocumentationPart": {
- output: true,
- },
- "GetDocumentationVersion": {
- output: true,
- },
- "GetDomainName": {
- output: true,
- },
- "GetIntegration": {
- output: true,
- },
- "GetIntegrationResponse": {
- output: true,
- },
- "GetMethod": {
- output: true,
- },
- "GetMethodResponse": {
- output: true,
- },
- "GetModel": {
- output: true,
- },
- "GetResource": {
- output: true,
- },
- "GetRestApi": {
- output: true,
- },
- "GetSdkType": {
- output: true,
- },
- "GetStage": {
- output: true,
- },
- "GetUsage": {
- output: true,
- },
- "GetUsagePlan": {
- output: true,
- },
- "GetUsagePlanKey": {
- output: true,
- },
- "ImportRestApi": {
- output: true,
- },
- "PutIntegration": {
- output: true,
- },
- "PutIntegrationResponse": {
- output: true,
- },
- "PutMethod": {
- output: true,
- },
- "PutMethodResponse": {
- output: true,
- },
- "PutRestApi": {
- output: true,
- },
- "UpdateAccount": {
- output: true,
- },
- "UpdateApiKey": {
- output: true,
- },
- "UpdateAuthorizer": {
- output: true,
- },
- "UpdateBasePathMapping": {
- output: true,
- },
- "UpdateClientCertificate": {
- output: true,
- },
- "UpdateDeployment": {
- output: true,
- },
- "UpdateDocumentationPart": {
- output: true,
- },
- "UpdateDocumentationVersion": {
- output: true,
- },
- "UpdateDomainName": {
- output: true,
- },
- "UpdateIntegration": {
- output: true,
- },
- "UpdateIntegrationResponse": {
- output: true,
- },
- "UpdateMethod": {
- output: true,
- },
- "UpdateMethodResponse": {
- output: true,
- },
- "UpdateModel": {
- output: true,
- },
- "UpdateResource": {
- output: true,
- },
- "UpdateRestApi": {
- output: true,
- },
- "UpdateStage": {
- output: true,
- },
- "UpdateUsage": {
- output: true,
- },
- "UpdateUsagePlan": {
- output: true,
- },
- },
- "AutoScaling": {
- "ResumeProcesses": {
- input: true,
- },
- "SuspendProcesses": {
- input: true,
- },
- },
- "CognitoIdentity": {
- "CreateIdentityPool": {
- output: true,
- },
- "DescribeIdentity": {
- output: true,
- },
- "DescribeIdentityPool": {
- output: true,
- },
- "UpdateIdentityPool": {
- input: true,
- output: true,
- },
- },
- "DirectConnect": {
- "AllocateConnectionOnInterconnect": {
- output: true,
- },
- "AllocateHostedConnection": {
- output: true,
- },
- "AllocatePrivateVirtualInterface": {
- output: true,
- },
- "AllocatePublicVirtualInterface": {
- output: true,
- },
- "AssociateConnectionWithLag": {
- output: true,
- },
- "AssociateHostedConnection": {
- output: true,
- },
- "AssociateVirtualInterface": {
- output: true,
- },
- "CreateConnection": {
- output: true,
- },
- "CreateInterconnect": {
- output: true,
- },
- "CreateLag": {
- output: true,
- },
- "CreatePrivateVirtualInterface": {
- output: true,
- },
- "CreatePublicVirtualInterface": {
- output: true,
- },
- "DeleteConnection": {
- output: true,
- },
- "DeleteLag": {
- output: true,
- },
- "DescribeConnections": {
- output: true,
- },
- "DescribeConnectionsOnInterconnect": {
- output: true,
- },
- "DescribeHostedConnections": {
- output: true,
- },
- "DescribeLoa": {
- output: true,
- },
- "DisassociateConnectionFromLag": {
- output: true,
- },
- "UpdateLag": {
- output: true,
- },
- },
- "EC2": {
- "AttachVolume": {
- output: true,
- },
- "CreateSnapshot": {
- output: true,
- },
- "CreateVolume": {
- output: true,
- },
- "DetachVolume": {
- output: true,
- },
- "RunInstances": {
- output: true,
- },
- },
- "EFS": {
- "CreateFileSystem": {
- output: true,
- },
- "CreateMountTarget": {
- output: true,
- },
- },
- "ElastiCache": {
- "AddTagsToResource": {
- output: true,
- },
- "ListTagsForResource": {
- output: true,
- },
- "ModifyCacheParameterGroup": {
- output: true,
- },
- "RemoveTagsFromResource": {
- output: true,
- },
- "ResetCacheParameterGroup": {
- output: true,
- },
- },
- "ElasticBeanstalk": {
- "ComposeEnvironments": {
- output: true,
- },
- "CreateApplication": {
- output: true,
- },
- "CreateApplicationVersion": {
- output: true,
- },
- "CreateConfigurationTemplate": {
- output: true,
- },
- "CreateEnvironment": {
- output: true,
- },
- "DescribeEnvironments": {
- output: true,
- },
- "TerminateEnvironment": {
- output: true,
- },
- "UpdateApplication": {
- output: true,
- },
- "UpdateApplicationVersion": {
- output: true,
- },
- "UpdateConfigurationTemplate": {
- output: true,
- },
- "UpdateEnvironment": {
- output: true,
- },
- },
- "Glacier": {
- "DescribeJob": {
- output: true,
- },
- "UploadArchive": {
- output: true,
- },
- "CompleteMultipartUpload": {
- output: true,
- },
- },
- "IAM": {
- "GetContextKeysForCustomPolicy": {
- output: true,
- },
- "GetContextKeysForPrincipalPolicy": {
- output: true,
- },
- "SimulateCustomPolicy": {
- output: true,
- },
- "SimulatePrincipalPolicy": {
- output: true,
- },
- },
- "Kinesis": {
- "DisableEnhancedMonitoring": {
- output: true,
- },
- "EnableEnhancedMonitoring": {
- output: true,
- },
- },
- "KMS": {
- "ListGrants": {
- output: true,
- },
- "ListRetirableGrants": {
- output: true,
- },
- },
- "Lambda": {
- "CreateAlias": {
- output: true,
- },
- "CreateEventSourceMapping": {
- output: true,
- },
- "CreateFunction": {
- output: true,
- },
- "DeleteEventSourceMapping": {
- output: true,
- },
- "GetAlias": {
- output: true,
- },
- "GetEventSourceMapping": {
- output: true,
- },
- "GetFunctionConfiguration": {
- output: true,
- },
- "PublishVersion": {
- output: true,
- },
- "UpdateAlias": {
- output: true,
- },
- "UpdateEventSourceMapping": {
- output: true,
- },
- "UpdateFunctionCode": {
- output: true,
- },
- "UpdateFunctionConfiguration": {
- output: true,
- },
- },
- "RDS": {
- "ModifyDBClusterParameterGroup": {
- output: true,
- },
- "ModifyDBParameterGroup": {
- output: true,
- },
- "ResetDBClusterParameterGroup": {
- output: true,
- },
- "ResetDBParameterGroup": {
- output: true,
- },
- },
- "Redshift": {
- "DescribeLoggingStatus": {
- output: true,
- },
- "DisableLogging": {
- output: true,
- },
- "EnableLogging": {
- output: true,
- },
- "ModifyClusterParameterGroup": {
- output: true,
- },
- "ResetClusterParameterGroup": {
- output: true,
- },
- },
- "S3": {
- "GetBucketNotification": {
- input: true,
- output: true,
- },
- "GetBucketNotificationConfiguration": {
- input: true,
- output: true,
- },
- },
- "SWF": {
- "CountClosedWorkflowExecutions": {
- output: true,
- },
- "CountOpenWorkflowExecutions": {
- output: true,
- },
- "CountPendingActivityTasks": {
- output: true,
- },
- "CountPendingDecisionTasks": {
- output: true,
- },
- "ListClosedWorkflowExecutions": {
- output: true,
- },
- "ListOpenWorkflowExecutions": {
- output: true,
- },
- },
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/load.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/load.go
deleted file mode 100644
index 5f3b9e20b63..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/model/api/load.go
+++ /dev/null
@@ -1,74 +0,0 @@
-// +build codegen
-
-package api
-
-import (
- "encoding/json"
- "fmt"
- "os"
- "path/filepath"
-)
-
-// Load takes a set of files for each filetype and returns an API pointer.
-// The API will be initialized once all files have been loaded and parsed.
-//
-// Will panic if any failure opening the definition JSON files, or there
-// are unrecognized exported names.
-func Load(api, docs, paginators, waiters string) *API {
- a := API{}
- a.Attach(api)
- a.Attach(docs)
- a.Attach(paginators)
- a.Attach(waiters)
- a.Setup()
- return &a
-}
-
-// Attach opens a file by name, and unmarshal its JSON data.
-// Will proceed to setup the API if not already done so.
-func (a *API) Attach(filename string) {
- a.path = filepath.Dir(filename)
- f, err := os.Open(filename)
- defer f.Close()
- if err != nil {
- panic(err)
- }
- if err := json.NewDecoder(f).Decode(a); err != nil {
- panic(fmt.Errorf("failed to decode %s, err: %v", filename, err))
- }
-}
-
-// AttachString will unmarshal a raw JSON string, and setup the
-// API if not already done so.
-func (a *API) AttachString(str string) {
- json.Unmarshal([]byte(str), a)
-
- if !a.initialized {
- a.Setup()
- }
-}
-
-// Setup initializes the API.
-func (a *API) Setup() {
- a.setMetadataEndpointsKey()
- a.writeShapeNames()
- a.resolveReferences()
- a.fixStutterNames()
- a.renameExportable()
- if !a.NoRenameToplevelShapes {
- a.renameToplevelShapes()
- }
- a.updateTopLevelShapeReferences()
- a.createInputOutputShapes()
- a.customizationPasses()
-
- if !a.NoRemoveUnusedShapes {
- a.removeUnusedShapes()
- }
-
- if !a.NoValidataShapeMethods {
- a.addShapeValidations()
- }
-
- a.initialized = true
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/operation.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/operation.go
deleted file mode 100644
index 749b6e781fe..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/model/api/operation.go
+++ /dev/null
@@ -1,493 +0,0 @@
-// +build codegen
-
-package api
-
-import (
- "bytes"
- "fmt"
- "regexp"
- "sort"
- "strings"
- "text/template"
-)
-
-// An Operation defines a specific API Operation.
-type Operation struct {
- API *API `json:"-"`
- ExportedName string
- Name string
- Documentation string
- HTTP HTTPInfo
- InputRef ShapeRef `json:"input"`
- OutputRef ShapeRef `json:"output"`
- ErrorRefs []ShapeRef `json:"errors"`
- Paginator *Paginator
- Deprecated bool `json:"deprecated"`
- AuthType string `json:"authtype"`
- imports map[string]bool
-}
-
-// A HTTPInfo defines the method of HTTP request for the Operation.
-type HTTPInfo struct {
- Method string
- RequestURI string
- ResponseCode uint
-}
-
-// HasInput returns if the Operation accepts an input paramater
-func (o *Operation) HasInput() bool {
- return o.InputRef.ShapeName != ""
-}
-
-// HasOutput returns if the Operation accepts an output parameter
-func (o *Operation) HasOutput() bool {
- return o.OutputRef.ShapeName != ""
-}
-
-func (o *Operation) GetSigner() string {
- if o.AuthType == "v4-unsigned-body" {
- o.API.imports["github.com/aws/aws-sdk-go/aws/signer/v4"] = true
- }
-
- buf := bytes.NewBuffer(nil)
-
- switch o.AuthType {
- case "none":
- buf.WriteString("req.Config.Credentials = credentials.AnonymousCredentials")
- case "v4-unsigned-body":
- buf.WriteString("req.Handlers.Sign.Remove(v4.SignRequestHandler)\n")
- buf.WriteString("handler := v4.BuildNamedHandler(\"v4.CustomSignerHandler\", v4.WithUnsignedPayload)\n")
- buf.WriteString("req.Handlers.Sign.PushFrontNamed(handler)")
- }
-
- buf.WriteString("\n")
- return buf.String()
-}
-
-// tplOperation defines a template for rendering an API Operation
-var tplOperation = template.Must(template.New("operation").Funcs(template.FuncMap{
- "GetCrosslinkURL": GetCrosslinkURL,
-}).Parse(`
-const op{{ .ExportedName }} = "{{ .Name }}"
-
-// {{ .ExportedName }}Request generates a "aws/request.Request" representing the
-// client's request for the {{ .ExportedName }} operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
-//
-// See {{ .ExportedName }} for usage and error information.
-//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the {{ .ExportedName }} method directly
-// instead.
-//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
-//
-// // Example sending a request using the {{ .ExportedName }}Request method.
-// req, resp := client.{{ .ExportedName }}Request(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-{{ $crosslinkURL := GetCrosslinkURL $.API.BaseCrosslinkURL $.API.APIName $.API.Metadata.UID $.ExportedName -}}
-{{ if ne $crosslinkURL "" -}}
-//
-// Please also see {{ $crosslinkURL }}
-{{ end -}}
-func (c *{{ .API.StructName }}) {{ .ExportedName }}Request(` +
- `input {{ .InputRef.GoType }}) (req *request.Request, output {{ .OutputRef.GoType }}) {
- {{ if (or .Deprecated (or .InputRef.Deprecated .OutputRef.Deprecated)) }}if c.Client.Config.Logger != nil {
- c.Client.Config.Logger.Log("This operation, {{ .ExportedName }}, has been deprecated")
- }
- op := &request.Operation{ {{ else }} op := &request.Operation{ {{ end }}
- Name: op{{ .ExportedName }},
- {{ if ne .HTTP.Method "" }}HTTPMethod: "{{ .HTTP.Method }}",
- {{ end }}HTTPPath: {{ if ne .HTTP.RequestURI "" }}"{{ .HTTP.RequestURI }}"{{ else }}"/"{{ end }},
- {{ if .Paginator }}Paginator: &request.Paginator{
- InputTokens: {{ .Paginator.InputTokensString }},
- OutputTokens: {{ .Paginator.OutputTokensString }},
- LimitToken: "{{ .Paginator.LimitKey }}",
- TruncationToken: "{{ .Paginator.MoreResults }}",
- },
- {{ end }}
- }
-
- if input == nil {
- input = &{{ .InputRef.GoTypeElem }}{}
- }
-
- output = &{{ .OutputRef.GoTypeElem }}{}
- req = c.newRequest(op, input, output){{ if eq .OutputRef.Shape.Placeholder true }}
- req.Handlers.Unmarshal.Remove({{ .API.ProtocolPackage }}.UnmarshalHandler)
- req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler){{ end }}
- {{ if ne .AuthType "" }}{{ .GetSigner }}{{ end -}}
- return
-}
-
-// {{ .ExportedName }} API operation for {{ .API.Metadata.ServiceFullName }}.
-{{ if .Documentation -}}
-//
-{{ .Documentation }}
-{{ end -}}
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for {{ .API.Metadata.ServiceFullName }}'s
-// API operation {{ .ExportedName }} for usage and error information.
-{{ if .ErrorRefs -}}
-//
-// Returned Error Codes:
-{{ range $_, $err := .ErrorRefs -}}
-// * {{ $err.Shape.ErrorCodeName }} "{{ $err.Shape.ErrorName}}"
-{{ if $err.Docstring -}}
-{{ $err.IndentedDocstring }}
-{{ end -}}
-//
-{{ end -}}
-{{ end -}}
-{{ $crosslinkURL := GetCrosslinkURL $.API.BaseCrosslinkURL $.API.APIName $.API.Metadata.UID $.ExportedName -}}
-{{ if ne $crosslinkURL "" -}}
-// Please also see {{ $crosslinkURL }}
-{{ end -}}
-func (c *{{ .API.StructName }}) {{ .ExportedName }}(` +
- `input {{ .InputRef.GoType }}) ({{ .OutputRef.GoType }}, error) {
- req, out := c.{{ .ExportedName }}Request(input)
- return out, req.Send()
-}
-
-// {{ .ExportedName }}WithContext is the same as {{ .ExportedName }} with the addition of
-// the ability to pass a context and additional request options.
-//
-// See {{ .ExportedName }} for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *{{ .API.StructName }}) {{ .ExportedName }}WithContext(` +
- `ctx aws.Context, input {{ .InputRef.GoType }}, opts ...request.Option) ` +
- `({{ .OutputRef.GoType }}, error) {
- req, out := c.{{ .ExportedName }}Request(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-{{ if .Paginator }}
-// {{ .ExportedName }}Pages iterates over the pages of a {{ .ExportedName }} operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See {{ .ExportedName }} method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a {{ .ExportedName }} operation.
-// pageNum := 0
-// err := client.{{ .ExportedName }}Pages(params,
-// func(page {{ .OutputRef.GoType }}, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *{{ .API.StructName }}) {{ .ExportedName }}Pages(` +
- `input {{ .InputRef.GoType }}, fn func({{ .OutputRef.GoType }}, bool) bool) error {
- return c.{{ .ExportedName }}PagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// {{ .ExportedName }}PagesWithContext same as {{ .ExportedName }}Pages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *{{ .API.StructName }}) {{ .ExportedName }}PagesWithContext(` +
- `ctx aws.Context, ` +
- `input {{ .InputRef.GoType }}, ` +
- `fn func({{ .OutputRef.GoType }}, bool) bool, ` +
- `opts ...request.Option) error {
- p := request.Pagination {
- NewRequest: func() (*request.Request, error) {
- var inCpy {{ .InputRef.GoType }}
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.{{ .ExportedName }}Request(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().({{ .OutputRef.GoType }}), !p.HasNextPage())
- }
- return p.Err()
-}
-{{ end }}
-`))
-
-// GoCode returns a string of rendered GoCode for this Operation
-func (o *Operation) GoCode() string {
- var buf bytes.Buffer
- err := tplOperation.Execute(&buf, o)
- if err != nil {
- panic(err)
- }
-
- return strings.TrimSpace(buf.String())
-}
-
-// tplInfSig defines the template for rendering an Operation's signature within an Interface definition.
-var tplInfSig = template.Must(template.New("opsig").Parse(`
-{{ .ExportedName }}({{ .InputRef.GoTypeWithPkgName }}) ({{ .OutputRef.GoTypeWithPkgName }}, error)
-{{ .ExportedName }}WithContext(aws.Context, {{ .InputRef.GoTypeWithPkgName }}, ...request.Option) ({{ .OutputRef.GoTypeWithPkgName }}, error)
-{{ .ExportedName }}Request({{ .InputRef.GoTypeWithPkgName }}) (*request.Request, {{ .OutputRef.GoTypeWithPkgName }})
-
-{{ if .Paginator -}}
-{{ .ExportedName }}Pages({{ .InputRef.GoTypeWithPkgName }}, func({{ .OutputRef.GoTypeWithPkgName }}, bool) bool) error
-{{ .ExportedName }}PagesWithContext(aws.Context, {{ .InputRef.GoTypeWithPkgName }}, func({{ .OutputRef.GoTypeWithPkgName }}, bool) bool, ...request.Option) error
-{{- end }}
-`))
-
-// InterfaceSignature returns a string representing the Operation's interface{}
-// functional signature.
-func (o *Operation) InterfaceSignature() string {
- var buf bytes.Buffer
- err := tplInfSig.Execute(&buf, o)
- if err != nil {
- panic(err)
- }
-
- return strings.TrimSpace(buf.String())
-}
-
-// tplExample defines the template for rendering an Operation example
-var tplExample = template.Must(template.New("operationExample").Parse(`
-func Example{{ .API.StructName }}_{{ .ExportedName }}() {
- sess := session.Must(session.NewSession())
-
- svc := {{ .API.PackageName }}.New(sess)
-
- {{ .ExampleInput }}
- resp, err := svc.{{ .ExportedName }}(params)
-
- if err != nil {
- // Print the error, cast err to awserr.Error to get the Code and
- // Message from an error.
- fmt.Println(err.Error())
- return
- }
-
- // Pretty-print the response data.
- fmt.Println(resp)
-}
-`))
-
-// Example returns a string of the rendered Go code for the Operation
-func (o *Operation) Example() string {
- var buf bytes.Buffer
- err := tplExample.Execute(&buf, o)
- if err != nil {
- panic(err)
- }
-
- return strings.TrimSpace(buf.String())
-}
-
-// ExampleInput return a string of the rendered Go code for an example's input parameters
-func (o *Operation) ExampleInput() string {
- if len(o.InputRef.Shape.MemberRefs) == 0 {
- if strings.Contains(o.InputRef.GoTypeElem(), ".") {
- o.imports["github.com/aws/aws-sdk-go/service/"+strings.Split(o.InputRef.GoTypeElem(), ".")[0]] = true
- return fmt.Sprintf("var params *%s", o.InputRef.GoTypeElem())
- }
- return fmt.Sprintf("var params *%s.%s",
- o.API.PackageName(), o.InputRef.GoTypeElem())
- }
- e := example{o, map[string]int{}}
- return "params := " + e.traverseAny(o.InputRef.Shape, false, false)
-}
-
-// A example provides
-type example struct {
- *Operation
- visited map[string]int
-}
-
-// traverseAny returns rendered Go code for the shape.
-func (e *example) traverseAny(s *Shape, required, payload bool) string {
- str := ""
- e.visited[s.ShapeName]++
-
- switch s.Type {
- case "structure":
- str = e.traverseStruct(s, required, payload)
- case "list":
- str = e.traverseList(s, required, payload)
- case "map":
- str = e.traverseMap(s, required, payload)
- case "jsonvalue":
- str = "aws.JSONValue{\"key\": \"value\"}"
- if required {
- str += " // Required"
- }
- default:
- str = e.traverseScalar(s, required, payload)
- }
-
- e.visited[s.ShapeName]--
-
- return str
-}
-
-var reType = regexp.MustCompile(`\b([A-Z])`)
-
-// traverseStruct returns rendered Go code for a structure type shape.
-func (e *example) traverseStruct(s *Shape, required, payload bool) string {
- var buf bytes.Buffer
-
- if s.resolvePkg != "" {
- e.imports[s.resolvePkg] = true
- buf.WriteString("&" + s.GoTypeElem() + "{")
- } else {
- buf.WriteString("&" + s.API.PackageName() + "." + s.GoTypeElem() + "{")
- }
-
- if required {
- buf.WriteString(" // Required")
- }
- buf.WriteString("\n")
-
- req := make([]string, len(s.Required))
- copy(req, s.Required)
- sort.Strings(req)
-
- if e.visited[s.ShapeName] < 2 {
- for _, n := range req {
- m := s.MemberRefs[n].Shape
- p := n == s.Payload && (s.MemberRefs[n].Streaming || m.Streaming)
- buf.WriteString(n + ": " + e.traverseAny(m, true, p) + ",")
- if m.Type != "list" && m.Type != "structure" && m.Type != "map" {
- buf.WriteString(" // Required")
- }
- buf.WriteString("\n")
- }
-
- for _, n := range s.MemberNames() {
- if s.IsRequired(n) {
- continue
- }
- m := s.MemberRefs[n].Shape
- p := n == s.Payload && (s.MemberRefs[n].Streaming || m.Streaming)
- buf.WriteString(n + ": " + e.traverseAny(m, false, p) + ",\n")
- }
- } else {
- buf.WriteString("// Recursive values...\n")
- }
-
- buf.WriteString("}")
- return buf.String()
-}
-
-// traverseMap returns rendered Go code for a map type shape.
-func (e *example) traverseMap(s *Shape, required, payload bool) string {
- var buf bytes.Buffer
-
- t := ""
- if s.resolvePkg != "" {
- e.imports[s.resolvePkg] = true
- t = s.GoTypeElem()
- } else {
- t = reType.ReplaceAllString(s.GoTypeElem(), s.API.PackageName()+".$1")
- }
- buf.WriteString(t + "{")
- if required {
- buf.WriteString(" // Required")
- }
- buf.WriteString("\n")
-
- if e.visited[s.ShapeName] < 2 {
- m := s.ValueRef.Shape
- buf.WriteString("\"Key\": " + e.traverseAny(m, true, false) + ",")
- if m.Type != "list" && m.Type != "structure" && m.Type != "map" {
- buf.WriteString(" // Required")
- }
- buf.WriteString("\n// More values...\n")
- } else {
- buf.WriteString("// Recursive values...\n")
- }
- buf.WriteString("}")
-
- return buf.String()
-}
-
-// traverseList returns rendered Go code for a list type shape.
-func (e *example) traverseList(s *Shape, required, payload bool) string {
- var buf bytes.Buffer
- t := ""
- if s.resolvePkg != "" {
- e.imports[s.resolvePkg] = true
- t = s.GoTypeElem()
- } else {
- t = reType.ReplaceAllString(s.GoTypeElem(), s.API.PackageName()+".$1")
- }
-
- buf.WriteString(t + "{")
- if required {
- buf.WriteString(" // Required")
- }
- buf.WriteString("\n")
-
- if e.visited[s.ShapeName] < 2 {
- m := s.MemberRef.Shape
- buf.WriteString(e.traverseAny(m, true, false) + ",")
- if m.Type != "list" && m.Type != "structure" && m.Type != "map" {
- buf.WriteString(" // Required")
- }
- buf.WriteString("\n// More values...\n")
- } else {
- buf.WriteString("// Recursive values...\n")
- }
- buf.WriteString("}")
-
- return buf.String()
-}
-
-// traverseScalar returns an AWS Type string representation initialized to a value.
-// Will panic if s is an unsupported shape type.
-func (e *example) traverseScalar(s *Shape, required, payload bool) string {
- str := ""
- switch s.Type {
- case "integer", "long":
- str = `aws.Int64(1)`
- case "float", "double":
- str = `aws.Float64(1.0)`
- case "string", "character":
- str = `aws.String("` + s.ShapeName + `")`
- case "blob":
- if payload {
- str = `bytes.NewReader([]byte("PAYLOAD"))`
- } else {
- str = `[]byte("PAYLOAD")`
- }
- case "boolean":
- str = `aws.Bool(true)`
- case "timestamp":
- str = `aws.Time(time.Now())`
- default:
- panic("unsupported shape " + s.Type)
- }
-
- return str
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/pagination.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/pagination.go
deleted file mode 100644
index 441a47529f4..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/model/api/pagination.go
+++ /dev/null
@@ -1,91 +0,0 @@
-// +build codegen
-
-package api
-
-import (
- "encoding/json"
- "fmt"
- "os"
-)
-
-// Paginator keeps track of pagination configuration for an API operation.
-type Paginator struct {
- InputTokens interface{} `json:"input_token"`
- OutputTokens interface{} `json:"output_token"`
- LimitKey string `json:"limit_key"`
- MoreResults string `json:"more_results"`
-}
-
-// InputTokensString returns output tokens formatted as a list
-func (p *Paginator) InputTokensString() string {
- str := p.InputTokens.([]string)
- return fmt.Sprintf("%#v", str)
-}
-
-// OutputTokensString returns output tokens formatted as a list
-func (p *Paginator) OutputTokensString() string {
- str := p.OutputTokens.([]string)
- return fmt.Sprintf("%#v", str)
-}
-
-// used for unmarshaling from the paginators JSON file
-type paginationDefinitions struct {
- *API
- Pagination map[string]Paginator
-}
-
-// AttachPaginators attaches pagination configuration from filename to the API.
-func (a *API) AttachPaginators(filename string) {
- p := paginationDefinitions{API: a}
-
- f, err := os.Open(filename)
- defer f.Close()
- if err != nil {
- panic(err)
- }
- err = json.NewDecoder(f).Decode(&p)
- if err != nil {
- panic(err)
- }
-
- p.setup()
-}
-
-// setup runs post-processing on the paginator configuration.
-func (p *paginationDefinitions) setup() {
- for n, e := range p.Pagination {
- if e.InputTokens == nil || e.OutputTokens == nil {
- continue
- }
- paginator := e
-
- switch t := paginator.InputTokens.(type) {
- case string:
- paginator.InputTokens = []string{t}
- case []interface{}:
- toks := []string{}
- for _, e := range t {
- s := e.(string)
- toks = append(toks, s)
- }
- paginator.InputTokens = toks
- }
- switch t := paginator.OutputTokens.(type) {
- case string:
- paginator.OutputTokens = []string{t}
- case []interface{}:
- toks := []string{}
- for _, e := range t {
- s := e.(string)
- toks = append(toks, s)
- }
- paginator.OutputTokens = toks
- }
-
- if o, ok := p.Operations[n]; ok {
- o.Paginator = &paginator
- } else {
- panic("unknown operation for paginator " + n)
- }
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/param_filler.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/param_filler.go
deleted file mode 100644
index eb3edb9d2a5..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/model/api/param_filler.go
+++ /dev/null
@@ -1,133 +0,0 @@
-// +build codegen
-
-package api
-
-import (
- "fmt"
- "reflect"
- "strings"
-
- "github.com/aws/aws-sdk-go/private/util"
-)
-
-// A paramFiller provides string formatting for a shape and its types.
-type paramFiller struct {
- prefixPackageName bool
-}
-
-// typeName returns the type name of a shape.
-func (f paramFiller) typeName(shape *Shape) string {
- if f.prefixPackageName && shape.Type == "structure" {
- return "*" + shape.API.PackageName() + "." + shape.GoTypeElem()
- }
- return shape.GoType()
-}
-
-// ParamsStructFromJSON returns a JSON string representation of a structure.
-func ParamsStructFromJSON(value interface{}, shape *Shape, prefixPackageName bool) string {
- f := paramFiller{prefixPackageName: prefixPackageName}
- return util.GoFmt(f.paramsStructAny(value, shape))
-}
-
-// paramsStructAny returns the string representation of any value.
-func (f paramFiller) paramsStructAny(value interface{}, shape *Shape) string {
- if value == nil {
- return ""
- }
-
- switch shape.Type {
- case "structure":
- if value != nil {
- vmap := value.(map[string]interface{})
- return f.paramsStructStruct(vmap, shape)
- }
- case "list":
- vlist := value.([]interface{})
- return f.paramsStructList(vlist, shape)
- case "map":
- vmap := value.(map[string]interface{})
- return f.paramsStructMap(vmap, shape)
- case "string", "character":
- v := reflect.Indirect(reflect.ValueOf(value))
- if v.IsValid() {
- return fmt.Sprintf("aws.String(%#v)", v.Interface())
- }
- case "blob":
- v := reflect.Indirect(reflect.ValueOf(value))
- if v.IsValid() && shape.Streaming {
- return fmt.Sprintf("bytes.NewReader([]byte(%#v))", v.Interface())
- } else if v.IsValid() {
- return fmt.Sprintf("[]byte(%#v)", v.Interface())
- }
- case "boolean":
- v := reflect.Indirect(reflect.ValueOf(value))
- if v.IsValid() {
- return fmt.Sprintf("aws.Bool(%#v)", v.Interface())
- }
- case "integer", "long":
- v := reflect.Indirect(reflect.ValueOf(value))
- if v.IsValid() {
- return fmt.Sprintf("aws.Int64(%v)", v.Interface())
- }
- case "float", "double":
- v := reflect.Indirect(reflect.ValueOf(value))
- if v.IsValid() {
- return fmt.Sprintf("aws.Float64(%v)", v.Interface())
- }
- case "timestamp":
- v := reflect.Indirect(reflect.ValueOf(value))
- if v.IsValid() {
- return fmt.Sprintf("aws.Time(time.Unix(%d, 0))", int(v.Float()))
- }
- default:
- panic("Unhandled type " + shape.Type)
- }
- return ""
-}
-
-// paramsStructStruct returns the string representation of a structure
-func (f paramFiller) paramsStructStruct(value map[string]interface{}, shape *Shape) string {
- out := "&" + f.typeName(shape)[1:] + "{\n"
- for _, n := range shape.MemberNames() {
- ref := shape.MemberRefs[n]
- name := findParamMember(value, n)
-
- if val := f.paramsStructAny(value[name], ref.Shape); val != "" {
- out += fmt.Sprintf("%s: %s,\n", n, val)
- }
- }
- out += "}"
- return out
-}
-
-// paramsStructMap returns the string representation of a map of values
-func (f paramFiller) paramsStructMap(value map[string]interface{}, shape *Shape) string {
- out := f.typeName(shape) + "{\n"
- keys := util.SortedKeys(value)
- for _, k := range keys {
- v := value[k]
- out += fmt.Sprintf("%q: %s,\n", k, f.paramsStructAny(v, shape.ValueRef.Shape))
- }
- out += "}"
- return out
-}
-
-// paramsStructList returns the string representation of slice of values
-func (f paramFiller) paramsStructList(value []interface{}, shape *Shape) string {
- out := f.typeName(shape) + "{\n"
- for _, v := range value {
- out += fmt.Sprintf("%s,\n", f.paramsStructAny(v, shape.MemberRef.Shape))
- }
- out += "}"
- return out
-}
-
-// findParamMember searches a map for a key ignoring case. Returns the map key if found.
-func findParamMember(value map[string]interface{}, key string) string {
- for actualKey := range value {
- if strings.ToLower(key) == strings.ToLower(actualKey) {
- return actualKey
- }
- }
- return ""
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/passes.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/passes.go
deleted file mode 100644
index 03639425eb8..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/model/api/passes.go
+++ /dev/null
@@ -1,306 +0,0 @@
-// +build codegen
-
-package api
-
-import (
- "fmt"
- "regexp"
- "strings"
-)
-
-// updateTopLevelShapeReferences moves resultWrapper, locationName, and
-// xmlNamespace traits from toplevel shape references to the toplevel
-// shapes for easier code generation
-func (a *API) updateTopLevelShapeReferences() {
- for _, o := range a.Operations {
- // these are for REST-XML services
- if o.InputRef.LocationName != "" {
- o.InputRef.Shape.LocationName = o.InputRef.LocationName
- }
- if o.InputRef.Location != "" {
- o.InputRef.Shape.Location = o.InputRef.Location
- }
- if o.InputRef.Payload != "" {
- o.InputRef.Shape.Payload = o.InputRef.Payload
- }
- if o.InputRef.XMLNamespace.Prefix != "" {
- o.InputRef.Shape.XMLNamespace.Prefix = o.InputRef.XMLNamespace.Prefix
- }
- if o.InputRef.XMLNamespace.URI != "" {
- o.InputRef.Shape.XMLNamespace.URI = o.InputRef.XMLNamespace.URI
- }
- }
-
-}
-
-// writeShapeNames sets each shape's API and shape name values. Binding the
-// shape to its parent API.
-func (a *API) writeShapeNames() {
- for n, s := range a.Shapes {
- s.API = a
- s.ShapeName = n
- }
-}
-
-func (a *API) resolveReferences() {
- resolver := referenceResolver{API: a, visited: map[*ShapeRef]bool{}}
-
- for _, s := range a.Shapes {
- resolver.resolveShape(s)
- }
-
- for _, o := range a.Operations {
- o.API = a // resolve parent reference
-
- resolver.resolveReference(&o.InputRef)
- resolver.resolveReference(&o.OutputRef)
-
- // Resolve references for errors also
- for i := range o.ErrorRefs {
- resolver.resolveReference(&o.ErrorRefs[i])
- o.ErrorRefs[i].Shape.IsError = true
- }
- }
-}
-
-// A referenceResolver provides a way to resolve shape references to
-// shape definitions.
-type referenceResolver struct {
- *API
- visited map[*ShapeRef]bool
-}
-
-var jsonvalueShape = &Shape{
- ShapeName: "JSONValue",
- Type: "jsonvalue",
- ValueRef: ShapeRef{
- JSONValue: true,
- },
-}
-
-// resolveReference updates a shape reference to reference the API and
-// its shape definition. All other nested references are also resolved.
-func (r *referenceResolver) resolveReference(ref *ShapeRef) {
- if ref.ShapeName == "" {
- return
- }
-
- if shape, ok := r.API.Shapes[ref.ShapeName]; ok {
- if ref.JSONValue {
- ref.ShapeName = "JSONValue"
- r.API.Shapes[ref.ShapeName] = jsonvalueShape
- }
-
- ref.API = r.API // resolve reference back to API
- ref.Shape = shape // resolve shape reference
-
- if r.visited[ref] {
- return
- }
- r.visited[ref] = true
-
- shape.refs = append(shape.refs, ref) // register the ref
-
- // resolve shape's references, if it has any
- r.resolveShape(shape)
- }
-}
-
-// resolveShape resolves a shape's Member Key Value, and nested member
-// shape references.
-func (r *referenceResolver) resolveShape(shape *Shape) {
- r.resolveReference(&shape.MemberRef)
- r.resolveReference(&shape.KeyRef)
- r.resolveReference(&shape.ValueRef)
- for _, m := range shape.MemberRefs {
- r.resolveReference(m)
- }
-}
-
-// renameToplevelShapes renames all top level shapes of an API to their
-// exportable variant. The shapes are also updated to include notations
-// if they are Input or Outputs.
-func (a *API) renameToplevelShapes() {
- for _, v := range a.OperationList() {
- if v.HasInput() {
- name := v.ExportedName + "Input"
- switch {
- case a.Shapes[name] == nil:
- if service, ok := shamelist[a.name]; ok {
- if check, ok := service[v.Name]; ok && check.input {
- break
- }
- }
- v.InputRef.Shape.Rename(name)
- }
- }
- if v.HasOutput() {
- name := v.ExportedName + "Output"
- switch {
- case a.Shapes[name] == nil:
- if service, ok := shamelist[a.name]; ok {
- if check, ok := service[v.Name]; ok && check.output {
- break
- }
- }
- v.OutputRef.Shape.Rename(name)
- }
- }
- v.InputRef.Payload = a.ExportableName(v.InputRef.Payload)
- v.OutputRef.Payload = a.ExportableName(v.OutputRef.Payload)
- }
-}
-
-// fixStutterNames fixes all name struttering based on Go naming conventions.
-// "Stuttering" is when the prefix of a structure or function matches the
-// package name (case insensitive).
-func (a *API) fixStutterNames() {
- str, end := a.StructName(), ""
- if len(str) > 1 {
- l := len(str) - 1
- str, end = str[0:l], str[l:]
- }
- re := regexp.MustCompile(fmt.Sprintf(`\A(?i:%s)%s`, str, end))
-
- for name, op := range a.Operations {
- newName := re.ReplaceAllString(name, "")
- if newName != name {
- delete(a.Operations, name)
- a.Operations[newName] = op
- }
- op.ExportedName = newName
- }
-
- for k, s := range a.Shapes {
- newName := re.ReplaceAllString(k, "")
- if newName != s.ShapeName {
- s.Rename(newName)
- }
- }
-}
-
-// renameExportable renames all operation names to be exportable names.
-// All nested Shape names are also updated to the exportable variant.
-func (a *API) renameExportable() {
- for name, op := range a.Operations {
- newName := a.ExportableName(name)
- if newName != name {
- delete(a.Operations, name)
- a.Operations[newName] = op
- }
- op.ExportedName = newName
- }
-
- for k, s := range a.Shapes {
- // FIXME SNS has lower and uppercased shape names with the same name,
- // except the lowercased variant is used exclusively for string and
- // other primitive types. Renaming both would cause a collision.
- // We work around this by only renaming the structure shapes.
- if s.Type == "string" {
- continue
- }
-
- for mName, member := range s.MemberRefs {
- newName := a.ExportableName(mName)
- if newName != mName {
- delete(s.MemberRefs, mName)
- s.MemberRefs[newName] = member
-
- // also apply locationName trait so we keep the old one
- // but only if there's no locationName trait on ref or shape
- if member.LocationName == "" && member.Shape.LocationName == "" {
- member.LocationName = mName
- }
- }
-
- if newName == "_" {
- panic("Shape " + s.ShapeName + " uses reserved member name '_'")
- }
- }
-
- newName := a.ExportableName(k)
- if newName != s.ShapeName {
- s.Rename(newName)
- }
-
- s.Payload = a.ExportableName(s.Payload)
-
- // fix required trait names
- for i, n := range s.Required {
- s.Required[i] = a.ExportableName(n)
- }
- }
-
- for _, s := range a.Shapes {
- // fix enum names
- if s.IsEnum() {
- s.EnumConsts = make([]string, len(s.Enum))
- for i := range s.Enum {
- shape := s.ShapeName
- shape = strings.ToUpper(shape[0:1]) + shape[1:]
- s.EnumConsts[i] = shape + s.EnumName(i)
- }
- }
- }
-}
-
-// createInputOutputShapes creates toplevel input/output shapes if they
-// have not been defined in the API. This normalizes all APIs to always
-// have an input and output structure in the signature.
-func (a *API) createInputOutputShapes() {
- for _, op := range a.Operations {
- if !op.HasInput() {
- setAsPlacholderShape(&op.InputRef, op.ExportedName+"Input", a)
- }
- if !op.HasOutput() {
- setAsPlacholderShape(&op.OutputRef, op.ExportedName+"Output", a)
- }
- }
-}
-
-func setAsPlacholderShape(tgtShapeRef *ShapeRef, name string, a *API) {
- shape := a.makeIOShape(name)
- shape.Placeholder = true
- *tgtShapeRef = ShapeRef{API: a, ShapeName: shape.ShapeName, Shape: shape}
- shape.refs = append(shape.refs, tgtShapeRef)
-}
-
-// makeIOShape returns a pointer to a new Shape initialized by the name provided.
-func (a *API) makeIOShape(name string) *Shape {
- shape := &Shape{
- API: a, ShapeName: name, Type: "structure",
- MemberRefs: map[string]*ShapeRef{},
- }
- a.Shapes[name] = shape
- return shape
-}
-
-// removeUnusedShapes removes shapes from the API which are not referenced by any
-// other shape in the API.
-func (a *API) removeUnusedShapes() {
- for n, s := range a.Shapes {
- if len(s.refs) == 0 {
- delete(a.Shapes, n)
- }
- }
-}
-
-// Represents the service package name to EndpointsID mapping
-var custEndpointsKey = map[string]string{
- "applicationautoscaling": "application-autoscaling",
-}
-
-// Sents the EndpointsID field of Metadata with the value of the
-// EndpointPrefix if EndpointsID is not set. Also adds
-// customizations for services if EndpointPrefix is not a valid key.
-func (a *API) setMetadataEndpointsKey() {
- if len(a.Metadata.EndpointsID) != 0 {
- return
- }
-
- if v, ok := custEndpointsKey[a.PackageName()]; ok {
- a.Metadata.EndpointsID = v
- } else {
- a.Metadata.EndpointsID = a.Metadata.EndpointPrefix
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/shape.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/shape.go
deleted file mode 100644
index dd0fbee55af..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/model/api/shape.go
+++ /dev/null
@@ -1,684 +0,0 @@
-// +build codegen
-
-package api
-
-import (
- "bytes"
- "fmt"
- "path"
- "regexp"
- "sort"
- "strings"
- "text/template"
-)
-
-// A ShapeRef defines the usage of a shape within the API.
-type ShapeRef struct {
- API *API `json:"-"`
- Shape *Shape `json:"-"`
- Documentation string
- ShapeName string `json:"shape"`
- Location string
- LocationName string
- QueryName string
- Flattened bool
- Streaming bool
- XMLAttribute bool
- // Ignore, if set, will not be sent over the wire
- Ignore bool
- XMLNamespace XMLInfo
- Payload string
- IdempotencyToken bool `json:"idempotencyToken"`
- JSONValue bool `json:"jsonvalue"`
- Deprecated bool `json:"deprecated"`
-
- OrigShapeName string `json:"-"`
-
- GenerateGetter bool
-}
-
-// ErrorInfo represents the error block of a shape's structure
-type ErrorInfo struct {
- Code string
- HTTPStatusCode int
-}
-
-// A XMLInfo defines URL and prefix for Shapes when rendered as XML
-type XMLInfo struct {
- Prefix string
- URI string
-}
-
-// A Shape defines the definition of a shape type
-type Shape struct {
- API *API `json:"-"`
- ShapeName string
- Documentation string
- MemberRefs map[string]*ShapeRef `json:"members"`
- MemberRef ShapeRef `json:"member"`
- KeyRef ShapeRef `json:"key"`
- ValueRef ShapeRef `json:"value"`
- Required []string
- Payload string
- Type string
- Exception bool
- Enum []string
- EnumConsts []string
- Flattened bool
- Streaming bool
- Location string
- LocationName string
- IdempotencyToken bool `json:"idempotencyToken"`
- XMLNamespace XMLInfo
- Min float64 // optional Minimum length (string, list) or value (number)
- Max float64 // optional Maximum length (string, list) or value (number)
-
- refs []*ShapeRef // References to this shape
- resolvePkg string // use this package in the goType() if present
-
- OrigShapeName string `json:"-"`
-
- // Defines if the shape is a placeholder and should not be used directly
- Placeholder bool
-
- Deprecated bool `json:"deprecated"`
-
- Validations ShapeValidations
-
- // Error information that is set if the shape is an error shape.
- IsError bool
- ErrorInfo ErrorInfo `json:"error"`
-}
-
-// ErrorCodeName will return the error shape's name formated for
-// error code const.
-func (s *Shape) ErrorCodeName() string {
- return "ErrCode" + s.ShapeName
-}
-
-// ErrorName will return the shape's name or error code if available based
-// on the API's protocol. This is the error code string returned by the service.
-func (s *Shape) ErrorName() string {
- name := s.ShapeName
- switch s.API.Metadata.Protocol {
- case "query", "ec2query", "rest-xml":
- if len(s.ErrorInfo.Code) > 0 {
- name = s.ErrorInfo.Code
- }
- }
-
- return name
-}
-
-// GoTags returns the struct tags for a shape.
-func (s *Shape) GoTags(root, required bool) string {
- ref := &ShapeRef{ShapeName: s.ShapeName, API: s.API, Shape: s}
- return ref.GoTags(root, required)
-}
-
-// Rename changes the name of the Shape to newName. Also updates
-// the associated API's reference to use newName.
-func (s *Shape) Rename(newName string) {
- for _, r := range s.refs {
- r.OrigShapeName = r.ShapeName
- r.ShapeName = newName
- }
-
- delete(s.API.Shapes, s.ShapeName)
- s.OrigShapeName = s.ShapeName
- s.API.Shapes[newName] = s
- s.ShapeName = newName
-}
-
-// MemberNames returns a slice of struct member names.
-func (s *Shape) MemberNames() []string {
- i, names := 0, make([]string, len(s.MemberRefs))
- for n := range s.MemberRefs {
- names[i] = n
- i++
- }
- sort.Strings(names)
- return names
-}
-
-// GoTypeWithPkgName returns a shape's type as a string with the package name in
-// . format. Package naming only applies to structures.
-func (s *Shape) GoTypeWithPkgName() string {
- return goType(s, true)
-}
-
-func (s *Shape) GoTypeWithPkgNameElem() string {
- t := goType(s, true)
- if strings.HasPrefix(t, "*") {
- return t[1:]
- }
- return t
-}
-
-// GenAccessors returns if the shape's reference should have setters generated.
-func (s *ShapeRef) UseIndirection() bool {
- switch s.Shape.Type {
- case "map", "list", "blob", "structure", "jsonvalue":
- return false
- }
-
- if s.Streaming || s.Shape.Streaming {
- return false
- }
-
- if s.JSONValue {
- return false
- }
-
- return true
-}
-
-// GoStructValueType returns the Shape's Go type value instead of a pointer
-// for the type.
-func (s *Shape) GoStructValueType(name string, ref *ShapeRef) string {
- v := s.GoStructType(name, ref)
-
- if ref.UseIndirection() && v[0] == '*' {
- return v[1:]
- }
-
- return v
-}
-
-// GoStructType returns the type of a struct field based on the API
-// model definition.
-func (s *Shape) GoStructType(name string, ref *ShapeRef) string {
- if (ref.Streaming || ref.Shape.Streaming) && s.Payload == name {
- rtype := "io.ReadSeeker"
- if strings.HasSuffix(s.ShapeName, "Output") {
- rtype = "io.ReadCloser"
- }
-
- s.API.imports["io"] = true
- return rtype
- }
-
- if ref.JSONValue {
- s.API.imports["github.com/aws/aws-sdk-go/aws"] = true
- return "aws.JSONValue"
- }
-
- for _, v := range s.Validations {
- // TODO move this to shape validation resolution
- if (v.Ref.Shape.Type == "map" || v.Ref.Shape.Type == "list") && v.Type == ShapeValidationNested {
- s.API.imports["fmt"] = true
- }
- }
-
- return ref.GoType()
-}
-
-// GoType returns a shape's Go type
-func (s *Shape) GoType() string {
- return goType(s, false)
-}
-
-// GoType returns a shape ref's Go type.
-func (ref *ShapeRef) GoType() string {
- if ref.Shape == nil {
- panic(fmt.Errorf("missing shape definition on reference for %#v", ref))
- }
-
- return ref.Shape.GoType()
-}
-
-// GoTypeWithPkgName returns a shape's type as a string with the package name in
-// . format. Package naming only applies to structures.
-func (ref *ShapeRef) GoTypeWithPkgName() string {
- if ref.Shape == nil {
- panic(fmt.Errorf("missing shape definition on reference for %#v", ref))
- }
-
- return ref.Shape.GoTypeWithPkgName()
-}
-
-// Returns a string version of the Shape's type.
-// If withPkgName is true, the package name will be added as a prefix
-func goType(s *Shape, withPkgName bool) string {
- switch s.Type {
- case "structure":
- if withPkgName || s.resolvePkg != "" {
- pkg := s.resolvePkg
- if pkg != "" {
- s.API.imports[pkg] = true
- pkg = path.Base(pkg)
- } else {
- pkg = s.API.PackageName()
- }
- return fmt.Sprintf("*%s.%s", pkg, s.ShapeName)
- }
- return "*" + s.ShapeName
- case "map":
- return "map[string]" + goType(s.ValueRef.Shape, withPkgName)
- case "jsonvalue":
- return "aws.JSONValue"
- case "list":
- return "[]" + goType(s.MemberRef.Shape, withPkgName)
- case "boolean":
- return "*bool"
- case "string", "character":
- return "*string"
- case "blob":
- return "[]byte"
- case "integer", "long":
- return "*int64"
- case "float", "double":
- return "*float64"
- case "timestamp":
- s.API.imports["time"] = true
- return "*time.Time"
- default:
- panic("Unsupported shape type: " + s.Type)
- }
-}
-
-// GoTypeElem returns the Go type for the Shape. If the shape type is a pointer just
-// the type will be returned minus the pointer *.
-func (s *Shape) GoTypeElem() string {
- t := s.GoType()
- if strings.HasPrefix(t, "*") {
- return t[1:]
- }
- return t
-}
-
-// GoTypeElem returns the Go type for the Shape. If the shape type is a pointer just
-// the type will be returned minus the pointer *.
-func (ref *ShapeRef) GoTypeElem() string {
- if ref.Shape == nil {
- panic(fmt.Errorf("missing shape definition on reference for %#v", ref))
- }
-
- return ref.Shape.GoTypeElem()
-}
-
-// ShapeTag is a struct tag that will be applied to a shape's generated code
-type ShapeTag struct {
- Key, Val string
-}
-
-// String returns the string representation of the shape tag
-func (s ShapeTag) String() string {
- return fmt.Sprintf(`%s:"%s"`, s.Key, s.Val)
-}
-
-// ShapeTags is a collection of shape tags and provides serialization of the
-// tags in an ordered list.
-type ShapeTags []ShapeTag
-
-// Join returns an ordered serialization of the shape tags with the provided
-// separator.
-func (s ShapeTags) Join(sep string) string {
- o := &bytes.Buffer{}
- for i, t := range s {
- o.WriteString(t.String())
- if i < len(s)-1 {
- o.WriteString(sep)
- }
- }
-
- return o.String()
-}
-
-// String is an alias for Join with the empty space separator.
-func (s ShapeTags) String() string {
- return s.Join(" ")
-}
-
-// GoTags returns the rendered tags string for the ShapeRef
-func (ref *ShapeRef) GoTags(toplevel bool, isRequired bool) string {
- tags := ShapeTags{}
-
- if ref.Location != "" {
- tags = append(tags, ShapeTag{"location", ref.Location})
- } else if ref.Shape.Location != "" {
- tags = append(tags, ShapeTag{"location", ref.Shape.Location})
- }
-
- if ref.LocationName != "" {
- tags = append(tags, ShapeTag{"locationName", ref.LocationName})
- } else if ref.Shape.LocationName != "" {
- tags = append(tags, ShapeTag{"locationName", ref.Shape.LocationName})
- }
-
- if ref.QueryName != "" {
- tags = append(tags, ShapeTag{"queryName", ref.QueryName})
- }
- if ref.Shape.MemberRef.LocationName != "" {
- tags = append(tags, ShapeTag{"locationNameList", ref.Shape.MemberRef.LocationName})
- }
- if ref.Shape.KeyRef.LocationName != "" {
- tags = append(tags, ShapeTag{"locationNameKey", ref.Shape.KeyRef.LocationName})
- }
- if ref.Shape.ValueRef.LocationName != "" {
- tags = append(tags, ShapeTag{"locationNameValue", ref.Shape.ValueRef.LocationName})
- }
- if ref.Shape.Min > 0 {
- tags = append(tags, ShapeTag{"min", fmt.Sprintf("%v", ref.Shape.Min)})
- }
-
- if ref.Deprecated || ref.Shape.Deprecated {
- tags = append(tags, ShapeTag{"deprecated", "true"})
- }
-
- // All shapes have a type
- tags = append(tags, ShapeTag{"type", ref.Shape.Type})
-
- // embed the timestamp type for easier lookups
- if ref.Shape.Type == "timestamp" {
- t := ShapeTag{Key: "timestampFormat"}
- if ref.Location == "header" {
- t.Val = "rfc822"
- } else {
- switch ref.API.Metadata.Protocol {
- case "json", "rest-json":
- t.Val = "unix"
- case "rest-xml", "ec2", "query":
- t.Val = "iso8601"
- }
- }
- tags = append(tags, t)
- }
-
- if ref.Shape.Flattened || ref.Flattened {
- tags = append(tags, ShapeTag{"flattened", "true"})
- }
- if ref.XMLAttribute {
- tags = append(tags, ShapeTag{"xmlAttribute", "true"})
- }
- if isRequired {
- tags = append(tags, ShapeTag{"required", "true"})
- }
- if ref.Shape.IsEnum() {
- tags = append(tags, ShapeTag{"enum", ref.ShapeName})
- }
-
- if toplevel {
- if ref.Shape.Payload != "" {
- tags = append(tags, ShapeTag{"payload", ref.Shape.Payload})
- }
- }
-
- if ref.XMLNamespace.Prefix != "" {
- tags = append(tags, ShapeTag{"xmlPrefix", ref.XMLNamespace.Prefix})
- } else if ref.Shape.XMLNamespace.Prefix != "" {
- tags = append(tags, ShapeTag{"xmlPrefix", ref.Shape.XMLNamespace.Prefix})
- }
-
- if ref.XMLNamespace.URI != "" {
- tags = append(tags, ShapeTag{"xmlURI", ref.XMLNamespace.URI})
- } else if ref.Shape.XMLNamespace.URI != "" {
- tags = append(tags, ShapeTag{"xmlURI", ref.Shape.XMLNamespace.URI})
- }
-
- if ref.IdempotencyToken || ref.Shape.IdempotencyToken {
- tags = append(tags, ShapeTag{"idempotencyToken", "true"})
- }
-
- if ref.Ignore {
- tags = append(tags, ShapeTag{"ignore", "true"})
- }
-
- return fmt.Sprintf("`%s`", tags)
-}
-
-// Docstring returns the godocs formated documentation
-func (ref *ShapeRef) Docstring() string {
- if ref.Documentation != "" {
- return strings.Trim(ref.Documentation, "\n ")
- }
- return ref.Shape.Docstring()
-}
-
-// Docstring returns the godocs formated documentation
-func (s *Shape) Docstring() string {
- return strings.Trim(s.Documentation, "\n ")
-}
-
-// IndentedDocstring is the indented form of the doc string.
-func (ref *ShapeRef) IndentedDocstring() string {
- doc := ref.Docstring()
- return strings.Replace(doc, "// ", "// ", -1)
-}
-
-var goCodeStringerTmpl = template.Must(template.New("goCodeStringerTmpl").Parse(`
-// String returns the string representation
-func (s {{ .ShapeName }}) String() string {
- return awsutil.Prettify(s)
-}
-// GoString returns the string representation
-func (s {{ .ShapeName }}) GoString() string {
- return s.String()
-}
-`))
-
-// GoCodeStringers renders the Stringers for API input/output shapes
-func (s *Shape) GoCodeStringers() string {
- w := bytes.Buffer{}
- if err := goCodeStringerTmpl.Execute(&w, s); err != nil {
- panic(fmt.Sprintln("Unexpected error executing GoCodeStringers template", err))
- }
-
- return w.String()
-}
-
-var enumStrip = regexp.MustCompile(`[^a-zA-Z0-9_:\./-]`)
-var enumDelims = regexp.MustCompile(`[-_:\./]+`)
-var enumCamelCase = regexp.MustCompile(`([a-z])([A-Z])`)
-
-// EnumName returns the Nth enum in the shapes Enum list
-func (s *Shape) EnumName(n int) string {
- enum := s.Enum[n]
- enum = enumStrip.ReplaceAllLiteralString(enum, "")
- enum = enumCamelCase.ReplaceAllString(enum, "$1-$2")
- parts := enumDelims.Split(enum, -1)
- for i, v := range parts {
- v = strings.ToLower(v)
- parts[i] = ""
- if len(v) > 0 {
- parts[i] = strings.ToUpper(v[0:1])
- }
- if len(v) > 1 {
- parts[i] += v[1:]
- }
- }
- enum = strings.Join(parts, "")
- enum = strings.ToUpper(enum[0:1]) + enum[1:]
- return enum
-}
-
-// NestedShape returns the shape pointer value for the shape which is nested
-// under the current shape. If the shape is not nested nil will be returned.
-//
-// strucutures, the current shape is returned
-// map: the value shape of the map is returned
-// list: the element shape of the list is returned
-func (s *Shape) NestedShape() *Shape {
- var nestedShape *Shape
- switch s.Type {
- case "structure":
- nestedShape = s
- case "map":
- nestedShape = s.ValueRef.Shape
- case "list":
- nestedShape = s.MemberRef.Shape
- }
-
- return nestedShape
-}
-
-var structShapeTmpl = template.Must(template.New("StructShape").Funcs(template.FuncMap{
- "GetCrosslinkURL": GetCrosslinkURL,
-}).Parse(`
-{{ .Docstring }}
-{{ if ne $.OrigShapeName "" -}}
-{{ $crosslinkURL := GetCrosslinkURL $.API.BaseCrosslinkURL $.API.APIName $.API.Metadata.UID $.OrigShapeName -}}
-{{ if ne $crosslinkURL "" -}}
-// Please also see {{ $crosslinkURL }}
-{{ end -}}
-{{ else -}}
-{{ $crosslinkURL := GetCrosslinkURL $.API.BaseCrosslinkURL $.API.APIName $.API.Metadata.UID $.ShapeName -}}
-{{ if ne $crosslinkURL "" -}}
-// Please also see {{ $crosslinkURL }}
-{{ end -}}
-{{ end -}}
-{{ $context := . -}}
-type {{ .ShapeName }} struct {
- _ struct{} {{ .GoTags true false }}
-
- {{ range $_, $name := $context.MemberNames -}}
- {{ $elem := index $context.MemberRefs $name -}}
- {{ $isBlob := $context.WillRefBeBase64Encoded $name -}}
- {{ $isRequired := $context.IsRequired $name -}}
- {{ $doc := $elem.Docstring -}}
-
- {{ if $doc -}}
- {{ $doc }}
- {{ end -}}
- {{ if $isBlob -}}
- {{ if $doc -}}
- //
- {{ end -}}
- // {{ $name }} is automatically base64 encoded/decoded by the SDK.
- {{ end -}}
- {{ if $isRequired -}}
- {{ if or $doc $isBlob -}}
- //
- {{ end -}}
- // {{ $name }} is a required field
- {{ end -}}
- {{ $name }} {{ $context.GoStructType $name $elem }} {{ $elem.GoTags false $isRequired }}
-
- {{ end }}
-}
-{{ if not .API.NoStringerMethods }}
- {{ .GoCodeStringers }}
-{{ end }}
-{{ if not .API.NoValidataShapeMethods }}
- {{ if .Validations -}}
- {{ .Validations.GoCode . }}
- {{ end }}
-{{ end }}
-
-{{ if not .API.NoGenStructFieldAccessors }}
-
-{{ $builderShapeName := print .ShapeName -}}
-
-{{ range $_, $name := $context.MemberNames -}}
- {{ $elem := index $context.MemberRefs $name -}}
-
-// Set{{ $name }} sets the {{ $name }} field's value.
-func (s *{{ $builderShapeName }}) Set{{ $name }}(v {{ $context.GoStructValueType $name $elem }}) *{{ $builderShapeName }} {
- {{ if $elem.UseIndirection -}}
- s.{{ $name }} = &v
- {{ else -}}
- s.{{ $name }} = v
- {{ end -}}
- return s
-}
-
-{{ if $elem.GenerateGetter -}}
-func (s *{{ $builderShapeName }}) get{{ $name }}() (v {{ $context.GoStructValueType $name $elem }}) {
- {{ if $elem.UseIndirection -}}
- if s.{{ $name }} == nil {
- return v
- }
- return *s.{{ $name }}
- {{ else -}}
- return s.{{ $name }}
- {{ end -}}
-}
-{{- end }}
-
-{{ end }}
-{{ end }}
-`))
-
-var enumShapeTmpl = template.Must(template.New("EnumShape").Parse(`
-{{ .Docstring }}
-const (
- {{ $context := . -}}
- {{ range $index, $elem := .Enum -}}
- {{ $name := index $context.EnumConsts $index -}}
- // {{ $name }} is a {{ $context.ShapeName }} enum value
- {{ $name }} = "{{ $elem }}"
-
- {{ end }}
-)
-`))
-
-// GoCode returns the rendered Go code for the Shape.
-func (s *Shape) GoCode() string {
- b := &bytes.Buffer{}
-
- switch {
- case s.Type == "structure":
- if err := structShapeTmpl.Execute(b, s); err != nil {
- panic(fmt.Sprintf("Failed to generate struct shape %s, %v\n", s.ShapeName, err))
- }
- case s.IsEnum():
- if err := enumShapeTmpl.Execute(b, s); err != nil {
- panic(fmt.Sprintf("Failed to generate enum shape %s, %v\n", s.ShapeName, err))
- }
- default:
- panic(fmt.Sprintln("Cannot generate toplevel shape for", s.Type))
- }
-
- return b.String()
-}
-
-// IsEnum returns whether this shape is an enum list
-func (s *Shape) IsEnum() bool {
- return s.Type == "string" && len(s.Enum) > 0
-}
-
-// IsRequired returns if member is a required field.
-func (s *Shape) IsRequired(member string) bool {
- for _, n := range s.Required {
- if n == member {
- return true
- }
- }
- return false
-}
-
-// IsInternal returns whether the shape was defined in this package
-func (s *Shape) IsInternal() bool {
- return s.resolvePkg == ""
-}
-
-// removeRef removes a shape reference from the list of references this
-// shape is used in.
-func (s *Shape) removeRef(ref *ShapeRef) {
- r := s.refs
- for i := 0; i < len(r); i++ {
- if r[i] == ref {
- j := i + 1
- copy(r[i:], r[j:])
- for k, n := len(r)-j+i, len(r); k < n; k++ {
- r[k] = nil // free up the end of the list
- } // for k
- s.refs = r[:len(r)-j+i]
- break
- }
- }
-}
-
-func (s *Shape) WillRefBeBase64Encoded(refName string) bool {
- payloadRefName := s.Payload
- if payloadRefName == refName {
- return false
- }
-
- ref, ok := s.MemberRefs[refName]
- if !ok {
- panic(fmt.Sprintf("shape %s does not contain %q refName", s.ShapeName, refName))
- }
-
- return ref.Shape.Type == "blob"
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/shape_validation.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/shape_validation.go
deleted file mode 100644
index 6f8abfd158c..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/model/api/shape_validation.go
+++ /dev/null
@@ -1,155 +0,0 @@
-// +build codegen
-
-package api
-
-import (
- "bytes"
- "fmt"
- "text/template"
-)
-
-// A ShapeValidationType is the type of validation that a shape needs
-type ShapeValidationType int
-
-const (
- // ShapeValidationRequired states the shape must be set
- ShapeValidationRequired = iota
-
- // ShapeValidationMinVal states the shape must have at least a number of
- // elements, or for numbers a minimum value
- ShapeValidationMinVal
-
- // ShapeValidationNested states the shape has nested values that need
- // to be validated
- ShapeValidationNested
-)
-
-// A ShapeValidation contains information about a shape and the type of validation
-// that is needed
-type ShapeValidation struct {
- // Name of the shape to be validated
- Name string
- // Reference to the shape within the context the shape is referenced
- Ref *ShapeRef
- // Type of validation needed
- Type ShapeValidationType
-}
-
-var validationGoCodeTmpls = template.Must(template.New("validationGoCodeTmpls").Parse(`
-{{ define "requiredValue" -}}
- if s.{{ .Name }} == nil {
- invalidParams.Add(request.NewErrParamRequired("{{ .Name }}"))
- }
-{{- end }}
-{{ define "minLen" -}}
- if s.{{ .Name }} != nil && len(s.{{ .Name }}) < {{ .Ref.Shape.Min }} {
- invalidParams.Add(request.NewErrParamMinLen("{{ .Name }}", {{ .Ref.Shape.Min }}))
- }
-{{- end }}
-{{ define "minLenString" -}}
- if s.{{ .Name }} != nil && len(*s.{{ .Name }}) < {{ .Ref.Shape.Min }} {
- invalidParams.Add(request.NewErrParamMinLen("{{ .Name }}", {{ .Ref.Shape.Min }}))
- }
-{{- end }}
-{{ define "minVal" -}}
- if s.{{ .Name }} != nil && *s.{{ .Name }} < {{ .Ref.Shape.Min }} {
- invalidParams.Add(request.NewErrParamMinValue("{{ .Name }}", {{ .Ref.Shape.Min }}))
- }
-{{- end }}
-{{ define "nestedMapList" -}}
- if s.{{ .Name }} != nil {
- for i, v := range s.{{ .Name }} {
- if v == nil { continue }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "{{ .Name }}", i), err.(request.ErrInvalidParams))
- }
- }
- }
-{{- end }}
-{{ define "nestedStruct" -}}
- if s.{{ .Name }} != nil {
- if err := s.{{ .Name }}.Validate(); err != nil {
- invalidParams.AddNested("{{ .Name }}", err.(request.ErrInvalidParams))
- }
- }
-{{- end }}
-`))
-
-// GoCode returns the generated Go code for the Shape with its validation type.
-func (sv ShapeValidation) GoCode() string {
- var err error
-
- w := &bytes.Buffer{}
- switch sv.Type {
- case ShapeValidationRequired:
- err = validationGoCodeTmpls.ExecuteTemplate(w, "requiredValue", sv)
- case ShapeValidationMinVal:
- switch sv.Ref.Shape.Type {
- case "list", "map", "blob":
- err = validationGoCodeTmpls.ExecuteTemplate(w, "minLen", sv)
- case "string":
- err = validationGoCodeTmpls.ExecuteTemplate(w, "minLenString", sv)
- case "integer", "long", "float", "double":
- err = validationGoCodeTmpls.ExecuteTemplate(w, "minVal", sv)
- default:
- panic(fmt.Sprintf("ShapeValidation.GoCode, %s's type %s, no min value handling",
- sv.Name, sv.Ref.Shape.Type))
- }
- case ShapeValidationNested:
- switch sv.Ref.Shape.Type {
- case "map", "list":
- err = validationGoCodeTmpls.ExecuteTemplate(w, "nestedMapList", sv)
- default:
- err = validationGoCodeTmpls.ExecuteTemplate(w, "nestedStruct", sv)
- }
- default:
- panic(fmt.Sprintf("ShapeValidation.GoCode, %s's type %d, unknown validation type",
- sv.Name, sv.Type))
- }
-
- if err != nil {
- panic(fmt.Sprintf("ShapeValidation.GoCode failed, err: %v", err))
- }
-
- return w.String()
-}
-
-// A ShapeValidations is a collection of shape validations needed nested within
-// a parent shape
-type ShapeValidations []ShapeValidation
-
-var validateShapeTmpl = template.Must(template.New("ValidateShape").Parse(`
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *{{ .Shape.ShapeName }}) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "{{ .Shape.ShapeName }}"}
- {{ range $_, $v := .Validations -}}
- {{ $v.GoCode }}
- {{ end }}
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-`))
-
-// GoCode generates the Go code needed to perform validations for the
-// shape and its nested fields.
-func (vs ShapeValidations) GoCode(shape *Shape) string {
- buf := &bytes.Buffer{}
- validateShapeTmpl.Execute(buf, map[string]interface{}{
- "Shape": shape,
- "Validations": vs,
- })
- return buf.String()
-}
-
-// Has returns true or false if the ShapeValidations already contains the
-// the reference and validation type.
-func (vs ShapeValidations) Has(ref *ShapeRef, typ ShapeValidationType) bool {
- for _, v := range vs {
- if v.Ref == ref && v.Type == typ {
- return true
- }
- }
- return false
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/api/waiters.go b/vendor/github.com/aws/aws-sdk-go/private/model/api/waiters.go
deleted file mode 100644
index 796d40ecdfc..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/model/api/waiters.go
+++ /dev/null
@@ -1,189 +0,0 @@
-// +build codegen
-
-package api
-
-import (
- "bytes"
- "encoding/json"
- "fmt"
- "os"
- "sort"
- "strings"
- "text/template"
-)
-
-// WaiterAcceptor is the acceptors defined in the model the SDK will use
-// to wait on resource states with.
-type WaiterAcceptor struct {
- State string
- Matcher string
- Argument string
- Expected interface{}
-}
-
-// ExpectedString returns the string that was expected by the WaiterAcceptor
-func (a *WaiterAcceptor) ExpectedString() string {
- switch a.Expected.(type) {
- case string:
- return fmt.Sprintf("%q", a.Expected)
- default:
- return fmt.Sprintf("%v", a.Expected)
- }
-}
-
-// A Waiter is an individual waiter definition.
-type Waiter struct {
- Name string
- Delay int
- MaxAttempts int
- OperationName string `json:"operation"`
- Operation *Operation
- Acceptors []WaiterAcceptor
-}
-
-// WaitersGoCode generates and returns Go code for each of the waiters of
-// this API.
-func (a *API) WaitersGoCode() string {
- var buf bytes.Buffer
- fmt.Fprintf(&buf, "import (\n%q\n\n%q\n%q\n)",
- "time",
- "github.com/aws/aws-sdk-go/aws",
- "github.com/aws/aws-sdk-go/aws/request",
- )
-
- for _, w := range a.Waiters {
- buf.WriteString(w.GoCode())
- }
- return buf.String()
-}
-
-// used for unmarshaling from the waiter JSON file
-type waiterDefinitions struct {
- *API
- Waiters map[string]Waiter
-}
-
-// AttachWaiters reads a file of waiter definitions, and adds those to the API.
-// Will panic if an error occurs.
-func (a *API) AttachWaiters(filename string) {
- p := waiterDefinitions{API: a}
-
- f, err := os.Open(filename)
- defer f.Close()
- if err != nil {
- panic(err)
- }
- err = json.NewDecoder(f).Decode(&p)
- if err != nil {
- panic(err)
- }
-
- p.setup()
-}
-
-func (p *waiterDefinitions) setup() {
- p.API.Waiters = []Waiter{}
- i, keys := 0, make([]string, len(p.Waiters))
- for k := range p.Waiters {
- keys[i] = k
- i++
- }
- sort.Strings(keys)
-
- for _, n := range keys {
- e := p.Waiters[n]
- n = p.ExportableName(n)
- e.Name = n
- e.OperationName = p.ExportableName(e.OperationName)
- e.Operation = p.API.Operations[e.OperationName]
- if e.Operation == nil {
- panic("unknown operation " + e.OperationName + " for waiter " + n)
- }
- p.API.Waiters = append(p.API.Waiters, e)
- }
-}
-
-var waiterTmpls = template.Must(template.New("waiterTmpls").Funcs(
- template.FuncMap{
- "titleCase": func(v string) string {
- return strings.Title(v)
- },
- },
-).Parse(`
-{{ define "waiter"}}
-// WaitUntil{{ .Name }} uses the {{ .Operation.API.NiceName }} API operation
-// {{ .OperationName }} to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
-// be returned.
-func (c *{{ .Operation.API.StructName }}) WaitUntil{{ .Name }}(input {{ .Operation.InputRef.GoType }}) error {
- return c.WaitUntil{{ .Name }}WithContext(aws.BackgroundContext(), input)
-}
-
-// WaitUntil{{ .Name }}WithContext is an extended version of WaitUntil{{ .Name }}.
-// With the support for passing in a context and options to configure the
-// Waiter and the underlying request options.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *{{ .Operation.API.StructName }}) WaitUntil{{ .Name }}WithContext(` +
- `ctx aws.Context, input {{ .Operation.InputRef.GoType }}, opts ...request.WaiterOption) error {
- w := request.Waiter{
- Name: "WaitUntil{{ .Name }}",
- MaxAttempts: {{ .MaxAttempts }},
- Delay: request.ConstantWaiterDelay({{ .Delay }} * time.Second),
- Acceptors: []request.WaiterAcceptor{
- {{ range $_, $a := .Acceptors }}{
- State: request.{{ titleCase .State }}WaiterState,
- Matcher: request.{{ titleCase .Matcher }}WaiterMatch,
- {{- if .Argument }}Argument: "{{ .Argument }}",{{ end }}
- Expected: {{ .ExpectedString }},
- },
- {{ end }}
- },
- Logger: c.Config.Logger,
- NewRequest: func(opts []request.Option) (*request.Request, error) {
- var inCpy {{ .Operation.InputRef.GoType }}
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.{{ .OperationName }}Request(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- w.ApplyOptions(opts...)
-
- return w.WaitWithContext(ctx)
-}
-{{- end }}
-
-{{ define "waiter interface" }}
-WaitUntil{{ .Name }}({{ .Operation.InputRef.GoTypeWithPkgName }}) error
-WaitUntil{{ .Name }}WithContext(aws.Context, {{ .Operation.InputRef.GoTypeWithPkgName }}, ...request.WaiterOption) error
-{{- end }}
-`))
-
-// InterfaceSignature returns a string representing the Waiter's interface
-// function signature.
-func (w *Waiter) InterfaceSignature() string {
- var buf bytes.Buffer
- if err := waiterTmpls.ExecuteTemplate(&buf, "waiter interface", w); err != nil {
- panic(err)
- }
-
- return strings.TrimSpace(buf.String())
-}
-
-// GoCode returns the generated Go code for an individual waiter.
-func (w *Waiter) GoCode() string {
- var buf bytes.Buffer
- if err := waiterTmpls.ExecuteTemplate(&buf, "waiter", w); err != nil {
- panic(err)
- }
-
- return buf.String()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/cli/api-info/api-info.go b/vendor/github.com/aws/aws-sdk-go/private/model/cli/api-info/api-info.go
deleted file mode 100644
index ee2b66d6492..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/model/cli/api-info/api-info.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// +build codegen
-
-package main
-
-import (
- "fmt"
- "os"
- "path/filepath"
- "sort"
-
- "github.com/aws/aws-sdk-go/private/model/api"
-)
-
-func main() {
- dir, _ := os.Open(filepath.Join("models", "apis"))
- names, _ := dir.Readdirnames(0)
- for _, name := range names {
- m, _ := filepath.Glob(filepath.Join("models", "apis", name, "*", "api-2.json"))
- if len(m) == 0 {
- continue
- }
-
- sort.Strings(m)
- f := m[len(m)-1]
- a := api.API{}
- a.Attach(f)
- fmt.Printf("%s\t%s\n", a.Metadata.ServiceFullName, a.Metadata.APIVersion)
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/cli/gen-api/main.go b/vendor/github.com/aws/aws-sdk-go/private/model/cli/gen-api/main.go
deleted file mode 100644
index 005a74d6adc..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/model/cli/gen-api/main.go
+++ /dev/null
@@ -1,303 +0,0 @@
-// +build codegen
-
-// Command aws-gen-gocli parses a JSON description of an AWS API and generates a
-// Go file containing a client for the API.
-//
-// aws-gen-gocli apis/s3/2006-03-03/api-2.json
-package main
-
-import (
- "flag"
- "fmt"
- "io/ioutil"
- "os"
- "path/filepath"
- "runtime/debug"
- "sort"
- "strings"
- "sync"
-
- "github.com/aws/aws-sdk-go/private/model/api"
- "github.com/aws/aws-sdk-go/private/util"
-)
-
-type generateInfo struct {
- *api.API
- PackageDir string
-}
-
-var excludeServices = map[string]struct{}{
- "importexport": {},
-}
-
-// newGenerateInfo initializes the service API's folder structure for a specific service.
-// If the SERVICES environment variable is set, and this service is not apart of the list
-// this service will be skipped.
-func newGenerateInfo(modelFile, svcPath, svcImportPath string) *generateInfo {
- g := &generateInfo{API: &api.API{SvcClientImportPath: svcImportPath, BaseCrosslinkURL: "https://docs.aws.amazon.com"}}
- g.API.Attach(modelFile)
-
- if _, ok := excludeServices[g.API.PackageName()]; ok {
- return nil
- }
-
- paginatorsFile := strings.Replace(modelFile, "api-2.json", "paginators-1.json", -1)
- if _, err := os.Stat(paginatorsFile); err == nil {
- g.API.AttachPaginators(paginatorsFile)
- } else if !os.IsNotExist(err) {
- fmt.Println("api-2.json error:", err)
- }
-
- docsFile := strings.Replace(modelFile, "api-2.json", "docs-2.json", -1)
- if _, err := os.Stat(docsFile); err == nil {
- g.API.AttachDocs(docsFile)
- } else {
- fmt.Println("docs-2.json error:", err)
- }
-
- waitersFile := strings.Replace(modelFile, "api-2.json", "waiters-2.json", -1)
- if _, err := os.Stat(waitersFile); err == nil {
- g.API.AttachWaiters(waitersFile)
- } else if !os.IsNotExist(err) {
- fmt.Println("waiters-2.json error:", err)
- }
-
- examplesFile := strings.Replace(modelFile, "api-2.json", "examples-1.json", -1)
- if _, err := os.Stat(examplesFile); err == nil {
- g.API.AttachExamples(examplesFile)
- } else if !os.IsNotExist(err) {
- fmt.Println("examples-1.json error:", err)
- }
-
- // pkgDocAddonsFile := strings.Replace(modelFile, "api-2.json", "go-pkg-doc.gotmpl", -1)
- // if _, err := os.Stat(pkgDocAddonsFile); err == nil {
- // g.API.AttachPackageDocAddons(pkgDocAddonsFile)
- // } else if !os.IsNotExist(err) {
- // fmt.Println("go-pkg-doc.gotmpl error:", err)
- // }
-
- g.API.Setup()
-
- if svc := os.Getenv("SERVICES"); svc != "" {
- svcs := strings.Split(svc, ",")
-
- included := false
- for _, s := range svcs {
- if s == g.API.PackageName() {
- included = true
- break
- }
- }
- if !included {
- // skip this non-included service
- return nil
- }
- }
-
- // ensure the directory exists
- pkgDir := filepath.Join(svcPath, g.API.PackageName())
- os.MkdirAll(pkgDir, 0775)
- os.MkdirAll(filepath.Join(pkgDir, g.API.InterfacePackageName()), 0775)
-
- g.PackageDir = pkgDir
-
- return g
-}
-
-// Generates service api, examples, and interface from api json definition files.
-//
-// Flags:
-// -path alternative service path to write generated files to for each service.
-//
-// Env:
-// SERVICES comma separated list of services to generate.
-func main() {
- var svcPath, sessionPath, svcImportPath string
- flag.StringVar(&svcPath, "path", "service", "directory to generate service clients in")
- flag.StringVar(&sessionPath, "sessionPath", filepath.Join("aws", "session"), "generate session service client factories")
- flag.StringVar(&svcImportPath, "svc-import-path", "github.com/aws/aws-sdk-go/service", "namespace to generate service client Go code import path under")
- flag.Parse()
- api.Bootstrap()
-
- files := []string{}
- for i := 0; i < flag.NArg(); i++ {
- file := flag.Arg(i)
- if strings.Contains(file, "*") {
- paths, _ := filepath.Glob(file)
- files = append(files, paths...)
- } else {
- files = append(files, file)
- }
- }
-
- for svcName := range excludeServices {
- if strings.Contains(os.Getenv("SERVICES"), svcName) {
- fmt.Printf("Service %s is not supported\n", svcName)
- os.Exit(1)
- }
- }
-
- sort.Strings(files)
-
- // Remove old API versions from list
- m := map[string]bool{}
- for i := range files {
- idx := len(files) - 1 - i
- parts := strings.Split(files[idx], string(filepath.Separator))
- svc := parts[len(parts)-3] // service name is 2nd-to-last component
-
- if m[svc] {
- files[idx] = "" // wipe this one out if we already saw the service
- }
- m[svc] = true
- }
-
- wg := sync.WaitGroup{}
- for i := range files {
- filename := files[i]
- if filename == "" { // empty file
- continue
- }
-
- genInfo := newGenerateInfo(filename, svcPath, svcImportPath)
- if genInfo == nil {
- continue
- }
- if _, ok := excludeServices[genInfo.API.PackageName()]; ok {
- // Skip services not yet supported.
- continue
- }
-
- wg.Add(1)
- go func(g *generateInfo, filename string) {
- defer wg.Done()
- writeServiceFiles(g, filename)
- }(genInfo, filename)
- }
-
- wg.Wait()
-}
-
-func writeServiceFiles(g *generateInfo, filename string) {
- defer func() {
- if r := recover(); r != nil {
- fmt.Fprintf(os.Stderr, "Error generating %s\n%s\n%s\n",
- filename, r, debug.Stack())
- }
- }()
-
- fmt.Printf("Generating %s (%s)...\n",
- g.API.PackageName(), g.API.Metadata.APIVersion)
-
- // write files for service client and API
- Must(writeServiceDocFile(g))
- Must(writeAPIFile(g))
- Must(writeServiceFile(g))
- Must(writeInterfaceFile(g))
- Must(writeWaitersFile(g))
- Must(writeAPIErrorsFile(g))
- Must(writeExamplesFile(g))
-}
-
-// Must will panic if the error passed in is not nil.
-func Must(err error) {
- if err != nil {
- panic(err)
- }
-}
-
-const codeLayout = `// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-%s
-package %s
-
-%s
-`
-
-func writeGoFile(file string, layout string, args ...interface{}) error {
- return ioutil.WriteFile(file, []byte(util.GoFmt(fmt.Sprintf(layout, args...))), 0664)
-}
-
-// writeServiceDocFile generates the documentation for service package.
-func writeServiceDocFile(g *generateInfo) error {
- return writeGoFile(filepath.Join(g.PackageDir, "doc.go"),
- codeLayout,
- strings.TrimSpace(g.API.ServicePackageDoc()),
- g.API.PackageName(),
- "",
- )
-}
-
-// writeExamplesFile writes out the service example file.
-func writeExamplesFile(g *generateInfo) error {
- code := g.API.ExamplesGoCode()
- if len(code) > 0 {
- return writeGoFile(filepath.Join(g.PackageDir, "examples_test.go"),
- codeLayout,
- "",
- g.API.PackageName()+"_test",
- code,
- )
- }
- return nil
-}
-
-// writeServiceFile writes out the service initialization file.
-func writeServiceFile(g *generateInfo) error {
- return writeGoFile(filepath.Join(g.PackageDir, "service.go"),
- codeLayout,
- "",
- g.API.PackageName(),
- g.API.ServiceGoCode(),
- )
-}
-
-// writeInterfaceFile writes out the service interface file.
-func writeInterfaceFile(g *generateInfo) error {
- const pkgDoc = `
-// Package %s provides an interface to enable mocking the %s service client
-// for testing your code.
-//
-// It is important to note that this interface will have breaking changes
-// when the service model is updated and adds new API operations, paginators,
-// and waiters.`
- return writeGoFile(filepath.Join(g.PackageDir, g.API.InterfacePackageName(), "interface.go"),
- codeLayout,
- fmt.Sprintf(pkgDoc, g.API.InterfacePackageName(), g.API.Metadata.ServiceFullName),
- g.API.InterfacePackageName(),
- g.API.InterfaceGoCode(),
- )
-}
-
-func writeWaitersFile(g *generateInfo) error {
- if len(g.API.Waiters) == 0 {
- return nil
- }
-
- return writeGoFile(filepath.Join(g.PackageDir, "waiters.go"),
- codeLayout,
- "",
- g.API.PackageName(),
- g.API.WaitersGoCode(),
- )
-}
-
-// writeAPIFile writes out the service API file.
-func writeAPIFile(g *generateInfo) error {
- return writeGoFile(filepath.Join(g.PackageDir, "api.go"),
- codeLayout,
- "",
- g.API.PackageName(),
- g.API.APIGoCode(),
- )
-}
-
-// writeAPIErrorsFile writes out the service API errors file.
-func writeAPIErrorsFile(g *generateInfo) error {
- return writeGoFile(filepath.Join(g.PackageDir, "errors.go"),
- codeLayout,
- "",
- g.API.PackageName(),
- g.API.APIErrorsGoCode(),
- )
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/model/cli/gen-endpoints/main.go b/vendor/github.com/aws/aws-sdk-go/private/model/cli/gen-endpoints/main.go
deleted file mode 100644
index 961eaaf2adc..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/model/cli/gen-endpoints/main.go
+++ /dev/null
@@ -1,56 +0,0 @@
-// +build codegen
-
-// Command gen-endpoints parses a JSON description of the AWS endpoint
-// discovery logic and generates a Go file which returns an endpoint.
-//
-// aws-gen-goendpoints apis/_endpoints.json aws/endpoints_map.go
-package main
-
-import (
- "flag"
- "fmt"
- "os"
-
- "github.com/aws/aws-sdk-go/aws/endpoints"
-)
-
-// Generates the endpoints from json description
-//
-// Args:
-// -model The definition file to use
-// -out The output file to generate
-func main() {
- var modelName, outName string
- flag.StringVar(&modelName, "model", "", "Endpoints definition model")
- flag.StringVar(&outName, "out", "", "File to write generated endpoints to.")
- flag.Parse()
-
- if len(modelName) == 0 || len(outName) == 0 {
- exitErrorf("model and out both required.")
- }
-
- modelFile, err := os.Open(modelName)
- if err != nil {
- exitErrorf("failed to open model definition, %v.", err)
- }
- defer modelFile.Close()
-
- outFile, err := os.Create(outName)
- if err != nil {
- exitErrorf("failed to open out file, %v.", err)
- }
- defer func() {
- if err := outFile.Close(); err != nil {
- exitErrorf("failed to successfully write %q file, %v", outName, err)
- }
- }()
-
- if err := endpoints.CodeGenModel(modelFile, outFile); err != nil {
- exitErrorf("failed to codegen model, %v", err)
- }
-}
-
-func exitErrorf(msg string, args ...interface{}) {
- fmt.Fprintf(os.Stderr, msg+"\n", args...)
- os.Exit(1)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go
deleted file mode 100644
index 6efe43d5f39..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go
+++ /dev/null
@@ -1,279 +0,0 @@
-// Package jsonutil provides JSON serialization of AWS requests and responses.
-package jsonutil
-
-import (
- "bytes"
- "encoding/base64"
- "encoding/json"
- "fmt"
- "math"
- "reflect"
- "sort"
- "strconv"
- "time"
-
- "github.com/aws/aws-sdk-go/private/protocol"
-)
-
-var timeType = reflect.ValueOf(time.Time{}).Type()
-var byteSliceType = reflect.ValueOf([]byte{}).Type()
-
-// BuildJSON builds a JSON string for a given object v.
-func BuildJSON(v interface{}) ([]byte, error) {
- var buf bytes.Buffer
-
- err := buildAny(reflect.ValueOf(v), &buf, "")
- return buf.Bytes(), err
-}
-
-func buildAny(value reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) error {
- origVal := value
- value = reflect.Indirect(value)
- if !value.IsValid() {
- return nil
- }
-
- vtype := value.Type()
-
- t := tag.Get("type")
- if t == "" {
- switch vtype.Kind() {
- case reflect.Struct:
- // also it can't be a time object
- if value.Type() != timeType {
- t = "structure"
- }
- case reflect.Slice:
- // also it can't be a byte slice
- if _, ok := value.Interface().([]byte); !ok {
- t = "list"
- }
- case reflect.Map:
- t = "map"
- }
- }
-
- switch t {
- case "structure":
- if field, ok := vtype.FieldByName("_"); ok {
- tag = field.Tag
- }
- return buildStruct(value, buf, tag)
- case "list":
- return buildList(value, buf, tag)
- case "map":
- return buildMap(value, buf, tag)
- default:
- return buildScalar(origVal, buf, tag)
- }
-}
-
-func buildStruct(value reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) error {
- if !value.IsValid() {
- return nil
- }
-
- // unwrap payloads
- if payload := tag.Get("payload"); payload != "" {
- field, _ := value.Type().FieldByName(payload)
- tag = field.Tag
- value = elemOf(value.FieldByName(payload))
-
- if !value.IsValid() {
- return nil
- }
- }
-
- buf.WriteByte('{')
-
- t := value.Type()
- first := true
- for i := 0; i < t.NumField(); i++ {
- member := value.Field(i)
-
- // This allocates the most memory.
- // Additionally, we cannot skip nil fields due to
- // idempotency auto filling.
- field := t.Field(i)
-
- if field.PkgPath != "" {
- continue // ignore unexported fields
- }
- if field.Tag.Get("json") == "-" {
- continue
- }
- if field.Tag.Get("location") != "" {
- continue // ignore non-body elements
- }
- if field.Tag.Get("ignore") != "" {
- continue
- }
-
- if protocol.CanSetIdempotencyToken(member, field) {
- token := protocol.GetIdempotencyToken()
- member = reflect.ValueOf(&token)
- }
-
- if (member.Kind() == reflect.Ptr || member.Kind() == reflect.Slice || member.Kind() == reflect.Map) && member.IsNil() {
- continue // ignore unset fields
- }
-
- if first {
- first = false
- } else {
- buf.WriteByte(',')
- }
-
- // figure out what this field is called
- name := field.Name
- if locName := field.Tag.Get("locationName"); locName != "" {
- name = locName
- }
-
- writeString(name, buf)
- buf.WriteString(`:`)
-
- err := buildAny(member, buf, field.Tag)
- if err != nil {
- return err
- }
-
- }
-
- buf.WriteString("}")
-
- return nil
-}
-
-func buildList(value reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) error {
- buf.WriteString("[")
-
- for i := 0; i < value.Len(); i++ {
- buildAny(value.Index(i), buf, "")
-
- if i < value.Len()-1 {
- buf.WriteString(",")
- }
- }
-
- buf.WriteString("]")
-
- return nil
-}
-
-type sortedValues []reflect.Value
-
-func (sv sortedValues) Len() int { return len(sv) }
-func (sv sortedValues) Swap(i, j int) { sv[i], sv[j] = sv[j], sv[i] }
-func (sv sortedValues) Less(i, j int) bool { return sv[i].String() < sv[j].String() }
-
-func buildMap(value reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) error {
- buf.WriteString("{")
-
- sv := sortedValues(value.MapKeys())
- sort.Sort(sv)
-
- for i, k := range sv {
- if i > 0 {
- buf.WriteByte(',')
- }
-
- writeString(k.String(), buf)
- buf.WriteString(`:`)
-
- buildAny(value.MapIndex(k), buf, "")
- }
-
- buf.WriteString("}")
-
- return nil
-}
-
-func buildScalar(v reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) error {
- // prevents allocation on the heap.
- scratch := [64]byte{}
- switch value := reflect.Indirect(v); value.Kind() {
- case reflect.String:
- writeString(value.String(), buf)
- case reflect.Bool:
- if value.Bool() {
- buf.WriteString("true")
- } else {
- buf.WriteString("false")
- }
- case reflect.Int64:
- buf.Write(strconv.AppendInt(scratch[:0], value.Int(), 10))
- case reflect.Float64:
- f := value.Float()
- if math.IsInf(f, 0) || math.IsNaN(f) {
- return &json.UnsupportedValueError{Value: v, Str: strconv.FormatFloat(f, 'f', -1, 64)}
- }
- buf.Write(strconv.AppendFloat(scratch[:0], f, 'f', -1, 64))
- default:
- switch value.Type() {
- case timeType:
- converted := v.Interface().(*time.Time)
-
- buf.Write(strconv.AppendInt(scratch[:0], converted.UTC().Unix(), 10))
- case byteSliceType:
- if !value.IsNil() {
- converted := value.Interface().([]byte)
- buf.WriteByte('"')
- if len(converted) < 1024 {
- // for small buffers, using Encode directly is much faster.
- dst := make([]byte, base64.StdEncoding.EncodedLen(len(converted)))
- base64.StdEncoding.Encode(dst, converted)
- buf.Write(dst)
- } else {
- // for large buffers, avoid unnecessary extra temporary
- // buffer space.
- enc := base64.NewEncoder(base64.StdEncoding, buf)
- enc.Write(converted)
- enc.Close()
- }
- buf.WriteByte('"')
- }
- default:
- return fmt.Errorf("unsupported JSON value %v (%s)", value.Interface(), value.Type())
- }
- }
- return nil
-}
-
-var hex = "0123456789abcdef"
-
-func writeString(s string, buf *bytes.Buffer) {
- buf.WriteByte('"')
- for i := 0; i < len(s); i++ {
- if s[i] == '"' {
- buf.WriteString(`\"`)
- } else if s[i] == '\\' {
- buf.WriteString(`\\`)
- } else if s[i] == '\b' {
- buf.WriteString(`\b`)
- } else if s[i] == '\f' {
- buf.WriteString(`\f`)
- } else if s[i] == '\r' {
- buf.WriteString(`\r`)
- } else if s[i] == '\t' {
- buf.WriteString(`\t`)
- } else if s[i] == '\n' {
- buf.WriteString(`\n`)
- } else if s[i] < 32 {
- buf.WriteString("\\u00")
- buf.WriteByte(hex[s[i]>>4])
- buf.WriteByte(hex[s[i]&0xF])
- } else {
- buf.WriteByte(s[i])
- }
- }
- buf.WriteByte('"')
-}
-
-// Returns the reflection element of a value, if it is a pointer.
-func elemOf(value reflect.Value) reflect.Value {
- for value.Kind() == reflect.Ptr {
- value = value.Elem()
- }
- return value
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go
deleted file mode 100644
index fea53561366..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go
+++ /dev/null
@@ -1,213 +0,0 @@
-package jsonutil
-
-import (
- "encoding/base64"
- "encoding/json"
- "fmt"
- "io"
- "io/ioutil"
- "reflect"
- "time"
-)
-
-// UnmarshalJSON reads a stream and unmarshals the results in object v.
-func UnmarshalJSON(v interface{}, stream io.Reader) error {
- var out interface{}
-
- b, err := ioutil.ReadAll(stream)
- if err != nil {
- return err
- }
-
- if len(b) == 0 {
- return nil
- }
-
- if err := json.Unmarshal(b, &out); err != nil {
- return err
- }
-
- return unmarshalAny(reflect.ValueOf(v), out, "")
-}
-
-func unmarshalAny(value reflect.Value, data interface{}, tag reflect.StructTag) error {
- vtype := value.Type()
- if vtype.Kind() == reflect.Ptr {
- vtype = vtype.Elem() // check kind of actual element type
- }
-
- t := tag.Get("type")
- if t == "" {
- switch vtype.Kind() {
- case reflect.Struct:
- // also it can't be a time object
- if _, ok := value.Interface().(*time.Time); !ok {
- t = "structure"
- }
- case reflect.Slice:
- // also it can't be a byte slice
- if _, ok := value.Interface().([]byte); !ok {
- t = "list"
- }
- case reflect.Map:
- t = "map"
- }
- }
-
- switch t {
- case "structure":
- if field, ok := vtype.FieldByName("_"); ok {
- tag = field.Tag
- }
- return unmarshalStruct(value, data, tag)
- case "list":
- return unmarshalList(value, data, tag)
- case "map":
- return unmarshalMap(value, data, tag)
- default:
- return unmarshalScalar(value, data, tag)
- }
-}
-
-func unmarshalStruct(value reflect.Value, data interface{}, tag reflect.StructTag) error {
- if data == nil {
- return nil
- }
- mapData, ok := data.(map[string]interface{})
- if !ok {
- return fmt.Errorf("JSON value is not a structure (%#v)", data)
- }
-
- t := value.Type()
- if value.Kind() == reflect.Ptr {
- if value.IsNil() { // create the structure if it's nil
- s := reflect.New(value.Type().Elem())
- value.Set(s)
- value = s
- }
-
- value = value.Elem()
- t = t.Elem()
- }
-
- // unwrap any payloads
- if payload := tag.Get("payload"); payload != "" {
- field, _ := t.FieldByName(payload)
- return unmarshalAny(value.FieldByName(payload), data, field.Tag)
- }
-
- for i := 0; i < t.NumField(); i++ {
- field := t.Field(i)
- if field.PkgPath != "" {
- continue // ignore unexported fields
- }
-
- // figure out what this field is called
- name := field.Name
- if locName := field.Tag.Get("locationName"); locName != "" {
- name = locName
- }
-
- member := value.FieldByIndex(field.Index)
- err := unmarshalAny(member, mapData[name], field.Tag)
- if err != nil {
- return err
- }
- }
- return nil
-}
-
-func unmarshalList(value reflect.Value, data interface{}, tag reflect.StructTag) error {
- if data == nil {
- return nil
- }
- listData, ok := data.([]interface{})
- if !ok {
- return fmt.Errorf("JSON value is not a list (%#v)", data)
- }
-
- if value.IsNil() {
- l := len(listData)
- value.Set(reflect.MakeSlice(value.Type(), l, l))
- }
-
- for i, c := range listData {
- err := unmarshalAny(value.Index(i), c, "")
- if err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func unmarshalMap(value reflect.Value, data interface{}, tag reflect.StructTag) error {
- if data == nil {
- return nil
- }
- mapData, ok := data.(map[string]interface{})
- if !ok {
- return fmt.Errorf("JSON value is not a map (%#v)", data)
- }
-
- if value.IsNil() {
- value.Set(reflect.MakeMap(value.Type()))
- }
-
- for k, v := range mapData {
- kvalue := reflect.ValueOf(k)
- vvalue := reflect.New(value.Type().Elem()).Elem()
-
- unmarshalAny(vvalue, v, "")
- value.SetMapIndex(kvalue, vvalue)
- }
-
- return nil
-}
-
-func unmarshalScalar(value reflect.Value, data interface{}, tag reflect.StructTag) error {
- errf := func() error {
- return fmt.Errorf("unsupported value: %v (%s)", value.Interface(), value.Type())
- }
-
- switch d := data.(type) {
- case nil:
- return nil // nothing to do here
- case string:
- switch value.Interface().(type) {
- case *string:
- value.Set(reflect.ValueOf(&d))
- case []byte:
- b, err := base64.StdEncoding.DecodeString(d)
- if err != nil {
- return err
- }
- value.Set(reflect.ValueOf(b))
- default:
- return errf()
- }
- case float64:
- switch value.Interface().(type) {
- case *int64:
- di := int64(d)
- value.Set(reflect.ValueOf(&di))
- case *float64:
- value.Set(reflect.ValueOf(&d))
- case *time.Time:
- t := time.Unix(int64(d), 0).UTC()
- value.Set(reflect.ValueOf(&t))
- default:
- return errf()
- }
- case bool:
- switch value.Interface().(type) {
- case *bool:
- value.Set(reflect.ValueOf(&d))
- default:
- return errf()
- }
- default:
- return fmt.Errorf("unsupported JSON value (%v)", data)
- }
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/jsonrpc.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/jsonrpc.go
deleted file mode 100644
index 56af4dc4426..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/jsonrpc.go
+++ /dev/null
@@ -1,111 +0,0 @@
-// Package jsonrpc provides JSON RPC utilities for serialization of AWS
-// requests and responses.
-package jsonrpc
-
-//go:generate go run -tags codegen ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/input/json.json build_test.go
-//go:generate go run -tags codegen ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/output/json.json unmarshal_test.go
-
-import (
- "encoding/json"
- "io/ioutil"
- "strings"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil"
- "github.com/aws/aws-sdk-go/private/protocol/rest"
-)
-
-var emptyJSON = []byte("{}")
-
-// BuildHandler is a named request handler for building jsonrpc protocol requests
-var BuildHandler = request.NamedHandler{Name: "awssdk.jsonrpc.Build", Fn: Build}
-
-// UnmarshalHandler is a named request handler for unmarshaling jsonrpc protocol requests
-var UnmarshalHandler = request.NamedHandler{Name: "awssdk.jsonrpc.Unmarshal", Fn: Unmarshal}
-
-// UnmarshalMetaHandler is a named request handler for unmarshaling jsonrpc protocol request metadata
-var UnmarshalMetaHandler = request.NamedHandler{Name: "awssdk.jsonrpc.UnmarshalMeta", Fn: UnmarshalMeta}
-
-// UnmarshalErrorHandler is a named request handler for unmarshaling jsonrpc protocol request errors
-var UnmarshalErrorHandler = request.NamedHandler{Name: "awssdk.jsonrpc.UnmarshalError", Fn: UnmarshalError}
-
-// Build builds a JSON payload for a JSON RPC request.
-func Build(req *request.Request) {
- var buf []byte
- var err error
- if req.ParamsFilled() {
- buf, err = jsonutil.BuildJSON(req.Params)
- if err != nil {
- req.Error = awserr.New("SerializationError", "failed encoding JSON RPC request", err)
- return
- }
- } else {
- buf = emptyJSON
- }
-
- if req.ClientInfo.TargetPrefix != "" || string(buf) != "{}" {
- req.SetBufferBody(buf)
- }
-
- if req.ClientInfo.TargetPrefix != "" {
- target := req.ClientInfo.TargetPrefix + "." + req.Operation.Name
- req.HTTPRequest.Header.Add("X-Amz-Target", target)
- }
- if req.ClientInfo.JSONVersion != "" {
- jsonVersion := req.ClientInfo.JSONVersion
- req.HTTPRequest.Header.Add("Content-Type", "application/x-amz-json-"+jsonVersion)
- }
-}
-
-// Unmarshal unmarshals a response for a JSON RPC service.
-func Unmarshal(req *request.Request) {
- defer req.HTTPResponse.Body.Close()
- if req.DataFilled() {
- err := jsonutil.UnmarshalJSON(req.Data, req.HTTPResponse.Body)
- if err != nil {
- req.Error = awserr.New("SerializationError", "failed decoding JSON RPC response", err)
- }
- }
- return
-}
-
-// UnmarshalMeta unmarshals headers from a response for a JSON RPC service.
-func UnmarshalMeta(req *request.Request) {
- rest.UnmarshalMeta(req)
-}
-
-// UnmarshalError unmarshals an error response for a JSON RPC service.
-func UnmarshalError(req *request.Request) {
- defer req.HTTPResponse.Body.Close()
- bodyBytes, err := ioutil.ReadAll(req.HTTPResponse.Body)
- if err != nil {
- req.Error = awserr.New("SerializationError", "failed reading JSON RPC error response", err)
- return
- }
- if len(bodyBytes) == 0 {
- req.Error = awserr.NewRequestFailure(
- awserr.New("SerializationError", req.HTTPResponse.Status, nil),
- req.HTTPResponse.StatusCode,
- "",
- )
- return
- }
- var jsonErr jsonErrorResponse
- if err := json.Unmarshal(bodyBytes, &jsonErr); err != nil {
- req.Error = awserr.New("SerializationError", "failed decoding JSON RPC error response", err)
- return
- }
-
- codes := strings.SplitN(jsonErr.Code, "#", 2)
- req.Error = awserr.NewRequestFailure(
- awserr.New(codes[len(codes)-1], jsonErr.Message, nil),
- req.HTTPResponse.StatusCode,
- req.RequestID,
- )
-}
-
-type jsonErrorResponse struct {
- Code string `json:"__type"`
- Message string `json:"message"`
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonvalue.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonvalue.go
new file mode 100644
index 00000000000..776d1101843
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonvalue.go
@@ -0,0 +1,76 @@
+package protocol
+
+import (
+ "encoding/base64"
+ "encoding/json"
+ "fmt"
+ "strconv"
+
+ "github.com/aws/aws-sdk-go/aws"
+)
+
+// EscapeMode is the mode that should be use for escaping a value
+type EscapeMode uint
+
+// The modes for escaping a value before it is marshaled, and unmarshaled.
+const (
+ NoEscape EscapeMode = iota
+ Base64Escape
+ QuotedEscape
+)
+
+// EncodeJSONValue marshals the value into a JSON string, and optionally base64
+// encodes the string before returning it.
+//
+// Will panic if the escape mode is unknown.
+func EncodeJSONValue(v aws.JSONValue, escape EscapeMode) (string, error) {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return "", err
+ }
+
+ switch escape {
+ case NoEscape:
+ return string(b), nil
+ case Base64Escape:
+ return base64.StdEncoding.EncodeToString(b), nil
+ case QuotedEscape:
+ return strconv.Quote(string(b)), nil
+ }
+
+ panic(fmt.Sprintf("EncodeJSONValue called with unknown EscapeMode, %v", escape))
+}
+
+// DecodeJSONValue will attempt to decode the string input as a JSONValue.
+// Optionally decoding base64 the value first before JSON unmarshaling.
+//
+// Will panic if the escape mode is unknown.
+func DecodeJSONValue(v string, escape EscapeMode) (aws.JSONValue, error) {
+ var b []byte
+ var err error
+
+ switch escape {
+ case NoEscape:
+ b = []byte(v)
+ case Base64Escape:
+ b, err = base64.StdEncoding.DecodeString(v)
+ case QuotedEscape:
+ var u string
+ u, err = strconv.Unquote(v)
+ b = []byte(u)
+ default:
+ panic(fmt.Sprintf("DecodeJSONValue called with unknown EscapeMode, %v", escape))
+ }
+
+ if err != nil {
+ return nil, err
+ }
+
+ m := aws.JSONValue{}
+ err = json.Unmarshal(b, &m)
+ if err != nil {
+ return nil, err
+ }
+
+ return m, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go
index 524ca952adf..5ce9cba3291 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go
@@ -121,6 +121,10 @@ func (q *queryParser) parseList(v url.Values, value reflect.Value, prefix string
return nil
}
+ if _, ok := value.Interface().([]byte); ok {
+ return q.parseScalar(v, value, prefix, tag)
+ }
+
// check for unflattened list member
if !q.isEC2 && tag.Get("flattened") == "" {
if listName := tag.Get("locationNameList"); listName == "" {
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go
index 71618356493..c405288d742 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go
@@ -4,7 +4,6 @@ package rest
import (
"bytes"
"encoding/base64"
- "encoding/json"
"fmt"
"io"
"net/http"
@@ -18,6 +17,7 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/request"
+ "github.com/aws/aws-sdk-go/private/protocol"
)
// RFC822 returns an RFC822 formatted timestamp for AWS protocols
@@ -252,13 +252,12 @@ func EscapePath(path string, encodeSep bool) string {
return buf.String()
}
-func convertType(v reflect.Value, tag reflect.StructTag) (string, error) {
+func convertType(v reflect.Value, tag reflect.StructTag) (str string, err error) {
v = reflect.Indirect(v)
if !v.IsValid() {
return "", errValueNotSet
}
- var str string
switch value := v.Interface().(type) {
case string:
str = value
@@ -273,17 +272,19 @@ func convertType(v reflect.Value, tag reflect.StructTag) (string, error) {
case time.Time:
str = value.UTC().Format(RFC822)
case aws.JSONValue:
- b, err := json.Marshal(value)
- if err != nil {
- return "", err
+ if len(value) == 0 {
+ return "", errValueNotSet
}
+ escaping := protocol.NoEscape
if tag.Get("location") == "header" {
- str = base64.StdEncoding.EncodeToString(b)
- } else {
- str = string(b)
+ escaping = protocol.Base64Escape
+ }
+ str, err = protocol.EncodeJSONValue(value, escaping)
+ if err != nil {
+ return "", fmt.Errorf("unable to encode JSONValue, %v", err)
}
default:
- err := fmt.Errorf("Unsupported value for param %v (%s)", v.Interface(), v.Type())
+ err := fmt.Errorf("unsupported value for param %v (%s)", v.Interface(), v.Type())
return "", err
}
return str, nil
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go
index 7a779ee2260..823f045eed7 100644
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go
+++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go
@@ -3,7 +3,6 @@ package rest
import (
"bytes"
"encoding/base64"
- "encoding/json"
"fmt"
"io"
"io/ioutil"
@@ -16,6 +15,7 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/request"
+ "github.com/aws/aws-sdk-go/private/protocol"
)
// UnmarshalHandler is a named request handler for unmarshaling rest protocol requests
@@ -204,17 +204,11 @@ func unmarshalHeader(v reflect.Value, header string, tag reflect.StructTag) erro
}
v.Set(reflect.ValueOf(&t))
case aws.JSONValue:
- b := []byte(header)
- var err error
+ escaping := protocol.NoEscape
if tag.Get("location") == "header" {
- b, err = base64.StdEncoding.DecodeString(header)
- if err != nil {
- return err
- }
+ escaping = protocol.Base64Escape
}
-
- m := aws.JSONValue{}
- err = json.Unmarshal(b, &m)
+ m, err := protocol.DecodeJSONValue(header, escaping)
if err != nil {
return err
}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go
deleted file mode 100644
index b1d5294ad93..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go
+++ /dev/null
@@ -1,92 +0,0 @@
-// Package restjson provides RESTful JSON serialization of AWS
-// requests and responses.
-package restjson
-
-//go:generate go run -tags codegen ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/input/rest-json.json build_test.go
-//go:generate go run -tags codegen ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/output/rest-json.json unmarshal_test.go
-
-import (
- "encoding/json"
- "io/ioutil"
- "strings"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
- "github.com/aws/aws-sdk-go/private/protocol/rest"
-)
-
-// BuildHandler is a named request handler for building restjson protocol requests
-var BuildHandler = request.NamedHandler{Name: "awssdk.restjson.Build", Fn: Build}
-
-// UnmarshalHandler is a named request handler for unmarshaling restjson protocol requests
-var UnmarshalHandler = request.NamedHandler{Name: "awssdk.restjson.Unmarshal", Fn: Unmarshal}
-
-// UnmarshalMetaHandler is a named request handler for unmarshaling restjson protocol request metadata
-var UnmarshalMetaHandler = request.NamedHandler{Name: "awssdk.restjson.UnmarshalMeta", Fn: UnmarshalMeta}
-
-// UnmarshalErrorHandler is a named request handler for unmarshaling restjson protocol request errors
-var UnmarshalErrorHandler = request.NamedHandler{Name: "awssdk.restjson.UnmarshalError", Fn: UnmarshalError}
-
-// Build builds a request for the REST JSON protocol.
-func Build(r *request.Request) {
- rest.Build(r)
-
- if t := rest.PayloadType(r.Params); t == "structure" || t == "" {
- jsonrpc.Build(r)
- }
-}
-
-// Unmarshal unmarshals a response body for the REST JSON protocol.
-func Unmarshal(r *request.Request) {
- if t := rest.PayloadType(r.Data); t == "structure" || t == "" {
- jsonrpc.Unmarshal(r)
- } else {
- rest.Unmarshal(r)
- }
-}
-
-// UnmarshalMeta unmarshals response headers for the REST JSON protocol.
-func UnmarshalMeta(r *request.Request) {
- rest.UnmarshalMeta(r)
-}
-
-// UnmarshalError unmarshals a response error for the REST JSON protocol.
-func UnmarshalError(r *request.Request) {
- defer r.HTTPResponse.Body.Close()
- code := r.HTTPResponse.Header.Get("X-Amzn-Errortype")
- bodyBytes, err := ioutil.ReadAll(r.HTTPResponse.Body)
- if err != nil {
- r.Error = awserr.New("SerializationError", "failed reading REST JSON error response", err)
- return
- }
- if len(bodyBytes) == 0 {
- r.Error = awserr.NewRequestFailure(
- awserr.New("SerializationError", r.HTTPResponse.Status, nil),
- r.HTTPResponse.StatusCode,
- "",
- )
- return
- }
- var jsonErr jsonErrorResponse
- if err := json.Unmarshal(bodyBytes, &jsonErr); err != nil {
- r.Error = awserr.New("SerializationError", "failed decoding REST JSON error response", err)
- return
- }
-
- if code == "" {
- code = jsonErr.Code
- }
-
- code = strings.SplitN(code, ":", 2)[0]
- r.Error = awserr.NewRequestFailure(
- awserr.New(code, jsonErr.Message, nil),
- r.HTTPResponse.StatusCode,
- r.RequestID,
- )
-}
-
-type jsonErrorResponse struct {
- Code string `json:"code"`
- Message string `json:"message"`
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/signer/v2/v2.go b/vendor/github.com/aws/aws-sdk-go/private/signer/v2/v2.go
deleted file mode 100644
index 88c3a2f617f..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/signer/v2/v2.go
+++ /dev/null
@@ -1,180 +0,0 @@
-package v2
-
-import (
- "crypto/hmac"
- "crypto/sha256"
- "encoding/base64"
- "errors"
- "fmt"
- "net/http"
- "net/url"
- "sort"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-var (
- errInvalidMethod = errors.New("v2 signer only handles HTTP POST")
-)
-
-const (
- signatureVersion = "2"
- signatureMethod = "HmacSHA256"
- timeFormat = "2006-01-02T15:04:05Z"
-)
-
-type signer struct {
- // Values that must be populated from the request
- Request *http.Request
- Time time.Time
- Credentials *credentials.Credentials
- Debug aws.LogLevelType
- Logger aws.Logger
-
- Query url.Values
- stringToSign string
- signature string
-}
-
-// SignRequestHandler is a named request handler the SDK will use to sign
-// service client request with using the V4 signature.
-var SignRequestHandler = request.NamedHandler{
- Name: "v2.SignRequestHandler", Fn: SignSDKRequest,
-}
-
-// SignSDKRequest requests with signature version 2.
-//
-// Will sign the requests with the service config's Credentials object
-// Signing is skipped if the credentials is the credentials.AnonymousCredentials
-// object.
-func SignSDKRequest(req *request.Request) {
- // If the request does not need to be signed ignore the signing of the
- // request if the AnonymousCredentials object is used.
- if req.Config.Credentials == credentials.AnonymousCredentials {
- return
- }
-
- if req.HTTPRequest.Method != "POST" && req.HTTPRequest.Method != "GET" {
- // The V2 signer only supports GET and POST
- req.Error = errInvalidMethod
- return
- }
-
- v2 := signer{
- Request: req.HTTPRequest,
- Time: req.Time,
- Credentials: req.Config.Credentials,
- Debug: req.Config.LogLevel.Value(),
- Logger: req.Config.Logger,
- }
-
- req.Error = v2.Sign()
-
- if req.Error != nil {
- return
- }
-
- if req.HTTPRequest.Method == "POST" {
- // Set the body of the request based on the modified query parameters
- req.SetStringBody(v2.Query.Encode())
-
- // Now that the body has changed, remove any Content-Length header,
- // because it will be incorrect
- req.HTTPRequest.ContentLength = 0
- req.HTTPRequest.Header.Del("Content-Length")
- } else {
- req.HTTPRequest.URL.RawQuery = v2.Query.Encode()
- }
-}
-
-func (v2 *signer) Sign() error {
- credValue, err := v2.Credentials.Get()
- if err != nil {
- return err
- }
-
- if v2.Request.Method == "POST" {
- // Parse the HTTP request to obtain the query parameters that will
- // be used to build the string to sign. Note that because the HTTP
- // request will need to be modified, the PostForm and Form properties
- // are reset to nil after parsing.
- v2.Request.ParseForm()
- v2.Query = v2.Request.PostForm
- v2.Request.PostForm = nil
- v2.Request.Form = nil
- } else {
- v2.Query = v2.Request.URL.Query()
- }
-
- // Set new query parameters
- v2.Query.Set("AWSAccessKeyId", credValue.AccessKeyID)
- v2.Query.Set("SignatureVersion", signatureVersion)
- v2.Query.Set("SignatureMethod", signatureMethod)
- v2.Query.Set("Timestamp", v2.Time.UTC().Format(timeFormat))
- if credValue.SessionToken != "" {
- v2.Query.Set("SecurityToken", credValue.SessionToken)
- }
-
- // in case this is a retry, ensure no signature present
- v2.Query.Del("Signature")
-
- method := v2.Request.Method
- host := v2.Request.URL.Host
- path := v2.Request.URL.Path
- if path == "" {
- path = "/"
- }
-
- // obtain all of the query keys and sort them
- queryKeys := make([]string, 0, len(v2.Query))
- for key := range v2.Query {
- queryKeys = append(queryKeys, key)
- }
- sort.Strings(queryKeys)
-
- // build URL-encoded query keys and values
- queryKeysAndValues := make([]string, len(queryKeys))
- for i, key := range queryKeys {
- k := strings.Replace(url.QueryEscape(key), "+", "%20", -1)
- v := strings.Replace(url.QueryEscape(v2.Query.Get(key)), "+", "%20", -1)
- queryKeysAndValues[i] = k + "=" + v
- }
-
- // join into one query string
- query := strings.Join(queryKeysAndValues, "&")
-
- // build the canonical string for the V2 signature
- v2.stringToSign = strings.Join([]string{
- method,
- host,
- path,
- query,
- }, "\n")
-
- hash := hmac.New(sha256.New, []byte(credValue.SecretAccessKey))
- hash.Write([]byte(v2.stringToSign))
- v2.signature = base64.StdEncoding.EncodeToString(hash.Sum(nil))
- v2.Query.Set("Signature", v2.signature)
-
- if v2.Debug.Matches(aws.LogDebugWithSigning) {
- v2.logSigningInfo()
- }
-
- return nil
-}
-
-const logSignInfoMsg = `DEBUG: Request Signature:
----[ STRING TO SIGN ]--------------------------------
-%s
----[ SIGNATURE ]-------------------------------------
-%s
------------------------------------------------------`
-
-func (v2 *signer) logSigningInfo() {
- msg := fmt.Sprintf(logSignInfoMsg, v2.stringToSign, v2.Query.Get("Signature"))
- v2.Logger.Log(msg)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/util/sort_keys.go b/vendor/github.com/aws/aws-sdk-go/private/util/sort_keys.go
deleted file mode 100644
index 48000565c86..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/util/sort_keys.go
+++ /dev/null
@@ -1,14 +0,0 @@
-package util
-
-import "sort"
-
-// SortedKeys returns a sorted slice of keys of a map.
-func SortedKeys(m map[string]interface{}) []string {
- i, sorted := 0, make([]string, len(m))
- for k := range m {
- sorted[i] = k
- i++
- }
- sort.Strings(sorted)
- return sorted
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/util/util.go b/vendor/github.com/aws/aws-sdk-go/private/util/util.go
deleted file mode 100644
index 5f2dab25e20..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/util/util.go
+++ /dev/null
@@ -1,109 +0,0 @@
-package util
-
-import (
- "bytes"
- "encoding/xml"
- "fmt"
- "go/format"
- "io"
- "reflect"
- "regexp"
- "strings"
-
- "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil"
-)
-
-// GoFmt returns the Go formated string of the input.
-//
-// Panics if the format fails.
-func GoFmt(buf string) string {
- formatted, err := format.Source([]byte(buf))
- if err != nil {
- panic(fmt.Errorf("%s\nOriginal code:\n%s", err.Error(), buf))
- }
- return string(formatted)
-}
-
-var reTrim = regexp.MustCompile(`\s{2,}`)
-
-// Trim removes all leading and trailing white space.
-//
-// All consecutive spaces will be reduced to a single space.
-func Trim(s string) string {
- return strings.TrimSpace(reTrim.ReplaceAllString(s, " "))
-}
-
-// Capitalize capitalizes the first character of the string.
-func Capitalize(s string) string {
- if len(s) == 1 {
- return strings.ToUpper(s)
- }
- return strings.ToUpper(s[0:1]) + s[1:]
-}
-
-// SortXML sorts the reader's XML elements
-func SortXML(r io.Reader) string {
- var buf bytes.Buffer
- d := xml.NewDecoder(r)
- root, _ := xmlutil.XMLToStruct(d, nil)
- e := xml.NewEncoder(&buf)
- xmlutil.StructToXML(e, root, true)
- return buf.String()
-}
-
-// PrettyPrint generates a human readable representation of the value v.
-// All values of v are recursively found and pretty printed also.
-func PrettyPrint(v interface{}) string {
- value := reflect.ValueOf(v)
- switch value.Kind() {
- case reflect.Struct:
- str := fullName(value.Type()) + "{\n"
- for i := 0; i < value.NumField(); i++ {
- l := string(value.Type().Field(i).Name[0])
- if strings.ToUpper(l) == l {
- str += value.Type().Field(i).Name + ": "
- str += PrettyPrint(value.Field(i).Interface())
- str += ",\n"
- }
- }
- str += "}"
- return str
- case reflect.Map:
- str := "map[" + fullName(value.Type().Key()) + "]" + fullName(value.Type().Elem()) + "{\n"
- for _, k := range value.MapKeys() {
- str += "\"" + k.String() + "\": "
- str += PrettyPrint(value.MapIndex(k).Interface())
- str += ",\n"
- }
- str += "}"
- return str
- case reflect.Ptr:
- if e := value.Elem(); e.IsValid() {
- return "&" + PrettyPrint(e.Interface())
- }
- return "nil"
- case reflect.Slice:
- str := "[]" + fullName(value.Type().Elem()) + "{\n"
- for i := 0; i < value.Len(); i++ {
- str += PrettyPrint(value.Index(i).Interface())
- str += ",\n"
- }
- str += "}"
- return str
- default:
- return fmt.Sprintf("%#v", v)
- }
-}
-
-func pkgName(t reflect.Type) string {
- pkg := t.PkgPath()
- c := strings.Split(pkg, "/")
- return c[len(c)-1]
-}
-
-func fullName(t reflect.Type) string {
- if pkg := pkgName(t); pkg != "" {
- return pkg + "." + t.Name()
- }
- return t.Name()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go
index 4a9d1406ed4..47c5f7f9417 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go
@@ -17,19 +17,18 @@ const opDeleteAlarms = "DeleteAlarms"
// DeleteAlarmsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteAlarms operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteAlarms for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteAlarms method directly
-// instead.
+// See DeleteAlarms for more information on using the DeleteAlarms
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteAlarmsRequest method.
// req, resp := client.DeleteAlarmsRequest(params)
@@ -39,7 +38,7 @@ const opDeleteAlarms = "DeleteAlarms"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteAlarms
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteAlarms
func (c *CloudWatch) DeleteAlarmsRequest(input *DeleteAlarmsInput) (req *request.Request, output *DeleteAlarmsOutput) {
op := &request.Operation{
Name: opDeleteAlarms,
@@ -73,7 +72,7 @@ func (c *CloudWatch) DeleteAlarmsRequest(input *DeleteAlarmsInput) (req *request
// * ErrCodeResourceNotFound "ResourceNotFound"
// The named resource does not exist.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteAlarms
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteAlarms
func (c *CloudWatch) DeleteAlarms(input *DeleteAlarmsInput) (*DeleteAlarmsOutput, error) {
req, out := c.DeleteAlarmsRequest(input)
return out, req.Send()
@@ -99,19 +98,18 @@ const opDeleteDashboards = "DeleteDashboards"
// DeleteDashboardsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteDashboards operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteDashboards for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteDashboards method directly
-// instead.
+// See DeleteDashboards for more information on using the DeleteDashboards
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteDashboardsRequest method.
// req, resp := client.DeleteDashboardsRequest(params)
@@ -121,7 +119,7 @@ const opDeleteDashboards = "DeleteDashboards"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteDashboards
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteDashboards
func (c *CloudWatch) DeleteDashboardsRequest(input *DeleteDashboardsInput) (req *request.Request, output *DeleteDashboardsOutput) {
op := &request.Operation{
Name: opDeleteDashboards,
@@ -160,7 +158,7 @@ func (c *CloudWatch) DeleteDashboardsRequest(input *DeleteDashboardsInput) (req
// * ErrCodeInternalServiceFault "InternalServiceError"
// Request processing has failed due to some unknown error, exception, or failure.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteDashboards
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteDashboards
func (c *CloudWatch) DeleteDashboards(input *DeleteDashboardsInput) (*DeleteDashboardsOutput, error) {
req, out := c.DeleteDashboardsRequest(input)
return out, req.Send()
@@ -186,19 +184,18 @@ const opDescribeAlarmHistory = "DescribeAlarmHistory"
// DescribeAlarmHistoryRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAlarmHistory operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeAlarmHistory for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeAlarmHistory method directly
-// instead.
+// See DescribeAlarmHistory for more information on using the DescribeAlarmHistory
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeAlarmHistoryRequest method.
// req, resp := client.DescribeAlarmHistoryRequest(params)
@@ -208,7 +205,7 @@ const opDescribeAlarmHistory = "DescribeAlarmHistory"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmHistory
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmHistory
func (c *CloudWatch) DescribeAlarmHistoryRequest(input *DescribeAlarmHistoryInput) (req *request.Request, output *DescribeAlarmHistoryOutput) {
op := &request.Operation{
Name: opDescribeAlarmHistory,
@@ -250,7 +247,7 @@ func (c *CloudWatch) DescribeAlarmHistoryRequest(input *DescribeAlarmHistoryInpu
// * ErrCodeInvalidNextToken "InvalidNextToken"
// The next token specified is invalid.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmHistory
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmHistory
func (c *CloudWatch) DescribeAlarmHistory(input *DescribeAlarmHistoryInput) (*DescribeAlarmHistoryOutput, error) {
req, out := c.DescribeAlarmHistoryRequest(input)
return out, req.Send()
@@ -326,19 +323,18 @@ const opDescribeAlarms = "DescribeAlarms"
// DescribeAlarmsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAlarms operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeAlarms for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeAlarms method directly
-// instead.
+// See DescribeAlarms for more information on using the DescribeAlarms
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeAlarmsRequest method.
// req, resp := client.DescribeAlarmsRequest(params)
@@ -348,7 +344,7 @@ const opDescribeAlarms = "DescribeAlarms"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarms
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarms
func (c *CloudWatch) DescribeAlarmsRequest(input *DescribeAlarmsInput) (req *request.Request, output *DescribeAlarmsOutput) {
op := &request.Operation{
Name: opDescribeAlarms,
@@ -388,7 +384,7 @@ func (c *CloudWatch) DescribeAlarmsRequest(input *DescribeAlarmsInput) (req *req
// * ErrCodeInvalidNextToken "InvalidNextToken"
// The next token specified is invalid.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarms
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarms
func (c *CloudWatch) DescribeAlarms(input *DescribeAlarmsInput) (*DescribeAlarmsOutput, error) {
req, out := c.DescribeAlarmsRequest(input)
return out, req.Send()
@@ -464,19 +460,18 @@ const opDescribeAlarmsForMetric = "DescribeAlarmsForMetric"
// DescribeAlarmsForMetricRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAlarmsForMetric operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeAlarmsForMetric for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeAlarmsForMetric method directly
-// instead.
+// See DescribeAlarmsForMetric for more information on using the DescribeAlarmsForMetric
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeAlarmsForMetricRequest method.
// req, resp := client.DescribeAlarmsForMetricRequest(params)
@@ -486,7 +481,7 @@ const opDescribeAlarmsForMetric = "DescribeAlarmsForMetric"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmsForMetric
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmsForMetric
func (c *CloudWatch) DescribeAlarmsForMetricRequest(input *DescribeAlarmsForMetricInput) (req *request.Request, output *DescribeAlarmsForMetricOutput) {
op := &request.Operation{
Name: opDescribeAlarmsForMetric,
@@ -514,7 +509,7 @@ func (c *CloudWatch) DescribeAlarmsForMetricRequest(input *DescribeAlarmsForMetr
//
// See the AWS API reference guide for Amazon CloudWatch's
// API operation DescribeAlarmsForMetric for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmsForMetric
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmsForMetric
func (c *CloudWatch) DescribeAlarmsForMetric(input *DescribeAlarmsForMetricInput) (*DescribeAlarmsForMetricOutput, error) {
req, out := c.DescribeAlarmsForMetricRequest(input)
return out, req.Send()
@@ -540,19 +535,18 @@ const opDisableAlarmActions = "DisableAlarmActions"
// DisableAlarmActionsRequest generates a "aws/request.Request" representing the
// client's request for the DisableAlarmActions operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DisableAlarmActions for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DisableAlarmActions method directly
-// instead.
+// See DisableAlarmActions for more information on using the DisableAlarmActions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DisableAlarmActionsRequest method.
// req, resp := client.DisableAlarmActionsRequest(params)
@@ -562,7 +556,7 @@ const opDisableAlarmActions = "DisableAlarmActions"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DisableAlarmActions
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DisableAlarmActions
func (c *CloudWatch) DisableAlarmActionsRequest(input *DisableAlarmActionsInput) (req *request.Request, output *DisableAlarmActionsOutput) {
op := &request.Operation{
Name: opDisableAlarmActions,
@@ -592,7 +586,7 @@ func (c *CloudWatch) DisableAlarmActionsRequest(input *DisableAlarmActionsInput)
//
// See the AWS API reference guide for Amazon CloudWatch's
// API operation DisableAlarmActions for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DisableAlarmActions
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DisableAlarmActions
func (c *CloudWatch) DisableAlarmActions(input *DisableAlarmActionsInput) (*DisableAlarmActionsOutput, error) {
req, out := c.DisableAlarmActionsRequest(input)
return out, req.Send()
@@ -618,19 +612,18 @@ const opEnableAlarmActions = "EnableAlarmActions"
// EnableAlarmActionsRequest generates a "aws/request.Request" representing the
// client's request for the EnableAlarmActions operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See EnableAlarmActions for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the EnableAlarmActions method directly
-// instead.
+// See EnableAlarmActions for more information on using the EnableAlarmActions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the EnableAlarmActionsRequest method.
// req, resp := client.EnableAlarmActionsRequest(params)
@@ -640,7 +633,7 @@ const opEnableAlarmActions = "EnableAlarmActions"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/EnableAlarmActions
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/EnableAlarmActions
func (c *CloudWatch) EnableAlarmActionsRequest(input *EnableAlarmActionsInput) (req *request.Request, output *EnableAlarmActionsOutput) {
op := &request.Operation{
Name: opEnableAlarmActions,
@@ -669,7 +662,7 @@ func (c *CloudWatch) EnableAlarmActionsRequest(input *EnableAlarmActionsInput) (
//
// See the AWS API reference guide for Amazon CloudWatch's
// API operation EnableAlarmActions for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/EnableAlarmActions
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/EnableAlarmActions
func (c *CloudWatch) EnableAlarmActions(input *EnableAlarmActionsInput) (*EnableAlarmActionsOutput, error) {
req, out := c.EnableAlarmActionsRequest(input)
return out, req.Send()
@@ -695,19 +688,18 @@ const opGetDashboard = "GetDashboard"
// GetDashboardRequest generates a "aws/request.Request" representing the
// client's request for the GetDashboard operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetDashboard for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetDashboard method directly
-// instead.
+// See GetDashboard for more information on using the GetDashboard
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetDashboardRequest method.
// req, resp := client.GetDashboardRequest(params)
@@ -717,7 +709,7 @@ const opGetDashboard = "GetDashboard"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetDashboard
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetDashboard
func (c *CloudWatch) GetDashboardRequest(input *GetDashboardInput) (req *request.Request, output *GetDashboardOutput) {
op := &request.Operation{
Name: opGetDashboard,
@@ -759,7 +751,7 @@ func (c *CloudWatch) GetDashboardRequest(input *GetDashboardInput) (req *request
// * ErrCodeInternalServiceFault "InternalServiceError"
// Request processing has failed due to some unknown error, exception, or failure.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetDashboard
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetDashboard
func (c *CloudWatch) GetDashboard(input *GetDashboardInput) (*GetDashboardOutput, error) {
req, out := c.GetDashboardRequest(input)
return out, req.Send()
@@ -785,19 +777,18 @@ const opGetMetricStatistics = "GetMetricStatistics"
// GetMetricStatisticsRequest generates a "aws/request.Request" representing the
// client's request for the GetMetricStatistics operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetMetricStatistics for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetMetricStatistics method directly
-// instead.
+// See GetMetricStatistics for more information on using the GetMetricStatistics
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetMetricStatisticsRequest method.
// req, resp := client.GetMetricStatisticsRequest(params)
@@ -807,7 +798,7 @@ const opGetMetricStatistics = "GetMetricStatistics"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricStatistics
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricStatistics
func (c *CloudWatch) GetMetricStatisticsRequest(input *GetMetricStatisticsInput) (req *request.Request, output *GetMetricStatisticsOutput) {
op := &request.Operation{
Name: opGetMetricStatistics,
@@ -898,7 +889,7 @@ func (c *CloudWatch) GetMetricStatisticsRequest(input *GetMetricStatisticsInput)
// * ErrCodeInternalServiceFault "InternalServiceError"
// Request processing has failed due to some unknown error, exception, or failure.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricStatistics
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricStatistics
func (c *CloudWatch) GetMetricStatistics(input *GetMetricStatisticsInput) (*GetMetricStatisticsOutput, error) {
req, out := c.GetMetricStatisticsRequest(input)
return out, req.Send()
@@ -924,19 +915,18 @@ const opListDashboards = "ListDashboards"
// ListDashboardsRequest generates a "aws/request.Request" representing the
// client's request for the ListDashboards operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListDashboards for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListDashboards method directly
-// instead.
+// See ListDashboards for more information on using the ListDashboards
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListDashboardsRequest method.
// req, resp := client.ListDashboardsRequest(params)
@@ -946,7 +936,7 @@ const opListDashboards = "ListDashboards"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListDashboards
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListDashboards
func (c *CloudWatch) ListDashboardsRequest(input *ListDashboardsInput) (req *request.Request, output *ListDashboardsOutput) {
op := &request.Operation{
Name: opListDashboards,
@@ -983,7 +973,7 @@ func (c *CloudWatch) ListDashboardsRequest(input *ListDashboardsInput) (req *req
// * ErrCodeInternalServiceFault "InternalServiceError"
// Request processing has failed due to some unknown error, exception, or failure.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListDashboards
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListDashboards
func (c *CloudWatch) ListDashboards(input *ListDashboardsInput) (*ListDashboardsOutput, error) {
req, out := c.ListDashboardsRequest(input)
return out, req.Send()
@@ -1009,19 +999,18 @@ const opListMetrics = "ListMetrics"
// ListMetricsRequest generates a "aws/request.Request" representing the
// client's request for the ListMetrics operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListMetrics for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListMetrics method directly
-// instead.
+// See ListMetrics for more information on using the ListMetrics
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListMetricsRequest method.
// req, resp := client.ListMetricsRequest(params)
@@ -1031,7 +1020,7 @@ const opListMetrics = "ListMetrics"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListMetrics
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListMetrics
func (c *CloudWatch) ListMetricsRequest(input *ListMetricsInput) (req *request.Request, output *ListMetricsOutput) {
op := &request.Operation{
Name: opListMetrics,
@@ -1080,7 +1069,7 @@ func (c *CloudWatch) ListMetricsRequest(input *ListMetricsInput) (req *request.R
// * ErrCodeInvalidParameterValueException "InvalidParameterValue"
// The value of an input parameter is bad or out-of-range.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListMetrics
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListMetrics
func (c *CloudWatch) ListMetrics(input *ListMetricsInput) (*ListMetricsOutput, error) {
req, out := c.ListMetricsRequest(input)
return out, req.Send()
@@ -1156,19 +1145,18 @@ const opPutDashboard = "PutDashboard"
// PutDashboardRequest generates a "aws/request.Request" representing the
// client's request for the PutDashboard operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutDashboard for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutDashboard method directly
-// instead.
+// See PutDashboard for more information on using the PutDashboard
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutDashboardRequest method.
// req, resp := client.PutDashboardRequest(params)
@@ -1178,7 +1166,7 @@ const opPutDashboard = "PutDashboard"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutDashboard
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutDashboard
func (c *CloudWatch) PutDashboardRequest(input *PutDashboardInput) (req *request.Request, output *PutDashboardOutput) {
op := &request.Operation{
Name: opPutDashboard,
@@ -1231,7 +1219,7 @@ func (c *CloudWatch) PutDashboardRequest(input *PutDashboardInput) (req *request
// * ErrCodeInternalServiceFault "InternalServiceError"
// Request processing has failed due to some unknown error, exception, or failure.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutDashboard
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutDashboard
func (c *CloudWatch) PutDashboard(input *PutDashboardInput) (*PutDashboardOutput, error) {
req, out := c.PutDashboardRequest(input)
return out, req.Send()
@@ -1257,19 +1245,18 @@ const opPutMetricAlarm = "PutMetricAlarm"
// PutMetricAlarmRequest generates a "aws/request.Request" representing the
// client's request for the PutMetricAlarm operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutMetricAlarm for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutMetricAlarm method directly
-// instead.
+// See PutMetricAlarm for more information on using the PutMetricAlarm
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutMetricAlarmRequest method.
// req, resp := client.PutMetricAlarmRequest(params)
@@ -1279,7 +1266,7 @@ const opPutMetricAlarm = "PutMetricAlarm"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricAlarm
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricAlarm
func (c *CloudWatch) PutMetricAlarmRequest(input *PutMetricAlarmInput) (req *request.Request, output *PutMetricAlarmOutput) {
op := &request.Operation{
Name: opPutMetricAlarm,
@@ -1313,6 +1300,8 @@ func (c *CloudWatch) PutMetricAlarmRequest(input *PutMetricAlarmInput) (req *req
//
// If you are an IAM user, you must have Amazon EC2 permissions for some operations:
//
+// * iam:CreateServiceLinkedRole for all alarms with EC2 actions
+//
// * ec2:DescribeInstanceStatus and ec2:DescribeInstances for all alarms
// on EC2 instance status metrics
//
@@ -1352,7 +1341,7 @@ func (c *CloudWatch) PutMetricAlarmRequest(input *PutMetricAlarmInput) (req *req
// * ErrCodeLimitExceededFault "LimitExceeded"
// The quota for alarms for this customer has already been reached.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricAlarm
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricAlarm
func (c *CloudWatch) PutMetricAlarm(input *PutMetricAlarmInput) (*PutMetricAlarmOutput, error) {
req, out := c.PutMetricAlarmRequest(input)
return out, req.Send()
@@ -1378,19 +1367,18 @@ const opPutMetricData = "PutMetricData"
// PutMetricDataRequest generates a "aws/request.Request" representing the
// client's request for the PutMetricData operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutMetricData for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutMetricData method directly
-// instead.
+// See PutMetricData for more information on using the PutMetricData
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutMetricDataRequest method.
// req, resp := client.PutMetricDataRequest(params)
@@ -1400,7 +1388,7 @@ const opPutMetricData = "PutMetricData"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricData
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricData
func (c *CloudWatch) PutMetricDataRequest(input *PutMetricDataInput) (req *request.Request, output *PutMetricDataOutput) {
op := &request.Operation{
Name: opPutMetricData,
@@ -1471,7 +1459,7 @@ func (c *CloudWatch) PutMetricDataRequest(input *PutMetricDataInput) (req *reque
// * ErrCodeInternalServiceFault "InternalServiceError"
// Request processing has failed due to some unknown error, exception, or failure.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricData
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricData
func (c *CloudWatch) PutMetricData(input *PutMetricDataInput) (*PutMetricDataOutput, error) {
req, out := c.PutMetricDataRequest(input)
return out, req.Send()
@@ -1497,19 +1485,18 @@ const opSetAlarmState = "SetAlarmState"
// SetAlarmStateRequest generates a "aws/request.Request" representing the
// client's request for the SetAlarmState operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See SetAlarmState for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the SetAlarmState method directly
-// instead.
+// See SetAlarmState for more information on using the SetAlarmState
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the SetAlarmStateRequest method.
// req, resp := client.SetAlarmStateRequest(params)
@@ -1519,7 +1506,7 @@ const opSetAlarmState = "SetAlarmState"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/SetAlarmState
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/SetAlarmState
func (c *CloudWatch) SetAlarmStateRequest(input *SetAlarmStateInput) (req *request.Request, output *SetAlarmStateOutput) {
op := &request.Operation{
Name: opSetAlarmState,
@@ -1563,7 +1550,7 @@ func (c *CloudWatch) SetAlarmStateRequest(input *SetAlarmStateInput) (req *reque
// * ErrCodeInvalidFormatFault "InvalidFormat"
// Data was not syntactically valid JSON.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/SetAlarmState
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/SetAlarmState
func (c *CloudWatch) SetAlarmState(input *SetAlarmStateInput) (*SetAlarmStateOutput, error) {
req, out := c.SetAlarmStateRequest(input)
return out, req.Send()
@@ -1586,7 +1573,7 @@ func (c *CloudWatch) SetAlarmStateWithContext(ctx aws.Context, input *SetAlarmSt
}
// Represents the history of a specific alarm.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/AlarmHistoryItem
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/AlarmHistoryItem
type AlarmHistoryItem struct {
_ struct{} `type:"structure"`
@@ -1647,7 +1634,7 @@ func (s *AlarmHistoryItem) SetTimestamp(v time.Time) *AlarmHistoryItem {
}
// Represents a specific dashboard.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DashboardEntry
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DashboardEntry
type DashboardEntry struct {
_ struct{} `type:"structure"`
@@ -1701,7 +1688,7 @@ func (s *DashboardEntry) SetSize(v int64) *DashboardEntry {
}
// An error or warning for the operation.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DashboardValidationMessage
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DashboardValidationMessage
type DashboardValidationMessage struct {
_ struct{} `type:"structure"`
@@ -1735,7 +1722,7 @@ func (s *DashboardValidationMessage) SetMessage(v string) *DashboardValidationMe
}
// Encapsulates the statistical data that CloudWatch computes from metric data.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/Datapoint
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/Datapoint
type Datapoint struct {
_ struct{} `type:"structure"`
@@ -1823,7 +1810,7 @@ func (s *Datapoint) SetUnit(v string) *Datapoint {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteAlarmsInput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteAlarmsInput
type DeleteAlarmsInput struct {
_ struct{} `type:"structure"`
@@ -1862,7 +1849,7 @@ func (s *DeleteAlarmsInput) SetAlarmNames(v []*string) *DeleteAlarmsInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteAlarmsOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteAlarmsOutput
type DeleteAlarmsOutput struct {
_ struct{} `type:"structure"`
}
@@ -1877,12 +1864,14 @@ func (s DeleteAlarmsOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteDashboardsInput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteDashboardsInput
type DeleteDashboardsInput struct {
_ struct{} `type:"structure"`
- // The dashboards to be deleted.
- DashboardNames []*string `type:"list"`
+ // The dashboards to be deleted. This parameter is required.
+ //
+ // DashboardNames is a required field
+ DashboardNames []*string `type:"list" required:"true"`
}
// String returns the string representation
@@ -1895,13 +1884,26 @@ func (s DeleteDashboardsInput) GoString() string {
return s.String()
}
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DeleteDashboardsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DeleteDashboardsInput"}
+ if s.DashboardNames == nil {
+ invalidParams.Add(request.NewErrParamRequired("DashboardNames"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
// SetDashboardNames sets the DashboardNames field's value.
func (s *DeleteDashboardsInput) SetDashboardNames(v []*string) *DeleteDashboardsInput {
s.DashboardNames = v
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteDashboardsOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteDashboardsOutput
type DeleteDashboardsOutput struct {
_ struct{} `type:"structure"`
}
@@ -1916,7 +1918,7 @@ func (s DeleteDashboardsOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmHistoryInput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmHistoryInput
type DescribeAlarmHistoryInput struct {
_ struct{} `type:"structure"`
@@ -2002,7 +2004,7 @@ func (s *DescribeAlarmHistoryInput) SetStartDate(v time.Time) *DescribeAlarmHist
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmHistoryOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmHistoryOutput
type DescribeAlarmHistoryOutput struct {
_ struct{} `type:"structure"`
@@ -2035,7 +2037,7 @@ func (s *DescribeAlarmHistoryOutput) SetNextToken(v string) *DescribeAlarmHistor
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmsForMetricInput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmsForMetricInput
type DescribeAlarmsForMetricInput struct {
_ struct{} `type:"structure"`
@@ -2155,7 +2157,7 @@ func (s *DescribeAlarmsForMetricInput) SetUnit(v string) *DescribeAlarmsForMetri
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmsForMetricOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmsForMetricOutput
type DescribeAlarmsForMetricOutput struct {
_ struct{} `type:"structure"`
@@ -2179,7 +2181,7 @@ func (s *DescribeAlarmsForMetricOutput) SetMetricAlarms(v []*MetricAlarm) *Descr
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmsInput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmsInput
type DescribeAlarmsInput struct {
_ struct{} `type:"structure"`
@@ -2269,7 +2271,7 @@ func (s *DescribeAlarmsInput) SetStateValue(v string) *DescribeAlarmsInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmsOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarmsOutput
type DescribeAlarmsOutput struct {
_ struct{} `type:"structure"`
@@ -2303,7 +2305,7 @@ func (s *DescribeAlarmsOutput) SetNextToken(v string) *DescribeAlarmsOutput {
}
// Expands the identity of a metric.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/Dimension
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/Dimension
type Dimension struct {
_ struct{} `type:"structure"`
@@ -2363,7 +2365,7 @@ func (s *Dimension) SetValue(v string) *Dimension {
}
// Represents filters for a dimension.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DimensionFilter
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DimensionFilter
type DimensionFilter struct {
_ struct{} `type:"structure"`
@@ -2417,7 +2419,7 @@ func (s *DimensionFilter) SetValue(v string) *DimensionFilter {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DisableAlarmActionsInput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DisableAlarmActionsInput
type DisableAlarmActionsInput struct {
_ struct{} `type:"structure"`
@@ -2456,7 +2458,7 @@ func (s *DisableAlarmActionsInput) SetAlarmNames(v []*string) *DisableAlarmActio
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DisableAlarmActionsOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DisableAlarmActionsOutput
type DisableAlarmActionsOutput struct {
_ struct{} `type:"structure"`
}
@@ -2471,7 +2473,7 @@ func (s DisableAlarmActionsOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/EnableAlarmActionsInput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/EnableAlarmActionsInput
type EnableAlarmActionsInput struct {
_ struct{} `type:"structure"`
@@ -2510,7 +2512,7 @@ func (s *EnableAlarmActionsInput) SetAlarmNames(v []*string) *EnableAlarmActions
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/EnableAlarmActionsOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/EnableAlarmActionsOutput
type EnableAlarmActionsOutput struct {
_ struct{} `type:"structure"`
}
@@ -2525,12 +2527,14 @@ func (s EnableAlarmActionsOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetDashboardInput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetDashboardInput
type GetDashboardInput struct {
_ struct{} `type:"structure"`
// The name of the dashboard to be described.
- DashboardName *string `type:"string"`
+ //
+ // DashboardName is a required field
+ DashboardName *string `type:"string" required:"true"`
}
// String returns the string representation
@@ -2543,13 +2547,26 @@ func (s GetDashboardInput) GoString() string {
return s.String()
}
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *GetDashboardInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "GetDashboardInput"}
+ if s.DashboardName == nil {
+ invalidParams.Add(request.NewErrParamRequired("DashboardName"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
// SetDashboardName sets the DashboardName field's value.
func (s *GetDashboardInput) SetDashboardName(v string) *GetDashboardInput {
s.DashboardName = &v
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetDashboardOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetDashboardOutput
type GetDashboardOutput struct {
_ struct{} `type:"structure"`
@@ -2593,7 +2610,7 @@ func (s *GetDashboardOutput) SetDashboardName(v string) *GetDashboardOutput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricStatisticsInput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricStatisticsInput
type GetMetricStatisticsInput struct {
_ struct{} `type:"structure"`
@@ -2807,7 +2824,7 @@ func (s *GetMetricStatisticsInput) SetUnit(v string) *GetMetricStatisticsInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricStatisticsOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricStatisticsOutput
type GetMetricStatisticsOutput struct {
_ struct{} `type:"structure"`
@@ -2840,7 +2857,7 @@ func (s *GetMetricStatisticsOutput) SetLabel(v string) *GetMetricStatisticsOutpu
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListDashboardsInput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListDashboardsInput
type ListDashboardsInput struct {
_ struct{} `type:"structure"`
@@ -2876,7 +2893,7 @@ func (s *ListDashboardsInput) SetNextToken(v string) *ListDashboardsInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListDashboardsOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListDashboardsOutput
type ListDashboardsOutput struct {
_ struct{} `type:"structure"`
@@ -2909,7 +2926,7 @@ func (s *ListDashboardsOutput) SetNextToken(v string) *ListDashboardsOutput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListMetricsInput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListMetricsInput
type ListMetricsInput struct {
_ struct{} `type:"structure"`
@@ -2987,7 +3004,7 @@ func (s *ListMetricsInput) SetNextToken(v string) *ListMetricsInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListMetricsOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListMetricsOutput
type ListMetricsOutput struct {
_ struct{} `type:"structure"`
@@ -3021,7 +3038,7 @@ func (s *ListMetricsOutput) SetNextToken(v string) *ListMetricsOutput {
}
// Represents a specific metric.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/Metric
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/Metric
type Metric struct {
_ struct{} `type:"structure"`
@@ -3064,7 +3081,7 @@ func (s *Metric) SetNamespace(v string) *Metric {
}
// Represents an alarm.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/MetricAlarm
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/MetricAlarm
type MetricAlarm struct {
_ struct{} `type:"structure"`
@@ -3092,6 +3109,9 @@ type MetricAlarm struct {
// threshold. The specified statistic value is used as the first operand.
ComparisonOperator *string `type:"string" enum:"ComparisonOperator"`
+ // The number of datapoints that must be breaching to trigger the alarm.
+ DatapointsToAlarm *int64 `min:"1" type:"integer"`
+
// The dimensions for the metric associated with the alarm.
Dimensions []*Dimension `type:"list"`
@@ -3205,6 +3225,12 @@ func (s *MetricAlarm) SetComparisonOperator(v string) *MetricAlarm {
return s
}
+// SetDatapointsToAlarm sets the DatapointsToAlarm field's value.
+func (s *MetricAlarm) SetDatapointsToAlarm(v int64) *MetricAlarm {
+ s.DatapointsToAlarm = &v
+ return s
+}
+
// SetDimensions sets the Dimensions field's value.
func (s *MetricAlarm) SetDimensions(v []*Dimension) *MetricAlarm {
s.Dimensions = v
@@ -3309,7 +3335,7 @@ func (s *MetricAlarm) SetUnit(v string) *MetricAlarm {
// Encapsulates the information sent to either create a metric or add new values
// to be aggregated into an existing metric.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/MetricDatum
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/MetricDatum
type MetricDatum struct {
_ struct{} `type:"structure"`
@@ -3438,21 +3464,26 @@ func (s *MetricDatum) SetValue(v float64) *MetricDatum {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutDashboardInput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutDashboardInput
type PutDashboardInput struct {
_ struct{} `type:"structure"`
// The detailed information about the dashboard in JSON format, including the
- // widgets to include and their location on the dashboard.
+ // widgets to include and their location on the dashboard. This parameter is
+ // required.
//
// For more information about the syntax, see CloudWatch-Dashboard-Body-Structure.
- DashboardBody *string `type:"string"`
+ //
+ // DashboardBody is a required field
+ DashboardBody *string `type:"string" required:"true"`
// The name of the dashboard. If a dashboard with this name already exists,
// this call modifies that dashboard, replacing its current contents. Otherwise,
// a new dashboard is created. The maximum length is 255, and valid characters
- // are A-Z, a-z, 0-9, "-", and "_".
- DashboardName *string `type:"string"`
+ // are A-Z, a-z, 0-9, "-", and "_". This parameter is required.
+ //
+ // DashboardName is a required field
+ DashboardName *string `type:"string" required:"true"`
}
// String returns the string representation
@@ -3465,6 +3496,22 @@ func (s PutDashboardInput) GoString() string {
return s.String()
}
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *PutDashboardInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "PutDashboardInput"}
+ if s.DashboardBody == nil {
+ invalidParams.Add(request.NewErrParamRequired("DashboardBody"))
+ }
+ if s.DashboardName == nil {
+ invalidParams.Add(request.NewErrParamRequired("DashboardName"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
// SetDashboardBody sets the DashboardBody field's value.
func (s *PutDashboardInput) SetDashboardBody(v string) *PutDashboardInput {
s.DashboardBody = &v
@@ -3477,7 +3524,7 @@ func (s *PutDashboardInput) SetDashboardName(v string) *PutDashboardInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutDashboardOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutDashboardOutput
type PutDashboardOutput struct {
_ struct{} `type:"structure"`
@@ -3509,7 +3556,7 @@ func (s *PutDashboardOutput) SetDashboardValidationMessages(v []*DashboardValida
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricAlarmInput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricAlarmInput
type PutMetricAlarmInput struct {
_ struct{} `type:"structure"`
@@ -3521,11 +3568,12 @@ type PutMetricAlarmInput struct {
// any other state. Each action is specified as an Amazon Resource Name (ARN).
//
// Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate
- // | arn:aws:automate:region:ec2:recover
+ // | arn:aws:automate:region:ec2:recover | arn:aws:sns:region:account-id:sns-topic-name
+ // | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name
//
- // Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer-account}:action/actions/AWS_EC2.InstanceId.Stop/1.0
- // | arn:aws:swf:us-east-1:{customer-account}:action/actions/AWS_EC2.InstanceId.Terminate/1.0
- // | arn:aws:swf:us-east-1:{customer-account}:action/actions/AWS_EC2.InstanceId.Reboot/1.0
+ // Valid Values (for use with IAM roles): arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Stop/1.0
+ // | arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Terminate/1.0
+ // | arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Reboot/1.0
AlarmActions []*string `type:"list"`
// The description for the alarm.
@@ -3542,6 +3590,9 @@ type PutMetricAlarmInput struct {
// ComparisonOperator is a required field
ComparisonOperator *string `type:"string" required:"true" enum:"ComparisonOperator"`
+ // The number of datapoints that must be breaching to trigger the alarm.
+ DatapointsToAlarm *int64 `min:"1" type:"integer"`
+
// The dimensions for the metric associated with the alarm.
Dimensions []*Dimension `type:"list"`
@@ -3563,7 +3614,8 @@ type PutMetricAlarmInput struct {
EvaluationPeriods *int64 `min:"1" type:"integer" required:"true"`
// The percentile statistic for the metric associated with the alarm. Specify
- // a value between p0.0 and p100.
+ // a value between p0.0 and p100. When you call PutMetricAlarm, you must specify
+ // either Statistic or ExtendedStatistic, but not both.
ExtendedStatistic *string `type:"string"`
// The actions to execute when this alarm transitions to the INSUFFICIENT_DATA
@@ -3571,11 +3623,12 @@ type PutMetricAlarmInput struct {
// Name (ARN).
//
// Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate
- // | arn:aws:automate:region:ec2:recover
+ // | arn:aws:automate:region:ec2:recover | arn:aws:sns:region:account-id:sns-topic-name
+ // | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name
//
- // Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer-account}:action/actions/AWS_EC2.InstanceId.Stop/1.0
- // | arn:aws:swf:us-east-1:{customer-account}:action/actions/AWS_EC2.InstanceId.Terminate/1.0
- // | arn:aws:swf:us-east-1:{customer-account}:action/actions/AWS_EC2.InstanceId.Reboot/1.0
+ // Valid Values (for use with IAM roles): arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Stop/1.0
+ // | arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Terminate/1.0
+ // | arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Reboot/1.0
InsufficientDataActions []*string `type:"list"`
// The name for the metric associated with the alarm.
@@ -3592,11 +3645,12 @@ type PutMetricAlarmInput struct {
// other state. Each action is specified as an Amazon Resource Name (ARN).
//
// Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate
- // | arn:aws:automate:region:ec2:recover
+ // | arn:aws:automate:region:ec2:recover | arn:aws:sns:region:account-id:sns-topic-name
+ // | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name
//
- // Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer-account}:action/actions/AWS_EC2.InstanceId.Stop/1.0
- // | arn:aws:swf:us-east-1:{customer-account}:action/actions/AWS_EC2.InstanceId.Terminate/1.0
- // | arn:aws:swf:us-east-1:{customer-account}:action/actions/AWS_EC2.InstanceId.Reboot/1.0
+ // Valid Values (for use with IAM roles): arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Stop/1.0
+ // | arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Terminate/1.0
+ // | arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Reboot/1.0
OKActions []*string `type:"list"`
// The period, in seconds, over which the specified statistic is applied. Valid
@@ -3619,7 +3673,8 @@ type PutMetricAlarmInput struct {
Period *int64 `min:"1" type:"integer" required:"true"`
// The statistic for the metric associated with the alarm, other than percentile.
- // For percentile statistics, use ExtendedStatistic.
+ // For percentile statistics, use ExtendedStatistic. When you call PutMetricAlarm,
+ // you must specify either Statistic or ExtendedStatistic, but not both.
Statistic *string `type:"string" enum:"Statistic"`
// The value against which the specified statistic is compared.
@@ -3668,6 +3723,9 @@ func (s *PutMetricAlarmInput) Validate() error {
if s.ComparisonOperator == nil {
invalidParams.Add(request.NewErrParamRequired("ComparisonOperator"))
}
+ if s.DatapointsToAlarm != nil && *s.DatapointsToAlarm < 1 {
+ invalidParams.Add(request.NewErrParamMinValue("DatapointsToAlarm", 1))
+ }
if s.EvaluateLowSampleCountPercentile != nil && len(*s.EvaluateLowSampleCountPercentile) < 1 {
invalidParams.Add(request.NewErrParamMinLen("EvaluateLowSampleCountPercentile", 1))
}
@@ -3748,6 +3806,12 @@ func (s *PutMetricAlarmInput) SetComparisonOperator(v string) *PutMetricAlarmInp
return s
}
+// SetDatapointsToAlarm sets the DatapointsToAlarm field's value.
+func (s *PutMetricAlarmInput) SetDatapointsToAlarm(v int64) *PutMetricAlarmInput {
+ s.DatapointsToAlarm = &v
+ return s
+}
+
// SetDimensions sets the Dimensions field's value.
func (s *PutMetricAlarmInput) SetDimensions(v []*Dimension) *PutMetricAlarmInput {
s.Dimensions = v
@@ -3826,7 +3890,7 @@ func (s *PutMetricAlarmInput) SetUnit(v string) *PutMetricAlarmInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricAlarmOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricAlarmOutput
type PutMetricAlarmOutput struct {
_ struct{} `type:"structure"`
}
@@ -3841,7 +3905,7 @@ func (s PutMetricAlarmOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricDataInput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricDataInput
type PutMetricDataInput struct {
_ struct{} `type:"structure"`
@@ -3910,7 +3974,7 @@ func (s *PutMetricDataInput) SetNamespace(v string) *PutMetricDataInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricDataOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutMetricDataOutput
type PutMetricDataOutput struct {
_ struct{} `type:"structure"`
}
@@ -3925,7 +3989,7 @@ func (s PutMetricDataOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/SetAlarmStateInput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/SetAlarmStateInput
type SetAlarmStateInput struct {
_ struct{} `type:"structure"`
@@ -4005,7 +4069,7 @@ func (s *SetAlarmStateInput) SetStateValue(v string) *SetAlarmStateInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/SetAlarmStateOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/SetAlarmStateOutput
type SetAlarmStateOutput struct {
_ struct{} `type:"structure"`
}
@@ -4021,7 +4085,7 @@ func (s SetAlarmStateOutput) GoString() string {
}
// Represents a set of statistics that describes a specific metric.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/StatisticSet
+// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/StatisticSet
type StatisticSet struct {
_ struct{} `type:"structure"`
diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/cloudwatchiface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/cloudwatchiface/interface.go
deleted file mode 100644
index 38d3dc60de3..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/cloudwatchiface/interface.go
+++ /dev/null
@@ -1,136 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-// Package cloudwatchiface provides an interface to enable mocking the Amazon CloudWatch service client
-// for testing your code.
-//
-// It is important to note that this interface will have breaking changes
-// when the service model is updated and adds new API operations, paginators,
-// and waiters.
-package cloudwatchiface
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/service/cloudwatch"
-)
-
-// CloudWatchAPI provides an interface to enable mocking the
-// cloudwatch.CloudWatch service client's API operation,
-// paginators, and waiters. This make unit testing your code that calls out
-// to the SDK's service client's calls easier.
-//
-// The best way to use this interface is so the SDK's service client's calls
-// can be stubbed out for unit testing your code with the SDK without needing
-// to inject custom request handlers into the the SDK's request pipeline.
-//
-// // myFunc uses an SDK service client to make a request to
-// // Amazon CloudWatch.
-// func myFunc(svc cloudwatchiface.CloudWatchAPI) bool {
-// // Make svc.DeleteAlarms request
-// }
-//
-// func main() {
-// sess := session.New()
-// svc := cloudwatch.New(sess)
-//
-// myFunc(svc)
-// }
-//
-// In your _test.go file:
-//
-// // Define a mock struct to be used in your unit tests of myFunc.
-// type mockCloudWatchClient struct {
-// cloudwatchiface.CloudWatchAPI
-// }
-// func (m *mockCloudWatchClient) DeleteAlarms(input *cloudwatch.DeleteAlarmsInput) (*cloudwatch.DeleteAlarmsOutput, error) {
-// // mock response/functionality
-// }
-//
-// func TestMyFunc(t *testing.T) {
-// // Setup Test
-// mockSvc := &mockCloudWatchClient{}
-//
-// myfunc(mockSvc)
-//
-// // Verify myFunc's functionality
-// }
-//
-// It is important to note that this interface will have breaking changes
-// when the service model is updated and adds new API operations, paginators,
-// and waiters. Its suggested to use the pattern above for testing, or using
-// tooling to generate mocks to satisfy the interfaces.
-type CloudWatchAPI interface {
- DeleteAlarms(*cloudwatch.DeleteAlarmsInput) (*cloudwatch.DeleteAlarmsOutput, error)
- DeleteAlarmsWithContext(aws.Context, *cloudwatch.DeleteAlarmsInput, ...request.Option) (*cloudwatch.DeleteAlarmsOutput, error)
- DeleteAlarmsRequest(*cloudwatch.DeleteAlarmsInput) (*request.Request, *cloudwatch.DeleteAlarmsOutput)
-
- DeleteDashboards(*cloudwatch.DeleteDashboardsInput) (*cloudwatch.DeleteDashboardsOutput, error)
- DeleteDashboardsWithContext(aws.Context, *cloudwatch.DeleteDashboardsInput, ...request.Option) (*cloudwatch.DeleteDashboardsOutput, error)
- DeleteDashboardsRequest(*cloudwatch.DeleteDashboardsInput) (*request.Request, *cloudwatch.DeleteDashboardsOutput)
-
- DescribeAlarmHistory(*cloudwatch.DescribeAlarmHistoryInput) (*cloudwatch.DescribeAlarmHistoryOutput, error)
- DescribeAlarmHistoryWithContext(aws.Context, *cloudwatch.DescribeAlarmHistoryInput, ...request.Option) (*cloudwatch.DescribeAlarmHistoryOutput, error)
- DescribeAlarmHistoryRequest(*cloudwatch.DescribeAlarmHistoryInput) (*request.Request, *cloudwatch.DescribeAlarmHistoryOutput)
-
- DescribeAlarmHistoryPages(*cloudwatch.DescribeAlarmHistoryInput, func(*cloudwatch.DescribeAlarmHistoryOutput, bool) bool) error
- DescribeAlarmHistoryPagesWithContext(aws.Context, *cloudwatch.DescribeAlarmHistoryInput, func(*cloudwatch.DescribeAlarmHistoryOutput, bool) bool, ...request.Option) error
-
- DescribeAlarms(*cloudwatch.DescribeAlarmsInput) (*cloudwatch.DescribeAlarmsOutput, error)
- DescribeAlarmsWithContext(aws.Context, *cloudwatch.DescribeAlarmsInput, ...request.Option) (*cloudwatch.DescribeAlarmsOutput, error)
- DescribeAlarmsRequest(*cloudwatch.DescribeAlarmsInput) (*request.Request, *cloudwatch.DescribeAlarmsOutput)
-
- DescribeAlarmsPages(*cloudwatch.DescribeAlarmsInput, func(*cloudwatch.DescribeAlarmsOutput, bool) bool) error
- DescribeAlarmsPagesWithContext(aws.Context, *cloudwatch.DescribeAlarmsInput, func(*cloudwatch.DescribeAlarmsOutput, bool) bool, ...request.Option) error
-
- DescribeAlarmsForMetric(*cloudwatch.DescribeAlarmsForMetricInput) (*cloudwatch.DescribeAlarmsForMetricOutput, error)
- DescribeAlarmsForMetricWithContext(aws.Context, *cloudwatch.DescribeAlarmsForMetricInput, ...request.Option) (*cloudwatch.DescribeAlarmsForMetricOutput, error)
- DescribeAlarmsForMetricRequest(*cloudwatch.DescribeAlarmsForMetricInput) (*request.Request, *cloudwatch.DescribeAlarmsForMetricOutput)
-
- DisableAlarmActions(*cloudwatch.DisableAlarmActionsInput) (*cloudwatch.DisableAlarmActionsOutput, error)
- DisableAlarmActionsWithContext(aws.Context, *cloudwatch.DisableAlarmActionsInput, ...request.Option) (*cloudwatch.DisableAlarmActionsOutput, error)
- DisableAlarmActionsRequest(*cloudwatch.DisableAlarmActionsInput) (*request.Request, *cloudwatch.DisableAlarmActionsOutput)
-
- EnableAlarmActions(*cloudwatch.EnableAlarmActionsInput) (*cloudwatch.EnableAlarmActionsOutput, error)
- EnableAlarmActionsWithContext(aws.Context, *cloudwatch.EnableAlarmActionsInput, ...request.Option) (*cloudwatch.EnableAlarmActionsOutput, error)
- EnableAlarmActionsRequest(*cloudwatch.EnableAlarmActionsInput) (*request.Request, *cloudwatch.EnableAlarmActionsOutput)
-
- GetDashboard(*cloudwatch.GetDashboardInput) (*cloudwatch.GetDashboardOutput, error)
- GetDashboardWithContext(aws.Context, *cloudwatch.GetDashboardInput, ...request.Option) (*cloudwatch.GetDashboardOutput, error)
- GetDashboardRequest(*cloudwatch.GetDashboardInput) (*request.Request, *cloudwatch.GetDashboardOutput)
-
- GetMetricStatistics(*cloudwatch.GetMetricStatisticsInput) (*cloudwatch.GetMetricStatisticsOutput, error)
- GetMetricStatisticsWithContext(aws.Context, *cloudwatch.GetMetricStatisticsInput, ...request.Option) (*cloudwatch.GetMetricStatisticsOutput, error)
- GetMetricStatisticsRequest(*cloudwatch.GetMetricStatisticsInput) (*request.Request, *cloudwatch.GetMetricStatisticsOutput)
-
- ListDashboards(*cloudwatch.ListDashboardsInput) (*cloudwatch.ListDashboardsOutput, error)
- ListDashboardsWithContext(aws.Context, *cloudwatch.ListDashboardsInput, ...request.Option) (*cloudwatch.ListDashboardsOutput, error)
- ListDashboardsRequest(*cloudwatch.ListDashboardsInput) (*request.Request, *cloudwatch.ListDashboardsOutput)
-
- ListMetrics(*cloudwatch.ListMetricsInput) (*cloudwatch.ListMetricsOutput, error)
- ListMetricsWithContext(aws.Context, *cloudwatch.ListMetricsInput, ...request.Option) (*cloudwatch.ListMetricsOutput, error)
- ListMetricsRequest(*cloudwatch.ListMetricsInput) (*request.Request, *cloudwatch.ListMetricsOutput)
-
- ListMetricsPages(*cloudwatch.ListMetricsInput, func(*cloudwatch.ListMetricsOutput, bool) bool) error
- ListMetricsPagesWithContext(aws.Context, *cloudwatch.ListMetricsInput, func(*cloudwatch.ListMetricsOutput, bool) bool, ...request.Option) error
-
- PutDashboard(*cloudwatch.PutDashboardInput) (*cloudwatch.PutDashboardOutput, error)
- PutDashboardWithContext(aws.Context, *cloudwatch.PutDashboardInput, ...request.Option) (*cloudwatch.PutDashboardOutput, error)
- PutDashboardRequest(*cloudwatch.PutDashboardInput) (*request.Request, *cloudwatch.PutDashboardOutput)
-
- PutMetricAlarm(*cloudwatch.PutMetricAlarmInput) (*cloudwatch.PutMetricAlarmOutput, error)
- PutMetricAlarmWithContext(aws.Context, *cloudwatch.PutMetricAlarmInput, ...request.Option) (*cloudwatch.PutMetricAlarmOutput, error)
- PutMetricAlarmRequest(*cloudwatch.PutMetricAlarmInput) (*request.Request, *cloudwatch.PutMetricAlarmOutput)
-
- PutMetricData(*cloudwatch.PutMetricDataInput) (*cloudwatch.PutMetricDataOutput, error)
- PutMetricDataWithContext(aws.Context, *cloudwatch.PutMetricDataInput, ...request.Option) (*cloudwatch.PutMetricDataOutput, error)
- PutMetricDataRequest(*cloudwatch.PutMetricDataInput) (*request.Request, *cloudwatch.PutMetricDataOutput)
-
- SetAlarmState(*cloudwatch.SetAlarmStateInput) (*cloudwatch.SetAlarmStateOutput, error)
- SetAlarmStateWithContext(aws.Context, *cloudwatch.SetAlarmStateInput, ...request.Option) (*cloudwatch.SetAlarmStateOutput, error)
- SetAlarmStateRequest(*cloudwatch.SetAlarmStateInput) (*request.Request, *cloudwatch.SetAlarmStateOutput)
-
- WaitUntilAlarmExists(*cloudwatch.DescribeAlarmsInput) error
- WaitUntilAlarmExistsWithContext(aws.Context, *cloudwatch.DescribeAlarmsInput, ...request.WaiterOption) error
-}
-
-var _ CloudWatchAPI = (*cloudwatch.CloudWatch)(nil)
diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/doc.go
index ef2f5025036..662023540c8 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/doc.go
@@ -26,69 +26,17 @@
//
// Using the Client
//
-// To use the client for Amazon CloudWatch you will first need
-// to create a new instance of it.
+// To contact Amazon CloudWatch with the SDK use the New function to create
+// a new service client. With that client you can make API requests to the service.
+// These clients are safe to use concurrently.
//
-// When creating a client for an AWS service you'll first need to have a Session
-// already created. The Session provides configuration that can be shared
-// between multiple service clients. Additional configuration can be applied to
-// the Session and service's client when they are constructed. The aws package's
-// Config type contains several fields such as Region for the AWS Region the
-// client should make API requests too. The optional Config value can be provided
-// as the variadic argument for Sessions and client creation.
-//
-// Once the service's client is created you can use it to make API requests the
-// AWS service. These clients are safe to use concurrently.
-//
-// // Create a session to share configuration, and load external configuration.
-// sess := session.Must(session.NewSession())
-//
-// // Create the service's client with the session.
-// svc := cloudwatch.New(sess)
-//
-// See the SDK's documentation for more information on how to use service clients.
+// See the SDK's documentation for more information on how to use the SDK.
// https://docs.aws.amazon.com/sdk-for-go/api/
//
-// See aws package's Config type for more information on configuration options.
+// See aws.Config documentation for more information on configuring SDK clients.
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
//
// See the Amazon CloudWatch client CloudWatch for more
-// information on creating the service's client.
+// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudwatch/#New
-//
-// Once the client is created you can make an API request to the service.
-// Each API method takes a input parameter, and returns the service response
-// and an error.
-//
-// The API method will document which error codes the service can be returned
-// by the operation if the service models the API operation's errors. These
-// errors will also be available as const strings prefixed with "ErrCode".
-//
-// result, err := svc.DeleteAlarms(params)
-// if err != nil {
-// // Cast err to awserr.Error to handle specific error codes.
-// aerr, ok := err.(awserr.Error)
-// if ok && aerr.Code() == {
-// // Specific error code handling
-// }
-// return err
-// }
-//
-// fmt.Println("DeleteAlarms result:")
-// fmt.Println(result)
-//
-// Using the Client with Context
-//
-// The service's client also provides methods to make API requests with a Context
-// value. This allows you to control the timeout, and cancellation of pending
-// requests. These methods also take request Option as variadic parameter to apply
-// additional configuration to the API request.
-//
-// ctx := context.Background()
-//
-// result, err := svc.DeleteAlarmsWithContext(ctx, params)
-//
-// See the request package documentation for more information on using Context pattern
-// with the SDK.
-// https://docs.aws.amazon.com/sdk-for-go/api/aws/request/
package cloudwatch
diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/waiters.go
index 064abf01566..21e42ac581b 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/waiters.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/waiters.go
@@ -11,7 +11,7 @@ import (
// WaitUntilAlarmExists uses the CloudWatch API operation
// DescribeAlarms to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *CloudWatch) WaitUntilAlarmExists(input *DescribeAlarmsInput) error {
return c.WaitUntilAlarmExistsWithContext(aws.BackgroundContext(), input)
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go
index 87b13f313b0..1743b344993 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go
@@ -17,19 +17,18 @@ const opAcceptReservedInstancesExchangeQuote = "AcceptReservedInstancesExchangeQ
// AcceptReservedInstancesExchangeQuoteRequest generates a "aws/request.Request" representing the
// client's request for the AcceptReservedInstancesExchangeQuote operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AcceptReservedInstancesExchangeQuote for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AcceptReservedInstancesExchangeQuote method directly
-// instead.
+// See AcceptReservedInstancesExchangeQuote for more information on using the AcceptReservedInstancesExchangeQuote
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AcceptReservedInstancesExchangeQuoteRequest method.
// req, resp := client.AcceptReservedInstancesExchangeQuoteRequest(params)
@@ -39,7 +38,7 @@ const opAcceptReservedInstancesExchangeQuote = "AcceptReservedInstancesExchangeQ
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptReservedInstancesExchangeQuote
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptReservedInstancesExchangeQuote
func (c *EC2) AcceptReservedInstancesExchangeQuoteRequest(input *AcceptReservedInstancesExchangeQuoteInput) (req *request.Request, output *AcceptReservedInstancesExchangeQuoteOutput) {
op := &request.Operation{
Name: opAcceptReservedInstancesExchangeQuote,
@@ -67,7 +66,7 @@ func (c *EC2) AcceptReservedInstancesExchangeQuoteRequest(input *AcceptReservedI
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation AcceptReservedInstancesExchangeQuote for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptReservedInstancesExchangeQuote
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptReservedInstancesExchangeQuote
func (c *EC2) AcceptReservedInstancesExchangeQuote(input *AcceptReservedInstancesExchangeQuoteInput) (*AcceptReservedInstancesExchangeQuoteOutput, error) {
req, out := c.AcceptReservedInstancesExchangeQuoteRequest(input)
return out, req.Send()
@@ -89,23 +88,97 @@ func (c *EC2) AcceptReservedInstancesExchangeQuoteWithContext(ctx aws.Context, i
return out, req.Send()
}
+const opAcceptVpcEndpointConnections = "AcceptVpcEndpointConnections"
+
+// AcceptVpcEndpointConnectionsRequest generates a "aws/request.Request" representing the
+// client's request for the AcceptVpcEndpointConnections operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See AcceptVpcEndpointConnections for more information on using the AcceptVpcEndpointConnections
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the AcceptVpcEndpointConnectionsRequest method.
+// req, resp := client.AcceptVpcEndpointConnectionsRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptVpcEndpointConnections
+func (c *EC2) AcceptVpcEndpointConnectionsRequest(input *AcceptVpcEndpointConnectionsInput) (req *request.Request, output *AcceptVpcEndpointConnectionsOutput) {
+ op := &request.Operation{
+ Name: opAcceptVpcEndpointConnections,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &AcceptVpcEndpointConnectionsInput{}
+ }
+
+ output = &AcceptVpcEndpointConnectionsOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// AcceptVpcEndpointConnections API operation for Amazon Elastic Compute Cloud.
+//
+// Accepts one or more interface VPC endpoint connection requests to your VPC
+// endpoint service.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation AcceptVpcEndpointConnections for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptVpcEndpointConnections
+func (c *EC2) AcceptVpcEndpointConnections(input *AcceptVpcEndpointConnectionsInput) (*AcceptVpcEndpointConnectionsOutput, error) {
+ req, out := c.AcceptVpcEndpointConnectionsRequest(input)
+ return out, req.Send()
+}
+
+// AcceptVpcEndpointConnectionsWithContext is the same as AcceptVpcEndpointConnections with the addition of
+// the ability to pass a context and additional request options.
+//
+// See AcceptVpcEndpointConnections for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) AcceptVpcEndpointConnectionsWithContext(ctx aws.Context, input *AcceptVpcEndpointConnectionsInput, opts ...request.Option) (*AcceptVpcEndpointConnectionsOutput, error) {
+ req, out := c.AcceptVpcEndpointConnectionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opAcceptVpcPeeringConnection = "AcceptVpcPeeringConnection"
// AcceptVpcPeeringConnectionRequest generates a "aws/request.Request" representing the
// client's request for the AcceptVpcPeeringConnection operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AcceptVpcPeeringConnection for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AcceptVpcPeeringConnection method directly
-// instead.
+// See AcceptVpcPeeringConnection for more information on using the AcceptVpcPeeringConnection
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AcceptVpcPeeringConnectionRequest method.
// req, resp := client.AcceptVpcPeeringConnectionRequest(params)
@@ -115,7 +188,7 @@ const opAcceptVpcPeeringConnection = "AcceptVpcPeeringConnection"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptVpcPeeringConnection
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptVpcPeeringConnection
func (c *EC2) AcceptVpcPeeringConnectionRequest(input *AcceptVpcPeeringConnectionInput) (req *request.Request, output *AcceptVpcPeeringConnectionOutput) {
op := &request.Operation{
Name: opAcceptVpcPeeringConnection,
@@ -139,13 +212,16 @@ func (c *EC2) AcceptVpcPeeringConnectionRequest(input *AcceptVpcPeeringConnectio
// of the peer VPC. Use DescribeVpcPeeringConnections to view your outstanding
// VPC peering connection requests.
//
+// For an inter-region VPC peering connection request, you must accept the VPC
+// peering connection in the region of the accepter VPC.
+//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation AcceptVpcPeeringConnection for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptVpcPeeringConnection
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptVpcPeeringConnection
func (c *EC2) AcceptVpcPeeringConnection(input *AcceptVpcPeeringConnectionInput) (*AcceptVpcPeeringConnectionOutput, error) {
req, out := c.AcceptVpcPeeringConnectionRequest(input)
return out, req.Send()
@@ -171,19 +247,18 @@ const opAllocateAddress = "AllocateAddress"
// AllocateAddressRequest generates a "aws/request.Request" representing the
// client's request for the AllocateAddress operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AllocateAddress for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AllocateAddress method directly
-// instead.
+// See AllocateAddress for more information on using the AllocateAddress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AllocateAddressRequest method.
// req, resp := client.AllocateAddressRequest(params)
@@ -193,7 +268,7 @@ const opAllocateAddress = "AllocateAddress"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateAddress
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateAddress
func (c *EC2) AllocateAddressRequest(input *AllocateAddressInput) (req *request.Request, output *AllocateAddressOutput) {
op := &request.Operation{
Name: opAllocateAddress,
@@ -212,10 +287,18 @@ func (c *EC2) AllocateAddressRequest(input *AllocateAddressInput) (req *request.
// AllocateAddress API operation for Amazon Elastic Compute Cloud.
//
-// Acquires an Elastic IP address.
+// Allocates an Elastic IP address.
//
// An Elastic IP address is for use either in the EC2-Classic platform or in
-// a VPC. For more information, see Elastic IP Addresses (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html)
+// a VPC. By default, you can allocate 5 Elastic IP addresses for EC2-Classic
+// per region and 5 Elastic IP addresses for EC2-VPC per region.
+//
+// If you release an Elastic IP address for use in a VPC, you might be able
+// to recover it. To recover an Elastic IP address that you released, specify
+// it in the Address parameter. Note that you cannot recover an Elastic IP address
+// that you released after it is allocated to another AWS account.
+//
+// For more information, see Elastic IP Addresses (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html)
// in the Amazon Elastic Compute Cloud User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -224,7 +307,7 @@ func (c *EC2) AllocateAddressRequest(input *AllocateAddressInput) (req *request.
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation AllocateAddress for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateAddress
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateAddress
func (c *EC2) AllocateAddress(input *AllocateAddressInput) (*AllocateAddressOutput, error) {
req, out := c.AllocateAddressRequest(input)
return out, req.Send()
@@ -250,19 +333,18 @@ const opAllocateHosts = "AllocateHosts"
// AllocateHostsRequest generates a "aws/request.Request" representing the
// client's request for the AllocateHosts operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AllocateHosts for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AllocateHosts method directly
-// instead.
+// See AllocateHosts for more information on using the AllocateHosts
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AllocateHostsRequest method.
// req, resp := client.AllocateHostsRequest(params)
@@ -272,7 +354,7 @@ const opAllocateHosts = "AllocateHosts"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateHosts
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateHosts
func (c *EC2) AllocateHostsRequest(input *AllocateHostsInput) (req *request.Request, output *AllocateHostsOutput) {
op := &request.Operation{
Name: opAllocateHosts,
@@ -301,7 +383,7 @@ func (c *EC2) AllocateHostsRequest(input *AllocateHostsInput) (req *request.Requ
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation AllocateHosts for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateHosts
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateHosts
func (c *EC2) AllocateHosts(input *AllocateHostsInput) (*AllocateHostsOutput, error) {
req, out := c.AllocateHostsRequest(input)
return out, req.Send()
@@ -327,19 +409,18 @@ const opAssignIpv6Addresses = "AssignIpv6Addresses"
// AssignIpv6AddressesRequest generates a "aws/request.Request" representing the
// client's request for the AssignIpv6Addresses operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssignIpv6Addresses for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssignIpv6Addresses method directly
-// instead.
+// See AssignIpv6Addresses for more information on using the AssignIpv6Addresses
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssignIpv6AddressesRequest method.
// req, resp := client.AssignIpv6AddressesRequest(params)
@@ -349,7 +430,7 @@ const opAssignIpv6Addresses = "AssignIpv6Addresses"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignIpv6Addresses
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignIpv6Addresses
func (c *EC2) AssignIpv6AddressesRequest(input *AssignIpv6AddressesInput) (req *request.Request, output *AssignIpv6AddressesOutput) {
op := &request.Operation{
Name: opAssignIpv6Addresses,
@@ -383,7 +464,7 @@ func (c *EC2) AssignIpv6AddressesRequest(input *AssignIpv6AddressesInput) (req *
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation AssignIpv6Addresses for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignIpv6Addresses
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignIpv6Addresses
func (c *EC2) AssignIpv6Addresses(input *AssignIpv6AddressesInput) (*AssignIpv6AddressesOutput, error) {
req, out := c.AssignIpv6AddressesRequest(input)
return out, req.Send()
@@ -409,19 +490,18 @@ const opAssignPrivateIpAddresses = "AssignPrivateIpAddresses"
// AssignPrivateIpAddressesRequest generates a "aws/request.Request" representing the
// client's request for the AssignPrivateIpAddresses operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssignPrivateIpAddresses for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssignPrivateIpAddresses method directly
-// instead.
+// See AssignPrivateIpAddresses for more information on using the AssignPrivateIpAddresses
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssignPrivateIpAddressesRequest method.
// req, resp := client.AssignPrivateIpAddressesRequest(params)
@@ -431,7 +511,7 @@ const opAssignPrivateIpAddresses = "AssignPrivateIpAddresses"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignPrivateIpAddresses
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignPrivateIpAddresses
func (c *EC2) AssignPrivateIpAddressesRequest(input *AssignPrivateIpAddressesInput) (req *request.Request, output *AssignPrivateIpAddressesOutput) {
op := &request.Operation{
Name: opAssignPrivateIpAddresses,
@@ -470,7 +550,7 @@ func (c *EC2) AssignPrivateIpAddressesRequest(input *AssignPrivateIpAddressesInp
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation AssignPrivateIpAddresses for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignPrivateIpAddresses
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignPrivateIpAddresses
func (c *EC2) AssignPrivateIpAddresses(input *AssignPrivateIpAddressesInput) (*AssignPrivateIpAddressesOutput, error) {
req, out := c.AssignPrivateIpAddressesRequest(input)
return out, req.Send()
@@ -496,19 +576,18 @@ const opAssociateAddress = "AssociateAddress"
// AssociateAddressRequest generates a "aws/request.Request" representing the
// client's request for the AssociateAddress operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssociateAddress for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssociateAddress method directly
-// instead.
+// See AssociateAddress for more information on using the AssociateAddress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssociateAddressRequest method.
// req, resp := client.AssociateAddressRequest(params)
@@ -518,7 +597,7 @@ const opAssociateAddress = "AssociateAddress"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateAddress
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateAddress
func (c *EC2) AssociateAddressRequest(input *AssociateAddressInput) (req *request.Request, output *AssociateAddressOutput) {
op := &request.Operation{
Name: opAssociateAddress,
@@ -568,7 +647,7 @@ func (c *EC2) AssociateAddressRequest(input *AssociateAddressInput) (req *reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation AssociateAddress for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateAddress
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateAddress
func (c *EC2) AssociateAddress(input *AssociateAddressInput) (*AssociateAddressOutput, error) {
req, out := c.AssociateAddressRequest(input)
return out, req.Send()
@@ -594,19 +673,18 @@ const opAssociateDhcpOptions = "AssociateDhcpOptions"
// AssociateDhcpOptionsRequest generates a "aws/request.Request" representing the
// client's request for the AssociateDhcpOptions operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssociateDhcpOptions for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssociateDhcpOptions method directly
-// instead.
+// See AssociateDhcpOptions for more information on using the AssociateDhcpOptions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssociateDhcpOptionsRequest method.
// req, resp := client.AssociateDhcpOptionsRequest(params)
@@ -616,7 +694,7 @@ const opAssociateDhcpOptions = "AssociateDhcpOptions"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateDhcpOptions
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateDhcpOptions
func (c *EC2) AssociateDhcpOptionsRequest(input *AssociateDhcpOptionsInput) (req *request.Request, output *AssociateDhcpOptionsOutput) {
op := &request.Operation{
Name: opAssociateDhcpOptions,
@@ -656,7 +734,7 @@ func (c *EC2) AssociateDhcpOptionsRequest(input *AssociateDhcpOptionsInput) (req
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation AssociateDhcpOptions for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateDhcpOptions
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateDhcpOptions
func (c *EC2) AssociateDhcpOptions(input *AssociateDhcpOptionsInput) (*AssociateDhcpOptionsOutput, error) {
req, out := c.AssociateDhcpOptionsRequest(input)
return out, req.Send()
@@ -682,19 +760,18 @@ const opAssociateIamInstanceProfile = "AssociateIamInstanceProfile"
// AssociateIamInstanceProfileRequest generates a "aws/request.Request" representing the
// client's request for the AssociateIamInstanceProfile operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssociateIamInstanceProfile for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssociateIamInstanceProfile method directly
-// instead.
+// See AssociateIamInstanceProfile for more information on using the AssociateIamInstanceProfile
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssociateIamInstanceProfileRequest method.
// req, resp := client.AssociateIamInstanceProfileRequest(params)
@@ -704,7 +781,7 @@ const opAssociateIamInstanceProfile = "AssociateIamInstanceProfile"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateIamInstanceProfile
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateIamInstanceProfile
func (c *EC2) AssociateIamInstanceProfileRequest(input *AssociateIamInstanceProfileInput) (req *request.Request, output *AssociateIamInstanceProfileOutput) {
op := &request.Operation{
Name: opAssociateIamInstanceProfile,
@@ -732,7 +809,7 @@ func (c *EC2) AssociateIamInstanceProfileRequest(input *AssociateIamInstanceProf
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation AssociateIamInstanceProfile for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateIamInstanceProfile
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateIamInstanceProfile
func (c *EC2) AssociateIamInstanceProfile(input *AssociateIamInstanceProfileInput) (*AssociateIamInstanceProfileOutput, error) {
req, out := c.AssociateIamInstanceProfileRequest(input)
return out, req.Send()
@@ -758,19 +835,18 @@ const opAssociateRouteTable = "AssociateRouteTable"
// AssociateRouteTableRequest generates a "aws/request.Request" representing the
// client's request for the AssociateRouteTable operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssociateRouteTable for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssociateRouteTable method directly
-// instead.
+// See AssociateRouteTable for more information on using the AssociateRouteTable
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssociateRouteTableRequest method.
// req, resp := client.AssociateRouteTableRequest(params)
@@ -780,7 +856,7 @@ const opAssociateRouteTable = "AssociateRouteTable"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateRouteTable
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateRouteTable
func (c *EC2) AssociateRouteTableRequest(input *AssociateRouteTableInput) (req *request.Request, output *AssociateRouteTableOutput) {
op := &request.Operation{
Name: opAssociateRouteTable,
@@ -814,7 +890,7 @@ func (c *EC2) AssociateRouteTableRequest(input *AssociateRouteTableInput) (req *
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation AssociateRouteTable for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateRouteTable
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateRouteTable
func (c *EC2) AssociateRouteTable(input *AssociateRouteTableInput) (*AssociateRouteTableOutput, error) {
req, out := c.AssociateRouteTableRequest(input)
return out, req.Send()
@@ -840,19 +916,18 @@ const opAssociateSubnetCidrBlock = "AssociateSubnetCidrBlock"
// AssociateSubnetCidrBlockRequest generates a "aws/request.Request" representing the
// client's request for the AssociateSubnetCidrBlock operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssociateSubnetCidrBlock for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssociateSubnetCidrBlock method directly
-// instead.
+// See AssociateSubnetCidrBlock for more information on using the AssociateSubnetCidrBlock
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssociateSubnetCidrBlockRequest method.
// req, resp := client.AssociateSubnetCidrBlockRequest(params)
@@ -862,7 +937,7 @@ const opAssociateSubnetCidrBlock = "AssociateSubnetCidrBlock"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateSubnetCidrBlock
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateSubnetCidrBlock
func (c *EC2) AssociateSubnetCidrBlockRequest(input *AssociateSubnetCidrBlockInput) (req *request.Request, output *AssociateSubnetCidrBlockOutput) {
op := &request.Operation{
Name: opAssociateSubnetCidrBlock,
@@ -891,7 +966,7 @@ func (c *EC2) AssociateSubnetCidrBlockRequest(input *AssociateSubnetCidrBlockInp
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation AssociateSubnetCidrBlock for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateSubnetCidrBlock
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateSubnetCidrBlock
func (c *EC2) AssociateSubnetCidrBlock(input *AssociateSubnetCidrBlockInput) (*AssociateSubnetCidrBlockOutput, error) {
req, out := c.AssociateSubnetCidrBlockRequest(input)
return out, req.Send()
@@ -917,19 +992,18 @@ const opAssociateVpcCidrBlock = "AssociateVpcCidrBlock"
// AssociateVpcCidrBlockRequest generates a "aws/request.Request" representing the
// client's request for the AssociateVpcCidrBlock operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssociateVpcCidrBlock for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssociateVpcCidrBlock method directly
-// instead.
+// See AssociateVpcCidrBlock for more information on using the AssociateVpcCidrBlock
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssociateVpcCidrBlockRequest method.
// req, resp := client.AssociateVpcCidrBlockRequest(params)
@@ -939,7 +1013,7 @@ const opAssociateVpcCidrBlock = "AssociateVpcCidrBlock"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateVpcCidrBlock
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateVpcCidrBlock
func (c *EC2) AssociateVpcCidrBlockRequest(input *AssociateVpcCidrBlockInput) (req *request.Request, output *AssociateVpcCidrBlockOutput) {
op := &request.Operation{
Name: opAssociateVpcCidrBlock,
@@ -958,8 +1032,13 @@ func (c *EC2) AssociateVpcCidrBlockRequest(input *AssociateVpcCidrBlockInput) (r
// AssociateVpcCidrBlock API operation for Amazon Elastic Compute Cloud.
//
-// Associates a CIDR block with your VPC. You can only associate a single Amazon-provided
-// IPv6 CIDR block with your VPC. The IPv6 CIDR block size is fixed at /56.
+// Associates a CIDR block with your VPC. You can associate a secondary IPv4
+// CIDR block, or you can associate an Amazon-provided IPv6 CIDR block. The
+// IPv6 CIDR block size is fixed at /56.
+//
+// For more information about associating CIDR blocks with your VPC and applicable
+// restrictions, see VPC and Subnet Sizing (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html#VPC_Sizing)
+// in the Amazon Virtual Private Cloud User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -967,7 +1046,7 @@ func (c *EC2) AssociateVpcCidrBlockRequest(input *AssociateVpcCidrBlockInput) (r
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation AssociateVpcCidrBlock for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateVpcCidrBlock
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateVpcCidrBlock
func (c *EC2) AssociateVpcCidrBlock(input *AssociateVpcCidrBlockInput) (*AssociateVpcCidrBlockOutput, error) {
req, out := c.AssociateVpcCidrBlockRequest(input)
return out, req.Send()
@@ -993,19 +1072,18 @@ const opAttachClassicLinkVpc = "AttachClassicLinkVpc"
// AttachClassicLinkVpcRequest generates a "aws/request.Request" representing the
// client's request for the AttachClassicLinkVpc operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AttachClassicLinkVpc for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AttachClassicLinkVpc method directly
-// instead.
+// See AttachClassicLinkVpc for more information on using the AttachClassicLinkVpc
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AttachClassicLinkVpcRequest method.
// req, resp := client.AttachClassicLinkVpcRequest(params)
@@ -1015,7 +1093,7 @@ const opAttachClassicLinkVpc = "AttachClassicLinkVpc"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachClassicLinkVpc
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachClassicLinkVpc
func (c *EC2) AttachClassicLinkVpcRequest(input *AttachClassicLinkVpcInput) (req *request.Request, output *AttachClassicLinkVpcOutput) {
op := &request.Operation{
Name: opAttachClassicLinkVpc,
@@ -1053,7 +1131,7 @@ func (c *EC2) AttachClassicLinkVpcRequest(input *AttachClassicLinkVpcInput) (req
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation AttachClassicLinkVpc for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachClassicLinkVpc
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachClassicLinkVpc
func (c *EC2) AttachClassicLinkVpc(input *AttachClassicLinkVpcInput) (*AttachClassicLinkVpcOutput, error) {
req, out := c.AttachClassicLinkVpcRequest(input)
return out, req.Send()
@@ -1079,19 +1157,18 @@ const opAttachInternetGateway = "AttachInternetGateway"
// AttachInternetGatewayRequest generates a "aws/request.Request" representing the
// client's request for the AttachInternetGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AttachInternetGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AttachInternetGateway method directly
-// instead.
+// See AttachInternetGateway for more information on using the AttachInternetGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AttachInternetGatewayRequest method.
// req, resp := client.AttachInternetGatewayRequest(params)
@@ -1101,7 +1178,7 @@ const opAttachInternetGateway = "AttachInternetGateway"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachInternetGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachInternetGateway
func (c *EC2) AttachInternetGatewayRequest(input *AttachInternetGatewayInput) (req *request.Request, output *AttachInternetGatewayOutput) {
op := &request.Operation{
Name: opAttachInternetGateway,
@@ -1132,7 +1209,7 @@ func (c *EC2) AttachInternetGatewayRequest(input *AttachInternetGatewayInput) (r
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation AttachInternetGateway for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachInternetGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachInternetGateway
func (c *EC2) AttachInternetGateway(input *AttachInternetGatewayInput) (*AttachInternetGatewayOutput, error) {
req, out := c.AttachInternetGatewayRequest(input)
return out, req.Send()
@@ -1158,19 +1235,18 @@ const opAttachNetworkInterface = "AttachNetworkInterface"
// AttachNetworkInterfaceRequest generates a "aws/request.Request" representing the
// client's request for the AttachNetworkInterface operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AttachNetworkInterface for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AttachNetworkInterface method directly
-// instead.
+// See AttachNetworkInterface for more information on using the AttachNetworkInterface
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AttachNetworkInterfaceRequest method.
// req, resp := client.AttachNetworkInterfaceRequest(params)
@@ -1180,7 +1256,7 @@ const opAttachNetworkInterface = "AttachNetworkInterface"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachNetworkInterface
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachNetworkInterface
func (c *EC2) AttachNetworkInterfaceRequest(input *AttachNetworkInterfaceInput) (req *request.Request, output *AttachNetworkInterfaceOutput) {
op := &request.Operation{
Name: opAttachNetworkInterface,
@@ -1207,7 +1283,7 @@ func (c *EC2) AttachNetworkInterfaceRequest(input *AttachNetworkInterfaceInput)
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation AttachNetworkInterface for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachNetworkInterface
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachNetworkInterface
func (c *EC2) AttachNetworkInterface(input *AttachNetworkInterfaceInput) (*AttachNetworkInterfaceOutput, error) {
req, out := c.AttachNetworkInterfaceRequest(input)
return out, req.Send()
@@ -1233,19 +1309,18 @@ const opAttachVolume = "AttachVolume"
// AttachVolumeRequest generates a "aws/request.Request" representing the
// client's request for the AttachVolume operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AttachVolume for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AttachVolume method directly
-// instead.
+// See AttachVolume for more information on using the AttachVolume
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AttachVolumeRequest method.
// req, resp := client.AttachVolumeRequest(params)
@@ -1255,7 +1330,7 @@ const opAttachVolume = "AttachVolume"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVolume
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVolume
func (c *EC2) AttachVolumeRequest(input *AttachVolumeInput) (req *request.Request, output *VolumeAttachment) {
op := &request.Operation{
Name: opAttachVolume,
@@ -1311,7 +1386,7 @@ func (c *EC2) AttachVolumeRequest(input *AttachVolumeInput) (req *request.Reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation AttachVolume for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVolume
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVolume
func (c *EC2) AttachVolume(input *AttachVolumeInput) (*VolumeAttachment, error) {
req, out := c.AttachVolumeRequest(input)
return out, req.Send()
@@ -1337,19 +1412,18 @@ const opAttachVpnGateway = "AttachVpnGateway"
// AttachVpnGatewayRequest generates a "aws/request.Request" representing the
// client's request for the AttachVpnGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AttachVpnGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AttachVpnGateway method directly
-// instead.
+// See AttachVpnGateway for more information on using the AttachVpnGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AttachVpnGatewayRequest method.
// req, resp := client.AttachVpnGatewayRequest(params)
@@ -1359,7 +1433,7 @@ const opAttachVpnGateway = "AttachVpnGateway"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVpnGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVpnGateway
func (c *EC2) AttachVpnGatewayRequest(input *AttachVpnGatewayInput) (req *request.Request, output *AttachVpnGatewayOutput) {
op := &request.Operation{
Name: opAttachVpnGateway,
@@ -1381,8 +1455,7 @@ func (c *EC2) AttachVpnGatewayRequest(input *AttachVpnGatewayInput) (req *reques
// Attaches a virtual private gateway to a VPC. You can attach one virtual private
// gateway to one VPC at a time.
//
-// For more information, see Adding a Hardware Virtual Private Gateway to Your
-// VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
+// For more information, see AWS Managed VPN Connections (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
// in the Amazon Virtual Private Cloud User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -1391,7 +1464,7 @@ func (c *EC2) AttachVpnGatewayRequest(input *AttachVpnGatewayInput) (req *reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation AttachVpnGateway for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVpnGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVpnGateway
func (c *EC2) AttachVpnGateway(input *AttachVpnGatewayInput) (*AttachVpnGatewayOutput, error) {
req, out := c.AttachVpnGatewayRequest(input)
return out, req.Send()
@@ -1417,19 +1490,18 @@ const opAuthorizeSecurityGroupEgress = "AuthorizeSecurityGroupEgress"
// AuthorizeSecurityGroupEgressRequest generates a "aws/request.Request" representing the
// client's request for the AuthorizeSecurityGroupEgress operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AuthorizeSecurityGroupEgress for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AuthorizeSecurityGroupEgress method directly
-// instead.
+// See AuthorizeSecurityGroupEgress for more information on using the AuthorizeSecurityGroupEgress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AuthorizeSecurityGroupEgressRequest method.
// req, resp := client.AuthorizeSecurityGroupEgressRequest(params)
@@ -1439,7 +1511,7 @@ const opAuthorizeSecurityGroupEgress = "AuthorizeSecurityGroupEgress"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupEgress
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupEgress
func (c *EC2) AuthorizeSecurityGroupEgressRequest(input *AuthorizeSecurityGroupEgressInput) (req *request.Request, output *AuthorizeSecurityGroupEgressOutput) {
op := &request.Operation{
Name: opAuthorizeSecurityGroupEgress,
@@ -1473,7 +1545,8 @@ func (c *EC2) AuthorizeSecurityGroupEgressRequest(input *AuthorizeSecurityGroupE
// range or a source group. For the TCP and UDP protocols, you must also specify
// the destination port or port range. For the ICMP protocol, you must also
// specify the ICMP type and code. You can use -1 for the type or code to mean
-// all types or all codes.
+// all types or all codes. You can optionally specify a description for the
+// rule.
//
// Rule changes are propagated to affected instances as quickly as possible.
// However, a small delay might occur.
@@ -1484,7 +1557,7 @@ func (c *EC2) AuthorizeSecurityGroupEgressRequest(input *AuthorizeSecurityGroupE
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation AuthorizeSecurityGroupEgress for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupEgress
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupEgress
func (c *EC2) AuthorizeSecurityGroupEgress(input *AuthorizeSecurityGroupEgressInput) (*AuthorizeSecurityGroupEgressOutput, error) {
req, out := c.AuthorizeSecurityGroupEgressRequest(input)
return out, req.Send()
@@ -1510,19 +1583,18 @@ const opAuthorizeSecurityGroupIngress = "AuthorizeSecurityGroupIngress"
// AuthorizeSecurityGroupIngressRequest generates a "aws/request.Request" representing the
// client's request for the AuthorizeSecurityGroupIngress operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AuthorizeSecurityGroupIngress for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AuthorizeSecurityGroupIngress method directly
-// instead.
+// See AuthorizeSecurityGroupIngress for more information on using the AuthorizeSecurityGroupIngress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AuthorizeSecurityGroupIngressRequest method.
// req, resp := client.AuthorizeSecurityGroupIngressRequest(params)
@@ -1532,7 +1604,7 @@ const opAuthorizeSecurityGroupIngress = "AuthorizeSecurityGroupIngress"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupIngress
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupIngress
func (c *EC2) AuthorizeSecurityGroupIngressRequest(input *AuthorizeSecurityGroupIngressInput) (req *request.Request, output *AuthorizeSecurityGroupIngressOutput) {
op := &request.Operation{
Name: opAuthorizeSecurityGroupIngress,
@@ -1571,13 +1643,15 @@ func (c *EC2) AuthorizeSecurityGroupIngressRequest(input *AuthorizeSecurityGroup
// peer VPC in a VPC peering connection. For more information about VPC security
// group limits, see Amazon VPC Limits (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html).
//
+// You can optionally specify a description for the security group rule.
+//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation AuthorizeSecurityGroupIngress for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupIngress
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupIngress
func (c *EC2) AuthorizeSecurityGroupIngress(input *AuthorizeSecurityGroupIngressInput) (*AuthorizeSecurityGroupIngressOutput, error) {
req, out := c.AuthorizeSecurityGroupIngressRequest(input)
return out, req.Send()
@@ -1603,19 +1677,18 @@ const opBundleInstance = "BundleInstance"
// BundleInstanceRequest generates a "aws/request.Request" representing the
// client's request for the BundleInstance operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See BundleInstance for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the BundleInstance method directly
-// instead.
+// See BundleInstance for more information on using the BundleInstance
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the BundleInstanceRequest method.
// req, resp := client.BundleInstanceRequest(params)
@@ -1625,7 +1698,7 @@ const opBundleInstance = "BundleInstance"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/BundleInstance
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/BundleInstance
func (c *EC2) BundleInstanceRequest(input *BundleInstanceInput) (req *request.Request, output *BundleInstanceOutput) {
op := &request.Operation{
Name: opBundleInstance,
@@ -1660,7 +1733,7 @@ func (c *EC2) BundleInstanceRequest(input *BundleInstanceInput) (req *request.Re
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation BundleInstance for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/BundleInstance
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/BundleInstance
func (c *EC2) BundleInstance(input *BundleInstanceInput) (*BundleInstanceOutput, error) {
req, out := c.BundleInstanceRequest(input)
return out, req.Send()
@@ -1686,19 +1759,18 @@ const opCancelBundleTask = "CancelBundleTask"
// CancelBundleTaskRequest generates a "aws/request.Request" representing the
// client's request for the CancelBundleTask operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CancelBundleTask for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CancelBundleTask method directly
-// instead.
+// See CancelBundleTask for more information on using the CancelBundleTask
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CancelBundleTaskRequest method.
// req, resp := client.CancelBundleTaskRequest(params)
@@ -1708,7 +1780,7 @@ const opCancelBundleTask = "CancelBundleTask"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelBundleTask
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelBundleTask
func (c *EC2) CancelBundleTaskRequest(input *CancelBundleTaskInput) (req *request.Request, output *CancelBundleTaskOutput) {
op := &request.Operation{
Name: opCancelBundleTask,
@@ -1735,7 +1807,7 @@ func (c *EC2) CancelBundleTaskRequest(input *CancelBundleTaskInput) (req *reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CancelBundleTask for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelBundleTask
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelBundleTask
func (c *EC2) CancelBundleTask(input *CancelBundleTaskInput) (*CancelBundleTaskOutput, error) {
req, out := c.CancelBundleTaskRequest(input)
return out, req.Send()
@@ -1761,19 +1833,18 @@ const opCancelConversionTask = "CancelConversionTask"
// CancelConversionTaskRequest generates a "aws/request.Request" representing the
// client's request for the CancelConversionTask operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CancelConversionTask for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CancelConversionTask method directly
-// instead.
+// See CancelConversionTask for more information on using the CancelConversionTask
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CancelConversionTaskRequest method.
// req, resp := client.CancelConversionTaskRequest(params)
@@ -1783,7 +1854,7 @@ const opCancelConversionTask = "CancelConversionTask"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelConversionTask
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelConversionTask
func (c *EC2) CancelConversionTaskRequest(input *CancelConversionTaskInput) (req *request.Request, output *CancelConversionTaskOutput) {
op := &request.Operation{
Name: opCancelConversionTask,
@@ -1819,7 +1890,7 @@ func (c *EC2) CancelConversionTaskRequest(input *CancelConversionTaskInput) (req
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CancelConversionTask for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelConversionTask
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelConversionTask
func (c *EC2) CancelConversionTask(input *CancelConversionTaskInput) (*CancelConversionTaskOutput, error) {
req, out := c.CancelConversionTaskRequest(input)
return out, req.Send()
@@ -1845,19 +1916,18 @@ const opCancelExportTask = "CancelExportTask"
// CancelExportTaskRequest generates a "aws/request.Request" representing the
// client's request for the CancelExportTask operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CancelExportTask for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CancelExportTask method directly
-// instead.
+// See CancelExportTask for more information on using the CancelExportTask
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CancelExportTaskRequest method.
// req, resp := client.CancelExportTaskRequest(params)
@@ -1867,7 +1937,7 @@ const opCancelExportTask = "CancelExportTask"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelExportTask
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelExportTask
func (c *EC2) CancelExportTaskRequest(input *CancelExportTaskInput) (req *request.Request, output *CancelExportTaskOutput) {
op := &request.Operation{
Name: opCancelExportTask,
@@ -1899,7 +1969,7 @@ func (c *EC2) CancelExportTaskRequest(input *CancelExportTaskInput) (req *reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CancelExportTask for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelExportTask
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelExportTask
func (c *EC2) CancelExportTask(input *CancelExportTaskInput) (*CancelExportTaskOutput, error) {
req, out := c.CancelExportTaskRequest(input)
return out, req.Send()
@@ -1925,19 +1995,18 @@ const opCancelImportTask = "CancelImportTask"
// CancelImportTaskRequest generates a "aws/request.Request" representing the
// client's request for the CancelImportTask operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CancelImportTask for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CancelImportTask method directly
-// instead.
+// See CancelImportTask for more information on using the CancelImportTask
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CancelImportTaskRequest method.
// req, resp := client.CancelImportTaskRequest(params)
@@ -1947,7 +2016,7 @@ const opCancelImportTask = "CancelImportTask"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelImportTask
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelImportTask
func (c *EC2) CancelImportTaskRequest(input *CancelImportTaskInput) (req *request.Request, output *CancelImportTaskOutput) {
op := &request.Operation{
Name: opCancelImportTask,
@@ -1974,7 +2043,7 @@ func (c *EC2) CancelImportTaskRequest(input *CancelImportTaskInput) (req *reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CancelImportTask for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelImportTask
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelImportTask
func (c *EC2) CancelImportTask(input *CancelImportTaskInput) (*CancelImportTaskOutput, error) {
req, out := c.CancelImportTaskRequest(input)
return out, req.Send()
@@ -2000,19 +2069,18 @@ const opCancelReservedInstancesListing = "CancelReservedInstancesListing"
// CancelReservedInstancesListingRequest generates a "aws/request.Request" representing the
// client's request for the CancelReservedInstancesListing operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CancelReservedInstancesListing for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CancelReservedInstancesListing method directly
-// instead.
+// See CancelReservedInstancesListing for more information on using the CancelReservedInstancesListing
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CancelReservedInstancesListingRequest method.
// req, resp := client.CancelReservedInstancesListingRequest(params)
@@ -2022,7 +2090,7 @@ const opCancelReservedInstancesListing = "CancelReservedInstancesListing"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelReservedInstancesListing
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelReservedInstancesListing
func (c *EC2) CancelReservedInstancesListingRequest(input *CancelReservedInstancesListingInput) (req *request.Request, output *CancelReservedInstancesListingOutput) {
op := &request.Operation{
Name: opCancelReservedInstancesListing,
@@ -2053,7 +2121,7 @@ func (c *EC2) CancelReservedInstancesListingRequest(input *CancelReservedInstanc
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CancelReservedInstancesListing for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelReservedInstancesListing
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelReservedInstancesListing
func (c *EC2) CancelReservedInstancesListing(input *CancelReservedInstancesListingInput) (*CancelReservedInstancesListingOutput, error) {
req, out := c.CancelReservedInstancesListingRequest(input)
return out, req.Send()
@@ -2079,19 +2147,18 @@ const opCancelSpotFleetRequests = "CancelSpotFleetRequests"
// CancelSpotFleetRequestsRequest generates a "aws/request.Request" representing the
// client's request for the CancelSpotFleetRequests operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CancelSpotFleetRequests for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CancelSpotFleetRequests method directly
-// instead.
+// See CancelSpotFleetRequests for more information on using the CancelSpotFleetRequests
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CancelSpotFleetRequestsRequest method.
// req, resp := client.CancelSpotFleetRequestsRequest(params)
@@ -2101,7 +2168,7 @@ const opCancelSpotFleetRequests = "CancelSpotFleetRequests"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotFleetRequests
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotFleetRequests
func (c *EC2) CancelSpotFleetRequestsRequest(input *CancelSpotFleetRequestsInput) (req *request.Request, output *CancelSpotFleetRequestsOutput) {
op := &request.Operation{
Name: opCancelSpotFleetRequests,
@@ -2120,12 +2187,12 @@ func (c *EC2) CancelSpotFleetRequestsRequest(input *CancelSpotFleetRequestsInput
// CancelSpotFleetRequests API operation for Amazon Elastic Compute Cloud.
//
-// Cancels the specified Spot fleet requests.
+// Cancels the specified Spot Fleet requests.
//
-// After you cancel a Spot fleet request, the Spot fleet launches no new Spot
-// instances. You must specify whether the Spot fleet should also terminate
-// its Spot instances. If you terminate the instances, the Spot fleet request
-// enters the cancelled_terminating state. Otherwise, the Spot fleet request
+// After you cancel a Spot Fleet request, the Spot Fleet launches no new Spot
+// Instances. You must specify whether the Spot Fleet should also terminate
+// its Spot Instances. If you terminate the instances, the Spot Fleet request
+// enters the cancelled_terminating state. Otherwise, the Spot Fleet request
// enters the cancelled_running state and the instances continue to run until
// they are interrupted or you terminate them manually.
//
@@ -2135,7 +2202,7 @@ func (c *EC2) CancelSpotFleetRequestsRequest(input *CancelSpotFleetRequestsInput
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CancelSpotFleetRequests for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotFleetRequests
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotFleetRequests
func (c *EC2) CancelSpotFleetRequests(input *CancelSpotFleetRequestsInput) (*CancelSpotFleetRequestsOutput, error) {
req, out := c.CancelSpotFleetRequestsRequest(input)
return out, req.Send()
@@ -2161,19 +2228,18 @@ const opCancelSpotInstanceRequests = "CancelSpotInstanceRequests"
// CancelSpotInstanceRequestsRequest generates a "aws/request.Request" representing the
// client's request for the CancelSpotInstanceRequests operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CancelSpotInstanceRequests for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CancelSpotInstanceRequests method directly
-// instead.
+// See CancelSpotInstanceRequests for more information on using the CancelSpotInstanceRequests
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CancelSpotInstanceRequestsRequest method.
// req, resp := client.CancelSpotInstanceRequestsRequest(params)
@@ -2183,7 +2249,7 @@ const opCancelSpotInstanceRequests = "CancelSpotInstanceRequests"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotInstanceRequests
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotInstanceRequests
func (c *EC2) CancelSpotInstanceRequestsRequest(input *CancelSpotInstanceRequestsInput) (req *request.Request, output *CancelSpotInstanceRequestsOutput) {
op := &request.Operation{
Name: opCancelSpotInstanceRequests,
@@ -2202,14 +2268,13 @@ func (c *EC2) CancelSpotInstanceRequestsRequest(input *CancelSpotInstanceRequest
// CancelSpotInstanceRequests API operation for Amazon Elastic Compute Cloud.
//
-// Cancels one or more Spot instance requests. Spot instances are instances
-// that Amazon EC2 starts on your behalf when the bid price that you specify
-// exceeds the current Spot price. Amazon EC2 periodically sets the Spot price
-// based on available Spot instance capacity and current Spot instance requests.
-// For more information, see Spot Instance Requests (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html)
-// in the Amazon Elastic Compute Cloud User Guide.
+// Cancels one or more Spot Instance requests. Spot Instances are instances
+// that Amazon EC2 starts on your behalf when the maximum price that you specify
+// exceeds the current Spot price. For more information, see Spot Instance Requests
+// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html) in
+// the Amazon Elastic Compute Cloud User Guide.
//
-// Canceling a Spot instance request does not terminate running Spot instances
+// Canceling a Spot Instance request does not terminate running Spot Instances
// associated with the request.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -2218,7 +2283,7 @@ func (c *EC2) CancelSpotInstanceRequestsRequest(input *CancelSpotInstanceRequest
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CancelSpotInstanceRequests for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotInstanceRequests
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotInstanceRequests
func (c *EC2) CancelSpotInstanceRequests(input *CancelSpotInstanceRequestsInput) (*CancelSpotInstanceRequestsOutput, error) {
req, out := c.CancelSpotInstanceRequestsRequest(input)
return out, req.Send()
@@ -2244,19 +2309,18 @@ const opConfirmProductInstance = "ConfirmProductInstance"
// ConfirmProductInstanceRequest generates a "aws/request.Request" representing the
// client's request for the ConfirmProductInstance operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ConfirmProductInstance for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ConfirmProductInstance method directly
-// instead.
+// See ConfirmProductInstance for more information on using the ConfirmProductInstance
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ConfirmProductInstanceRequest method.
// req, resp := client.ConfirmProductInstanceRequest(params)
@@ -2266,7 +2330,7 @@ const opConfirmProductInstance = "ConfirmProductInstance"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ConfirmProductInstance
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ConfirmProductInstance
func (c *EC2) ConfirmProductInstanceRequest(input *ConfirmProductInstanceInput) (req *request.Request, output *ConfirmProductInstanceOutput) {
op := &request.Operation{
Name: opConfirmProductInstance,
@@ -2287,8 +2351,7 @@ func (c *EC2) ConfirmProductInstanceRequest(input *ConfirmProductInstanceInput)
//
// Determines whether a product code is associated with an instance. This action
// can only be used by the owner of the product code. It is useful when a product
-// code owner needs to verify whether another user's instance is eligible for
-// support.
+// code owner must verify whether another user's instance is eligible for support.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -2296,7 +2359,7 @@ func (c *EC2) ConfirmProductInstanceRequest(input *ConfirmProductInstanceInput)
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ConfirmProductInstance for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ConfirmProductInstance
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ConfirmProductInstance
func (c *EC2) ConfirmProductInstance(input *ConfirmProductInstanceInput) (*ConfirmProductInstanceOutput, error) {
req, out := c.ConfirmProductInstanceRequest(input)
return out, req.Send()
@@ -2318,23 +2381,96 @@ func (c *EC2) ConfirmProductInstanceWithContext(ctx aws.Context, input *ConfirmP
return out, req.Send()
}
+const opCopyFpgaImage = "CopyFpgaImage"
+
+// CopyFpgaImageRequest generates a "aws/request.Request" representing the
+// client's request for the CopyFpgaImage operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See CopyFpgaImage for more information on using the CopyFpgaImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the CopyFpgaImageRequest method.
+// req, resp := client.CopyFpgaImageRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyFpgaImage
+func (c *EC2) CopyFpgaImageRequest(input *CopyFpgaImageInput) (req *request.Request, output *CopyFpgaImageOutput) {
+ op := &request.Operation{
+ Name: opCopyFpgaImage,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CopyFpgaImageInput{}
+ }
+
+ output = &CopyFpgaImageOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// CopyFpgaImage API operation for Amazon Elastic Compute Cloud.
+//
+// Copies the specified Amazon FPGA Image (AFI) to the current region.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation CopyFpgaImage for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyFpgaImage
+func (c *EC2) CopyFpgaImage(input *CopyFpgaImageInput) (*CopyFpgaImageOutput, error) {
+ req, out := c.CopyFpgaImageRequest(input)
+ return out, req.Send()
+}
+
+// CopyFpgaImageWithContext is the same as CopyFpgaImage with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CopyFpgaImage for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CopyFpgaImageWithContext(ctx aws.Context, input *CopyFpgaImageInput, opts ...request.Option) (*CopyFpgaImageOutput, error) {
+ req, out := c.CopyFpgaImageRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opCopyImage = "CopyImage"
// CopyImageRequest generates a "aws/request.Request" representing the
// client's request for the CopyImage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CopyImage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CopyImage method directly
-// instead.
+// See CopyImage for more information on using the CopyImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CopyImageRequest method.
// req, resp := client.CopyImageRequest(params)
@@ -2344,7 +2480,7 @@ const opCopyImage = "CopyImage"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyImage
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyImage
func (c *EC2) CopyImageRequest(input *CopyImageInput) (req *request.Request, output *CopyImageOutput) {
op := &request.Operation{
Name: opCopyImage,
@@ -2377,7 +2513,7 @@ func (c *EC2) CopyImageRequest(input *CopyImageInput) (req *request.Request, out
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CopyImage for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyImage
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyImage
func (c *EC2) CopyImage(input *CopyImageInput) (*CopyImageOutput, error) {
req, out := c.CopyImageRequest(input)
return out, req.Send()
@@ -2403,19 +2539,18 @@ const opCopySnapshot = "CopySnapshot"
// CopySnapshotRequest generates a "aws/request.Request" representing the
// client's request for the CopySnapshot operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CopySnapshot for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CopySnapshot method directly
-// instead.
+// See CopySnapshot for more information on using the CopySnapshot
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CopySnapshotRequest method.
// req, resp := client.CopySnapshotRequest(params)
@@ -2425,7 +2560,7 @@ const opCopySnapshot = "CopySnapshot"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopySnapshot
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopySnapshot
func (c *EC2) CopySnapshotRequest(input *CopySnapshotInput) (req *request.Request, output *CopySnapshotOutput) {
op := &request.Operation{
Name: opCopySnapshot,
@@ -2471,7 +2606,7 @@ func (c *EC2) CopySnapshotRequest(input *CopySnapshotInput) (req *request.Reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CopySnapshot for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopySnapshot
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopySnapshot
func (c *EC2) CopySnapshot(input *CopySnapshotInput) (*CopySnapshotOutput, error) {
req, out := c.CopySnapshotRequest(input)
return out, req.Send()
@@ -2497,19 +2632,18 @@ const opCreateCustomerGateway = "CreateCustomerGateway"
// CreateCustomerGatewayRequest generates a "aws/request.Request" representing the
// client's request for the CreateCustomerGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateCustomerGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateCustomerGateway method directly
-// instead.
+// See CreateCustomerGateway for more information on using the CreateCustomerGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateCustomerGatewayRequest method.
// req, resp := client.CreateCustomerGatewayRequest(params)
@@ -2519,7 +2653,7 @@ const opCreateCustomerGateway = "CreateCustomerGateway"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateCustomerGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateCustomerGateway
func (c *EC2) CreateCustomerGatewayRequest(input *CreateCustomerGatewayInput) (req *request.Request, output *CreateCustomerGatewayOutput) {
op := &request.Operation{
Name: opCreateCustomerGateway,
@@ -2554,9 +2688,9 @@ func (c *EC2) CreateCustomerGatewayRequest(input *CreateCustomerGatewayInput) (r
// the exception of 7224, which is reserved in the us-east-1 region, and 9059,
// which is reserved in the eu-west-1 region.
//
-// For more information about VPN customer gateways, see Adding a Hardware Virtual
-// Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
-// in the Amazon Virtual Private Cloud User Guide.
+// For more information about VPN customer gateways, see AWS Managed VPN Connections
+// (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) in the
+// Amazon Virtual Private Cloud User Guide.
//
// You cannot create more than one customer gateway with the same VPN type,
// IP address, and BGP ASN parameter values. If you run an identical request
@@ -2570,7 +2704,7 @@ func (c *EC2) CreateCustomerGatewayRequest(input *CreateCustomerGatewayInput) (r
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateCustomerGateway for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateCustomerGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateCustomerGateway
func (c *EC2) CreateCustomerGateway(input *CreateCustomerGatewayInput) (*CreateCustomerGatewayOutput, error) {
req, out := c.CreateCustomerGatewayRequest(input)
return out, req.Send()
@@ -2592,23 +2726,100 @@ func (c *EC2) CreateCustomerGatewayWithContext(ctx aws.Context, input *CreateCus
return out, req.Send()
}
+const opCreateDefaultSubnet = "CreateDefaultSubnet"
+
+// CreateDefaultSubnetRequest generates a "aws/request.Request" representing the
+// client's request for the CreateDefaultSubnet operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See CreateDefaultSubnet for more information on using the CreateDefaultSubnet
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the CreateDefaultSubnetRequest method.
+// req, resp := client.CreateDefaultSubnetRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultSubnet
+func (c *EC2) CreateDefaultSubnetRequest(input *CreateDefaultSubnetInput) (req *request.Request, output *CreateDefaultSubnetOutput) {
+ op := &request.Operation{
+ Name: opCreateDefaultSubnet,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateDefaultSubnetInput{}
+ }
+
+ output = &CreateDefaultSubnetOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// CreateDefaultSubnet API operation for Amazon Elastic Compute Cloud.
+//
+// Creates a default subnet with a size /20 IPv4 CIDR block in the specified
+// Availability Zone in your default VPC. You can have only one default subnet
+// per Availability Zone. For more information, see Creating a Default Subnet
+// (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/default-vpc.html#create-default-subnet)
+// in the Amazon Virtual Private Cloud User Guide.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation CreateDefaultSubnet for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultSubnet
+func (c *EC2) CreateDefaultSubnet(input *CreateDefaultSubnetInput) (*CreateDefaultSubnetOutput, error) {
+ req, out := c.CreateDefaultSubnetRequest(input)
+ return out, req.Send()
+}
+
+// CreateDefaultSubnetWithContext is the same as CreateDefaultSubnet with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateDefaultSubnet for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateDefaultSubnetWithContext(ctx aws.Context, input *CreateDefaultSubnetInput, opts ...request.Option) (*CreateDefaultSubnetOutput, error) {
+ req, out := c.CreateDefaultSubnetRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opCreateDefaultVpc = "CreateDefaultVpc"
// CreateDefaultVpcRequest generates a "aws/request.Request" representing the
// client's request for the CreateDefaultVpc operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateDefaultVpc for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateDefaultVpc method directly
-// instead.
+// See CreateDefaultVpc for more information on using the CreateDefaultVpc
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateDefaultVpcRequest method.
// req, resp := client.CreateDefaultVpcRequest(params)
@@ -2618,7 +2829,7 @@ const opCreateDefaultVpc = "CreateDefaultVpc"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultVpc
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultVpc
func (c *EC2) CreateDefaultVpcRequest(input *CreateDefaultVpcInput) (req *request.Request, output *CreateDefaultVpcOutput) {
op := &request.Operation{
Name: opCreateDefaultVpc,
@@ -2657,7 +2868,7 @@ func (c *EC2) CreateDefaultVpcRequest(input *CreateDefaultVpcInput) (req *reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateDefaultVpc for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultVpc
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultVpc
func (c *EC2) CreateDefaultVpc(input *CreateDefaultVpcInput) (*CreateDefaultVpcOutput, error) {
req, out := c.CreateDefaultVpcRequest(input)
return out, req.Send()
@@ -2683,19 +2894,18 @@ const opCreateDhcpOptions = "CreateDhcpOptions"
// CreateDhcpOptionsRequest generates a "aws/request.Request" representing the
// client's request for the CreateDhcpOptions operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateDhcpOptions for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateDhcpOptions method directly
-// instead.
+// See CreateDhcpOptions for more information on using the CreateDhcpOptions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateDhcpOptionsRequest method.
// req, resp := client.CreateDhcpOptionsRequest(params)
@@ -2705,7 +2915,7 @@ const opCreateDhcpOptions = "CreateDhcpOptions"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDhcpOptions
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDhcpOptions
func (c *EC2) CreateDhcpOptionsRequest(input *CreateDhcpOptionsInput) (req *request.Request, output *CreateDhcpOptionsOutput) {
op := &request.Operation{
Name: opCreateDhcpOptions,
@@ -2771,7 +2981,7 @@ func (c *EC2) CreateDhcpOptionsRequest(input *CreateDhcpOptionsInput) (req *requ
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateDhcpOptions for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDhcpOptions
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDhcpOptions
func (c *EC2) CreateDhcpOptions(input *CreateDhcpOptionsInput) (*CreateDhcpOptionsOutput, error) {
req, out := c.CreateDhcpOptionsRequest(input)
return out, req.Send()
@@ -2797,19 +3007,18 @@ const opCreateEgressOnlyInternetGateway = "CreateEgressOnlyInternetGateway"
// CreateEgressOnlyInternetGatewayRequest generates a "aws/request.Request" representing the
// client's request for the CreateEgressOnlyInternetGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateEgressOnlyInternetGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateEgressOnlyInternetGateway method directly
-// instead.
+// See CreateEgressOnlyInternetGateway for more information on using the CreateEgressOnlyInternetGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateEgressOnlyInternetGatewayRequest method.
// req, resp := client.CreateEgressOnlyInternetGatewayRequest(params)
@@ -2819,7 +3028,7 @@ const opCreateEgressOnlyInternetGateway = "CreateEgressOnlyInternetGateway"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateEgressOnlyInternetGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateEgressOnlyInternetGateway
func (c *EC2) CreateEgressOnlyInternetGatewayRequest(input *CreateEgressOnlyInternetGatewayInput) (req *request.Request, output *CreateEgressOnlyInternetGatewayOutput) {
op := &request.Operation{
Name: opCreateEgressOnlyInternetGateway,
@@ -2849,7 +3058,7 @@ func (c *EC2) CreateEgressOnlyInternetGatewayRequest(input *CreateEgressOnlyInte
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateEgressOnlyInternetGateway for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateEgressOnlyInternetGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateEgressOnlyInternetGateway
func (c *EC2) CreateEgressOnlyInternetGateway(input *CreateEgressOnlyInternetGatewayInput) (*CreateEgressOnlyInternetGatewayOutput, error) {
req, out := c.CreateEgressOnlyInternetGatewayRequest(input)
return out, req.Send()
@@ -2875,19 +3084,18 @@ const opCreateFlowLogs = "CreateFlowLogs"
// CreateFlowLogsRequest generates a "aws/request.Request" representing the
// client's request for the CreateFlowLogs operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateFlowLogs for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateFlowLogs method directly
-// instead.
+// See CreateFlowLogs for more information on using the CreateFlowLogs
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateFlowLogsRequest method.
// req, resp := client.CreateFlowLogsRequest(params)
@@ -2897,7 +3105,7 @@ const opCreateFlowLogs = "CreateFlowLogs"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFlowLogs
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFlowLogs
func (c *EC2) CreateFlowLogsRequest(input *CreateFlowLogsInput) (req *request.Request, output *CreateFlowLogsOutput) {
op := &request.Operation{
Name: opCreateFlowLogs,
@@ -2933,7 +3141,7 @@ func (c *EC2) CreateFlowLogsRequest(input *CreateFlowLogsInput) (req *request.Re
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateFlowLogs for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFlowLogs
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFlowLogs
func (c *EC2) CreateFlowLogs(input *CreateFlowLogsInput) (*CreateFlowLogsOutput, error) {
req, out := c.CreateFlowLogsRequest(input)
return out, req.Send()
@@ -2959,19 +3167,18 @@ const opCreateFpgaImage = "CreateFpgaImage"
// CreateFpgaImageRequest generates a "aws/request.Request" representing the
// client's request for the CreateFpgaImage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateFpgaImage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateFpgaImage method directly
-// instead.
+// See CreateFpgaImage for more information on using the CreateFpgaImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateFpgaImageRequest method.
// req, resp := client.CreateFpgaImageRequest(params)
@@ -2981,7 +3188,7 @@ const opCreateFpgaImage = "CreateFpgaImage"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFpgaImage
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFpgaImage
func (c *EC2) CreateFpgaImageRequest(input *CreateFpgaImageInput) (req *request.Request, output *CreateFpgaImageOutput) {
op := &request.Operation{
Name: opCreateFpgaImage,
@@ -3015,7 +3222,7 @@ func (c *EC2) CreateFpgaImageRequest(input *CreateFpgaImageInput) (req *request.
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateFpgaImage for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFpgaImage
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFpgaImage
func (c *EC2) CreateFpgaImage(input *CreateFpgaImageInput) (*CreateFpgaImageOutput, error) {
req, out := c.CreateFpgaImageRequest(input)
return out, req.Send()
@@ -3041,19 +3248,18 @@ const opCreateImage = "CreateImage"
// CreateImageRequest generates a "aws/request.Request" representing the
// client's request for the CreateImage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateImage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateImage method directly
-// instead.
+// See CreateImage for more information on using the CreateImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateImageRequest method.
// req, resp := client.CreateImageRequest(params)
@@ -3063,7 +3269,7 @@ const opCreateImage = "CreateImage"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateImage
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateImage
func (c *EC2) CreateImageRequest(input *CreateImageInput) (req *request.Request, output *CreateImageOutput) {
op := &request.Operation{
Name: opCreateImage,
@@ -3099,7 +3305,7 @@ func (c *EC2) CreateImageRequest(input *CreateImageInput) (req *request.Request,
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateImage for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateImage
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateImage
func (c *EC2) CreateImage(input *CreateImageInput) (*CreateImageOutput, error) {
req, out := c.CreateImageRequest(input)
return out, req.Send()
@@ -3125,19 +3331,18 @@ const opCreateInstanceExportTask = "CreateInstanceExportTask"
// CreateInstanceExportTaskRequest generates a "aws/request.Request" representing the
// client's request for the CreateInstanceExportTask operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateInstanceExportTask for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateInstanceExportTask method directly
-// instead.
+// See CreateInstanceExportTask for more information on using the CreateInstanceExportTask
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateInstanceExportTaskRequest method.
// req, resp := client.CreateInstanceExportTaskRequest(params)
@@ -3147,7 +3352,7 @@ const opCreateInstanceExportTask = "CreateInstanceExportTask"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInstanceExportTask
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInstanceExportTask
func (c *EC2) CreateInstanceExportTaskRequest(input *CreateInstanceExportTaskInput) (req *request.Request, output *CreateInstanceExportTaskOutput) {
op := &request.Operation{
Name: opCreateInstanceExportTask,
@@ -3179,7 +3384,7 @@ func (c *EC2) CreateInstanceExportTaskRequest(input *CreateInstanceExportTaskInp
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateInstanceExportTask for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInstanceExportTask
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInstanceExportTask
func (c *EC2) CreateInstanceExportTask(input *CreateInstanceExportTaskInput) (*CreateInstanceExportTaskOutput, error) {
req, out := c.CreateInstanceExportTaskRequest(input)
return out, req.Send()
@@ -3205,19 +3410,18 @@ const opCreateInternetGateway = "CreateInternetGateway"
// CreateInternetGatewayRequest generates a "aws/request.Request" representing the
// client's request for the CreateInternetGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateInternetGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateInternetGateway method directly
-// instead.
+// See CreateInternetGateway for more information on using the CreateInternetGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateInternetGatewayRequest method.
// req, resp := client.CreateInternetGatewayRequest(params)
@@ -3227,7 +3431,7 @@ const opCreateInternetGateway = "CreateInternetGateway"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInternetGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInternetGateway
func (c *EC2) CreateInternetGatewayRequest(input *CreateInternetGatewayInput) (req *request.Request, output *CreateInternetGatewayOutput) {
op := &request.Operation{
Name: opCreateInternetGateway,
@@ -3258,7 +3462,7 @@ func (c *EC2) CreateInternetGatewayRequest(input *CreateInternetGatewayInput) (r
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateInternetGateway for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInternetGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInternetGateway
func (c *EC2) CreateInternetGateway(input *CreateInternetGatewayInput) (*CreateInternetGatewayOutput, error) {
req, out := c.CreateInternetGatewayRequest(input)
return out, req.Send()
@@ -3284,19 +3488,18 @@ const opCreateKeyPair = "CreateKeyPair"
// CreateKeyPairRequest generates a "aws/request.Request" representing the
// client's request for the CreateKeyPair operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateKeyPair for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateKeyPair method directly
-// instead.
+// See CreateKeyPair for more information on using the CreateKeyPair
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateKeyPairRequest method.
// req, resp := client.CreateKeyPairRequest(params)
@@ -3306,7 +3509,7 @@ const opCreateKeyPair = "CreateKeyPair"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateKeyPair
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateKeyPair
func (c *EC2) CreateKeyPairRequest(input *CreateKeyPairInput) (req *request.Request, output *CreateKeyPairOutput) {
op := &request.Operation{
Name: opCreateKeyPair,
@@ -3327,15 +3530,16 @@ func (c *EC2) CreateKeyPairRequest(input *CreateKeyPairInput) (req *request.Requ
//
// Creates a 2048-bit RSA key pair with the specified name. Amazon EC2 stores
// the public key and displays the private key for you to save to a file. The
-// private key is returned as an unencrypted PEM encoded PKCS#8 private key.
+// private key is returned as an unencrypted PEM encoded PKCS#1 private key.
// If a key with the specified name already exists, Amazon EC2 returns an error.
//
// You can have up to five thousand key pairs per region.
//
// The key pair returned to you is available only in the region in which you
-// create it. To create a key pair that is available in all regions, use ImportKeyPair.
+// create it. If you prefer, you can create your own key pair using a third-party
+// tool and upload it to any region using ImportKeyPair.
//
-// For more information about key pairs, see Key Pairs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html)
+// For more information, see Key Pairs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html)
// in the Amazon Elastic Compute Cloud User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -3344,7 +3548,7 @@ func (c *EC2) CreateKeyPairRequest(input *CreateKeyPairInput) (req *request.Requ
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateKeyPair for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateKeyPair
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateKeyPair
func (c *EC2) CreateKeyPair(input *CreateKeyPairInput) (*CreateKeyPairOutput, error) {
req, out := c.CreateKeyPairRequest(input)
return out, req.Send()
@@ -3366,23 +3570,176 @@ func (c *EC2) CreateKeyPairWithContext(ctx aws.Context, input *CreateKeyPairInpu
return out, req.Send()
}
+const opCreateLaunchTemplate = "CreateLaunchTemplate"
+
+// CreateLaunchTemplateRequest generates a "aws/request.Request" representing the
+// client's request for the CreateLaunchTemplate operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See CreateLaunchTemplate for more information on using the CreateLaunchTemplate
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the CreateLaunchTemplateRequest method.
+// req, resp := client.CreateLaunchTemplateRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateLaunchTemplate
+func (c *EC2) CreateLaunchTemplateRequest(input *CreateLaunchTemplateInput) (req *request.Request, output *CreateLaunchTemplateOutput) {
+ op := &request.Operation{
+ Name: opCreateLaunchTemplate,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateLaunchTemplateInput{}
+ }
+
+ output = &CreateLaunchTemplateOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// CreateLaunchTemplate API operation for Amazon Elastic Compute Cloud.
+//
+// Creates a launch template. A launch template contains the parameters to launch
+// an instance. When you launch an instance using RunInstances, you can specify
+// a launch template instead of providing the launch parameters in the request.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation CreateLaunchTemplate for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateLaunchTemplate
+func (c *EC2) CreateLaunchTemplate(input *CreateLaunchTemplateInput) (*CreateLaunchTemplateOutput, error) {
+ req, out := c.CreateLaunchTemplateRequest(input)
+ return out, req.Send()
+}
+
+// CreateLaunchTemplateWithContext is the same as CreateLaunchTemplate with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateLaunchTemplate for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateLaunchTemplateWithContext(ctx aws.Context, input *CreateLaunchTemplateInput, opts ...request.Option) (*CreateLaunchTemplateOutput, error) {
+ req, out := c.CreateLaunchTemplateRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opCreateLaunchTemplateVersion = "CreateLaunchTemplateVersion"
+
+// CreateLaunchTemplateVersionRequest generates a "aws/request.Request" representing the
+// client's request for the CreateLaunchTemplateVersion operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See CreateLaunchTemplateVersion for more information on using the CreateLaunchTemplateVersion
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the CreateLaunchTemplateVersionRequest method.
+// req, resp := client.CreateLaunchTemplateVersionRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateLaunchTemplateVersion
+func (c *EC2) CreateLaunchTemplateVersionRequest(input *CreateLaunchTemplateVersionInput) (req *request.Request, output *CreateLaunchTemplateVersionOutput) {
+ op := &request.Operation{
+ Name: opCreateLaunchTemplateVersion,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateLaunchTemplateVersionInput{}
+ }
+
+ output = &CreateLaunchTemplateVersionOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// CreateLaunchTemplateVersion API operation for Amazon Elastic Compute Cloud.
+//
+// Creates a new version for a launch template. You can specify an existing
+// version of launch template from which to base the new version.
+//
+// Launch template versions are numbered in the order in which they are created.
+// You cannot specify, change, or replace the numbering of launch template versions.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation CreateLaunchTemplateVersion for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateLaunchTemplateVersion
+func (c *EC2) CreateLaunchTemplateVersion(input *CreateLaunchTemplateVersionInput) (*CreateLaunchTemplateVersionOutput, error) {
+ req, out := c.CreateLaunchTemplateVersionRequest(input)
+ return out, req.Send()
+}
+
+// CreateLaunchTemplateVersionWithContext is the same as CreateLaunchTemplateVersion with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateLaunchTemplateVersion for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateLaunchTemplateVersionWithContext(ctx aws.Context, input *CreateLaunchTemplateVersionInput, opts ...request.Option) (*CreateLaunchTemplateVersionOutput, error) {
+ req, out := c.CreateLaunchTemplateVersionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opCreateNatGateway = "CreateNatGateway"
// CreateNatGatewayRequest generates a "aws/request.Request" representing the
// client's request for the CreateNatGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateNatGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateNatGateway method directly
-// instead.
+// See CreateNatGateway for more information on using the CreateNatGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateNatGatewayRequest method.
// req, resp := client.CreateNatGatewayRequest(params)
@@ -3392,7 +3749,7 @@ const opCreateNatGateway = "CreateNatGateway"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNatGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNatGateway
func (c *EC2) CreateNatGatewayRequest(input *CreateNatGatewayInput) (req *request.Request, output *CreateNatGatewayOutput) {
op := &request.Operation{
Name: opCreateNatGateway,
@@ -3424,7 +3781,7 @@ func (c *EC2) CreateNatGatewayRequest(input *CreateNatGatewayInput) (req *reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateNatGateway for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNatGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNatGateway
func (c *EC2) CreateNatGateway(input *CreateNatGatewayInput) (*CreateNatGatewayOutput, error) {
req, out := c.CreateNatGatewayRequest(input)
return out, req.Send()
@@ -3450,19 +3807,18 @@ const opCreateNetworkAcl = "CreateNetworkAcl"
// CreateNetworkAclRequest generates a "aws/request.Request" representing the
// client's request for the CreateNetworkAcl operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateNetworkAcl for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateNetworkAcl method directly
-// instead.
+// See CreateNetworkAcl for more information on using the CreateNetworkAcl
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateNetworkAclRequest method.
// req, resp := client.CreateNetworkAclRequest(params)
@@ -3472,7 +3828,7 @@ const opCreateNetworkAcl = "CreateNetworkAcl"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAcl
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAcl
func (c *EC2) CreateNetworkAclRequest(input *CreateNetworkAclInput) (req *request.Request, output *CreateNetworkAclOutput) {
op := &request.Operation{
Name: opCreateNetworkAcl,
@@ -3503,7 +3859,7 @@ func (c *EC2) CreateNetworkAclRequest(input *CreateNetworkAclInput) (req *reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateNetworkAcl for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAcl
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAcl
func (c *EC2) CreateNetworkAcl(input *CreateNetworkAclInput) (*CreateNetworkAclOutput, error) {
req, out := c.CreateNetworkAclRequest(input)
return out, req.Send()
@@ -3529,19 +3885,18 @@ const opCreateNetworkAclEntry = "CreateNetworkAclEntry"
// CreateNetworkAclEntryRequest generates a "aws/request.Request" representing the
// client's request for the CreateNetworkAclEntry operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateNetworkAclEntry for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateNetworkAclEntry method directly
-// instead.
+// See CreateNetworkAclEntry for more information on using the CreateNetworkAclEntry
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateNetworkAclEntryRequest method.
// req, resp := client.CreateNetworkAclEntryRequest(params)
@@ -3551,7 +3906,7 @@ const opCreateNetworkAclEntry = "CreateNetworkAclEntry"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAclEntry
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAclEntry
func (c *EC2) CreateNetworkAclEntryRequest(input *CreateNetworkAclEntryInput) (req *request.Request, output *CreateNetworkAclEntryOutput) {
op := &request.Operation{
Name: opCreateNetworkAclEntry,
@@ -3596,7 +3951,7 @@ func (c *EC2) CreateNetworkAclEntryRequest(input *CreateNetworkAclEntryInput) (r
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateNetworkAclEntry for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAclEntry
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAclEntry
func (c *EC2) CreateNetworkAclEntry(input *CreateNetworkAclEntryInput) (*CreateNetworkAclEntryOutput, error) {
req, out := c.CreateNetworkAclEntryRequest(input)
return out, req.Send()
@@ -3622,19 +3977,18 @@ const opCreateNetworkInterface = "CreateNetworkInterface"
// CreateNetworkInterfaceRequest generates a "aws/request.Request" representing the
// client's request for the CreateNetworkInterface operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateNetworkInterface for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateNetworkInterface method directly
-// instead.
+// See CreateNetworkInterface for more information on using the CreateNetworkInterface
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateNetworkInterfaceRequest method.
// req, resp := client.CreateNetworkInterfaceRequest(params)
@@ -3644,7 +3998,7 @@ const opCreateNetworkInterface = "CreateNetworkInterface"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterface
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterface
func (c *EC2) CreateNetworkInterfaceRequest(input *CreateNetworkInterfaceInput) (req *request.Request, output *CreateNetworkInterfaceOutput) {
op := &request.Operation{
Name: opCreateNetworkInterface,
@@ -3675,7 +4029,7 @@ func (c *EC2) CreateNetworkInterfaceRequest(input *CreateNetworkInterfaceInput)
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateNetworkInterface for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterface
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterface
func (c *EC2) CreateNetworkInterface(input *CreateNetworkInterfaceInput) (*CreateNetworkInterfaceOutput, error) {
req, out := c.CreateNetworkInterfaceRequest(input)
return out, req.Send()
@@ -3701,19 +4055,18 @@ const opCreateNetworkInterfacePermission = "CreateNetworkInterfacePermission"
// CreateNetworkInterfacePermissionRequest generates a "aws/request.Request" representing the
// client's request for the CreateNetworkInterfacePermission operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateNetworkInterfacePermission for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateNetworkInterfacePermission method directly
-// instead.
+// See CreateNetworkInterfacePermission for more information on using the CreateNetworkInterfacePermission
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateNetworkInterfacePermissionRequest method.
// req, resp := client.CreateNetworkInterfacePermissionRequest(params)
@@ -3723,7 +4076,7 @@ const opCreateNetworkInterfacePermission = "CreateNetworkInterfacePermission"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfacePermission
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfacePermission
func (c *EC2) CreateNetworkInterfacePermissionRequest(input *CreateNetworkInterfacePermissionInput) (req *request.Request, output *CreateNetworkInterfacePermissionOutput) {
op := &request.Operation{
Name: opCreateNetworkInterfacePermission,
@@ -3754,7 +4107,7 @@ func (c *EC2) CreateNetworkInterfacePermissionRequest(input *CreateNetworkInterf
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateNetworkInterfacePermission for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfacePermission
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfacePermission
func (c *EC2) CreateNetworkInterfacePermission(input *CreateNetworkInterfacePermissionInput) (*CreateNetworkInterfacePermissionOutput, error) {
req, out := c.CreateNetworkInterfacePermissionRequest(input)
return out, req.Send()
@@ -3780,19 +4133,18 @@ const opCreatePlacementGroup = "CreatePlacementGroup"
// CreatePlacementGroupRequest generates a "aws/request.Request" representing the
// client's request for the CreatePlacementGroup operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreatePlacementGroup for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreatePlacementGroup method directly
-// instead.
+// See CreatePlacementGroup for more information on using the CreatePlacementGroup
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreatePlacementGroupRequest method.
// req, resp := client.CreatePlacementGroupRequest(params)
@@ -3802,7 +4154,7 @@ const opCreatePlacementGroup = "CreatePlacementGroup"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreatePlacementGroup
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreatePlacementGroup
func (c *EC2) CreatePlacementGroupRequest(input *CreatePlacementGroupInput) (req *request.Request, output *CreatePlacementGroupOutput) {
op := &request.Operation{
Name: opCreatePlacementGroup,
@@ -3823,11 +4175,14 @@ func (c *EC2) CreatePlacementGroupRequest(input *CreatePlacementGroupInput) (req
// CreatePlacementGroup API operation for Amazon Elastic Compute Cloud.
//
-// Creates a placement group that you launch cluster instances into. You must
-// give the group a name that's unique within the scope of your account.
+// Creates a placement group in which to launch instances. The strategy of the
+// placement group determines how the instances are organized within the group.
//
-// For more information about placement groups and cluster instances, see Cluster
-// Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html)
+// A cluster placement group is a logical grouping of instances within a single
+// Availability Zone that benefit from low network latency, high network throughput.
+// A spread placement group places instances on distinct hardware.
+//
+// For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html)
// in the Amazon Elastic Compute Cloud User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -3836,7 +4191,7 @@ func (c *EC2) CreatePlacementGroupRequest(input *CreatePlacementGroupInput) (req
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreatePlacementGroup for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreatePlacementGroup
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreatePlacementGroup
func (c *EC2) CreatePlacementGroup(input *CreatePlacementGroupInput) (*CreatePlacementGroupOutput, error) {
req, out := c.CreatePlacementGroupRequest(input)
return out, req.Send()
@@ -3862,19 +4217,18 @@ const opCreateReservedInstancesListing = "CreateReservedInstancesListing"
// CreateReservedInstancesListingRequest generates a "aws/request.Request" representing the
// client's request for the CreateReservedInstancesListing operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateReservedInstancesListing for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateReservedInstancesListing method directly
-// instead.
+// See CreateReservedInstancesListing for more information on using the CreateReservedInstancesListing
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateReservedInstancesListingRequest method.
// req, resp := client.CreateReservedInstancesListingRequest(params)
@@ -3884,7 +4238,7 @@ const opCreateReservedInstancesListing = "CreateReservedInstancesListing"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateReservedInstancesListing
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateReservedInstancesListing
func (c *EC2) CreateReservedInstancesListingRequest(input *CreateReservedInstancesListingInput) (req *request.Request, output *CreateReservedInstancesListingOutput) {
op := &request.Operation{
Name: opCreateReservedInstancesListing,
@@ -3934,7 +4288,7 @@ func (c *EC2) CreateReservedInstancesListingRequest(input *CreateReservedInstanc
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateReservedInstancesListing for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateReservedInstancesListing
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateReservedInstancesListing
func (c *EC2) CreateReservedInstancesListing(input *CreateReservedInstancesListingInput) (*CreateReservedInstancesListingOutput, error) {
req, out := c.CreateReservedInstancesListingRequest(input)
return out, req.Send()
@@ -3960,19 +4314,18 @@ const opCreateRoute = "CreateRoute"
// CreateRouteRequest generates a "aws/request.Request" representing the
// client's request for the CreateRoute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateRoute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateRoute method directly
-// instead.
+// See CreateRoute for more information on using the CreateRoute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateRouteRequest method.
// req, resp := client.CreateRouteRequest(params)
@@ -3982,7 +4335,7 @@ const opCreateRoute = "CreateRoute"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRoute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRoute
func (c *EC2) CreateRouteRequest(input *CreateRouteInput) (req *request.Request, output *CreateRouteOutput) {
op := &request.Operation{
Name: opCreateRoute,
@@ -4028,7 +4381,7 @@ func (c *EC2) CreateRouteRequest(input *CreateRouteInput) (req *request.Request,
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateRoute for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRoute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRoute
func (c *EC2) CreateRoute(input *CreateRouteInput) (*CreateRouteOutput, error) {
req, out := c.CreateRouteRequest(input)
return out, req.Send()
@@ -4054,19 +4407,18 @@ const opCreateRouteTable = "CreateRouteTable"
// CreateRouteTableRequest generates a "aws/request.Request" representing the
// client's request for the CreateRouteTable operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateRouteTable for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateRouteTable method directly
-// instead.
+// See CreateRouteTable for more information on using the CreateRouteTable
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateRouteTableRequest method.
// req, resp := client.CreateRouteTableRequest(params)
@@ -4076,7 +4428,7 @@ const opCreateRouteTable = "CreateRouteTable"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRouteTable
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRouteTable
func (c *EC2) CreateRouteTableRequest(input *CreateRouteTableInput) (req *request.Request, output *CreateRouteTableOutput) {
op := &request.Operation{
Name: opCreateRouteTable,
@@ -4107,7 +4459,7 @@ func (c *EC2) CreateRouteTableRequest(input *CreateRouteTableInput) (req *reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateRouteTable for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRouteTable
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRouteTable
func (c *EC2) CreateRouteTable(input *CreateRouteTableInput) (*CreateRouteTableOutput, error) {
req, out := c.CreateRouteTableRequest(input)
return out, req.Send()
@@ -4133,19 +4485,18 @@ const opCreateSecurityGroup = "CreateSecurityGroup"
// CreateSecurityGroupRequest generates a "aws/request.Request" representing the
// client's request for the CreateSecurityGroup operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateSecurityGroup for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateSecurityGroup method directly
-// instead.
+// See CreateSecurityGroup for more information on using the CreateSecurityGroup
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateSecurityGroupRequest method.
// req, resp := client.CreateSecurityGroupRequest(params)
@@ -4155,7 +4506,7 @@ const opCreateSecurityGroup = "CreateSecurityGroup"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSecurityGroup
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSecurityGroup
func (c *EC2) CreateSecurityGroupRequest(input *CreateSecurityGroupInput) (req *request.Request, output *CreateSecurityGroupOutput) {
op := &request.Operation{
Name: opCreateSecurityGroup,
@@ -4208,7 +4559,7 @@ func (c *EC2) CreateSecurityGroupRequest(input *CreateSecurityGroupInput) (req *
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateSecurityGroup for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSecurityGroup
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSecurityGroup
func (c *EC2) CreateSecurityGroup(input *CreateSecurityGroupInput) (*CreateSecurityGroupOutput, error) {
req, out := c.CreateSecurityGroupRequest(input)
return out, req.Send()
@@ -4234,19 +4585,18 @@ const opCreateSnapshot = "CreateSnapshot"
// CreateSnapshotRequest generates a "aws/request.Request" representing the
// client's request for the CreateSnapshot operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateSnapshot for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateSnapshot method directly
-// instead.
+// See CreateSnapshot for more information on using the CreateSnapshot
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateSnapshotRequest method.
// req, resp := client.CreateSnapshotRequest(params)
@@ -4256,7 +4606,7 @@ const opCreateSnapshot = "CreateSnapshot"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSnapshot
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSnapshot
func (c *EC2) CreateSnapshotRequest(input *CreateSnapshotInput) (req *request.Request, output *Snapshot) {
op := &request.Operation{
Name: opCreateSnapshot,
@@ -4310,7 +4660,7 @@ func (c *EC2) CreateSnapshotRequest(input *CreateSnapshotInput) (req *request.Re
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateSnapshot for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSnapshot
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSnapshot
func (c *EC2) CreateSnapshot(input *CreateSnapshotInput) (*Snapshot, error) {
req, out := c.CreateSnapshotRequest(input)
return out, req.Send()
@@ -4336,19 +4686,18 @@ const opCreateSpotDatafeedSubscription = "CreateSpotDatafeedSubscription"
// CreateSpotDatafeedSubscriptionRequest generates a "aws/request.Request" representing the
// client's request for the CreateSpotDatafeedSubscription operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateSpotDatafeedSubscription for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateSpotDatafeedSubscription method directly
-// instead.
+// See CreateSpotDatafeedSubscription for more information on using the CreateSpotDatafeedSubscription
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateSpotDatafeedSubscriptionRequest method.
// req, resp := client.CreateSpotDatafeedSubscriptionRequest(params)
@@ -4358,7 +4707,7 @@ const opCreateSpotDatafeedSubscription = "CreateSpotDatafeedSubscription"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSpotDatafeedSubscription
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSpotDatafeedSubscription
func (c *EC2) CreateSpotDatafeedSubscriptionRequest(input *CreateSpotDatafeedSubscriptionInput) (req *request.Request, output *CreateSpotDatafeedSubscriptionOutput) {
op := &request.Operation{
Name: opCreateSpotDatafeedSubscription,
@@ -4377,7 +4726,7 @@ func (c *EC2) CreateSpotDatafeedSubscriptionRequest(input *CreateSpotDatafeedSub
// CreateSpotDatafeedSubscription API operation for Amazon Elastic Compute Cloud.
//
-// Creates a data feed for Spot instances, enabling you to view Spot instance
+// Creates a data feed for Spot Instances, enabling you to view Spot Instance
// usage logs. You can create one data feed per AWS account. For more information,
// see Spot Instance Data Feed (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html)
// in the Amazon Elastic Compute Cloud User Guide.
@@ -4388,7 +4737,7 @@ func (c *EC2) CreateSpotDatafeedSubscriptionRequest(input *CreateSpotDatafeedSub
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateSpotDatafeedSubscription for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSpotDatafeedSubscription
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSpotDatafeedSubscription
func (c *EC2) CreateSpotDatafeedSubscription(input *CreateSpotDatafeedSubscriptionInput) (*CreateSpotDatafeedSubscriptionOutput, error) {
req, out := c.CreateSpotDatafeedSubscriptionRequest(input)
return out, req.Send()
@@ -4414,19 +4763,18 @@ const opCreateSubnet = "CreateSubnet"
// CreateSubnetRequest generates a "aws/request.Request" representing the
// client's request for the CreateSubnet operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateSubnet for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateSubnet method directly
-// instead.
+// See CreateSubnet for more information on using the CreateSubnet
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateSubnetRequest method.
// req, resp := client.CreateSubnetRequest(params)
@@ -4436,7 +4784,7 @@ const opCreateSubnet = "CreateSubnet"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSubnet
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSubnet
func (c *EC2) CreateSubnetRequest(input *CreateSubnetInput) (req *request.Request, output *CreateSubnetOutput) {
op := &request.Operation{
Name: opCreateSubnet,
@@ -4457,14 +4805,13 @@ func (c *EC2) CreateSubnetRequest(input *CreateSubnetInput) (req *request.Reques
//
// Creates a subnet in an existing VPC.
//
-// When you create each subnet, you provide the VPC ID and the CIDR block you
-// want for the subnet. After you create a subnet, you can't change its CIDR
-// block. The subnet's IPv4 CIDR block can be the same as the VPC's IPv4 CIDR
-// block (assuming you want only a single subnet in the VPC), or a subset of
-// the VPC's IPv4 CIDR block. If you create more than one subnet in a VPC, the
-// subnets' CIDR blocks must not overlap. The smallest IPv4 subnet (and VPC)
-// you can create uses a /28 netmask (16 IPv4 addresses), and the largest uses
-// a /16 netmask (65,536 IPv4 addresses).
+// When you create each subnet, you provide the VPC ID and the IPv4 CIDR block
+// you want for the subnet. After you create a subnet, you can't change its
+// CIDR block. The size of the subnet's IPv4 CIDR block can be the same as a
+// VPC's IPv4 CIDR block, or a subset of a VPC's IPv4 CIDR block. If you create
+// more than one subnet in a VPC, the subnets' CIDR blocks must not overlap.
+// The smallest IPv4 subnet (and VPC) you can create uses a /28 netmask (16
+// IPv4 addresses), and the largest uses a /16 netmask (65,536 IPv4 addresses).
//
// If you've associated an IPv6 CIDR block with your VPC, you can create a subnet
// with an IPv6 CIDR block that uses a /64 prefix length.
@@ -4490,7 +4837,7 @@ func (c *EC2) CreateSubnetRequest(input *CreateSubnetInput) (req *request.Reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateSubnet for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSubnet
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSubnet
func (c *EC2) CreateSubnet(input *CreateSubnetInput) (*CreateSubnetOutput, error) {
req, out := c.CreateSubnetRequest(input)
return out, req.Send()
@@ -4516,19 +4863,18 @@ const opCreateTags = "CreateTags"
// CreateTagsRequest generates a "aws/request.Request" representing the
// client's request for the CreateTags operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateTags for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateTags method directly
-// instead.
+// See CreateTags for more information on using the CreateTags
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateTagsRequest method.
// req, resp := client.CreateTagsRequest(params)
@@ -4538,7 +4884,7 @@ const opCreateTags = "CreateTags"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags
func (c *EC2) CreateTagsRequest(input *CreateTagsInput) (req *request.Request, output *CreateTagsOutput) {
op := &request.Operation{
Name: opCreateTags,
@@ -4575,7 +4921,7 @@ func (c *EC2) CreateTagsRequest(input *CreateTagsInput) (req *request.Request, o
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateTags for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTags
func (c *EC2) CreateTags(input *CreateTagsInput) (*CreateTagsOutput, error) {
req, out := c.CreateTagsRequest(input)
return out, req.Send()
@@ -4601,19 +4947,18 @@ const opCreateVolume = "CreateVolume"
// CreateVolumeRequest generates a "aws/request.Request" representing the
// client's request for the CreateVolume operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateVolume for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateVolume method directly
-// instead.
+// See CreateVolume for more information on using the CreateVolume
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateVolumeRequest method.
// req, resp := client.CreateVolumeRequest(params)
@@ -4623,7 +4968,7 @@ const opCreateVolume = "CreateVolume"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVolume
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVolume
func (c *EC2) CreateVolumeRequest(input *CreateVolumeInput) (req *request.Request, output *Volume) {
op := &request.Operation{
Name: opCreateVolume,
@@ -4668,7 +5013,7 @@ func (c *EC2) CreateVolumeRequest(input *CreateVolumeInput) (req *request.Reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateVolume for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVolume
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVolume
func (c *EC2) CreateVolume(input *CreateVolumeInput) (*Volume, error) {
req, out := c.CreateVolumeRequest(input)
return out, req.Send()
@@ -4694,19 +5039,18 @@ const opCreateVpc = "CreateVpc"
// CreateVpcRequest generates a "aws/request.Request" representing the
// client's request for the CreateVpc operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateVpc for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateVpc method directly
-// instead.
+// See CreateVpc for more information on using the CreateVpc
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateVpcRequest method.
// req, resp := client.CreateVpcRequest(params)
@@ -4716,7 +5060,7 @@ const opCreateVpc = "CreateVpc"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpc
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpc
func (c *EC2) CreateVpcRequest(input *CreateVpcInput) (req *request.Request, output *CreateVpcOutput) {
op := &request.Operation{
Name: opCreateVpc,
@@ -4761,7 +5105,7 @@ func (c *EC2) CreateVpcRequest(input *CreateVpcInput) (req *request.Request, out
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateVpc for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpc
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpc
func (c *EC2) CreateVpc(input *CreateVpcInput) (*CreateVpcOutput, error) {
req, out := c.CreateVpcRequest(input)
return out, req.Send()
@@ -4787,19 +5131,18 @@ const opCreateVpcEndpoint = "CreateVpcEndpoint"
// CreateVpcEndpointRequest generates a "aws/request.Request" representing the
// client's request for the CreateVpcEndpoint operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateVpcEndpoint for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateVpcEndpoint method directly
-// instead.
+// See CreateVpcEndpoint for more information on using the CreateVpcEndpoint
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateVpcEndpointRequest method.
// req, resp := client.CreateVpcEndpointRequest(params)
@@ -4809,7 +5152,7 @@ const opCreateVpcEndpoint = "CreateVpcEndpoint"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpoint
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpoint
func (c *EC2) CreateVpcEndpointRequest(input *CreateVpcEndpointInput) (req *request.Request, output *CreateVpcEndpointOutput) {
op := &request.Operation{
Name: opCreateVpcEndpoint,
@@ -4828,13 +5171,23 @@ func (c *EC2) CreateVpcEndpointRequest(input *CreateVpcEndpointInput) (req *requ
// CreateVpcEndpoint API operation for Amazon Elastic Compute Cloud.
//
-// Creates a VPC endpoint for a specified AWS service. An endpoint enables you
-// to create a private connection between your VPC and another AWS service in
-// your account. You can specify an endpoint policy to attach to the endpoint
-// that will control access to the service from your VPC. You can also specify
-// the VPC route tables that use the endpoint.
+// Creates a VPC endpoint for a specified service. An endpoint enables you to
+// create a private connection between your VPC and the service. The service
+// may be provided by AWS, an AWS Marketplace partner, or another AWS account.
+// For more information, see VPC Endpoints (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-endpoints.html)
+// in the Amazon Virtual Private Cloud User Guide.
//
-// Use DescribeVpcEndpointServices to get a list of supported AWS services.
+// A gateway endpoint serves as a target for a route in your route table for
+// traffic destined for the AWS service. You can specify an endpoint policy
+// to attach to the endpoint that will control access to the service from your
+// VPC. You can also specify the VPC route tables that use the endpoint.
+//
+// An interface endpoint is a network interface in your subnet that serves as
+// an endpoint for communicating with the specified service. You can specify
+// the subnets in which to create an endpoint, and the security groups to associate
+// with the endpoint network interface.
+//
+// Use DescribeVpcEndpointServices to get a list of supported services.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -4842,7 +5195,7 @@ func (c *EC2) CreateVpcEndpointRequest(input *CreateVpcEndpointInput) (req *requ
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateVpcEndpoint for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpoint
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpoint
func (c *EC2) CreateVpcEndpoint(input *CreateVpcEndpointInput) (*CreateVpcEndpointOutput, error) {
req, out := c.CreateVpcEndpointRequest(input)
return out, req.Send()
@@ -4864,23 +5217,183 @@ func (c *EC2) CreateVpcEndpointWithContext(ctx aws.Context, input *CreateVpcEndp
return out, req.Send()
}
+const opCreateVpcEndpointConnectionNotification = "CreateVpcEndpointConnectionNotification"
+
+// CreateVpcEndpointConnectionNotificationRequest generates a "aws/request.Request" representing the
+// client's request for the CreateVpcEndpointConnectionNotification operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See CreateVpcEndpointConnectionNotification for more information on using the CreateVpcEndpointConnectionNotification
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the CreateVpcEndpointConnectionNotificationRequest method.
+// req, resp := client.CreateVpcEndpointConnectionNotificationRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpointConnectionNotification
+func (c *EC2) CreateVpcEndpointConnectionNotificationRequest(input *CreateVpcEndpointConnectionNotificationInput) (req *request.Request, output *CreateVpcEndpointConnectionNotificationOutput) {
+ op := &request.Operation{
+ Name: opCreateVpcEndpointConnectionNotification,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateVpcEndpointConnectionNotificationInput{}
+ }
+
+ output = &CreateVpcEndpointConnectionNotificationOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// CreateVpcEndpointConnectionNotification API operation for Amazon Elastic Compute Cloud.
+//
+// Creates a connection notification for a specified VPC endpoint or VPC endpoint
+// service. A connection notification notifies you of specific endpoint events.
+// You must create an SNS topic to receive notifications. For more information,
+// see Create a Topic (http://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html)
+// in the Amazon Simple Notification Service Developer Guide.
+//
+// You can create a connection notification for interface endpoints only.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation CreateVpcEndpointConnectionNotification for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpointConnectionNotification
+func (c *EC2) CreateVpcEndpointConnectionNotification(input *CreateVpcEndpointConnectionNotificationInput) (*CreateVpcEndpointConnectionNotificationOutput, error) {
+ req, out := c.CreateVpcEndpointConnectionNotificationRequest(input)
+ return out, req.Send()
+}
+
+// CreateVpcEndpointConnectionNotificationWithContext is the same as CreateVpcEndpointConnectionNotification with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateVpcEndpointConnectionNotification for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateVpcEndpointConnectionNotificationWithContext(ctx aws.Context, input *CreateVpcEndpointConnectionNotificationInput, opts ...request.Option) (*CreateVpcEndpointConnectionNotificationOutput, error) {
+ req, out := c.CreateVpcEndpointConnectionNotificationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opCreateVpcEndpointServiceConfiguration = "CreateVpcEndpointServiceConfiguration"
+
+// CreateVpcEndpointServiceConfigurationRequest generates a "aws/request.Request" representing the
+// client's request for the CreateVpcEndpointServiceConfiguration operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See CreateVpcEndpointServiceConfiguration for more information on using the CreateVpcEndpointServiceConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the CreateVpcEndpointServiceConfigurationRequest method.
+// req, resp := client.CreateVpcEndpointServiceConfigurationRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpointServiceConfiguration
+func (c *EC2) CreateVpcEndpointServiceConfigurationRequest(input *CreateVpcEndpointServiceConfigurationInput) (req *request.Request, output *CreateVpcEndpointServiceConfigurationOutput) {
+ op := &request.Operation{
+ Name: opCreateVpcEndpointServiceConfiguration,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateVpcEndpointServiceConfigurationInput{}
+ }
+
+ output = &CreateVpcEndpointServiceConfigurationOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// CreateVpcEndpointServiceConfiguration API operation for Amazon Elastic Compute Cloud.
+//
+// Creates a VPC endpoint service configuration to which service consumers (AWS
+// accounts, IAM users, and IAM roles) can connect. Service consumers can create
+// an interface VPC endpoint to connect to your service.
+//
+// To create an endpoint service configuration, you must first create a Network
+// Load Balancer for your service. For more information, see VPC Endpoint Services
+// (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/endpoint-service.html)
+// in the Amazon Virtual Private Cloud User Guide.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation CreateVpcEndpointServiceConfiguration for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpointServiceConfiguration
+func (c *EC2) CreateVpcEndpointServiceConfiguration(input *CreateVpcEndpointServiceConfigurationInput) (*CreateVpcEndpointServiceConfigurationOutput, error) {
+ req, out := c.CreateVpcEndpointServiceConfigurationRequest(input)
+ return out, req.Send()
+}
+
+// CreateVpcEndpointServiceConfigurationWithContext is the same as CreateVpcEndpointServiceConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See CreateVpcEndpointServiceConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) CreateVpcEndpointServiceConfigurationWithContext(ctx aws.Context, input *CreateVpcEndpointServiceConfigurationInput, opts ...request.Option) (*CreateVpcEndpointServiceConfigurationOutput, error) {
+ req, out := c.CreateVpcEndpointServiceConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opCreateVpcPeeringConnection = "CreateVpcPeeringConnection"
// CreateVpcPeeringConnectionRequest generates a "aws/request.Request" representing the
// client's request for the CreateVpcPeeringConnection operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateVpcPeeringConnection for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateVpcPeeringConnection method directly
-// instead.
+// See CreateVpcPeeringConnection for more information on using the CreateVpcPeeringConnection
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateVpcPeeringConnectionRequest method.
// req, resp := client.CreateVpcPeeringConnectionRequest(params)
@@ -4890,7 +5403,7 @@ const opCreateVpcPeeringConnection = "CreateVpcPeeringConnection"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcPeeringConnection
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcPeeringConnection
func (c *EC2) CreateVpcPeeringConnectionRequest(input *CreateVpcPeeringConnectionInput) (req *request.Request, output *CreateVpcPeeringConnectionOutput) {
op := &request.Operation{
Name: opCreateVpcPeeringConnection,
@@ -4910,16 +5423,21 @@ func (c *EC2) CreateVpcPeeringConnectionRequest(input *CreateVpcPeeringConnectio
// CreateVpcPeeringConnection API operation for Amazon Elastic Compute Cloud.
//
// Requests a VPC peering connection between two VPCs: a requester VPC that
-// you own and a peer VPC with which to create the connection. The peer VPC
-// can belong to another AWS account. The requester VPC and peer VPC cannot
-// have overlapping CIDR blocks.
+// you own and an accepter VPC with which to create the connection. The accepter
+// VPC can belong to another AWS account and can be in a different region to
+// the requester VPC. The requester VPC and accepter VPC cannot have overlapping
+// CIDR blocks.
//
-// The owner of the peer VPC must accept the peering request to activate the
-// peering connection. The VPC peering connection request expires after 7 days,
-// after which it cannot be accepted or rejected.
+// Limitations and rules apply to a VPC peering connection. For more information,
+// see the limitations (http://docs.aws.amazon.com/AmazonVPC/latest/PeeringGuide/vpc-peering-basics.html#vpc-peering-limitations)
+// section in the VPC Peering Guide.
//
-// If you try to create a VPC peering connection between VPCs that have overlapping
-// CIDR blocks, the VPC peering connection status goes to failed.
+// The owner of the accepter VPC must accept the peering request to activate
+// the peering connection. The VPC peering connection request expires after
+// 7 days, after which it cannot be accepted or rejected.
+//
+// If you create a VPC peering connection request between VPCs with overlapping
+// CIDR blocks, the VPC peering connection has a status of failed.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -4927,7 +5445,7 @@ func (c *EC2) CreateVpcPeeringConnectionRequest(input *CreateVpcPeeringConnectio
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateVpcPeeringConnection for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcPeeringConnection
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcPeeringConnection
func (c *EC2) CreateVpcPeeringConnection(input *CreateVpcPeeringConnectionInput) (*CreateVpcPeeringConnectionOutput, error) {
req, out := c.CreateVpcPeeringConnectionRequest(input)
return out, req.Send()
@@ -4953,19 +5471,18 @@ const opCreateVpnConnection = "CreateVpnConnection"
// CreateVpnConnectionRequest generates a "aws/request.Request" representing the
// client's request for the CreateVpnConnection operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateVpnConnection for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateVpnConnection method directly
-// instead.
+// See CreateVpnConnection for more information on using the CreateVpnConnection
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateVpnConnectionRequest method.
// req, resp := client.CreateVpnConnectionRequest(params)
@@ -4975,7 +5492,7 @@ const opCreateVpnConnection = "CreateVpnConnection"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnection
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnection
func (c *EC2) CreateVpnConnectionRequest(input *CreateVpnConnectionInput) (req *request.Request, output *CreateVpnConnectionOutput) {
op := &request.Operation{
Name: opCreateVpnConnection,
@@ -5011,8 +5528,7 @@ func (c *EC2) CreateVpnConnectionRequest(input *CreateVpnConnectionInput) (req *
// This is an idempotent operation. If you perform the operation more than once,
// Amazon EC2 doesn't return an error.
//
-// For more information about VPN connections, see Adding a Hardware Virtual
-// Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
+// For more information, see AWS Managed VPN Connections (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
// in the Amazon Virtual Private Cloud User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -5021,7 +5537,7 @@ func (c *EC2) CreateVpnConnectionRequest(input *CreateVpnConnectionInput) (req *
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateVpnConnection for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnection
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnection
func (c *EC2) CreateVpnConnection(input *CreateVpnConnectionInput) (*CreateVpnConnectionOutput, error) {
req, out := c.CreateVpnConnectionRequest(input)
return out, req.Send()
@@ -5047,19 +5563,18 @@ const opCreateVpnConnectionRoute = "CreateVpnConnectionRoute"
// CreateVpnConnectionRouteRequest generates a "aws/request.Request" representing the
// client's request for the CreateVpnConnectionRoute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateVpnConnectionRoute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateVpnConnectionRoute method directly
-// instead.
+// See CreateVpnConnectionRoute for more information on using the CreateVpnConnectionRoute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateVpnConnectionRouteRequest method.
// req, resp := client.CreateVpnConnectionRouteRequest(params)
@@ -5069,7 +5584,7 @@ const opCreateVpnConnectionRoute = "CreateVpnConnectionRoute"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnectionRoute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnectionRoute
func (c *EC2) CreateVpnConnectionRouteRequest(input *CreateVpnConnectionRouteInput) (req *request.Request, output *CreateVpnConnectionRouteOutput) {
op := &request.Operation{
Name: opCreateVpnConnectionRoute,
@@ -5095,9 +5610,9 @@ func (c *EC2) CreateVpnConnectionRouteRequest(input *CreateVpnConnectionRouteInp
// traffic to be routed from the virtual private gateway to the VPN customer
// gateway.
//
-// For more information about VPN connections, see Adding a Hardware Virtual
-// Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
-// in the Amazon Virtual Private Cloud User Guide.
+// For more information about VPN connections, see AWS Managed VPN Connections
+// (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) in the
+// Amazon Virtual Private Cloud User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -5105,7 +5620,7 @@ func (c *EC2) CreateVpnConnectionRouteRequest(input *CreateVpnConnectionRouteInp
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateVpnConnectionRoute for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnectionRoute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnectionRoute
func (c *EC2) CreateVpnConnectionRoute(input *CreateVpnConnectionRouteInput) (*CreateVpnConnectionRouteOutput, error) {
req, out := c.CreateVpnConnectionRouteRequest(input)
return out, req.Send()
@@ -5131,19 +5646,18 @@ const opCreateVpnGateway = "CreateVpnGateway"
// CreateVpnGatewayRequest generates a "aws/request.Request" representing the
// client's request for the CreateVpnGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateVpnGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateVpnGateway method directly
-// instead.
+// See CreateVpnGateway for more information on using the CreateVpnGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateVpnGatewayRequest method.
// req, resp := client.CreateVpnGatewayRequest(params)
@@ -5153,7 +5667,7 @@ const opCreateVpnGateway = "CreateVpnGateway"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnGateway
func (c *EC2) CreateVpnGatewayRequest(input *CreateVpnGatewayInput) (req *request.Request, output *CreateVpnGatewayOutput) {
op := &request.Operation{
Name: opCreateVpnGateway,
@@ -5176,8 +5690,8 @@ func (c *EC2) CreateVpnGatewayRequest(input *CreateVpnGatewayInput) (req *reques
// on the VPC side of your VPN connection. You can create a virtual private
// gateway before creating the VPC itself.
//
-// For more information about virtual private gateways, see Adding a Hardware
-// Virtual Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
+// For more information about virtual private gateways, see AWS Managed VPN
+// Connections (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
// in the Amazon Virtual Private Cloud User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -5186,7 +5700,7 @@ func (c *EC2) CreateVpnGatewayRequest(input *CreateVpnGatewayInput) (req *reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation CreateVpnGateway for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnGateway
func (c *EC2) CreateVpnGateway(input *CreateVpnGatewayInput) (*CreateVpnGatewayOutput, error) {
req, out := c.CreateVpnGatewayRequest(input)
return out, req.Send()
@@ -5212,19 +5726,18 @@ const opDeleteCustomerGateway = "DeleteCustomerGateway"
// DeleteCustomerGatewayRequest generates a "aws/request.Request" representing the
// client's request for the DeleteCustomerGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteCustomerGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteCustomerGateway method directly
-// instead.
+// See DeleteCustomerGateway for more information on using the DeleteCustomerGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteCustomerGatewayRequest method.
// req, resp := client.DeleteCustomerGatewayRequest(params)
@@ -5234,7 +5747,7 @@ const opDeleteCustomerGateway = "DeleteCustomerGateway"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteCustomerGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteCustomerGateway
func (c *EC2) DeleteCustomerGatewayRequest(input *DeleteCustomerGatewayInput) (req *request.Request, output *DeleteCustomerGatewayOutput) {
op := &request.Operation{
Name: opDeleteCustomerGateway,
@@ -5264,7 +5777,7 @@ func (c *EC2) DeleteCustomerGatewayRequest(input *DeleteCustomerGatewayInput) (r
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeleteCustomerGateway for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteCustomerGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteCustomerGateway
func (c *EC2) DeleteCustomerGateway(input *DeleteCustomerGatewayInput) (*DeleteCustomerGatewayOutput, error) {
req, out := c.DeleteCustomerGatewayRequest(input)
return out, req.Send()
@@ -5290,19 +5803,18 @@ const opDeleteDhcpOptions = "DeleteDhcpOptions"
// DeleteDhcpOptionsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteDhcpOptions operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteDhcpOptions for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteDhcpOptions method directly
-// instead.
+// See DeleteDhcpOptions for more information on using the DeleteDhcpOptions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteDhcpOptionsRequest method.
// req, resp := client.DeleteDhcpOptionsRequest(params)
@@ -5312,7 +5824,7 @@ const opDeleteDhcpOptions = "DeleteDhcpOptions"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteDhcpOptions
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteDhcpOptions
func (c *EC2) DeleteDhcpOptionsRequest(input *DeleteDhcpOptionsInput) (req *request.Request, output *DeleteDhcpOptionsOutput) {
op := &request.Operation{
Name: opDeleteDhcpOptions,
@@ -5344,7 +5856,7 @@ func (c *EC2) DeleteDhcpOptionsRequest(input *DeleteDhcpOptionsInput) (req *requ
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeleteDhcpOptions for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteDhcpOptions
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteDhcpOptions
func (c *EC2) DeleteDhcpOptions(input *DeleteDhcpOptionsInput) (*DeleteDhcpOptionsOutput, error) {
req, out := c.DeleteDhcpOptionsRequest(input)
return out, req.Send()
@@ -5370,19 +5882,18 @@ const opDeleteEgressOnlyInternetGateway = "DeleteEgressOnlyInternetGateway"
// DeleteEgressOnlyInternetGatewayRequest generates a "aws/request.Request" representing the
// client's request for the DeleteEgressOnlyInternetGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteEgressOnlyInternetGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteEgressOnlyInternetGateway method directly
-// instead.
+// See DeleteEgressOnlyInternetGateway for more information on using the DeleteEgressOnlyInternetGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteEgressOnlyInternetGatewayRequest method.
// req, resp := client.DeleteEgressOnlyInternetGatewayRequest(params)
@@ -5392,7 +5903,7 @@ const opDeleteEgressOnlyInternetGateway = "DeleteEgressOnlyInternetGateway"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteEgressOnlyInternetGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteEgressOnlyInternetGateway
func (c *EC2) DeleteEgressOnlyInternetGatewayRequest(input *DeleteEgressOnlyInternetGatewayInput) (req *request.Request, output *DeleteEgressOnlyInternetGatewayOutput) {
op := &request.Operation{
Name: opDeleteEgressOnlyInternetGateway,
@@ -5419,7 +5930,7 @@ func (c *EC2) DeleteEgressOnlyInternetGatewayRequest(input *DeleteEgressOnlyInte
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeleteEgressOnlyInternetGateway for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteEgressOnlyInternetGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteEgressOnlyInternetGateway
func (c *EC2) DeleteEgressOnlyInternetGateway(input *DeleteEgressOnlyInternetGatewayInput) (*DeleteEgressOnlyInternetGatewayOutput, error) {
req, out := c.DeleteEgressOnlyInternetGatewayRequest(input)
return out, req.Send()
@@ -5445,19 +5956,18 @@ const opDeleteFlowLogs = "DeleteFlowLogs"
// DeleteFlowLogsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteFlowLogs operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteFlowLogs for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteFlowLogs method directly
-// instead.
+// See DeleteFlowLogs for more information on using the DeleteFlowLogs
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteFlowLogsRequest method.
// req, resp := client.DeleteFlowLogsRequest(params)
@@ -5467,7 +5977,7 @@ const opDeleteFlowLogs = "DeleteFlowLogs"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFlowLogs
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFlowLogs
func (c *EC2) DeleteFlowLogsRequest(input *DeleteFlowLogsInput) (req *request.Request, output *DeleteFlowLogsOutput) {
op := &request.Operation{
Name: opDeleteFlowLogs,
@@ -5494,7 +6004,7 @@ func (c *EC2) DeleteFlowLogsRequest(input *DeleteFlowLogsInput) (req *request.Re
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeleteFlowLogs for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFlowLogs
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFlowLogs
func (c *EC2) DeleteFlowLogs(input *DeleteFlowLogsInput) (*DeleteFlowLogsOutput, error) {
req, out := c.DeleteFlowLogsRequest(input)
return out, req.Send()
@@ -5516,23 +6026,96 @@ func (c *EC2) DeleteFlowLogsWithContext(ctx aws.Context, input *DeleteFlowLogsIn
return out, req.Send()
}
+const opDeleteFpgaImage = "DeleteFpgaImage"
+
+// DeleteFpgaImageRequest generates a "aws/request.Request" representing the
+// client's request for the DeleteFpgaImage operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DeleteFpgaImage for more information on using the DeleteFpgaImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DeleteFpgaImageRequest method.
+// req, resp := client.DeleteFpgaImageRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFpgaImage
+func (c *EC2) DeleteFpgaImageRequest(input *DeleteFpgaImageInput) (req *request.Request, output *DeleteFpgaImageOutput) {
+ op := &request.Operation{
+ Name: opDeleteFpgaImage,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteFpgaImageInput{}
+ }
+
+ output = &DeleteFpgaImageOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DeleteFpgaImage API operation for Amazon Elastic Compute Cloud.
+//
+// Deletes the specified Amazon FPGA Image (AFI).
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation DeleteFpgaImage for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFpgaImage
+func (c *EC2) DeleteFpgaImage(input *DeleteFpgaImageInput) (*DeleteFpgaImageOutput, error) {
+ req, out := c.DeleteFpgaImageRequest(input)
+ return out, req.Send()
+}
+
+// DeleteFpgaImageWithContext is the same as DeleteFpgaImage with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteFpgaImage for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteFpgaImageWithContext(ctx aws.Context, input *DeleteFpgaImageInput, opts ...request.Option) (*DeleteFpgaImageOutput, error) {
+ req, out := c.DeleteFpgaImageRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opDeleteInternetGateway = "DeleteInternetGateway"
// DeleteInternetGatewayRequest generates a "aws/request.Request" representing the
// client's request for the DeleteInternetGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteInternetGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteInternetGateway method directly
-// instead.
+// See DeleteInternetGateway for more information on using the DeleteInternetGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteInternetGatewayRequest method.
// req, resp := client.DeleteInternetGatewayRequest(params)
@@ -5542,7 +6125,7 @@ const opDeleteInternetGateway = "DeleteInternetGateway"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteInternetGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteInternetGateway
func (c *EC2) DeleteInternetGatewayRequest(input *DeleteInternetGatewayInput) (req *request.Request, output *DeleteInternetGatewayOutput) {
op := &request.Operation{
Name: opDeleteInternetGateway,
@@ -5572,7 +6155,7 @@ func (c *EC2) DeleteInternetGatewayRequest(input *DeleteInternetGatewayInput) (r
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeleteInternetGateway for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteInternetGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteInternetGateway
func (c *EC2) DeleteInternetGateway(input *DeleteInternetGatewayInput) (*DeleteInternetGatewayOutput, error) {
req, out := c.DeleteInternetGatewayRequest(input)
return out, req.Send()
@@ -5598,19 +6181,18 @@ const opDeleteKeyPair = "DeleteKeyPair"
// DeleteKeyPairRequest generates a "aws/request.Request" representing the
// client's request for the DeleteKeyPair operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteKeyPair for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteKeyPair method directly
-// instead.
+// See DeleteKeyPair for more information on using the DeleteKeyPair
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteKeyPairRequest method.
// req, resp := client.DeleteKeyPairRequest(params)
@@ -5620,7 +6202,7 @@ const opDeleteKeyPair = "DeleteKeyPair"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteKeyPair
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteKeyPair
func (c *EC2) DeleteKeyPairRequest(input *DeleteKeyPairInput) (req *request.Request, output *DeleteKeyPairOutput) {
op := &request.Operation{
Name: opDeleteKeyPair,
@@ -5649,7 +6231,7 @@ func (c *EC2) DeleteKeyPairRequest(input *DeleteKeyPairInput) (req *request.Requ
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeleteKeyPair for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteKeyPair
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteKeyPair
func (c *EC2) DeleteKeyPair(input *DeleteKeyPairInput) (*DeleteKeyPairOutput, error) {
req, out := c.DeleteKeyPairRequest(input)
return out, req.Send()
@@ -5671,23 +6253,174 @@ func (c *EC2) DeleteKeyPairWithContext(ctx aws.Context, input *DeleteKeyPairInpu
return out, req.Send()
}
+const opDeleteLaunchTemplate = "DeleteLaunchTemplate"
+
+// DeleteLaunchTemplateRequest generates a "aws/request.Request" representing the
+// client's request for the DeleteLaunchTemplate operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DeleteLaunchTemplate for more information on using the DeleteLaunchTemplate
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DeleteLaunchTemplateRequest method.
+// req, resp := client.DeleteLaunchTemplateRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteLaunchTemplate
+func (c *EC2) DeleteLaunchTemplateRequest(input *DeleteLaunchTemplateInput) (req *request.Request, output *DeleteLaunchTemplateOutput) {
+ op := &request.Operation{
+ Name: opDeleteLaunchTemplate,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteLaunchTemplateInput{}
+ }
+
+ output = &DeleteLaunchTemplateOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DeleteLaunchTemplate API operation for Amazon Elastic Compute Cloud.
+//
+// Deletes a launch template. Deleting a launch template deletes all of its
+// versions.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation DeleteLaunchTemplate for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteLaunchTemplate
+func (c *EC2) DeleteLaunchTemplate(input *DeleteLaunchTemplateInput) (*DeleteLaunchTemplateOutput, error) {
+ req, out := c.DeleteLaunchTemplateRequest(input)
+ return out, req.Send()
+}
+
+// DeleteLaunchTemplateWithContext is the same as DeleteLaunchTemplate with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteLaunchTemplate for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteLaunchTemplateWithContext(ctx aws.Context, input *DeleteLaunchTemplateInput, opts ...request.Option) (*DeleteLaunchTemplateOutput, error) {
+ req, out := c.DeleteLaunchTemplateRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opDeleteLaunchTemplateVersions = "DeleteLaunchTemplateVersions"
+
+// DeleteLaunchTemplateVersionsRequest generates a "aws/request.Request" representing the
+// client's request for the DeleteLaunchTemplateVersions operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DeleteLaunchTemplateVersions for more information on using the DeleteLaunchTemplateVersions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DeleteLaunchTemplateVersionsRequest method.
+// req, resp := client.DeleteLaunchTemplateVersionsRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteLaunchTemplateVersions
+func (c *EC2) DeleteLaunchTemplateVersionsRequest(input *DeleteLaunchTemplateVersionsInput) (req *request.Request, output *DeleteLaunchTemplateVersionsOutput) {
+ op := &request.Operation{
+ Name: opDeleteLaunchTemplateVersions,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteLaunchTemplateVersionsInput{}
+ }
+
+ output = &DeleteLaunchTemplateVersionsOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DeleteLaunchTemplateVersions API operation for Amazon Elastic Compute Cloud.
+//
+// Deletes one or more versions of a launch template. You cannot delete the
+// default version of a launch template; you must first assign a different version
+// as the default. If the default version is the only version for the launch
+// template, you must delete the entire launch template using DeleteLaunchTemplate.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation DeleteLaunchTemplateVersions for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteLaunchTemplateVersions
+func (c *EC2) DeleteLaunchTemplateVersions(input *DeleteLaunchTemplateVersionsInput) (*DeleteLaunchTemplateVersionsOutput, error) {
+ req, out := c.DeleteLaunchTemplateVersionsRequest(input)
+ return out, req.Send()
+}
+
+// DeleteLaunchTemplateVersionsWithContext is the same as DeleteLaunchTemplateVersions with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteLaunchTemplateVersions for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteLaunchTemplateVersionsWithContext(ctx aws.Context, input *DeleteLaunchTemplateVersionsInput, opts ...request.Option) (*DeleteLaunchTemplateVersionsOutput, error) {
+ req, out := c.DeleteLaunchTemplateVersionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opDeleteNatGateway = "DeleteNatGateway"
// DeleteNatGatewayRequest generates a "aws/request.Request" representing the
// client's request for the DeleteNatGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteNatGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteNatGateway method directly
-// instead.
+// See DeleteNatGateway for more information on using the DeleteNatGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteNatGatewayRequest method.
// req, resp := client.DeleteNatGatewayRequest(params)
@@ -5697,7 +6430,7 @@ const opDeleteNatGateway = "DeleteNatGateway"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNatGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNatGateway
func (c *EC2) DeleteNatGatewayRequest(input *DeleteNatGatewayInput) (req *request.Request, output *DeleteNatGatewayOutput) {
op := &request.Operation{
Name: opDeleteNatGateway,
@@ -5726,7 +6459,7 @@ func (c *EC2) DeleteNatGatewayRequest(input *DeleteNatGatewayInput) (req *reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeleteNatGateway for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNatGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNatGateway
func (c *EC2) DeleteNatGateway(input *DeleteNatGatewayInput) (*DeleteNatGatewayOutput, error) {
req, out := c.DeleteNatGatewayRequest(input)
return out, req.Send()
@@ -5752,19 +6485,18 @@ const opDeleteNetworkAcl = "DeleteNetworkAcl"
// DeleteNetworkAclRequest generates a "aws/request.Request" representing the
// client's request for the DeleteNetworkAcl operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteNetworkAcl for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteNetworkAcl method directly
-// instead.
+// See DeleteNetworkAcl for more information on using the DeleteNetworkAcl
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteNetworkAclRequest method.
// req, resp := client.DeleteNetworkAclRequest(params)
@@ -5774,7 +6506,7 @@ const opDeleteNetworkAcl = "DeleteNetworkAcl"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAcl
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAcl
func (c *EC2) DeleteNetworkAclRequest(input *DeleteNetworkAclInput) (req *request.Request, output *DeleteNetworkAclOutput) {
op := &request.Operation{
Name: opDeleteNetworkAcl,
@@ -5804,7 +6536,7 @@ func (c *EC2) DeleteNetworkAclRequest(input *DeleteNetworkAclInput) (req *reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeleteNetworkAcl for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAcl
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAcl
func (c *EC2) DeleteNetworkAcl(input *DeleteNetworkAclInput) (*DeleteNetworkAclOutput, error) {
req, out := c.DeleteNetworkAclRequest(input)
return out, req.Send()
@@ -5830,19 +6562,18 @@ const opDeleteNetworkAclEntry = "DeleteNetworkAclEntry"
// DeleteNetworkAclEntryRequest generates a "aws/request.Request" representing the
// client's request for the DeleteNetworkAclEntry operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteNetworkAclEntry for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteNetworkAclEntry method directly
-// instead.
+// See DeleteNetworkAclEntry for more information on using the DeleteNetworkAclEntry
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteNetworkAclEntryRequest method.
// req, resp := client.DeleteNetworkAclEntryRequest(params)
@@ -5852,7 +6583,7 @@ const opDeleteNetworkAclEntry = "DeleteNetworkAclEntry"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAclEntry
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAclEntry
func (c *EC2) DeleteNetworkAclEntryRequest(input *DeleteNetworkAclEntryInput) (req *request.Request, output *DeleteNetworkAclEntryOutput) {
op := &request.Operation{
Name: opDeleteNetworkAclEntry,
@@ -5882,7 +6613,7 @@ func (c *EC2) DeleteNetworkAclEntryRequest(input *DeleteNetworkAclEntryInput) (r
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeleteNetworkAclEntry for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAclEntry
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAclEntry
func (c *EC2) DeleteNetworkAclEntry(input *DeleteNetworkAclEntryInput) (*DeleteNetworkAclEntryOutput, error) {
req, out := c.DeleteNetworkAclEntryRequest(input)
return out, req.Send()
@@ -5908,19 +6639,18 @@ const opDeleteNetworkInterface = "DeleteNetworkInterface"
// DeleteNetworkInterfaceRequest generates a "aws/request.Request" representing the
// client's request for the DeleteNetworkInterface operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteNetworkInterface for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteNetworkInterface method directly
-// instead.
+// See DeleteNetworkInterface for more information on using the DeleteNetworkInterface
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteNetworkInterfaceRequest method.
// req, resp := client.DeleteNetworkInterfaceRequest(params)
@@ -5930,7 +6660,7 @@ const opDeleteNetworkInterface = "DeleteNetworkInterface"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterface
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterface
func (c *EC2) DeleteNetworkInterfaceRequest(input *DeleteNetworkInterfaceInput) (req *request.Request, output *DeleteNetworkInterfaceOutput) {
op := &request.Operation{
Name: opDeleteNetworkInterface,
@@ -5960,7 +6690,7 @@ func (c *EC2) DeleteNetworkInterfaceRequest(input *DeleteNetworkInterfaceInput)
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeleteNetworkInterface for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterface
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterface
func (c *EC2) DeleteNetworkInterface(input *DeleteNetworkInterfaceInput) (*DeleteNetworkInterfaceOutput, error) {
req, out := c.DeleteNetworkInterfaceRequest(input)
return out, req.Send()
@@ -5986,19 +6716,18 @@ const opDeleteNetworkInterfacePermission = "DeleteNetworkInterfacePermission"
// DeleteNetworkInterfacePermissionRequest generates a "aws/request.Request" representing the
// client's request for the DeleteNetworkInterfacePermission operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteNetworkInterfacePermission for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteNetworkInterfacePermission method directly
-// instead.
+// See DeleteNetworkInterfacePermission for more information on using the DeleteNetworkInterfacePermission
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteNetworkInterfacePermissionRequest method.
// req, resp := client.DeleteNetworkInterfacePermissionRequest(params)
@@ -6008,7 +6737,7 @@ const opDeleteNetworkInterfacePermission = "DeleteNetworkInterfacePermission"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfacePermission
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfacePermission
func (c *EC2) DeleteNetworkInterfacePermissionRequest(input *DeleteNetworkInterfacePermissionInput) (req *request.Request, output *DeleteNetworkInterfacePermissionOutput) {
op := &request.Operation{
Name: opDeleteNetworkInterfacePermission,
@@ -6038,7 +6767,7 @@ func (c *EC2) DeleteNetworkInterfacePermissionRequest(input *DeleteNetworkInterf
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeleteNetworkInterfacePermission for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfacePermission
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfacePermission
func (c *EC2) DeleteNetworkInterfacePermission(input *DeleteNetworkInterfacePermissionInput) (*DeleteNetworkInterfacePermissionOutput, error) {
req, out := c.DeleteNetworkInterfacePermissionRequest(input)
return out, req.Send()
@@ -6064,19 +6793,18 @@ const opDeletePlacementGroup = "DeletePlacementGroup"
// DeletePlacementGroupRequest generates a "aws/request.Request" representing the
// client's request for the DeletePlacementGroup operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeletePlacementGroup for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeletePlacementGroup method directly
-// instead.
+// See DeletePlacementGroup for more information on using the DeletePlacementGroup
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeletePlacementGroupRequest method.
// req, resp := client.DeletePlacementGroupRequest(params)
@@ -6086,7 +6814,7 @@ const opDeletePlacementGroup = "DeletePlacementGroup"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeletePlacementGroup
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeletePlacementGroup
func (c *EC2) DeletePlacementGroupRequest(input *DeletePlacementGroupInput) (req *request.Request, output *DeletePlacementGroupOutput) {
op := &request.Operation{
Name: opDeletePlacementGroup,
@@ -6108,8 +6836,8 @@ func (c *EC2) DeletePlacementGroupRequest(input *DeletePlacementGroupInput) (req
// DeletePlacementGroup API operation for Amazon Elastic Compute Cloud.
//
// Deletes the specified placement group. You must terminate all instances in
-// the placement group before you can delete the placement group. For more information
-// about placement groups and cluster instances, see Cluster Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html)
+// the placement group before you can delete the placement group. For more information,
+// see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html)
// in the Amazon Elastic Compute Cloud User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -6118,7 +6846,7 @@ func (c *EC2) DeletePlacementGroupRequest(input *DeletePlacementGroupInput) (req
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeletePlacementGroup for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeletePlacementGroup
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeletePlacementGroup
func (c *EC2) DeletePlacementGroup(input *DeletePlacementGroupInput) (*DeletePlacementGroupOutput, error) {
req, out := c.DeletePlacementGroupRequest(input)
return out, req.Send()
@@ -6144,19 +6872,18 @@ const opDeleteRoute = "DeleteRoute"
// DeleteRouteRequest generates a "aws/request.Request" representing the
// client's request for the DeleteRoute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteRoute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteRoute method directly
-// instead.
+// See DeleteRoute for more information on using the DeleteRoute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteRouteRequest method.
// req, resp := client.DeleteRouteRequest(params)
@@ -6166,7 +6893,7 @@ const opDeleteRoute = "DeleteRoute"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRoute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRoute
func (c *EC2) DeleteRouteRequest(input *DeleteRouteInput) (req *request.Request, output *DeleteRouteOutput) {
op := &request.Operation{
Name: opDeleteRoute,
@@ -6195,7 +6922,7 @@ func (c *EC2) DeleteRouteRequest(input *DeleteRouteInput) (req *request.Request,
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeleteRoute for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRoute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRoute
func (c *EC2) DeleteRoute(input *DeleteRouteInput) (*DeleteRouteOutput, error) {
req, out := c.DeleteRouteRequest(input)
return out, req.Send()
@@ -6221,19 +6948,18 @@ const opDeleteRouteTable = "DeleteRouteTable"
// DeleteRouteTableRequest generates a "aws/request.Request" representing the
// client's request for the DeleteRouteTable operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteRouteTable for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteRouteTable method directly
-// instead.
+// See DeleteRouteTable for more information on using the DeleteRouteTable
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteRouteTableRequest method.
// req, resp := client.DeleteRouteTableRequest(params)
@@ -6243,7 +6969,7 @@ const opDeleteRouteTable = "DeleteRouteTable"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRouteTable
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRouteTable
func (c *EC2) DeleteRouteTableRequest(input *DeleteRouteTableInput) (req *request.Request, output *DeleteRouteTableOutput) {
op := &request.Operation{
Name: opDeleteRouteTable,
@@ -6274,7 +7000,7 @@ func (c *EC2) DeleteRouteTableRequest(input *DeleteRouteTableInput) (req *reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeleteRouteTable for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRouteTable
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRouteTable
func (c *EC2) DeleteRouteTable(input *DeleteRouteTableInput) (*DeleteRouteTableOutput, error) {
req, out := c.DeleteRouteTableRequest(input)
return out, req.Send()
@@ -6300,19 +7026,18 @@ const opDeleteSecurityGroup = "DeleteSecurityGroup"
// DeleteSecurityGroupRequest generates a "aws/request.Request" representing the
// client's request for the DeleteSecurityGroup operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteSecurityGroup for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteSecurityGroup method directly
-// instead.
+// See DeleteSecurityGroup for more information on using the DeleteSecurityGroup
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteSecurityGroupRequest method.
// req, resp := client.DeleteSecurityGroupRequest(params)
@@ -6322,7 +7047,7 @@ const opDeleteSecurityGroup = "DeleteSecurityGroup"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSecurityGroup
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSecurityGroup
func (c *EC2) DeleteSecurityGroupRequest(input *DeleteSecurityGroupInput) (req *request.Request, output *DeleteSecurityGroupOutput) {
op := &request.Operation{
Name: opDeleteSecurityGroup,
@@ -6355,7 +7080,7 @@ func (c *EC2) DeleteSecurityGroupRequest(input *DeleteSecurityGroupInput) (req *
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeleteSecurityGroup for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSecurityGroup
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSecurityGroup
func (c *EC2) DeleteSecurityGroup(input *DeleteSecurityGroupInput) (*DeleteSecurityGroupOutput, error) {
req, out := c.DeleteSecurityGroupRequest(input)
return out, req.Send()
@@ -6381,19 +7106,18 @@ const opDeleteSnapshot = "DeleteSnapshot"
// DeleteSnapshotRequest generates a "aws/request.Request" representing the
// client's request for the DeleteSnapshot operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteSnapshot for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteSnapshot method directly
-// instead.
+// See DeleteSnapshot for more information on using the DeleteSnapshot
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteSnapshotRequest method.
// req, resp := client.DeleteSnapshotRequest(params)
@@ -6403,7 +7127,7 @@ const opDeleteSnapshot = "DeleteSnapshot"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSnapshot
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSnapshot
func (c *EC2) DeleteSnapshotRequest(input *DeleteSnapshotInput) (req *request.Request, output *DeleteSnapshotOutput) {
op := &request.Operation{
Name: opDeleteSnapshot,
@@ -6446,7 +7170,7 @@ func (c *EC2) DeleteSnapshotRequest(input *DeleteSnapshotInput) (req *request.Re
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeleteSnapshot for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSnapshot
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSnapshot
func (c *EC2) DeleteSnapshot(input *DeleteSnapshotInput) (*DeleteSnapshotOutput, error) {
req, out := c.DeleteSnapshotRequest(input)
return out, req.Send()
@@ -6472,19 +7196,18 @@ const opDeleteSpotDatafeedSubscription = "DeleteSpotDatafeedSubscription"
// DeleteSpotDatafeedSubscriptionRequest generates a "aws/request.Request" representing the
// client's request for the DeleteSpotDatafeedSubscription operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteSpotDatafeedSubscription for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteSpotDatafeedSubscription method directly
-// instead.
+// See DeleteSpotDatafeedSubscription for more information on using the DeleteSpotDatafeedSubscription
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteSpotDatafeedSubscriptionRequest method.
// req, resp := client.DeleteSpotDatafeedSubscriptionRequest(params)
@@ -6494,7 +7217,7 @@ const opDeleteSpotDatafeedSubscription = "DeleteSpotDatafeedSubscription"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSpotDatafeedSubscription
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSpotDatafeedSubscription
func (c *EC2) DeleteSpotDatafeedSubscriptionRequest(input *DeleteSpotDatafeedSubscriptionInput) (req *request.Request, output *DeleteSpotDatafeedSubscriptionOutput) {
op := &request.Operation{
Name: opDeleteSpotDatafeedSubscription,
@@ -6515,7 +7238,7 @@ func (c *EC2) DeleteSpotDatafeedSubscriptionRequest(input *DeleteSpotDatafeedSub
// DeleteSpotDatafeedSubscription API operation for Amazon Elastic Compute Cloud.
//
-// Deletes the data feed for Spot instances.
+// Deletes the data feed for Spot Instances.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -6523,7 +7246,7 @@ func (c *EC2) DeleteSpotDatafeedSubscriptionRequest(input *DeleteSpotDatafeedSub
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeleteSpotDatafeedSubscription for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSpotDatafeedSubscription
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSpotDatafeedSubscription
func (c *EC2) DeleteSpotDatafeedSubscription(input *DeleteSpotDatafeedSubscriptionInput) (*DeleteSpotDatafeedSubscriptionOutput, error) {
req, out := c.DeleteSpotDatafeedSubscriptionRequest(input)
return out, req.Send()
@@ -6549,19 +7272,18 @@ const opDeleteSubnet = "DeleteSubnet"
// DeleteSubnetRequest generates a "aws/request.Request" representing the
// client's request for the DeleteSubnet operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteSubnet for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteSubnet method directly
-// instead.
+// See DeleteSubnet for more information on using the DeleteSubnet
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteSubnetRequest method.
// req, resp := client.DeleteSubnetRequest(params)
@@ -6571,7 +7293,7 @@ const opDeleteSubnet = "DeleteSubnet"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSubnet
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSubnet
func (c *EC2) DeleteSubnetRequest(input *DeleteSubnetInput) (req *request.Request, output *DeleteSubnetOutput) {
op := &request.Operation{
Name: opDeleteSubnet,
@@ -6601,7 +7323,7 @@ func (c *EC2) DeleteSubnetRequest(input *DeleteSubnetInput) (req *request.Reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeleteSubnet for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSubnet
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSubnet
func (c *EC2) DeleteSubnet(input *DeleteSubnetInput) (*DeleteSubnetOutput, error) {
req, out := c.DeleteSubnetRequest(input)
return out, req.Send()
@@ -6627,19 +7349,18 @@ const opDeleteTags = "DeleteTags"
// DeleteTagsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteTags operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteTags for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteTags method directly
-// instead.
+// See DeleteTags for more information on using the DeleteTags
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteTagsRequest method.
// req, resp := client.DeleteTagsRequest(params)
@@ -6649,7 +7370,7 @@ const opDeleteTags = "DeleteTags"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTags
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTags
func (c *EC2) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) {
op := &request.Operation{
Name: opDeleteTags,
@@ -6670,10 +7391,10 @@ func (c *EC2) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, o
// DeleteTags API operation for Amazon Elastic Compute Cloud.
//
-// Deletes the specified set of tags from the specified set of resources. This
-// call is designed to follow a DescribeTags request.
+// Deletes the specified set of tags from the specified set of resources.
//
-// For more information about tags, see Tagging Your Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html)
+// To list the current tags, use DescribeTags. For more information about tags,
+// see Tagging Your Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html)
// in the Amazon Elastic Compute Cloud User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -6682,7 +7403,7 @@ func (c *EC2) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, o
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeleteTags for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTags
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTags
func (c *EC2) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) {
req, out := c.DeleteTagsRequest(input)
return out, req.Send()
@@ -6708,19 +7429,18 @@ const opDeleteVolume = "DeleteVolume"
// DeleteVolumeRequest generates a "aws/request.Request" representing the
// client's request for the DeleteVolume operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteVolume for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteVolume method directly
-// instead.
+// See DeleteVolume for more information on using the DeleteVolume
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteVolumeRequest method.
// req, resp := client.DeleteVolumeRequest(params)
@@ -6730,7 +7450,7 @@ const opDeleteVolume = "DeleteVolume"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVolume
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVolume
func (c *EC2) DeleteVolumeRequest(input *DeleteVolumeInput) (req *request.Request, output *DeleteVolumeOutput) {
op := &request.Operation{
Name: opDeleteVolume,
@@ -6765,7 +7485,7 @@ func (c *EC2) DeleteVolumeRequest(input *DeleteVolumeInput) (req *request.Reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeleteVolume for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVolume
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVolume
func (c *EC2) DeleteVolume(input *DeleteVolumeInput) (*DeleteVolumeOutput, error) {
req, out := c.DeleteVolumeRequest(input)
return out, req.Send()
@@ -6791,19 +7511,18 @@ const opDeleteVpc = "DeleteVpc"
// DeleteVpcRequest generates a "aws/request.Request" representing the
// client's request for the DeleteVpc operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteVpc for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteVpc method directly
-// instead.
+// See DeleteVpc for more information on using the DeleteVpc
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteVpcRequest method.
// req, resp := client.DeleteVpcRequest(params)
@@ -6813,7 +7532,7 @@ const opDeleteVpc = "DeleteVpc"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpc
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpc
func (c *EC2) DeleteVpcRequest(input *DeleteVpcInput) (req *request.Request, output *DeleteVpcOutput) {
op := &request.Operation{
Name: opDeleteVpc,
@@ -6846,7 +7565,7 @@ func (c *EC2) DeleteVpcRequest(input *DeleteVpcInput) (req *request.Request, out
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeleteVpc for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpc
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpc
func (c *EC2) DeleteVpc(input *DeleteVpcInput) (*DeleteVpcOutput, error) {
req, out := c.DeleteVpcRequest(input)
return out, req.Send()
@@ -6868,23 +7587,173 @@ func (c *EC2) DeleteVpcWithContext(ctx aws.Context, input *DeleteVpcInput, opts
return out, req.Send()
}
+const opDeleteVpcEndpointConnectionNotifications = "DeleteVpcEndpointConnectionNotifications"
+
+// DeleteVpcEndpointConnectionNotificationsRequest generates a "aws/request.Request" representing the
+// client's request for the DeleteVpcEndpointConnectionNotifications operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DeleteVpcEndpointConnectionNotifications for more information on using the DeleteVpcEndpointConnectionNotifications
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DeleteVpcEndpointConnectionNotificationsRequest method.
+// req, resp := client.DeleteVpcEndpointConnectionNotificationsRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpointConnectionNotifications
+func (c *EC2) DeleteVpcEndpointConnectionNotificationsRequest(input *DeleteVpcEndpointConnectionNotificationsInput) (req *request.Request, output *DeleteVpcEndpointConnectionNotificationsOutput) {
+ op := &request.Operation{
+ Name: opDeleteVpcEndpointConnectionNotifications,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteVpcEndpointConnectionNotificationsInput{}
+ }
+
+ output = &DeleteVpcEndpointConnectionNotificationsOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DeleteVpcEndpointConnectionNotifications API operation for Amazon Elastic Compute Cloud.
+//
+// Deletes one or more VPC endpoint connection notifications.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation DeleteVpcEndpointConnectionNotifications for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpointConnectionNotifications
+func (c *EC2) DeleteVpcEndpointConnectionNotifications(input *DeleteVpcEndpointConnectionNotificationsInput) (*DeleteVpcEndpointConnectionNotificationsOutput, error) {
+ req, out := c.DeleteVpcEndpointConnectionNotificationsRequest(input)
+ return out, req.Send()
+}
+
+// DeleteVpcEndpointConnectionNotificationsWithContext is the same as DeleteVpcEndpointConnectionNotifications with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteVpcEndpointConnectionNotifications for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteVpcEndpointConnectionNotificationsWithContext(ctx aws.Context, input *DeleteVpcEndpointConnectionNotificationsInput, opts ...request.Option) (*DeleteVpcEndpointConnectionNotificationsOutput, error) {
+ req, out := c.DeleteVpcEndpointConnectionNotificationsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opDeleteVpcEndpointServiceConfigurations = "DeleteVpcEndpointServiceConfigurations"
+
+// DeleteVpcEndpointServiceConfigurationsRequest generates a "aws/request.Request" representing the
+// client's request for the DeleteVpcEndpointServiceConfigurations operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DeleteVpcEndpointServiceConfigurations for more information on using the DeleteVpcEndpointServiceConfigurations
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DeleteVpcEndpointServiceConfigurationsRequest method.
+// req, resp := client.DeleteVpcEndpointServiceConfigurationsRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpointServiceConfigurations
+func (c *EC2) DeleteVpcEndpointServiceConfigurationsRequest(input *DeleteVpcEndpointServiceConfigurationsInput) (req *request.Request, output *DeleteVpcEndpointServiceConfigurationsOutput) {
+ op := &request.Operation{
+ Name: opDeleteVpcEndpointServiceConfigurations,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteVpcEndpointServiceConfigurationsInput{}
+ }
+
+ output = &DeleteVpcEndpointServiceConfigurationsOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DeleteVpcEndpointServiceConfigurations API operation for Amazon Elastic Compute Cloud.
+//
+// Deletes one or more VPC endpoint service configurations in your account.
+// Before you delete the endpoint service configuration, you must reject any
+// Available or PendingAcceptance interface endpoint connections that are attached
+// to the service.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation DeleteVpcEndpointServiceConfigurations for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpointServiceConfigurations
+func (c *EC2) DeleteVpcEndpointServiceConfigurations(input *DeleteVpcEndpointServiceConfigurationsInput) (*DeleteVpcEndpointServiceConfigurationsOutput, error) {
+ req, out := c.DeleteVpcEndpointServiceConfigurationsRequest(input)
+ return out, req.Send()
+}
+
+// DeleteVpcEndpointServiceConfigurationsWithContext is the same as DeleteVpcEndpointServiceConfigurations with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteVpcEndpointServiceConfigurations for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DeleteVpcEndpointServiceConfigurationsWithContext(ctx aws.Context, input *DeleteVpcEndpointServiceConfigurationsInput, opts ...request.Option) (*DeleteVpcEndpointServiceConfigurationsOutput, error) {
+ req, out := c.DeleteVpcEndpointServiceConfigurationsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opDeleteVpcEndpoints = "DeleteVpcEndpoints"
// DeleteVpcEndpointsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteVpcEndpoints operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteVpcEndpoints for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteVpcEndpoints method directly
-// instead.
+// See DeleteVpcEndpoints for more information on using the DeleteVpcEndpoints
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteVpcEndpointsRequest method.
// req, resp := client.DeleteVpcEndpointsRequest(params)
@@ -6894,7 +7763,7 @@ const opDeleteVpcEndpoints = "DeleteVpcEndpoints"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpoints
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpoints
func (c *EC2) DeleteVpcEndpointsRequest(input *DeleteVpcEndpointsInput) (req *request.Request, output *DeleteVpcEndpointsOutput) {
op := &request.Operation{
Name: opDeleteVpcEndpoints,
@@ -6913,8 +7782,10 @@ func (c *EC2) DeleteVpcEndpointsRequest(input *DeleteVpcEndpointsInput) (req *re
// DeleteVpcEndpoints API operation for Amazon Elastic Compute Cloud.
//
-// Deletes one or more specified VPC endpoints. Deleting the endpoint also deletes
-// the endpoint routes in the route tables that were associated with the endpoint.
+// Deletes one or more specified VPC endpoints. Deleting a gateway endpoint
+// also deletes the endpoint routes in the route tables that were associated
+// with the endpoint. Deleting an interface endpoint deletes the endpoint network
+// interfaces.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -6922,7 +7793,7 @@ func (c *EC2) DeleteVpcEndpointsRequest(input *DeleteVpcEndpointsInput) (req *re
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeleteVpcEndpoints for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpoints
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpoints
func (c *EC2) DeleteVpcEndpoints(input *DeleteVpcEndpointsInput) (*DeleteVpcEndpointsOutput, error) {
req, out := c.DeleteVpcEndpointsRequest(input)
return out, req.Send()
@@ -6948,19 +7819,18 @@ const opDeleteVpcPeeringConnection = "DeleteVpcPeeringConnection"
// DeleteVpcPeeringConnectionRequest generates a "aws/request.Request" representing the
// client's request for the DeleteVpcPeeringConnection operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteVpcPeeringConnection for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteVpcPeeringConnection method directly
-// instead.
+// See DeleteVpcPeeringConnection for more information on using the DeleteVpcPeeringConnection
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteVpcPeeringConnectionRequest method.
// req, resp := client.DeleteVpcPeeringConnectionRequest(params)
@@ -6970,7 +7840,7 @@ const opDeleteVpcPeeringConnection = "DeleteVpcPeeringConnection"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcPeeringConnection
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcPeeringConnection
func (c *EC2) DeleteVpcPeeringConnectionRequest(input *DeleteVpcPeeringConnectionInput) (req *request.Request, output *DeleteVpcPeeringConnectionOutput) {
op := &request.Operation{
Name: opDeleteVpcPeeringConnection,
@@ -6990,8 +7860,8 @@ func (c *EC2) DeleteVpcPeeringConnectionRequest(input *DeleteVpcPeeringConnectio
// DeleteVpcPeeringConnection API operation for Amazon Elastic Compute Cloud.
//
// Deletes a VPC peering connection. Either the owner of the requester VPC or
-// the owner of the peer VPC can delete the VPC peering connection if it's in
-// the active state. The owner of the requester VPC can delete a VPC peering
+// the owner of the accepter VPC can delete the VPC peering connection if it's
+// in the active state. The owner of the requester VPC can delete a VPC peering
// connection in the pending-acceptance state.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -7000,7 +7870,7 @@ func (c *EC2) DeleteVpcPeeringConnectionRequest(input *DeleteVpcPeeringConnectio
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeleteVpcPeeringConnection for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcPeeringConnection
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcPeeringConnection
func (c *EC2) DeleteVpcPeeringConnection(input *DeleteVpcPeeringConnectionInput) (*DeleteVpcPeeringConnectionOutput, error) {
req, out := c.DeleteVpcPeeringConnectionRequest(input)
return out, req.Send()
@@ -7026,19 +7896,18 @@ const opDeleteVpnConnection = "DeleteVpnConnection"
// DeleteVpnConnectionRequest generates a "aws/request.Request" representing the
// client's request for the DeleteVpnConnection operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteVpnConnection for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteVpnConnection method directly
-// instead.
+// See DeleteVpnConnection for more information on using the DeleteVpnConnection
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteVpnConnectionRequest method.
// req, resp := client.DeleteVpnConnectionRequest(params)
@@ -7048,7 +7917,7 @@ const opDeleteVpnConnection = "DeleteVpnConnection"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnection
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnection
func (c *EC2) DeleteVpnConnectionRequest(input *DeleteVpnConnectionInput) (req *request.Request, output *DeleteVpnConnectionOutput) {
op := &request.Operation{
Name: opDeleteVpnConnection,
@@ -7086,7 +7955,7 @@ func (c *EC2) DeleteVpnConnectionRequest(input *DeleteVpnConnectionInput) (req *
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeleteVpnConnection for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnection
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnection
func (c *EC2) DeleteVpnConnection(input *DeleteVpnConnectionInput) (*DeleteVpnConnectionOutput, error) {
req, out := c.DeleteVpnConnectionRequest(input)
return out, req.Send()
@@ -7112,19 +7981,18 @@ const opDeleteVpnConnectionRoute = "DeleteVpnConnectionRoute"
// DeleteVpnConnectionRouteRequest generates a "aws/request.Request" representing the
// client's request for the DeleteVpnConnectionRoute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteVpnConnectionRoute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteVpnConnectionRoute method directly
-// instead.
+// See DeleteVpnConnectionRoute for more information on using the DeleteVpnConnectionRoute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteVpnConnectionRouteRequest method.
// req, resp := client.DeleteVpnConnectionRouteRequest(params)
@@ -7134,7 +8002,7 @@ const opDeleteVpnConnectionRoute = "DeleteVpnConnectionRoute"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnectionRoute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnectionRoute
func (c *EC2) DeleteVpnConnectionRouteRequest(input *DeleteVpnConnectionRouteInput) (req *request.Request, output *DeleteVpnConnectionRouteOutput) {
op := &request.Operation{
Name: opDeleteVpnConnectionRoute,
@@ -7166,7 +8034,7 @@ func (c *EC2) DeleteVpnConnectionRouteRequest(input *DeleteVpnConnectionRouteInp
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeleteVpnConnectionRoute for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnectionRoute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnectionRoute
func (c *EC2) DeleteVpnConnectionRoute(input *DeleteVpnConnectionRouteInput) (*DeleteVpnConnectionRouteOutput, error) {
req, out := c.DeleteVpnConnectionRouteRequest(input)
return out, req.Send()
@@ -7192,19 +8060,18 @@ const opDeleteVpnGateway = "DeleteVpnGateway"
// DeleteVpnGatewayRequest generates a "aws/request.Request" representing the
// client's request for the DeleteVpnGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteVpnGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteVpnGateway method directly
-// instead.
+// See DeleteVpnGateway for more information on using the DeleteVpnGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteVpnGatewayRequest method.
// req, resp := client.DeleteVpnGatewayRequest(params)
@@ -7214,7 +8081,7 @@ const opDeleteVpnGateway = "DeleteVpnGateway"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnGateway
func (c *EC2) DeleteVpnGatewayRequest(input *DeleteVpnGatewayInput) (req *request.Request, output *DeleteVpnGatewayOutput) {
op := &request.Operation{
Name: opDeleteVpnGateway,
@@ -7247,7 +8114,7 @@ func (c *EC2) DeleteVpnGatewayRequest(input *DeleteVpnGatewayInput) (req *reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeleteVpnGateway for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnGateway
func (c *EC2) DeleteVpnGateway(input *DeleteVpnGatewayInput) (*DeleteVpnGatewayOutput, error) {
req, out := c.DeleteVpnGatewayRequest(input)
return out, req.Send()
@@ -7273,19 +8140,18 @@ const opDeregisterImage = "DeregisterImage"
// DeregisterImageRequest generates a "aws/request.Request" representing the
// client's request for the DeregisterImage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeregisterImage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeregisterImage method directly
-// instead.
+// See DeregisterImage for more information on using the DeregisterImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeregisterImageRequest method.
// req, resp := client.DeregisterImageRequest(params)
@@ -7295,7 +8161,7 @@ const opDeregisterImage = "DeregisterImage"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeregisterImage
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeregisterImage
func (c *EC2) DeregisterImageRequest(input *DeregisterImageInput) (req *request.Request, output *DeregisterImageOutput) {
op := &request.Operation{
Name: opDeregisterImage,
@@ -7317,9 +8183,14 @@ func (c *EC2) DeregisterImageRequest(input *DeregisterImageInput) (req *request.
// DeregisterImage API operation for Amazon Elastic Compute Cloud.
//
// Deregisters the specified AMI. After you deregister an AMI, it can't be used
-// to launch new instances.
+// to launch new instances; however, it doesn't affect any instances that you've
+// already launched from the AMI. You'll continue to incur usage costs for those
+// instances until you terminate them.
//
-// This command does not delete the AMI.
+// When you deregister an Amazon EBS-backed AMI, it doesn't affect the snapshot
+// that was created for the root volume of the instance during the AMI creation
+// process. When you deregister an instance store-backed AMI, it doesn't affect
+// the files that you uploaded to Amazon S3 when you created the AMI.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -7327,7 +8198,7 @@ func (c *EC2) DeregisterImageRequest(input *DeregisterImageInput) (req *request.
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DeregisterImage for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeregisterImage
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeregisterImage
func (c *EC2) DeregisterImage(input *DeregisterImageInput) (*DeregisterImageOutput, error) {
req, out := c.DeregisterImageRequest(input)
return out, req.Send()
@@ -7353,19 +8224,18 @@ const opDescribeAccountAttributes = "DescribeAccountAttributes"
// DescribeAccountAttributesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAccountAttributes operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeAccountAttributes for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeAccountAttributes method directly
-// instead.
+// See DescribeAccountAttributes for more information on using the DescribeAccountAttributes
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeAccountAttributesRequest method.
// req, resp := client.DescribeAccountAttributesRequest(params)
@@ -7375,7 +8245,7 @@ const opDescribeAccountAttributes = "DescribeAccountAttributes"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAccountAttributes
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAccountAttributes
func (c *EC2) DescribeAccountAttributesRequest(input *DescribeAccountAttributesInput) (req *request.Request, output *DescribeAccountAttributesOutput) {
op := &request.Operation{
Name: opDescribeAccountAttributes,
@@ -7420,7 +8290,7 @@ func (c *EC2) DescribeAccountAttributesRequest(input *DescribeAccountAttributesI
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeAccountAttributes for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAccountAttributes
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAccountAttributes
func (c *EC2) DescribeAccountAttributes(input *DescribeAccountAttributesInput) (*DescribeAccountAttributesOutput, error) {
req, out := c.DescribeAccountAttributesRequest(input)
return out, req.Send()
@@ -7446,19 +8316,18 @@ const opDescribeAddresses = "DescribeAddresses"
// DescribeAddressesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAddresses operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeAddresses for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeAddresses method directly
-// instead.
+// See DescribeAddresses for more information on using the DescribeAddresses
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeAddressesRequest method.
// req, resp := client.DescribeAddressesRequest(params)
@@ -7468,7 +8337,7 @@ const opDescribeAddresses = "DescribeAddresses"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddresses
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddresses
func (c *EC2) DescribeAddressesRequest(input *DescribeAddressesInput) (req *request.Request, output *DescribeAddressesOutput) {
op := &request.Operation{
Name: opDescribeAddresses,
@@ -7499,7 +8368,7 @@ func (c *EC2) DescribeAddressesRequest(input *DescribeAddressesInput) (req *requ
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeAddresses for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddresses
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddresses
func (c *EC2) DescribeAddresses(input *DescribeAddressesInput) (*DescribeAddressesOutput, error) {
req, out := c.DescribeAddressesRequest(input)
return out, req.Send()
@@ -7525,19 +8394,18 @@ const opDescribeAvailabilityZones = "DescribeAvailabilityZones"
// DescribeAvailabilityZonesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAvailabilityZones operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeAvailabilityZones for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeAvailabilityZones method directly
-// instead.
+// See DescribeAvailabilityZones for more information on using the DescribeAvailabilityZones
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeAvailabilityZonesRequest method.
// req, resp := client.DescribeAvailabilityZonesRequest(params)
@@ -7547,7 +8415,7 @@ const opDescribeAvailabilityZones = "DescribeAvailabilityZones"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAvailabilityZones
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAvailabilityZones
func (c *EC2) DescribeAvailabilityZonesRequest(input *DescribeAvailabilityZonesInput) (req *request.Request, output *DescribeAvailabilityZonesOutput) {
op := &request.Operation{
Name: opDescribeAvailabilityZones,
@@ -7580,7 +8448,7 @@ func (c *EC2) DescribeAvailabilityZonesRequest(input *DescribeAvailabilityZonesI
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeAvailabilityZones for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAvailabilityZones
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAvailabilityZones
func (c *EC2) DescribeAvailabilityZones(input *DescribeAvailabilityZonesInput) (*DescribeAvailabilityZonesOutput, error) {
req, out := c.DescribeAvailabilityZonesRequest(input)
return out, req.Send()
@@ -7606,19 +8474,18 @@ const opDescribeBundleTasks = "DescribeBundleTasks"
// DescribeBundleTasksRequest generates a "aws/request.Request" representing the
// client's request for the DescribeBundleTasks operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeBundleTasks for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeBundleTasks method directly
-// instead.
+// See DescribeBundleTasks for more information on using the DescribeBundleTasks
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeBundleTasksRequest method.
// req, resp := client.DescribeBundleTasksRequest(params)
@@ -7628,7 +8495,7 @@ const opDescribeBundleTasks = "DescribeBundleTasks"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeBundleTasks
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeBundleTasks
func (c *EC2) DescribeBundleTasksRequest(input *DescribeBundleTasksInput) (req *request.Request, output *DescribeBundleTasksOutput) {
op := &request.Operation{
Name: opDescribeBundleTasks,
@@ -7660,7 +8527,7 @@ func (c *EC2) DescribeBundleTasksRequest(input *DescribeBundleTasksInput) (req *
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeBundleTasks for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeBundleTasks
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeBundleTasks
func (c *EC2) DescribeBundleTasks(input *DescribeBundleTasksInput) (*DescribeBundleTasksOutput, error) {
req, out := c.DescribeBundleTasksRequest(input)
return out, req.Send()
@@ -7686,19 +8553,18 @@ const opDescribeClassicLinkInstances = "DescribeClassicLinkInstances"
// DescribeClassicLinkInstancesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeClassicLinkInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeClassicLinkInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeClassicLinkInstances method directly
-// instead.
+// See DescribeClassicLinkInstances for more information on using the DescribeClassicLinkInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeClassicLinkInstancesRequest method.
// req, resp := client.DescribeClassicLinkInstancesRequest(params)
@@ -7708,7 +8574,7 @@ const opDescribeClassicLinkInstances = "DescribeClassicLinkInstances"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClassicLinkInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClassicLinkInstances
func (c *EC2) DescribeClassicLinkInstancesRequest(input *DescribeClassicLinkInstancesInput) (req *request.Request, output *DescribeClassicLinkInstancesOutput) {
op := &request.Operation{
Name: opDescribeClassicLinkInstances,
@@ -7738,7 +8604,7 @@ func (c *EC2) DescribeClassicLinkInstancesRequest(input *DescribeClassicLinkInst
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeClassicLinkInstances for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClassicLinkInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClassicLinkInstances
func (c *EC2) DescribeClassicLinkInstances(input *DescribeClassicLinkInstancesInput) (*DescribeClassicLinkInstancesOutput, error) {
req, out := c.DescribeClassicLinkInstancesRequest(input)
return out, req.Send()
@@ -7764,19 +8630,18 @@ const opDescribeConversionTasks = "DescribeConversionTasks"
// DescribeConversionTasksRequest generates a "aws/request.Request" representing the
// client's request for the DescribeConversionTasks operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeConversionTasks for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeConversionTasks method directly
-// instead.
+// See DescribeConversionTasks for more information on using the DescribeConversionTasks
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeConversionTasksRequest method.
// req, resp := client.DescribeConversionTasksRequest(params)
@@ -7786,7 +8651,7 @@ const opDescribeConversionTasks = "DescribeConversionTasks"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeConversionTasks
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeConversionTasks
func (c *EC2) DescribeConversionTasksRequest(input *DescribeConversionTasksInput) (req *request.Request, output *DescribeConversionTasksOutput) {
op := &request.Operation{
Name: opDescribeConversionTasks,
@@ -7817,7 +8682,7 @@ func (c *EC2) DescribeConversionTasksRequest(input *DescribeConversionTasksInput
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeConversionTasks for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeConversionTasks
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeConversionTasks
func (c *EC2) DescribeConversionTasks(input *DescribeConversionTasksInput) (*DescribeConversionTasksOutput, error) {
req, out := c.DescribeConversionTasksRequest(input)
return out, req.Send()
@@ -7843,19 +8708,18 @@ const opDescribeCustomerGateways = "DescribeCustomerGateways"
// DescribeCustomerGatewaysRequest generates a "aws/request.Request" representing the
// client's request for the DescribeCustomerGateways operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeCustomerGateways for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeCustomerGateways method directly
-// instead.
+// See DescribeCustomerGateways for more information on using the DescribeCustomerGateways
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeCustomerGatewaysRequest method.
// req, resp := client.DescribeCustomerGatewaysRequest(params)
@@ -7865,7 +8729,7 @@ const opDescribeCustomerGateways = "DescribeCustomerGateways"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeCustomerGateways
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeCustomerGateways
func (c *EC2) DescribeCustomerGatewaysRequest(input *DescribeCustomerGatewaysInput) (req *request.Request, output *DescribeCustomerGatewaysOutput) {
op := &request.Operation{
Name: opDescribeCustomerGateways,
@@ -7886,9 +8750,9 @@ func (c *EC2) DescribeCustomerGatewaysRequest(input *DescribeCustomerGatewaysInp
//
// Describes one or more of your VPN customer gateways.
//
-// For more information about VPN customer gateways, see Adding a Hardware Virtual
-// Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
-// in the Amazon Virtual Private Cloud User Guide.
+// For more information about VPN customer gateways, see AWS Managed VPN Connections
+// (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) in the
+// Amazon Virtual Private Cloud User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -7896,7 +8760,7 @@ func (c *EC2) DescribeCustomerGatewaysRequest(input *DescribeCustomerGatewaysInp
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeCustomerGateways for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeCustomerGateways
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeCustomerGateways
func (c *EC2) DescribeCustomerGateways(input *DescribeCustomerGatewaysInput) (*DescribeCustomerGatewaysOutput, error) {
req, out := c.DescribeCustomerGatewaysRequest(input)
return out, req.Send()
@@ -7922,19 +8786,18 @@ const opDescribeDhcpOptions = "DescribeDhcpOptions"
// DescribeDhcpOptionsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeDhcpOptions operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeDhcpOptions for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeDhcpOptions method directly
-// instead.
+// See DescribeDhcpOptions for more information on using the DescribeDhcpOptions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeDhcpOptionsRequest method.
// req, resp := client.DescribeDhcpOptionsRequest(params)
@@ -7944,7 +8807,7 @@ const opDescribeDhcpOptions = "DescribeDhcpOptions"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeDhcpOptions
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeDhcpOptions
func (c *EC2) DescribeDhcpOptionsRequest(input *DescribeDhcpOptionsInput) (req *request.Request, output *DescribeDhcpOptionsOutput) {
op := &request.Operation{
Name: opDescribeDhcpOptions,
@@ -7974,7 +8837,7 @@ func (c *EC2) DescribeDhcpOptionsRequest(input *DescribeDhcpOptionsInput) (req *
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeDhcpOptions for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeDhcpOptions
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeDhcpOptions
func (c *EC2) DescribeDhcpOptions(input *DescribeDhcpOptionsInput) (*DescribeDhcpOptionsOutput, error) {
req, out := c.DescribeDhcpOptionsRequest(input)
return out, req.Send()
@@ -8000,19 +8863,18 @@ const opDescribeEgressOnlyInternetGateways = "DescribeEgressOnlyInternetGateways
// DescribeEgressOnlyInternetGatewaysRequest generates a "aws/request.Request" representing the
// client's request for the DescribeEgressOnlyInternetGateways operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeEgressOnlyInternetGateways for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeEgressOnlyInternetGateways method directly
-// instead.
+// See DescribeEgressOnlyInternetGateways for more information on using the DescribeEgressOnlyInternetGateways
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeEgressOnlyInternetGatewaysRequest method.
// req, resp := client.DescribeEgressOnlyInternetGatewaysRequest(params)
@@ -8022,7 +8884,7 @@ const opDescribeEgressOnlyInternetGateways = "DescribeEgressOnlyInternetGateways
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeEgressOnlyInternetGateways
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeEgressOnlyInternetGateways
func (c *EC2) DescribeEgressOnlyInternetGatewaysRequest(input *DescribeEgressOnlyInternetGatewaysInput) (req *request.Request, output *DescribeEgressOnlyInternetGatewaysOutput) {
op := &request.Operation{
Name: opDescribeEgressOnlyInternetGateways,
@@ -8049,7 +8911,7 @@ func (c *EC2) DescribeEgressOnlyInternetGatewaysRequest(input *DescribeEgressOnl
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeEgressOnlyInternetGateways for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeEgressOnlyInternetGateways
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeEgressOnlyInternetGateways
func (c *EC2) DescribeEgressOnlyInternetGateways(input *DescribeEgressOnlyInternetGatewaysInput) (*DescribeEgressOnlyInternetGatewaysOutput, error) {
req, out := c.DescribeEgressOnlyInternetGatewaysRequest(input)
return out, req.Send()
@@ -8075,19 +8937,18 @@ const opDescribeElasticGpus = "DescribeElasticGpus"
// DescribeElasticGpusRequest generates a "aws/request.Request" representing the
// client's request for the DescribeElasticGpus operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeElasticGpus for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeElasticGpus method directly
-// instead.
+// See DescribeElasticGpus for more information on using the DescribeElasticGpus
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeElasticGpusRequest method.
// req, resp := client.DescribeElasticGpusRequest(params)
@@ -8097,7 +8958,7 @@ const opDescribeElasticGpus = "DescribeElasticGpus"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeElasticGpus
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeElasticGpus
func (c *EC2) DescribeElasticGpusRequest(input *DescribeElasticGpusInput) (req *request.Request, output *DescribeElasticGpusOutput) {
op := &request.Operation{
Name: opDescribeElasticGpus,
@@ -8117,7 +8978,7 @@ func (c *EC2) DescribeElasticGpusRequest(input *DescribeElasticGpusInput) (req *
// DescribeElasticGpus API operation for Amazon Elastic Compute Cloud.
//
// Describes the Elastic GPUs associated with your instances. For more information
-// about Elastic GPUs, see Amazon EC2 Elastic GPUs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-gpus.html).
+// about Elastic GPUs, see Amazon EC2 Elastic GPUs (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-gpus.html).
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -8125,7 +8986,7 @@ func (c *EC2) DescribeElasticGpusRequest(input *DescribeElasticGpusInput) (req *
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeElasticGpus for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeElasticGpus
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeElasticGpus
func (c *EC2) DescribeElasticGpus(input *DescribeElasticGpusInput) (*DescribeElasticGpusOutput, error) {
req, out := c.DescribeElasticGpusRequest(input)
return out, req.Send()
@@ -8151,19 +9012,18 @@ const opDescribeExportTasks = "DescribeExportTasks"
// DescribeExportTasksRequest generates a "aws/request.Request" representing the
// client's request for the DescribeExportTasks operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeExportTasks for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeExportTasks method directly
-// instead.
+// See DescribeExportTasks for more information on using the DescribeExportTasks
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeExportTasksRequest method.
// req, resp := client.DescribeExportTasksRequest(params)
@@ -8173,7 +9033,7 @@ const opDescribeExportTasks = "DescribeExportTasks"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeExportTasks
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeExportTasks
func (c *EC2) DescribeExportTasksRequest(input *DescribeExportTasksInput) (req *request.Request, output *DescribeExportTasksOutput) {
op := &request.Operation{
Name: opDescribeExportTasks,
@@ -8200,7 +9060,7 @@ func (c *EC2) DescribeExportTasksRequest(input *DescribeExportTasksInput) (req *
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeExportTasks for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeExportTasks
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeExportTasks
func (c *EC2) DescribeExportTasks(input *DescribeExportTasksInput) (*DescribeExportTasksOutput, error) {
req, out := c.DescribeExportTasksRequest(input)
return out, req.Send()
@@ -8226,19 +9086,18 @@ const opDescribeFlowLogs = "DescribeFlowLogs"
// DescribeFlowLogsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeFlowLogs operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeFlowLogs for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeFlowLogs method directly
-// instead.
+// See DescribeFlowLogs for more information on using the DescribeFlowLogs
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeFlowLogsRequest method.
// req, resp := client.DescribeFlowLogsRequest(params)
@@ -8248,7 +9107,7 @@ const opDescribeFlowLogs = "DescribeFlowLogs"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFlowLogs
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFlowLogs
func (c *EC2) DescribeFlowLogsRequest(input *DescribeFlowLogsInput) (req *request.Request, output *DescribeFlowLogsOutput) {
op := &request.Operation{
Name: opDescribeFlowLogs,
@@ -8277,7 +9136,7 @@ func (c *EC2) DescribeFlowLogsRequest(input *DescribeFlowLogsInput) (req *reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeFlowLogs for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFlowLogs
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFlowLogs
func (c *EC2) DescribeFlowLogs(input *DescribeFlowLogsInput) (*DescribeFlowLogsOutput, error) {
req, out := c.DescribeFlowLogsRequest(input)
return out, req.Send()
@@ -8299,23 +9158,96 @@ func (c *EC2) DescribeFlowLogsWithContext(ctx aws.Context, input *DescribeFlowLo
return out, req.Send()
}
+const opDescribeFpgaImageAttribute = "DescribeFpgaImageAttribute"
+
+// DescribeFpgaImageAttributeRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeFpgaImageAttribute operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DescribeFpgaImageAttribute for more information on using the DescribeFpgaImageAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DescribeFpgaImageAttributeRequest method.
+// req, resp := client.DescribeFpgaImageAttributeRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImageAttribute
+func (c *EC2) DescribeFpgaImageAttributeRequest(input *DescribeFpgaImageAttributeInput) (req *request.Request, output *DescribeFpgaImageAttributeOutput) {
+ op := &request.Operation{
+ Name: opDescribeFpgaImageAttribute,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeFpgaImageAttributeInput{}
+ }
+
+ output = &DescribeFpgaImageAttributeOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeFpgaImageAttribute API operation for Amazon Elastic Compute Cloud.
+//
+// Describes the specified attribute of the specified Amazon FPGA Image (AFI).
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation DescribeFpgaImageAttribute for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImageAttribute
+func (c *EC2) DescribeFpgaImageAttribute(input *DescribeFpgaImageAttributeInput) (*DescribeFpgaImageAttributeOutput, error) {
+ req, out := c.DescribeFpgaImageAttributeRequest(input)
+ return out, req.Send()
+}
+
+// DescribeFpgaImageAttributeWithContext is the same as DescribeFpgaImageAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeFpgaImageAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeFpgaImageAttributeWithContext(ctx aws.Context, input *DescribeFpgaImageAttributeInput, opts ...request.Option) (*DescribeFpgaImageAttributeOutput, error) {
+ req, out := c.DescribeFpgaImageAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opDescribeFpgaImages = "DescribeFpgaImages"
// DescribeFpgaImagesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeFpgaImages operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeFpgaImages for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeFpgaImages method directly
-// instead.
+// See DescribeFpgaImages for more information on using the DescribeFpgaImages
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeFpgaImagesRequest method.
// req, resp := client.DescribeFpgaImagesRequest(params)
@@ -8325,7 +9257,7 @@ const opDescribeFpgaImages = "DescribeFpgaImages"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImages
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImages
func (c *EC2) DescribeFpgaImagesRequest(input *DescribeFpgaImagesInput) (req *request.Request, output *DescribeFpgaImagesOutput) {
op := &request.Operation{
Name: opDescribeFpgaImages,
@@ -8354,7 +9286,7 @@ func (c *EC2) DescribeFpgaImagesRequest(input *DescribeFpgaImagesInput) (req *re
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeFpgaImages for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImages
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImages
func (c *EC2) DescribeFpgaImages(input *DescribeFpgaImagesInput) (*DescribeFpgaImagesOutput, error) {
req, out := c.DescribeFpgaImagesRequest(input)
return out, req.Send()
@@ -8380,19 +9312,18 @@ const opDescribeHostReservationOfferings = "DescribeHostReservationOfferings"
// DescribeHostReservationOfferingsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeHostReservationOfferings operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeHostReservationOfferings for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeHostReservationOfferings method directly
-// instead.
+// See DescribeHostReservationOfferings for more information on using the DescribeHostReservationOfferings
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeHostReservationOfferingsRequest method.
// req, resp := client.DescribeHostReservationOfferingsRequest(params)
@@ -8402,7 +9333,7 @@ const opDescribeHostReservationOfferings = "DescribeHostReservationOfferings"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservationOfferings
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservationOfferings
func (c *EC2) DescribeHostReservationOfferingsRequest(input *DescribeHostReservationOfferingsInput) (req *request.Request, output *DescribeHostReservationOfferingsOutput) {
op := &request.Operation{
Name: opDescribeHostReservationOfferings,
@@ -8437,7 +9368,7 @@ func (c *EC2) DescribeHostReservationOfferingsRequest(input *DescribeHostReserva
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeHostReservationOfferings for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservationOfferings
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservationOfferings
func (c *EC2) DescribeHostReservationOfferings(input *DescribeHostReservationOfferingsInput) (*DescribeHostReservationOfferingsOutput, error) {
req, out := c.DescribeHostReservationOfferingsRequest(input)
return out, req.Send()
@@ -8463,19 +9394,18 @@ const opDescribeHostReservations = "DescribeHostReservations"
// DescribeHostReservationsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeHostReservations operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeHostReservations for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeHostReservations method directly
-// instead.
+// See DescribeHostReservations for more information on using the DescribeHostReservations
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeHostReservationsRequest method.
// req, resp := client.DescribeHostReservationsRequest(params)
@@ -8485,7 +9415,7 @@ const opDescribeHostReservations = "DescribeHostReservations"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservations
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservations
func (c *EC2) DescribeHostReservationsRequest(input *DescribeHostReservationsInput) (req *request.Request, output *DescribeHostReservationsOutput) {
op := &request.Operation{
Name: opDescribeHostReservations,
@@ -8513,7 +9443,7 @@ func (c *EC2) DescribeHostReservationsRequest(input *DescribeHostReservationsInp
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeHostReservations for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservations
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservations
func (c *EC2) DescribeHostReservations(input *DescribeHostReservationsInput) (*DescribeHostReservationsOutput, error) {
req, out := c.DescribeHostReservationsRequest(input)
return out, req.Send()
@@ -8539,19 +9469,18 @@ const opDescribeHosts = "DescribeHosts"
// DescribeHostsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeHosts operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeHosts for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeHosts method directly
-// instead.
+// See DescribeHosts for more information on using the DescribeHosts
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeHostsRequest method.
// req, resp := client.DescribeHostsRequest(params)
@@ -8561,7 +9490,7 @@ const opDescribeHosts = "DescribeHosts"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHosts
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHosts
func (c *EC2) DescribeHostsRequest(input *DescribeHostsInput) (req *request.Request, output *DescribeHostsOutput) {
op := &request.Operation{
Name: opDescribeHosts,
@@ -8592,7 +9521,7 @@ func (c *EC2) DescribeHostsRequest(input *DescribeHostsInput) (req *request.Requ
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeHosts for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHosts
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHosts
func (c *EC2) DescribeHosts(input *DescribeHostsInput) (*DescribeHostsOutput, error) {
req, out := c.DescribeHostsRequest(input)
return out, req.Send()
@@ -8618,19 +9547,18 @@ const opDescribeIamInstanceProfileAssociations = "DescribeIamInstanceProfileAsso
// DescribeIamInstanceProfileAssociationsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeIamInstanceProfileAssociations operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeIamInstanceProfileAssociations for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeIamInstanceProfileAssociations method directly
-// instead.
+// See DescribeIamInstanceProfileAssociations for more information on using the DescribeIamInstanceProfileAssociations
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeIamInstanceProfileAssociationsRequest method.
// req, resp := client.DescribeIamInstanceProfileAssociationsRequest(params)
@@ -8640,7 +9568,7 @@ const opDescribeIamInstanceProfileAssociations = "DescribeIamInstanceProfileAsso
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIamInstanceProfileAssociations
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIamInstanceProfileAssociations
func (c *EC2) DescribeIamInstanceProfileAssociationsRequest(input *DescribeIamInstanceProfileAssociationsInput) (req *request.Request, output *DescribeIamInstanceProfileAssociationsOutput) {
op := &request.Operation{
Name: opDescribeIamInstanceProfileAssociations,
@@ -8667,7 +9595,7 @@ func (c *EC2) DescribeIamInstanceProfileAssociationsRequest(input *DescribeIamIn
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeIamInstanceProfileAssociations for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIamInstanceProfileAssociations
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIamInstanceProfileAssociations
func (c *EC2) DescribeIamInstanceProfileAssociations(input *DescribeIamInstanceProfileAssociationsInput) (*DescribeIamInstanceProfileAssociationsOutput, error) {
req, out := c.DescribeIamInstanceProfileAssociationsRequest(input)
return out, req.Send()
@@ -8693,19 +9621,18 @@ const opDescribeIdFormat = "DescribeIdFormat"
// DescribeIdFormatRequest generates a "aws/request.Request" representing the
// client's request for the DescribeIdFormat operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeIdFormat for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeIdFormat method directly
-// instead.
+// See DescribeIdFormat for more information on using the DescribeIdFormat
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeIdFormatRequest method.
// req, resp := client.DescribeIdFormatRequest(params)
@@ -8715,7 +9642,7 @@ const opDescribeIdFormat = "DescribeIdFormat"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdFormat
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdFormat
func (c *EC2) DescribeIdFormatRequest(input *DescribeIdFormatInput) (req *request.Request, output *DescribeIdFormatOutput) {
op := &request.Operation{
Name: opDescribeIdFormat,
@@ -8755,7 +9682,7 @@ func (c *EC2) DescribeIdFormatRequest(input *DescribeIdFormatInput) (req *reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeIdFormat for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdFormat
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdFormat
func (c *EC2) DescribeIdFormat(input *DescribeIdFormatInput) (*DescribeIdFormatOutput, error) {
req, out := c.DescribeIdFormatRequest(input)
return out, req.Send()
@@ -8781,19 +9708,18 @@ const opDescribeIdentityIdFormat = "DescribeIdentityIdFormat"
// DescribeIdentityIdFormatRequest generates a "aws/request.Request" representing the
// client's request for the DescribeIdentityIdFormat operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeIdentityIdFormat for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeIdentityIdFormat method directly
-// instead.
+// See DescribeIdentityIdFormat for more information on using the DescribeIdentityIdFormat
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeIdentityIdFormatRequest method.
// req, resp := client.DescribeIdentityIdFormatRequest(params)
@@ -8803,7 +9729,7 @@ const opDescribeIdentityIdFormat = "DescribeIdentityIdFormat"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdentityIdFormat
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdentityIdFormat
func (c *EC2) DescribeIdentityIdFormatRequest(input *DescribeIdentityIdFormatInput) (req *request.Request, output *DescribeIdentityIdFormatOutput) {
op := &request.Operation{
Name: opDescribeIdentityIdFormat,
@@ -8841,7 +9767,7 @@ func (c *EC2) DescribeIdentityIdFormatRequest(input *DescribeIdentityIdFormatInp
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeIdentityIdFormat for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdentityIdFormat
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdentityIdFormat
func (c *EC2) DescribeIdentityIdFormat(input *DescribeIdentityIdFormatInput) (*DescribeIdentityIdFormatOutput, error) {
req, out := c.DescribeIdentityIdFormatRequest(input)
return out, req.Send()
@@ -8867,19 +9793,18 @@ const opDescribeImageAttribute = "DescribeImageAttribute"
// DescribeImageAttributeRequest generates a "aws/request.Request" representing the
// client's request for the DescribeImageAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeImageAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeImageAttribute method directly
-// instead.
+// See DescribeImageAttribute for more information on using the DescribeImageAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeImageAttributeRequest method.
// req, resp := client.DescribeImageAttributeRequest(params)
@@ -8889,7 +9814,7 @@ const opDescribeImageAttribute = "DescribeImageAttribute"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImageAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImageAttribute
func (c *EC2) DescribeImageAttributeRequest(input *DescribeImageAttributeInput) (req *request.Request, output *DescribeImageAttributeOutput) {
op := &request.Operation{
Name: opDescribeImageAttribute,
@@ -8917,7 +9842,7 @@ func (c *EC2) DescribeImageAttributeRequest(input *DescribeImageAttributeInput)
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeImageAttribute for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImageAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImageAttribute
func (c *EC2) DescribeImageAttribute(input *DescribeImageAttributeInput) (*DescribeImageAttributeOutput, error) {
req, out := c.DescribeImageAttributeRequest(input)
return out, req.Send()
@@ -8943,19 +9868,18 @@ const opDescribeImages = "DescribeImages"
// DescribeImagesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeImages operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeImages for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeImages method directly
-// instead.
+// See DescribeImages for more information on using the DescribeImages
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeImagesRequest method.
// req, resp := client.DescribeImagesRequest(params)
@@ -8965,7 +9889,7 @@ const opDescribeImages = "DescribeImages"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImages
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImages
func (c *EC2) DescribeImagesRequest(input *DescribeImagesInput) (req *request.Request, output *DescribeImagesOutput) {
op := &request.Operation{
Name: opDescribeImages,
@@ -8998,7 +9922,7 @@ func (c *EC2) DescribeImagesRequest(input *DescribeImagesInput) (req *request.Re
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeImages for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImages
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImages
func (c *EC2) DescribeImages(input *DescribeImagesInput) (*DescribeImagesOutput, error) {
req, out := c.DescribeImagesRequest(input)
return out, req.Send()
@@ -9024,19 +9948,18 @@ const opDescribeImportImageTasks = "DescribeImportImageTasks"
// DescribeImportImageTasksRequest generates a "aws/request.Request" representing the
// client's request for the DescribeImportImageTasks operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeImportImageTasks for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeImportImageTasks method directly
-// instead.
+// See DescribeImportImageTasks for more information on using the DescribeImportImageTasks
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeImportImageTasksRequest method.
// req, resp := client.DescribeImportImageTasksRequest(params)
@@ -9046,7 +9969,7 @@ const opDescribeImportImageTasks = "DescribeImportImageTasks"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportImageTasks
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportImageTasks
func (c *EC2) DescribeImportImageTasksRequest(input *DescribeImportImageTasksInput) (req *request.Request, output *DescribeImportImageTasksOutput) {
op := &request.Operation{
Name: opDescribeImportImageTasks,
@@ -9074,7 +9997,7 @@ func (c *EC2) DescribeImportImageTasksRequest(input *DescribeImportImageTasksInp
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeImportImageTasks for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportImageTasks
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportImageTasks
func (c *EC2) DescribeImportImageTasks(input *DescribeImportImageTasksInput) (*DescribeImportImageTasksOutput, error) {
req, out := c.DescribeImportImageTasksRequest(input)
return out, req.Send()
@@ -9100,19 +10023,18 @@ const opDescribeImportSnapshotTasks = "DescribeImportSnapshotTasks"
// DescribeImportSnapshotTasksRequest generates a "aws/request.Request" representing the
// client's request for the DescribeImportSnapshotTasks operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeImportSnapshotTasks for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeImportSnapshotTasks method directly
-// instead.
+// See DescribeImportSnapshotTasks for more information on using the DescribeImportSnapshotTasks
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeImportSnapshotTasksRequest method.
// req, resp := client.DescribeImportSnapshotTasksRequest(params)
@@ -9122,7 +10044,7 @@ const opDescribeImportSnapshotTasks = "DescribeImportSnapshotTasks"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportSnapshotTasks
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportSnapshotTasks
func (c *EC2) DescribeImportSnapshotTasksRequest(input *DescribeImportSnapshotTasksInput) (req *request.Request, output *DescribeImportSnapshotTasksOutput) {
op := &request.Operation{
Name: opDescribeImportSnapshotTasks,
@@ -9149,7 +10071,7 @@ func (c *EC2) DescribeImportSnapshotTasksRequest(input *DescribeImportSnapshotTa
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeImportSnapshotTasks for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportSnapshotTasks
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportSnapshotTasks
func (c *EC2) DescribeImportSnapshotTasks(input *DescribeImportSnapshotTasksInput) (*DescribeImportSnapshotTasksOutput, error) {
req, out := c.DescribeImportSnapshotTasksRequest(input)
return out, req.Send()
@@ -9175,19 +10097,18 @@ const opDescribeInstanceAttribute = "DescribeInstanceAttribute"
// DescribeInstanceAttributeRequest generates a "aws/request.Request" representing the
// client's request for the DescribeInstanceAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeInstanceAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeInstanceAttribute method directly
-// instead.
+// See DescribeInstanceAttribute for more information on using the DescribeInstanceAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeInstanceAttributeRequest method.
// req, resp := client.DescribeInstanceAttributeRequest(params)
@@ -9197,7 +10118,7 @@ const opDescribeInstanceAttribute = "DescribeInstanceAttribute"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceAttribute
func (c *EC2) DescribeInstanceAttributeRequest(input *DescribeInstanceAttributeInput) (req *request.Request, output *DescribeInstanceAttributeOutput) {
op := &request.Operation{
Name: opDescribeInstanceAttribute,
@@ -9228,7 +10149,7 @@ func (c *EC2) DescribeInstanceAttributeRequest(input *DescribeInstanceAttributeI
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeInstanceAttribute for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceAttribute
func (c *EC2) DescribeInstanceAttribute(input *DescribeInstanceAttributeInput) (*DescribeInstanceAttributeOutput, error) {
req, out := c.DescribeInstanceAttributeRequest(input)
return out, req.Send()
@@ -9250,23 +10171,114 @@ func (c *EC2) DescribeInstanceAttributeWithContext(ctx aws.Context, input *Descr
return out, req.Send()
}
+const opDescribeInstanceCreditSpecifications = "DescribeInstanceCreditSpecifications"
+
+// DescribeInstanceCreditSpecificationsRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeInstanceCreditSpecifications operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DescribeInstanceCreditSpecifications for more information on using the DescribeInstanceCreditSpecifications
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DescribeInstanceCreditSpecificationsRequest method.
+// req, resp := client.DescribeInstanceCreditSpecificationsRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceCreditSpecifications
+func (c *EC2) DescribeInstanceCreditSpecificationsRequest(input *DescribeInstanceCreditSpecificationsInput) (req *request.Request, output *DescribeInstanceCreditSpecificationsOutput) {
+ op := &request.Operation{
+ Name: opDescribeInstanceCreditSpecifications,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeInstanceCreditSpecificationsInput{}
+ }
+
+ output = &DescribeInstanceCreditSpecificationsOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeInstanceCreditSpecifications API operation for Amazon Elastic Compute Cloud.
+//
+// Describes the credit option for CPU usage of one or more of your T2 instances.
+// The credit options are standard and unlimited.
+//
+// If you do not specify an instance ID, Amazon EC2 returns only the T2 instances
+// with the unlimited credit option. If you specify one or more instance IDs,
+// Amazon EC2 returns the credit option (standard or unlimited) of those instances.
+// If you specify an instance ID that is not valid, such as an instance that
+// is not a T2 instance, an error is returned.
+//
+// Recently terminated instances might appear in the returned results. This
+// interval is usually less than one hour.
+//
+// If an Availability Zone is experiencing a service disruption and you specify
+// instance IDs in the affected zone, or do not specify any instance IDs at
+// all, the call fails. If you specify only instance IDs in an unaffected zone,
+// the call works normally.
+//
+// For more information, see T2 Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-instances.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation DescribeInstanceCreditSpecifications for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceCreditSpecifications
+func (c *EC2) DescribeInstanceCreditSpecifications(input *DescribeInstanceCreditSpecificationsInput) (*DescribeInstanceCreditSpecificationsOutput, error) {
+ req, out := c.DescribeInstanceCreditSpecificationsRequest(input)
+ return out, req.Send()
+}
+
+// DescribeInstanceCreditSpecificationsWithContext is the same as DescribeInstanceCreditSpecifications with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeInstanceCreditSpecifications for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeInstanceCreditSpecificationsWithContext(ctx aws.Context, input *DescribeInstanceCreditSpecificationsInput, opts ...request.Option) (*DescribeInstanceCreditSpecificationsOutput, error) {
+ req, out := c.DescribeInstanceCreditSpecificationsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opDescribeInstanceStatus = "DescribeInstanceStatus"
// DescribeInstanceStatusRequest generates a "aws/request.Request" representing the
// client's request for the DescribeInstanceStatus operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeInstanceStatus for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeInstanceStatus method directly
-// instead.
+// See DescribeInstanceStatus for more information on using the DescribeInstanceStatus
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeInstanceStatusRequest method.
// req, resp := client.DescribeInstanceStatusRequest(params)
@@ -9276,7 +10288,7 @@ const opDescribeInstanceStatus = "DescribeInstanceStatus"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceStatus
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceStatus
func (c *EC2) DescribeInstanceStatusRequest(input *DescribeInstanceStatusInput) (req *request.Request, output *DescribeInstanceStatusOutput) {
op := &request.Operation{
Name: opDescribeInstanceStatus,
@@ -9330,7 +10342,7 @@ func (c *EC2) DescribeInstanceStatusRequest(input *DescribeInstanceStatusInput)
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeInstanceStatus for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceStatus
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceStatus
func (c *EC2) DescribeInstanceStatus(input *DescribeInstanceStatusInput) (*DescribeInstanceStatusOutput, error) {
req, out := c.DescribeInstanceStatusRequest(input)
return out, req.Send()
@@ -9406,19 +10418,18 @@ const opDescribeInstances = "DescribeInstances"
// DescribeInstancesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeInstances method directly
-// instead.
+// See DescribeInstances for more information on using the DescribeInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeInstancesRequest method.
// req, resp := client.DescribeInstancesRequest(params)
@@ -9428,7 +10439,7 @@ const opDescribeInstances = "DescribeInstances"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances
func (c *EC2) DescribeInstancesRequest(input *DescribeInstancesInput) (req *request.Request, output *DescribeInstancesOutput) {
op := &request.Operation{
Name: opDescribeInstances,
@@ -9476,7 +10487,7 @@ func (c *EC2) DescribeInstancesRequest(input *DescribeInstancesInput) (req *requ
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeInstances for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstances
func (c *EC2) DescribeInstances(input *DescribeInstancesInput) (*DescribeInstancesOutput, error) {
req, out := c.DescribeInstancesRequest(input)
return out, req.Send()
@@ -9552,19 +10563,18 @@ const opDescribeInternetGateways = "DescribeInternetGateways"
// DescribeInternetGatewaysRequest generates a "aws/request.Request" representing the
// client's request for the DescribeInternetGateways operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeInternetGateways for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeInternetGateways method directly
-// instead.
+// See DescribeInternetGateways for more information on using the DescribeInternetGateways
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeInternetGatewaysRequest method.
// req, resp := client.DescribeInternetGatewaysRequest(params)
@@ -9574,7 +10584,7 @@ const opDescribeInternetGateways = "DescribeInternetGateways"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInternetGateways
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInternetGateways
func (c *EC2) DescribeInternetGatewaysRequest(input *DescribeInternetGatewaysInput) (req *request.Request, output *DescribeInternetGatewaysOutput) {
op := &request.Operation{
Name: opDescribeInternetGateways,
@@ -9601,7 +10611,7 @@ func (c *EC2) DescribeInternetGatewaysRequest(input *DescribeInternetGatewaysInp
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeInternetGateways for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInternetGateways
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInternetGateways
func (c *EC2) DescribeInternetGateways(input *DescribeInternetGatewaysInput) (*DescribeInternetGatewaysOutput, error) {
req, out := c.DescribeInternetGatewaysRequest(input)
return out, req.Send()
@@ -9627,19 +10637,18 @@ const opDescribeKeyPairs = "DescribeKeyPairs"
// DescribeKeyPairsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeKeyPairs operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeKeyPairs for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeKeyPairs method directly
-// instead.
+// See DescribeKeyPairs for more information on using the DescribeKeyPairs
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeKeyPairsRequest method.
// req, resp := client.DescribeKeyPairsRequest(params)
@@ -9649,7 +10658,7 @@ const opDescribeKeyPairs = "DescribeKeyPairs"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeKeyPairs
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeKeyPairs
func (c *EC2) DescribeKeyPairsRequest(input *DescribeKeyPairsInput) (req *request.Request, output *DescribeKeyPairsOutput) {
op := &request.Operation{
Name: opDescribeKeyPairs,
@@ -9679,7 +10688,7 @@ func (c *EC2) DescribeKeyPairsRequest(input *DescribeKeyPairsInput) (req *reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeKeyPairs for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeKeyPairs
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeKeyPairs
func (c *EC2) DescribeKeyPairs(input *DescribeKeyPairsInput) (*DescribeKeyPairsOutput, error) {
req, out := c.DescribeKeyPairsRequest(input)
return out, req.Send()
@@ -9701,23 +10710,171 @@ func (c *EC2) DescribeKeyPairsWithContext(ctx aws.Context, input *DescribeKeyPai
return out, req.Send()
}
+const opDescribeLaunchTemplateVersions = "DescribeLaunchTemplateVersions"
+
+// DescribeLaunchTemplateVersionsRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeLaunchTemplateVersions operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DescribeLaunchTemplateVersions for more information on using the DescribeLaunchTemplateVersions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DescribeLaunchTemplateVersionsRequest method.
+// req, resp := client.DescribeLaunchTemplateVersionsRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeLaunchTemplateVersions
+func (c *EC2) DescribeLaunchTemplateVersionsRequest(input *DescribeLaunchTemplateVersionsInput) (req *request.Request, output *DescribeLaunchTemplateVersionsOutput) {
+ op := &request.Operation{
+ Name: opDescribeLaunchTemplateVersions,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeLaunchTemplateVersionsInput{}
+ }
+
+ output = &DescribeLaunchTemplateVersionsOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeLaunchTemplateVersions API operation for Amazon Elastic Compute Cloud.
+//
+// Describes one or more versions of a specified launch template. You can describe
+// all versions, individual versions, or a range of versions.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation DescribeLaunchTemplateVersions for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeLaunchTemplateVersions
+func (c *EC2) DescribeLaunchTemplateVersions(input *DescribeLaunchTemplateVersionsInput) (*DescribeLaunchTemplateVersionsOutput, error) {
+ req, out := c.DescribeLaunchTemplateVersionsRequest(input)
+ return out, req.Send()
+}
+
+// DescribeLaunchTemplateVersionsWithContext is the same as DescribeLaunchTemplateVersions with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeLaunchTemplateVersions for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeLaunchTemplateVersionsWithContext(ctx aws.Context, input *DescribeLaunchTemplateVersionsInput, opts ...request.Option) (*DescribeLaunchTemplateVersionsOutput, error) {
+ req, out := c.DescribeLaunchTemplateVersionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opDescribeLaunchTemplates = "DescribeLaunchTemplates"
+
+// DescribeLaunchTemplatesRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeLaunchTemplates operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DescribeLaunchTemplates for more information on using the DescribeLaunchTemplates
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DescribeLaunchTemplatesRequest method.
+// req, resp := client.DescribeLaunchTemplatesRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeLaunchTemplates
+func (c *EC2) DescribeLaunchTemplatesRequest(input *DescribeLaunchTemplatesInput) (req *request.Request, output *DescribeLaunchTemplatesOutput) {
+ op := &request.Operation{
+ Name: opDescribeLaunchTemplates,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeLaunchTemplatesInput{}
+ }
+
+ output = &DescribeLaunchTemplatesOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeLaunchTemplates API operation for Amazon Elastic Compute Cloud.
+//
+// Describes one or more launch templates.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation DescribeLaunchTemplates for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeLaunchTemplates
+func (c *EC2) DescribeLaunchTemplates(input *DescribeLaunchTemplatesInput) (*DescribeLaunchTemplatesOutput, error) {
+ req, out := c.DescribeLaunchTemplatesRequest(input)
+ return out, req.Send()
+}
+
+// DescribeLaunchTemplatesWithContext is the same as DescribeLaunchTemplates with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeLaunchTemplates for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeLaunchTemplatesWithContext(ctx aws.Context, input *DescribeLaunchTemplatesInput, opts ...request.Option) (*DescribeLaunchTemplatesOutput, error) {
+ req, out := c.DescribeLaunchTemplatesRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opDescribeMovingAddresses = "DescribeMovingAddresses"
// DescribeMovingAddressesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeMovingAddresses operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeMovingAddresses for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeMovingAddresses method directly
-// instead.
+// See DescribeMovingAddresses for more information on using the DescribeMovingAddresses
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeMovingAddressesRequest method.
// req, resp := client.DescribeMovingAddressesRequest(params)
@@ -9727,7 +10884,7 @@ const opDescribeMovingAddresses = "DescribeMovingAddresses"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeMovingAddresses
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeMovingAddresses
func (c *EC2) DescribeMovingAddressesRequest(input *DescribeMovingAddressesInput) (req *request.Request, output *DescribeMovingAddressesOutput) {
op := &request.Operation{
Name: opDescribeMovingAddresses,
@@ -9756,7 +10913,7 @@ func (c *EC2) DescribeMovingAddressesRequest(input *DescribeMovingAddressesInput
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeMovingAddresses for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeMovingAddresses
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeMovingAddresses
func (c *EC2) DescribeMovingAddresses(input *DescribeMovingAddressesInput) (*DescribeMovingAddressesOutput, error) {
req, out := c.DescribeMovingAddressesRequest(input)
return out, req.Send()
@@ -9782,19 +10939,18 @@ const opDescribeNatGateways = "DescribeNatGateways"
// DescribeNatGatewaysRequest generates a "aws/request.Request" representing the
// client's request for the DescribeNatGateways operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeNatGateways for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeNatGateways method directly
-// instead.
+// See DescribeNatGateways for more information on using the DescribeNatGateways
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeNatGatewaysRequest method.
// req, resp := client.DescribeNatGatewaysRequest(params)
@@ -9804,7 +10960,7 @@ const opDescribeNatGateways = "DescribeNatGateways"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNatGateways
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNatGateways
func (c *EC2) DescribeNatGatewaysRequest(input *DescribeNatGatewaysInput) (req *request.Request, output *DescribeNatGatewaysOutput) {
op := &request.Operation{
Name: opDescribeNatGateways,
@@ -9837,7 +10993,7 @@ func (c *EC2) DescribeNatGatewaysRequest(input *DescribeNatGatewaysInput) (req *
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeNatGateways for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNatGateways
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNatGateways
func (c *EC2) DescribeNatGateways(input *DescribeNatGatewaysInput) (*DescribeNatGatewaysOutput, error) {
req, out := c.DescribeNatGatewaysRequest(input)
return out, req.Send()
@@ -9913,19 +11069,18 @@ const opDescribeNetworkAcls = "DescribeNetworkAcls"
// DescribeNetworkAclsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeNetworkAcls operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeNetworkAcls for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeNetworkAcls method directly
-// instead.
+// See DescribeNetworkAcls for more information on using the DescribeNetworkAcls
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeNetworkAclsRequest method.
// req, resp := client.DescribeNetworkAclsRequest(params)
@@ -9935,7 +11090,7 @@ const opDescribeNetworkAcls = "DescribeNetworkAcls"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkAcls
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkAcls
func (c *EC2) DescribeNetworkAclsRequest(input *DescribeNetworkAclsInput) (req *request.Request, output *DescribeNetworkAclsOutput) {
op := &request.Operation{
Name: opDescribeNetworkAcls,
@@ -9965,7 +11120,7 @@ func (c *EC2) DescribeNetworkAclsRequest(input *DescribeNetworkAclsInput) (req *
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeNetworkAcls for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkAcls
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkAcls
func (c *EC2) DescribeNetworkAcls(input *DescribeNetworkAclsInput) (*DescribeNetworkAclsOutput, error) {
req, out := c.DescribeNetworkAclsRequest(input)
return out, req.Send()
@@ -9991,19 +11146,18 @@ const opDescribeNetworkInterfaceAttribute = "DescribeNetworkInterfaceAttribute"
// DescribeNetworkInterfaceAttributeRequest generates a "aws/request.Request" representing the
// client's request for the DescribeNetworkInterfaceAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeNetworkInterfaceAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeNetworkInterfaceAttribute method directly
-// instead.
+// See DescribeNetworkInterfaceAttribute for more information on using the DescribeNetworkInterfaceAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeNetworkInterfaceAttributeRequest method.
// req, resp := client.DescribeNetworkInterfaceAttributeRequest(params)
@@ -10013,7 +11167,7 @@ const opDescribeNetworkInterfaceAttribute = "DescribeNetworkInterfaceAttribute"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaceAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaceAttribute
func (c *EC2) DescribeNetworkInterfaceAttributeRequest(input *DescribeNetworkInterfaceAttributeInput) (req *request.Request, output *DescribeNetworkInterfaceAttributeOutput) {
op := &request.Operation{
Name: opDescribeNetworkInterfaceAttribute,
@@ -10041,7 +11195,7 @@ func (c *EC2) DescribeNetworkInterfaceAttributeRequest(input *DescribeNetworkInt
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeNetworkInterfaceAttribute for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaceAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaceAttribute
func (c *EC2) DescribeNetworkInterfaceAttribute(input *DescribeNetworkInterfaceAttributeInput) (*DescribeNetworkInterfaceAttributeOutput, error) {
req, out := c.DescribeNetworkInterfaceAttributeRequest(input)
return out, req.Send()
@@ -10067,19 +11221,18 @@ const opDescribeNetworkInterfacePermissions = "DescribeNetworkInterfacePermissio
// DescribeNetworkInterfacePermissionsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeNetworkInterfacePermissions operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeNetworkInterfacePermissions for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeNetworkInterfacePermissions method directly
-// instead.
+// See DescribeNetworkInterfacePermissions for more information on using the DescribeNetworkInterfacePermissions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeNetworkInterfacePermissionsRequest method.
// req, resp := client.DescribeNetworkInterfacePermissionsRequest(params)
@@ -10089,7 +11242,7 @@ const opDescribeNetworkInterfacePermissions = "DescribeNetworkInterfacePermissio
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacePermissions
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacePermissions
func (c *EC2) DescribeNetworkInterfacePermissionsRequest(input *DescribeNetworkInterfacePermissionsInput) (req *request.Request, output *DescribeNetworkInterfacePermissionsOutput) {
op := &request.Operation{
Name: opDescribeNetworkInterfacePermissions,
@@ -10116,7 +11269,7 @@ func (c *EC2) DescribeNetworkInterfacePermissionsRequest(input *DescribeNetworkI
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeNetworkInterfacePermissions for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacePermissions
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacePermissions
func (c *EC2) DescribeNetworkInterfacePermissions(input *DescribeNetworkInterfacePermissionsInput) (*DescribeNetworkInterfacePermissionsOutput, error) {
req, out := c.DescribeNetworkInterfacePermissionsRequest(input)
return out, req.Send()
@@ -10142,19 +11295,18 @@ const opDescribeNetworkInterfaces = "DescribeNetworkInterfaces"
// DescribeNetworkInterfacesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeNetworkInterfaces operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeNetworkInterfaces for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeNetworkInterfaces method directly
-// instead.
+// See DescribeNetworkInterfaces for more information on using the DescribeNetworkInterfaces
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeNetworkInterfacesRequest method.
// req, resp := client.DescribeNetworkInterfacesRequest(params)
@@ -10164,7 +11316,7 @@ const opDescribeNetworkInterfaces = "DescribeNetworkInterfaces"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaces
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaces
func (c *EC2) DescribeNetworkInterfacesRequest(input *DescribeNetworkInterfacesInput) (req *request.Request, output *DescribeNetworkInterfacesOutput) {
op := &request.Operation{
Name: opDescribeNetworkInterfaces,
@@ -10191,7 +11343,7 @@ func (c *EC2) DescribeNetworkInterfacesRequest(input *DescribeNetworkInterfacesI
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeNetworkInterfaces for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaces
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaces
func (c *EC2) DescribeNetworkInterfaces(input *DescribeNetworkInterfacesInput) (*DescribeNetworkInterfacesOutput, error) {
req, out := c.DescribeNetworkInterfacesRequest(input)
return out, req.Send()
@@ -10217,19 +11369,18 @@ const opDescribePlacementGroups = "DescribePlacementGroups"
// DescribePlacementGroupsRequest generates a "aws/request.Request" representing the
// client's request for the DescribePlacementGroups operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribePlacementGroups for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribePlacementGroups method directly
-// instead.
+// See DescribePlacementGroups for more information on using the DescribePlacementGroups
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribePlacementGroupsRequest method.
// req, resp := client.DescribePlacementGroupsRequest(params)
@@ -10239,7 +11390,7 @@ const opDescribePlacementGroups = "DescribePlacementGroups"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePlacementGroups
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePlacementGroups
func (c *EC2) DescribePlacementGroupsRequest(input *DescribePlacementGroupsInput) (req *request.Request, output *DescribePlacementGroupsOutput) {
op := &request.Operation{
Name: opDescribePlacementGroups,
@@ -10258,8 +11409,8 @@ func (c *EC2) DescribePlacementGroupsRequest(input *DescribePlacementGroupsInput
// DescribePlacementGroups API operation for Amazon Elastic Compute Cloud.
//
-// Describes one or more of your placement groups. For more information about
-// placement groups and cluster instances, see Cluster Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html)
+// Describes one or more of your placement groups. For more information, see
+// Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html)
// in the Amazon Elastic Compute Cloud User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -10268,7 +11419,7 @@ func (c *EC2) DescribePlacementGroupsRequest(input *DescribePlacementGroupsInput
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribePlacementGroups for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePlacementGroups
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePlacementGroups
func (c *EC2) DescribePlacementGroups(input *DescribePlacementGroupsInput) (*DescribePlacementGroupsOutput, error) {
req, out := c.DescribePlacementGroupsRequest(input)
return out, req.Send()
@@ -10294,19 +11445,18 @@ const opDescribePrefixLists = "DescribePrefixLists"
// DescribePrefixListsRequest generates a "aws/request.Request" representing the
// client's request for the DescribePrefixLists operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribePrefixLists for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribePrefixLists method directly
-// instead.
+// See DescribePrefixLists for more information on using the DescribePrefixLists
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribePrefixListsRequest method.
// req, resp := client.DescribePrefixListsRequest(params)
@@ -10316,7 +11466,7 @@ const opDescribePrefixLists = "DescribePrefixLists"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePrefixLists
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePrefixLists
func (c *EC2) DescribePrefixListsRequest(input *DescribePrefixListsInput) (req *request.Request, output *DescribePrefixListsOutput) {
op := &request.Operation{
Name: opDescribePrefixLists,
@@ -10339,7 +11489,7 @@ func (c *EC2) DescribePrefixListsRequest(input *DescribePrefixListsInput) (req *
// the prefix list name and prefix list ID of the service and the IP address
// range for the service. A prefix list ID is required for creating an outbound
// security group rule that allows traffic from a VPC to access an AWS service
-// through a VPC endpoint.
+// through a gateway VPC endpoint.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -10347,7 +11497,7 @@ func (c *EC2) DescribePrefixListsRequest(input *DescribePrefixListsInput) (req *
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribePrefixLists for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePrefixLists
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePrefixLists
func (c *EC2) DescribePrefixLists(input *DescribePrefixListsInput) (*DescribePrefixListsOutput, error) {
req, out := c.DescribePrefixListsRequest(input)
return out, req.Send()
@@ -10373,19 +11523,18 @@ const opDescribeRegions = "DescribeRegions"
// DescribeRegionsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeRegions operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeRegions for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeRegions method directly
-// instead.
+// See DescribeRegions for more information on using the DescribeRegions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeRegionsRequest method.
// req, resp := client.DescribeRegionsRequest(params)
@@ -10395,7 +11544,7 @@ const opDescribeRegions = "DescribeRegions"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRegions
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRegions
func (c *EC2) DescribeRegionsRequest(input *DescribeRegionsInput) (req *request.Request, output *DescribeRegionsOutput) {
op := &request.Operation{
Name: opDescribeRegions,
@@ -10425,7 +11574,7 @@ func (c *EC2) DescribeRegionsRequest(input *DescribeRegionsInput) (req *request.
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeRegions for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRegions
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRegions
func (c *EC2) DescribeRegions(input *DescribeRegionsInput) (*DescribeRegionsOutput, error) {
req, out := c.DescribeRegionsRequest(input)
return out, req.Send()
@@ -10451,19 +11600,18 @@ const opDescribeReservedInstances = "DescribeReservedInstances"
// DescribeReservedInstancesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeReservedInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeReservedInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeReservedInstances method directly
-// instead.
+// See DescribeReservedInstances for more information on using the DescribeReservedInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeReservedInstancesRequest method.
// req, resp := client.DescribeReservedInstancesRequest(params)
@@ -10473,7 +11621,7 @@ const opDescribeReservedInstances = "DescribeReservedInstances"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstances
func (c *EC2) DescribeReservedInstancesRequest(input *DescribeReservedInstancesInput) (req *request.Request, output *DescribeReservedInstancesOutput) {
op := &request.Operation{
Name: opDescribeReservedInstances,
@@ -10503,7 +11651,7 @@ func (c *EC2) DescribeReservedInstancesRequest(input *DescribeReservedInstancesI
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeReservedInstances for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstances
func (c *EC2) DescribeReservedInstances(input *DescribeReservedInstancesInput) (*DescribeReservedInstancesOutput, error) {
req, out := c.DescribeReservedInstancesRequest(input)
return out, req.Send()
@@ -10529,19 +11677,18 @@ const opDescribeReservedInstancesListings = "DescribeReservedInstancesListings"
// DescribeReservedInstancesListingsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeReservedInstancesListings operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeReservedInstancesListings for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeReservedInstancesListings method directly
-// instead.
+// See DescribeReservedInstancesListings for more information on using the DescribeReservedInstancesListings
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeReservedInstancesListingsRequest method.
// req, resp := client.DescribeReservedInstancesListingsRequest(params)
@@ -10551,7 +11698,7 @@ const opDescribeReservedInstancesListings = "DescribeReservedInstancesListings"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesListings
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesListings
func (c *EC2) DescribeReservedInstancesListingsRequest(input *DescribeReservedInstancesListingsInput) (req *request.Request, output *DescribeReservedInstancesListingsOutput) {
op := &request.Operation{
Name: opDescribeReservedInstancesListings,
@@ -10599,7 +11746,7 @@ func (c *EC2) DescribeReservedInstancesListingsRequest(input *DescribeReservedIn
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeReservedInstancesListings for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesListings
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesListings
func (c *EC2) DescribeReservedInstancesListings(input *DescribeReservedInstancesListingsInput) (*DescribeReservedInstancesListingsOutput, error) {
req, out := c.DescribeReservedInstancesListingsRequest(input)
return out, req.Send()
@@ -10625,19 +11772,18 @@ const opDescribeReservedInstancesModifications = "DescribeReservedInstancesModif
// DescribeReservedInstancesModificationsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeReservedInstancesModifications operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeReservedInstancesModifications for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeReservedInstancesModifications method directly
-// instead.
+// See DescribeReservedInstancesModifications for more information on using the DescribeReservedInstancesModifications
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeReservedInstancesModificationsRequest method.
// req, resp := client.DescribeReservedInstancesModificationsRequest(params)
@@ -10647,7 +11793,7 @@ const opDescribeReservedInstancesModifications = "DescribeReservedInstancesModif
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesModifications
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesModifications
func (c *EC2) DescribeReservedInstancesModificationsRequest(input *DescribeReservedInstancesModificationsInput) (req *request.Request, output *DescribeReservedInstancesModificationsOutput) {
op := &request.Operation{
Name: opDescribeReservedInstancesModifications,
@@ -10686,7 +11832,7 @@ func (c *EC2) DescribeReservedInstancesModificationsRequest(input *DescribeReser
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeReservedInstancesModifications for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesModifications
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesModifications
func (c *EC2) DescribeReservedInstancesModifications(input *DescribeReservedInstancesModificationsInput) (*DescribeReservedInstancesModificationsOutput, error) {
req, out := c.DescribeReservedInstancesModificationsRequest(input)
return out, req.Send()
@@ -10762,19 +11908,18 @@ const opDescribeReservedInstancesOfferings = "DescribeReservedInstancesOfferings
// DescribeReservedInstancesOfferingsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeReservedInstancesOfferings operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeReservedInstancesOfferings for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeReservedInstancesOfferings method directly
-// instead.
+// See DescribeReservedInstancesOfferings for more information on using the DescribeReservedInstancesOfferings
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeReservedInstancesOfferingsRequest method.
// req, resp := client.DescribeReservedInstancesOfferingsRequest(params)
@@ -10784,7 +11929,7 @@ const opDescribeReservedInstancesOfferings = "DescribeReservedInstancesOfferings
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesOfferings
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesOfferings
func (c *EC2) DescribeReservedInstancesOfferingsRequest(input *DescribeReservedInstancesOfferingsInput) (req *request.Request, output *DescribeReservedInstancesOfferingsOutput) {
op := &request.Operation{
Name: opDescribeReservedInstancesOfferings,
@@ -10828,7 +11973,7 @@ func (c *EC2) DescribeReservedInstancesOfferingsRequest(input *DescribeReservedI
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeReservedInstancesOfferings for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesOfferings
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesOfferings
func (c *EC2) DescribeReservedInstancesOfferings(input *DescribeReservedInstancesOfferingsInput) (*DescribeReservedInstancesOfferingsOutput, error) {
req, out := c.DescribeReservedInstancesOfferingsRequest(input)
return out, req.Send()
@@ -10904,19 +12049,18 @@ const opDescribeRouteTables = "DescribeRouteTables"
// DescribeRouteTablesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeRouteTables operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeRouteTables for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeRouteTables method directly
-// instead.
+// See DescribeRouteTables for more information on using the DescribeRouteTables
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeRouteTablesRequest method.
// req, resp := client.DescribeRouteTablesRequest(params)
@@ -10926,7 +12070,7 @@ const opDescribeRouteTables = "DescribeRouteTables"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRouteTables
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRouteTables
func (c *EC2) DescribeRouteTablesRequest(input *DescribeRouteTablesInput) (req *request.Request, output *DescribeRouteTablesOutput) {
op := &request.Operation{
Name: opDescribeRouteTables,
@@ -10961,7 +12105,7 @@ func (c *EC2) DescribeRouteTablesRequest(input *DescribeRouteTablesInput) (req *
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeRouteTables for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRouteTables
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRouteTables
func (c *EC2) DescribeRouteTables(input *DescribeRouteTablesInput) (*DescribeRouteTablesOutput, error) {
req, out := c.DescribeRouteTablesRequest(input)
return out, req.Send()
@@ -10987,19 +12131,18 @@ const opDescribeScheduledInstanceAvailability = "DescribeScheduledInstanceAvaila
// DescribeScheduledInstanceAvailabilityRequest generates a "aws/request.Request" representing the
// client's request for the DescribeScheduledInstanceAvailability operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeScheduledInstanceAvailability for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeScheduledInstanceAvailability method directly
-// instead.
+// See DescribeScheduledInstanceAvailability for more information on using the DescribeScheduledInstanceAvailability
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeScheduledInstanceAvailabilityRequest method.
// req, resp := client.DescribeScheduledInstanceAvailabilityRequest(params)
@@ -11009,7 +12152,7 @@ const opDescribeScheduledInstanceAvailability = "DescribeScheduledInstanceAvaila
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstanceAvailability
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstanceAvailability
func (c *EC2) DescribeScheduledInstanceAvailabilityRequest(input *DescribeScheduledInstanceAvailabilityInput) (req *request.Request, output *DescribeScheduledInstanceAvailabilityOutput) {
op := &request.Operation{
Name: opDescribeScheduledInstanceAvailability,
@@ -11044,7 +12187,7 @@ func (c *EC2) DescribeScheduledInstanceAvailabilityRequest(input *DescribeSchedu
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeScheduledInstanceAvailability for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstanceAvailability
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstanceAvailability
func (c *EC2) DescribeScheduledInstanceAvailability(input *DescribeScheduledInstanceAvailabilityInput) (*DescribeScheduledInstanceAvailabilityOutput, error) {
req, out := c.DescribeScheduledInstanceAvailabilityRequest(input)
return out, req.Send()
@@ -11070,19 +12213,18 @@ const opDescribeScheduledInstances = "DescribeScheduledInstances"
// DescribeScheduledInstancesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeScheduledInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeScheduledInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeScheduledInstances method directly
-// instead.
+// See DescribeScheduledInstances for more information on using the DescribeScheduledInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeScheduledInstancesRequest method.
// req, resp := client.DescribeScheduledInstancesRequest(params)
@@ -11092,7 +12234,7 @@ const opDescribeScheduledInstances = "DescribeScheduledInstances"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstances
func (c *EC2) DescribeScheduledInstancesRequest(input *DescribeScheduledInstancesInput) (req *request.Request, output *DescribeScheduledInstancesOutput) {
op := &request.Operation{
Name: opDescribeScheduledInstances,
@@ -11119,7 +12261,7 @@ func (c *EC2) DescribeScheduledInstancesRequest(input *DescribeScheduledInstance
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeScheduledInstances for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstances
func (c *EC2) DescribeScheduledInstances(input *DescribeScheduledInstancesInput) (*DescribeScheduledInstancesOutput, error) {
req, out := c.DescribeScheduledInstancesRequest(input)
return out, req.Send()
@@ -11145,19 +12287,18 @@ const opDescribeSecurityGroupReferences = "DescribeSecurityGroupReferences"
// DescribeSecurityGroupReferencesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSecurityGroupReferences operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSecurityGroupReferences for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSecurityGroupReferences method directly
-// instead.
+// See DescribeSecurityGroupReferences for more information on using the DescribeSecurityGroupReferences
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSecurityGroupReferencesRequest method.
// req, resp := client.DescribeSecurityGroupReferencesRequest(params)
@@ -11167,7 +12308,7 @@ const opDescribeSecurityGroupReferences = "DescribeSecurityGroupReferences"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroupReferences
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroupReferences
func (c *EC2) DescribeSecurityGroupReferencesRequest(input *DescribeSecurityGroupReferencesInput) (req *request.Request, output *DescribeSecurityGroupReferencesOutput) {
op := &request.Operation{
Name: opDescribeSecurityGroupReferences,
@@ -11195,7 +12336,7 @@ func (c *EC2) DescribeSecurityGroupReferencesRequest(input *DescribeSecurityGrou
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeSecurityGroupReferences for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroupReferences
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroupReferences
func (c *EC2) DescribeSecurityGroupReferences(input *DescribeSecurityGroupReferencesInput) (*DescribeSecurityGroupReferencesOutput, error) {
req, out := c.DescribeSecurityGroupReferencesRequest(input)
return out, req.Send()
@@ -11221,19 +12362,18 @@ const opDescribeSecurityGroups = "DescribeSecurityGroups"
// DescribeSecurityGroupsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSecurityGroups operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSecurityGroups for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSecurityGroups method directly
-// instead.
+// See DescribeSecurityGroups for more information on using the DescribeSecurityGroups
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSecurityGroupsRequest method.
// req, resp := client.DescribeSecurityGroupsRequest(params)
@@ -11243,7 +12383,7 @@ const opDescribeSecurityGroups = "DescribeSecurityGroups"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroups
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroups
func (c *EC2) DescribeSecurityGroupsRequest(input *DescribeSecurityGroupsInput) (req *request.Request, output *DescribeSecurityGroupsOutput) {
op := &request.Operation{
Name: opDescribeSecurityGroups,
@@ -11277,7 +12417,7 @@ func (c *EC2) DescribeSecurityGroupsRequest(input *DescribeSecurityGroupsInput)
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeSecurityGroups for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroups
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroups
func (c *EC2) DescribeSecurityGroups(input *DescribeSecurityGroupsInput) (*DescribeSecurityGroupsOutput, error) {
req, out := c.DescribeSecurityGroupsRequest(input)
return out, req.Send()
@@ -11303,19 +12443,18 @@ const opDescribeSnapshotAttribute = "DescribeSnapshotAttribute"
// DescribeSnapshotAttributeRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSnapshotAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSnapshotAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSnapshotAttribute method directly
-// instead.
+// See DescribeSnapshotAttribute for more information on using the DescribeSnapshotAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSnapshotAttributeRequest method.
// req, resp := client.DescribeSnapshotAttributeRequest(params)
@@ -11325,7 +12464,7 @@ const opDescribeSnapshotAttribute = "DescribeSnapshotAttribute"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshotAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshotAttribute
func (c *EC2) DescribeSnapshotAttributeRequest(input *DescribeSnapshotAttributeInput) (req *request.Request, output *DescribeSnapshotAttributeOutput) {
op := &request.Operation{
Name: opDescribeSnapshotAttribute,
@@ -11356,7 +12495,7 @@ func (c *EC2) DescribeSnapshotAttributeRequest(input *DescribeSnapshotAttributeI
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeSnapshotAttribute for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshotAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshotAttribute
func (c *EC2) DescribeSnapshotAttribute(input *DescribeSnapshotAttributeInput) (*DescribeSnapshotAttributeOutput, error) {
req, out := c.DescribeSnapshotAttributeRequest(input)
return out, req.Send()
@@ -11382,19 +12521,18 @@ const opDescribeSnapshots = "DescribeSnapshots"
// DescribeSnapshotsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSnapshots operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSnapshots for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSnapshots method directly
-// instead.
+// See DescribeSnapshots for more information on using the DescribeSnapshots
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSnapshotsRequest method.
// req, resp := client.DescribeSnapshotsRequest(params)
@@ -11404,7 +12542,7 @@ const opDescribeSnapshots = "DescribeSnapshots"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshots
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshots
func (c *EC2) DescribeSnapshotsRequest(input *DescribeSnapshotsInput) (req *request.Request, output *DescribeSnapshotsOutput) {
op := &request.Operation{
Name: opDescribeSnapshots,
@@ -11482,7 +12620,7 @@ func (c *EC2) DescribeSnapshotsRequest(input *DescribeSnapshotsInput) (req *requ
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeSnapshots for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshots
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshots
func (c *EC2) DescribeSnapshots(input *DescribeSnapshotsInput) (*DescribeSnapshotsOutput, error) {
req, out := c.DescribeSnapshotsRequest(input)
return out, req.Send()
@@ -11558,19 +12696,18 @@ const opDescribeSpotDatafeedSubscription = "DescribeSpotDatafeedSubscription"
// DescribeSpotDatafeedSubscriptionRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSpotDatafeedSubscription operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSpotDatafeedSubscription for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSpotDatafeedSubscription method directly
-// instead.
+// See DescribeSpotDatafeedSubscription for more information on using the DescribeSpotDatafeedSubscription
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSpotDatafeedSubscriptionRequest method.
// req, resp := client.DescribeSpotDatafeedSubscriptionRequest(params)
@@ -11580,7 +12717,7 @@ const opDescribeSpotDatafeedSubscription = "DescribeSpotDatafeedSubscription"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotDatafeedSubscription
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotDatafeedSubscription
func (c *EC2) DescribeSpotDatafeedSubscriptionRequest(input *DescribeSpotDatafeedSubscriptionInput) (req *request.Request, output *DescribeSpotDatafeedSubscriptionOutput) {
op := &request.Operation{
Name: opDescribeSpotDatafeedSubscription,
@@ -11599,7 +12736,7 @@ func (c *EC2) DescribeSpotDatafeedSubscriptionRequest(input *DescribeSpotDatafee
// DescribeSpotDatafeedSubscription API operation for Amazon Elastic Compute Cloud.
//
-// Describes the data feed for Spot instances. For more information, see Spot
+// Describes the data feed for Spot Instances. For more information, see Spot
// Instance Data Feed (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html)
// in the Amazon Elastic Compute Cloud User Guide.
//
@@ -11609,7 +12746,7 @@ func (c *EC2) DescribeSpotDatafeedSubscriptionRequest(input *DescribeSpotDatafee
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeSpotDatafeedSubscription for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotDatafeedSubscription
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotDatafeedSubscription
func (c *EC2) DescribeSpotDatafeedSubscription(input *DescribeSpotDatafeedSubscriptionInput) (*DescribeSpotDatafeedSubscriptionOutput, error) {
req, out := c.DescribeSpotDatafeedSubscriptionRequest(input)
return out, req.Send()
@@ -11635,19 +12772,18 @@ const opDescribeSpotFleetInstances = "DescribeSpotFleetInstances"
// DescribeSpotFleetInstancesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSpotFleetInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSpotFleetInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSpotFleetInstances method directly
-// instead.
+// See DescribeSpotFleetInstances for more information on using the DescribeSpotFleetInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSpotFleetInstancesRequest method.
// req, resp := client.DescribeSpotFleetInstancesRequest(params)
@@ -11657,7 +12793,7 @@ const opDescribeSpotFleetInstances = "DescribeSpotFleetInstances"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetInstances
func (c *EC2) DescribeSpotFleetInstancesRequest(input *DescribeSpotFleetInstancesInput) (req *request.Request, output *DescribeSpotFleetInstancesOutput) {
op := &request.Operation{
Name: opDescribeSpotFleetInstances,
@@ -11676,7 +12812,7 @@ func (c *EC2) DescribeSpotFleetInstancesRequest(input *DescribeSpotFleetInstance
// DescribeSpotFleetInstances API operation for Amazon Elastic Compute Cloud.
//
-// Describes the running instances for the specified Spot fleet.
+// Describes the running instances for the specified Spot Fleet.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -11684,7 +12820,7 @@ func (c *EC2) DescribeSpotFleetInstancesRequest(input *DescribeSpotFleetInstance
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeSpotFleetInstances for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetInstances
func (c *EC2) DescribeSpotFleetInstances(input *DescribeSpotFleetInstancesInput) (*DescribeSpotFleetInstancesOutput, error) {
req, out := c.DescribeSpotFleetInstancesRequest(input)
return out, req.Send()
@@ -11710,19 +12846,18 @@ const opDescribeSpotFleetRequestHistory = "DescribeSpotFleetRequestHistory"
// DescribeSpotFleetRequestHistoryRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSpotFleetRequestHistory operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSpotFleetRequestHistory for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSpotFleetRequestHistory method directly
-// instead.
+// See DescribeSpotFleetRequestHistory for more information on using the DescribeSpotFleetRequestHistory
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSpotFleetRequestHistoryRequest method.
// req, resp := client.DescribeSpotFleetRequestHistoryRequest(params)
@@ -11732,7 +12867,7 @@ const opDescribeSpotFleetRequestHistory = "DescribeSpotFleetRequestHistory"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequestHistory
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequestHistory
func (c *EC2) DescribeSpotFleetRequestHistoryRequest(input *DescribeSpotFleetRequestHistoryInput) (req *request.Request, output *DescribeSpotFleetRequestHistoryOutput) {
op := &request.Operation{
Name: opDescribeSpotFleetRequestHistory,
@@ -11751,10 +12886,10 @@ func (c *EC2) DescribeSpotFleetRequestHistoryRequest(input *DescribeSpotFleetReq
// DescribeSpotFleetRequestHistory API operation for Amazon Elastic Compute Cloud.
//
-// Describes the events for the specified Spot fleet request during the specified
+// Describes the events for the specified Spot Fleet request during the specified
// time.
//
-// Spot fleet events are delayed by up to 30 seconds before they can be described.
+// Spot Fleet events are delayed by up to 30 seconds before they can be described.
// This ensures that you can query by the last evaluated time and not miss a
// recorded event.
//
@@ -11764,7 +12899,7 @@ func (c *EC2) DescribeSpotFleetRequestHistoryRequest(input *DescribeSpotFleetReq
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeSpotFleetRequestHistory for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequestHistory
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequestHistory
func (c *EC2) DescribeSpotFleetRequestHistory(input *DescribeSpotFleetRequestHistoryInput) (*DescribeSpotFleetRequestHistoryOutput, error) {
req, out := c.DescribeSpotFleetRequestHistoryRequest(input)
return out, req.Send()
@@ -11790,19 +12925,18 @@ const opDescribeSpotFleetRequests = "DescribeSpotFleetRequests"
// DescribeSpotFleetRequestsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSpotFleetRequests operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSpotFleetRequests for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSpotFleetRequests method directly
-// instead.
+// See DescribeSpotFleetRequests for more information on using the DescribeSpotFleetRequests
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSpotFleetRequestsRequest method.
// req, resp := client.DescribeSpotFleetRequestsRequest(params)
@@ -11812,7 +12946,7 @@ const opDescribeSpotFleetRequests = "DescribeSpotFleetRequests"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequests
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequests
func (c *EC2) DescribeSpotFleetRequestsRequest(input *DescribeSpotFleetRequestsInput) (req *request.Request, output *DescribeSpotFleetRequestsOutput) {
op := &request.Operation{
Name: opDescribeSpotFleetRequests,
@@ -11837,9 +12971,9 @@ func (c *EC2) DescribeSpotFleetRequestsRequest(input *DescribeSpotFleetRequestsI
// DescribeSpotFleetRequests API operation for Amazon Elastic Compute Cloud.
//
-// Describes your Spot fleet requests.
+// Describes your Spot Fleet requests.
//
-// Spot fleet requests are deleted 48 hours after they are canceled and their
+// Spot Fleet requests are deleted 48 hours after they are canceled and their
// instances are terminated.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -11848,7 +12982,7 @@ func (c *EC2) DescribeSpotFleetRequestsRequest(input *DescribeSpotFleetRequestsI
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeSpotFleetRequests for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequests
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequests
func (c *EC2) DescribeSpotFleetRequests(input *DescribeSpotFleetRequestsInput) (*DescribeSpotFleetRequestsOutput, error) {
req, out := c.DescribeSpotFleetRequestsRequest(input)
return out, req.Send()
@@ -11924,19 +13058,18 @@ const opDescribeSpotInstanceRequests = "DescribeSpotInstanceRequests"
// DescribeSpotInstanceRequestsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSpotInstanceRequests operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSpotInstanceRequests for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSpotInstanceRequests method directly
-// instead.
+// See DescribeSpotInstanceRequests for more information on using the DescribeSpotInstanceRequests
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSpotInstanceRequestsRequest method.
// req, resp := client.DescribeSpotInstanceRequestsRequest(params)
@@ -11946,7 +13079,7 @@ const opDescribeSpotInstanceRequests = "DescribeSpotInstanceRequests"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotInstanceRequests
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotInstanceRequests
func (c *EC2) DescribeSpotInstanceRequestsRequest(input *DescribeSpotInstanceRequestsInput) (req *request.Request, output *DescribeSpotInstanceRequestsOutput) {
op := &request.Operation{
Name: opDescribeSpotInstanceRequests,
@@ -11965,20 +13098,19 @@ func (c *EC2) DescribeSpotInstanceRequestsRequest(input *DescribeSpotInstanceReq
// DescribeSpotInstanceRequests API operation for Amazon Elastic Compute Cloud.
//
-// Describes the Spot instance requests that belong to your account. Spot instances
-// are instances that Amazon EC2 launches when the bid price that you specify
-// exceeds the current Spot price. Amazon EC2 periodically sets the Spot price
-// based on available Spot instance capacity and current Spot instance requests.
-// For more information, see Spot Instance Requests (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html)
-// in the Amazon Elastic Compute Cloud User Guide.
+// Describes the Spot Instance requests that belong to your account. Spot Instances
+// are instances that Amazon EC2 launches when the Spot price that you specify
+// exceeds the current Spot price. For more information, see Spot Instance Requests
+// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html) in
+// the Amazon Elastic Compute Cloud User Guide.
//
-// You can use DescribeSpotInstanceRequests to find a running Spot instance
-// by examining the response. If the status of the Spot instance is fulfilled,
+// You can use DescribeSpotInstanceRequests to find a running Spot Instance
+// by examining the response. If the status of the Spot Instance is fulfilled,
// the instance ID appears in the response and contains the identifier of the
// instance. Alternatively, you can use DescribeInstances with a filter to look
// for instances where the instance lifecycle is spot.
//
-// Spot instance requests are deleted 4 hours after they are canceled and their
+// Spot Instance requests are deleted 4 hours after they are canceled and their
// instances are terminated.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -11987,7 +13119,7 @@ func (c *EC2) DescribeSpotInstanceRequestsRequest(input *DescribeSpotInstanceReq
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeSpotInstanceRequests for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotInstanceRequests
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotInstanceRequests
func (c *EC2) DescribeSpotInstanceRequests(input *DescribeSpotInstanceRequestsInput) (*DescribeSpotInstanceRequestsOutput, error) {
req, out := c.DescribeSpotInstanceRequestsRequest(input)
return out, req.Send()
@@ -12013,19 +13145,18 @@ const opDescribeSpotPriceHistory = "DescribeSpotPriceHistory"
// DescribeSpotPriceHistoryRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSpotPriceHistory operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSpotPriceHistory for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSpotPriceHistory method directly
-// instead.
+// See DescribeSpotPriceHistory for more information on using the DescribeSpotPriceHistory
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSpotPriceHistoryRequest method.
// req, resp := client.DescribeSpotPriceHistoryRequest(params)
@@ -12035,7 +13166,7 @@ const opDescribeSpotPriceHistory = "DescribeSpotPriceHistory"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotPriceHistory
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotPriceHistory
func (c *EC2) DescribeSpotPriceHistoryRequest(input *DescribeSpotPriceHistoryInput) (req *request.Request, output *DescribeSpotPriceHistoryOutput) {
op := &request.Operation{
Name: opDescribeSpotPriceHistory,
@@ -12075,7 +13206,7 @@ func (c *EC2) DescribeSpotPriceHistoryRequest(input *DescribeSpotPriceHistoryInp
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeSpotPriceHistory for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotPriceHistory
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotPriceHistory
func (c *EC2) DescribeSpotPriceHistory(input *DescribeSpotPriceHistoryInput) (*DescribeSpotPriceHistoryOutput, error) {
req, out := c.DescribeSpotPriceHistoryRequest(input)
return out, req.Send()
@@ -12151,19 +13282,18 @@ const opDescribeStaleSecurityGroups = "DescribeStaleSecurityGroups"
// DescribeStaleSecurityGroupsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeStaleSecurityGroups operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeStaleSecurityGroups for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeStaleSecurityGroups method directly
-// instead.
+// See DescribeStaleSecurityGroups for more information on using the DescribeStaleSecurityGroups
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeStaleSecurityGroupsRequest method.
// req, resp := client.DescribeStaleSecurityGroupsRequest(params)
@@ -12173,7 +13303,7 @@ const opDescribeStaleSecurityGroups = "DescribeStaleSecurityGroups"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeStaleSecurityGroups
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeStaleSecurityGroups
func (c *EC2) DescribeStaleSecurityGroupsRequest(input *DescribeStaleSecurityGroupsInput) (req *request.Request, output *DescribeStaleSecurityGroupsOutput) {
op := &request.Operation{
Name: opDescribeStaleSecurityGroups,
@@ -12203,7 +13333,7 @@ func (c *EC2) DescribeStaleSecurityGroupsRequest(input *DescribeStaleSecurityGro
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeStaleSecurityGroups for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeStaleSecurityGroups
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeStaleSecurityGroups
func (c *EC2) DescribeStaleSecurityGroups(input *DescribeStaleSecurityGroupsInput) (*DescribeStaleSecurityGroupsOutput, error) {
req, out := c.DescribeStaleSecurityGroupsRequest(input)
return out, req.Send()
@@ -12229,19 +13359,18 @@ const opDescribeSubnets = "DescribeSubnets"
// DescribeSubnetsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSubnets operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeSubnets for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeSubnets method directly
-// instead.
+// See DescribeSubnets for more information on using the DescribeSubnets
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeSubnetsRequest method.
// req, resp := client.DescribeSubnetsRequest(params)
@@ -12251,7 +13380,7 @@ const opDescribeSubnets = "DescribeSubnets"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSubnets
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSubnets
func (c *EC2) DescribeSubnetsRequest(input *DescribeSubnetsInput) (req *request.Request, output *DescribeSubnetsOutput) {
op := &request.Operation{
Name: opDescribeSubnets,
@@ -12281,7 +13410,7 @@ func (c *EC2) DescribeSubnetsRequest(input *DescribeSubnetsInput) (req *request.
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeSubnets for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSubnets
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSubnets
func (c *EC2) DescribeSubnets(input *DescribeSubnetsInput) (*DescribeSubnetsOutput, error) {
req, out := c.DescribeSubnetsRequest(input)
return out, req.Send()
@@ -12307,19 +13436,18 @@ const opDescribeTags = "DescribeTags"
// DescribeTagsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeTags operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeTags for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeTags method directly
-// instead.
+// See DescribeTags for more information on using the DescribeTags
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeTagsRequest method.
// req, resp := client.DescribeTagsRequest(params)
@@ -12329,7 +13457,7 @@ const opDescribeTags = "DescribeTags"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTags
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTags
func (c *EC2) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) {
op := &request.Operation{
Name: opDescribeTags,
@@ -12365,7 +13493,7 @@ func (c *EC2) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeTags for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTags
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTags
func (c *EC2) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) {
req, out := c.DescribeTagsRequest(input)
return out, req.Send()
@@ -12441,19 +13569,18 @@ const opDescribeVolumeAttribute = "DescribeVolumeAttribute"
// DescribeVolumeAttributeRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVolumeAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVolumeAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVolumeAttribute method directly
-// instead.
+// See DescribeVolumeAttribute for more information on using the DescribeVolumeAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVolumeAttributeRequest method.
// req, resp := client.DescribeVolumeAttributeRequest(params)
@@ -12463,7 +13590,7 @@ const opDescribeVolumeAttribute = "DescribeVolumeAttribute"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeAttribute
func (c *EC2) DescribeVolumeAttributeRequest(input *DescribeVolumeAttributeInput) (req *request.Request, output *DescribeVolumeAttributeOutput) {
op := &request.Operation{
Name: opDescribeVolumeAttribute,
@@ -12494,7 +13621,7 @@ func (c *EC2) DescribeVolumeAttributeRequest(input *DescribeVolumeAttributeInput
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeVolumeAttribute for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeAttribute
func (c *EC2) DescribeVolumeAttribute(input *DescribeVolumeAttributeInput) (*DescribeVolumeAttributeOutput, error) {
req, out := c.DescribeVolumeAttributeRequest(input)
return out, req.Send()
@@ -12520,19 +13647,18 @@ const opDescribeVolumeStatus = "DescribeVolumeStatus"
// DescribeVolumeStatusRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVolumeStatus operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVolumeStatus for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVolumeStatus method directly
-// instead.
+// See DescribeVolumeStatus for more information on using the DescribeVolumeStatus
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVolumeStatusRequest method.
// req, resp := client.DescribeVolumeStatusRequest(params)
@@ -12542,7 +13668,7 @@ const opDescribeVolumeStatus = "DescribeVolumeStatus"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeStatus
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeStatus
func (c *EC2) DescribeVolumeStatusRequest(input *DescribeVolumeStatusInput) (req *request.Request, output *DescribeVolumeStatusOutput) {
op := &request.Operation{
Name: opDescribeVolumeStatus,
@@ -12609,7 +13735,7 @@ func (c *EC2) DescribeVolumeStatusRequest(input *DescribeVolumeStatusInput) (req
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeVolumeStatus for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeStatus
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeStatus
func (c *EC2) DescribeVolumeStatus(input *DescribeVolumeStatusInput) (*DescribeVolumeStatusOutput, error) {
req, out := c.DescribeVolumeStatusRequest(input)
return out, req.Send()
@@ -12685,19 +13811,18 @@ const opDescribeVolumes = "DescribeVolumes"
// DescribeVolumesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVolumes operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVolumes for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVolumes method directly
-// instead.
+// See DescribeVolumes for more information on using the DescribeVolumes
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVolumesRequest method.
// req, resp := client.DescribeVolumesRequest(params)
@@ -12707,7 +13832,7 @@ const opDescribeVolumes = "DescribeVolumes"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumes
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumes
func (c *EC2) DescribeVolumesRequest(input *DescribeVolumesInput) (req *request.Request, output *DescribeVolumesOutput) {
op := &request.Operation{
Name: opDescribeVolumes,
@@ -12750,7 +13875,7 @@ func (c *EC2) DescribeVolumesRequest(input *DescribeVolumesInput) (req *request.
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeVolumes for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumes
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumes
func (c *EC2) DescribeVolumes(input *DescribeVolumesInput) (*DescribeVolumesOutput, error) {
req, out := c.DescribeVolumesRequest(input)
return out, req.Send()
@@ -12826,19 +13951,18 @@ const opDescribeVolumesModifications = "DescribeVolumesModifications"
// DescribeVolumesModificationsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVolumesModifications operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVolumesModifications for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVolumesModifications method directly
-// instead.
+// See DescribeVolumesModifications for more information on using the DescribeVolumesModifications
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVolumesModificationsRequest method.
// req, resp := client.DescribeVolumesModificationsRequest(params)
@@ -12848,7 +13972,7 @@ const opDescribeVolumesModifications = "DescribeVolumesModifications"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumesModifications
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumesModifications
func (c *EC2) DescribeVolumesModificationsRequest(input *DescribeVolumesModificationsInput) (req *request.Request, output *DescribeVolumesModificationsOutput) {
op := &request.Operation{
Name: opDescribeVolumesModifications,
@@ -12887,7 +14011,7 @@ func (c *EC2) DescribeVolumesModificationsRequest(input *DescribeVolumesModifica
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeVolumesModifications for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumesModifications
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumesModifications
func (c *EC2) DescribeVolumesModifications(input *DescribeVolumesModificationsInput) (*DescribeVolumesModificationsOutput, error) {
req, out := c.DescribeVolumesModificationsRequest(input)
return out, req.Send()
@@ -12913,19 +14037,18 @@ const opDescribeVpcAttribute = "DescribeVpcAttribute"
// DescribeVpcAttributeRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpcAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpcAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpcAttribute method directly
-// instead.
+// See DescribeVpcAttribute for more information on using the DescribeVpcAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpcAttributeRequest method.
// req, resp := client.DescribeVpcAttributeRequest(params)
@@ -12935,7 +14058,7 @@ const opDescribeVpcAttribute = "DescribeVpcAttribute"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcAttribute
func (c *EC2) DescribeVpcAttributeRequest(input *DescribeVpcAttributeInput) (req *request.Request, output *DescribeVpcAttributeOutput) {
op := &request.Operation{
Name: opDescribeVpcAttribute,
@@ -12963,7 +14086,7 @@ func (c *EC2) DescribeVpcAttributeRequest(input *DescribeVpcAttributeInput) (req
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeVpcAttribute for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcAttribute
func (c *EC2) DescribeVpcAttribute(input *DescribeVpcAttributeInput) (*DescribeVpcAttributeOutput, error) {
req, out := c.DescribeVpcAttributeRequest(input)
return out, req.Send()
@@ -12989,19 +14112,18 @@ const opDescribeVpcClassicLink = "DescribeVpcClassicLink"
// DescribeVpcClassicLinkRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpcClassicLink operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpcClassicLink for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpcClassicLink method directly
-// instead.
+// See DescribeVpcClassicLink for more information on using the DescribeVpcClassicLink
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpcClassicLinkRequest method.
// req, resp := client.DescribeVpcClassicLinkRequest(params)
@@ -13011,7 +14133,7 @@ const opDescribeVpcClassicLink = "DescribeVpcClassicLink"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLink
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLink
func (c *EC2) DescribeVpcClassicLinkRequest(input *DescribeVpcClassicLinkInput) (req *request.Request, output *DescribeVpcClassicLinkOutput) {
op := &request.Operation{
Name: opDescribeVpcClassicLink,
@@ -13038,7 +14160,7 @@ func (c *EC2) DescribeVpcClassicLinkRequest(input *DescribeVpcClassicLinkInput)
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeVpcClassicLink for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLink
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLink
func (c *EC2) DescribeVpcClassicLink(input *DescribeVpcClassicLinkInput) (*DescribeVpcClassicLinkOutput, error) {
req, out := c.DescribeVpcClassicLinkRequest(input)
return out, req.Send()
@@ -13064,19 +14186,18 @@ const opDescribeVpcClassicLinkDnsSupport = "DescribeVpcClassicLinkDnsSupport"
// DescribeVpcClassicLinkDnsSupportRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpcClassicLinkDnsSupport operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpcClassicLinkDnsSupport for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpcClassicLinkDnsSupport method directly
-// instead.
+// See DescribeVpcClassicLinkDnsSupport for more information on using the DescribeVpcClassicLinkDnsSupport
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpcClassicLinkDnsSupportRequest method.
// req, resp := client.DescribeVpcClassicLinkDnsSupportRequest(params)
@@ -13086,7 +14207,7 @@ const opDescribeVpcClassicLinkDnsSupport = "DescribeVpcClassicLinkDnsSupport"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLinkDnsSupport
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLinkDnsSupport
func (c *EC2) DescribeVpcClassicLinkDnsSupportRequest(input *DescribeVpcClassicLinkDnsSupportInput) (req *request.Request, output *DescribeVpcClassicLinkDnsSupportOutput) {
op := &request.Operation{
Name: opDescribeVpcClassicLinkDnsSupport,
@@ -13119,7 +14240,7 @@ func (c *EC2) DescribeVpcClassicLinkDnsSupportRequest(input *DescribeVpcClassicL
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeVpcClassicLinkDnsSupport for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLinkDnsSupport
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLinkDnsSupport
func (c *EC2) DescribeVpcClassicLinkDnsSupport(input *DescribeVpcClassicLinkDnsSupportInput) (*DescribeVpcClassicLinkDnsSupportOutput, error) {
req, out := c.DescribeVpcClassicLinkDnsSupportRequest(input)
return out, req.Send()
@@ -13141,23 +14262,321 @@ func (c *EC2) DescribeVpcClassicLinkDnsSupportWithContext(ctx aws.Context, input
return out, req.Send()
}
+const opDescribeVpcEndpointConnectionNotifications = "DescribeVpcEndpointConnectionNotifications"
+
+// DescribeVpcEndpointConnectionNotificationsRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeVpcEndpointConnectionNotifications operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DescribeVpcEndpointConnectionNotifications for more information on using the DescribeVpcEndpointConnectionNotifications
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DescribeVpcEndpointConnectionNotificationsRequest method.
+// req, resp := client.DescribeVpcEndpointConnectionNotificationsRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointConnectionNotifications
+func (c *EC2) DescribeVpcEndpointConnectionNotificationsRequest(input *DescribeVpcEndpointConnectionNotificationsInput) (req *request.Request, output *DescribeVpcEndpointConnectionNotificationsOutput) {
+ op := &request.Operation{
+ Name: opDescribeVpcEndpointConnectionNotifications,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeVpcEndpointConnectionNotificationsInput{}
+ }
+
+ output = &DescribeVpcEndpointConnectionNotificationsOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeVpcEndpointConnectionNotifications API operation for Amazon Elastic Compute Cloud.
+//
+// Describes the connection notifications for VPC endpoints and VPC endpoint
+// services.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation DescribeVpcEndpointConnectionNotifications for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointConnectionNotifications
+func (c *EC2) DescribeVpcEndpointConnectionNotifications(input *DescribeVpcEndpointConnectionNotificationsInput) (*DescribeVpcEndpointConnectionNotificationsOutput, error) {
+ req, out := c.DescribeVpcEndpointConnectionNotificationsRequest(input)
+ return out, req.Send()
+}
+
+// DescribeVpcEndpointConnectionNotificationsWithContext is the same as DescribeVpcEndpointConnectionNotifications with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVpcEndpointConnectionNotifications for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVpcEndpointConnectionNotificationsWithContext(ctx aws.Context, input *DescribeVpcEndpointConnectionNotificationsInput, opts ...request.Option) (*DescribeVpcEndpointConnectionNotificationsOutput, error) {
+ req, out := c.DescribeVpcEndpointConnectionNotificationsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opDescribeVpcEndpointConnections = "DescribeVpcEndpointConnections"
+
+// DescribeVpcEndpointConnectionsRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeVpcEndpointConnections operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DescribeVpcEndpointConnections for more information on using the DescribeVpcEndpointConnections
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DescribeVpcEndpointConnectionsRequest method.
+// req, resp := client.DescribeVpcEndpointConnectionsRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointConnections
+func (c *EC2) DescribeVpcEndpointConnectionsRequest(input *DescribeVpcEndpointConnectionsInput) (req *request.Request, output *DescribeVpcEndpointConnectionsOutput) {
+ op := &request.Operation{
+ Name: opDescribeVpcEndpointConnections,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeVpcEndpointConnectionsInput{}
+ }
+
+ output = &DescribeVpcEndpointConnectionsOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeVpcEndpointConnections API operation for Amazon Elastic Compute Cloud.
+//
+// Describes the VPC endpoint connections to your VPC endpoint services, including
+// any endpoints that are pending your acceptance.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation DescribeVpcEndpointConnections for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointConnections
+func (c *EC2) DescribeVpcEndpointConnections(input *DescribeVpcEndpointConnectionsInput) (*DescribeVpcEndpointConnectionsOutput, error) {
+ req, out := c.DescribeVpcEndpointConnectionsRequest(input)
+ return out, req.Send()
+}
+
+// DescribeVpcEndpointConnectionsWithContext is the same as DescribeVpcEndpointConnections with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVpcEndpointConnections for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVpcEndpointConnectionsWithContext(ctx aws.Context, input *DescribeVpcEndpointConnectionsInput, opts ...request.Option) (*DescribeVpcEndpointConnectionsOutput, error) {
+ req, out := c.DescribeVpcEndpointConnectionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opDescribeVpcEndpointServiceConfigurations = "DescribeVpcEndpointServiceConfigurations"
+
+// DescribeVpcEndpointServiceConfigurationsRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeVpcEndpointServiceConfigurations operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DescribeVpcEndpointServiceConfigurations for more information on using the DescribeVpcEndpointServiceConfigurations
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DescribeVpcEndpointServiceConfigurationsRequest method.
+// req, resp := client.DescribeVpcEndpointServiceConfigurationsRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServiceConfigurations
+func (c *EC2) DescribeVpcEndpointServiceConfigurationsRequest(input *DescribeVpcEndpointServiceConfigurationsInput) (req *request.Request, output *DescribeVpcEndpointServiceConfigurationsOutput) {
+ op := &request.Operation{
+ Name: opDescribeVpcEndpointServiceConfigurations,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeVpcEndpointServiceConfigurationsInput{}
+ }
+
+ output = &DescribeVpcEndpointServiceConfigurationsOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeVpcEndpointServiceConfigurations API operation for Amazon Elastic Compute Cloud.
+//
+// Describes the VPC endpoint service configurations in your account (your services).
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation DescribeVpcEndpointServiceConfigurations for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServiceConfigurations
+func (c *EC2) DescribeVpcEndpointServiceConfigurations(input *DescribeVpcEndpointServiceConfigurationsInput) (*DescribeVpcEndpointServiceConfigurationsOutput, error) {
+ req, out := c.DescribeVpcEndpointServiceConfigurationsRequest(input)
+ return out, req.Send()
+}
+
+// DescribeVpcEndpointServiceConfigurationsWithContext is the same as DescribeVpcEndpointServiceConfigurations with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVpcEndpointServiceConfigurations for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVpcEndpointServiceConfigurationsWithContext(ctx aws.Context, input *DescribeVpcEndpointServiceConfigurationsInput, opts ...request.Option) (*DescribeVpcEndpointServiceConfigurationsOutput, error) {
+ req, out := c.DescribeVpcEndpointServiceConfigurationsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opDescribeVpcEndpointServicePermissions = "DescribeVpcEndpointServicePermissions"
+
+// DescribeVpcEndpointServicePermissionsRequest generates a "aws/request.Request" representing the
+// client's request for the DescribeVpcEndpointServicePermissions operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DescribeVpcEndpointServicePermissions for more information on using the DescribeVpcEndpointServicePermissions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DescribeVpcEndpointServicePermissionsRequest method.
+// req, resp := client.DescribeVpcEndpointServicePermissionsRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServicePermissions
+func (c *EC2) DescribeVpcEndpointServicePermissionsRequest(input *DescribeVpcEndpointServicePermissionsInput) (req *request.Request, output *DescribeVpcEndpointServicePermissionsOutput) {
+ op := &request.Operation{
+ Name: opDescribeVpcEndpointServicePermissions,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeVpcEndpointServicePermissionsInput{}
+ }
+
+ output = &DescribeVpcEndpointServicePermissionsOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// DescribeVpcEndpointServicePermissions API operation for Amazon Elastic Compute Cloud.
+//
+// Describes the principals (service consumers) that are permitted to discover
+// your VPC endpoint service.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation DescribeVpcEndpointServicePermissions for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServicePermissions
+func (c *EC2) DescribeVpcEndpointServicePermissions(input *DescribeVpcEndpointServicePermissionsInput) (*DescribeVpcEndpointServicePermissionsOutput, error) {
+ req, out := c.DescribeVpcEndpointServicePermissionsRequest(input)
+ return out, req.Send()
+}
+
+// DescribeVpcEndpointServicePermissionsWithContext is the same as DescribeVpcEndpointServicePermissions with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DescribeVpcEndpointServicePermissions for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) DescribeVpcEndpointServicePermissionsWithContext(ctx aws.Context, input *DescribeVpcEndpointServicePermissionsInput, opts ...request.Option) (*DescribeVpcEndpointServicePermissionsOutput, error) {
+ req, out := c.DescribeVpcEndpointServicePermissionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opDescribeVpcEndpointServices = "DescribeVpcEndpointServices"
// DescribeVpcEndpointServicesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpcEndpointServices operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpcEndpointServices for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpcEndpointServices method directly
-// instead.
+// See DescribeVpcEndpointServices for more information on using the DescribeVpcEndpointServices
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpcEndpointServicesRequest method.
// req, resp := client.DescribeVpcEndpointServicesRequest(params)
@@ -13167,7 +14586,7 @@ const opDescribeVpcEndpointServices = "DescribeVpcEndpointServices"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServices
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServices
func (c *EC2) DescribeVpcEndpointServicesRequest(input *DescribeVpcEndpointServicesInput) (req *request.Request, output *DescribeVpcEndpointServicesOutput) {
op := &request.Operation{
Name: opDescribeVpcEndpointServices,
@@ -13186,8 +14605,7 @@ func (c *EC2) DescribeVpcEndpointServicesRequest(input *DescribeVpcEndpointServi
// DescribeVpcEndpointServices API operation for Amazon Elastic Compute Cloud.
//
-// Describes all supported AWS services that can be specified when creating
-// a VPC endpoint.
+// Describes available services to which you can create a VPC endpoint.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -13195,7 +14613,7 @@ func (c *EC2) DescribeVpcEndpointServicesRequest(input *DescribeVpcEndpointServi
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeVpcEndpointServices for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServices
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServices
func (c *EC2) DescribeVpcEndpointServices(input *DescribeVpcEndpointServicesInput) (*DescribeVpcEndpointServicesOutput, error) {
req, out := c.DescribeVpcEndpointServicesRequest(input)
return out, req.Send()
@@ -13221,19 +14639,18 @@ const opDescribeVpcEndpoints = "DescribeVpcEndpoints"
// DescribeVpcEndpointsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpcEndpoints operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpcEndpoints for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpcEndpoints method directly
-// instead.
+// See DescribeVpcEndpoints for more information on using the DescribeVpcEndpoints
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpcEndpointsRequest method.
// req, resp := client.DescribeVpcEndpointsRequest(params)
@@ -13243,7 +14660,7 @@ const opDescribeVpcEndpoints = "DescribeVpcEndpoints"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpoints
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpoints
func (c *EC2) DescribeVpcEndpointsRequest(input *DescribeVpcEndpointsInput) (req *request.Request, output *DescribeVpcEndpointsOutput) {
op := &request.Operation{
Name: opDescribeVpcEndpoints,
@@ -13270,7 +14687,7 @@ func (c *EC2) DescribeVpcEndpointsRequest(input *DescribeVpcEndpointsInput) (req
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeVpcEndpoints for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpoints
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpoints
func (c *EC2) DescribeVpcEndpoints(input *DescribeVpcEndpointsInput) (*DescribeVpcEndpointsOutput, error) {
req, out := c.DescribeVpcEndpointsRequest(input)
return out, req.Send()
@@ -13296,19 +14713,18 @@ const opDescribeVpcPeeringConnections = "DescribeVpcPeeringConnections"
// DescribeVpcPeeringConnectionsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpcPeeringConnections operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpcPeeringConnections for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpcPeeringConnections method directly
-// instead.
+// See DescribeVpcPeeringConnections for more information on using the DescribeVpcPeeringConnections
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpcPeeringConnectionsRequest method.
// req, resp := client.DescribeVpcPeeringConnectionsRequest(params)
@@ -13318,7 +14734,7 @@ const opDescribeVpcPeeringConnections = "DescribeVpcPeeringConnections"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnections
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnections
func (c *EC2) DescribeVpcPeeringConnectionsRequest(input *DescribeVpcPeeringConnectionsInput) (req *request.Request, output *DescribeVpcPeeringConnectionsOutput) {
op := &request.Operation{
Name: opDescribeVpcPeeringConnections,
@@ -13345,7 +14761,7 @@ func (c *EC2) DescribeVpcPeeringConnectionsRequest(input *DescribeVpcPeeringConn
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeVpcPeeringConnections for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnections
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnections
func (c *EC2) DescribeVpcPeeringConnections(input *DescribeVpcPeeringConnectionsInput) (*DescribeVpcPeeringConnectionsOutput, error) {
req, out := c.DescribeVpcPeeringConnectionsRequest(input)
return out, req.Send()
@@ -13371,19 +14787,18 @@ const opDescribeVpcs = "DescribeVpcs"
// DescribeVpcsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpcs operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpcs for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpcs method directly
-// instead.
+// See DescribeVpcs for more information on using the DescribeVpcs
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpcsRequest method.
// req, resp := client.DescribeVpcsRequest(params)
@@ -13393,7 +14808,7 @@ const opDescribeVpcs = "DescribeVpcs"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcs
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcs
func (c *EC2) DescribeVpcsRequest(input *DescribeVpcsInput) (req *request.Request, output *DescribeVpcsOutput) {
op := &request.Operation{
Name: opDescribeVpcs,
@@ -13420,7 +14835,7 @@ func (c *EC2) DescribeVpcsRequest(input *DescribeVpcsInput) (req *request.Reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeVpcs for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcs
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcs
func (c *EC2) DescribeVpcs(input *DescribeVpcsInput) (*DescribeVpcsOutput, error) {
req, out := c.DescribeVpcsRequest(input)
return out, req.Send()
@@ -13446,19 +14861,18 @@ const opDescribeVpnConnections = "DescribeVpnConnections"
// DescribeVpnConnectionsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpnConnections operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpnConnections for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpnConnections method directly
-// instead.
+// See DescribeVpnConnections for more information on using the DescribeVpnConnections
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpnConnectionsRequest method.
// req, resp := client.DescribeVpnConnectionsRequest(params)
@@ -13468,7 +14882,7 @@ const opDescribeVpnConnections = "DescribeVpnConnections"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnConnections
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnConnections
func (c *EC2) DescribeVpnConnectionsRequest(input *DescribeVpnConnectionsInput) (req *request.Request, output *DescribeVpnConnectionsOutput) {
op := &request.Operation{
Name: opDescribeVpnConnections,
@@ -13489,9 +14903,9 @@ func (c *EC2) DescribeVpnConnectionsRequest(input *DescribeVpnConnectionsInput)
//
// Describes one or more of your VPN connections.
//
-// For more information about VPN connections, see Adding a Hardware Virtual
-// Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
-// in the Amazon Virtual Private Cloud User Guide.
+// For more information about VPN connections, see AWS Managed VPN Connections
+// (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html) in the
+// Amazon Virtual Private Cloud User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -13499,7 +14913,7 @@ func (c *EC2) DescribeVpnConnectionsRequest(input *DescribeVpnConnectionsInput)
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeVpnConnections for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnConnections
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnConnections
func (c *EC2) DescribeVpnConnections(input *DescribeVpnConnectionsInput) (*DescribeVpnConnectionsOutput, error) {
req, out := c.DescribeVpnConnectionsRequest(input)
return out, req.Send()
@@ -13525,19 +14939,18 @@ const opDescribeVpnGateways = "DescribeVpnGateways"
// DescribeVpnGatewaysRequest generates a "aws/request.Request" representing the
// client's request for the DescribeVpnGateways operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DescribeVpnGateways for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DescribeVpnGateways method directly
-// instead.
+// See DescribeVpnGateways for more information on using the DescribeVpnGateways
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DescribeVpnGatewaysRequest method.
// req, resp := client.DescribeVpnGatewaysRequest(params)
@@ -13547,7 +14960,7 @@ const opDescribeVpnGateways = "DescribeVpnGateways"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnGateways
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnGateways
func (c *EC2) DescribeVpnGatewaysRequest(input *DescribeVpnGatewaysInput) (req *request.Request, output *DescribeVpnGatewaysOutput) {
op := &request.Operation{
Name: opDescribeVpnGateways,
@@ -13568,8 +14981,8 @@ func (c *EC2) DescribeVpnGatewaysRequest(input *DescribeVpnGatewaysInput) (req *
//
// Describes one or more of your virtual private gateways.
//
-// For more information about virtual private gateways, see Adding an IPsec
-// Hardware VPN to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
+// For more information about virtual private gateways, see AWS Managed VPN
+// Connections (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
// in the Amazon Virtual Private Cloud User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -13578,7 +14991,7 @@ func (c *EC2) DescribeVpnGatewaysRequest(input *DescribeVpnGatewaysInput) (req *
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DescribeVpnGateways for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnGateways
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnGateways
func (c *EC2) DescribeVpnGateways(input *DescribeVpnGatewaysInput) (*DescribeVpnGatewaysOutput, error) {
req, out := c.DescribeVpnGatewaysRequest(input)
return out, req.Send()
@@ -13604,19 +15017,18 @@ const opDetachClassicLinkVpc = "DetachClassicLinkVpc"
// DetachClassicLinkVpcRequest generates a "aws/request.Request" representing the
// client's request for the DetachClassicLinkVpc operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DetachClassicLinkVpc for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DetachClassicLinkVpc method directly
-// instead.
+// See DetachClassicLinkVpc for more information on using the DetachClassicLinkVpc
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DetachClassicLinkVpcRequest method.
// req, resp := client.DetachClassicLinkVpcRequest(params)
@@ -13626,7 +15038,7 @@ const opDetachClassicLinkVpc = "DetachClassicLinkVpc"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachClassicLinkVpc
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachClassicLinkVpc
func (c *EC2) DetachClassicLinkVpcRequest(input *DetachClassicLinkVpcInput) (req *request.Request, output *DetachClassicLinkVpcOutput) {
op := &request.Operation{
Name: opDetachClassicLinkVpc,
@@ -13655,7 +15067,7 @@ func (c *EC2) DetachClassicLinkVpcRequest(input *DetachClassicLinkVpcInput) (req
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DetachClassicLinkVpc for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachClassicLinkVpc
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachClassicLinkVpc
func (c *EC2) DetachClassicLinkVpc(input *DetachClassicLinkVpcInput) (*DetachClassicLinkVpcOutput, error) {
req, out := c.DetachClassicLinkVpcRequest(input)
return out, req.Send()
@@ -13681,19 +15093,18 @@ const opDetachInternetGateway = "DetachInternetGateway"
// DetachInternetGatewayRequest generates a "aws/request.Request" representing the
// client's request for the DetachInternetGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DetachInternetGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DetachInternetGateway method directly
-// instead.
+// See DetachInternetGateway for more information on using the DetachInternetGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DetachInternetGatewayRequest method.
// req, resp := client.DetachInternetGatewayRequest(params)
@@ -13703,7 +15114,7 @@ const opDetachInternetGateway = "DetachInternetGateway"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachInternetGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachInternetGateway
func (c *EC2) DetachInternetGatewayRequest(input *DetachInternetGatewayInput) (req *request.Request, output *DetachInternetGatewayOutput) {
op := &request.Operation{
Name: opDetachInternetGateway,
@@ -13734,7 +15145,7 @@ func (c *EC2) DetachInternetGatewayRequest(input *DetachInternetGatewayInput) (r
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DetachInternetGateway for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachInternetGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachInternetGateway
func (c *EC2) DetachInternetGateway(input *DetachInternetGatewayInput) (*DetachInternetGatewayOutput, error) {
req, out := c.DetachInternetGatewayRequest(input)
return out, req.Send()
@@ -13760,19 +15171,18 @@ const opDetachNetworkInterface = "DetachNetworkInterface"
// DetachNetworkInterfaceRequest generates a "aws/request.Request" representing the
// client's request for the DetachNetworkInterface operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DetachNetworkInterface for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DetachNetworkInterface method directly
-// instead.
+// See DetachNetworkInterface for more information on using the DetachNetworkInterface
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DetachNetworkInterfaceRequest method.
// req, resp := client.DetachNetworkInterfaceRequest(params)
@@ -13782,7 +15192,7 @@ const opDetachNetworkInterface = "DetachNetworkInterface"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachNetworkInterface
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachNetworkInterface
func (c *EC2) DetachNetworkInterfaceRequest(input *DetachNetworkInterfaceInput) (req *request.Request, output *DetachNetworkInterfaceOutput) {
op := &request.Operation{
Name: opDetachNetworkInterface,
@@ -13811,7 +15221,7 @@ func (c *EC2) DetachNetworkInterfaceRequest(input *DetachNetworkInterfaceInput)
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DetachNetworkInterface for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachNetworkInterface
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachNetworkInterface
func (c *EC2) DetachNetworkInterface(input *DetachNetworkInterfaceInput) (*DetachNetworkInterfaceOutput, error) {
req, out := c.DetachNetworkInterfaceRequest(input)
return out, req.Send()
@@ -13837,19 +15247,18 @@ const opDetachVolume = "DetachVolume"
// DetachVolumeRequest generates a "aws/request.Request" representing the
// client's request for the DetachVolume operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DetachVolume for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DetachVolume method directly
-// instead.
+// See DetachVolume for more information on using the DetachVolume
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DetachVolumeRequest method.
// req, resp := client.DetachVolumeRequest(params)
@@ -13859,7 +15268,7 @@ const opDetachVolume = "DetachVolume"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVolume
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVolume
func (c *EC2) DetachVolumeRequest(input *DetachVolumeInput) (req *request.Request, output *VolumeAttachment) {
op := &request.Operation{
Name: opDetachVolume,
@@ -13899,7 +15308,7 @@ func (c *EC2) DetachVolumeRequest(input *DetachVolumeInput) (req *request.Reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DetachVolume for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVolume
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVolume
func (c *EC2) DetachVolume(input *DetachVolumeInput) (*VolumeAttachment, error) {
req, out := c.DetachVolumeRequest(input)
return out, req.Send()
@@ -13925,19 +15334,18 @@ const opDetachVpnGateway = "DetachVpnGateway"
// DetachVpnGatewayRequest generates a "aws/request.Request" representing the
// client's request for the DetachVpnGateway operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DetachVpnGateway for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DetachVpnGateway method directly
-// instead.
+// See DetachVpnGateway for more information on using the DetachVpnGateway
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DetachVpnGatewayRequest method.
// req, resp := client.DetachVpnGatewayRequest(params)
@@ -13947,7 +15355,7 @@ const opDetachVpnGateway = "DetachVpnGateway"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVpnGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVpnGateway
func (c *EC2) DetachVpnGatewayRequest(input *DetachVpnGatewayInput) (req *request.Request, output *DetachVpnGatewayOutput) {
op := &request.Operation{
Name: opDetachVpnGateway,
@@ -13983,7 +15391,7 @@ func (c *EC2) DetachVpnGatewayRequest(input *DetachVpnGatewayInput) (req *reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DetachVpnGateway for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVpnGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVpnGateway
func (c *EC2) DetachVpnGateway(input *DetachVpnGatewayInput) (*DetachVpnGatewayOutput, error) {
req, out := c.DetachVpnGatewayRequest(input)
return out, req.Send()
@@ -14009,19 +15417,18 @@ const opDisableVgwRoutePropagation = "DisableVgwRoutePropagation"
// DisableVgwRoutePropagationRequest generates a "aws/request.Request" representing the
// client's request for the DisableVgwRoutePropagation operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DisableVgwRoutePropagation for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DisableVgwRoutePropagation method directly
-// instead.
+// See DisableVgwRoutePropagation for more information on using the DisableVgwRoutePropagation
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DisableVgwRoutePropagationRequest method.
// req, resp := client.DisableVgwRoutePropagationRequest(params)
@@ -14031,7 +15438,7 @@ const opDisableVgwRoutePropagation = "DisableVgwRoutePropagation"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVgwRoutePropagation
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVgwRoutePropagation
func (c *EC2) DisableVgwRoutePropagationRequest(input *DisableVgwRoutePropagationInput) (req *request.Request, output *DisableVgwRoutePropagationOutput) {
op := &request.Operation{
Name: opDisableVgwRoutePropagation,
@@ -14061,7 +15468,7 @@ func (c *EC2) DisableVgwRoutePropagationRequest(input *DisableVgwRoutePropagatio
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DisableVgwRoutePropagation for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVgwRoutePropagation
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVgwRoutePropagation
func (c *EC2) DisableVgwRoutePropagation(input *DisableVgwRoutePropagationInput) (*DisableVgwRoutePropagationOutput, error) {
req, out := c.DisableVgwRoutePropagationRequest(input)
return out, req.Send()
@@ -14087,19 +15494,18 @@ const opDisableVpcClassicLink = "DisableVpcClassicLink"
// DisableVpcClassicLinkRequest generates a "aws/request.Request" representing the
// client's request for the DisableVpcClassicLink operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DisableVpcClassicLink for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DisableVpcClassicLink method directly
-// instead.
+// See DisableVpcClassicLink for more information on using the DisableVpcClassicLink
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DisableVpcClassicLinkRequest method.
// req, resp := client.DisableVpcClassicLinkRequest(params)
@@ -14109,7 +15515,7 @@ const opDisableVpcClassicLink = "DisableVpcClassicLink"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLink
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLink
func (c *EC2) DisableVpcClassicLinkRequest(input *DisableVpcClassicLinkInput) (req *request.Request, output *DisableVpcClassicLinkOutput) {
op := &request.Operation{
Name: opDisableVpcClassicLink,
@@ -14137,7 +15543,7 @@ func (c *EC2) DisableVpcClassicLinkRequest(input *DisableVpcClassicLinkInput) (r
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DisableVpcClassicLink for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLink
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLink
func (c *EC2) DisableVpcClassicLink(input *DisableVpcClassicLinkInput) (*DisableVpcClassicLinkOutput, error) {
req, out := c.DisableVpcClassicLinkRequest(input)
return out, req.Send()
@@ -14163,19 +15569,18 @@ const opDisableVpcClassicLinkDnsSupport = "DisableVpcClassicLinkDnsSupport"
// DisableVpcClassicLinkDnsSupportRequest generates a "aws/request.Request" representing the
// client's request for the DisableVpcClassicLinkDnsSupport operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DisableVpcClassicLinkDnsSupport for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DisableVpcClassicLinkDnsSupport method directly
-// instead.
+// See DisableVpcClassicLinkDnsSupport for more information on using the DisableVpcClassicLinkDnsSupport
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DisableVpcClassicLinkDnsSupportRequest method.
// req, resp := client.DisableVpcClassicLinkDnsSupportRequest(params)
@@ -14185,7 +15590,7 @@ const opDisableVpcClassicLinkDnsSupport = "DisableVpcClassicLinkDnsSupport"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLinkDnsSupport
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLinkDnsSupport
func (c *EC2) DisableVpcClassicLinkDnsSupportRequest(input *DisableVpcClassicLinkDnsSupportInput) (req *request.Request, output *DisableVpcClassicLinkDnsSupportOutput) {
op := &request.Operation{
Name: opDisableVpcClassicLinkDnsSupport,
@@ -14216,7 +15621,7 @@ func (c *EC2) DisableVpcClassicLinkDnsSupportRequest(input *DisableVpcClassicLin
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DisableVpcClassicLinkDnsSupport for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLinkDnsSupport
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLinkDnsSupport
func (c *EC2) DisableVpcClassicLinkDnsSupport(input *DisableVpcClassicLinkDnsSupportInput) (*DisableVpcClassicLinkDnsSupportOutput, error) {
req, out := c.DisableVpcClassicLinkDnsSupportRequest(input)
return out, req.Send()
@@ -14242,19 +15647,18 @@ const opDisassociateAddress = "DisassociateAddress"
// DisassociateAddressRequest generates a "aws/request.Request" representing the
// client's request for the DisassociateAddress operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DisassociateAddress for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DisassociateAddress method directly
-// instead.
+// See DisassociateAddress for more information on using the DisassociateAddress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DisassociateAddressRequest method.
// req, resp := client.DisassociateAddressRequest(params)
@@ -14264,7 +15668,7 @@ const opDisassociateAddress = "DisassociateAddress"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateAddress
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateAddress
func (c *EC2) DisassociateAddressRequest(input *DisassociateAddressInput) (req *request.Request, output *DisassociateAddressOutput) {
op := &request.Operation{
Name: opDisassociateAddress,
@@ -14301,7 +15705,7 @@ func (c *EC2) DisassociateAddressRequest(input *DisassociateAddressInput) (req *
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DisassociateAddress for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateAddress
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateAddress
func (c *EC2) DisassociateAddress(input *DisassociateAddressInput) (*DisassociateAddressOutput, error) {
req, out := c.DisassociateAddressRequest(input)
return out, req.Send()
@@ -14327,19 +15731,18 @@ const opDisassociateIamInstanceProfile = "DisassociateIamInstanceProfile"
// DisassociateIamInstanceProfileRequest generates a "aws/request.Request" representing the
// client's request for the DisassociateIamInstanceProfile operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DisassociateIamInstanceProfile for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DisassociateIamInstanceProfile method directly
-// instead.
+// See DisassociateIamInstanceProfile for more information on using the DisassociateIamInstanceProfile
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DisassociateIamInstanceProfileRequest method.
// req, resp := client.DisassociateIamInstanceProfileRequest(params)
@@ -14349,7 +15752,7 @@ const opDisassociateIamInstanceProfile = "DisassociateIamInstanceProfile"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateIamInstanceProfile
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateIamInstanceProfile
func (c *EC2) DisassociateIamInstanceProfileRequest(input *DisassociateIamInstanceProfileInput) (req *request.Request, output *DisassociateIamInstanceProfileOutput) {
op := &request.Operation{
Name: opDisassociateIamInstanceProfile,
@@ -14378,7 +15781,7 @@ func (c *EC2) DisassociateIamInstanceProfileRequest(input *DisassociateIamInstan
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DisassociateIamInstanceProfile for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateIamInstanceProfile
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateIamInstanceProfile
func (c *EC2) DisassociateIamInstanceProfile(input *DisassociateIamInstanceProfileInput) (*DisassociateIamInstanceProfileOutput, error) {
req, out := c.DisassociateIamInstanceProfileRequest(input)
return out, req.Send()
@@ -14404,19 +15807,18 @@ const opDisassociateRouteTable = "DisassociateRouteTable"
// DisassociateRouteTableRequest generates a "aws/request.Request" representing the
// client's request for the DisassociateRouteTable operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DisassociateRouteTable for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DisassociateRouteTable method directly
-// instead.
+// See DisassociateRouteTable for more information on using the DisassociateRouteTable
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DisassociateRouteTableRequest method.
// req, resp := client.DisassociateRouteTableRequest(params)
@@ -14426,7 +15828,7 @@ const opDisassociateRouteTable = "DisassociateRouteTable"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateRouteTable
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateRouteTable
func (c *EC2) DisassociateRouteTableRequest(input *DisassociateRouteTableInput) (req *request.Request, output *DisassociateRouteTableOutput) {
op := &request.Operation{
Name: opDisassociateRouteTable,
@@ -14460,7 +15862,7 @@ func (c *EC2) DisassociateRouteTableRequest(input *DisassociateRouteTableInput)
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DisassociateRouteTable for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateRouteTable
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateRouteTable
func (c *EC2) DisassociateRouteTable(input *DisassociateRouteTableInput) (*DisassociateRouteTableOutput, error) {
req, out := c.DisassociateRouteTableRequest(input)
return out, req.Send()
@@ -14486,19 +15888,18 @@ const opDisassociateSubnetCidrBlock = "DisassociateSubnetCidrBlock"
// DisassociateSubnetCidrBlockRequest generates a "aws/request.Request" representing the
// client's request for the DisassociateSubnetCidrBlock operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DisassociateSubnetCidrBlock for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DisassociateSubnetCidrBlock method directly
-// instead.
+// See DisassociateSubnetCidrBlock for more information on using the DisassociateSubnetCidrBlock
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DisassociateSubnetCidrBlockRequest method.
// req, resp := client.DisassociateSubnetCidrBlockRequest(params)
@@ -14508,7 +15909,7 @@ const opDisassociateSubnetCidrBlock = "DisassociateSubnetCidrBlock"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateSubnetCidrBlock
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateSubnetCidrBlock
func (c *EC2) DisassociateSubnetCidrBlockRequest(input *DisassociateSubnetCidrBlockInput) (req *request.Request, output *DisassociateSubnetCidrBlockOutput) {
op := &request.Operation{
Name: opDisassociateSubnetCidrBlock,
@@ -14537,7 +15938,7 @@ func (c *EC2) DisassociateSubnetCidrBlockRequest(input *DisassociateSubnetCidrBl
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DisassociateSubnetCidrBlock for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateSubnetCidrBlock
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateSubnetCidrBlock
func (c *EC2) DisassociateSubnetCidrBlock(input *DisassociateSubnetCidrBlockInput) (*DisassociateSubnetCidrBlockOutput, error) {
req, out := c.DisassociateSubnetCidrBlockRequest(input)
return out, req.Send()
@@ -14563,19 +15964,18 @@ const opDisassociateVpcCidrBlock = "DisassociateVpcCidrBlock"
// DisassociateVpcCidrBlockRequest generates a "aws/request.Request" representing the
// client's request for the DisassociateVpcCidrBlock operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DisassociateVpcCidrBlock for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DisassociateVpcCidrBlock method directly
-// instead.
+// See DisassociateVpcCidrBlock for more information on using the DisassociateVpcCidrBlock
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DisassociateVpcCidrBlockRequest method.
// req, resp := client.DisassociateVpcCidrBlockRequest(params)
@@ -14585,7 +15985,7 @@ const opDisassociateVpcCidrBlock = "DisassociateVpcCidrBlock"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateVpcCidrBlock
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateVpcCidrBlock
func (c *EC2) DisassociateVpcCidrBlockRequest(input *DisassociateVpcCidrBlockInput) (req *request.Request, output *DisassociateVpcCidrBlockOutput) {
op := &request.Operation{
Name: opDisassociateVpcCidrBlock,
@@ -14604,9 +16004,13 @@ func (c *EC2) DisassociateVpcCidrBlockRequest(input *DisassociateVpcCidrBlockInp
// DisassociateVpcCidrBlock API operation for Amazon Elastic Compute Cloud.
//
-// Disassociates a CIDR block from a VPC. Currently, you can disassociate an
-// IPv6 CIDR block only. You must detach or delete all gateways and resources
-// that are associated with the CIDR block before you can disassociate it.
+// Disassociates a CIDR block from a VPC. To disassociate the CIDR block, you
+// must specify its association ID. You can get the association ID by using
+// DescribeVpcs. You must detach or delete all gateways and resources that are
+// associated with the CIDR block before you can disassociate it.
+//
+// You cannot disassociate the CIDR block with which you originally created
+// the VPC (the primary CIDR block).
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -14614,7 +16018,7 @@ func (c *EC2) DisassociateVpcCidrBlockRequest(input *DisassociateVpcCidrBlockInp
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation DisassociateVpcCidrBlock for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateVpcCidrBlock
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateVpcCidrBlock
func (c *EC2) DisassociateVpcCidrBlock(input *DisassociateVpcCidrBlockInput) (*DisassociateVpcCidrBlockOutput, error) {
req, out := c.DisassociateVpcCidrBlockRequest(input)
return out, req.Send()
@@ -14640,19 +16044,18 @@ const opEnableVgwRoutePropagation = "EnableVgwRoutePropagation"
// EnableVgwRoutePropagationRequest generates a "aws/request.Request" representing the
// client's request for the EnableVgwRoutePropagation operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See EnableVgwRoutePropagation for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the EnableVgwRoutePropagation method directly
-// instead.
+// See EnableVgwRoutePropagation for more information on using the EnableVgwRoutePropagation
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the EnableVgwRoutePropagationRequest method.
// req, resp := client.EnableVgwRoutePropagationRequest(params)
@@ -14662,7 +16065,7 @@ const opEnableVgwRoutePropagation = "EnableVgwRoutePropagation"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVgwRoutePropagation
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVgwRoutePropagation
func (c *EC2) EnableVgwRoutePropagationRequest(input *EnableVgwRoutePropagationInput) (req *request.Request, output *EnableVgwRoutePropagationOutput) {
op := &request.Operation{
Name: opEnableVgwRoutePropagation,
@@ -14692,7 +16095,7 @@ func (c *EC2) EnableVgwRoutePropagationRequest(input *EnableVgwRoutePropagationI
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation EnableVgwRoutePropagation for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVgwRoutePropagation
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVgwRoutePropagation
func (c *EC2) EnableVgwRoutePropagation(input *EnableVgwRoutePropagationInput) (*EnableVgwRoutePropagationOutput, error) {
req, out := c.EnableVgwRoutePropagationRequest(input)
return out, req.Send()
@@ -14718,19 +16121,18 @@ const opEnableVolumeIO = "EnableVolumeIO"
// EnableVolumeIORequest generates a "aws/request.Request" representing the
// client's request for the EnableVolumeIO operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See EnableVolumeIO for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the EnableVolumeIO method directly
-// instead.
+// See EnableVolumeIO for more information on using the EnableVolumeIO
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the EnableVolumeIORequest method.
// req, resp := client.EnableVolumeIORequest(params)
@@ -14740,7 +16142,7 @@ const opEnableVolumeIO = "EnableVolumeIO"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVolumeIO
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVolumeIO
func (c *EC2) EnableVolumeIORequest(input *EnableVolumeIOInput) (req *request.Request, output *EnableVolumeIOOutput) {
op := &request.Operation{
Name: opEnableVolumeIO,
@@ -14770,7 +16172,7 @@ func (c *EC2) EnableVolumeIORequest(input *EnableVolumeIOInput) (req *request.Re
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation EnableVolumeIO for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVolumeIO
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVolumeIO
func (c *EC2) EnableVolumeIO(input *EnableVolumeIOInput) (*EnableVolumeIOOutput, error) {
req, out := c.EnableVolumeIORequest(input)
return out, req.Send()
@@ -14796,19 +16198,18 @@ const opEnableVpcClassicLink = "EnableVpcClassicLink"
// EnableVpcClassicLinkRequest generates a "aws/request.Request" representing the
// client's request for the EnableVpcClassicLink operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See EnableVpcClassicLink for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the EnableVpcClassicLink method directly
-// instead.
+// See EnableVpcClassicLink for more information on using the EnableVpcClassicLink
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the EnableVpcClassicLinkRequest method.
// req, resp := client.EnableVpcClassicLinkRequest(params)
@@ -14818,7 +16219,7 @@ const opEnableVpcClassicLink = "EnableVpcClassicLink"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLink
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLink
func (c *EC2) EnableVpcClassicLinkRequest(input *EnableVpcClassicLinkInput) (req *request.Request, output *EnableVpcClassicLinkOutput) {
op := &request.Operation{
Name: opEnableVpcClassicLink,
@@ -14851,7 +16252,7 @@ func (c *EC2) EnableVpcClassicLinkRequest(input *EnableVpcClassicLinkInput) (req
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation EnableVpcClassicLink for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLink
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLink
func (c *EC2) EnableVpcClassicLink(input *EnableVpcClassicLinkInput) (*EnableVpcClassicLinkOutput, error) {
req, out := c.EnableVpcClassicLinkRequest(input)
return out, req.Send()
@@ -14877,19 +16278,18 @@ const opEnableVpcClassicLinkDnsSupport = "EnableVpcClassicLinkDnsSupport"
// EnableVpcClassicLinkDnsSupportRequest generates a "aws/request.Request" representing the
// client's request for the EnableVpcClassicLinkDnsSupport operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See EnableVpcClassicLinkDnsSupport for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the EnableVpcClassicLinkDnsSupport method directly
-// instead.
+// See EnableVpcClassicLinkDnsSupport for more information on using the EnableVpcClassicLinkDnsSupport
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the EnableVpcClassicLinkDnsSupportRequest method.
// req, resp := client.EnableVpcClassicLinkDnsSupportRequest(params)
@@ -14899,7 +16299,7 @@ const opEnableVpcClassicLinkDnsSupport = "EnableVpcClassicLinkDnsSupport"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLinkDnsSupport
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLinkDnsSupport
func (c *EC2) EnableVpcClassicLinkDnsSupportRequest(input *EnableVpcClassicLinkDnsSupportInput) (req *request.Request, output *EnableVpcClassicLinkDnsSupportOutput) {
op := &request.Operation{
Name: opEnableVpcClassicLinkDnsSupport,
@@ -14932,7 +16332,7 @@ func (c *EC2) EnableVpcClassicLinkDnsSupportRequest(input *EnableVpcClassicLinkD
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation EnableVpcClassicLinkDnsSupport for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLinkDnsSupport
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLinkDnsSupport
func (c *EC2) EnableVpcClassicLinkDnsSupport(input *EnableVpcClassicLinkDnsSupportInput) (*EnableVpcClassicLinkDnsSupportOutput, error) {
req, out := c.EnableVpcClassicLinkDnsSupportRequest(input)
return out, req.Send()
@@ -14958,19 +16358,18 @@ const opGetConsoleOutput = "GetConsoleOutput"
// GetConsoleOutputRequest generates a "aws/request.Request" representing the
// client's request for the GetConsoleOutput operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetConsoleOutput for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetConsoleOutput method directly
-// instead.
+// See GetConsoleOutput for more information on using the GetConsoleOutput
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetConsoleOutputRequest method.
// req, resp := client.GetConsoleOutputRequest(params)
@@ -14980,7 +16379,7 @@ const opGetConsoleOutput = "GetConsoleOutput"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleOutput
func (c *EC2) GetConsoleOutputRequest(input *GetConsoleOutputInput) (req *request.Request, output *GetConsoleOutputOutput) {
op := &request.Operation{
Name: opGetConsoleOutput,
@@ -15007,7 +16406,7 @@ func (c *EC2) GetConsoleOutputRequest(input *GetConsoleOutputInput) (req *reques
// the Amazon EC2 API and command line interface.
//
// Instance console output is buffered and posted shortly after instance boot,
-// reboot, and termination. Amazon EC2 preserves the most recent 64 KB output
+// reboot, and termination. Amazon EC2 preserves the most recent 64 KB output,
// which is available for at least one hour after the most recent post.
//
// For Linux instances, the instance console output displays the exact console
@@ -15024,7 +16423,7 @@ func (c *EC2) GetConsoleOutputRequest(input *GetConsoleOutputInput) (req *reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation GetConsoleOutput for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleOutput
func (c *EC2) GetConsoleOutput(input *GetConsoleOutputInput) (*GetConsoleOutputOutput, error) {
req, out := c.GetConsoleOutputRequest(input)
return out, req.Send()
@@ -15050,19 +16449,18 @@ const opGetConsoleScreenshot = "GetConsoleScreenshot"
// GetConsoleScreenshotRequest generates a "aws/request.Request" representing the
// client's request for the GetConsoleScreenshot operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetConsoleScreenshot for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetConsoleScreenshot method directly
-// instead.
+// See GetConsoleScreenshot for more information on using the GetConsoleScreenshot
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetConsoleScreenshotRequest method.
// req, resp := client.GetConsoleScreenshotRequest(params)
@@ -15072,7 +16470,7 @@ const opGetConsoleScreenshot = "GetConsoleScreenshot"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleScreenshot
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleScreenshot
func (c *EC2) GetConsoleScreenshotRequest(input *GetConsoleScreenshotInput) (req *request.Request, output *GetConsoleScreenshotOutput) {
op := &request.Operation{
Name: opGetConsoleScreenshot,
@@ -15101,7 +16499,7 @@ func (c *EC2) GetConsoleScreenshotRequest(input *GetConsoleScreenshotInput) (req
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation GetConsoleScreenshot for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleScreenshot
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleScreenshot
func (c *EC2) GetConsoleScreenshot(input *GetConsoleScreenshotInput) (*GetConsoleScreenshotOutput, error) {
req, out := c.GetConsoleScreenshotRequest(input)
return out, req.Send()
@@ -15127,19 +16525,18 @@ const opGetHostReservationPurchasePreview = "GetHostReservationPurchasePreview"
// GetHostReservationPurchasePreviewRequest generates a "aws/request.Request" representing the
// client's request for the GetHostReservationPurchasePreview operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetHostReservationPurchasePreview for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetHostReservationPurchasePreview method directly
-// instead.
+// See GetHostReservationPurchasePreview for more information on using the GetHostReservationPurchasePreview
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetHostReservationPurchasePreviewRequest method.
// req, resp := client.GetHostReservationPurchasePreviewRequest(params)
@@ -15149,7 +16546,7 @@ const opGetHostReservationPurchasePreview = "GetHostReservationPurchasePreview"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetHostReservationPurchasePreview
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetHostReservationPurchasePreview
func (c *EC2) GetHostReservationPurchasePreviewRequest(input *GetHostReservationPurchasePreviewInput) (req *request.Request, output *GetHostReservationPurchasePreviewOutput) {
op := &request.Operation{
Name: opGetHostReservationPurchasePreview,
@@ -15181,7 +16578,7 @@ func (c *EC2) GetHostReservationPurchasePreviewRequest(input *GetHostReservation
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation GetHostReservationPurchasePreview for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetHostReservationPurchasePreview
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetHostReservationPurchasePreview
func (c *EC2) GetHostReservationPurchasePreview(input *GetHostReservationPurchasePreviewInput) (*GetHostReservationPurchasePreviewOutput, error) {
req, out := c.GetHostReservationPurchasePreviewRequest(input)
return out, req.Send()
@@ -15203,23 +16600,97 @@ func (c *EC2) GetHostReservationPurchasePreviewWithContext(ctx aws.Context, inpu
return out, req.Send()
}
+const opGetLaunchTemplateData = "GetLaunchTemplateData"
+
+// GetLaunchTemplateDataRequest generates a "aws/request.Request" representing the
+// client's request for the GetLaunchTemplateData operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See GetLaunchTemplateData for more information on using the GetLaunchTemplateData
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the GetLaunchTemplateDataRequest method.
+// req, resp := client.GetLaunchTemplateDataRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetLaunchTemplateData
+func (c *EC2) GetLaunchTemplateDataRequest(input *GetLaunchTemplateDataInput) (req *request.Request, output *GetLaunchTemplateDataOutput) {
+ op := &request.Operation{
+ Name: opGetLaunchTemplateData,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &GetLaunchTemplateDataInput{}
+ }
+
+ output = &GetLaunchTemplateDataOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// GetLaunchTemplateData API operation for Amazon Elastic Compute Cloud.
+//
+// Retrieves the configuration data of the specified instance. You can use this
+// data to create a launch template.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation GetLaunchTemplateData for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetLaunchTemplateData
+func (c *EC2) GetLaunchTemplateData(input *GetLaunchTemplateDataInput) (*GetLaunchTemplateDataOutput, error) {
+ req, out := c.GetLaunchTemplateDataRequest(input)
+ return out, req.Send()
+}
+
+// GetLaunchTemplateDataWithContext is the same as GetLaunchTemplateData with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetLaunchTemplateData for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) GetLaunchTemplateDataWithContext(ctx aws.Context, input *GetLaunchTemplateDataInput, opts ...request.Option) (*GetLaunchTemplateDataOutput, error) {
+ req, out := c.GetLaunchTemplateDataRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opGetPasswordData = "GetPasswordData"
// GetPasswordDataRequest generates a "aws/request.Request" representing the
// client's request for the GetPasswordData operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetPasswordData for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetPasswordData method directly
-// instead.
+// See GetPasswordData for more information on using the GetPasswordData
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetPasswordDataRequest method.
// req, resp := client.GetPasswordDataRequest(params)
@@ -15229,7 +16700,7 @@ const opGetPasswordData = "GetPasswordData"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetPasswordData
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetPasswordData
func (c *EC2) GetPasswordDataRequest(input *GetPasswordDataInput) (req *request.Request, output *GetPasswordDataOutput) {
op := &request.Operation{
Name: opGetPasswordData,
@@ -15248,20 +16719,24 @@ func (c *EC2) GetPasswordDataRequest(input *GetPasswordDataInput) (req *request.
// GetPasswordData API operation for Amazon Elastic Compute Cloud.
//
-// Retrieves the encrypted administrator password for an instance running Windows.
+// Retrieves the encrypted administrator password for a running Windows instance.
//
-// The Windows password is generated at boot if the EC2Config service plugin,
-// Ec2SetPassword, is enabled. This usually only happens the first time an AMI
-// is launched, and then Ec2SetPassword is automatically disabled. The password
-// is not generated for rebundled AMIs unless Ec2SetPassword is enabled before
-// bundling.
+// The Windows password is generated at boot by the EC2Config service or EC2Launch
+// scripts (Windows Server 2016 and later). This usually only happens the first
+// time an instance is launched. For more information, see EC2Config (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/UsingConfig_WinAMI.html)
+// and EC2Launch (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2launch.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+//
+// For the EC2Config service, the password is not generated for rebundled AMIs
+// unless Ec2SetPassword is enabled before bundling.
//
// The password is encrypted using the key pair that you specified when you
// launched the instance. You must provide the corresponding key pair file.
//
-// Password generation and encryption takes a few moments. We recommend that
-// you wait up to 15 minutes after launching an instance before trying to retrieve
-// the generated password.
+// When you launch an instance, password generation and encryption may take
+// a few minutes. If you try to retrieve the password before it's available,
+// the output returns an empty string. We recommend that you wait up to 15 minutes
+// after launching an instance before trying to retrieve the generated password.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -15269,7 +16744,7 @@ func (c *EC2) GetPasswordDataRequest(input *GetPasswordDataInput) (req *request.
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation GetPasswordData for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetPasswordData
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetPasswordData
func (c *EC2) GetPasswordData(input *GetPasswordDataInput) (*GetPasswordDataOutput, error) {
req, out := c.GetPasswordDataRequest(input)
return out, req.Send()
@@ -15295,19 +16770,18 @@ const opGetReservedInstancesExchangeQuote = "GetReservedInstancesExchangeQuote"
// GetReservedInstancesExchangeQuoteRequest generates a "aws/request.Request" representing the
// client's request for the GetReservedInstancesExchangeQuote operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetReservedInstancesExchangeQuote for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetReservedInstancesExchangeQuote method directly
-// instead.
+// See GetReservedInstancesExchangeQuote for more information on using the GetReservedInstancesExchangeQuote
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetReservedInstancesExchangeQuoteRequest method.
// req, resp := client.GetReservedInstancesExchangeQuoteRequest(params)
@@ -15317,7 +16791,7 @@ const opGetReservedInstancesExchangeQuote = "GetReservedInstancesExchangeQuote"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetReservedInstancesExchangeQuote
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetReservedInstancesExchangeQuote
func (c *EC2) GetReservedInstancesExchangeQuoteRequest(input *GetReservedInstancesExchangeQuoteInput) (req *request.Request, output *GetReservedInstancesExchangeQuoteOutput) {
op := &request.Operation{
Name: opGetReservedInstancesExchangeQuote,
@@ -15336,9 +16810,10 @@ func (c *EC2) GetReservedInstancesExchangeQuoteRequest(input *GetReservedInstanc
// GetReservedInstancesExchangeQuote API operation for Amazon Elastic Compute Cloud.
//
-// Returns details about the values and term of your specified Convertible Reserved
-// Instances. When a target configuration is specified, it returns information
-// about whether the exchange is valid and can be performed.
+// Returns a quote and exchange information for exchanging one or more specified
+// Convertible Reserved Instances for a new Convertible Reserved Instance. If
+// the exchange cannot be performed, the reason is returned in the response.
+// Use AcceptReservedInstancesExchangeQuote to perform the exchange.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -15346,7 +16821,7 @@ func (c *EC2) GetReservedInstancesExchangeQuoteRequest(input *GetReservedInstanc
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation GetReservedInstancesExchangeQuote for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetReservedInstancesExchangeQuote
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetReservedInstancesExchangeQuote
func (c *EC2) GetReservedInstancesExchangeQuote(input *GetReservedInstancesExchangeQuoteInput) (*GetReservedInstancesExchangeQuoteOutput, error) {
req, out := c.GetReservedInstancesExchangeQuoteRequest(input)
return out, req.Send()
@@ -15372,19 +16847,18 @@ const opImportImage = "ImportImage"
// ImportImageRequest generates a "aws/request.Request" representing the
// client's request for the ImportImage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ImportImage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ImportImage method directly
-// instead.
+// See ImportImage for more information on using the ImportImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ImportImageRequest method.
// req, resp := client.ImportImageRequest(params)
@@ -15394,7 +16868,7 @@ const opImportImage = "ImportImage"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportImage
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportImage
func (c *EC2) ImportImageRequest(input *ImportImageInput) (req *request.Request, output *ImportImageOutput) {
op := &request.Operation{
Name: opImportImage,
@@ -15424,7 +16898,7 @@ func (c *EC2) ImportImageRequest(input *ImportImageInput) (req *request.Request,
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ImportImage for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportImage
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportImage
func (c *EC2) ImportImage(input *ImportImageInput) (*ImportImageOutput, error) {
req, out := c.ImportImageRequest(input)
return out, req.Send()
@@ -15450,19 +16924,18 @@ const opImportInstance = "ImportInstance"
// ImportInstanceRequest generates a "aws/request.Request" representing the
// client's request for the ImportInstance operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ImportInstance for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ImportInstance method directly
-// instead.
+// See ImportInstance for more information on using the ImportInstance
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ImportInstanceRequest method.
// req, resp := client.ImportInstanceRequest(params)
@@ -15472,7 +16945,7 @@ const opImportInstance = "ImportInstance"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportInstance
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportInstance
func (c *EC2) ImportInstanceRequest(input *ImportInstanceInput) (req *request.Request, output *ImportInstanceOutput) {
op := &request.Operation{
Name: opImportInstance,
@@ -15505,7 +16978,7 @@ func (c *EC2) ImportInstanceRequest(input *ImportInstanceInput) (req *request.Re
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ImportInstance for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportInstance
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportInstance
func (c *EC2) ImportInstance(input *ImportInstanceInput) (*ImportInstanceOutput, error) {
req, out := c.ImportInstanceRequest(input)
return out, req.Send()
@@ -15531,19 +17004,18 @@ const opImportKeyPair = "ImportKeyPair"
// ImportKeyPairRequest generates a "aws/request.Request" representing the
// client's request for the ImportKeyPair operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ImportKeyPair for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ImportKeyPair method directly
-// instead.
+// See ImportKeyPair for more information on using the ImportKeyPair
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ImportKeyPairRequest method.
// req, resp := client.ImportKeyPairRequest(params)
@@ -15553,7 +17025,7 @@ const opImportKeyPair = "ImportKeyPair"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportKeyPair
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportKeyPair
func (c *EC2) ImportKeyPairRequest(input *ImportKeyPairInput) (req *request.Request, output *ImportKeyPairOutput) {
op := &request.Operation{
Name: opImportKeyPair,
@@ -15587,7 +17059,7 @@ func (c *EC2) ImportKeyPairRequest(input *ImportKeyPairInput) (req *request.Requ
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ImportKeyPair for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportKeyPair
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportKeyPair
func (c *EC2) ImportKeyPair(input *ImportKeyPairInput) (*ImportKeyPairOutput, error) {
req, out := c.ImportKeyPairRequest(input)
return out, req.Send()
@@ -15613,19 +17085,18 @@ const opImportSnapshot = "ImportSnapshot"
// ImportSnapshotRequest generates a "aws/request.Request" representing the
// client's request for the ImportSnapshot operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ImportSnapshot for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ImportSnapshot method directly
-// instead.
+// See ImportSnapshot for more information on using the ImportSnapshot
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ImportSnapshotRequest method.
// req, resp := client.ImportSnapshotRequest(params)
@@ -15635,7 +17106,7 @@ const opImportSnapshot = "ImportSnapshot"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportSnapshot
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportSnapshot
func (c *EC2) ImportSnapshotRequest(input *ImportSnapshotInput) (req *request.Request, output *ImportSnapshotOutput) {
op := &request.Operation{
Name: opImportSnapshot,
@@ -15662,7 +17133,7 @@ func (c *EC2) ImportSnapshotRequest(input *ImportSnapshotInput) (req *request.Re
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ImportSnapshot for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportSnapshot
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportSnapshot
func (c *EC2) ImportSnapshot(input *ImportSnapshotInput) (*ImportSnapshotOutput, error) {
req, out := c.ImportSnapshotRequest(input)
return out, req.Send()
@@ -15688,19 +17159,18 @@ const opImportVolume = "ImportVolume"
// ImportVolumeRequest generates a "aws/request.Request" representing the
// client's request for the ImportVolume operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ImportVolume for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ImportVolume method directly
-// instead.
+// See ImportVolume for more information on using the ImportVolume
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ImportVolumeRequest method.
// req, resp := client.ImportVolumeRequest(params)
@@ -15710,7 +17180,7 @@ const opImportVolume = "ImportVolume"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportVolume
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportVolume
func (c *EC2) ImportVolumeRequest(input *ImportVolumeInput) (req *request.Request, output *ImportVolumeOutput) {
op := &request.Operation{
Name: opImportVolume,
@@ -15741,7 +17211,7 @@ func (c *EC2) ImportVolumeRequest(input *ImportVolumeInput) (req *request.Reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ImportVolume for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportVolume
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportVolume
func (c *EC2) ImportVolume(input *ImportVolumeInput) (*ImportVolumeOutput, error) {
req, out := c.ImportVolumeRequest(input)
return out, req.Send()
@@ -15763,23 +17233,96 @@ func (c *EC2) ImportVolumeWithContext(ctx aws.Context, input *ImportVolumeInput,
return out, req.Send()
}
+const opModifyFpgaImageAttribute = "ModifyFpgaImageAttribute"
+
+// ModifyFpgaImageAttributeRequest generates a "aws/request.Request" representing the
+// client's request for the ModifyFpgaImageAttribute operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See ModifyFpgaImageAttribute for more information on using the ModifyFpgaImageAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the ModifyFpgaImageAttributeRequest method.
+// req, resp := client.ModifyFpgaImageAttributeRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyFpgaImageAttribute
+func (c *EC2) ModifyFpgaImageAttributeRequest(input *ModifyFpgaImageAttributeInput) (req *request.Request, output *ModifyFpgaImageAttributeOutput) {
+ op := &request.Operation{
+ Name: opModifyFpgaImageAttribute,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ModifyFpgaImageAttributeInput{}
+ }
+
+ output = &ModifyFpgaImageAttributeOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// ModifyFpgaImageAttribute API operation for Amazon Elastic Compute Cloud.
+//
+// Modifies the specified attribute of the specified Amazon FPGA Image (AFI).
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation ModifyFpgaImageAttribute for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyFpgaImageAttribute
+func (c *EC2) ModifyFpgaImageAttribute(input *ModifyFpgaImageAttributeInput) (*ModifyFpgaImageAttributeOutput, error) {
+ req, out := c.ModifyFpgaImageAttributeRequest(input)
+ return out, req.Send()
+}
+
+// ModifyFpgaImageAttributeWithContext is the same as ModifyFpgaImageAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyFpgaImageAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyFpgaImageAttributeWithContext(ctx aws.Context, input *ModifyFpgaImageAttributeInput, opts ...request.Option) (*ModifyFpgaImageAttributeOutput, error) {
+ req, out := c.ModifyFpgaImageAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opModifyHosts = "ModifyHosts"
// ModifyHostsRequest generates a "aws/request.Request" representing the
// client's request for the ModifyHosts operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyHosts for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyHosts method directly
-// instead.
+// See ModifyHosts for more information on using the ModifyHosts
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyHostsRequest method.
// req, resp := client.ModifyHostsRequest(params)
@@ -15789,7 +17332,7 @@ const opModifyHosts = "ModifyHosts"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyHosts
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyHosts
func (c *EC2) ModifyHostsRequest(input *ModifyHostsInput) (req *request.Request, output *ModifyHostsOutput) {
op := &request.Operation{
Name: opModifyHosts,
@@ -15822,7 +17365,7 @@ func (c *EC2) ModifyHostsRequest(input *ModifyHostsInput) (req *request.Request,
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ModifyHosts for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyHosts
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyHosts
func (c *EC2) ModifyHosts(input *ModifyHostsInput) (*ModifyHostsOutput, error) {
req, out := c.ModifyHostsRequest(input)
return out, req.Send()
@@ -15848,19 +17391,18 @@ const opModifyIdFormat = "ModifyIdFormat"
// ModifyIdFormatRequest generates a "aws/request.Request" representing the
// client's request for the ModifyIdFormat operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyIdFormat for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyIdFormat method directly
-// instead.
+// See ModifyIdFormat for more information on using the ModifyIdFormat
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyIdFormatRequest method.
// req, resp := client.ModifyIdFormatRequest(params)
@@ -15870,7 +17412,7 @@ const opModifyIdFormat = "ModifyIdFormat"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdFormat
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdFormat
func (c *EC2) ModifyIdFormatRequest(input *ModifyIdFormatInput) (req *request.Request, output *ModifyIdFormatOutput) {
op := &request.Operation{
Name: opModifyIdFormat,
@@ -15913,7 +17455,7 @@ func (c *EC2) ModifyIdFormatRequest(input *ModifyIdFormatInput) (req *request.Re
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ModifyIdFormat for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdFormat
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdFormat
func (c *EC2) ModifyIdFormat(input *ModifyIdFormatInput) (*ModifyIdFormatOutput, error) {
req, out := c.ModifyIdFormatRequest(input)
return out, req.Send()
@@ -15939,19 +17481,18 @@ const opModifyIdentityIdFormat = "ModifyIdentityIdFormat"
// ModifyIdentityIdFormatRequest generates a "aws/request.Request" representing the
// client's request for the ModifyIdentityIdFormat operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyIdentityIdFormat for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyIdentityIdFormat method directly
-// instead.
+// See ModifyIdentityIdFormat for more information on using the ModifyIdentityIdFormat
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyIdentityIdFormatRequest method.
// req, resp := client.ModifyIdentityIdFormatRequest(params)
@@ -15961,7 +17502,7 @@ const opModifyIdentityIdFormat = "ModifyIdentityIdFormat"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdentityIdFormat
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdentityIdFormat
func (c *EC2) ModifyIdentityIdFormatRequest(input *ModifyIdentityIdFormatInput) (req *request.Request, output *ModifyIdentityIdFormatOutput) {
op := &request.Operation{
Name: opModifyIdentityIdFormat,
@@ -16004,7 +17545,7 @@ func (c *EC2) ModifyIdentityIdFormatRequest(input *ModifyIdentityIdFormatInput)
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ModifyIdentityIdFormat for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdentityIdFormat
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdentityIdFormat
func (c *EC2) ModifyIdentityIdFormat(input *ModifyIdentityIdFormatInput) (*ModifyIdentityIdFormatOutput, error) {
req, out := c.ModifyIdentityIdFormatRequest(input)
return out, req.Send()
@@ -16030,19 +17571,18 @@ const opModifyImageAttribute = "ModifyImageAttribute"
// ModifyImageAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ModifyImageAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyImageAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyImageAttribute method directly
-// instead.
+// See ModifyImageAttribute for more information on using the ModifyImageAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyImageAttributeRequest method.
// req, resp := client.ModifyImageAttributeRequest(params)
@@ -16052,7 +17592,7 @@ const opModifyImageAttribute = "ModifyImageAttribute"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyImageAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyImageAttribute
func (c *EC2) ModifyImageAttributeRequest(input *ModifyImageAttributeInput) (req *request.Request, output *ModifyImageAttributeOutput) {
op := &request.Operation{
Name: opModifyImageAttribute,
@@ -16074,15 +17614,15 @@ func (c *EC2) ModifyImageAttributeRequest(input *ModifyImageAttributeInput) (req
// ModifyImageAttribute API operation for Amazon Elastic Compute Cloud.
//
// Modifies the specified attribute of the specified AMI. You can specify only
-// one attribute at a time.
+// one attribute at a time. You can use the Attribute parameter to specify the
+// attribute or one of the following parameters: Description, LaunchPermission,
+// or ProductCode.
//
// AWS Marketplace product codes cannot be modified. Images with an AWS Marketplace
// product code cannot be made public.
//
-// The SriovNetSupport enhanced networking attribute cannot be changed using
-// this command. Instead, enable SriovNetSupport on an instance and create an
-// AMI from the instance. This will result in an image with SriovNetSupport
-// enabled.
+// To enable the SriovNetSupport enhanced networking attribute of an image,
+// enable SriovNetSupport on an instance and create an AMI from the instance.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -16090,7 +17630,7 @@ func (c *EC2) ModifyImageAttributeRequest(input *ModifyImageAttributeInput) (req
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ModifyImageAttribute for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyImageAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyImageAttribute
func (c *EC2) ModifyImageAttribute(input *ModifyImageAttributeInput) (*ModifyImageAttributeOutput, error) {
req, out := c.ModifyImageAttributeRequest(input)
return out, req.Send()
@@ -16116,19 +17656,18 @@ const opModifyInstanceAttribute = "ModifyInstanceAttribute"
// ModifyInstanceAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ModifyInstanceAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyInstanceAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyInstanceAttribute method directly
-// instead.
+// See ModifyInstanceAttribute for more information on using the ModifyInstanceAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyInstanceAttributeRequest method.
// req, resp := client.ModifyInstanceAttributeRequest(params)
@@ -16138,7 +17677,7 @@ const opModifyInstanceAttribute = "ModifyInstanceAttribute"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceAttribute
func (c *EC2) ModifyInstanceAttributeRequest(input *ModifyInstanceAttributeInput) (req *request.Request, output *ModifyInstanceAttributeOutput) {
op := &request.Operation{
Name: opModifyInstanceAttribute,
@@ -16172,7 +17711,7 @@ func (c *EC2) ModifyInstanceAttributeRequest(input *ModifyInstanceAttributeInput
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ModifyInstanceAttribute for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceAttribute
func (c *EC2) ModifyInstanceAttribute(input *ModifyInstanceAttributeInput) (*ModifyInstanceAttributeOutput, error) {
req, out := c.ModifyInstanceAttributeRequest(input)
return out, req.Send()
@@ -16194,23 +17733,100 @@ func (c *EC2) ModifyInstanceAttributeWithContext(ctx aws.Context, input *ModifyI
return out, req.Send()
}
+const opModifyInstanceCreditSpecification = "ModifyInstanceCreditSpecification"
+
+// ModifyInstanceCreditSpecificationRequest generates a "aws/request.Request" representing the
+// client's request for the ModifyInstanceCreditSpecification operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See ModifyInstanceCreditSpecification for more information on using the ModifyInstanceCreditSpecification
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the ModifyInstanceCreditSpecificationRequest method.
+// req, resp := client.ModifyInstanceCreditSpecificationRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceCreditSpecification
+func (c *EC2) ModifyInstanceCreditSpecificationRequest(input *ModifyInstanceCreditSpecificationInput) (req *request.Request, output *ModifyInstanceCreditSpecificationOutput) {
+ op := &request.Operation{
+ Name: opModifyInstanceCreditSpecification,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ModifyInstanceCreditSpecificationInput{}
+ }
+
+ output = &ModifyInstanceCreditSpecificationOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// ModifyInstanceCreditSpecification API operation for Amazon Elastic Compute Cloud.
+//
+// Modifies the credit option for CPU usage on a running or stopped T2 instance.
+// The credit options are standard and unlimited.
+//
+// For more information, see T2 Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-instances.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation ModifyInstanceCreditSpecification for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceCreditSpecification
+func (c *EC2) ModifyInstanceCreditSpecification(input *ModifyInstanceCreditSpecificationInput) (*ModifyInstanceCreditSpecificationOutput, error) {
+ req, out := c.ModifyInstanceCreditSpecificationRequest(input)
+ return out, req.Send()
+}
+
+// ModifyInstanceCreditSpecificationWithContext is the same as ModifyInstanceCreditSpecification with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyInstanceCreditSpecification for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyInstanceCreditSpecificationWithContext(ctx aws.Context, input *ModifyInstanceCreditSpecificationInput, opts ...request.Option) (*ModifyInstanceCreditSpecificationOutput, error) {
+ req, out := c.ModifyInstanceCreditSpecificationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opModifyInstancePlacement = "ModifyInstancePlacement"
// ModifyInstancePlacementRequest generates a "aws/request.Request" representing the
// client's request for the ModifyInstancePlacement operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyInstancePlacement for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyInstancePlacement method directly
-// instead.
+// See ModifyInstancePlacement for more information on using the ModifyInstancePlacement
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyInstancePlacementRequest method.
// req, resp := client.ModifyInstancePlacementRequest(params)
@@ -16220,7 +17836,7 @@ const opModifyInstancePlacement = "ModifyInstancePlacement"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstancePlacement
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstancePlacement
func (c *EC2) ModifyInstancePlacementRequest(input *ModifyInstancePlacementInput) (req *request.Request, output *ModifyInstancePlacementOutput) {
op := &request.Operation{
Name: opModifyInstancePlacement,
@@ -16265,7 +17881,7 @@ func (c *EC2) ModifyInstancePlacementRequest(input *ModifyInstancePlacementInput
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ModifyInstancePlacement for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstancePlacement
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstancePlacement
func (c *EC2) ModifyInstancePlacement(input *ModifyInstancePlacementInput) (*ModifyInstancePlacementOutput, error) {
req, out := c.ModifyInstancePlacementRequest(input)
return out, req.Send()
@@ -16287,23 +17903,98 @@ func (c *EC2) ModifyInstancePlacementWithContext(ctx aws.Context, input *ModifyI
return out, req.Send()
}
+const opModifyLaunchTemplate = "ModifyLaunchTemplate"
+
+// ModifyLaunchTemplateRequest generates a "aws/request.Request" representing the
+// client's request for the ModifyLaunchTemplate operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See ModifyLaunchTemplate for more information on using the ModifyLaunchTemplate
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the ModifyLaunchTemplateRequest method.
+// req, resp := client.ModifyLaunchTemplateRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyLaunchTemplate
+func (c *EC2) ModifyLaunchTemplateRequest(input *ModifyLaunchTemplateInput) (req *request.Request, output *ModifyLaunchTemplateOutput) {
+ op := &request.Operation{
+ Name: opModifyLaunchTemplate,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ModifyLaunchTemplateInput{}
+ }
+
+ output = &ModifyLaunchTemplateOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// ModifyLaunchTemplate API operation for Amazon Elastic Compute Cloud.
+//
+// Modifies a launch template. You can specify which version of the launch template
+// to set as the default version. When launching an instance, the default version
+// applies when a launch template version is not specified.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation ModifyLaunchTemplate for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyLaunchTemplate
+func (c *EC2) ModifyLaunchTemplate(input *ModifyLaunchTemplateInput) (*ModifyLaunchTemplateOutput, error) {
+ req, out := c.ModifyLaunchTemplateRequest(input)
+ return out, req.Send()
+}
+
+// ModifyLaunchTemplateWithContext is the same as ModifyLaunchTemplate with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyLaunchTemplate for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyLaunchTemplateWithContext(ctx aws.Context, input *ModifyLaunchTemplateInput, opts ...request.Option) (*ModifyLaunchTemplateOutput, error) {
+ req, out := c.ModifyLaunchTemplateRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opModifyNetworkInterfaceAttribute = "ModifyNetworkInterfaceAttribute"
// ModifyNetworkInterfaceAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ModifyNetworkInterfaceAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyNetworkInterfaceAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyNetworkInterfaceAttribute method directly
-// instead.
+// See ModifyNetworkInterfaceAttribute for more information on using the ModifyNetworkInterfaceAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyNetworkInterfaceAttributeRequest method.
// req, resp := client.ModifyNetworkInterfaceAttributeRequest(params)
@@ -16313,7 +18004,7 @@ const opModifyNetworkInterfaceAttribute = "ModifyNetworkInterfaceAttribute"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyNetworkInterfaceAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyNetworkInterfaceAttribute
func (c *EC2) ModifyNetworkInterfaceAttributeRequest(input *ModifyNetworkInterfaceAttributeInput) (req *request.Request, output *ModifyNetworkInterfaceAttributeOutput) {
op := &request.Operation{
Name: opModifyNetworkInterfaceAttribute,
@@ -16343,7 +18034,7 @@ func (c *EC2) ModifyNetworkInterfaceAttributeRequest(input *ModifyNetworkInterfa
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ModifyNetworkInterfaceAttribute for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyNetworkInterfaceAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyNetworkInterfaceAttribute
func (c *EC2) ModifyNetworkInterfaceAttribute(input *ModifyNetworkInterfaceAttributeInput) (*ModifyNetworkInterfaceAttributeOutput, error) {
req, out := c.ModifyNetworkInterfaceAttributeRequest(input)
return out, req.Send()
@@ -16369,19 +18060,18 @@ const opModifyReservedInstances = "ModifyReservedInstances"
// ModifyReservedInstancesRequest generates a "aws/request.Request" representing the
// client's request for the ModifyReservedInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyReservedInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyReservedInstances method directly
-// instead.
+// See ModifyReservedInstances for more information on using the ModifyReservedInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyReservedInstancesRequest method.
// req, resp := client.ModifyReservedInstancesRequest(params)
@@ -16391,7 +18081,7 @@ const opModifyReservedInstances = "ModifyReservedInstances"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyReservedInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyReservedInstances
func (c *EC2) ModifyReservedInstancesRequest(input *ModifyReservedInstancesInput) (req *request.Request, output *ModifyReservedInstancesOutput) {
op := &request.Operation{
Name: opModifyReservedInstances,
@@ -16411,9 +18101,9 @@ func (c *EC2) ModifyReservedInstancesRequest(input *ModifyReservedInstancesInput
// ModifyReservedInstances API operation for Amazon Elastic Compute Cloud.
//
// Modifies the Availability Zone, instance count, instance type, or network
-// platform (EC2-Classic or EC2-VPC) of your Standard Reserved Instances. The
-// Reserved Instances to be modified must be identical, except for Availability
-// Zone, network platform, and instance type.
+// platform (EC2-Classic or EC2-VPC) of your Reserved Instances. The Reserved
+// Instances to be modified must be identical, except for Availability Zone,
+// network platform, and instance type.
//
// For more information, see Modifying Reserved Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html)
// in the Amazon Elastic Compute Cloud User Guide.
@@ -16424,7 +18114,7 @@ func (c *EC2) ModifyReservedInstancesRequest(input *ModifyReservedInstancesInput
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ModifyReservedInstances for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyReservedInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyReservedInstances
func (c *EC2) ModifyReservedInstances(input *ModifyReservedInstancesInput) (*ModifyReservedInstancesOutput, error) {
req, out := c.ModifyReservedInstancesRequest(input)
return out, req.Send()
@@ -16450,19 +18140,18 @@ const opModifySnapshotAttribute = "ModifySnapshotAttribute"
// ModifySnapshotAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ModifySnapshotAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifySnapshotAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifySnapshotAttribute method directly
-// instead.
+// See ModifySnapshotAttribute for more information on using the ModifySnapshotAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifySnapshotAttributeRequest method.
// req, resp := client.ModifySnapshotAttributeRequest(params)
@@ -16472,7 +18161,7 @@ const opModifySnapshotAttribute = "ModifySnapshotAttribute"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySnapshotAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySnapshotAttribute
func (c *EC2) ModifySnapshotAttributeRequest(input *ModifySnapshotAttributeInput) (req *request.Request, output *ModifySnapshotAttributeOutput) {
op := &request.Operation{
Name: opModifySnapshotAttribute,
@@ -16513,7 +18202,7 @@ func (c *EC2) ModifySnapshotAttributeRequest(input *ModifySnapshotAttributeInput
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ModifySnapshotAttribute for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySnapshotAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySnapshotAttribute
func (c *EC2) ModifySnapshotAttribute(input *ModifySnapshotAttributeInput) (*ModifySnapshotAttributeOutput, error) {
req, out := c.ModifySnapshotAttributeRequest(input)
return out, req.Send()
@@ -16539,19 +18228,18 @@ const opModifySpotFleetRequest = "ModifySpotFleetRequest"
// ModifySpotFleetRequestRequest generates a "aws/request.Request" representing the
// client's request for the ModifySpotFleetRequest operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifySpotFleetRequest for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifySpotFleetRequest method directly
-// instead.
+// See ModifySpotFleetRequest for more information on using the ModifySpotFleetRequest
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifySpotFleetRequestRequest method.
// req, resp := client.ModifySpotFleetRequestRequest(params)
@@ -16561,7 +18249,7 @@ const opModifySpotFleetRequest = "ModifySpotFleetRequest"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySpotFleetRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySpotFleetRequest
func (c *EC2) ModifySpotFleetRequestRequest(input *ModifySpotFleetRequestInput) (req *request.Request, output *ModifySpotFleetRequestOutput) {
op := &request.Operation{
Name: opModifySpotFleetRequest,
@@ -16580,26 +18268,29 @@ func (c *EC2) ModifySpotFleetRequestRequest(input *ModifySpotFleetRequestInput)
// ModifySpotFleetRequest API operation for Amazon Elastic Compute Cloud.
//
-// Modifies the specified Spot fleet request.
+// Modifies the specified Spot Fleet request.
//
-// While the Spot fleet request is being modified, it is in the modifying state.
+// While the Spot Fleet request is being modified, it is in the modifying state.
//
-// To scale up your Spot fleet, increase its target capacity. The Spot fleet
-// launches the additional Spot instances according to the allocation strategy
-// for the Spot fleet request. If the allocation strategy is lowestPrice, the
-// Spot fleet launches instances using the Spot pool with the lowest price.
-// If the allocation strategy is diversified, the Spot fleet distributes the
+// To scale up your Spot Fleet, increase its target capacity. The Spot Fleet
+// launches the additional Spot Instances according to the allocation strategy
+// for the Spot Fleet request. If the allocation strategy is lowestPrice, the
+// Spot Fleet launches instances using the Spot pool with the lowest price.
+// If the allocation strategy is diversified, the Spot Fleet distributes the
// instances across the Spot pools.
//
-// To scale down your Spot fleet, decrease its target capacity. First, the Spot
-// fleet cancels any open bids that exceed the new target capacity. You can
-// request that the Spot fleet terminate Spot instances until the size of the
-// fleet no longer exceeds the new target capacity. If the allocation strategy
-// is lowestPrice, the Spot fleet terminates the instances with the highest
-// price per unit. If the allocation strategy is diversified, the Spot fleet
+// To scale down your Spot Fleet, decrease its target capacity. First, the Spot
+// Fleet cancels any open requests that exceed the new target capacity. You
+// can request that the Spot Fleet terminate Spot Instances until the size of
+// the fleet no longer exceeds the new target capacity. If the allocation strategy
+// is lowestPrice, the Spot Fleet terminates the instances with the highest
+// price per unit. If the allocation strategy is diversified, the Spot Fleet
// terminates instances across the Spot pools. Alternatively, you can request
-// that the Spot fleet keep the fleet at its current size, but not replace any
-// Spot instances that are interrupted or that you terminate manually.
+// that the Spot Fleet keep the fleet at its current size, but not replace any
+// Spot Instances that are interrupted or that you terminate manually.
+//
+// If you are finished with your Spot Fleet for now, but will use it again later,
+// you can set the target capacity to 0.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -16607,7 +18298,7 @@ func (c *EC2) ModifySpotFleetRequestRequest(input *ModifySpotFleetRequestInput)
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ModifySpotFleetRequest for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySpotFleetRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySpotFleetRequest
func (c *EC2) ModifySpotFleetRequest(input *ModifySpotFleetRequestInput) (*ModifySpotFleetRequestOutput, error) {
req, out := c.ModifySpotFleetRequestRequest(input)
return out, req.Send()
@@ -16633,19 +18324,18 @@ const opModifySubnetAttribute = "ModifySubnetAttribute"
// ModifySubnetAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ModifySubnetAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifySubnetAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifySubnetAttribute method directly
-// instead.
+// See ModifySubnetAttribute for more information on using the ModifySubnetAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifySubnetAttributeRequest method.
// req, resp := client.ModifySubnetAttributeRequest(params)
@@ -16655,7 +18345,7 @@ const opModifySubnetAttribute = "ModifySubnetAttribute"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySubnetAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySubnetAttribute
func (c *EC2) ModifySubnetAttributeRequest(input *ModifySubnetAttributeInput) (req *request.Request, output *ModifySubnetAttributeOutput) {
op := &request.Operation{
Name: opModifySubnetAttribute,
@@ -16684,7 +18374,7 @@ func (c *EC2) ModifySubnetAttributeRequest(input *ModifySubnetAttributeInput) (r
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ModifySubnetAttribute for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySubnetAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySubnetAttribute
func (c *EC2) ModifySubnetAttribute(input *ModifySubnetAttributeInput) (*ModifySubnetAttributeOutput, error) {
req, out := c.ModifySubnetAttributeRequest(input)
return out, req.Send()
@@ -16710,19 +18400,18 @@ const opModifyVolume = "ModifyVolume"
// ModifyVolumeRequest generates a "aws/request.Request" representing the
// client's request for the ModifyVolume operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyVolume for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyVolume method directly
-// instead.
+// See ModifyVolume for more information on using the ModifyVolume
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyVolumeRequest method.
// req, resp := client.ModifyVolumeRequest(params)
@@ -16732,7 +18421,7 @@ const opModifyVolume = "ModifyVolume"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolume
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolume
func (c *EC2) ModifyVolumeRequest(input *ModifyVolumeInput) (req *request.Request, output *ModifyVolumeOutput) {
op := &request.Operation{
Name: opModifyVolume,
@@ -16791,7 +18480,7 @@ func (c *EC2) ModifyVolumeRequest(input *ModifyVolumeInput) (req *request.Reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ModifyVolume for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolume
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolume
func (c *EC2) ModifyVolume(input *ModifyVolumeInput) (*ModifyVolumeOutput, error) {
req, out := c.ModifyVolumeRequest(input)
return out, req.Send()
@@ -16817,19 +18506,18 @@ const opModifyVolumeAttribute = "ModifyVolumeAttribute"
// ModifyVolumeAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ModifyVolumeAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyVolumeAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyVolumeAttribute method directly
-// instead.
+// See ModifyVolumeAttribute for more information on using the ModifyVolumeAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyVolumeAttributeRequest method.
// req, resp := client.ModifyVolumeAttributeRequest(params)
@@ -16839,7 +18527,7 @@ const opModifyVolumeAttribute = "ModifyVolumeAttribute"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolumeAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolumeAttribute
func (c *EC2) ModifyVolumeAttributeRequest(input *ModifyVolumeAttributeInput) (req *request.Request, output *ModifyVolumeAttributeOutput) {
op := &request.Operation{
Name: opModifyVolumeAttribute,
@@ -16877,7 +18565,7 @@ func (c *EC2) ModifyVolumeAttributeRequest(input *ModifyVolumeAttributeInput) (r
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ModifyVolumeAttribute for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolumeAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolumeAttribute
func (c *EC2) ModifyVolumeAttribute(input *ModifyVolumeAttributeInput) (*ModifyVolumeAttributeOutput, error) {
req, out := c.ModifyVolumeAttributeRequest(input)
return out, req.Send()
@@ -16903,19 +18591,18 @@ const opModifyVpcAttribute = "ModifyVpcAttribute"
// ModifyVpcAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ModifyVpcAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyVpcAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyVpcAttribute method directly
-// instead.
+// See ModifyVpcAttribute for more information on using the ModifyVpcAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyVpcAttributeRequest method.
// req, resp := client.ModifyVpcAttributeRequest(params)
@@ -16925,7 +18612,7 @@ const opModifyVpcAttribute = "ModifyVpcAttribute"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcAttribute
func (c *EC2) ModifyVpcAttributeRequest(input *ModifyVpcAttributeInput) (req *request.Request, output *ModifyVpcAttributeOutput) {
op := &request.Operation{
Name: opModifyVpcAttribute,
@@ -16954,7 +18641,7 @@ func (c *EC2) ModifyVpcAttributeRequest(input *ModifyVpcAttributeInput) (req *re
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ModifyVpcAttribute for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcAttribute
func (c *EC2) ModifyVpcAttribute(input *ModifyVpcAttributeInput) (*ModifyVpcAttributeOutput, error) {
req, out := c.ModifyVpcAttributeRequest(input)
return out, req.Send()
@@ -16980,19 +18667,18 @@ const opModifyVpcEndpoint = "ModifyVpcEndpoint"
// ModifyVpcEndpointRequest generates a "aws/request.Request" representing the
// client's request for the ModifyVpcEndpoint operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyVpcEndpoint for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyVpcEndpoint method directly
-// instead.
+// See ModifyVpcEndpoint for more information on using the ModifyVpcEndpoint
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyVpcEndpointRequest method.
// req, resp := client.ModifyVpcEndpointRequest(params)
@@ -17002,7 +18688,7 @@ const opModifyVpcEndpoint = "ModifyVpcEndpoint"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpoint
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpoint
func (c *EC2) ModifyVpcEndpointRequest(input *ModifyVpcEndpointInput) (req *request.Request, output *ModifyVpcEndpointOutput) {
op := &request.Operation{
Name: opModifyVpcEndpoint,
@@ -17021,9 +18707,10 @@ func (c *EC2) ModifyVpcEndpointRequest(input *ModifyVpcEndpointInput) (req *requ
// ModifyVpcEndpoint API operation for Amazon Elastic Compute Cloud.
//
-// Modifies attributes of a specified VPC endpoint. You can modify the policy
-// associated with the endpoint, and you can add and remove route tables associated
-// with the endpoint.
+// Modifies attributes of a specified VPC endpoint. The attributes that you
+// can modify depend on the type of VPC endpoint (interface or gateway). For
+// more information, see VPC Endpoints (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-endpoints.html)
+// in the Amazon Virtual Private Cloud User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -17031,7 +18718,7 @@ func (c *EC2) ModifyVpcEndpointRequest(input *ModifyVpcEndpointInput) (req *requ
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ModifyVpcEndpoint for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpoint
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpoint
func (c *EC2) ModifyVpcEndpoint(input *ModifyVpcEndpointInput) (*ModifyVpcEndpointOutput, error) {
req, out := c.ModifyVpcEndpointRequest(input)
return out, req.Send()
@@ -17053,23 +18740,251 @@ func (c *EC2) ModifyVpcEndpointWithContext(ctx aws.Context, input *ModifyVpcEndp
return out, req.Send()
}
+const opModifyVpcEndpointConnectionNotification = "ModifyVpcEndpointConnectionNotification"
+
+// ModifyVpcEndpointConnectionNotificationRequest generates a "aws/request.Request" representing the
+// client's request for the ModifyVpcEndpointConnectionNotification operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See ModifyVpcEndpointConnectionNotification for more information on using the ModifyVpcEndpointConnectionNotification
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the ModifyVpcEndpointConnectionNotificationRequest method.
+// req, resp := client.ModifyVpcEndpointConnectionNotificationRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointConnectionNotification
+func (c *EC2) ModifyVpcEndpointConnectionNotificationRequest(input *ModifyVpcEndpointConnectionNotificationInput) (req *request.Request, output *ModifyVpcEndpointConnectionNotificationOutput) {
+ op := &request.Operation{
+ Name: opModifyVpcEndpointConnectionNotification,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ModifyVpcEndpointConnectionNotificationInput{}
+ }
+
+ output = &ModifyVpcEndpointConnectionNotificationOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// ModifyVpcEndpointConnectionNotification API operation for Amazon Elastic Compute Cloud.
+//
+// Modifies a connection notification for VPC endpoint or VPC endpoint service.
+// You can change the SNS topic for the notification, or the events for which
+// to be notified.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation ModifyVpcEndpointConnectionNotification for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointConnectionNotification
+func (c *EC2) ModifyVpcEndpointConnectionNotification(input *ModifyVpcEndpointConnectionNotificationInput) (*ModifyVpcEndpointConnectionNotificationOutput, error) {
+ req, out := c.ModifyVpcEndpointConnectionNotificationRequest(input)
+ return out, req.Send()
+}
+
+// ModifyVpcEndpointConnectionNotificationWithContext is the same as ModifyVpcEndpointConnectionNotification with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyVpcEndpointConnectionNotification for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyVpcEndpointConnectionNotificationWithContext(ctx aws.Context, input *ModifyVpcEndpointConnectionNotificationInput, opts ...request.Option) (*ModifyVpcEndpointConnectionNotificationOutput, error) {
+ req, out := c.ModifyVpcEndpointConnectionNotificationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opModifyVpcEndpointServiceConfiguration = "ModifyVpcEndpointServiceConfiguration"
+
+// ModifyVpcEndpointServiceConfigurationRequest generates a "aws/request.Request" representing the
+// client's request for the ModifyVpcEndpointServiceConfiguration operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See ModifyVpcEndpointServiceConfiguration for more information on using the ModifyVpcEndpointServiceConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the ModifyVpcEndpointServiceConfigurationRequest method.
+// req, resp := client.ModifyVpcEndpointServiceConfigurationRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointServiceConfiguration
+func (c *EC2) ModifyVpcEndpointServiceConfigurationRequest(input *ModifyVpcEndpointServiceConfigurationInput) (req *request.Request, output *ModifyVpcEndpointServiceConfigurationOutput) {
+ op := &request.Operation{
+ Name: opModifyVpcEndpointServiceConfiguration,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ModifyVpcEndpointServiceConfigurationInput{}
+ }
+
+ output = &ModifyVpcEndpointServiceConfigurationOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// ModifyVpcEndpointServiceConfiguration API operation for Amazon Elastic Compute Cloud.
+//
+// Modifies the attributes of your VPC endpoint service configuration. You can
+// change the Network Load Balancers for your service, and you can specify whether
+// acceptance is required for requests to connect to your endpoint service through
+// an interface VPC endpoint.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation ModifyVpcEndpointServiceConfiguration for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointServiceConfiguration
+func (c *EC2) ModifyVpcEndpointServiceConfiguration(input *ModifyVpcEndpointServiceConfigurationInput) (*ModifyVpcEndpointServiceConfigurationOutput, error) {
+ req, out := c.ModifyVpcEndpointServiceConfigurationRequest(input)
+ return out, req.Send()
+}
+
+// ModifyVpcEndpointServiceConfigurationWithContext is the same as ModifyVpcEndpointServiceConfiguration with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyVpcEndpointServiceConfiguration for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyVpcEndpointServiceConfigurationWithContext(ctx aws.Context, input *ModifyVpcEndpointServiceConfigurationInput, opts ...request.Option) (*ModifyVpcEndpointServiceConfigurationOutput, error) {
+ req, out := c.ModifyVpcEndpointServiceConfigurationRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opModifyVpcEndpointServicePermissions = "ModifyVpcEndpointServicePermissions"
+
+// ModifyVpcEndpointServicePermissionsRequest generates a "aws/request.Request" representing the
+// client's request for the ModifyVpcEndpointServicePermissions operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See ModifyVpcEndpointServicePermissions for more information on using the ModifyVpcEndpointServicePermissions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the ModifyVpcEndpointServicePermissionsRequest method.
+// req, resp := client.ModifyVpcEndpointServicePermissionsRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointServicePermissions
+func (c *EC2) ModifyVpcEndpointServicePermissionsRequest(input *ModifyVpcEndpointServicePermissionsInput) (req *request.Request, output *ModifyVpcEndpointServicePermissionsOutput) {
+ op := &request.Operation{
+ Name: opModifyVpcEndpointServicePermissions,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ModifyVpcEndpointServicePermissionsInput{}
+ }
+
+ output = &ModifyVpcEndpointServicePermissionsOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// ModifyVpcEndpointServicePermissions API operation for Amazon Elastic Compute Cloud.
+//
+// Modifies the permissions for your VPC endpoint service (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/endpoint-service.html).
+// You can add or remove permissions for service consumers (IAM users, IAM roles,
+// and AWS accounts) to connect to your endpoint service.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation ModifyVpcEndpointServicePermissions for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointServicePermissions
+func (c *EC2) ModifyVpcEndpointServicePermissions(input *ModifyVpcEndpointServicePermissionsInput) (*ModifyVpcEndpointServicePermissionsOutput, error) {
+ req, out := c.ModifyVpcEndpointServicePermissionsRequest(input)
+ return out, req.Send()
+}
+
+// ModifyVpcEndpointServicePermissionsWithContext is the same as ModifyVpcEndpointServicePermissions with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyVpcEndpointServicePermissions for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyVpcEndpointServicePermissionsWithContext(ctx aws.Context, input *ModifyVpcEndpointServicePermissionsInput, opts ...request.Option) (*ModifyVpcEndpointServicePermissionsOutput, error) {
+ req, out := c.ModifyVpcEndpointServicePermissionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opModifyVpcPeeringConnectionOptions = "ModifyVpcPeeringConnectionOptions"
// ModifyVpcPeeringConnectionOptionsRequest generates a "aws/request.Request" representing the
// client's request for the ModifyVpcPeeringConnectionOptions operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ModifyVpcPeeringConnectionOptions for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ModifyVpcPeeringConnectionOptions method directly
-// instead.
+// See ModifyVpcPeeringConnectionOptions for more information on using the ModifyVpcPeeringConnectionOptions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ModifyVpcPeeringConnectionOptionsRequest method.
// req, resp := client.ModifyVpcPeeringConnectionOptionsRequest(params)
@@ -17079,7 +18994,7 @@ const opModifyVpcPeeringConnectionOptions = "ModifyVpcPeeringConnectionOptions"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcPeeringConnectionOptions
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcPeeringConnectionOptions
func (c *EC2) ModifyVpcPeeringConnectionOptionsRequest(input *ModifyVpcPeeringConnectionOptionsInput) (req *request.Request, output *ModifyVpcPeeringConnectionOptionsOutput) {
op := &request.Operation{
Name: opModifyVpcPeeringConnectionOptions,
@@ -17125,7 +19040,7 @@ func (c *EC2) ModifyVpcPeeringConnectionOptionsRequest(input *ModifyVpcPeeringCo
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ModifyVpcPeeringConnectionOptions for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcPeeringConnectionOptions
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcPeeringConnectionOptions
func (c *EC2) ModifyVpcPeeringConnectionOptions(input *ModifyVpcPeeringConnectionOptionsInput) (*ModifyVpcPeeringConnectionOptionsOutput, error) {
req, out := c.ModifyVpcPeeringConnectionOptionsRequest(input)
return out, req.Send()
@@ -17147,23 +19062,105 @@ func (c *EC2) ModifyVpcPeeringConnectionOptionsWithContext(ctx aws.Context, inpu
return out, req.Send()
}
+const opModifyVpcTenancy = "ModifyVpcTenancy"
+
+// ModifyVpcTenancyRequest generates a "aws/request.Request" representing the
+// client's request for the ModifyVpcTenancy operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See ModifyVpcTenancy for more information on using the ModifyVpcTenancy
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the ModifyVpcTenancyRequest method.
+// req, resp := client.ModifyVpcTenancyRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcTenancy
+func (c *EC2) ModifyVpcTenancyRequest(input *ModifyVpcTenancyInput) (req *request.Request, output *ModifyVpcTenancyOutput) {
+ op := &request.Operation{
+ Name: opModifyVpcTenancy,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ModifyVpcTenancyInput{}
+ }
+
+ output = &ModifyVpcTenancyOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// ModifyVpcTenancy API operation for Amazon Elastic Compute Cloud.
+//
+// Modifies the instance tenancy attribute of the specified VPC. You can change
+// the instance tenancy attribute of a VPC to default only. You cannot change
+// the instance tenancy attribute to dedicated.
+//
+// After you modify the tenancy of the VPC, any new instances that you launch
+// into the VPC have a tenancy of default, unless you specify otherwise during
+// launch. The tenancy of any existing instances in the VPC is not affected.
+//
+// For more information about Dedicated Instances, see Dedicated Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation ModifyVpcTenancy for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcTenancy
+func (c *EC2) ModifyVpcTenancy(input *ModifyVpcTenancyInput) (*ModifyVpcTenancyOutput, error) {
+ req, out := c.ModifyVpcTenancyRequest(input)
+ return out, req.Send()
+}
+
+// ModifyVpcTenancyWithContext is the same as ModifyVpcTenancy with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ModifyVpcTenancy for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ModifyVpcTenancyWithContext(ctx aws.Context, input *ModifyVpcTenancyInput, opts ...request.Option) (*ModifyVpcTenancyOutput, error) {
+ req, out := c.ModifyVpcTenancyRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opMonitorInstances = "MonitorInstances"
// MonitorInstancesRequest generates a "aws/request.Request" representing the
// client's request for the MonitorInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See MonitorInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the MonitorInstances method directly
-// instead.
+// See MonitorInstances for more information on using the MonitorInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the MonitorInstancesRequest method.
// req, resp := client.MonitorInstancesRequest(params)
@@ -17173,7 +19170,7 @@ const opMonitorInstances = "MonitorInstances"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MonitorInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MonitorInstances
func (c *EC2) MonitorInstancesRequest(input *MonitorInstancesInput) (req *request.Request, output *MonitorInstancesOutput) {
op := &request.Operation{
Name: opMonitorInstances,
@@ -17205,7 +19202,7 @@ func (c *EC2) MonitorInstancesRequest(input *MonitorInstancesInput) (req *reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation MonitorInstances for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MonitorInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MonitorInstances
func (c *EC2) MonitorInstances(input *MonitorInstancesInput) (*MonitorInstancesOutput, error) {
req, out := c.MonitorInstancesRequest(input)
return out, req.Send()
@@ -17231,19 +19228,18 @@ const opMoveAddressToVpc = "MoveAddressToVpc"
// MoveAddressToVpcRequest generates a "aws/request.Request" representing the
// client's request for the MoveAddressToVpc operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See MoveAddressToVpc for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the MoveAddressToVpc method directly
-// instead.
+// See MoveAddressToVpc for more information on using the MoveAddressToVpc
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the MoveAddressToVpcRequest method.
// req, resp := client.MoveAddressToVpcRequest(params)
@@ -17253,7 +19249,7 @@ const opMoveAddressToVpc = "MoveAddressToVpc"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MoveAddressToVpc
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MoveAddressToVpc
func (c *EC2) MoveAddressToVpcRequest(input *MoveAddressToVpcInput) (req *request.Request, output *MoveAddressToVpcOutput) {
op := &request.Operation{
Name: opMoveAddressToVpc,
@@ -17286,7 +19282,7 @@ func (c *EC2) MoveAddressToVpcRequest(input *MoveAddressToVpcInput) (req *reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation MoveAddressToVpc for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MoveAddressToVpc
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MoveAddressToVpc
func (c *EC2) MoveAddressToVpc(input *MoveAddressToVpcInput) (*MoveAddressToVpcOutput, error) {
req, out := c.MoveAddressToVpcRequest(input)
return out, req.Send()
@@ -17312,19 +19308,18 @@ const opPurchaseHostReservation = "PurchaseHostReservation"
// PurchaseHostReservationRequest generates a "aws/request.Request" representing the
// client's request for the PurchaseHostReservation operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PurchaseHostReservation for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PurchaseHostReservation method directly
-// instead.
+// See PurchaseHostReservation for more information on using the PurchaseHostReservation
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PurchaseHostReservationRequest method.
// req, resp := client.PurchaseHostReservationRequest(params)
@@ -17334,7 +19329,7 @@ const opPurchaseHostReservation = "PurchaseHostReservation"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseHostReservation
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseHostReservation
func (c *EC2) PurchaseHostReservationRequest(input *PurchaseHostReservationInput) (req *request.Request, output *PurchaseHostReservationOutput) {
op := &request.Operation{
Name: opPurchaseHostReservation,
@@ -17364,7 +19359,7 @@ func (c *EC2) PurchaseHostReservationRequest(input *PurchaseHostReservationInput
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation PurchaseHostReservation for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseHostReservation
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseHostReservation
func (c *EC2) PurchaseHostReservation(input *PurchaseHostReservationInput) (*PurchaseHostReservationOutput, error) {
req, out := c.PurchaseHostReservationRequest(input)
return out, req.Send()
@@ -17390,19 +19385,18 @@ const opPurchaseReservedInstancesOffering = "PurchaseReservedInstancesOffering"
// PurchaseReservedInstancesOfferingRequest generates a "aws/request.Request" representing the
// client's request for the PurchaseReservedInstancesOffering operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PurchaseReservedInstancesOffering for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PurchaseReservedInstancesOffering method directly
-// instead.
+// See PurchaseReservedInstancesOffering for more information on using the PurchaseReservedInstancesOffering
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PurchaseReservedInstancesOfferingRequest method.
// req, resp := client.PurchaseReservedInstancesOfferingRequest(params)
@@ -17412,7 +19406,7 @@ const opPurchaseReservedInstancesOffering = "PurchaseReservedInstancesOffering"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseReservedInstancesOffering
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseReservedInstancesOffering
func (c *EC2) PurchaseReservedInstancesOfferingRequest(input *PurchaseReservedInstancesOfferingInput) (req *request.Request, output *PurchaseReservedInstancesOfferingOutput) {
op := &request.Operation{
Name: opPurchaseReservedInstancesOffering,
@@ -17448,7 +19442,7 @@ func (c *EC2) PurchaseReservedInstancesOfferingRequest(input *PurchaseReservedIn
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation PurchaseReservedInstancesOffering for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseReservedInstancesOffering
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseReservedInstancesOffering
func (c *EC2) PurchaseReservedInstancesOffering(input *PurchaseReservedInstancesOfferingInput) (*PurchaseReservedInstancesOfferingOutput, error) {
req, out := c.PurchaseReservedInstancesOfferingRequest(input)
return out, req.Send()
@@ -17474,19 +19468,18 @@ const opPurchaseScheduledInstances = "PurchaseScheduledInstances"
// PurchaseScheduledInstancesRequest generates a "aws/request.Request" representing the
// client's request for the PurchaseScheduledInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PurchaseScheduledInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PurchaseScheduledInstances method directly
-// instead.
+// See PurchaseScheduledInstances for more information on using the PurchaseScheduledInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PurchaseScheduledInstancesRequest method.
// req, resp := client.PurchaseScheduledInstancesRequest(params)
@@ -17496,7 +19489,7 @@ const opPurchaseScheduledInstances = "PurchaseScheduledInstances"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseScheduledInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseScheduledInstances
func (c *EC2) PurchaseScheduledInstancesRequest(input *PurchaseScheduledInstancesInput) (req *request.Request, output *PurchaseScheduledInstancesOutput) {
op := &request.Operation{
Name: opPurchaseScheduledInstances,
@@ -17532,7 +19525,7 @@ func (c *EC2) PurchaseScheduledInstancesRequest(input *PurchaseScheduledInstance
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation PurchaseScheduledInstances for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseScheduledInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseScheduledInstances
func (c *EC2) PurchaseScheduledInstances(input *PurchaseScheduledInstancesInput) (*PurchaseScheduledInstancesOutput, error) {
req, out := c.PurchaseScheduledInstancesRequest(input)
return out, req.Send()
@@ -17558,19 +19551,18 @@ const opRebootInstances = "RebootInstances"
// RebootInstancesRequest generates a "aws/request.Request" representing the
// client's request for the RebootInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RebootInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RebootInstances method directly
-// instead.
+// See RebootInstances for more information on using the RebootInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RebootInstancesRequest method.
// req, resp := client.RebootInstancesRequest(params)
@@ -17580,7 +19572,7 @@ const opRebootInstances = "RebootInstances"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RebootInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RebootInstances
func (c *EC2) RebootInstancesRequest(input *RebootInstancesInput) (req *request.Request, output *RebootInstancesOutput) {
op := &request.Operation{
Name: opRebootInstances,
@@ -17619,7 +19611,7 @@ func (c *EC2) RebootInstancesRequest(input *RebootInstancesInput) (req *request.
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation RebootInstances for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RebootInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RebootInstances
func (c *EC2) RebootInstances(input *RebootInstancesInput) (*RebootInstancesOutput, error) {
req, out := c.RebootInstancesRequest(input)
return out, req.Send()
@@ -17645,19 +19637,18 @@ const opRegisterImage = "RegisterImage"
// RegisterImageRequest generates a "aws/request.Request" representing the
// client's request for the RegisterImage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RegisterImage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RegisterImage method directly
-// instead.
+// See RegisterImage for more information on using the RegisterImage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RegisterImageRequest method.
// req, resp := client.RegisterImageRequest(params)
@@ -17667,7 +19658,7 @@ const opRegisterImage = "RegisterImage"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RegisterImage
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RegisterImage
func (c *EC2) RegisterImageRequest(input *RegisterImageInput) (req *request.Request, output *RegisterImageOutput) {
op := &request.Operation{
Name: opRegisterImage,
@@ -17722,7 +19713,7 @@ func (c *EC2) RegisterImageRequest(input *RegisterImageInput) (req *request.Requ
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation RegisterImage for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RegisterImage
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RegisterImage
func (c *EC2) RegisterImage(input *RegisterImageInput) (*RegisterImageOutput, error) {
req, out := c.RegisterImageRequest(input)
return out, req.Send()
@@ -17744,23 +19735,97 @@ func (c *EC2) RegisterImageWithContext(ctx aws.Context, input *RegisterImageInpu
return out, req.Send()
}
+const opRejectVpcEndpointConnections = "RejectVpcEndpointConnections"
+
+// RejectVpcEndpointConnectionsRequest generates a "aws/request.Request" representing the
+// client's request for the RejectVpcEndpointConnections operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See RejectVpcEndpointConnections for more information on using the RejectVpcEndpointConnections
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the RejectVpcEndpointConnectionsRequest method.
+// req, resp := client.RejectVpcEndpointConnectionsRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectVpcEndpointConnections
+func (c *EC2) RejectVpcEndpointConnectionsRequest(input *RejectVpcEndpointConnectionsInput) (req *request.Request, output *RejectVpcEndpointConnectionsOutput) {
+ op := &request.Operation{
+ Name: opRejectVpcEndpointConnections,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &RejectVpcEndpointConnectionsInput{}
+ }
+
+ output = &RejectVpcEndpointConnectionsOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// RejectVpcEndpointConnections API operation for Amazon Elastic Compute Cloud.
+//
+// Rejects one or more VPC endpoint connection requests to your VPC endpoint
+// service.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation RejectVpcEndpointConnections for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectVpcEndpointConnections
+func (c *EC2) RejectVpcEndpointConnections(input *RejectVpcEndpointConnectionsInput) (*RejectVpcEndpointConnectionsOutput, error) {
+ req, out := c.RejectVpcEndpointConnectionsRequest(input)
+ return out, req.Send()
+}
+
+// RejectVpcEndpointConnectionsWithContext is the same as RejectVpcEndpointConnections with the addition of
+// the ability to pass a context and additional request options.
+//
+// See RejectVpcEndpointConnections for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) RejectVpcEndpointConnectionsWithContext(ctx aws.Context, input *RejectVpcEndpointConnectionsInput, opts ...request.Option) (*RejectVpcEndpointConnectionsOutput, error) {
+ req, out := c.RejectVpcEndpointConnectionsRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opRejectVpcPeeringConnection = "RejectVpcPeeringConnection"
// RejectVpcPeeringConnectionRequest generates a "aws/request.Request" representing the
// client's request for the RejectVpcPeeringConnection operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RejectVpcPeeringConnection for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RejectVpcPeeringConnection method directly
-// instead.
+// See RejectVpcPeeringConnection for more information on using the RejectVpcPeeringConnection
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RejectVpcPeeringConnectionRequest method.
// req, resp := client.RejectVpcPeeringConnectionRequest(params)
@@ -17770,7 +19835,7 @@ const opRejectVpcPeeringConnection = "RejectVpcPeeringConnection"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectVpcPeeringConnection
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectVpcPeeringConnection
func (c *EC2) RejectVpcPeeringConnectionRequest(input *RejectVpcPeeringConnectionInput) (req *request.Request, output *RejectVpcPeeringConnectionOutput) {
op := &request.Operation{
Name: opRejectVpcPeeringConnection,
@@ -17801,7 +19866,7 @@ func (c *EC2) RejectVpcPeeringConnectionRequest(input *RejectVpcPeeringConnectio
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation RejectVpcPeeringConnection for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectVpcPeeringConnection
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectVpcPeeringConnection
func (c *EC2) RejectVpcPeeringConnection(input *RejectVpcPeeringConnectionInput) (*RejectVpcPeeringConnectionOutput, error) {
req, out := c.RejectVpcPeeringConnectionRequest(input)
return out, req.Send()
@@ -17827,19 +19892,18 @@ const opReleaseAddress = "ReleaseAddress"
// ReleaseAddressRequest generates a "aws/request.Request" representing the
// client's request for the ReleaseAddress operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ReleaseAddress for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ReleaseAddress method directly
-// instead.
+// See ReleaseAddress for more information on using the ReleaseAddress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ReleaseAddressRequest method.
// req, resp := client.ReleaseAddressRequest(params)
@@ -17849,7 +19913,7 @@ const opReleaseAddress = "ReleaseAddress"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseAddress
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseAddress
func (c *EC2) ReleaseAddressRequest(input *ReleaseAddressInput) (req *request.Request, output *ReleaseAddressOutput) {
op := &request.Operation{
Name: opReleaseAddress,
@@ -17872,19 +19936,22 @@ func (c *EC2) ReleaseAddressRequest(input *ReleaseAddressInput) (req *request.Re
//
// Releases the specified Elastic IP address.
//
-// After releasing an Elastic IP address, it is released to the IP address pool
-// and might be unavailable to you. Be sure to update your DNS records and any
-// servers or devices that communicate with the address. If you attempt to release
-// an Elastic IP address that you already released, you'll get an AuthFailure
-// error if the address is already allocated to another AWS account.
-//
// [EC2-Classic, default VPC] Releasing an Elastic IP address automatically
// disassociates it from any instance that it's associated with. To disassociate
// an Elastic IP address without releasing it, use DisassociateAddress.
//
// [Nondefault VPC] You must use DisassociateAddress to disassociate the Elastic
-// IP address before you try to release it. Otherwise, Amazon EC2 returns an
-// error (InvalidIPAddress.InUse).
+// IP address before you can release it. Otherwise, Amazon EC2 returns an error
+// (InvalidIPAddress.InUse).
+//
+// After releasing an Elastic IP address, it is released to the IP address pool.
+// Be sure to update your DNS records and any servers or devices that communicate
+// with the address. If you attempt to release an Elastic IP address that you
+// already released, you'll get an AuthFailure error if the address is already
+// allocated to another AWS account.
+//
+// [EC2-VPC] After you release an Elastic IP address for use in a VPC, you might
+// be able to recover it. For more information, see AllocateAddress.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
@@ -17892,7 +19959,7 @@ func (c *EC2) ReleaseAddressRequest(input *ReleaseAddressInput) (req *request.Re
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ReleaseAddress for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseAddress
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseAddress
func (c *EC2) ReleaseAddress(input *ReleaseAddressInput) (*ReleaseAddressOutput, error) {
req, out := c.ReleaseAddressRequest(input)
return out, req.Send()
@@ -17918,19 +19985,18 @@ const opReleaseHosts = "ReleaseHosts"
// ReleaseHostsRequest generates a "aws/request.Request" representing the
// client's request for the ReleaseHosts operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ReleaseHosts for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ReleaseHosts method directly
-// instead.
+// See ReleaseHosts for more information on using the ReleaseHosts
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ReleaseHostsRequest method.
// req, resp := client.ReleaseHostsRequest(params)
@@ -17940,7 +20006,7 @@ const opReleaseHosts = "ReleaseHosts"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseHosts
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseHosts
func (c *EC2) ReleaseHostsRequest(input *ReleaseHostsInput) (req *request.Request, output *ReleaseHostsOutput) {
op := &request.Operation{
Name: opReleaseHosts,
@@ -17978,7 +20044,7 @@ func (c *EC2) ReleaseHostsRequest(input *ReleaseHostsInput) (req *request.Reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ReleaseHosts for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseHosts
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseHosts
func (c *EC2) ReleaseHosts(input *ReleaseHostsInput) (*ReleaseHostsOutput, error) {
req, out := c.ReleaseHostsRequest(input)
return out, req.Send()
@@ -18004,19 +20070,18 @@ const opReplaceIamInstanceProfileAssociation = "ReplaceIamInstanceProfileAssocia
// ReplaceIamInstanceProfileAssociationRequest generates a "aws/request.Request" representing the
// client's request for the ReplaceIamInstanceProfileAssociation operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ReplaceIamInstanceProfileAssociation for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ReplaceIamInstanceProfileAssociation method directly
-// instead.
+// See ReplaceIamInstanceProfileAssociation for more information on using the ReplaceIamInstanceProfileAssociation
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ReplaceIamInstanceProfileAssociationRequest method.
// req, resp := client.ReplaceIamInstanceProfileAssociationRequest(params)
@@ -18026,7 +20091,7 @@ const opReplaceIamInstanceProfileAssociation = "ReplaceIamInstanceProfileAssocia
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceIamInstanceProfileAssociation
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceIamInstanceProfileAssociation
func (c *EC2) ReplaceIamInstanceProfileAssociationRequest(input *ReplaceIamInstanceProfileAssociationInput) (req *request.Request, output *ReplaceIamInstanceProfileAssociationOutput) {
op := &request.Operation{
Name: opReplaceIamInstanceProfileAssociation,
@@ -18058,7 +20123,7 @@ func (c *EC2) ReplaceIamInstanceProfileAssociationRequest(input *ReplaceIamInsta
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ReplaceIamInstanceProfileAssociation for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceIamInstanceProfileAssociation
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceIamInstanceProfileAssociation
func (c *EC2) ReplaceIamInstanceProfileAssociation(input *ReplaceIamInstanceProfileAssociationInput) (*ReplaceIamInstanceProfileAssociationOutput, error) {
req, out := c.ReplaceIamInstanceProfileAssociationRequest(input)
return out, req.Send()
@@ -18084,19 +20149,18 @@ const opReplaceNetworkAclAssociation = "ReplaceNetworkAclAssociation"
// ReplaceNetworkAclAssociationRequest generates a "aws/request.Request" representing the
// client's request for the ReplaceNetworkAclAssociation operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ReplaceNetworkAclAssociation for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ReplaceNetworkAclAssociation method directly
-// instead.
+// See ReplaceNetworkAclAssociation for more information on using the ReplaceNetworkAclAssociation
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ReplaceNetworkAclAssociationRequest method.
// req, resp := client.ReplaceNetworkAclAssociationRequest(params)
@@ -18106,7 +20170,7 @@ const opReplaceNetworkAclAssociation = "ReplaceNetworkAclAssociation"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclAssociation
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclAssociation
func (c *EC2) ReplaceNetworkAclAssociationRequest(input *ReplaceNetworkAclAssociationInput) (req *request.Request, output *ReplaceNetworkAclAssociationOutput) {
op := &request.Operation{
Name: opReplaceNetworkAclAssociation,
@@ -18130,13 +20194,15 @@ func (c *EC2) ReplaceNetworkAclAssociationRequest(input *ReplaceNetworkAclAssoci
// For more information about network ACLs, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html)
// in the Amazon Virtual Private Cloud User Guide.
//
+// This is an idempotent operation.
+//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ReplaceNetworkAclAssociation for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclAssociation
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclAssociation
func (c *EC2) ReplaceNetworkAclAssociation(input *ReplaceNetworkAclAssociationInput) (*ReplaceNetworkAclAssociationOutput, error) {
req, out := c.ReplaceNetworkAclAssociationRequest(input)
return out, req.Send()
@@ -18162,19 +20228,18 @@ const opReplaceNetworkAclEntry = "ReplaceNetworkAclEntry"
// ReplaceNetworkAclEntryRequest generates a "aws/request.Request" representing the
// client's request for the ReplaceNetworkAclEntry operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ReplaceNetworkAclEntry for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ReplaceNetworkAclEntry method directly
-// instead.
+// See ReplaceNetworkAclEntry for more information on using the ReplaceNetworkAclEntry
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ReplaceNetworkAclEntryRequest method.
// req, resp := client.ReplaceNetworkAclEntryRequest(params)
@@ -18184,7 +20249,7 @@ const opReplaceNetworkAclEntry = "ReplaceNetworkAclEntry"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclEntry
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclEntry
func (c *EC2) ReplaceNetworkAclEntryRequest(input *ReplaceNetworkAclEntryInput) (req *request.Request, output *ReplaceNetworkAclEntryOutput) {
op := &request.Operation{
Name: opReplaceNetworkAclEntry,
@@ -18215,7 +20280,7 @@ func (c *EC2) ReplaceNetworkAclEntryRequest(input *ReplaceNetworkAclEntryInput)
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ReplaceNetworkAclEntry for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclEntry
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclEntry
func (c *EC2) ReplaceNetworkAclEntry(input *ReplaceNetworkAclEntryInput) (*ReplaceNetworkAclEntryOutput, error) {
req, out := c.ReplaceNetworkAclEntryRequest(input)
return out, req.Send()
@@ -18241,19 +20306,18 @@ const opReplaceRoute = "ReplaceRoute"
// ReplaceRouteRequest generates a "aws/request.Request" representing the
// client's request for the ReplaceRoute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ReplaceRoute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ReplaceRoute method directly
-// instead.
+// See ReplaceRoute for more information on using the ReplaceRoute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ReplaceRouteRequest method.
// req, resp := client.ReplaceRouteRequest(params)
@@ -18263,7 +20327,7 @@ const opReplaceRoute = "ReplaceRoute"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRoute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRoute
func (c *EC2) ReplaceRouteRequest(input *ReplaceRouteInput) (req *request.Request, output *ReplaceRouteOutput) {
op := &request.Operation{
Name: opReplaceRoute,
@@ -18298,7 +20362,7 @@ func (c *EC2) ReplaceRouteRequest(input *ReplaceRouteInput) (req *request.Reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ReplaceRoute for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRoute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRoute
func (c *EC2) ReplaceRoute(input *ReplaceRouteInput) (*ReplaceRouteOutput, error) {
req, out := c.ReplaceRouteRequest(input)
return out, req.Send()
@@ -18324,19 +20388,18 @@ const opReplaceRouteTableAssociation = "ReplaceRouteTableAssociation"
// ReplaceRouteTableAssociationRequest generates a "aws/request.Request" representing the
// client's request for the ReplaceRouteTableAssociation operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ReplaceRouteTableAssociation for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ReplaceRouteTableAssociation method directly
-// instead.
+// See ReplaceRouteTableAssociation for more information on using the ReplaceRouteTableAssociation
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ReplaceRouteTableAssociationRequest method.
// req, resp := client.ReplaceRouteTableAssociationRequest(params)
@@ -18346,7 +20409,7 @@ const opReplaceRouteTableAssociation = "ReplaceRouteTableAssociation"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRouteTableAssociation
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRouteTableAssociation
func (c *EC2) ReplaceRouteTableAssociationRequest(input *ReplaceRouteTableAssociationInput) (req *request.Request, output *ReplaceRouteTableAssociationOutput) {
op := &request.Operation{
Name: opReplaceRouteTableAssociation,
@@ -18381,7 +20444,7 @@ func (c *EC2) ReplaceRouteTableAssociationRequest(input *ReplaceRouteTableAssoci
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ReplaceRouteTableAssociation for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRouteTableAssociation
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRouteTableAssociation
func (c *EC2) ReplaceRouteTableAssociation(input *ReplaceRouteTableAssociationInput) (*ReplaceRouteTableAssociationOutput, error) {
req, out := c.ReplaceRouteTableAssociationRequest(input)
return out, req.Send()
@@ -18407,19 +20470,18 @@ const opReportInstanceStatus = "ReportInstanceStatus"
// ReportInstanceStatusRequest generates a "aws/request.Request" representing the
// client's request for the ReportInstanceStatus operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ReportInstanceStatus for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ReportInstanceStatus method directly
-// instead.
+// See ReportInstanceStatus for more information on using the ReportInstanceStatus
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ReportInstanceStatusRequest method.
// req, resp := client.ReportInstanceStatusRequest(params)
@@ -18429,7 +20491,7 @@ const opReportInstanceStatus = "ReportInstanceStatus"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReportInstanceStatus
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReportInstanceStatus
func (c *EC2) ReportInstanceStatusRequest(input *ReportInstanceStatusInput) (req *request.Request, output *ReportInstanceStatusOutput) {
op := &request.Operation{
Name: opReportInstanceStatus,
@@ -18464,7 +20526,7 @@ func (c *EC2) ReportInstanceStatusRequest(input *ReportInstanceStatusInput) (req
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ReportInstanceStatus for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReportInstanceStatus
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReportInstanceStatus
func (c *EC2) ReportInstanceStatus(input *ReportInstanceStatusInput) (*ReportInstanceStatusOutput, error) {
req, out := c.ReportInstanceStatusRequest(input)
return out, req.Send()
@@ -18490,19 +20552,18 @@ const opRequestSpotFleet = "RequestSpotFleet"
// RequestSpotFleetRequest generates a "aws/request.Request" representing the
// client's request for the RequestSpotFleet operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RequestSpotFleet for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RequestSpotFleet method directly
-// instead.
+// See RequestSpotFleet for more information on using the RequestSpotFleet
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RequestSpotFleetRequest method.
// req, resp := client.RequestSpotFleetRequest(params)
@@ -18512,7 +20573,7 @@ const opRequestSpotFleet = "RequestSpotFleet"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotFleet
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotFleet
func (c *EC2) RequestSpotFleetRequest(input *RequestSpotFleetInput) (req *request.Request, output *RequestSpotFleetOutput) {
op := &request.Operation{
Name: opRequestSpotFleet,
@@ -18531,21 +20592,24 @@ func (c *EC2) RequestSpotFleetRequest(input *RequestSpotFleetInput) (req *reques
// RequestSpotFleet API operation for Amazon Elastic Compute Cloud.
//
-// Creates a Spot fleet request.
+// Creates a Spot Fleet request.
//
// You can submit a single request that includes multiple launch specifications
// that vary by instance type, AMI, Availability Zone, or subnet.
//
-// By default, the Spot fleet requests Spot instances in the Spot pool where
+// By default, the Spot Fleet requests Spot Instances in the Spot pool where
// the price per unit is the lowest. Each launch specification can include its
// own instance weighting that reflects the value of the instance type to your
// application workload.
//
-// Alternatively, you can specify that the Spot fleet distribute the target
+// Alternatively, you can specify that the Spot Fleet distribute the target
// capacity across the Spot pools included in its launch specifications. By
-// ensuring that the Spot instances in your Spot fleet are in different Spot
+// ensuring that the Spot Instances in your Spot Fleet are in different Spot
// pools, you can improve the availability of your fleet.
//
+// You can specify tags for the Spot Instances. You cannot tag other resource
+// types in a Spot Fleet request; only the instance resource type is supported.
+//
// For more information, see Spot Fleet Requests (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-requests.html)
// in the Amazon Elastic Compute Cloud User Guide.
//
@@ -18555,7 +20619,7 @@ func (c *EC2) RequestSpotFleetRequest(input *RequestSpotFleetInput) (req *reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation RequestSpotFleet for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotFleet
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotFleet
func (c *EC2) RequestSpotFleet(input *RequestSpotFleetInput) (*RequestSpotFleetOutput, error) {
req, out := c.RequestSpotFleetRequest(input)
return out, req.Send()
@@ -18581,19 +20645,18 @@ const opRequestSpotInstances = "RequestSpotInstances"
// RequestSpotInstancesRequest generates a "aws/request.Request" representing the
// client's request for the RequestSpotInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RequestSpotInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RequestSpotInstances method directly
-// instead.
+// See RequestSpotInstances for more information on using the RequestSpotInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RequestSpotInstancesRequest method.
// req, resp := client.RequestSpotInstancesRequest(params)
@@ -18603,7 +20666,7 @@ const opRequestSpotInstances = "RequestSpotInstances"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotInstances
func (c *EC2) RequestSpotInstancesRequest(input *RequestSpotInstancesInput) (req *request.Request, output *RequestSpotInstancesOutput) {
op := &request.Operation{
Name: opRequestSpotInstances,
@@ -18622,11 +20685,9 @@ func (c *EC2) RequestSpotInstancesRequest(input *RequestSpotInstancesInput) (req
// RequestSpotInstances API operation for Amazon Elastic Compute Cloud.
//
-// Creates a Spot instance request. Spot instances are instances that Amazon
-// EC2 launches when the bid price that you specify exceeds the current Spot
-// price. Amazon EC2 periodically sets the Spot price based on available Spot
-// Instance capacity and current Spot instance requests. For more information,
-// see Spot Instance Requests (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html)
+// Creates a Spot Instance request. Spot Instances are instances that Amazon
+// EC2 launches when the maximum price that you specify exceeds the current
+// Spot price. For more information, see Spot Instance Requests (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html)
// in the Amazon Elastic Compute Cloud User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
@@ -18635,7 +20696,7 @@ func (c *EC2) RequestSpotInstancesRequest(input *RequestSpotInstancesInput) (req
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation RequestSpotInstances for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotInstances
func (c *EC2) RequestSpotInstances(input *RequestSpotInstancesInput) (*RequestSpotInstancesOutput, error) {
req, out := c.RequestSpotInstancesRequest(input)
return out, req.Send()
@@ -18657,23 +20718,97 @@ func (c *EC2) RequestSpotInstancesWithContext(ctx aws.Context, input *RequestSpo
return out, req.Send()
}
+const opResetFpgaImageAttribute = "ResetFpgaImageAttribute"
+
+// ResetFpgaImageAttributeRequest generates a "aws/request.Request" representing the
+// client's request for the ResetFpgaImageAttribute operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See ResetFpgaImageAttribute for more information on using the ResetFpgaImageAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the ResetFpgaImageAttributeRequest method.
+// req, resp := client.ResetFpgaImageAttributeRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetFpgaImageAttribute
+func (c *EC2) ResetFpgaImageAttributeRequest(input *ResetFpgaImageAttributeInput) (req *request.Request, output *ResetFpgaImageAttributeOutput) {
+ op := &request.Operation{
+ Name: opResetFpgaImageAttribute,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ResetFpgaImageAttributeInput{}
+ }
+
+ output = &ResetFpgaImageAttributeOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// ResetFpgaImageAttribute API operation for Amazon Elastic Compute Cloud.
+//
+// Resets the specified attribute of the specified Amazon FPGA Image (AFI) to
+// its default value. You can only reset the load permission attribute.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation ResetFpgaImageAttribute for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetFpgaImageAttribute
+func (c *EC2) ResetFpgaImageAttribute(input *ResetFpgaImageAttributeInput) (*ResetFpgaImageAttributeOutput, error) {
+ req, out := c.ResetFpgaImageAttributeRequest(input)
+ return out, req.Send()
+}
+
+// ResetFpgaImageAttributeWithContext is the same as ResetFpgaImageAttribute with the addition of
+// the ability to pass a context and additional request options.
+//
+// See ResetFpgaImageAttribute for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) ResetFpgaImageAttributeWithContext(ctx aws.Context, input *ResetFpgaImageAttributeInput, opts ...request.Option) (*ResetFpgaImageAttributeOutput, error) {
+ req, out := c.ResetFpgaImageAttributeRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opResetImageAttribute = "ResetImageAttribute"
// ResetImageAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ResetImageAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ResetImageAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ResetImageAttribute method directly
-// instead.
+// See ResetImageAttribute for more information on using the ResetImageAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ResetImageAttributeRequest method.
// req, resp := client.ResetImageAttributeRequest(params)
@@ -18683,7 +20818,7 @@ const opResetImageAttribute = "ResetImageAttribute"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetImageAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetImageAttribute
func (c *EC2) ResetImageAttributeRequest(input *ResetImageAttributeInput) (req *request.Request, output *ResetImageAttributeOutput) {
op := &request.Operation{
Name: opResetImageAttribute,
@@ -18714,7 +20849,7 @@ func (c *EC2) ResetImageAttributeRequest(input *ResetImageAttributeInput) (req *
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ResetImageAttribute for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetImageAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetImageAttribute
func (c *EC2) ResetImageAttribute(input *ResetImageAttributeInput) (*ResetImageAttributeOutput, error) {
req, out := c.ResetImageAttributeRequest(input)
return out, req.Send()
@@ -18740,19 +20875,18 @@ const opResetInstanceAttribute = "ResetInstanceAttribute"
// ResetInstanceAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ResetInstanceAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ResetInstanceAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ResetInstanceAttribute method directly
-// instead.
+// See ResetInstanceAttribute for more information on using the ResetInstanceAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ResetInstanceAttributeRequest method.
// req, resp := client.ResetInstanceAttributeRequest(params)
@@ -18762,7 +20896,7 @@ const opResetInstanceAttribute = "ResetInstanceAttribute"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetInstanceAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetInstanceAttribute
func (c *EC2) ResetInstanceAttributeRequest(input *ResetInstanceAttributeInput) (req *request.Request, output *ResetInstanceAttributeOutput) {
op := &request.Operation{
Name: opResetInstanceAttribute,
@@ -18799,7 +20933,7 @@ func (c *EC2) ResetInstanceAttributeRequest(input *ResetInstanceAttributeInput)
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ResetInstanceAttribute for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetInstanceAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetInstanceAttribute
func (c *EC2) ResetInstanceAttribute(input *ResetInstanceAttributeInput) (*ResetInstanceAttributeOutput, error) {
req, out := c.ResetInstanceAttributeRequest(input)
return out, req.Send()
@@ -18825,19 +20959,18 @@ const opResetNetworkInterfaceAttribute = "ResetNetworkInterfaceAttribute"
// ResetNetworkInterfaceAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ResetNetworkInterfaceAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ResetNetworkInterfaceAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ResetNetworkInterfaceAttribute method directly
-// instead.
+// See ResetNetworkInterfaceAttribute for more information on using the ResetNetworkInterfaceAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ResetNetworkInterfaceAttributeRequest method.
// req, resp := client.ResetNetworkInterfaceAttributeRequest(params)
@@ -18847,7 +20980,7 @@ const opResetNetworkInterfaceAttribute = "ResetNetworkInterfaceAttribute"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetNetworkInterfaceAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetNetworkInterfaceAttribute
func (c *EC2) ResetNetworkInterfaceAttributeRequest(input *ResetNetworkInterfaceAttributeInput) (req *request.Request, output *ResetNetworkInterfaceAttributeOutput) {
op := &request.Operation{
Name: opResetNetworkInterfaceAttribute,
@@ -18877,7 +21010,7 @@ func (c *EC2) ResetNetworkInterfaceAttributeRequest(input *ResetNetworkInterface
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ResetNetworkInterfaceAttribute for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetNetworkInterfaceAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetNetworkInterfaceAttribute
func (c *EC2) ResetNetworkInterfaceAttribute(input *ResetNetworkInterfaceAttributeInput) (*ResetNetworkInterfaceAttributeOutput, error) {
req, out := c.ResetNetworkInterfaceAttributeRequest(input)
return out, req.Send()
@@ -18903,19 +21036,18 @@ const opResetSnapshotAttribute = "ResetSnapshotAttribute"
// ResetSnapshotAttributeRequest generates a "aws/request.Request" representing the
// client's request for the ResetSnapshotAttribute operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ResetSnapshotAttribute for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ResetSnapshotAttribute method directly
-// instead.
+// See ResetSnapshotAttribute for more information on using the ResetSnapshotAttribute
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ResetSnapshotAttributeRequest method.
// req, resp := client.ResetSnapshotAttributeRequest(params)
@@ -18925,7 +21057,7 @@ const opResetSnapshotAttribute = "ResetSnapshotAttribute"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetSnapshotAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetSnapshotAttribute
func (c *EC2) ResetSnapshotAttributeRequest(input *ResetSnapshotAttributeInput) (req *request.Request, output *ResetSnapshotAttributeOutput) {
op := &request.Operation{
Name: opResetSnapshotAttribute,
@@ -18958,7 +21090,7 @@ func (c *EC2) ResetSnapshotAttributeRequest(input *ResetSnapshotAttributeInput)
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation ResetSnapshotAttribute for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetSnapshotAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetSnapshotAttribute
func (c *EC2) ResetSnapshotAttribute(input *ResetSnapshotAttributeInput) (*ResetSnapshotAttributeOutput, error) {
req, out := c.ResetSnapshotAttributeRequest(input)
return out, req.Send()
@@ -18984,19 +21116,18 @@ const opRestoreAddressToClassic = "RestoreAddressToClassic"
// RestoreAddressToClassicRequest generates a "aws/request.Request" representing the
// client's request for the RestoreAddressToClassic operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RestoreAddressToClassic for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RestoreAddressToClassic method directly
-// instead.
+// See RestoreAddressToClassic for more information on using the RestoreAddressToClassic
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RestoreAddressToClassicRequest method.
// req, resp := client.RestoreAddressToClassicRequest(params)
@@ -19006,7 +21137,7 @@ const opRestoreAddressToClassic = "RestoreAddressToClassic"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RestoreAddressToClassic
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RestoreAddressToClassic
func (c *EC2) RestoreAddressToClassicRequest(input *RestoreAddressToClassicInput) (req *request.Request, output *RestoreAddressToClassicOutput) {
op := &request.Operation{
Name: opRestoreAddressToClassic,
@@ -19036,7 +21167,7 @@ func (c *EC2) RestoreAddressToClassicRequest(input *RestoreAddressToClassicInput
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation RestoreAddressToClassic for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RestoreAddressToClassic
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RestoreAddressToClassic
func (c *EC2) RestoreAddressToClassic(input *RestoreAddressToClassicInput) (*RestoreAddressToClassicOutput, error) {
req, out := c.RestoreAddressToClassicRequest(input)
return out, req.Send()
@@ -19062,19 +21193,18 @@ const opRevokeSecurityGroupEgress = "RevokeSecurityGroupEgress"
// RevokeSecurityGroupEgressRequest generates a "aws/request.Request" representing the
// client's request for the RevokeSecurityGroupEgress operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RevokeSecurityGroupEgress for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RevokeSecurityGroupEgress method directly
-// instead.
+// See RevokeSecurityGroupEgress for more information on using the RevokeSecurityGroupEgress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RevokeSecurityGroupEgressRequest method.
// req, resp := client.RevokeSecurityGroupEgressRequest(params)
@@ -19084,7 +21214,7 @@ const opRevokeSecurityGroupEgress = "RevokeSecurityGroupEgress"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupEgress
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupEgress
func (c *EC2) RevokeSecurityGroupEgressRequest(input *RevokeSecurityGroupEgressInput) (req *request.Request, output *RevokeSecurityGroupEgressOutput) {
op := &request.Operation{
Name: opRevokeSecurityGroupEgress,
@@ -19107,13 +21237,14 @@ func (c *EC2) RevokeSecurityGroupEgressRequest(input *RevokeSecurityGroupEgressI
//
// [EC2-VPC only] Removes one or more egress rules from a security group for
// EC2-VPC. This action doesn't apply to security groups for use in EC2-Classic.
-// The values that you specify in the revoke request (for example, ports) must
-// match the existing rule's values for the rule to be revoked.
+// To remove a rule, the values that you specify (for example, ports) must match
+// the existing rule's values exactly.
//
// Each rule consists of the protocol and the IPv4 or IPv6 CIDR range or source
// security group. For the TCP and UDP protocols, you must also specify the
// destination port or range of ports. For the ICMP protocol, you must also
-// specify the ICMP type and code.
+// specify the ICMP type and code. If the security group rule has a description,
+// you do not have to specify the description to revoke the rule.
//
// Rule changes are propagated to instances within the security group as quickly
// as possible. However, a small delay might occur.
@@ -19124,7 +21255,7 @@ func (c *EC2) RevokeSecurityGroupEgressRequest(input *RevokeSecurityGroupEgressI
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation RevokeSecurityGroupEgress for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupEgress
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupEgress
func (c *EC2) RevokeSecurityGroupEgress(input *RevokeSecurityGroupEgressInput) (*RevokeSecurityGroupEgressOutput, error) {
req, out := c.RevokeSecurityGroupEgressRequest(input)
return out, req.Send()
@@ -19150,19 +21281,18 @@ const opRevokeSecurityGroupIngress = "RevokeSecurityGroupIngress"
// RevokeSecurityGroupIngressRequest generates a "aws/request.Request" representing the
// client's request for the RevokeSecurityGroupIngress operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RevokeSecurityGroupIngress for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RevokeSecurityGroupIngress method directly
-// instead.
+// See RevokeSecurityGroupIngress for more information on using the RevokeSecurityGroupIngress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RevokeSecurityGroupIngressRequest method.
// req, resp := client.RevokeSecurityGroupIngressRequest(params)
@@ -19172,7 +21302,7 @@ const opRevokeSecurityGroupIngress = "RevokeSecurityGroupIngress"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupIngress
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupIngress
func (c *EC2) RevokeSecurityGroupIngressRequest(input *RevokeSecurityGroupIngressInput) (req *request.Request, output *RevokeSecurityGroupIngressOutput) {
op := &request.Operation{
Name: opRevokeSecurityGroupIngress,
@@ -19193,14 +21323,19 @@ func (c *EC2) RevokeSecurityGroupIngressRequest(input *RevokeSecurityGroupIngres
// RevokeSecurityGroupIngress API operation for Amazon Elastic Compute Cloud.
//
-// Removes one or more ingress rules from a security group. The values that
-// you specify in the revoke request (for example, ports) must match the existing
-// rule's values for the rule to be removed.
+// Removes one or more ingress rules from a security group. To remove a rule,
+// the values that you specify (for example, ports) must match the existing
+// rule's values exactly.
+//
+// [EC2-Classic security groups only] If the values you specify do not match
+// the existing rule's values, no error is returned. Use DescribeSecurityGroups
+// to verify that the rule has been removed.
//
// Each rule consists of the protocol and the CIDR range or source security
// group. For the TCP and UDP protocols, you must also specify the destination
// port or range of ports. For the ICMP protocol, you must also specify the
-// ICMP type and code.
+// ICMP type and code. If the security group rule has a description, you do
+// not have to specify the description to revoke the rule.
//
// Rule changes are propagated to instances within the security group as quickly
// as possible. However, a small delay might occur.
@@ -19211,7 +21346,7 @@ func (c *EC2) RevokeSecurityGroupIngressRequest(input *RevokeSecurityGroupIngres
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation RevokeSecurityGroupIngress for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupIngress
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupIngress
func (c *EC2) RevokeSecurityGroupIngress(input *RevokeSecurityGroupIngressInput) (*RevokeSecurityGroupIngressOutput, error) {
req, out := c.RevokeSecurityGroupIngressRequest(input)
return out, req.Send()
@@ -19237,19 +21372,18 @@ const opRunInstances = "RunInstances"
// RunInstancesRequest generates a "aws/request.Request" representing the
// client's request for the RunInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RunInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RunInstances method directly
-// instead.
+// See RunInstances for more information on using the RunInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RunInstancesRequest method.
// req, resp := client.RunInstancesRequest(params)
@@ -19259,7 +21393,7 @@ const opRunInstances = "RunInstances"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunInstances
func (c *EC2) RunInstancesRequest(input *RunInstancesInput) (req *request.Request, output *Reservation) {
op := &request.Operation{
Name: opRunInstances,
@@ -19308,9 +21442,14 @@ func (c *EC2) RunInstancesRequest(input *RunInstancesInput) (req *request.Reques
// * If any of the AMIs have a product code attached for which the user has
// not subscribed, the request fails.
//
+// You can create a launch template (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html),
+// which is a resource that contains the parameters to launch an instance. When
+// you launch an instance using RunInstances, you can specify the launch template
+// instead of specifying the launch parameters.
+//
// To ensure faster instance launches, break up large requests into smaller
-// batches. For example, create 5 separate launch requests for 100 instances
-// each instead of 1 launch request for 500 instances.
+// batches. For example, create five separate launch requests for 100 instances
+// each instead of one launch request for 500 instances.
//
// An instance is ready for you to use when it's in the running state. You can
// check the state of your instance using DescribeInstances. You can tag instances
@@ -19334,7 +21473,7 @@ func (c *EC2) RunInstancesRequest(input *RunInstancesInput) (req *request.Reques
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation RunInstances for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunInstances
func (c *EC2) RunInstances(input *RunInstancesInput) (*Reservation, error) {
req, out := c.RunInstancesRequest(input)
return out, req.Send()
@@ -19360,19 +21499,18 @@ const opRunScheduledInstances = "RunScheduledInstances"
// RunScheduledInstancesRequest generates a "aws/request.Request" representing the
// client's request for the RunScheduledInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RunScheduledInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RunScheduledInstances method directly
-// instead.
+// See RunScheduledInstances for more information on using the RunScheduledInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RunScheduledInstancesRequest method.
// req, resp := client.RunScheduledInstancesRequest(params)
@@ -19382,7 +21520,7 @@ const opRunScheduledInstances = "RunScheduledInstances"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunScheduledInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunScheduledInstances
func (c *EC2) RunScheduledInstancesRequest(input *RunScheduledInstancesInput) (req *request.Request, output *RunScheduledInstancesOutput) {
op := &request.Operation{
Name: opRunScheduledInstances,
@@ -19419,7 +21557,7 @@ func (c *EC2) RunScheduledInstancesRequest(input *RunScheduledInstancesInput) (r
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation RunScheduledInstances for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunScheduledInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunScheduledInstances
func (c *EC2) RunScheduledInstances(input *RunScheduledInstancesInput) (*RunScheduledInstancesOutput, error) {
req, out := c.RunScheduledInstancesRequest(input)
return out, req.Send()
@@ -19445,19 +21583,18 @@ const opStartInstances = "StartInstances"
// StartInstancesRequest generates a "aws/request.Request" representing the
// client's request for the StartInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See StartInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the StartInstances method directly
-// instead.
+// See StartInstances for more information on using the StartInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the StartInstancesRequest method.
// req, resp := client.StartInstancesRequest(params)
@@ -19467,7 +21604,7 @@ const opStartInstances = "StartInstances"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StartInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StartInstances
func (c *EC2) StartInstancesRequest(input *StartInstancesInput) (req *request.Request, output *StartInstancesOutput) {
op := &request.Operation{
Name: opStartInstances,
@@ -19486,16 +21623,20 @@ func (c *EC2) StartInstancesRequest(input *StartInstancesInput) (req *request.Re
// StartInstances API operation for Amazon Elastic Compute Cloud.
//
-// Starts an Amazon EBS-backed AMI that you've previously stopped.
+// Starts an Amazon EBS-backed instance that you've previously stopped.
//
// Instances that use Amazon EBS volumes as their root devices can be quickly
// stopped and started. When an instance is stopped, the compute resources are
-// released and you are not billed for hourly instance usage. However, your
-// root partition Amazon EBS volume remains, continues to persist your data,
-// and you are charged for Amazon EBS volume usage. You can restart your instance
-// at any time. Each time you transition an instance from stopped to started,
-// Amazon EC2 charges a full instance hour, even if transitions happen multiple
-// times within a single hour.
+// released and you are not billed for instance usage. However, your root partition
+// Amazon EBS volume remains and continues to persist your data, and you are
+// charged for Amazon EBS volume usage. You can restart your instance at any
+// time. Every time you start your Windows instance, Amazon EC2 charges you
+// for a full instance hour. If you stop and restart your Windows instance,
+// a new instance hour begins and Amazon EC2 charges you for another full instance
+// hour even if you are still within the same 60-minute period when it was stopped.
+// Every time you start your Linux instance, Amazon EC2 charges a one-minute
+// minimum for instance usage, and thereafter charges per second for instance
+// usage.
//
// Before stopping an instance, make sure it is in a state from which it can
// be restarted. Stopping an instance does not preserve data stored in RAM.
@@ -19512,7 +21653,7 @@ func (c *EC2) StartInstancesRequest(input *StartInstancesInput) (req *request.Re
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation StartInstances for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StartInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StartInstances
func (c *EC2) StartInstances(input *StartInstancesInput) (*StartInstancesOutput, error) {
req, out := c.StartInstancesRequest(input)
return out, req.Send()
@@ -19538,19 +21679,18 @@ const opStopInstances = "StopInstances"
// StopInstancesRequest generates a "aws/request.Request" representing the
// client's request for the StopInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See StopInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the StopInstances method directly
-// instead.
+// See StopInstances for more information on using the StopInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the StopInstancesRequest method.
// req, resp := client.StopInstancesRequest(params)
@@ -19560,7 +21700,7 @@ const opStopInstances = "StopInstances"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StopInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StopInstances
func (c *EC2) StopInstancesRequest(input *StopInstancesInput) (req *request.Request, output *StopInstancesOutput) {
op := &request.Operation{
Name: opStopInstances,
@@ -19581,14 +21721,17 @@ func (c *EC2) StopInstancesRequest(input *StopInstancesInput) (req *request.Requ
//
// Stops an Amazon EBS-backed instance.
//
-// We don't charge hourly usage for a stopped instance, or data transfer fees;
-// however, your root partition Amazon EBS volume remains, continues to persist
-// your data, and you are charged for Amazon EBS volume usage. Each time you
-// transition an instance from stopped to started, Amazon EC2 charges a full
-// instance hour, even if transitions happen multiple times within a single
-// hour.
+// We don't charge usage for a stopped instance, or data transfer fees; however,
+// your root partition Amazon EBS volume remains and continues to persist your
+// data, and you are charged for Amazon EBS volume usage. Every time you start
+// your Windows instance, Amazon EC2 charges you for a full instance hour. If
+// you stop and restart your Windows instance, a new instance hour begins and
+// Amazon EC2 charges you for another full instance hour even if you are still
+// within the same 60-minute period when it was stopped. Every time you start
+// your Linux instance, Amazon EC2 charges a one-minute minimum for instance
+// usage, and thereafter charges per second for instance usage.
//
-// You can't start or stop Spot instances, and you can't stop instance store-backed
+// You can't start or stop Spot Instances, and you can't stop instance store-backed
// instances.
//
// When you stop an instance, we shut it down. You can restart your instance
@@ -19616,7 +21759,7 @@ func (c *EC2) StopInstancesRequest(input *StopInstancesInput) (req *request.Requ
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation StopInstances for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StopInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StopInstances
func (c *EC2) StopInstances(input *StopInstancesInput) (*StopInstancesOutput, error) {
req, out := c.StopInstancesRequest(input)
return out, req.Send()
@@ -19642,19 +21785,18 @@ const opTerminateInstances = "TerminateInstances"
// TerminateInstancesRequest generates a "aws/request.Request" representing the
// client's request for the TerminateInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See TerminateInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the TerminateInstances method directly
-// instead.
+// See TerminateInstances for more information on using the TerminateInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the TerminateInstancesRequest method.
// req, resp := client.TerminateInstancesRequest(params)
@@ -19664,7 +21806,7 @@ const opTerminateInstances = "TerminateInstances"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TerminateInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TerminateInstances
func (c *EC2) TerminateInstancesRequest(input *TerminateInstancesInput) (req *request.Request, output *TerminateInstancesOutput) {
op := &request.Operation{
Name: opTerminateInstances,
@@ -19715,7 +21857,7 @@ func (c *EC2) TerminateInstancesRequest(input *TerminateInstancesInput) (req *re
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation TerminateInstances for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TerminateInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TerminateInstances
func (c *EC2) TerminateInstances(input *TerminateInstancesInput) (*TerminateInstancesOutput, error) {
req, out := c.TerminateInstancesRequest(input)
return out, req.Send()
@@ -19741,19 +21883,18 @@ const opUnassignIpv6Addresses = "UnassignIpv6Addresses"
// UnassignIpv6AddressesRequest generates a "aws/request.Request" representing the
// client's request for the UnassignIpv6Addresses operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See UnassignIpv6Addresses for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the UnassignIpv6Addresses method directly
-// instead.
+// See UnassignIpv6Addresses for more information on using the UnassignIpv6Addresses
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the UnassignIpv6AddressesRequest method.
// req, resp := client.UnassignIpv6AddressesRequest(params)
@@ -19763,7 +21904,7 @@ const opUnassignIpv6Addresses = "UnassignIpv6Addresses"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignIpv6Addresses
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignIpv6Addresses
func (c *EC2) UnassignIpv6AddressesRequest(input *UnassignIpv6AddressesInput) (req *request.Request, output *UnassignIpv6AddressesOutput) {
op := &request.Operation{
Name: opUnassignIpv6Addresses,
@@ -19790,7 +21931,7 @@ func (c *EC2) UnassignIpv6AddressesRequest(input *UnassignIpv6AddressesInput) (r
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation UnassignIpv6Addresses for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignIpv6Addresses
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignIpv6Addresses
func (c *EC2) UnassignIpv6Addresses(input *UnassignIpv6AddressesInput) (*UnassignIpv6AddressesOutput, error) {
req, out := c.UnassignIpv6AddressesRequest(input)
return out, req.Send()
@@ -19816,19 +21957,18 @@ const opUnassignPrivateIpAddresses = "UnassignPrivateIpAddresses"
// UnassignPrivateIpAddressesRequest generates a "aws/request.Request" representing the
// client's request for the UnassignPrivateIpAddresses operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See UnassignPrivateIpAddresses for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the UnassignPrivateIpAddresses method directly
-// instead.
+// See UnassignPrivateIpAddresses for more information on using the UnassignPrivateIpAddresses
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the UnassignPrivateIpAddressesRequest method.
// req, resp := client.UnassignPrivateIpAddressesRequest(params)
@@ -19838,7 +21978,7 @@ const opUnassignPrivateIpAddresses = "UnassignPrivateIpAddresses"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignPrivateIpAddresses
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignPrivateIpAddresses
func (c *EC2) UnassignPrivateIpAddressesRequest(input *UnassignPrivateIpAddressesInput) (req *request.Request, output *UnassignPrivateIpAddressesOutput) {
op := &request.Operation{
Name: opUnassignPrivateIpAddresses,
@@ -19867,7 +22007,7 @@ func (c *EC2) UnassignPrivateIpAddressesRequest(input *UnassignPrivateIpAddresse
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation UnassignPrivateIpAddresses for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignPrivateIpAddresses
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignPrivateIpAddresses
func (c *EC2) UnassignPrivateIpAddresses(input *UnassignPrivateIpAddressesInput) (*UnassignPrivateIpAddressesOutput, error) {
req, out := c.UnassignPrivateIpAddressesRequest(input)
return out, req.Send()
@@ -19893,19 +22033,18 @@ const opUnmonitorInstances = "UnmonitorInstances"
// UnmonitorInstancesRequest generates a "aws/request.Request" representing the
// client's request for the UnmonitorInstances operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See UnmonitorInstances for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the UnmonitorInstances method directly
-// instead.
+// See UnmonitorInstances for more information on using the UnmonitorInstances
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the UnmonitorInstancesRequest method.
// req, resp := client.UnmonitorInstancesRequest(params)
@@ -19915,7 +22054,7 @@ const opUnmonitorInstances = "UnmonitorInstances"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnmonitorInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnmonitorInstances
func (c *EC2) UnmonitorInstancesRequest(input *UnmonitorInstancesInput) (req *request.Request, output *UnmonitorInstancesOutput) {
op := &request.Operation{
Name: opUnmonitorInstances,
@@ -19944,7 +22083,7 @@ func (c *EC2) UnmonitorInstancesRequest(input *UnmonitorInstancesInput) (req *re
//
// See the AWS API reference guide for Amazon Elastic Compute Cloud's
// API operation UnmonitorInstances for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnmonitorInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnmonitorInstances
func (c *EC2) UnmonitorInstances(input *UnmonitorInstancesInput) (*UnmonitorInstancesOutput, error) {
req, out := c.UnmonitorInstancesRequest(input)
return out, req.Send()
@@ -19966,8 +22105,168 @@ func (c *EC2) UnmonitorInstancesWithContext(ctx aws.Context, input *UnmonitorIns
return out, req.Send()
}
+const opUpdateSecurityGroupRuleDescriptionsEgress = "UpdateSecurityGroupRuleDescriptionsEgress"
+
+// UpdateSecurityGroupRuleDescriptionsEgressRequest generates a "aws/request.Request" representing the
+// client's request for the UpdateSecurityGroupRuleDescriptionsEgress operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See UpdateSecurityGroupRuleDescriptionsEgress for more information on using the UpdateSecurityGroupRuleDescriptionsEgress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the UpdateSecurityGroupRuleDescriptionsEgressRequest method.
+// req, resp := client.UpdateSecurityGroupRuleDescriptionsEgressRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UpdateSecurityGroupRuleDescriptionsEgress
+func (c *EC2) UpdateSecurityGroupRuleDescriptionsEgressRequest(input *UpdateSecurityGroupRuleDescriptionsEgressInput) (req *request.Request, output *UpdateSecurityGroupRuleDescriptionsEgressOutput) {
+ op := &request.Operation{
+ Name: opUpdateSecurityGroupRuleDescriptionsEgress,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &UpdateSecurityGroupRuleDescriptionsEgressInput{}
+ }
+
+ output = &UpdateSecurityGroupRuleDescriptionsEgressOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// UpdateSecurityGroupRuleDescriptionsEgress API operation for Amazon Elastic Compute Cloud.
+//
+// [EC2-VPC only] Updates the description of an egress (outbound) security group
+// rule. You can replace an existing description, or add a description to a
+// rule that did not have one previously.
+//
+// You specify the description as part of the IP permissions structure. You
+// can remove a description for a security group rule by omitting the description
+// parameter in the request.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation UpdateSecurityGroupRuleDescriptionsEgress for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UpdateSecurityGroupRuleDescriptionsEgress
+func (c *EC2) UpdateSecurityGroupRuleDescriptionsEgress(input *UpdateSecurityGroupRuleDescriptionsEgressInput) (*UpdateSecurityGroupRuleDescriptionsEgressOutput, error) {
+ req, out := c.UpdateSecurityGroupRuleDescriptionsEgressRequest(input)
+ return out, req.Send()
+}
+
+// UpdateSecurityGroupRuleDescriptionsEgressWithContext is the same as UpdateSecurityGroupRuleDescriptionsEgress with the addition of
+// the ability to pass a context and additional request options.
+//
+// See UpdateSecurityGroupRuleDescriptionsEgress for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) UpdateSecurityGroupRuleDescriptionsEgressWithContext(ctx aws.Context, input *UpdateSecurityGroupRuleDescriptionsEgressInput, opts ...request.Option) (*UpdateSecurityGroupRuleDescriptionsEgressOutput, error) {
+ req, out := c.UpdateSecurityGroupRuleDescriptionsEgressRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
+const opUpdateSecurityGroupRuleDescriptionsIngress = "UpdateSecurityGroupRuleDescriptionsIngress"
+
+// UpdateSecurityGroupRuleDescriptionsIngressRequest generates a "aws/request.Request" representing the
+// client's request for the UpdateSecurityGroupRuleDescriptionsIngress operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See UpdateSecurityGroupRuleDescriptionsIngress for more information on using the UpdateSecurityGroupRuleDescriptionsIngress
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the UpdateSecurityGroupRuleDescriptionsIngressRequest method.
+// req, resp := client.UpdateSecurityGroupRuleDescriptionsIngressRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UpdateSecurityGroupRuleDescriptionsIngress
+func (c *EC2) UpdateSecurityGroupRuleDescriptionsIngressRequest(input *UpdateSecurityGroupRuleDescriptionsIngressInput) (req *request.Request, output *UpdateSecurityGroupRuleDescriptionsIngressOutput) {
+ op := &request.Operation{
+ Name: opUpdateSecurityGroupRuleDescriptionsIngress,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &UpdateSecurityGroupRuleDescriptionsIngressInput{}
+ }
+
+ output = &UpdateSecurityGroupRuleDescriptionsIngressOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// UpdateSecurityGroupRuleDescriptionsIngress API operation for Amazon Elastic Compute Cloud.
+//
+// Updates the description of an ingress (inbound) security group rule. You
+// can replace an existing description, or add a description to a rule that
+// did not have one previously.
+//
+// You specify the description as part of the IP permissions structure. You
+// can remove a description for a security group rule by omitting the description
+// parameter in the request.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Elastic Compute Cloud's
+// API operation UpdateSecurityGroupRuleDescriptionsIngress for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UpdateSecurityGroupRuleDescriptionsIngress
+func (c *EC2) UpdateSecurityGroupRuleDescriptionsIngress(input *UpdateSecurityGroupRuleDescriptionsIngressInput) (*UpdateSecurityGroupRuleDescriptionsIngressOutput, error) {
+ req, out := c.UpdateSecurityGroupRuleDescriptionsIngressRequest(input)
+ return out, req.Send()
+}
+
+// UpdateSecurityGroupRuleDescriptionsIngressWithContext is the same as UpdateSecurityGroupRuleDescriptionsIngress with the addition of
+// the ability to pass a context and additional request options.
+//
+// See UpdateSecurityGroupRuleDescriptionsIngress for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *EC2) UpdateSecurityGroupRuleDescriptionsIngressWithContext(ctx aws.Context, input *UpdateSecurityGroupRuleDescriptionsIngressInput, opts ...request.Option) (*UpdateSecurityGroupRuleDescriptionsIngressOutput, error) {
+ req, out := c.UpdateSecurityGroupRuleDescriptionsIngressRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
// Contains the parameters for accepting the quote.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptReservedInstancesExchangeQuoteRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptReservedInstancesExchangeQuoteRequest
type AcceptReservedInstancesExchangeQuoteInput struct {
_ struct{} `type:"structure"`
@@ -19977,14 +22276,14 @@ type AcceptReservedInstancesExchangeQuoteInput struct {
// it is UnauthorizedOperation.
DryRun *bool `type:"boolean"`
- // The IDs of the Convertible Reserved Instances to exchange for other Convertible
- // Reserved Instances of the same or higher value.
+ // The IDs of the Convertible Reserved Instances to exchange for another Convertible
+ // Reserved Instance of the same or higher value.
//
// ReservedInstanceIds is a required field
ReservedInstanceIds []*string `locationName:"ReservedInstanceId" locationNameList:"ReservedInstanceId" type:"list" required:"true"`
- // The configurations of the Convertible Reserved Instance offerings that you
- // are purchasing in this exchange.
+ // The configuration of the target Convertible Reserved Instance to exchange
+ // for your current Convertible Reserved Instances.
TargetConfigurations []*TargetConfigurationRequest `locationName:"TargetConfiguration" locationNameList:"TargetConfigurationRequest" type:"list"`
}
@@ -20040,7 +22339,7 @@ func (s *AcceptReservedInstancesExchangeQuoteInput) SetTargetConfigurations(v []
}
// The result of the exchange and whether it was successful.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptReservedInstancesExchangeQuoteResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptReservedInstancesExchangeQuoteResult
type AcceptReservedInstancesExchangeQuoteOutput struct {
_ struct{} `type:"structure"`
@@ -20064,8 +22363,97 @@ func (s *AcceptReservedInstancesExchangeQuoteOutput) SetExchangeId(v string) *Ac
return s
}
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptVpcEndpointConnectionsRequest
+type AcceptVpcEndpointConnectionsInput struct {
+ _ struct{} `type:"structure"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The ID of the endpoint service.
+ //
+ // ServiceId is a required field
+ ServiceId *string `type:"string" required:"true"`
+
+ // The IDs of one or more interface VPC endpoints.
+ //
+ // VpcEndpointIds is a required field
+ VpcEndpointIds []*string `locationName:"VpcEndpointId" locationNameList:"item" type:"list" required:"true"`
+}
+
+// String returns the string representation
+func (s AcceptVpcEndpointConnectionsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AcceptVpcEndpointConnectionsInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *AcceptVpcEndpointConnectionsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "AcceptVpcEndpointConnectionsInput"}
+ if s.ServiceId == nil {
+ invalidParams.Add(request.NewErrParamRequired("ServiceId"))
+ }
+ if s.VpcEndpointIds == nil {
+ invalidParams.Add(request.NewErrParamRequired("VpcEndpointIds"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *AcceptVpcEndpointConnectionsInput) SetDryRun(v bool) *AcceptVpcEndpointConnectionsInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetServiceId sets the ServiceId field's value.
+func (s *AcceptVpcEndpointConnectionsInput) SetServiceId(v string) *AcceptVpcEndpointConnectionsInput {
+ s.ServiceId = &v
+ return s
+}
+
+// SetVpcEndpointIds sets the VpcEndpointIds field's value.
+func (s *AcceptVpcEndpointConnectionsInput) SetVpcEndpointIds(v []*string) *AcceptVpcEndpointConnectionsInput {
+ s.VpcEndpointIds = v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptVpcEndpointConnectionsResult
+type AcceptVpcEndpointConnectionsOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Information about the interface endpoints that were not accepted, if applicable.
+ Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"`
+}
+
+// String returns the string representation
+func (s AcceptVpcEndpointConnectionsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AcceptVpcEndpointConnectionsOutput) GoString() string {
+ return s.String()
+}
+
+// SetUnsuccessful sets the Unsuccessful field's value.
+func (s *AcceptVpcEndpointConnectionsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *AcceptVpcEndpointConnectionsOutput {
+ s.Unsuccessful = v
+ return s
+}
+
// Contains the parameters for AcceptVpcPeeringConnection.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptVpcPeeringConnectionRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptVpcPeeringConnectionRequest
type AcceptVpcPeeringConnectionInput struct {
_ struct{} `type:"structure"`
@@ -20075,7 +22463,8 @@ type AcceptVpcPeeringConnectionInput struct {
// it is UnauthorizedOperation.
DryRun *bool `locationName:"dryRun" type:"boolean"`
- // The ID of the VPC peering connection.
+ // The ID of the VPC peering connection. You must specify this parameter in
+ // the request.
VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"`
}
@@ -20102,7 +22491,7 @@ func (s *AcceptVpcPeeringConnectionInput) SetVpcPeeringConnectionId(v string) *A
}
// Contains the output of AcceptVpcPeeringConnection.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptVpcPeeringConnectionResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptVpcPeeringConnectionResult
type AcceptVpcPeeringConnectionOutput struct {
_ struct{} `type:"structure"`
@@ -20127,7 +22516,7 @@ func (s *AcceptVpcPeeringConnectionOutput) SetVpcPeeringConnection(v *VpcPeering
}
// Describes an account attribute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AccountAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AccountAttribute
type AccountAttribute struct {
_ struct{} `type:"structure"`
@@ -20161,7 +22550,7 @@ func (s *AccountAttribute) SetAttributeValues(v []*AccountAttributeValue) *Accou
}
// Describes a value of an account attribute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AccountAttributeValue
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AccountAttributeValue
type AccountAttributeValue struct {
_ struct{} `type:"structure"`
@@ -20185,8 +22574,8 @@ func (s *AccountAttributeValue) SetAttributeValue(v string) *AccountAttributeVal
return s
}
-// Describes a running instance in a Spot fleet.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ActiveInstance
+// Describes a running instance in a Spot Fleet.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ActiveInstance
type ActiveInstance struct {
_ struct{} `type:"structure"`
@@ -20201,7 +22590,7 @@ type ActiveInstance struct {
// The instance type.
InstanceType *string `locationName:"instanceType" type:"string"`
- // The ID of the Spot instance request.
+ // The ID of the Spot Instance request.
SpotInstanceRequestId *string `locationName:"spotInstanceRequestId" type:"string"`
}
@@ -20240,7 +22629,7 @@ func (s *ActiveInstance) SetSpotInstanceRequestId(v string) *ActiveInstance {
}
// Describes an Elastic IP address.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Address
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Address
type Address struct {
_ struct{} `type:"structure"`
@@ -20269,6 +22658,9 @@ type Address struct {
// The Elastic IP address.
PublicIp *string `locationName:"publicIp" type:"string"`
+
+ // Any tags assigned to the Elastic IP address.
+ Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
}
// String returns the string representation
@@ -20329,11 +22721,20 @@ func (s *Address) SetPublicIp(v string) *Address {
return s
}
+// SetTags sets the Tags field's value.
+func (s *Address) SetTags(v []*Tag) *Address {
+ s.Tags = v
+ return s
+}
+
// Contains the parameters for AllocateAddress.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateAddressRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateAddressRequest
type AllocateAddressInput struct {
_ struct{} `type:"structure"`
+ // [EC2-VPC] The Elastic IP address to recover.
+ Address *string `type:"string"`
+
// Set to vpc to allocate the address for use with instances in a VPC.
//
// Default: The address is for use with instances in EC2-Classic.
@@ -20356,6 +22757,12 @@ func (s AllocateAddressInput) GoString() string {
return s.String()
}
+// SetAddress sets the Address field's value.
+func (s *AllocateAddressInput) SetAddress(v string) *AllocateAddressInput {
+ s.Address = &v
+ return s
+}
+
// SetDomain sets the Domain field's value.
func (s *AllocateAddressInput) SetDomain(v string) *AllocateAddressInput {
s.Domain = &v
@@ -20369,7 +22776,7 @@ func (s *AllocateAddressInput) SetDryRun(v bool) *AllocateAddressInput {
}
// Contains the output of AllocateAddress.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateAddressResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateAddressResult
type AllocateAddressOutput struct {
_ struct{} `type:"structure"`
@@ -20414,7 +22821,7 @@ func (s *AllocateAddressOutput) SetPublicIp(v string) *AllocateAddressOutput {
}
// Contains the parameters for AllocateHosts.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateHostsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateHostsRequest
type AllocateHostsInput struct {
_ struct{} `type:"structure"`
@@ -20509,7 +22916,7 @@ func (s *AllocateHostsInput) SetQuantity(v int64) *AllocateHostsInput {
}
// Contains the output of AllocateHosts.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateHostsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllocateHostsResult
type AllocateHostsOutput struct {
_ struct{} `type:"structure"`
@@ -20534,7 +22941,41 @@ func (s *AllocateHostsOutput) SetHostIds(v []*string) *AllocateHostsOutput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignIpv6AddressesRequest
+// Describes a principal.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AllowedPrincipal
+type AllowedPrincipal struct {
+ _ struct{} `type:"structure"`
+
+ // The Amazon Resource Name (ARN) of the principal.
+ Principal *string `locationName:"principal" type:"string"`
+
+ // The type of principal.
+ PrincipalType *string `locationName:"principalType" type:"string" enum:"PrincipalType"`
+}
+
+// String returns the string representation
+func (s AllowedPrincipal) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AllowedPrincipal) GoString() string {
+ return s.String()
+}
+
+// SetPrincipal sets the Principal field's value.
+func (s *AllowedPrincipal) SetPrincipal(v string) *AllowedPrincipal {
+ s.Principal = &v
+ return s
+}
+
+// SetPrincipalType sets the PrincipalType field's value.
+func (s *AllowedPrincipal) SetPrincipalType(v string) *AllowedPrincipal {
+ s.PrincipalType = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignIpv6AddressesRequest
type AssignIpv6AddressesInput struct {
_ struct{} `type:"structure"`
@@ -20594,7 +23035,7 @@ func (s *AssignIpv6AddressesInput) SetNetworkInterfaceId(v string) *AssignIpv6Ad
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignIpv6AddressesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignIpv6AddressesResult
type AssignIpv6AddressesOutput struct {
_ struct{} `type:"structure"`
@@ -20628,7 +23069,7 @@ func (s *AssignIpv6AddressesOutput) SetNetworkInterfaceId(v string) *AssignIpv6A
}
// Contains the parameters for AssignPrivateIpAddresses.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignPrivateIpAddressesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignPrivateIpAddressesRequest
type AssignPrivateIpAddressesInput struct {
_ struct{} `type:"structure"`
@@ -20701,7 +23142,7 @@ func (s *AssignPrivateIpAddressesInput) SetSecondaryPrivateIpAddressCount(v int6
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignPrivateIpAddressesOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssignPrivateIpAddressesOutput
type AssignPrivateIpAddressesOutput struct {
_ struct{} `type:"structure"`
}
@@ -20717,7 +23158,7 @@ func (s AssignPrivateIpAddressesOutput) GoString() string {
}
// Contains the parameters for AssociateAddress.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateAddressRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateAddressRequest
type AssociateAddressInput struct {
_ struct{} `type:"structure"`
@@ -20810,7 +23251,7 @@ func (s *AssociateAddressInput) SetPublicIp(v string) *AssociateAddressInput {
}
// Contains the output of AssociateAddress.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateAddressResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateAddressResult
type AssociateAddressOutput struct {
_ struct{} `type:"structure"`
@@ -20836,7 +23277,7 @@ func (s *AssociateAddressOutput) SetAssociationId(v string) *AssociateAddressOut
}
// Contains the parameters for AssociateDhcpOptions.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateDhcpOptionsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateDhcpOptionsRequest
type AssociateDhcpOptionsInput struct {
_ struct{} `type:"structure"`
@@ -20902,7 +23343,7 @@ func (s *AssociateDhcpOptionsInput) SetVpcId(v string) *AssociateDhcpOptionsInpu
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateDhcpOptionsOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateDhcpOptionsOutput
type AssociateDhcpOptionsOutput struct {
_ struct{} `type:"structure"`
}
@@ -20917,7 +23358,7 @@ func (s AssociateDhcpOptionsOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateIamInstanceProfileRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateIamInstanceProfileRequest
type AssociateIamInstanceProfileInput struct {
_ struct{} `type:"structure"`
@@ -20970,7 +23411,7 @@ func (s *AssociateIamInstanceProfileInput) SetInstanceId(v string) *AssociateIam
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateIamInstanceProfileResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateIamInstanceProfileResult
type AssociateIamInstanceProfileOutput struct {
_ struct{} `type:"structure"`
@@ -20995,7 +23436,7 @@ func (s *AssociateIamInstanceProfileOutput) SetIamInstanceProfileAssociation(v *
}
// Contains the parameters for AssociateRouteTable.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateRouteTableRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateRouteTableRequest
type AssociateRouteTableInput struct {
_ struct{} `type:"structure"`
@@ -21061,7 +23502,7 @@ func (s *AssociateRouteTableInput) SetSubnetId(v string) *AssociateRouteTableInp
}
// Contains the output of AssociateRouteTable.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateRouteTableResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateRouteTableResult
type AssociateRouteTableOutput struct {
_ struct{} `type:"structure"`
@@ -21085,7 +23526,7 @@ func (s *AssociateRouteTableOutput) SetAssociationId(v string) *AssociateRouteTa
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateSubnetCidrBlockRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateSubnetCidrBlockRequest
type AssociateSubnetCidrBlockInput struct {
_ struct{} `type:"structure"`
@@ -21138,7 +23579,7 @@ func (s *AssociateSubnetCidrBlockInput) SetSubnetId(v string) *AssociateSubnetCi
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateSubnetCidrBlockResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateSubnetCidrBlockResult
type AssociateSubnetCidrBlockOutput struct {
_ struct{} `type:"structure"`
@@ -21171,7 +23612,7 @@ func (s *AssociateSubnetCidrBlockOutput) SetSubnetId(v string) *AssociateSubnetC
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateVpcCidrBlockRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateVpcCidrBlockRequest
type AssociateVpcCidrBlockInput struct {
_ struct{} `type:"structure"`
@@ -21180,6 +23621,9 @@ type AssociateVpcCidrBlockInput struct {
// CIDR block.
AmazonProvidedIpv6CidrBlock *bool `locationName:"amazonProvidedIpv6CidrBlock" type:"boolean"`
+ // An IPv4 CIDR block to associate with the VPC.
+ CidrBlock *string `type:"string"`
+
// The ID of the VPC.
//
// VpcId is a required field
@@ -21215,16 +23659,25 @@ func (s *AssociateVpcCidrBlockInput) SetAmazonProvidedIpv6CidrBlock(v bool) *Ass
return s
}
+// SetCidrBlock sets the CidrBlock field's value.
+func (s *AssociateVpcCidrBlockInput) SetCidrBlock(v string) *AssociateVpcCidrBlockInput {
+ s.CidrBlock = &v
+ return s
+}
+
// SetVpcId sets the VpcId field's value.
func (s *AssociateVpcCidrBlockInput) SetVpcId(v string) *AssociateVpcCidrBlockInput {
s.VpcId = &v
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateVpcCidrBlockResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateVpcCidrBlockResult
type AssociateVpcCidrBlockOutput struct {
_ struct{} `type:"structure"`
+ // Information about the IPv4 CIDR block association.
+ CidrBlockAssociation *VpcCidrBlockAssociation `locationName:"cidrBlockAssociation" type:"structure"`
+
// Information about the IPv6 CIDR block association.
Ipv6CidrBlockAssociation *VpcIpv6CidrBlockAssociation `locationName:"ipv6CidrBlockAssociation" type:"structure"`
@@ -21242,6 +23695,12 @@ func (s AssociateVpcCidrBlockOutput) GoString() string {
return s.String()
}
+// SetCidrBlockAssociation sets the CidrBlockAssociation field's value.
+func (s *AssociateVpcCidrBlockOutput) SetCidrBlockAssociation(v *VpcCidrBlockAssociation) *AssociateVpcCidrBlockOutput {
+ s.CidrBlockAssociation = v
+ return s
+}
+
// SetIpv6CidrBlockAssociation sets the Ipv6CidrBlockAssociation field's value.
func (s *AssociateVpcCidrBlockOutput) SetIpv6CidrBlockAssociation(v *VpcIpv6CidrBlockAssociation) *AssociateVpcCidrBlockOutput {
s.Ipv6CidrBlockAssociation = v
@@ -21255,7 +23714,7 @@ func (s *AssociateVpcCidrBlockOutput) SetVpcId(v string) *AssociateVpcCidrBlockO
}
// Contains the parameters for AttachClassicLinkVpc.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachClassicLinkVpcRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachClassicLinkVpcRequest
type AttachClassicLinkVpcInput struct {
_ struct{} `type:"structure"`
@@ -21336,7 +23795,7 @@ func (s *AttachClassicLinkVpcInput) SetVpcId(v string) *AttachClassicLinkVpcInpu
}
// Contains the output of AttachClassicLinkVpc.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachClassicLinkVpcResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachClassicLinkVpcResult
type AttachClassicLinkVpcOutput struct {
_ struct{} `type:"structure"`
@@ -21361,7 +23820,7 @@ func (s *AttachClassicLinkVpcOutput) SetReturn(v bool) *AttachClassicLinkVpcOutp
}
// Contains the parameters for AttachInternetGateway.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachInternetGatewayRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachInternetGatewayRequest
type AttachInternetGatewayInput struct {
_ struct{} `type:"structure"`
@@ -21426,7 +23885,7 @@ func (s *AttachInternetGatewayInput) SetVpcId(v string) *AttachInternetGatewayIn
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachInternetGatewayOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachInternetGatewayOutput
type AttachInternetGatewayOutput struct {
_ struct{} `type:"structure"`
}
@@ -21442,7 +23901,7 @@ func (s AttachInternetGatewayOutput) GoString() string {
}
// Contains the parameters for AttachNetworkInterface.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachNetworkInterfaceRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachNetworkInterfaceRequest
type AttachNetworkInterfaceInput struct {
_ struct{} `type:"structure"`
@@ -21522,7 +23981,7 @@ func (s *AttachNetworkInterfaceInput) SetNetworkInterfaceId(v string) *AttachNet
}
// Contains the output of AttachNetworkInterface.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachNetworkInterfaceResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachNetworkInterfaceResult
type AttachNetworkInterfaceOutput struct {
_ struct{} `type:"structure"`
@@ -21547,11 +24006,11 @@ func (s *AttachNetworkInterfaceOutput) SetAttachmentId(v string) *AttachNetworkI
}
// Contains the parameters for AttachVolume.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVolumeRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVolumeRequest
type AttachVolumeInput struct {
_ struct{} `type:"structure"`
- // The device name to expose to the instance (for example, /dev/sdh or xvdh).
+ // The device name (for example, /dev/sdh or xvdh).
//
// Device is a required field
Device *string `type:"string" required:"true"`
@@ -21628,7 +24087,7 @@ func (s *AttachVolumeInput) SetVolumeId(v string) *AttachVolumeInput {
}
// Contains the parameters for AttachVpnGateway.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVpnGatewayRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVpnGatewayRequest
type AttachVpnGatewayInput struct {
_ struct{} `type:"structure"`
@@ -21694,7 +24153,7 @@ func (s *AttachVpnGatewayInput) SetVpnGatewayId(v string) *AttachVpnGatewayInput
}
// Contains the output of AttachVpnGateway.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVpnGatewayResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttachVpnGatewayResult
type AttachVpnGatewayOutput struct {
_ struct{} `type:"structure"`
@@ -21719,7 +24178,7 @@ func (s *AttachVpnGatewayOutput) SetVpcAttachment(v *VpcAttachment) *AttachVpnGa
}
// Describes a value for a resource attribute that is a Boolean value.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttributeBooleanValue
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttributeBooleanValue
type AttributeBooleanValue struct {
_ struct{} `type:"structure"`
@@ -21744,7 +24203,7 @@ func (s *AttributeBooleanValue) SetValue(v bool) *AttributeBooleanValue {
}
// Describes a value for a resource attribute that is a String.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttributeValue
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AttributeValue
type AttributeValue struct {
_ struct{} `type:"structure"`
@@ -21769,12 +24228,11 @@ func (s *AttributeValue) SetValue(v string) *AttributeValue {
}
// Contains the parameters for AuthorizeSecurityGroupEgress.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupEgressRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupEgressRequest
type AuthorizeSecurityGroupEgressInput struct {
_ struct{} `type:"structure"`
- // The CIDR IPv4 address range. We recommend that you specify the CIDR range
- // in a set of IP permissions instead.
+ // Not supported. Use a set of IP permissions to specify the CIDR.
CidrIp *string `locationName:"cidrIp" type:"string"`
// Checks whether you have the required permissions for the action, without
@@ -21783,8 +24241,7 @@ type AuthorizeSecurityGroupEgressInput struct {
// it is UnauthorizedOperation.
DryRun *bool `locationName:"dryRun" type:"boolean"`
- // The start of port range for the TCP and UDP protocols, or an ICMP type number.
- // We recommend that you specify the port range in a set of IP permissions instead.
+ // Not supported. Use a set of IP permissions to specify the port.
FromPort *int64 `locationName:"fromPort" type:"integer"`
// The ID of the security group.
@@ -21792,26 +24249,23 @@ type AuthorizeSecurityGroupEgressInput struct {
// GroupId is a required field
GroupId *string `locationName:"groupId" type:"string" required:"true"`
- // A set of IP permissions. You can't specify a destination security group and
- // a CIDR IP address range.
+ // One or more sets of IP permissions. You can't specify a destination security
+ // group and a CIDR IP address range in the same set of permissions.
IpPermissions []*IpPermission `locationName:"ipPermissions" locationNameList:"item" type:"list"`
- // The IP protocol name or number. We recommend that you specify the protocol
- // in a set of IP permissions instead.
+ // Not supported. Use a set of IP permissions to specify the protocol name or
+ // number.
IpProtocol *string `locationName:"ipProtocol" type:"string"`
- // The name of a destination security group. To authorize outbound access to
- // a destination security group, we recommend that you use a set of IP permissions
- // instead.
+ // Not supported. Use a set of IP permissions to specify a destination security
+ // group.
SourceSecurityGroupName *string `locationName:"sourceSecurityGroupName" type:"string"`
- // The AWS account number for a destination security group. To authorize outbound
- // access to a destination security group, we recommend that you use a set of
- // IP permissions instead.
+ // Not supported. Use a set of IP permissions to specify a destination security
+ // group.
SourceSecurityGroupOwnerId *string `locationName:"sourceSecurityGroupOwnerId" type:"string"`
- // The end of port range for the TCP and UDP protocols, or an ICMP type number.
- // We recommend that you specify the port range in a set of IP permissions instead.
+ // Not supported. Use a set of IP permissions to specify the port.
ToPort *int64 `locationName:"toPort" type:"integer"`
}
@@ -21892,7 +24346,7 @@ func (s *AuthorizeSecurityGroupEgressInput) SetToPort(v int64) *AuthorizeSecurit
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupEgressOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupEgressOutput
type AuthorizeSecurityGroupEgressOutput struct {
_ struct{} `type:"structure"`
}
@@ -21908,7 +24362,7 @@ func (s AuthorizeSecurityGroupEgressOutput) GoString() string {
}
// Contains the parameters for AuthorizeSecurityGroupIngress.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupIngressRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupIngressRequest
type AuthorizeSecurityGroupIngressInput struct {
_ struct{} `type:"structure"`
@@ -21924,16 +24378,20 @@ type AuthorizeSecurityGroupIngressInput struct {
// The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6
// type number. For the ICMP/ICMPv6 type number, use -1 to specify all types.
+ // If you specify all ICMP/ICMPv6 types, you must specify all codes.
FromPort *int64 `type:"integer"`
- // The ID of the security group. Required for a nondefault VPC.
+ // The ID of the security group. You must specify either the security group
+ // ID or the security group name in the request. For security groups in a nondefault
+ // VPC, you must specify the security group ID.
GroupId *string `type:"string"`
- // [EC2-Classic, default VPC] The name of the security group.
+ // [EC2-Classic, default VPC] The name of the security group. You must specify
+ // either the security group ID or the security group name in the request.
GroupName *string `type:"string"`
- // A set of IP permissions. Can be used to specify multiple rules in a single
- // command.
+ // One or more sets of IP permissions. Can be used to specify multiple rules
+ // in a single command.
IpPermissions []*IpPermission `locationNameList:"item" type:"list"`
// The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)).
@@ -21953,8 +24411,8 @@ type AuthorizeSecurityGroupIngressInput struct {
// be in the same VPC.
SourceSecurityGroupName *string `type:"string"`
- // [EC2-Classic] The AWS account number for the source security group, if the
- // source security group is in a different account. You can't specify this parameter
+ // [EC2-Classic] The AWS account ID for the source security group, if the source
+ // security group is in a different account. You can't specify this parameter
// in combination with the following parameters: the CIDR IP address range,
// the IP protocol, the start of the port range, and the end of the port range.
// Creates rules that grant full ICMP, UDP, and TCP access. To create a rule
@@ -21962,7 +24420,8 @@ type AuthorizeSecurityGroupIngressInput struct {
SourceSecurityGroupOwnerId *string `type:"string"`
// The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code
- // number. For the ICMP/ICMPv6 code number, use -1 to specify all codes.
+ // number. For the ICMP/ICMPv6 code number, use -1 to specify all codes. If
+ // you specify all ICMP/ICMPv6 types, you must specify all codes.
ToPort *int64 `type:"integer"`
}
@@ -22036,7 +24495,7 @@ func (s *AuthorizeSecurityGroupIngressInput) SetToPort(v int64) *AuthorizeSecuri
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupIngressOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeSecurityGroupIngressOutput
type AuthorizeSecurityGroupIngressOutput struct {
_ struct{} `type:"structure"`
}
@@ -22052,7 +24511,7 @@ func (s AuthorizeSecurityGroupIngressOutput) GoString() string {
}
// Describes an Availability Zone.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AvailabilityZone
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AvailabilityZone
type AvailabilityZone struct {
_ struct{} `type:"structure"`
@@ -22104,7 +24563,7 @@ func (s *AvailabilityZone) SetZoneName(v string) *AvailabilityZone {
}
// Describes a message about an Availability Zone.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AvailabilityZoneMessage
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AvailabilityZoneMessage
type AvailabilityZoneMessage struct {
_ struct{} `type:"structure"`
@@ -22129,7 +24588,7 @@ func (s *AvailabilityZoneMessage) SetMessage(v string) *AvailabilityZoneMessage
}
// The capacity information for instances launched onto the Dedicated Host.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AvailableCapacity
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AvailableCapacity
type AvailableCapacity struct {
_ struct{} `type:"structure"`
@@ -22162,7 +24621,7 @@ func (s *AvailableCapacity) SetAvailableVCpus(v int64) *AvailableCapacity {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/BlobAttributeValue
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/BlobAttributeValue
type BlobAttributeValue struct {
_ struct{} `type:"structure"`
@@ -22187,11 +24646,11 @@ func (s *BlobAttributeValue) SetValue(v []byte) *BlobAttributeValue {
}
// Describes a block device mapping.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/BlockDeviceMapping
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/BlockDeviceMapping
type BlockDeviceMapping struct {
_ struct{} `type:"structure"`
- // The device name exposed to the instance (for example, /dev/sdh or xvdh).
+ // The device name (for example, /dev/sdh or xvdh).
DeviceName *string `locationName:"deviceName" type:"string"`
// Parameters used to automatically set up EBS volumes when the instance is
@@ -22250,7 +24709,7 @@ func (s *BlockDeviceMapping) SetVirtualName(v string) *BlockDeviceMapping {
}
// Contains the parameters for BundleInstance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/BundleInstanceRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/BundleInstanceRequest
type BundleInstanceInput struct {
_ struct{} `type:"structure"`
@@ -22324,7 +24783,7 @@ func (s *BundleInstanceInput) SetStorage(v *Storage) *BundleInstanceInput {
}
// Contains the output of BundleInstance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/BundleInstanceResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/BundleInstanceResult
type BundleInstanceOutput struct {
_ struct{} `type:"structure"`
@@ -22349,7 +24808,7 @@ func (s *BundleInstanceOutput) SetBundleTask(v *BundleTask) *BundleInstanceOutpu
}
// Describes a bundle task.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/BundleTask
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/BundleTask
type BundleTask struct {
_ struct{} `type:"structure"`
@@ -22437,7 +24896,7 @@ func (s *BundleTask) SetUpdateTime(v time.Time) *BundleTask {
}
// Describes an error for BundleInstance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/BundleTaskError
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/BundleTaskError
type BundleTaskError struct {
_ struct{} `type:"structure"`
@@ -22471,7 +24930,7 @@ func (s *BundleTaskError) SetMessage(v string) *BundleTaskError {
}
// Contains the parameters for CancelBundleTask.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelBundleTaskRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelBundleTaskRequest
type CancelBundleTaskInput struct {
_ struct{} `type:"structure"`
@@ -22523,7 +24982,7 @@ func (s *CancelBundleTaskInput) SetDryRun(v bool) *CancelBundleTaskInput {
}
// Contains the output of CancelBundleTask.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelBundleTaskResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelBundleTaskResult
type CancelBundleTaskOutput struct {
_ struct{} `type:"structure"`
@@ -22548,7 +25007,7 @@ func (s *CancelBundleTaskOutput) SetBundleTask(v *BundleTask) *CancelBundleTaskO
}
// Contains the parameters for CancelConversionTask.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelConversionRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelConversionRequest
type CancelConversionTaskInput struct {
_ struct{} `type:"structure"`
@@ -22608,7 +25067,7 @@ func (s *CancelConversionTaskInput) SetReasonMessage(v string) *CancelConversion
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelConversionTaskOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelConversionTaskOutput
type CancelConversionTaskOutput struct {
_ struct{} `type:"structure"`
}
@@ -22624,7 +25083,7 @@ func (s CancelConversionTaskOutput) GoString() string {
}
// Contains the parameters for CancelExportTask.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelExportTaskRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelExportTaskRequest
type CancelExportTaskInput struct {
_ struct{} `type:"structure"`
@@ -22663,7 +25122,7 @@ func (s *CancelExportTaskInput) SetExportTaskId(v string) *CancelExportTaskInput
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelExportTaskOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelExportTaskOutput
type CancelExportTaskOutput struct {
_ struct{} `type:"structure"`
}
@@ -22679,7 +25138,7 @@ func (s CancelExportTaskOutput) GoString() string {
}
// Contains the parameters for CancelImportTask.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelImportTaskRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelImportTaskRequest
type CancelImportTaskInput struct {
_ struct{} `type:"structure"`
@@ -22725,7 +25184,7 @@ func (s *CancelImportTaskInput) SetImportTaskId(v string) *CancelImportTaskInput
}
// Contains the output for CancelImportTask.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelImportTaskResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelImportTaskResult
type CancelImportTaskOutput struct {
_ struct{} `type:"structure"`
@@ -22768,7 +25227,7 @@ func (s *CancelImportTaskOutput) SetState(v string) *CancelImportTaskOutput {
}
// Contains the parameters for CancelReservedInstancesListing.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelReservedInstancesListingRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelReservedInstancesListingRequest
type CancelReservedInstancesListingInput struct {
_ struct{} `type:"structure"`
@@ -22808,7 +25267,7 @@ func (s *CancelReservedInstancesListingInput) SetReservedInstancesListingId(v st
}
// Contains the output of CancelReservedInstancesListing.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelReservedInstancesListingResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelReservedInstancesListingResult
type CancelReservedInstancesListingOutput struct {
_ struct{} `type:"structure"`
@@ -22832,8 +25291,8 @@ func (s *CancelReservedInstancesListingOutput) SetReservedInstancesListings(v []
return s
}
-// Describes a Spot fleet error.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotFleetRequestsError
+// Describes a Spot Fleet error.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotFleetRequestsError
type CancelSpotFleetRequestsError struct {
_ struct{} `type:"structure"`
@@ -22870,8 +25329,8 @@ func (s *CancelSpotFleetRequestsError) SetMessage(v string) *CancelSpotFleetRequ
return s
}
-// Describes a Spot fleet request that was not successfully canceled.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotFleetRequestsErrorItem
+// Describes a Spot Fleet request that was not successfully canceled.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotFleetRequestsErrorItem
type CancelSpotFleetRequestsErrorItem struct {
_ struct{} `type:"structure"`
@@ -22880,7 +25339,7 @@ type CancelSpotFleetRequestsErrorItem struct {
// Error is a required field
Error *CancelSpotFleetRequestsError `locationName:"error" type:"structure" required:"true"`
- // The ID of the Spot fleet request.
+ // The ID of the Spot Fleet request.
//
// SpotFleetRequestId is a required field
SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
@@ -22909,7 +25368,7 @@ func (s *CancelSpotFleetRequestsErrorItem) SetSpotFleetRequestId(v string) *Canc
}
// Contains the parameters for CancelSpotFleetRequests.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotFleetRequestsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotFleetRequestsRequest
type CancelSpotFleetRequestsInput struct {
_ struct{} `type:"structure"`
@@ -22919,12 +25378,12 @@ type CancelSpotFleetRequestsInput struct {
// it is UnauthorizedOperation.
DryRun *bool `locationName:"dryRun" type:"boolean"`
- // The IDs of the Spot fleet requests.
+ // The IDs of the Spot Fleet requests.
//
// SpotFleetRequestIds is a required field
SpotFleetRequestIds []*string `locationName:"spotFleetRequestId" locationNameList:"item" type:"list" required:"true"`
- // Indicates whether to terminate instances for a Spot fleet request if it is
+ // Indicates whether to terminate instances for a Spot Fleet request if it is
// canceled successfully.
//
// TerminateInstances is a required field
@@ -22976,14 +25435,14 @@ func (s *CancelSpotFleetRequestsInput) SetTerminateInstances(v bool) *CancelSpot
}
// Contains the output of CancelSpotFleetRequests.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotFleetRequestsResponse
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotFleetRequestsResponse
type CancelSpotFleetRequestsOutput struct {
_ struct{} `type:"structure"`
- // Information about the Spot fleet requests that are successfully canceled.
+ // Information about the Spot Fleet requests that are successfully canceled.
SuccessfulFleetRequests []*CancelSpotFleetRequestsSuccessItem `locationName:"successfulFleetRequestSet" locationNameList:"item" type:"list"`
- // Information about the Spot fleet requests that are not successfully canceled.
+ // Information about the Spot Fleet requests that are not successfully canceled.
UnsuccessfulFleetRequests []*CancelSpotFleetRequestsErrorItem `locationName:"unsuccessfulFleetRequestSet" locationNameList:"item" type:"list"`
}
@@ -23009,22 +25468,22 @@ func (s *CancelSpotFleetRequestsOutput) SetUnsuccessfulFleetRequests(v []*Cancel
return s
}
-// Describes a Spot fleet request that was successfully canceled.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotFleetRequestsSuccessItem
+// Describes a Spot Fleet request that was successfully canceled.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotFleetRequestsSuccessItem
type CancelSpotFleetRequestsSuccessItem struct {
_ struct{} `type:"structure"`
- // The current state of the Spot fleet request.
+ // The current state of the Spot Fleet request.
//
// CurrentSpotFleetRequestState is a required field
CurrentSpotFleetRequestState *string `locationName:"currentSpotFleetRequestState" type:"string" required:"true" enum:"BatchState"`
- // The previous state of the Spot fleet request.
+ // The previous state of the Spot Fleet request.
//
// PreviousSpotFleetRequestState is a required field
PreviousSpotFleetRequestState *string `locationName:"previousSpotFleetRequestState" type:"string" required:"true" enum:"BatchState"`
- // The ID of the Spot fleet request.
+ // The ID of the Spot Fleet request.
//
// SpotFleetRequestId is a required field
SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
@@ -23059,7 +25518,7 @@ func (s *CancelSpotFleetRequestsSuccessItem) SetSpotFleetRequestId(v string) *Ca
}
// Contains the parameters for CancelSpotInstanceRequests.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotInstanceRequestsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotInstanceRequestsRequest
type CancelSpotInstanceRequestsInput struct {
_ struct{} `type:"structure"`
@@ -23069,7 +25528,7 @@ type CancelSpotInstanceRequestsInput struct {
// it is UnauthorizedOperation.
DryRun *bool `locationName:"dryRun" type:"boolean"`
- // One or more Spot instance request IDs.
+ // One or more Spot Instance request IDs.
//
// SpotInstanceRequestIds is a required field
SpotInstanceRequestIds []*string `locationName:"SpotInstanceRequestId" locationNameList:"SpotInstanceRequestId" type:"list" required:"true"`
@@ -23111,11 +25570,11 @@ func (s *CancelSpotInstanceRequestsInput) SetSpotInstanceRequestIds(v []*string)
}
// Contains the output of CancelSpotInstanceRequests.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotInstanceRequestsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelSpotInstanceRequestsResult
type CancelSpotInstanceRequestsOutput struct {
_ struct{} `type:"structure"`
- // One or more Spot instance requests.
+ // One or more Spot Instance requests.
CancelledSpotInstanceRequests []*CancelledSpotInstanceRequest `locationName:"spotInstanceRequestSet" locationNameList:"item" type:"list"`
}
@@ -23135,15 +25594,15 @@ func (s *CancelSpotInstanceRequestsOutput) SetCancelledSpotInstanceRequests(v []
return s
}
-// Describes a request to cancel a Spot instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelledSpotInstanceRequest
+// Describes a request to cancel a Spot Instance.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelledSpotInstanceRequest
type CancelledSpotInstanceRequest struct {
_ struct{} `type:"structure"`
- // The ID of the Spot instance request.
+ // The ID of the Spot Instance request.
SpotInstanceRequestId *string `locationName:"spotInstanceRequestId" type:"string"`
- // The state of the Spot instance request.
+ // The state of the Spot Instance request.
State *string `locationName:"state" type:"string" enum:"CancelSpotInstanceRequestState"`
}
@@ -23169,8 +25628,33 @@ func (s *CancelledSpotInstanceRequest) SetState(v string) *CancelledSpotInstance
return s
}
+// Describes an IPv4 CIDR block.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CidrBlock
+type CidrBlock struct {
+ _ struct{} `type:"structure"`
+
+ // The IPv4 CIDR block.
+ CidrBlock *string `locationName:"cidrBlock" type:"string"`
+}
+
+// String returns the string representation
+func (s CidrBlock) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CidrBlock) GoString() string {
+ return s.String()
+}
+
+// SetCidrBlock sets the CidrBlock field's value.
+func (s *CidrBlock) SetCidrBlock(v string) *CidrBlock {
+ s.CidrBlock = &v
+ return s
+}
+
// Describes the ClassicLink DNS support status of a VPC.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ClassicLinkDnsSupport
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ClassicLinkDnsSupport
type ClassicLinkDnsSupport struct {
_ struct{} `type:"structure"`
@@ -23204,7 +25688,7 @@ func (s *ClassicLinkDnsSupport) SetVpcId(v string) *ClassicLinkDnsSupport {
}
// Describes a linked EC2-Classic instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ClassicLinkInstance
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ClassicLinkInstance
type ClassicLinkInstance struct {
_ struct{} `type:"structure"`
@@ -23255,8 +25739,102 @@ func (s *ClassicLinkInstance) SetVpcId(v string) *ClassicLinkInstance {
return s
}
+// Describes a Classic Load Balancer.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ClassicLoadBalancer
+type ClassicLoadBalancer struct {
+ _ struct{} `type:"structure"`
+
+ // The name of the load balancer.
+ //
+ // Name is a required field
+ Name *string `locationName:"name" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s ClassicLoadBalancer) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ClassicLoadBalancer) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ClassicLoadBalancer) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ClassicLoadBalancer"}
+ if s.Name == nil {
+ invalidParams.Add(request.NewErrParamRequired("Name"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetName sets the Name field's value.
+func (s *ClassicLoadBalancer) SetName(v string) *ClassicLoadBalancer {
+ s.Name = &v
+ return s
+}
+
+// Describes the Classic Load Balancers to attach to a Spot Fleet. Spot Fleet
+// registers the running Spot Instances with these Classic Load Balancers.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ClassicLoadBalancersConfig
+type ClassicLoadBalancersConfig struct {
+ _ struct{} `type:"structure"`
+
+ // One or more Classic Load Balancers.
+ //
+ // ClassicLoadBalancers is a required field
+ ClassicLoadBalancers []*ClassicLoadBalancer `locationName:"classicLoadBalancers" locationNameList:"item" min:"1" type:"list" required:"true"`
+}
+
+// String returns the string representation
+func (s ClassicLoadBalancersConfig) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ClassicLoadBalancersConfig) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ClassicLoadBalancersConfig) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ClassicLoadBalancersConfig"}
+ if s.ClassicLoadBalancers == nil {
+ invalidParams.Add(request.NewErrParamRequired("ClassicLoadBalancers"))
+ }
+ if s.ClassicLoadBalancers != nil && len(s.ClassicLoadBalancers) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("ClassicLoadBalancers", 1))
+ }
+ if s.ClassicLoadBalancers != nil {
+ for i, v := range s.ClassicLoadBalancers {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ClassicLoadBalancers", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetClassicLoadBalancers sets the ClassicLoadBalancers field's value.
+func (s *ClassicLoadBalancersConfig) SetClassicLoadBalancers(v []*ClassicLoadBalancer) *ClassicLoadBalancersConfig {
+ s.ClassicLoadBalancers = v
+ return s
+}
+
// Describes the client-specific data.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ClientData
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ClientData
type ClientData struct {
_ struct{} `type:"structure"`
@@ -23308,7 +25886,7 @@ func (s *ClientData) SetUploadStart(v time.Time) *ClientData {
}
// Contains the parameters for ConfirmProductInstance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ConfirmProductInstanceRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ConfirmProductInstanceRequest
type ConfirmProductInstanceInput struct {
_ struct{} `type:"structure"`
@@ -23374,7 +25952,7 @@ func (s *ConfirmProductInstanceInput) SetProductCode(v string) *ConfirmProductIn
}
// Contains the output of ConfirmProductInstance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ConfirmProductInstanceResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ConfirmProductInstanceResult
type ConfirmProductInstanceOutput struct {
_ struct{} `type:"structure"`
@@ -23409,8 +25987,88 @@ func (s *ConfirmProductInstanceOutput) SetReturn(v bool) *ConfirmProductInstance
return s
}
+// Describes a connection notification for a VPC endpoint or VPC endpoint service.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ConnectionNotification
+type ConnectionNotification struct {
+ _ struct{} `type:"structure"`
+
+ // The events for the notification. Valid values are Accept, Connect, Delete,
+ // and Reject.
+ ConnectionEvents []*string `locationName:"connectionEvents" locationNameList:"item" type:"list"`
+
+ // The ARN of the SNS topic for the notification.
+ ConnectionNotificationArn *string `locationName:"connectionNotificationArn" type:"string"`
+
+ // The ID of the notification.
+ ConnectionNotificationId *string `locationName:"connectionNotificationId" type:"string"`
+
+ // The state of the notification.
+ ConnectionNotificationState *string `locationName:"connectionNotificationState" type:"string" enum:"ConnectionNotificationState"`
+
+ // The type of notification.
+ ConnectionNotificationType *string `locationName:"connectionNotificationType" type:"string" enum:"ConnectionNotificationType"`
+
+ // The ID of the endpoint service.
+ ServiceId *string `locationName:"serviceId" type:"string"`
+
+ // The ID of the VPC endpoint.
+ VpcEndpointId *string `locationName:"vpcEndpointId" type:"string"`
+}
+
+// String returns the string representation
+func (s ConnectionNotification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ConnectionNotification) GoString() string {
+ return s.String()
+}
+
+// SetConnectionEvents sets the ConnectionEvents field's value.
+func (s *ConnectionNotification) SetConnectionEvents(v []*string) *ConnectionNotification {
+ s.ConnectionEvents = v
+ return s
+}
+
+// SetConnectionNotificationArn sets the ConnectionNotificationArn field's value.
+func (s *ConnectionNotification) SetConnectionNotificationArn(v string) *ConnectionNotification {
+ s.ConnectionNotificationArn = &v
+ return s
+}
+
+// SetConnectionNotificationId sets the ConnectionNotificationId field's value.
+func (s *ConnectionNotification) SetConnectionNotificationId(v string) *ConnectionNotification {
+ s.ConnectionNotificationId = &v
+ return s
+}
+
+// SetConnectionNotificationState sets the ConnectionNotificationState field's value.
+func (s *ConnectionNotification) SetConnectionNotificationState(v string) *ConnectionNotification {
+ s.ConnectionNotificationState = &v
+ return s
+}
+
+// SetConnectionNotificationType sets the ConnectionNotificationType field's value.
+func (s *ConnectionNotification) SetConnectionNotificationType(v string) *ConnectionNotification {
+ s.ConnectionNotificationType = &v
+ return s
+}
+
+// SetServiceId sets the ServiceId field's value.
+func (s *ConnectionNotification) SetServiceId(v string) *ConnectionNotification {
+ s.ServiceId = &v
+ return s
+}
+
+// SetVpcEndpointId sets the VpcEndpointId field's value.
+func (s *ConnectionNotification) SetVpcEndpointId(v string) *ConnectionNotification {
+ s.VpcEndpointId = &v
+ return s
+}
+
// Describes a conversion task.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ConversionTask
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ConversionTask
type ConversionTask struct {
_ struct{} `type:"structure"`
@@ -23495,8 +26153,125 @@ func (s *ConversionTask) SetTags(v []*Tag) *ConversionTask {
return s
}
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyFpgaImageRequest
+type CopyFpgaImageInput struct {
+ _ struct{} `type:"structure"`
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency
+ // of the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html).
+ ClientToken *string `type:"string"`
+
+ // The description for the new AFI.
+ Description *string `type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The name for the new AFI. The default is the name of the source AFI.
+ Name *string `type:"string"`
+
+ // The ID of the source AFI.
+ //
+ // SourceFpgaImageId is a required field
+ SourceFpgaImageId *string `type:"string" required:"true"`
+
+ // The region that contains the source AFI.
+ //
+ // SourceRegion is a required field
+ SourceRegion *string `type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s CopyFpgaImageInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CopyFpgaImageInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *CopyFpgaImageInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "CopyFpgaImageInput"}
+ if s.SourceFpgaImageId == nil {
+ invalidParams.Add(request.NewErrParamRequired("SourceFpgaImageId"))
+ }
+ if s.SourceRegion == nil {
+ invalidParams.Add(request.NewErrParamRequired("SourceRegion"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetClientToken sets the ClientToken field's value.
+func (s *CopyFpgaImageInput) SetClientToken(v string) *CopyFpgaImageInput {
+ s.ClientToken = &v
+ return s
+}
+
+// SetDescription sets the Description field's value.
+func (s *CopyFpgaImageInput) SetDescription(v string) *CopyFpgaImageInput {
+ s.Description = &v
+ return s
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *CopyFpgaImageInput) SetDryRun(v bool) *CopyFpgaImageInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetName sets the Name field's value.
+func (s *CopyFpgaImageInput) SetName(v string) *CopyFpgaImageInput {
+ s.Name = &v
+ return s
+}
+
+// SetSourceFpgaImageId sets the SourceFpgaImageId field's value.
+func (s *CopyFpgaImageInput) SetSourceFpgaImageId(v string) *CopyFpgaImageInput {
+ s.SourceFpgaImageId = &v
+ return s
+}
+
+// SetSourceRegion sets the SourceRegion field's value.
+func (s *CopyFpgaImageInput) SetSourceRegion(v string) *CopyFpgaImageInput {
+ s.SourceRegion = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyFpgaImageResult
+type CopyFpgaImageOutput struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the new AFI.
+ FpgaImageId *string `locationName:"fpgaImageId" type:"string"`
+}
+
+// String returns the string representation
+func (s CopyFpgaImageOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CopyFpgaImageOutput) GoString() string {
+ return s.String()
+}
+
+// SetFpgaImageId sets the FpgaImageId field's value.
+func (s *CopyFpgaImageOutput) SetFpgaImageId(v string) *CopyFpgaImageOutput {
+ s.FpgaImageId = &v
+ return s
+}
+
// Contains the parameters for CopyImage.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyImageRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyImageRequest
type CopyImageInput struct {
_ struct{} `type:"structure"`
@@ -23625,7 +26400,7 @@ func (s *CopyImageInput) SetSourceRegion(v string) *CopyImageInput {
}
// Contains the output of CopyImage.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyImageResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopyImageResult
type CopyImageOutput struct {
_ struct{} `type:"structure"`
@@ -23650,7 +26425,7 @@ func (s *CopyImageOutput) SetImageId(v string) *CopyImageOutput {
}
// Contains the parameters for CopySnapshot.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopySnapshotRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopySnapshotRequest
type CopySnapshotInput struct {
_ struct{} `type:"structure"`
@@ -23792,7 +26567,7 @@ func (s *CopySnapshotInput) SetSourceSnapshotId(v string) *CopySnapshotInput {
}
// Contains the output of CopySnapshot.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopySnapshotResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopySnapshotResult
type CopySnapshotOutput struct {
_ struct{} `type:"structure"`
@@ -23817,7 +26592,7 @@ func (s *CopySnapshotOutput) SetSnapshotId(v string) *CopySnapshotOutput {
}
// Contains the parameters for CreateCustomerGateway.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateCustomerGatewayRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateCustomerGatewayRequest
type CreateCustomerGatewayInput struct {
_ struct{} `type:"structure"`
@@ -23900,7 +26675,7 @@ func (s *CreateCustomerGatewayInput) SetType(v string) *CreateCustomerGatewayInp
}
// Contains the output of CreateCustomerGateway.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateCustomerGatewayResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateCustomerGatewayResult
type CreateCustomerGatewayOutput struct {
_ struct{} `type:"structure"`
@@ -23924,8 +26699,83 @@ func (s *CreateCustomerGatewayOutput) SetCustomerGateway(v *CustomerGateway) *Cr
return s
}
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultSubnetRequest
+type CreateDefaultSubnetInput struct {
+ _ struct{} `type:"structure"`
+
+ // The Availability Zone in which to create the default subnet.
+ //
+ // AvailabilityZone is a required field
+ AvailabilityZone *string `type:"string" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+}
+
+// String returns the string representation
+func (s CreateDefaultSubnetInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateDefaultSubnetInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *CreateDefaultSubnetInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "CreateDefaultSubnetInput"}
+ if s.AvailabilityZone == nil {
+ invalidParams.Add(request.NewErrParamRequired("AvailabilityZone"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetAvailabilityZone sets the AvailabilityZone field's value.
+func (s *CreateDefaultSubnetInput) SetAvailabilityZone(v string) *CreateDefaultSubnetInput {
+ s.AvailabilityZone = &v
+ return s
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *CreateDefaultSubnetInput) SetDryRun(v bool) *CreateDefaultSubnetInput {
+ s.DryRun = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultSubnetResult
+type CreateDefaultSubnetOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Information about the subnet.
+ Subnet *Subnet `locationName:"subnet" type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateDefaultSubnetOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateDefaultSubnetOutput) GoString() string {
+ return s.String()
+}
+
+// SetSubnet sets the Subnet field's value.
+func (s *CreateDefaultSubnetOutput) SetSubnet(v *Subnet) *CreateDefaultSubnetOutput {
+ s.Subnet = v
+ return s
+}
+
// Contains the parameters for CreateDefaultVpc.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultVpcRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultVpcRequest
type CreateDefaultVpcInput struct {
_ struct{} `type:"structure"`
@@ -23953,7 +26803,7 @@ func (s *CreateDefaultVpcInput) SetDryRun(v bool) *CreateDefaultVpcInput {
}
// Contains the output of CreateDefaultVpc.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultVpcResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDefaultVpcResult
type CreateDefaultVpcOutput struct {
_ struct{} `type:"structure"`
@@ -23978,7 +26828,7 @@ func (s *CreateDefaultVpcOutput) SetVpc(v *Vpc) *CreateDefaultVpcOutput {
}
// Contains the parameters for CreateDhcpOptions.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDhcpOptionsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDhcpOptionsRequest
type CreateDhcpOptionsInput struct {
_ struct{} `type:"structure"`
@@ -24030,7 +26880,7 @@ func (s *CreateDhcpOptionsInput) SetDryRun(v bool) *CreateDhcpOptionsInput {
}
// Contains the output of CreateDhcpOptions.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDhcpOptionsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateDhcpOptionsResult
type CreateDhcpOptionsOutput struct {
_ struct{} `type:"structure"`
@@ -24054,7 +26904,7 @@ func (s *CreateDhcpOptionsOutput) SetDhcpOptions(v *DhcpOptions) *CreateDhcpOpti
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateEgressOnlyInternetGatewayRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateEgressOnlyInternetGatewayRequest
type CreateEgressOnlyInternetGatewayInput struct {
_ struct{} `type:"structure"`
@@ -24115,7 +26965,7 @@ func (s *CreateEgressOnlyInternetGatewayInput) SetVpcId(v string) *CreateEgressO
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateEgressOnlyInternetGatewayResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateEgressOnlyInternetGatewayResult
type CreateEgressOnlyInternetGatewayOutput struct {
_ struct{} `type:"structure"`
@@ -24150,7 +27000,7 @@ func (s *CreateEgressOnlyInternetGatewayOutput) SetEgressOnlyInternetGateway(v *
}
// Contains the parameters for CreateFlowLogs.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFlowLogsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFlowLogsRequest
type CreateFlowLogsInput struct {
_ struct{} `type:"structure"`
@@ -24259,7 +27109,7 @@ func (s *CreateFlowLogsInput) SetTrafficType(v string) *CreateFlowLogsInput {
}
// Contains the output of CreateFlowLogs.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFlowLogsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFlowLogsResult
type CreateFlowLogsOutput struct {
_ struct{} `type:"structure"`
@@ -24302,7 +27152,7 @@ func (s *CreateFlowLogsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *CreateFlo
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFpgaImageRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFpgaImageRequest
type CreateFpgaImageInput struct {
_ struct{} `type:"structure"`
@@ -24391,7 +27241,7 @@ func (s *CreateFpgaImageInput) SetName(v string) *CreateFpgaImageInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFpgaImageResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateFpgaImageResult
type CreateFpgaImageOutput struct {
_ struct{} `type:"structure"`
@@ -24425,7 +27275,7 @@ func (s *CreateFpgaImageOutput) SetFpgaImageId(v string) *CreateFpgaImageOutput
}
// Contains the parameters for CreateImage.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateImageRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateImageRequest
type CreateImageInput struct {
_ struct{} `type:"structure"`
@@ -24525,7 +27375,7 @@ func (s *CreateImageInput) SetNoReboot(v bool) *CreateImageInput {
}
// Contains the output of CreateImage.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateImageResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateImageResult
type CreateImageOutput struct {
_ struct{} `type:"structure"`
@@ -24550,7 +27400,7 @@ func (s *CreateImageOutput) SetImageId(v string) *CreateImageOutput {
}
// Contains the parameters for CreateInstanceExportTask.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInstanceExportTaskRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInstanceExportTaskRequest
type CreateInstanceExportTaskInput struct {
_ struct{} `type:"structure"`
@@ -24618,7 +27468,7 @@ func (s *CreateInstanceExportTaskInput) SetTargetEnvironment(v string) *CreateIn
}
// Contains the output for CreateInstanceExportTask.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInstanceExportTaskResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInstanceExportTaskResult
type CreateInstanceExportTaskOutput struct {
_ struct{} `type:"structure"`
@@ -24643,7 +27493,7 @@ func (s *CreateInstanceExportTaskOutput) SetExportTask(v *ExportTask) *CreateIns
}
// Contains the parameters for CreateInternetGateway.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInternetGatewayRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInternetGatewayRequest
type CreateInternetGatewayInput struct {
_ struct{} `type:"structure"`
@@ -24671,7 +27521,7 @@ func (s *CreateInternetGatewayInput) SetDryRun(v bool) *CreateInternetGatewayInp
}
// Contains the output of CreateInternetGateway.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInternetGatewayResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInternetGatewayResult
type CreateInternetGatewayOutput struct {
_ struct{} `type:"structure"`
@@ -24696,7 +27546,7 @@ func (s *CreateInternetGatewayOutput) SetInternetGateway(v *InternetGateway) *Cr
}
// Contains the parameters for CreateKeyPair.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateKeyPairRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateKeyPairRequest
type CreateKeyPairInput struct {
_ struct{} `type:"structure"`
@@ -24750,7 +27600,7 @@ func (s *CreateKeyPairInput) SetKeyName(v string) *CreateKeyPairInput {
}
// Describes a key pair.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/KeyPair
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/KeyPair
type CreateKeyPairOutput struct {
_ struct{} `type:"structure"`
@@ -24792,8 +27642,257 @@ func (s *CreateKeyPairOutput) SetKeyName(v string) *CreateKeyPairOutput {
return s
}
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateLaunchTemplateRequest
+type CreateLaunchTemplateInput struct {
+ _ struct{} `type:"structure"`
+
+ // Unique, case-sensitive identifier you provide to ensure the idempotency of
+ // the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string `type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The information for the launch template.
+ //
+ // LaunchTemplateData is a required field
+ LaunchTemplateData *RequestLaunchTemplateData `type:"structure" required:"true"`
+
+ // A name for the launch template.
+ //
+ // LaunchTemplateName is a required field
+ LaunchTemplateName *string `min:"3" type:"string" required:"true"`
+
+ // A description for the first version of the launch template.
+ VersionDescription *string `type:"string"`
+}
+
+// String returns the string representation
+func (s CreateLaunchTemplateInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateLaunchTemplateInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *CreateLaunchTemplateInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "CreateLaunchTemplateInput"}
+ if s.LaunchTemplateData == nil {
+ invalidParams.Add(request.NewErrParamRequired("LaunchTemplateData"))
+ }
+ if s.LaunchTemplateName == nil {
+ invalidParams.Add(request.NewErrParamRequired("LaunchTemplateName"))
+ }
+ if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 {
+ invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3))
+ }
+ if s.LaunchTemplateData != nil {
+ if err := s.LaunchTemplateData.Validate(); err != nil {
+ invalidParams.AddNested("LaunchTemplateData", err.(request.ErrInvalidParams))
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetClientToken sets the ClientToken field's value.
+func (s *CreateLaunchTemplateInput) SetClientToken(v string) *CreateLaunchTemplateInput {
+ s.ClientToken = &v
+ return s
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *CreateLaunchTemplateInput) SetDryRun(v bool) *CreateLaunchTemplateInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetLaunchTemplateData sets the LaunchTemplateData field's value.
+func (s *CreateLaunchTemplateInput) SetLaunchTemplateData(v *RequestLaunchTemplateData) *CreateLaunchTemplateInput {
+ s.LaunchTemplateData = v
+ return s
+}
+
+// SetLaunchTemplateName sets the LaunchTemplateName field's value.
+func (s *CreateLaunchTemplateInput) SetLaunchTemplateName(v string) *CreateLaunchTemplateInput {
+ s.LaunchTemplateName = &v
+ return s
+}
+
+// SetVersionDescription sets the VersionDescription field's value.
+func (s *CreateLaunchTemplateInput) SetVersionDescription(v string) *CreateLaunchTemplateInput {
+ s.VersionDescription = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateLaunchTemplateResult
+type CreateLaunchTemplateOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Information about the launch template.
+ LaunchTemplate *LaunchTemplate `locationName:"launchTemplate" type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateLaunchTemplateOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateLaunchTemplateOutput) GoString() string {
+ return s.String()
+}
+
+// SetLaunchTemplate sets the LaunchTemplate field's value.
+func (s *CreateLaunchTemplateOutput) SetLaunchTemplate(v *LaunchTemplate) *CreateLaunchTemplateOutput {
+ s.LaunchTemplate = v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateLaunchTemplateVersionRequest
+type CreateLaunchTemplateVersionInput struct {
+ _ struct{} `type:"structure"`
+
+ // Unique, case-sensitive identifier you provide to ensure the idempotency of
+ // the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string `type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The information for the launch template.
+ //
+ // LaunchTemplateData is a required field
+ LaunchTemplateData *RequestLaunchTemplateData `type:"structure" required:"true"`
+
+ // The ID of the launch template. You must specify either the launch template
+ // ID or launch template name in the request.
+ LaunchTemplateId *string `type:"string"`
+
+ // The name of the launch template. You must specify either the launch template
+ // ID or launch template name in the request.
+ LaunchTemplateName *string `min:"3" type:"string"`
+
+ // The version number of the launch template version on which to base the new
+ // version. The new version inherits the same launch parameters as the source
+ // version, except for parameters that you specify in LaunchTemplateData.
+ SourceVersion *string `type:"string"`
+
+ // A description for the version of the launch template.
+ VersionDescription *string `type:"string"`
+}
+
+// String returns the string representation
+func (s CreateLaunchTemplateVersionInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateLaunchTemplateVersionInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *CreateLaunchTemplateVersionInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "CreateLaunchTemplateVersionInput"}
+ if s.LaunchTemplateData == nil {
+ invalidParams.Add(request.NewErrParamRequired("LaunchTemplateData"))
+ }
+ if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 {
+ invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3))
+ }
+ if s.LaunchTemplateData != nil {
+ if err := s.LaunchTemplateData.Validate(); err != nil {
+ invalidParams.AddNested("LaunchTemplateData", err.(request.ErrInvalidParams))
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetClientToken sets the ClientToken field's value.
+func (s *CreateLaunchTemplateVersionInput) SetClientToken(v string) *CreateLaunchTemplateVersionInput {
+ s.ClientToken = &v
+ return s
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *CreateLaunchTemplateVersionInput) SetDryRun(v bool) *CreateLaunchTemplateVersionInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetLaunchTemplateData sets the LaunchTemplateData field's value.
+func (s *CreateLaunchTemplateVersionInput) SetLaunchTemplateData(v *RequestLaunchTemplateData) *CreateLaunchTemplateVersionInput {
+ s.LaunchTemplateData = v
+ return s
+}
+
+// SetLaunchTemplateId sets the LaunchTemplateId field's value.
+func (s *CreateLaunchTemplateVersionInput) SetLaunchTemplateId(v string) *CreateLaunchTemplateVersionInput {
+ s.LaunchTemplateId = &v
+ return s
+}
+
+// SetLaunchTemplateName sets the LaunchTemplateName field's value.
+func (s *CreateLaunchTemplateVersionInput) SetLaunchTemplateName(v string) *CreateLaunchTemplateVersionInput {
+ s.LaunchTemplateName = &v
+ return s
+}
+
+// SetSourceVersion sets the SourceVersion field's value.
+func (s *CreateLaunchTemplateVersionInput) SetSourceVersion(v string) *CreateLaunchTemplateVersionInput {
+ s.SourceVersion = &v
+ return s
+}
+
+// SetVersionDescription sets the VersionDescription field's value.
+func (s *CreateLaunchTemplateVersionInput) SetVersionDescription(v string) *CreateLaunchTemplateVersionInput {
+ s.VersionDescription = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateLaunchTemplateVersionResult
+type CreateLaunchTemplateVersionOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Information about the launch template version.
+ LaunchTemplateVersion *LaunchTemplateVersion `locationName:"launchTemplateVersion" type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateLaunchTemplateVersionOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateLaunchTemplateVersionOutput) GoString() string {
+ return s.String()
+}
+
+// SetLaunchTemplateVersion sets the LaunchTemplateVersion field's value.
+func (s *CreateLaunchTemplateVersionOutput) SetLaunchTemplateVersion(v *LaunchTemplateVersion) *CreateLaunchTemplateVersionOutput {
+ s.LaunchTemplateVersion = v
+ return s
+}
+
// Contains the parameters for CreateNatGateway.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNatGatewayRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNatGatewayRequest
type CreateNatGatewayInput struct {
_ struct{} `type:"structure"`
@@ -24861,7 +27960,7 @@ func (s *CreateNatGatewayInput) SetSubnetId(v string) *CreateNatGatewayInput {
}
// Contains the output of CreateNatGateway.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNatGatewayResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNatGatewayResult
type CreateNatGatewayOutput struct {
_ struct{} `type:"structure"`
@@ -24896,7 +27995,7 @@ func (s *CreateNatGatewayOutput) SetNatGateway(v *NatGateway) *CreateNatGatewayO
}
// Contains the parameters for CreateNetworkAclEntry.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAclEntryRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAclEntryRequest
type CreateNetworkAclEntryInput struct {
_ struct{} `type:"structure"`
@@ -25051,7 +28150,7 @@ func (s *CreateNetworkAclEntryInput) SetRuleNumber(v int64) *CreateNetworkAclEnt
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAclEntryOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAclEntryOutput
type CreateNetworkAclEntryOutput struct {
_ struct{} `type:"structure"`
}
@@ -25067,7 +28166,7 @@ func (s CreateNetworkAclEntryOutput) GoString() string {
}
// Contains the parameters for CreateNetworkAcl.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAclRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAclRequest
type CreateNetworkAclInput struct {
_ struct{} `type:"structure"`
@@ -25119,7 +28218,7 @@ func (s *CreateNetworkAclInput) SetVpcId(v string) *CreateNetworkAclInput {
}
// Contains the output of CreateNetworkAcl.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAclResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkAclResult
type CreateNetworkAclOutput struct {
_ struct{} `type:"structure"`
@@ -25144,7 +28243,7 @@ func (s *CreateNetworkAclOutput) SetNetworkAcl(v *NetworkAcl) *CreateNetworkAclO
}
// Contains the parameters for CreateNetworkInterface.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfaceRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfaceRequest
type CreateNetworkInterfaceInput struct {
_ struct{} `type:"structure"`
@@ -25286,7 +28385,7 @@ func (s *CreateNetworkInterfaceInput) SetSubnetId(v string) *CreateNetworkInterf
}
// Contains the output of CreateNetworkInterface.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfaceResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfaceResult
type CreateNetworkInterfaceOutput struct {
_ struct{} `type:"structure"`
@@ -25311,7 +28410,7 @@ func (s *CreateNetworkInterfaceOutput) SetNetworkInterface(v *NetworkInterface)
}
// Contains the parameters for CreateNetworkInterfacePermission.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfacePermissionRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfacePermissionRequest
type CreateNetworkInterfacePermissionInput struct {
_ struct{} `type:"structure"`
@@ -25395,7 +28494,7 @@ func (s *CreateNetworkInterfacePermissionInput) SetPermission(v string) *CreateN
}
// Contains the output of CreateNetworkInterfacePermission.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfacePermissionResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInterfacePermissionResult
type CreateNetworkInterfacePermissionOutput struct {
_ struct{} `type:"structure"`
@@ -25420,7 +28519,7 @@ func (s *CreateNetworkInterfacePermissionOutput) SetInterfacePermission(v *Netwo
}
// Contains the parameters for CreatePlacementGroup.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreatePlacementGroupRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreatePlacementGroupRequest
type CreatePlacementGroupInput struct {
_ struct{} `type:"structure"`
@@ -25430,7 +28529,8 @@ type CreatePlacementGroupInput struct {
// it is UnauthorizedOperation.
DryRun *bool `locationName:"dryRun" type:"boolean"`
- // A name for the placement group.
+ // A name for the placement group. Must be unique within the scope of your account
+ // for the region.
//
// Constraints: Up to 255 ASCII characters
//
@@ -25487,7 +28587,7 @@ func (s *CreatePlacementGroupInput) SetStrategy(v string) *CreatePlacementGroupI
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreatePlacementGroupOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreatePlacementGroupOutput
type CreatePlacementGroupOutput struct {
_ struct{} `type:"structure"`
}
@@ -25503,7 +28603,7 @@ func (s CreatePlacementGroupOutput) GoString() string {
}
// Contains the parameters for CreateReservedInstancesListing.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateReservedInstancesListingRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateReservedInstancesListingRequest
type CreateReservedInstancesListingInput struct {
_ struct{} `type:"structure"`
@@ -25591,7 +28691,7 @@ func (s *CreateReservedInstancesListingInput) SetReservedInstancesId(v string) *
}
// Contains the output of CreateReservedInstancesListing.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateReservedInstancesListingResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateReservedInstancesListingResult
type CreateReservedInstancesListingOutput struct {
_ struct{} `type:"structure"`
@@ -25616,7 +28716,7 @@ func (s *CreateReservedInstancesListingOutput) SetReservedInstancesListings(v []
}
// Contains the parameters for CreateRoute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRouteRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRouteRequest
type CreateRouteInput struct {
_ struct{} `type:"structure"`
@@ -25744,7 +28844,7 @@ func (s *CreateRouteInput) SetVpcPeeringConnectionId(v string) *CreateRouteInput
}
// Contains the output of CreateRoute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRouteResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRouteResult
type CreateRouteOutput struct {
_ struct{} `type:"structure"`
@@ -25769,7 +28869,7 @@ func (s *CreateRouteOutput) SetReturn(v bool) *CreateRouteOutput {
}
// Contains the parameters for CreateRouteTable.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRouteTableRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRouteTableRequest
type CreateRouteTableInput struct {
_ struct{} `type:"structure"`
@@ -25821,7 +28921,7 @@ func (s *CreateRouteTableInput) SetVpcId(v string) *CreateRouteTableInput {
}
// Contains the output of CreateRouteTable.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRouteTableResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRouteTableResult
type CreateRouteTableOutput struct {
_ struct{} `type:"structure"`
@@ -25846,7 +28946,7 @@ func (s *CreateRouteTableOutput) SetRouteTable(v *RouteTable) *CreateRouteTableO
}
// Contains the parameters for CreateSecurityGroup.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSecurityGroupRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSecurityGroupRequest
type CreateSecurityGroupInput struct {
_ struct{} `type:"structure"`
@@ -25933,7 +29033,7 @@ func (s *CreateSecurityGroupInput) SetVpcId(v string) *CreateSecurityGroupInput
}
// Contains the output of CreateSecurityGroup.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSecurityGroupResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSecurityGroupResult
type CreateSecurityGroupOutput struct {
_ struct{} `type:"structure"`
@@ -25958,7 +29058,7 @@ func (s *CreateSecurityGroupOutput) SetGroupId(v string) *CreateSecurityGroupOut
}
// Contains the parameters for CreateSnapshot.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSnapshotRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSnapshotRequest
type CreateSnapshotInput struct {
_ struct{} `type:"structure"`
@@ -26019,11 +29119,11 @@ func (s *CreateSnapshotInput) SetVolumeId(v string) *CreateSnapshotInput {
}
// Contains the parameters for CreateSpotDatafeedSubscription.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSpotDatafeedSubscriptionRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSpotDatafeedSubscriptionRequest
type CreateSpotDatafeedSubscriptionInput struct {
_ struct{} `type:"structure"`
- // The Amazon S3 bucket in which to store the Spot instance data feed.
+ // The Amazon S3 bucket in which to store the Spot Instance data feed.
//
// Bucket is a required field
Bucket *string `locationName:"bucket" type:"string" required:"true"`
@@ -26080,11 +29180,11 @@ func (s *CreateSpotDatafeedSubscriptionInput) SetPrefix(v string) *CreateSpotDat
}
// Contains the output of CreateSpotDatafeedSubscription.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSpotDatafeedSubscriptionResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSpotDatafeedSubscriptionResult
type CreateSpotDatafeedSubscriptionOutput struct {
_ struct{} `type:"structure"`
- // The Spot instance data feed subscription.
+ // The Spot Instance data feed subscription.
SpotDatafeedSubscription *SpotDatafeedSubscription `locationName:"spotDatafeedSubscription" type:"structure"`
}
@@ -26105,7 +29205,7 @@ func (s *CreateSpotDatafeedSubscriptionOutput) SetSpotDatafeedSubscription(v *Sp
}
// Contains the parameters for CreateSubnet.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSubnetRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSubnetRequest
type CreateSubnetInput struct {
_ struct{} `type:"structure"`
@@ -26193,7 +29293,7 @@ func (s *CreateSubnetInput) SetVpcId(v string) *CreateSubnetInput {
}
// Contains the output of CreateSubnet.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSubnetResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateSubnetResult
type CreateSubnetOutput struct {
_ struct{} `type:"structure"`
@@ -26218,7 +29318,7 @@ func (s *CreateSubnetOutput) SetSubnet(v *Subnet) *CreateSubnetOutput {
}
// Contains the parameters for CreateTags.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTagsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTagsRequest
type CreateTagsInput struct {
_ struct{} `type:"structure"`
@@ -26285,7 +29385,7 @@ func (s *CreateTagsInput) SetTags(v []*Tag) *CreateTagsInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTagsOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTagsOutput
type CreateTagsOutput struct {
_ struct{} `type:"structure"`
}
@@ -26301,7 +29401,7 @@ func (s CreateTagsOutput) GoString() string {
}
// Contains the parameters for CreateVolume.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVolumeRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVolumeRequest
type CreateVolumeInput struct {
_ struct{} `type:"structure"`
@@ -26445,7 +29545,7 @@ func (s *CreateVolumeInput) SetVolumeType(v string) *CreateVolumeInput {
// Describes the user or group to be added or removed from the permissions for
// a volume.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVolumePermission
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVolumePermission
type CreateVolumePermission struct {
_ struct{} `type:"structure"`
@@ -26481,7 +29581,7 @@ func (s *CreateVolumePermission) SetUserId(v string) *CreateVolumePermission {
}
// Describes modifications to the permissions for a volume.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVolumePermissionModifications
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVolumePermissionModifications
type CreateVolumePermissionModifications struct {
_ struct{} `type:"structure"`
@@ -26516,8 +29616,136 @@ func (s *CreateVolumePermissionModifications) SetRemove(v []*CreateVolumePermiss
return s
}
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpointConnectionNotificationRequest
+type CreateVpcEndpointConnectionNotificationInput struct {
+ _ struct{} `type:"structure"`
+
+ // Unique, case-sensitive identifier you provide to ensure the idempotency of
+ // the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string `type:"string"`
+
+ // One or more endpoint events for which to receive notifications. Valid values
+ // are Accept, Connect, Delete, and Reject.
+ //
+ // ConnectionEvents is a required field
+ ConnectionEvents []*string `locationNameList:"item" type:"list" required:"true"`
+
+ // The ARN of the SNS topic for the notifications.
+ //
+ // ConnectionNotificationArn is a required field
+ ConnectionNotificationArn *string `type:"string" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The ID of the endpoint service.
+ ServiceId *string `type:"string"`
+
+ // The ID of the endpoint.
+ VpcEndpointId *string `type:"string"`
+}
+
+// String returns the string representation
+func (s CreateVpcEndpointConnectionNotificationInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateVpcEndpointConnectionNotificationInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *CreateVpcEndpointConnectionNotificationInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "CreateVpcEndpointConnectionNotificationInput"}
+ if s.ConnectionEvents == nil {
+ invalidParams.Add(request.NewErrParamRequired("ConnectionEvents"))
+ }
+ if s.ConnectionNotificationArn == nil {
+ invalidParams.Add(request.NewErrParamRequired("ConnectionNotificationArn"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetClientToken sets the ClientToken field's value.
+func (s *CreateVpcEndpointConnectionNotificationInput) SetClientToken(v string) *CreateVpcEndpointConnectionNotificationInput {
+ s.ClientToken = &v
+ return s
+}
+
+// SetConnectionEvents sets the ConnectionEvents field's value.
+func (s *CreateVpcEndpointConnectionNotificationInput) SetConnectionEvents(v []*string) *CreateVpcEndpointConnectionNotificationInput {
+ s.ConnectionEvents = v
+ return s
+}
+
+// SetConnectionNotificationArn sets the ConnectionNotificationArn field's value.
+func (s *CreateVpcEndpointConnectionNotificationInput) SetConnectionNotificationArn(v string) *CreateVpcEndpointConnectionNotificationInput {
+ s.ConnectionNotificationArn = &v
+ return s
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *CreateVpcEndpointConnectionNotificationInput) SetDryRun(v bool) *CreateVpcEndpointConnectionNotificationInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetServiceId sets the ServiceId field's value.
+func (s *CreateVpcEndpointConnectionNotificationInput) SetServiceId(v string) *CreateVpcEndpointConnectionNotificationInput {
+ s.ServiceId = &v
+ return s
+}
+
+// SetVpcEndpointId sets the VpcEndpointId field's value.
+func (s *CreateVpcEndpointConnectionNotificationInput) SetVpcEndpointId(v string) *CreateVpcEndpointConnectionNotificationInput {
+ s.VpcEndpointId = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpointConnectionNotificationResult
+type CreateVpcEndpointConnectionNotificationOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Unique, case-sensitive identifier you provide to ensure the idempotency of
+ // the request.
+ ClientToken *string `locationName:"clientToken" type:"string"`
+
+ // Information about the notification.
+ ConnectionNotification *ConnectionNotification `locationName:"connectionNotification" type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateVpcEndpointConnectionNotificationOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateVpcEndpointConnectionNotificationOutput) GoString() string {
+ return s.String()
+}
+
+// SetClientToken sets the ClientToken field's value.
+func (s *CreateVpcEndpointConnectionNotificationOutput) SetClientToken(v string) *CreateVpcEndpointConnectionNotificationOutput {
+ s.ClientToken = &v
+ return s
+}
+
+// SetConnectionNotification sets the ConnectionNotification field's value.
+func (s *CreateVpcEndpointConnectionNotificationOutput) SetConnectionNotification(v *ConnectionNotification) *CreateVpcEndpointConnectionNotificationOutput {
+ s.ConnectionNotification = v
+ return s
+}
+
// Contains the parameters for CreateVpcEndpoint.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpointRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpointRequest
type CreateVpcEndpointInput struct {
_ struct{} `type:"structure"`
@@ -26531,20 +29759,49 @@ type CreateVpcEndpointInput struct {
// it is UnauthorizedOperation.
DryRun *bool `type:"boolean"`
- // A policy to attach to the endpoint that controls access to the service. The
- // policy must be in valid JSON format. If this parameter is not specified,
- // we attach a default policy that allows full access to the service.
+ // (Gateway endpoint) A policy to attach to the endpoint that controls access
+ // to the service. The policy must be in valid JSON format. If this parameter
+ // is not specified, we attach a default policy that allows full access to the
+ // service.
PolicyDocument *string `type:"string"`
- // One or more route table IDs.
+ // (Interface endpoint) Indicate whether to associate a private hosted zone
+ // with the specified VPC. The private hosted zone contains a record set for
+ // the default public DNS name for the service for the region (for example,
+ // kinesis.us-east-1.amazonaws.com) which resolves to the private IP addresses
+ // of the endpoint network interfaces in the VPC. This enables you to make requests
+ // to the default public DNS name for the service instead of the public DNS
+ // names that are automatically generated by the VPC endpoint service.
+ //
+ // To use a private hosted zone, you must set the following VPC attributes to
+ // true: enableDnsHostnames and enableDnsSupport. Use ModifyVpcAttribute to
+ // set the VPC attributes.
+ //
+ // Default: true
+ PrivateDnsEnabled *bool `type:"boolean"`
+
+ // (Gateway endpoint) One or more route table IDs.
RouteTableIds []*string `locationName:"RouteTableId" locationNameList:"item" type:"list"`
- // The AWS service name, in the form com.amazonaws.region.service. To get a
- // list of available services, use the DescribeVpcEndpointServices request.
+ // (Interface endpoint) The ID of one or more security groups to associate with
+ // the endpoint network interface.
+ SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"item" type:"list"`
+
+ // The service name. To get a list of available services, use the DescribeVpcEndpointServices
+ // request, or get the name from the service provider.
//
// ServiceName is a required field
ServiceName *string `type:"string" required:"true"`
+ // (Interface endpoint) The ID of one or more subnets in which to create an
+ // endpoint network interface.
+ SubnetIds []*string `locationName:"SubnetId" locationNameList:"item" type:"list"`
+
+ // The type of endpoint.
+ //
+ // Default: Gateway
+ VpcEndpointType *string `type:"string" enum:"VpcEndpointType"`
+
// The ID of the VPC in which the endpoint will be used.
//
// VpcId is a required field
@@ -26595,18 +29852,42 @@ func (s *CreateVpcEndpointInput) SetPolicyDocument(v string) *CreateVpcEndpointI
return s
}
+// SetPrivateDnsEnabled sets the PrivateDnsEnabled field's value.
+func (s *CreateVpcEndpointInput) SetPrivateDnsEnabled(v bool) *CreateVpcEndpointInput {
+ s.PrivateDnsEnabled = &v
+ return s
+}
+
// SetRouteTableIds sets the RouteTableIds field's value.
func (s *CreateVpcEndpointInput) SetRouteTableIds(v []*string) *CreateVpcEndpointInput {
s.RouteTableIds = v
return s
}
+// SetSecurityGroupIds sets the SecurityGroupIds field's value.
+func (s *CreateVpcEndpointInput) SetSecurityGroupIds(v []*string) *CreateVpcEndpointInput {
+ s.SecurityGroupIds = v
+ return s
+}
+
// SetServiceName sets the ServiceName field's value.
func (s *CreateVpcEndpointInput) SetServiceName(v string) *CreateVpcEndpointInput {
s.ServiceName = &v
return s
}
+// SetSubnetIds sets the SubnetIds field's value.
+func (s *CreateVpcEndpointInput) SetSubnetIds(v []*string) *CreateVpcEndpointInput {
+ s.SubnetIds = v
+ return s
+}
+
+// SetVpcEndpointType sets the VpcEndpointType field's value.
+func (s *CreateVpcEndpointInput) SetVpcEndpointType(v string) *CreateVpcEndpointInput {
+ s.VpcEndpointType = &v
+ return s
+}
+
// SetVpcId sets the VpcId field's value.
func (s *CreateVpcEndpointInput) SetVpcId(v string) *CreateVpcEndpointInput {
s.VpcId = &v
@@ -26614,7 +29895,7 @@ func (s *CreateVpcEndpointInput) SetVpcId(v string) *CreateVpcEndpointInput {
}
// Contains the output of CreateVpcEndpoint.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpointResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpointResult
type CreateVpcEndpointOutput struct {
_ struct{} `type:"structure"`
@@ -26648,8 +29929,114 @@ func (s *CreateVpcEndpointOutput) SetVpcEndpoint(v *VpcEndpoint) *CreateVpcEndpo
return s
}
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpointServiceConfigurationRequest
+type CreateVpcEndpointServiceConfigurationInput struct {
+ _ struct{} `type:"structure"`
+
+ // Indicate whether requests from service consumers to create an endpoint to
+ // your service must be accepted. To accept a request, use AcceptVpcEndpointConnections.
+ AcceptanceRequired *bool `type:"boolean"`
+
+ // Unique, case-sensitive identifier you provide to ensure the idempotency of
+ // the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html).
+ ClientToken *string `type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The Amazon Resource Names (ARNs) of one or more Network Load Balancers for
+ // your service.
+ //
+ // NetworkLoadBalancerArns is a required field
+ NetworkLoadBalancerArns []*string `locationName:"NetworkLoadBalancerArn" locationNameList:"item" type:"list" required:"true"`
+}
+
+// String returns the string representation
+func (s CreateVpcEndpointServiceConfigurationInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateVpcEndpointServiceConfigurationInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *CreateVpcEndpointServiceConfigurationInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "CreateVpcEndpointServiceConfigurationInput"}
+ if s.NetworkLoadBalancerArns == nil {
+ invalidParams.Add(request.NewErrParamRequired("NetworkLoadBalancerArns"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetAcceptanceRequired sets the AcceptanceRequired field's value.
+func (s *CreateVpcEndpointServiceConfigurationInput) SetAcceptanceRequired(v bool) *CreateVpcEndpointServiceConfigurationInput {
+ s.AcceptanceRequired = &v
+ return s
+}
+
+// SetClientToken sets the ClientToken field's value.
+func (s *CreateVpcEndpointServiceConfigurationInput) SetClientToken(v string) *CreateVpcEndpointServiceConfigurationInput {
+ s.ClientToken = &v
+ return s
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *CreateVpcEndpointServiceConfigurationInput) SetDryRun(v bool) *CreateVpcEndpointServiceConfigurationInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetNetworkLoadBalancerArns sets the NetworkLoadBalancerArns field's value.
+func (s *CreateVpcEndpointServiceConfigurationInput) SetNetworkLoadBalancerArns(v []*string) *CreateVpcEndpointServiceConfigurationInput {
+ s.NetworkLoadBalancerArns = v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcEndpointServiceConfigurationResult
+type CreateVpcEndpointServiceConfigurationOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Unique, case-sensitive identifier you provide to ensure the idempotency of
+ // the request.
+ ClientToken *string `locationName:"clientToken" type:"string"`
+
+ // Information about the service configuration.
+ ServiceConfiguration *ServiceConfiguration `locationName:"serviceConfiguration" type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateVpcEndpointServiceConfigurationOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateVpcEndpointServiceConfigurationOutput) GoString() string {
+ return s.String()
+}
+
+// SetClientToken sets the ClientToken field's value.
+func (s *CreateVpcEndpointServiceConfigurationOutput) SetClientToken(v string) *CreateVpcEndpointServiceConfigurationOutput {
+ s.ClientToken = &v
+ return s
+}
+
+// SetServiceConfiguration sets the ServiceConfiguration field's value.
+func (s *CreateVpcEndpointServiceConfigurationOutput) SetServiceConfiguration(v *ServiceConfiguration) *CreateVpcEndpointServiceConfigurationOutput {
+ s.ServiceConfiguration = v
+ return s
+}
+
// Contains the parameters for CreateVpc.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcRequest
type CreateVpcInput struct {
_ struct{} `type:"structure"`
@@ -26730,7 +30117,7 @@ func (s *CreateVpcInput) SetInstanceTenancy(v string) *CreateVpcInput {
}
// Contains the output of CreateVpc.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcResult
type CreateVpcOutput struct {
_ struct{} `type:"structure"`
@@ -26755,7 +30142,7 @@ func (s *CreateVpcOutput) SetVpc(v *Vpc) *CreateVpcOutput {
}
// Contains the parameters for CreateVpcPeeringConnection.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcPeeringConnectionRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcPeeringConnectionRequest
type CreateVpcPeeringConnectionInput struct {
_ struct{} `type:"structure"`
@@ -26765,15 +30152,22 @@ type CreateVpcPeeringConnectionInput struct {
// it is UnauthorizedOperation.
DryRun *bool `locationName:"dryRun" type:"boolean"`
- // The AWS account ID of the owner of the peer VPC.
+ // The AWS account ID of the owner of the accepter VPC.
//
// Default: Your AWS account ID
PeerOwnerId *string `locationName:"peerOwnerId" type:"string"`
+ // The region code for the accepter VPC, if the accepter VPC is located in a
+ // region other than the region in which you make the request.
+ //
+ // Default: The region in which you make the request.
+ PeerRegion *string `type:"string"`
+
// The ID of the VPC with which you are creating the VPC peering connection.
+ // You must specify this parameter in the request.
PeerVpcId *string `locationName:"peerVpcId" type:"string"`
- // The ID of the requester VPC.
+ // The ID of the requester VPC. You must specify this parameter in the request.
VpcId *string `locationName:"vpcId" type:"string"`
}
@@ -26799,6 +30193,12 @@ func (s *CreateVpcPeeringConnectionInput) SetPeerOwnerId(v string) *CreateVpcPee
return s
}
+// SetPeerRegion sets the PeerRegion field's value.
+func (s *CreateVpcPeeringConnectionInput) SetPeerRegion(v string) *CreateVpcPeeringConnectionInput {
+ s.PeerRegion = &v
+ return s
+}
+
// SetPeerVpcId sets the PeerVpcId field's value.
func (s *CreateVpcPeeringConnectionInput) SetPeerVpcId(v string) *CreateVpcPeeringConnectionInput {
s.PeerVpcId = &v
@@ -26812,7 +30212,7 @@ func (s *CreateVpcPeeringConnectionInput) SetVpcId(v string) *CreateVpcPeeringCo
}
// Contains the output of CreateVpcPeeringConnection.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcPeeringConnectionResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpcPeeringConnectionResult
type CreateVpcPeeringConnectionOutput struct {
_ struct{} `type:"structure"`
@@ -26837,7 +30237,7 @@ func (s *CreateVpcPeeringConnectionOutput) SetVpcPeeringConnection(v *VpcPeering
}
// Contains the parameters for CreateVpnConnection.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnectionRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnectionRequest
type CreateVpnConnectionInput struct {
_ struct{} `type:"structure"`
@@ -26852,11 +30252,7 @@ type CreateVpnConnectionInput struct {
// it is UnauthorizedOperation.
DryRun *bool `locationName:"dryRun" type:"boolean"`
- // Indicates whether the VPN connection requires static routes. If you are creating
- // a VPN connection for a device that does not support BGP, you must specify
- // true.
- //
- // Default: false
+ // The options for the VPN connection.
Options *VpnConnectionOptionsSpecification `locationName:"options" type:"structure"`
// The type of VPN connection (ipsec.1).
@@ -26930,7 +30326,7 @@ func (s *CreateVpnConnectionInput) SetVpnGatewayId(v string) *CreateVpnConnectio
}
// Contains the output of CreateVpnConnection.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnectionResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnectionResult
type CreateVpnConnectionOutput struct {
_ struct{} `type:"structure"`
@@ -26955,7 +30351,7 @@ func (s *CreateVpnConnectionOutput) SetVpnConnection(v *VpnConnection) *CreateVp
}
// Contains the parameters for CreateVpnConnectionRoute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnectionRouteRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnectionRouteRequest
type CreateVpnConnectionRouteInput struct {
_ struct{} `type:"structure"`
@@ -27008,7 +30404,7 @@ func (s *CreateVpnConnectionRouteInput) SetVpnConnectionId(v string) *CreateVpnC
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnectionRouteOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnConnectionRouteOutput
type CreateVpnConnectionRouteOutput struct {
_ struct{} `type:"structure"`
}
@@ -27024,10 +30420,17 @@ func (s CreateVpnConnectionRouteOutput) GoString() string {
}
// Contains the parameters for CreateVpnGateway.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnGatewayRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnGatewayRequest
type CreateVpnGatewayInput struct {
_ struct{} `type:"structure"`
+ // A private Autonomous System Number (ASN) for the Amazon side of a BGP session.
+ // If you're using a 16-bit ASN, it must be in the 64512 to 65534 range. If
+ // you're using a 32-bit ASN, it must be in the 4200000000 to 4294967294 range.
+ //
+ // Default: 64512
+ AmazonSideAsn *int64 `type:"long"`
+
// The Availability Zone for the virtual private gateway.
AvailabilityZone *string `type:"string"`
@@ -27066,6 +30469,12 @@ func (s *CreateVpnGatewayInput) Validate() error {
return nil
}
+// SetAmazonSideAsn sets the AmazonSideAsn field's value.
+func (s *CreateVpnGatewayInput) SetAmazonSideAsn(v int64) *CreateVpnGatewayInput {
+ s.AmazonSideAsn = &v
+ return s
+}
+
// SetAvailabilityZone sets the AvailabilityZone field's value.
func (s *CreateVpnGatewayInput) SetAvailabilityZone(v string) *CreateVpnGatewayInput {
s.AvailabilityZone = &v
@@ -27085,7 +30494,7 @@ func (s *CreateVpnGatewayInput) SetType(v string) *CreateVpnGatewayInput {
}
// Contains the output of CreateVpnGateway.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnGatewayResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateVpnGatewayResult
type CreateVpnGatewayOutput struct {
_ struct{} `type:"structure"`
@@ -27109,8 +30518,74 @@ func (s *CreateVpnGatewayOutput) SetVpnGateway(v *VpnGateway) *CreateVpnGatewayO
return s
}
+// Describes the credit option for CPU usage of a T2 instance.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreditSpecification
+type CreditSpecification struct {
+ _ struct{} `type:"structure"`
+
+ // The credit option for CPU usage of a T2 instance.
+ CpuCredits *string `locationName:"cpuCredits" type:"string"`
+}
+
+// String returns the string representation
+func (s CreditSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreditSpecification) GoString() string {
+ return s.String()
+}
+
+// SetCpuCredits sets the CpuCredits field's value.
+func (s *CreditSpecification) SetCpuCredits(v string) *CreditSpecification {
+ s.CpuCredits = &v
+ return s
+}
+
+// The credit option for CPU usage of a T2 instance.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreditSpecificationRequest
+type CreditSpecificationRequest struct {
+ _ struct{} `type:"structure"`
+
+ // The credit option for CPU usage of a T2 instance. Valid values are standard
+ // and unlimited.
+ //
+ // CpuCredits is a required field
+ CpuCredits *string `type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s CreditSpecificationRequest) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreditSpecificationRequest) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *CreditSpecificationRequest) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "CreditSpecificationRequest"}
+ if s.CpuCredits == nil {
+ invalidParams.Add(request.NewErrParamRequired("CpuCredits"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetCpuCredits sets the CpuCredits field's value.
+func (s *CreditSpecificationRequest) SetCpuCredits(v string) *CreditSpecificationRequest {
+ s.CpuCredits = &v
+ return s
+}
+
// Describes a customer gateway.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CustomerGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CustomerGateway
type CustomerGateway struct {
_ struct{} `type:"structure"`
@@ -27182,7 +30657,7 @@ func (s *CustomerGateway) SetType(v string) *CustomerGateway {
}
// Contains the parameters for DeleteCustomerGateway.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteCustomerGatewayRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteCustomerGatewayRequest
type DeleteCustomerGatewayInput struct {
_ struct{} `type:"structure"`
@@ -27233,7 +30708,7 @@ func (s *DeleteCustomerGatewayInput) SetDryRun(v bool) *DeleteCustomerGatewayInp
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteCustomerGatewayOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteCustomerGatewayOutput
type DeleteCustomerGatewayOutput struct {
_ struct{} `type:"structure"`
}
@@ -27249,7 +30724,7 @@ func (s DeleteCustomerGatewayOutput) GoString() string {
}
// Contains the parameters for DeleteDhcpOptions.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteDhcpOptionsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteDhcpOptionsRequest
type DeleteDhcpOptionsInput struct {
_ struct{} `type:"structure"`
@@ -27300,7 +30775,7 @@ func (s *DeleteDhcpOptionsInput) SetDryRun(v bool) *DeleteDhcpOptionsInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteDhcpOptionsOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteDhcpOptionsOutput
type DeleteDhcpOptionsOutput struct {
_ struct{} `type:"structure"`
}
@@ -27315,7 +30790,7 @@ func (s DeleteDhcpOptionsOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteEgressOnlyInternetGatewayRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteEgressOnlyInternetGatewayRequest
type DeleteEgressOnlyInternetGatewayInput struct {
_ struct{} `type:"structure"`
@@ -27366,7 +30841,7 @@ func (s *DeleteEgressOnlyInternetGatewayInput) SetEgressOnlyInternetGatewayId(v
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteEgressOnlyInternetGatewayResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteEgressOnlyInternetGatewayResult
type DeleteEgressOnlyInternetGatewayOutput struct {
_ struct{} `type:"structure"`
@@ -27391,7 +30866,7 @@ func (s *DeleteEgressOnlyInternetGatewayOutput) SetReturnCode(v bool) *DeleteEgr
}
// Contains the parameters for DeleteFlowLogs.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFlowLogsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFlowLogsRequest
type DeleteFlowLogsInput struct {
_ struct{} `type:"structure"`
@@ -27431,7 +30906,7 @@ func (s *DeleteFlowLogsInput) SetFlowLogIds(v []*string) *DeleteFlowLogsInput {
}
// Contains the output of DeleteFlowLogs.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFlowLogsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFlowLogsResult
type DeleteFlowLogsOutput struct {
_ struct{} `type:"structure"`
@@ -27455,8 +30930,83 @@ func (s *DeleteFlowLogsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *DeleteFlo
return s
}
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFpgaImageRequest
+type DeleteFpgaImageInput struct {
+ _ struct{} `type:"structure"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The ID of the AFI.
+ //
+ // FpgaImageId is a required field
+ FpgaImageId *string `type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s DeleteFpgaImageInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteFpgaImageInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DeleteFpgaImageInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DeleteFpgaImageInput"}
+ if s.FpgaImageId == nil {
+ invalidParams.Add(request.NewErrParamRequired("FpgaImageId"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *DeleteFpgaImageInput) SetDryRun(v bool) *DeleteFpgaImageInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetFpgaImageId sets the FpgaImageId field's value.
+func (s *DeleteFpgaImageInput) SetFpgaImageId(v string) *DeleteFpgaImageInput {
+ s.FpgaImageId = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteFpgaImageResult
+type DeleteFpgaImageOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Is true if the request succeeds, and an error otherwise.
+ Return *bool `locationName:"return" type:"boolean"`
+}
+
+// String returns the string representation
+func (s DeleteFpgaImageOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteFpgaImageOutput) GoString() string {
+ return s.String()
+}
+
+// SetReturn sets the Return field's value.
+func (s *DeleteFpgaImageOutput) SetReturn(v bool) *DeleteFpgaImageOutput {
+ s.Return = &v
+ return s
+}
+
// Contains the parameters for DeleteInternetGateway.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteInternetGatewayRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteInternetGatewayRequest
type DeleteInternetGatewayInput struct {
_ struct{} `type:"structure"`
@@ -27507,7 +31057,7 @@ func (s *DeleteInternetGatewayInput) SetInternetGatewayId(v string) *DeleteInter
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteInternetGatewayOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteInternetGatewayOutput
type DeleteInternetGatewayOutput struct {
_ struct{} `type:"structure"`
}
@@ -27523,7 +31073,7 @@ func (s DeleteInternetGatewayOutput) GoString() string {
}
// Contains the parameters for DeleteKeyPair.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteKeyPairRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteKeyPairRequest
type DeleteKeyPairInput struct {
_ struct{} `type:"structure"`
@@ -27574,7 +31124,7 @@ func (s *DeleteKeyPairInput) SetKeyName(v string) *DeleteKeyPairInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteKeyPairOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteKeyPairOutput
type DeleteKeyPairOutput struct {
_ struct{} `type:"structure"`
}
@@ -27589,8 +31139,294 @@ func (s DeleteKeyPairOutput) GoString() string {
return s.String()
}
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteLaunchTemplateRequest
+type DeleteLaunchTemplateInput struct {
+ _ struct{} `type:"structure"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The ID of the launch template. You must specify either the launch template
+ // ID or launch template name in the request.
+ LaunchTemplateId *string `type:"string"`
+
+ // The name of the launch template. You must specify either the launch template
+ // ID or launch template name in the request.
+ LaunchTemplateName *string `min:"3" type:"string"`
+}
+
+// String returns the string representation
+func (s DeleteLaunchTemplateInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteLaunchTemplateInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DeleteLaunchTemplateInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DeleteLaunchTemplateInput"}
+ if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 {
+ invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *DeleteLaunchTemplateInput) SetDryRun(v bool) *DeleteLaunchTemplateInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetLaunchTemplateId sets the LaunchTemplateId field's value.
+func (s *DeleteLaunchTemplateInput) SetLaunchTemplateId(v string) *DeleteLaunchTemplateInput {
+ s.LaunchTemplateId = &v
+ return s
+}
+
+// SetLaunchTemplateName sets the LaunchTemplateName field's value.
+func (s *DeleteLaunchTemplateInput) SetLaunchTemplateName(v string) *DeleteLaunchTemplateInput {
+ s.LaunchTemplateName = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteLaunchTemplateResult
+type DeleteLaunchTemplateOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Information about the launch template.
+ LaunchTemplate *LaunchTemplate `locationName:"launchTemplate" type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteLaunchTemplateOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteLaunchTemplateOutput) GoString() string {
+ return s.String()
+}
+
+// SetLaunchTemplate sets the LaunchTemplate field's value.
+func (s *DeleteLaunchTemplateOutput) SetLaunchTemplate(v *LaunchTemplate) *DeleteLaunchTemplateOutput {
+ s.LaunchTemplate = v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteLaunchTemplateVersionsRequest
+type DeleteLaunchTemplateVersionsInput struct {
+ _ struct{} `type:"structure"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The ID of the launch template. You must specify either the launch template
+ // ID or launch template name in the request.
+ LaunchTemplateId *string `type:"string"`
+
+ // The name of the launch template. You must specify either the launch template
+ // ID or launch template name in the request.
+ LaunchTemplateName *string `min:"3" type:"string"`
+
+ // The version numbers of one or more launch template versions to delete.
+ //
+ // Versions is a required field
+ Versions []*string `locationName:"LaunchTemplateVersion" locationNameList:"item" type:"list" required:"true"`
+}
+
+// String returns the string representation
+func (s DeleteLaunchTemplateVersionsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteLaunchTemplateVersionsInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DeleteLaunchTemplateVersionsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DeleteLaunchTemplateVersionsInput"}
+ if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 {
+ invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3))
+ }
+ if s.Versions == nil {
+ invalidParams.Add(request.NewErrParamRequired("Versions"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *DeleteLaunchTemplateVersionsInput) SetDryRun(v bool) *DeleteLaunchTemplateVersionsInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetLaunchTemplateId sets the LaunchTemplateId field's value.
+func (s *DeleteLaunchTemplateVersionsInput) SetLaunchTemplateId(v string) *DeleteLaunchTemplateVersionsInput {
+ s.LaunchTemplateId = &v
+ return s
+}
+
+// SetLaunchTemplateName sets the LaunchTemplateName field's value.
+func (s *DeleteLaunchTemplateVersionsInput) SetLaunchTemplateName(v string) *DeleteLaunchTemplateVersionsInput {
+ s.LaunchTemplateName = &v
+ return s
+}
+
+// SetVersions sets the Versions field's value.
+func (s *DeleteLaunchTemplateVersionsInput) SetVersions(v []*string) *DeleteLaunchTemplateVersionsInput {
+ s.Versions = v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteLaunchTemplateVersionsResult
+type DeleteLaunchTemplateVersionsOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Information about the launch template versions that were successfully deleted.
+ SuccessfullyDeletedLaunchTemplateVersions []*DeleteLaunchTemplateVersionsResponseSuccessItem `locationName:"successfullyDeletedLaunchTemplateVersionSet" locationNameList:"item" type:"list"`
+
+ // Information about the launch template versions that could not be deleted.
+ UnsuccessfullyDeletedLaunchTemplateVersions []*DeleteLaunchTemplateVersionsResponseErrorItem `locationName:"unsuccessfullyDeletedLaunchTemplateVersionSet" locationNameList:"item" type:"list"`
+}
+
+// String returns the string representation
+func (s DeleteLaunchTemplateVersionsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteLaunchTemplateVersionsOutput) GoString() string {
+ return s.String()
+}
+
+// SetSuccessfullyDeletedLaunchTemplateVersions sets the SuccessfullyDeletedLaunchTemplateVersions field's value.
+func (s *DeleteLaunchTemplateVersionsOutput) SetSuccessfullyDeletedLaunchTemplateVersions(v []*DeleteLaunchTemplateVersionsResponseSuccessItem) *DeleteLaunchTemplateVersionsOutput {
+ s.SuccessfullyDeletedLaunchTemplateVersions = v
+ return s
+}
+
+// SetUnsuccessfullyDeletedLaunchTemplateVersions sets the UnsuccessfullyDeletedLaunchTemplateVersions field's value.
+func (s *DeleteLaunchTemplateVersionsOutput) SetUnsuccessfullyDeletedLaunchTemplateVersions(v []*DeleteLaunchTemplateVersionsResponseErrorItem) *DeleteLaunchTemplateVersionsOutput {
+ s.UnsuccessfullyDeletedLaunchTemplateVersions = v
+ return s
+}
+
+// Describes a launch template version that could not be deleted.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteLaunchTemplateVersionsResponseErrorItem
+type DeleteLaunchTemplateVersionsResponseErrorItem struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the launch template.
+ LaunchTemplateId *string `locationName:"launchTemplateId" type:"string"`
+
+ // The name of the launch template.
+ LaunchTemplateName *string `locationName:"launchTemplateName" type:"string"`
+
+ // Information about the error.
+ ResponseError *ResponseError `locationName:"responseError" type:"structure"`
+
+ // The version number of the launch template.
+ VersionNumber *int64 `locationName:"versionNumber" type:"long"`
+}
+
+// String returns the string representation
+func (s DeleteLaunchTemplateVersionsResponseErrorItem) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteLaunchTemplateVersionsResponseErrorItem) GoString() string {
+ return s.String()
+}
+
+// SetLaunchTemplateId sets the LaunchTemplateId field's value.
+func (s *DeleteLaunchTemplateVersionsResponseErrorItem) SetLaunchTemplateId(v string) *DeleteLaunchTemplateVersionsResponseErrorItem {
+ s.LaunchTemplateId = &v
+ return s
+}
+
+// SetLaunchTemplateName sets the LaunchTemplateName field's value.
+func (s *DeleteLaunchTemplateVersionsResponseErrorItem) SetLaunchTemplateName(v string) *DeleteLaunchTemplateVersionsResponseErrorItem {
+ s.LaunchTemplateName = &v
+ return s
+}
+
+// SetResponseError sets the ResponseError field's value.
+func (s *DeleteLaunchTemplateVersionsResponseErrorItem) SetResponseError(v *ResponseError) *DeleteLaunchTemplateVersionsResponseErrorItem {
+ s.ResponseError = v
+ return s
+}
+
+// SetVersionNumber sets the VersionNumber field's value.
+func (s *DeleteLaunchTemplateVersionsResponseErrorItem) SetVersionNumber(v int64) *DeleteLaunchTemplateVersionsResponseErrorItem {
+ s.VersionNumber = &v
+ return s
+}
+
+// Describes a launch template version that was successfully deleted.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteLaunchTemplateVersionsResponseSuccessItem
+type DeleteLaunchTemplateVersionsResponseSuccessItem struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the launch template.
+ LaunchTemplateId *string `locationName:"launchTemplateId" type:"string"`
+
+ // The name of the launch template.
+ LaunchTemplateName *string `locationName:"launchTemplateName" type:"string"`
+
+ // The version number of the launch template.
+ VersionNumber *int64 `locationName:"versionNumber" type:"long"`
+}
+
+// String returns the string representation
+func (s DeleteLaunchTemplateVersionsResponseSuccessItem) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteLaunchTemplateVersionsResponseSuccessItem) GoString() string {
+ return s.String()
+}
+
+// SetLaunchTemplateId sets the LaunchTemplateId field's value.
+func (s *DeleteLaunchTemplateVersionsResponseSuccessItem) SetLaunchTemplateId(v string) *DeleteLaunchTemplateVersionsResponseSuccessItem {
+ s.LaunchTemplateId = &v
+ return s
+}
+
+// SetLaunchTemplateName sets the LaunchTemplateName field's value.
+func (s *DeleteLaunchTemplateVersionsResponseSuccessItem) SetLaunchTemplateName(v string) *DeleteLaunchTemplateVersionsResponseSuccessItem {
+ s.LaunchTemplateName = &v
+ return s
+}
+
+// SetVersionNumber sets the VersionNumber field's value.
+func (s *DeleteLaunchTemplateVersionsResponseSuccessItem) SetVersionNumber(v int64) *DeleteLaunchTemplateVersionsResponseSuccessItem {
+ s.VersionNumber = &v
+ return s
+}
+
// Contains the parameters for DeleteNatGateway.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNatGatewayRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNatGatewayRequest
type DeleteNatGatewayInput struct {
_ struct{} `type:"structure"`
@@ -27630,7 +31466,7 @@ func (s *DeleteNatGatewayInput) SetNatGatewayId(v string) *DeleteNatGatewayInput
}
// Contains the output of DeleteNatGateway.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNatGatewayResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNatGatewayResult
type DeleteNatGatewayOutput struct {
_ struct{} `type:"structure"`
@@ -27655,7 +31491,7 @@ func (s *DeleteNatGatewayOutput) SetNatGatewayId(v string) *DeleteNatGatewayOutp
}
// Contains the parameters for DeleteNetworkAclEntry.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAclEntryRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAclEntryRequest
type DeleteNetworkAclEntryInput struct {
_ struct{} `type:"structure"`
@@ -27734,7 +31570,7 @@ func (s *DeleteNetworkAclEntryInput) SetRuleNumber(v int64) *DeleteNetworkAclEnt
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAclEntryOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAclEntryOutput
type DeleteNetworkAclEntryOutput struct {
_ struct{} `type:"structure"`
}
@@ -27750,7 +31586,7 @@ func (s DeleteNetworkAclEntryOutput) GoString() string {
}
// Contains the parameters for DeleteNetworkAcl.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAclRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAclRequest
type DeleteNetworkAclInput struct {
_ struct{} `type:"structure"`
@@ -27801,7 +31637,7 @@ func (s *DeleteNetworkAclInput) SetNetworkAclId(v string) *DeleteNetworkAclInput
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAclOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkAclOutput
type DeleteNetworkAclOutput struct {
_ struct{} `type:"structure"`
}
@@ -27817,7 +31653,7 @@ func (s DeleteNetworkAclOutput) GoString() string {
}
// Contains the parameters for DeleteNetworkInterface.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfaceRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfaceRequest
type DeleteNetworkInterfaceInput struct {
_ struct{} `type:"structure"`
@@ -27868,7 +31704,7 @@ func (s *DeleteNetworkInterfaceInput) SetNetworkInterfaceId(v string) *DeleteNet
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfaceOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfaceOutput
type DeleteNetworkInterfaceOutput struct {
_ struct{} `type:"structure"`
}
@@ -27884,7 +31720,7 @@ func (s DeleteNetworkInterfaceOutput) GoString() string {
}
// Contains the parameters for DeleteNetworkInterfacePermission.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfacePermissionRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfacePermissionRequest
type DeleteNetworkInterfacePermissionInput struct {
_ struct{} `type:"structure"`
@@ -27946,7 +31782,7 @@ func (s *DeleteNetworkInterfacePermissionInput) SetNetworkInterfacePermissionId(
}
// Contains the output for DeleteNetworkInterfacePermission.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfacePermissionResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInterfacePermissionResult
type DeleteNetworkInterfacePermissionOutput struct {
_ struct{} `type:"structure"`
@@ -27971,7 +31807,7 @@ func (s *DeleteNetworkInterfacePermissionOutput) SetReturn(v bool) *DeleteNetwor
}
// Contains the parameters for DeletePlacementGroup.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeletePlacementGroupRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeletePlacementGroupRequest
type DeletePlacementGroupInput struct {
_ struct{} `type:"structure"`
@@ -28022,7 +31858,7 @@ func (s *DeletePlacementGroupInput) SetGroupName(v string) *DeletePlacementGroup
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeletePlacementGroupOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeletePlacementGroupOutput
type DeletePlacementGroupOutput struct {
_ struct{} `type:"structure"`
}
@@ -28038,7 +31874,7 @@ func (s DeletePlacementGroupOutput) GoString() string {
}
// Contains the parameters for DeleteRoute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRouteRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRouteRequest
type DeleteRouteInput struct {
_ struct{} `type:"structure"`
@@ -28109,7 +31945,7 @@ func (s *DeleteRouteInput) SetRouteTableId(v string) *DeleteRouteInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRouteOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRouteOutput
type DeleteRouteOutput struct {
_ struct{} `type:"structure"`
}
@@ -28125,7 +31961,7 @@ func (s DeleteRouteOutput) GoString() string {
}
// Contains the parameters for DeleteRouteTable.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRouteTableRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRouteTableRequest
type DeleteRouteTableInput struct {
_ struct{} `type:"structure"`
@@ -28176,7 +32012,7 @@ func (s *DeleteRouteTableInput) SetRouteTableId(v string) *DeleteRouteTableInput
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRouteTableOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteRouteTableOutput
type DeleteRouteTableOutput struct {
_ struct{} `type:"structure"`
}
@@ -28192,7 +32028,7 @@ func (s DeleteRouteTableOutput) GoString() string {
}
// Contains the parameters for DeleteSecurityGroup.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSecurityGroupRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSecurityGroupRequest
type DeleteSecurityGroupInput struct {
_ struct{} `type:"structure"`
@@ -28238,7 +32074,7 @@ func (s *DeleteSecurityGroupInput) SetGroupName(v string) *DeleteSecurityGroupIn
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSecurityGroupOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSecurityGroupOutput
type DeleteSecurityGroupOutput struct {
_ struct{} `type:"structure"`
}
@@ -28254,7 +32090,7 @@ func (s DeleteSecurityGroupOutput) GoString() string {
}
// Contains the parameters for DeleteSnapshot.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSnapshotRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSnapshotRequest
type DeleteSnapshotInput struct {
_ struct{} `type:"structure"`
@@ -28305,7 +32141,7 @@ func (s *DeleteSnapshotInput) SetSnapshotId(v string) *DeleteSnapshotInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSnapshotOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSnapshotOutput
type DeleteSnapshotOutput struct {
_ struct{} `type:"structure"`
}
@@ -28321,7 +32157,7 @@ func (s DeleteSnapshotOutput) GoString() string {
}
// Contains the parameters for DeleteSpotDatafeedSubscription.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSpotDatafeedSubscriptionRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSpotDatafeedSubscriptionRequest
type DeleteSpotDatafeedSubscriptionInput struct {
_ struct{} `type:"structure"`
@@ -28348,7 +32184,7 @@ func (s *DeleteSpotDatafeedSubscriptionInput) SetDryRun(v bool) *DeleteSpotDataf
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSpotDatafeedSubscriptionOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSpotDatafeedSubscriptionOutput
type DeleteSpotDatafeedSubscriptionOutput struct {
_ struct{} `type:"structure"`
}
@@ -28364,7 +32200,7 @@ func (s DeleteSpotDatafeedSubscriptionOutput) GoString() string {
}
// Contains the parameters for DeleteSubnet.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSubnetRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSubnetRequest
type DeleteSubnetInput struct {
_ struct{} `type:"structure"`
@@ -28415,7 +32251,7 @@ func (s *DeleteSubnetInput) SetSubnetId(v string) *DeleteSubnetInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSubnetOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteSubnetOutput
type DeleteSubnetOutput struct {
_ struct{} `type:"structure"`
}
@@ -28431,7 +32267,7 @@ func (s DeleteSubnetOutput) GoString() string {
}
// Contains the parameters for DeleteTags.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTagsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTagsRequest
type DeleteTagsInput struct {
_ struct{} `type:"structure"`
@@ -28441,15 +32277,17 @@ type DeleteTagsInput struct {
// it is UnauthorizedOperation.
DryRun *bool `locationName:"dryRun" type:"boolean"`
- // The ID of the resource. For example, ami-1a2b3c4d. You can specify more than
- // one resource ID.
+ // The IDs of one or more resources.
//
// Resources is a required field
Resources []*string `locationName:"resourceId" type:"list" required:"true"`
- // One or more tags to delete. If you omit the value parameter, we delete the
- // tag regardless of its value. If you specify this parameter with an empty
- // string as the value, we delete the key only if its value is an empty string.
+ // One or more tags to delete. If you omit this parameter, we delete all tags
+ // for the specified resources. Specify a tag key and an optional tag value
+ // to delete specific tags. If you specify a tag key without a tag value, we
+ // delete any tag with this key regardless of its value. If you specify a tag
+ // key with an empty string as the tag value, we delete the tag only if its
+ // value is an empty string.
Tags []*Tag `locationName:"tag" locationNameList:"item" type:"list"`
}
@@ -28494,7 +32332,7 @@ func (s *DeleteTagsInput) SetTags(v []*Tag) *DeleteTagsInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTagsOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTagsOutput
type DeleteTagsOutput struct {
_ struct{} `type:"structure"`
}
@@ -28510,7 +32348,7 @@ func (s DeleteTagsOutput) GoString() string {
}
// Contains the parameters for DeleteVolume.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVolumeRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVolumeRequest
type DeleteVolumeInput struct {
_ struct{} `type:"structure"`
@@ -28561,7 +32399,7 @@ func (s *DeleteVolumeInput) SetVolumeId(v string) *DeleteVolumeInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVolumeOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVolumeOutput
type DeleteVolumeOutput struct {
_ struct{} `type:"structure"`
}
@@ -28576,8 +32414,158 @@ func (s DeleteVolumeOutput) GoString() string {
return s.String()
}
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpointConnectionNotificationsRequest
+type DeleteVpcEndpointConnectionNotificationsInput struct {
+ _ struct{} `type:"structure"`
+
+ // One or more notification IDs.
+ //
+ // ConnectionNotificationIds is a required field
+ ConnectionNotificationIds []*string `locationName:"ConnectionNotificationId" locationNameList:"item" type:"list" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+}
+
+// String returns the string representation
+func (s DeleteVpcEndpointConnectionNotificationsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteVpcEndpointConnectionNotificationsInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DeleteVpcEndpointConnectionNotificationsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DeleteVpcEndpointConnectionNotificationsInput"}
+ if s.ConnectionNotificationIds == nil {
+ invalidParams.Add(request.NewErrParamRequired("ConnectionNotificationIds"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetConnectionNotificationIds sets the ConnectionNotificationIds field's value.
+func (s *DeleteVpcEndpointConnectionNotificationsInput) SetConnectionNotificationIds(v []*string) *DeleteVpcEndpointConnectionNotificationsInput {
+ s.ConnectionNotificationIds = v
+ return s
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *DeleteVpcEndpointConnectionNotificationsInput) SetDryRun(v bool) *DeleteVpcEndpointConnectionNotificationsInput {
+ s.DryRun = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpointConnectionNotificationsResult
+type DeleteVpcEndpointConnectionNotificationsOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Information about the notifications that could not be deleted successfully.
+ Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"`
+}
+
+// String returns the string representation
+func (s DeleteVpcEndpointConnectionNotificationsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteVpcEndpointConnectionNotificationsOutput) GoString() string {
+ return s.String()
+}
+
+// SetUnsuccessful sets the Unsuccessful field's value.
+func (s *DeleteVpcEndpointConnectionNotificationsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *DeleteVpcEndpointConnectionNotificationsOutput {
+ s.Unsuccessful = v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpointServiceConfigurationsRequest
+type DeleteVpcEndpointServiceConfigurationsInput struct {
+ _ struct{} `type:"structure"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The IDs of one or more services.
+ //
+ // ServiceIds is a required field
+ ServiceIds []*string `locationName:"ServiceId" locationNameList:"item" type:"list" required:"true"`
+}
+
+// String returns the string representation
+func (s DeleteVpcEndpointServiceConfigurationsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteVpcEndpointServiceConfigurationsInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DeleteVpcEndpointServiceConfigurationsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DeleteVpcEndpointServiceConfigurationsInput"}
+ if s.ServiceIds == nil {
+ invalidParams.Add(request.NewErrParamRequired("ServiceIds"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *DeleteVpcEndpointServiceConfigurationsInput) SetDryRun(v bool) *DeleteVpcEndpointServiceConfigurationsInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetServiceIds sets the ServiceIds field's value.
+func (s *DeleteVpcEndpointServiceConfigurationsInput) SetServiceIds(v []*string) *DeleteVpcEndpointServiceConfigurationsInput {
+ s.ServiceIds = v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpointServiceConfigurationsResult
+type DeleteVpcEndpointServiceConfigurationsOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Information about the service configurations that were not deleted, if applicable.
+ Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"`
+}
+
+// String returns the string representation
+func (s DeleteVpcEndpointServiceConfigurationsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteVpcEndpointServiceConfigurationsOutput) GoString() string {
+ return s.String()
+}
+
+// SetUnsuccessful sets the Unsuccessful field's value.
+func (s *DeleteVpcEndpointServiceConfigurationsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *DeleteVpcEndpointServiceConfigurationsOutput {
+ s.Unsuccessful = v
+ return s
+}
+
// Contains the parameters for DeleteVpcEndpoints.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpointsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpointsRequest
type DeleteVpcEndpointsInput struct {
_ struct{} `type:"structure"`
@@ -28587,7 +32575,7 @@ type DeleteVpcEndpointsInput struct {
// it is UnauthorizedOperation.
DryRun *bool `type:"boolean"`
- // One or more endpoint IDs.
+ // One or more VPC endpoint IDs.
//
// VpcEndpointIds is a required field
VpcEndpointIds []*string `locationName:"VpcEndpointId" locationNameList:"item" type:"list" required:"true"`
@@ -28629,11 +32617,11 @@ func (s *DeleteVpcEndpointsInput) SetVpcEndpointIds(v []*string) *DeleteVpcEndpo
}
// Contains the output of DeleteVpcEndpoints.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpointsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcEndpointsResult
type DeleteVpcEndpointsOutput struct {
_ struct{} `type:"structure"`
- // Information about the endpoints that were not successfully deleted.
+ // Information about the VPC endpoints that were not successfully deleted.
Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"`
}
@@ -28654,7 +32642,7 @@ func (s *DeleteVpcEndpointsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *Delet
}
// Contains the parameters for DeleteVpc.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcRequest
type DeleteVpcInput struct {
_ struct{} `type:"structure"`
@@ -28705,7 +32693,7 @@ func (s *DeleteVpcInput) SetVpcId(v string) *DeleteVpcInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcOutput
type DeleteVpcOutput struct {
_ struct{} `type:"structure"`
}
@@ -28721,7 +32709,7 @@ func (s DeleteVpcOutput) GoString() string {
}
// Contains the parameters for DeleteVpcPeeringConnection.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcPeeringConnectionRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcPeeringConnectionRequest
type DeleteVpcPeeringConnectionInput struct {
_ struct{} `type:"structure"`
@@ -28773,7 +32761,7 @@ func (s *DeleteVpcPeeringConnectionInput) SetVpcPeeringConnectionId(v string) *D
}
// Contains the output of DeleteVpcPeeringConnection.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcPeeringConnectionResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpcPeeringConnectionResult
type DeleteVpcPeeringConnectionOutput struct {
_ struct{} `type:"structure"`
@@ -28798,7 +32786,7 @@ func (s *DeleteVpcPeeringConnectionOutput) SetReturn(v bool) *DeleteVpcPeeringCo
}
// Contains the parameters for DeleteVpnConnection.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnectionRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnectionRequest
type DeleteVpnConnectionInput struct {
_ struct{} `type:"structure"`
@@ -28849,7 +32837,7 @@ func (s *DeleteVpnConnectionInput) SetVpnConnectionId(v string) *DeleteVpnConnec
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnectionOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnectionOutput
type DeleteVpnConnectionOutput struct {
_ struct{} `type:"structure"`
}
@@ -28865,7 +32853,7 @@ func (s DeleteVpnConnectionOutput) GoString() string {
}
// Contains the parameters for DeleteVpnConnectionRoute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnectionRouteRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnectionRouteRequest
type DeleteVpnConnectionRouteInput struct {
_ struct{} `type:"structure"`
@@ -28918,7 +32906,7 @@ func (s *DeleteVpnConnectionRouteInput) SetVpnConnectionId(v string) *DeleteVpnC
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnectionRouteOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnConnectionRouteOutput
type DeleteVpnConnectionRouteOutput struct {
_ struct{} `type:"structure"`
}
@@ -28934,7 +32922,7 @@ func (s DeleteVpnConnectionRouteOutput) GoString() string {
}
// Contains the parameters for DeleteVpnGateway.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnGatewayRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnGatewayRequest
type DeleteVpnGatewayInput struct {
_ struct{} `type:"structure"`
@@ -28985,7 +32973,7 @@ func (s *DeleteVpnGatewayInput) SetVpnGatewayId(v string) *DeleteVpnGatewayInput
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnGatewayOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteVpnGatewayOutput
type DeleteVpnGatewayOutput struct {
_ struct{} `type:"structure"`
}
@@ -29001,7 +32989,7 @@ func (s DeleteVpnGatewayOutput) GoString() string {
}
// Contains the parameters for DeregisterImage.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeregisterImageRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeregisterImageRequest
type DeregisterImageInput struct {
_ struct{} `type:"structure"`
@@ -29052,7 +33040,7 @@ func (s *DeregisterImageInput) SetImageId(v string) *DeregisterImageInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeregisterImageOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeregisterImageOutput
type DeregisterImageOutput struct {
_ struct{} `type:"structure"`
}
@@ -29068,7 +33056,7 @@ func (s DeregisterImageOutput) GoString() string {
}
// Contains the parameters for DescribeAccountAttributes.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAccountAttributesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAccountAttributesRequest
type DescribeAccountAttributesInput struct {
_ struct{} `type:"structure"`
@@ -29105,7 +33093,7 @@ func (s *DescribeAccountAttributesInput) SetDryRun(v bool) *DescribeAccountAttri
}
// Contains the output of DescribeAccountAttributes.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAccountAttributesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAccountAttributesResult
type DescribeAccountAttributesOutput struct {
_ struct{} `type:"structure"`
@@ -29130,7 +33118,7 @@ func (s *DescribeAccountAttributesOutput) SetAccountAttributes(v []*AccountAttri
}
// Contains the parameters for DescribeAddresses.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddressesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddressesRequest
type DescribeAddressesInput struct {
_ struct{} `type:"structure"`
@@ -29166,6 +33154,18 @@ type DescribeAddressesInput struct {
// the Elastic IP address.
//
// * public-ip - The Elastic IP address.
+ //
+ // * tag:key=value - The key/value combination of a tag assigned to the resource.
+ // Specify the key of the tag in the filter name and the value of the tag
+ // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose
+ // for the filter name and X for the filter value.
+ //
+ // * tag-key - The key of a tag assigned to the resource. This filter is
+ // independent of the tag-value filter. For example, if you use both the
+ // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources
+ // assigned both the tag key Purpose (regardless of what the tag's value
+ // is), and the tag value X (regardless of the tag's key). If you want to
+ // list only resources where Purpose is X, see the tag:key=value filter.
Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
// [EC2-Classic] One or more Elastic IP addresses.
@@ -29209,7 +33209,7 @@ func (s *DescribeAddressesInput) SetPublicIps(v []*string) *DescribeAddressesInp
}
// Contains the output of DescribeAddresses.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddressesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddressesResult
type DescribeAddressesOutput struct {
_ struct{} `type:"structure"`
@@ -29234,7 +33234,7 @@ func (s *DescribeAddressesOutput) SetAddresses(v []*Address) *DescribeAddressesO
}
// Contains the parameters for DescribeAvailabilityZones.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAvailabilityZonesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAvailabilityZonesRequest
type DescribeAvailabilityZonesInput struct {
_ struct{} `type:"structure"`
@@ -29290,7 +33290,7 @@ func (s *DescribeAvailabilityZonesInput) SetZoneNames(v []*string) *DescribeAvai
}
// Contains the output of DescribeAvailabiltyZones.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAvailabilityZonesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAvailabilityZonesResult
type DescribeAvailabilityZonesOutput struct {
_ struct{} `type:"structure"`
@@ -29315,7 +33315,7 @@ func (s *DescribeAvailabilityZonesOutput) SetAvailabilityZones(v []*Availability
}
// Contains the parameters for DescribeBundleTasks.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeBundleTasksRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeBundleTasksRequest
type DescribeBundleTasksInput struct {
_ struct{} `type:"structure"`
@@ -29385,7 +33385,7 @@ func (s *DescribeBundleTasksInput) SetFilters(v []*Filter) *DescribeBundleTasksI
}
// Contains the output of DescribeBundleTasks.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeBundleTasksResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeBundleTasksResult
type DescribeBundleTasksOutput struct {
_ struct{} `type:"structure"`
@@ -29410,7 +33410,7 @@ func (s *DescribeBundleTasksOutput) SetBundleTasks(v []*BundleTask) *DescribeBun
}
// Contains the parameters for DescribeClassicLinkInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClassicLinkInstancesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClassicLinkInstancesRequest
type DescribeClassicLinkInstancesInput struct {
_ struct{} `type:"structure"`
@@ -29501,7 +33501,7 @@ func (s *DescribeClassicLinkInstancesInput) SetNextToken(v string) *DescribeClas
}
// Contains the output of DescribeClassicLinkInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClassicLinkInstancesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClassicLinkInstancesResult
type DescribeClassicLinkInstancesOutput struct {
_ struct{} `type:"structure"`
@@ -29536,7 +33536,7 @@ func (s *DescribeClassicLinkInstancesOutput) SetNextToken(v string) *DescribeCla
}
// Contains the parameters for DescribeConversionTasks.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeConversionTasksRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeConversionTasksRequest
type DescribeConversionTasksInput struct {
_ struct{} `type:"structure"`
@@ -29573,7 +33573,7 @@ func (s *DescribeConversionTasksInput) SetDryRun(v bool) *DescribeConversionTask
}
// Contains the output for DescribeConversionTasks.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeConversionTasksResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeConversionTasksResult
type DescribeConversionTasksOutput struct {
_ struct{} `type:"structure"`
@@ -29598,7 +33598,7 @@ func (s *DescribeConversionTasksOutput) SetConversionTasks(v []*ConversionTask)
}
// Contains the parameters for DescribeCustomerGateways.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeCustomerGatewaysRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeCustomerGatewaysRequest
type DescribeCustomerGatewaysInput struct {
_ struct{} `type:"structure"`
@@ -29676,7 +33676,7 @@ func (s *DescribeCustomerGatewaysInput) SetFilters(v []*Filter) *DescribeCustome
}
// Contains the output of DescribeCustomerGateways.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeCustomerGatewaysResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeCustomerGatewaysResult
type DescribeCustomerGatewaysOutput struct {
_ struct{} `type:"structure"`
@@ -29701,7 +33701,7 @@ func (s *DescribeCustomerGatewaysOutput) SetCustomerGateways(v []*CustomerGatewa
}
// Contains the parameters for DescribeDhcpOptions.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeDhcpOptionsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeDhcpOptionsRequest
type DescribeDhcpOptionsInput struct {
_ struct{} `type:"structure"`
@@ -29771,7 +33771,7 @@ func (s *DescribeDhcpOptionsInput) SetFilters(v []*Filter) *DescribeDhcpOptionsI
}
// Contains the output of DescribeDhcpOptions.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeDhcpOptionsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeDhcpOptionsResult
type DescribeDhcpOptionsOutput struct {
_ struct{} `type:"structure"`
@@ -29795,7 +33795,7 @@ func (s *DescribeDhcpOptionsOutput) SetDhcpOptions(v []*DhcpOptions) *DescribeDh
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeEgressOnlyInternetGatewaysRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeEgressOnlyInternetGatewaysRequest
type DescribeEgressOnlyInternetGatewaysInput struct {
_ struct{} `type:"structure"`
@@ -29852,7 +33852,7 @@ func (s *DescribeEgressOnlyInternetGatewaysInput) SetNextToken(v string) *Descri
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeEgressOnlyInternetGatewaysResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeEgressOnlyInternetGatewaysResult
type DescribeEgressOnlyInternetGatewaysOutput struct {
_ struct{} `type:"structure"`
@@ -29885,7 +33885,7 @@ func (s *DescribeEgressOnlyInternetGatewaysOutput) SetNextToken(v string) *Descr
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeElasticGpusRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeElasticGpusRequest
type DescribeElasticGpusInput struct {
_ struct{} `type:"structure"`
@@ -29960,12 +33960,12 @@ func (s *DescribeElasticGpusInput) SetNextToken(v string) *DescribeElasticGpusIn
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeElasticGpusResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeElasticGpusResult
type DescribeElasticGpusOutput struct {
_ struct{} `type:"structure"`
// Information about the Elastic GPUs.
- ElasticGpuSet []*ElasticGpus `locationName:"elasticGpuSet" type:"list"`
+ ElasticGpuSet []*ElasticGpus `locationName:"elasticGpuSet" locationNameList:"item" type:"list"`
// The total number of items to return. If the total number of items available
// is more than the value specified in max-items then a Next-Token will be provided
@@ -30006,7 +34006,7 @@ func (s *DescribeElasticGpusOutput) SetNextToken(v string) *DescribeElasticGpusO
}
// Contains the parameters for DescribeExportTasks.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeExportTasksRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeExportTasksRequest
type DescribeExportTasksInput struct {
_ struct{} `type:"structure"`
@@ -30031,7 +34031,7 @@ func (s *DescribeExportTasksInput) SetExportTaskIds(v []*string) *DescribeExport
}
// Contains the output for DescribeExportTasks.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeExportTasksResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeExportTasksResult
type DescribeExportTasksOutput struct {
_ struct{} `type:"structure"`
@@ -30056,7 +34056,7 @@ func (s *DescribeExportTasksOutput) SetExportTasks(v []*ExportTask) *DescribeExp
}
// Contains the parameters for DescribeFlowLogs.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFlowLogsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFlowLogsRequest
type DescribeFlowLogsInput struct {
_ struct{} `type:"structure"`
@@ -30122,7 +34122,7 @@ func (s *DescribeFlowLogsInput) SetNextToken(v string) *DescribeFlowLogsInput {
}
// Contains the output of DescribeFlowLogs.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFlowLogsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFlowLogsResult
type DescribeFlowLogsOutput struct {
_ struct{} `type:"structure"`
@@ -30156,7 +34156,96 @@ func (s *DescribeFlowLogsOutput) SetNextToken(v string) *DescribeFlowLogsOutput
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImagesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImageAttributeRequest
+type DescribeFpgaImageAttributeInput struct {
+ _ struct{} `type:"structure"`
+
+ // The AFI attribute.
+ //
+ // Attribute is a required field
+ Attribute *string `type:"string" required:"true" enum:"FpgaImageAttributeName"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The ID of the AFI.
+ //
+ // FpgaImageId is a required field
+ FpgaImageId *string `type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s DescribeFpgaImageAttributeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeFpgaImageAttributeInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DescribeFpgaImageAttributeInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeFpgaImageAttributeInput"}
+ if s.Attribute == nil {
+ invalidParams.Add(request.NewErrParamRequired("Attribute"))
+ }
+ if s.FpgaImageId == nil {
+ invalidParams.Add(request.NewErrParamRequired("FpgaImageId"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetAttribute sets the Attribute field's value.
+func (s *DescribeFpgaImageAttributeInput) SetAttribute(v string) *DescribeFpgaImageAttributeInput {
+ s.Attribute = &v
+ return s
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *DescribeFpgaImageAttributeInput) SetDryRun(v bool) *DescribeFpgaImageAttributeInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetFpgaImageId sets the FpgaImageId field's value.
+func (s *DescribeFpgaImageAttributeInput) SetFpgaImageId(v string) *DescribeFpgaImageAttributeInput {
+ s.FpgaImageId = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImageAttributeResult
+type DescribeFpgaImageAttributeOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Information about the attribute.
+ FpgaImageAttribute *FpgaImageAttribute `locationName:"fpgaImageAttribute" type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeFpgaImageAttributeOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeFpgaImageAttributeOutput) GoString() string {
+ return s.String()
+}
+
+// SetFpgaImageAttribute sets the FpgaImageAttribute field's value.
+func (s *DescribeFpgaImageAttributeOutput) SetFpgaImageAttribute(v *FpgaImageAttribute) *DescribeFpgaImageAttributeOutput {
+ s.FpgaImageAttribute = v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImagesRequest
type DescribeFpgaImagesInput struct {
_ struct{} `type:"structure"`
@@ -30280,7 +34369,7 @@ func (s *DescribeFpgaImagesInput) SetOwners(v []*string) *DescribeFpgaImagesInpu
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImagesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeFpgaImagesResult
type DescribeFpgaImagesOutput struct {
_ struct{} `type:"structure"`
@@ -30314,7 +34403,7 @@ func (s *DescribeFpgaImagesOutput) SetNextToken(v string) *DescribeFpgaImagesOut
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservationOfferingsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservationOfferingsRequest
type DescribeHostReservationOfferingsInput struct {
_ struct{} `type:"structure"`
@@ -30398,7 +34487,7 @@ func (s *DescribeHostReservationOfferingsInput) SetOfferingId(v string) *Describ
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservationOfferingsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservationOfferingsResult
type DescribeHostReservationOfferingsOutput struct {
_ struct{} `type:"structure"`
@@ -30407,7 +34496,7 @@ type DescribeHostReservationOfferingsOutput struct {
NextToken *string `locationName:"nextToken" type:"string"`
// Information about the offerings.
- OfferingSet []*HostOffering `locationName:"offeringSet" type:"list"`
+ OfferingSet []*HostOffering `locationName:"offeringSet" locationNameList:"item" type:"list"`
}
// String returns the string representation
@@ -30432,7 +34521,7 @@ func (s *DescribeHostReservationOfferingsOutput) SetOfferingSet(v []*HostOfferin
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservationsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservationsRequest
type DescribeHostReservationsInput struct {
_ struct{} `type:"structure"`
@@ -30493,12 +34582,12 @@ func (s *DescribeHostReservationsInput) SetNextToken(v string) *DescribeHostRese
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservationsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostReservationsResult
type DescribeHostReservationsOutput struct {
_ struct{} `type:"structure"`
// Details about the reservation's configuration.
- HostReservationSet []*HostReservation `locationName:"hostReservationSet" type:"list"`
+ HostReservationSet []*HostReservation `locationName:"hostReservationSet" locationNameList:"item" type:"list"`
// The token to use to retrieve the next page of results. This value is null
// when there are no more results to return.
@@ -30528,7 +34617,7 @@ func (s *DescribeHostReservationsOutput) SetNextToken(v string) *DescribeHostRes
}
// Contains the parameters for DescribeHosts.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostsRequest
type DescribeHostsInput struct {
_ struct{} `type:"structure"`
@@ -30600,7 +34689,7 @@ func (s *DescribeHostsInput) SetNextToken(v string) *DescribeHostsInput {
}
// Contains the output of DescribeHosts.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeHostsResult
type DescribeHostsOutput struct {
_ struct{} `type:"structure"`
@@ -30634,7 +34723,7 @@ func (s *DescribeHostsOutput) SetNextToken(v string) *DescribeHostsOutput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIamInstanceProfileAssociationsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIamInstanceProfileAssociationsRequest
type DescribeIamInstanceProfileAssociationsInput struct {
_ struct{} `type:"structure"`
@@ -30707,7 +34796,7 @@ func (s *DescribeIamInstanceProfileAssociationsInput) SetNextToken(v string) *De
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIamInstanceProfileAssociationsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIamInstanceProfileAssociationsResult
type DescribeIamInstanceProfileAssociationsOutput struct {
_ struct{} `type:"structure"`
@@ -30742,7 +34831,7 @@ func (s *DescribeIamInstanceProfileAssociationsOutput) SetNextToken(v string) *D
}
// Contains the parameters for DescribeIdFormat.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdFormatRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdFormatRequest
type DescribeIdFormatInput struct {
_ struct{} `type:"structure"`
@@ -30767,7 +34856,7 @@ func (s *DescribeIdFormatInput) SetResource(v string) *DescribeIdFormatInput {
}
// Contains the output of DescribeIdFormat.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdFormatResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdFormatResult
type DescribeIdFormatOutput struct {
_ struct{} `type:"structure"`
@@ -30792,7 +34881,7 @@ func (s *DescribeIdFormatOutput) SetStatuses(v []*IdFormat) *DescribeIdFormatOut
}
// Contains the parameters for DescribeIdentityIdFormat.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdentityIdFormatRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdentityIdFormatRequest
type DescribeIdentityIdFormatInput struct {
_ struct{} `type:"structure"`
@@ -30842,7 +34931,7 @@ func (s *DescribeIdentityIdFormatInput) SetResource(v string) *DescribeIdentityI
}
// Contains the output of DescribeIdentityIdFormat.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdentityIdFormatResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeIdentityIdFormatResult
type DescribeIdentityIdFormatOutput struct {
_ struct{} `type:"structure"`
@@ -30867,7 +34956,7 @@ func (s *DescribeIdentityIdFormatOutput) SetStatuses(v []*IdFormat) *DescribeIde
}
// Contains the parameters for DescribeImageAttribute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImageAttributeRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImageAttributeRequest
type DescribeImageAttributeInput struct {
_ struct{} `type:"structure"`
@@ -30937,7 +35026,7 @@ func (s *DescribeImageAttributeInput) SetImageId(v string) *DescribeImageAttribu
}
// Describes an image attribute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImageAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImageAttribute
type DescribeImageAttributeOutput struct {
_ struct{} `type:"structure"`
@@ -31026,7 +35115,7 @@ func (s *DescribeImageAttributeOutput) SetSriovNetSupport(v *AttributeValue) *De
}
// Contains the parameters for DescribeImages.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImagesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImagesRequest
type DescribeImagesInput struct {
_ struct{} `type:"structure"`
@@ -31047,8 +35136,8 @@ type DescribeImagesInput struct {
// * block-device-mapping.delete-on-termination - A Boolean value that indicates
// whether the Amazon EBS volume is deleted on instance termination.
//
- // * block-device-mapping.device-name - The device name for the EBS volume
- // (for example, /dev/sdh).
+ // * block-device-mapping.device-name - The device name specified in the
+ // block device mapping (for example, /dev/sdh or xvdh).
//
// * block-device-mapping.snapshot-id - The ID of the snapshot used for the
// EBS volume.
@@ -31092,7 +35181,7 @@ type DescribeImagesInput struct {
//
// * ramdisk-id - The RAM disk ID.
//
- // * root-device-name - The name of the root device volume (for example,
+ // * root-device-name - The device name of the root device volume (for example,
// /dev/sda1).
//
// * root-device-type - The type of the root device volume (ebs | instance-store).
@@ -31103,6 +35192,9 @@ type DescribeImagesInput struct {
//
// * state-reason-message - The message for the state change.
//
+ // * sriov-net-support - A value of simple indicates that enhanced networking
+ // with the Intel 82599 VF interface is enabled.
+ //
// * tag:key=value - The key/value combination of a tag assigned to the resource.
// Specify the key of the tag in the filter name and the value of the tag
// in the filter value. For example, for the tag Purpose=X, specify tag:Purpose
@@ -31175,7 +35267,7 @@ func (s *DescribeImagesInput) SetOwners(v []*string) *DescribeImagesInput {
}
// Contains the output of DescribeImages.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImagesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImagesResult
type DescribeImagesOutput struct {
_ struct{} `type:"structure"`
@@ -31200,7 +35292,7 @@ func (s *DescribeImagesOutput) SetImages(v []*Image) *DescribeImagesOutput {
}
// Contains the parameters for DescribeImportImageTasks.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportImageTasksRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportImageTasksRequest
type DescribeImportImageTasksInput struct {
_ struct{} `type:"structure"`
@@ -31266,7 +35358,7 @@ func (s *DescribeImportImageTasksInput) SetNextToken(v string) *DescribeImportIm
}
// Contains the output for DescribeImportImageTasks.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportImageTasksResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportImageTasksResult
type DescribeImportImageTasksOutput struct {
_ struct{} `type:"structure"`
@@ -31302,7 +35394,7 @@ func (s *DescribeImportImageTasksOutput) SetNextToken(v string) *DescribeImportI
}
// Contains the parameters for DescribeImportSnapshotTasks.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportSnapshotTasksRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportSnapshotTasksRequest
type DescribeImportSnapshotTasksInput struct {
_ struct{} `type:"structure"`
@@ -31367,7 +35459,7 @@ func (s *DescribeImportSnapshotTasksInput) SetNextToken(v string) *DescribeImpor
}
// Contains the output for DescribeImportSnapshotTasks.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportSnapshotTasksResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImportSnapshotTasksResult
type DescribeImportSnapshotTasksOutput struct {
_ struct{} `type:"structure"`
@@ -31403,7 +35495,7 @@ func (s *DescribeImportSnapshotTasksOutput) SetNextToken(v string) *DescribeImpo
}
// Contains the parameters for DescribeInstanceAttribute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceAttributeRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceAttributeRequest
type DescribeInstanceAttributeInput struct {
_ struct{} `type:"structure"`
@@ -31471,7 +35563,7 @@ func (s *DescribeInstanceAttributeInput) SetInstanceId(v string) *DescribeInstan
}
// Describes an instance attribute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceAttribute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceAttribute
type DescribeInstanceAttributeOutput struct {
_ struct{} `type:"structure"`
@@ -31482,7 +35574,7 @@ type DescribeInstanceAttributeOutput struct {
// EC2 console, CLI, or API; otherwise, you can.
DisableApiTermination *AttributeBooleanValue `locationName:"disableApiTermination" type:"structure"`
- // Indicates whether the instance is optimized for EBS I/O.
+ // Indicates whether the instance is optimized for Amazon EBS I/O.
EbsOptimized *AttributeBooleanValue `locationName:"ebsOptimized" type:"structure"`
// Indicates whether enhanced networking with ENA is enabled.
@@ -31510,12 +35602,12 @@ type DescribeInstanceAttributeOutput struct {
// The RAM disk ID.
RamdiskId *AttributeValue `locationName:"ramdisk" type:"structure"`
- // The name of the root device (for example, /dev/sda1 or /dev/xvda).
+ // The device name of the root device volume (for example, /dev/sda1).
RootDeviceName *AttributeValue `locationName:"rootDeviceName" type:"structure"`
// Indicates whether source/destination checking is enabled. A value of true
- // means checking is enabled, and false means checking is disabled. This value
- // must be false for a NAT instance to perform NAT.
+ // means that checking is enabled, and false means that checking is disabled.
+ // This value must be false for a NAT instance to perform NAT.
SourceDestCheck *AttributeBooleanValue `locationName:"sourceDestCheck" type:"structure"`
// Indicates whether enhanced networking with the Intel 82599 Virtual Function
@@ -31626,8 +35718,114 @@ func (s *DescribeInstanceAttributeOutput) SetUserData(v *AttributeValue) *Descri
return s
}
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceCreditSpecificationsRequest
+type DescribeInstanceCreditSpecificationsInput struct {
+ _ struct{} `type:"structure"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // One or more filters.
+ //
+ // * instance-id - The ID of the instance.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // One or more instance IDs.
+ //
+ // Default: Describes all your instances.
+ //
+ // Constraints: Maximum 1000 explicitly specified instance IDs.
+ InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list"`
+
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value. This
+ // value can be between 5 and 1000. You cannot specify this parameter and the
+ // instance IDs parameter in the same call.
+ MaxResults *int64 `type:"integer"`
+
+ // The token to retrieve the next page of results.
+ NextToken *string `type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeInstanceCreditSpecificationsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeInstanceCreditSpecificationsInput) GoString() string {
+ return s.String()
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *DescribeInstanceCreditSpecificationsInput) SetDryRun(v bool) *DescribeInstanceCreditSpecificationsInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetFilters sets the Filters field's value.
+func (s *DescribeInstanceCreditSpecificationsInput) SetFilters(v []*Filter) *DescribeInstanceCreditSpecificationsInput {
+ s.Filters = v
+ return s
+}
+
+// SetInstanceIds sets the InstanceIds field's value.
+func (s *DescribeInstanceCreditSpecificationsInput) SetInstanceIds(v []*string) *DescribeInstanceCreditSpecificationsInput {
+ s.InstanceIds = v
+ return s
+}
+
+// SetMaxResults sets the MaxResults field's value.
+func (s *DescribeInstanceCreditSpecificationsInput) SetMaxResults(v int64) *DescribeInstanceCreditSpecificationsInput {
+ s.MaxResults = &v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeInstanceCreditSpecificationsInput) SetNextToken(v string) *DescribeInstanceCreditSpecificationsInput {
+ s.NextToken = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceCreditSpecificationsResult
+type DescribeInstanceCreditSpecificationsOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Information about the credit option for CPU usage of an instance.
+ InstanceCreditSpecifications []*InstanceCreditSpecification `locationName:"instanceCreditSpecificationSet" locationNameList:"item" type:"list"`
+
+ // The token to use to retrieve the next page of results. This value is null
+ // when there are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeInstanceCreditSpecificationsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeInstanceCreditSpecificationsOutput) GoString() string {
+ return s.String()
+}
+
+// SetInstanceCreditSpecifications sets the InstanceCreditSpecifications field's value.
+func (s *DescribeInstanceCreditSpecificationsOutput) SetInstanceCreditSpecifications(v []*InstanceCreditSpecification) *DescribeInstanceCreditSpecificationsOutput {
+ s.InstanceCreditSpecifications = v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeInstanceCreditSpecificationsOutput) SetNextToken(v string) *DescribeInstanceCreditSpecificationsOutput {
+ s.NextToken = &v
+ return s
+}
+
// Contains the parameters for DescribeInstanceStatus.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceStatusRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceStatusRequest
type DescribeInstanceStatusInput struct {
_ struct{} `type:"structure"`
@@ -31744,7 +35942,7 @@ func (s *DescribeInstanceStatusInput) SetNextToken(v string) *DescribeInstanceSt
}
// Contains the output of DescribeInstanceStatus.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceStatusResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceStatusResult
type DescribeInstanceStatusOutput struct {
_ struct{} `type:"structure"`
@@ -31779,7 +35977,7 @@ func (s *DescribeInstanceStatusOutput) SetNextToken(v string) *DescribeInstanceS
}
// Contains the parameters for DescribeInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstancesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstancesRequest
type DescribeInstancesInput struct {
_ struct{} `type:"structure"`
@@ -31804,8 +36002,8 @@ type DescribeInstancesInput struct {
// * block-device-mapping.delete-on-termination - A Boolean that indicates
// whether the EBS volume is deleted on instance termination.
//
- // * block-device-mapping.device-name - The device name for the EBS volume
- // (for example, /dev/sdh or xvdh).
+ // * block-device-mapping.device-name - The device name specified in the
+ // block device mapping (for example, /dev/sdh or xvdh).
//
// * block-device-mapping.status - The status for the EBS volume (attaching
// | attached | detaching | detached).
@@ -31946,10 +36144,10 @@ type DescribeInstancesInput struct {
// | in-use).
//
// * network-interface.source-dest-check - Whether the network interface
- // performs source/destination checking. A value of true means checking is
- // enabled, and false means checking is disabled. The value must be false
- // for the network interface to perform network address translation (NAT)
- // in your VPC.
+ // performs source/destination checking. A value of true means that checking
+ // is enabled, and false means that checking is disabled. The value must
+ // be false for the network interface to perform network address translation
+ // (NAT) in your VPC.
//
// * network-interface.subnet-id - The ID of the subnet for the network interface.
//
@@ -31984,22 +36182,21 @@ type DescribeInstancesInput struct {
// ID is created any time you launch an instance. A reservation ID has a
// one-to-one relationship with an instance launch request, but can be associated
// with more than one instance if you launch multiple instances using the
- // same launch request. For example, if you launch one instance, you'll get
+ // same launch request. For example, if you launch one instance, you get
// one reservation ID. If you launch ten instances using the same launch
- // request, you'll also get one reservation ID.
+ // request, you also get one reservation ID.
//
- // * root-device-name - The name of the root device for the instance (for
- // example, /dev/sda1 or /dev/xvda).
+ // * root-device-name - The device name of the root device volume (for example,
+ // /dev/sda1).
//
- // * root-device-type - The type of root device that the instance uses (ebs
- // | instance-store).
+ // * root-device-type - The type of the root device volume (ebs | instance-store).
//
// * source-dest-check - Indicates whether the instance performs source/destination
// checking. A value of true means that checking is enabled, and false means
- // checking is disabled. The value must be false for the instance to perform
- // network address translation (NAT) in your VPC.
+ // that checking is disabled. The value must be false for the instance to
+ // perform network address translation (NAT) in your VPC.
//
- // * spot-instance-request-id - The ID of the Spot instance request.
+ // * spot-instance-request-id - The ID of the Spot Instance request.
//
// * state-reason-code - The reason code for the state change.
//
@@ -32016,9 +36213,8 @@ type DescribeInstancesInput struct {
// independent of the tag-value filter. For example, if you use both the
// filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources
// assigned both the tag key Purpose (regardless of what the tag's value
- // is), and the tag value X (regardless of what the tag's key is). If you
- // want to list only resources where Purpose is X, see the tag:key=value
- // filter.
+ // is), and the tag value X (regardless of the tag's key). If you want to
+ // list only resources where Purpose is X, see the tag:key=value filter.
//
// * tag-value - The value of a tag assigned to the resource. This filter
// is independent of the tag-key filter.
@@ -32087,7 +36283,7 @@ func (s *DescribeInstancesInput) SetNextToken(v string) *DescribeInstancesInput
}
// Contains the output of DescribeInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstancesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstancesResult
type DescribeInstancesOutput struct {
_ struct{} `type:"structure"`
@@ -32122,7 +36318,7 @@ func (s *DescribeInstancesOutput) SetReservations(v []*Reservation) *DescribeIns
}
// Contains the parameters for DescribeInternetGateways.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInternetGatewaysRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInternetGatewaysRequest
type DescribeInternetGatewaysInput struct {
_ struct{} `type:"structure"`
@@ -32193,7 +36389,7 @@ func (s *DescribeInternetGatewaysInput) SetInternetGatewayIds(v []*string) *Desc
}
// Contains the output of DescribeInternetGateways.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInternetGatewaysResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInternetGatewaysResult
type DescribeInternetGatewaysOutput struct {
_ struct{} `type:"structure"`
@@ -32218,7 +36414,7 @@ func (s *DescribeInternetGatewaysOutput) SetInternetGateways(v []*InternetGatewa
}
// Contains the parameters for DescribeKeyPairs.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeKeyPairsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeKeyPairsRequest
type DescribeKeyPairsInput struct {
_ struct{} `type:"structure"`
@@ -32270,7 +36466,7 @@ func (s *DescribeKeyPairsInput) SetKeyNames(v []*string) *DescribeKeyPairsInput
}
// Contains the output of DescribeKeyPairs.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeKeyPairsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeKeyPairsResult
type DescribeKeyPairsOutput struct {
_ struct{} `type:"structure"`
@@ -32294,8 +36490,300 @@ func (s *DescribeKeyPairsOutput) SetKeyPairs(v []*KeyPairInfo) *DescribeKeyPairs
return s
}
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeLaunchTemplateVersionsRequest
+type DescribeLaunchTemplateVersionsInput struct {
+ _ struct{} `type:"structure"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // One or more filters.
+ //
+ // * create-time - The time the launch template version was created.
+ //
+ // * ebs-optimized - A boolean that indicates whether the instance is optimized
+ // for Amazon EBS I/O.
+ //
+ // * iam-instance-profile - The ARN of the IAM instance profile.
+ //
+ // * image-id - The ID of the AMI.
+ //
+ // * instance-type - The instance type.
+ //
+ // * is-default-version - A boolean that indicates whether the launch template
+ // version is the default version.
+ //
+ // * kernel-id - The kernel ID.
+ //
+ // * ram-disk-id - The RAM disk ID.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // The ID of the launch template. You must specify either the launch template
+ // ID or launch template name in the request.
+ LaunchTemplateId *string `type:"string"`
+
+ // The name of the launch template. You must specify either the launch template
+ // ID or launch template name in the request.
+ LaunchTemplateName *string `min:"3" type:"string"`
+
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value. This
+ // value can be between 5 and 1000.
+ MaxResults *int64 `type:"integer"`
+
+ // The version number up to which to describe launch template versions.
+ MaxVersion *string `type:"string"`
+
+ // The version number after which to describe launch template versions.
+ MinVersion *string `type:"string"`
+
+ // The token to request the next page of results.
+ NextToken *string `type:"string"`
+
+ // One or more versions of the launch template.
+ Versions []*string `locationName:"LaunchTemplateVersion" locationNameList:"item" type:"list"`
+}
+
+// String returns the string representation
+func (s DescribeLaunchTemplateVersionsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeLaunchTemplateVersionsInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DescribeLaunchTemplateVersionsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeLaunchTemplateVersionsInput"}
+ if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 {
+ invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *DescribeLaunchTemplateVersionsInput) SetDryRun(v bool) *DescribeLaunchTemplateVersionsInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetFilters sets the Filters field's value.
+func (s *DescribeLaunchTemplateVersionsInput) SetFilters(v []*Filter) *DescribeLaunchTemplateVersionsInput {
+ s.Filters = v
+ return s
+}
+
+// SetLaunchTemplateId sets the LaunchTemplateId field's value.
+func (s *DescribeLaunchTemplateVersionsInput) SetLaunchTemplateId(v string) *DescribeLaunchTemplateVersionsInput {
+ s.LaunchTemplateId = &v
+ return s
+}
+
+// SetLaunchTemplateName sets the LaunchTemplateName field's value.
+func (s *DescribeLaunchTemplateVersionsInput) SetLaunchTemplateName(v string) *DescribeLaunchTemplateVersionsInput {
+ s.LaunchTemplateName = &v
+ return s
+}
+
+// SetMaxResults sets the MaxResults field's value.
+func (s *DescribeLaunchTemplateVersionsInput) SetMaxResults(v int64) *DescribeLaunchTemplateVersionsInput {
+ s.MaxResults = &v
+ return s
+}
+
+// SetMaxVersion sets the MaxVersion field's value.
+func (s *DescribeLaunchTemplateVersionsInput) SetMaxVersion(v string) *DescribeLaunchTemplateVersionsInput {
+ s.MaxVersion = &v
+ return s
+}
+
+// SetMinVersion sets the MinVersion field's value.
+func (s *DescribeLaunchTemplateVersionsInput) SetMinVersion(v string) *DescribeLaunchTemplateVersionsInput {
+ s.MinVersion = &v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeLaunchTemplateVersionsInput) SetNextToken(v string) *DescribeLaunchTemplateVersionsInput {
+ s.NextToken = &v
+ return s
+}
+
+// SetVersions sets the Versions field's value.
+func (s *DescribeLaunchTemplateVersionsInput) SetVersions(v []*string) *DescribeLaunchTemplateVersionsInput {
+ s.Versions = v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeLaunchTemplateVersionsResult
+type DescribeLaunchTemplateVersionsOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Information about the launch template versions.
+ LaunchTemplateVersions []*LaunchTemplateVersion `locationName:"launchTemplateVersionSet" locationNameList:"item" type:"list"`
+
+ // The token to use to retrieve the next page of results. This value is null
+ // when there are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeLaunchTemplateVersionsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeLaunchTemplateVersionsOutput) GoString() string {
+ return s.String()
+}
+
+// SetLaunchTemplateVersions sets the LaunchTemplateVersions field's value.
+func (s *DescribeLaunchTemplateVersionsOutput) SetLaunchTemplateVersions(v []*LaunchTemplateVersion) *DescribeLaunchTemplateVersionsOutput {
+ s.LaunchTemplateVersions = v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeLaunchTemplateVersionsOutput) SetNextToken(v string) *DescribeLaunchTemplateVersionsOutput {
+ s.NextToken = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeLaunchTemplatesRequest
+type DescribeLaunchTemplatesInput struct {
+ _ struct{} `type:"structure"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // One or more filters.
+ //
+ // * create-time - The time the launch template was created.
+ //
+ // * launch-template-name - The name of the launch template.
+ //
+ // * tag:key=value - The key/value combination of a tag assigned to the resource.
+ // Specify the key of the tag in the filter name and the value of the tag
+ // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose
+ // for the filter name and X for the filter value.
+ //
+ // * tag-key - The key of a tag assigned to the resource. This filter is
+ // independent of the tag-value filter. For example, if you use both the
+ // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources
+ // assigned both the tag key Purpose (regardless of what the tag's value
+ // is), and the tag value X (regardless of the tag's key). If you want to
+ // list only resources where Purpose is X, see the tag:key=value filter.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // One or more launch template IDs.
+ LaunchTemplateIds []*string `locationName:"LaunchTemplateId" locationNameList:"item" type:"list"`
+
+ // One or more launch template names.
+ LaunchTemplateNames []*string `locationName:"LaunchTemplateName" locationNameList:"item" type:"list"`
+
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another call with the returned NextToken value. This
+ // value can be between 5 and 1000.
+ MaxResults *int64 `type:"integer"`
+
+ // The token to request the next page of results.
+ NextToken *string `type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeLaunchTemplatesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeLaunchTemplatesInput) GoString() string {
+ return s.String()
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *DescribeLaunchTemplatesInput) SetDryRun(v bool) *DescribeLaunchTemplatesInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetFilters sets the Filters field's value.
+func (s *DescribeLaunchTemplatesInput) SetFilters(v []*Filter) *DescribeLaunchTemplatesInput {
+ s.Filters = v
+ return s
+}
+
+// SetLaunchTemplateIds sets the LaunchTemplateIds field's value.
+func (s *DescribeLaunchTemplatesInput) SetLaunchTemplateIds(v []*string) *DescribeLaunchTemplatesInput {
+ s.LaunchTemplateIds = v
+ return s
+}
+
+// SetLaunchTemplateNames sets the LaunchTemplateNames field's value.
+func (s *DescribeLaunchTemplatesInput) SetLaunchTemplateNames(v []*string) *DescribeLaunchTemplatesInput {
+ s.LaunchTemplateNames = v
+ return s
+}
+
+// SetMaxResults sets the MaxResults field's value.
+func (s *DescribeLaunchTemplatesInput) SetMaxResults(v int64) *DescribeLaunchTemplatesInput {
+ s.MaxResults = &v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeLaunchTemplatesInput) SetNextToken(v string) *DescribeLaunchTemplatesInput {
+ s.NextToken = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeLaunchTemplatesResult
+type DescribeLaunchTemplatesOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Information about the launch templates.
+ LaunchTemplates []*LaunchTemplate `locationName:"launchTemplates" locationNameList:"item" type:"list"`
+
+ // The token to use to retrieve the next page of results. This value is null
+ // when there are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeLaunchTemplatesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeLaunchTemplatesOutput) GoString() string {
+ return s.String()
+}
+
+// SetLaunchTemplates sets the LaunchTemplates field's value.
+func (s *DescribeLaunchTemplatesOutput) SetLaunchTemplates(v []*LaunchTemplate) *DescribeLaunchTemplatesOutput {
+ s.LaunchTemplates = v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeLaunchTemplatesOutput) SetNextToken(v string) *DescribeLaunchTemplatesOutput {
+ s.NextToken = &v
+ return s
+}
+
// Contains the parameters for DescribeMovingAddresses.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeMovingAddressesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeMovingAddressesRequest
type DescribeMovingAddressesInput struct {
_ struct{} `type:"structure"`
@@ -32367,7 +36855,7 @@ func (s *DescribeMovingAddressesInput) SetPublicIps(v []*string) *DescribeMoving
}
// Contains the output of DescribeMovingAddresses.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeMovingAddressesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeMovingAddressesResult
type DescribeMovingAddressesOutput struct {
_ struct{} `type:"structure"`
@@ -32402,7 +36890,7 @@ func (s *DescribeMovingAddressesOutput) SetNextToken(v string) *DescribeMovingAd
}
// Contains the parameters for DescribeNatGateways.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNatGatewaysRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNatGatewaysRequest
type DescribeNatGatewaysInput struct {
_ struct{} `type:"structure"`
@@ -32415,6 +36903,22 @@ type DescribeNatGatewaysInput struct {
//
// * subnet-id - The ID of the subnet in which the NAT gateway resides.
//
+ // * tag:key=value - The key/value combination of a tag assigned to the resource.
+ // Specify the key of the tag in the filter name and the value of the tag
+ // in the filter value. For example, for the tag Purpose=X, specify tag:Purpose
+ // for the filter name and X for the filter value.
+ //
+ // * tag-key - The key of a tag assigned to the resource. This filter is
+ // independent of the tag-value filter. For example, if you use both the
+ // filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources
+ // assigned both the tag key Purpose (regardless of what the tag's value
+ // is), and the tag value X (regardless of what the tag's key is). If you
+ // want to list only resources where Purpose is X, see the tag:key=value
+ // filter.
+ //
+ // * tag-value - The value of a tag assigned to the resource. This filter
+ // is independent of the tag-key filter.
+ //
// * vpc-id - The ID of the VPC in which the NAT gateway resides.
Filter []*Filter `locationNameList:"Filter" type:"list"`
@@ -32468,7 +36972,7 @@ func (s *DescribeNatGatewaysInput) SetNextToken(v string) *DescribeNatGatewaysIn
}
// Contains the output of DescribeNatGateways.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNatGatewaysResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNatGatewaysResult
type DescribeNatGatewaysOutput struct {
_ struct{} `type:"structure"`
@@ -32503,7 +37007,7 @@ func (s *DescribeNatGatewaysOutput) SetNextToken(v string) *DescribeNatGatewaysO
}
// Contains the parameters for DescribeNetworkAcls.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkAclsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkAclsRequest
type DescribeNetworkAclsInput struct {
_ struct{} `type:"structure"`
@@ -32605,7 +37109,7 @@ func (s *DescribeNetworkAclsInput) SetNetworkAclIds(v []*string) *DescribeNetwor
}
// Contains the output of DescribeNetworkAcls.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkAclsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkAclsResult
type DescribeNetworkAclsOutput struct {
_ struct{} `type:"structure"`
@@ -32630,7 +37134,7 @@ func (s *DescribeNetworkAclsOutput) SetNetworkAcls(v []*NetworkAcl) *DescribeNet
}
// Contains the parameters for DescribeNetworkInterfaceAttribute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaceAttributeRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaceAttributeRequest
type DescribeNetworkInterfaceAttributeInput struct {
_ struct{} `type:"structure"`
@@ -32691,7 +37195,7 @@ func (s *DescribeNetworkInterfaceAttributeInput) SetNetworkInterfaceId(v string)
}
// Contains the output of DescribeNetworkInterfaceAttribute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaceAttributeResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfaceAttributeResult
type DescribeNetworkInterfaceAttributeOutput struct {
_ struct{} `type:"structure"`
@@ -32752,7 +37256,7 @@ func (s *DescribeNetworkInterfaceAttributeOutput) SetSourceDestCheck(v *Attribut
}
// Contains the parameters for DescribeNetworkInterfacePermissions.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacePermissionsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacePermissionsRequest
type DescribeNetworkInterfacePermissionsInput struct {
_ struct{} `type:"structure"`
@@ -32819,7 +37323,7 @@ func (s *DescribeNetworkInterfacePermissionsInput) SetNextToken(v string) *Descr
}
// Contains the output for DescribeNetworkInterfacePermissions.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacePermissionsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacePermissionsResult
type DescribeNetworkInterfacePermissionsOutput struct {
_ struct{} `type:"structure"`
@@ -32853,7 +37357,7 @@ func (s *DescribeNetworkInterfacePermissionsOutput) SetNextToken(v string) *Desc
}
// Contains the parameters for DescribeNetworkInterfaces.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacesRequest
type DescribeNetworkInterfacesInput struct {
_ struct{} `type:"structure"`
@@ -33011,7 +37515,7 @@ func (s *DescribeNetworkInterfacesInput) SetNetworkInterfaceIds(v []*string) *De
}
// Contains the output of DescribeNetworkInterfaces.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInterfacesResult
type DescribeNetworkInterfacesOutput struct {
_ struct{} `type:"structure"`
@@ -33036,7 +37540,7 @@ func (s *DescribeNetworkInterfacesOutput) SetNetworkInterfaces(v []*NetworkInter
}
// Contains the parameters for DescribePlacementGroups.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePlacementGroupsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePlacementGroupsRequest
type DescribePlacementGroupsInput struct {
_ struct{} `type:"structure"`
@@ -33053,7 +37557,7 @@ type DescribePlacementGroupsInput struct {
// * state - The state of the placement group (pending | available | deleting
// | deleted).
//
- // * strategy - The strategy of the placement group (cluster).
+ // * strategy - The strategy of the placement group (cluster | spread).
Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
// One or more placement group names.
@@ -33091,7 +37595,7 @@ func (s *DescribePlacementGroupsInput) SetGroupNames(v []*string) *DescribePlace
}
// Contains the output of DescribePlacementGroups.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePlacementGroupsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePlacementGroupsResult
type DescribePlacementGroupsOutput struct {
_ struct{} `type:"structure"`
@@ -33116,7 +37620,7 @@ func (s *DescribePlacementGroupsOutput) SetPlacementGroups(v []*PlacementGroup)
}
// Contains the parameters for DescribePrefixLists.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePrefixListsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePrefixListsRequest
type DescribePrefixListsInput struct {
_ struct{} `type:"structure"`
@@ -33190,7 +37694,7 @@ func (s *DescribePrefixListsInput) SetPrefixListIds(v []*string) *DescribePrefix
}
// Contains the output of DescribePrefixLists.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePrefixListsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePrefixListsResult
type DescribePrefixListsOutput struct {
_ struct{} `type:"structure"`
@@ -33225,7 +37729,7 @@ func (s *DescribePrefixListsOutput) SetPrefixLists(v []*PrefixList) *DescribePre
}
// Contains the parameters for DescribeRegions.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRegionsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRegionsRequest
type DescribeRegionsInput struct {
_ struct{} `type:"structure"`
@@ -33275,7 +37779,7 @@ func (s *DescribeRegionsInput) SetRegionNames(v []*string) *DescribeRegionsInput
}
// Contains the output of DescribeRegions.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRegionsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRegionsResult
type DescribeRegionsOutput struct {
_ struct{} `type:"structure"`
@@ -33300,7 +37804,7 @@ func (s *DescribeRegionsOutput) SetRegions(v []*Region) *DescribeRegionsOutput {
}
// Contains the parameters for DescribeReservedInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesRequest
type DescribeReservedInstancesInput struct {
_ struct{} `type:"structure"`
@@ -33420,7 +37924,7 @@ func (s *DescribeReservedInstancesInput) SetReservedInstancesIds(v []*string) *D
}
// Contains the parameters for DescribeReservedInstancesListings.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesListingsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesListingsRequest
type DescribeReservedInstancesListingsInput struct {
_ struct{} `type:"structure"`
@@ -33472,7 +37976,7 @@ func (s *DescribeReservedInstancesListingsInput) SetReservedInstancesListingId(v
}
// Contains the output of DescribeReservedInstancesListings.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesListingsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesListingsResult
type DescribeReservedInstancesListingsOutput struct {
_ struct{} `type:"structure"`
@@ -33497,7 +38001,7 @@ func (s *DescribeReservedInstancesListingsOutput) SetReservedInstancesListings(v
}
// Contains the parameters for DescribeReservedInstancesModifications.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesModificationsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesModificationsRequest
type DescribeReservedInstancesModificationsInput struct {
_ struct{} `type:"structure"`
@@ -33573,7 +38077,7 @@ func (s *DescribeReservedInstancesModificationsInput) SetReservedInstancesModifi
}
// Contains the output of DescribeReservedInstancesModifications.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesModificationsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesModificationsResult
type DescribeReservedInstancesModificationsOutput struct {
_ struct{} `type:"structure"`
@@ -33608,7 +38112,7 @@ func (s *DescribeReservedInstancesModificationsOutput) SetReservedInstancesModif
}
// Contains the parameters for DescribeReservedInstancesOfferings.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesOfferingsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesOfferingsRequest
type DescribeReservedInstancesOfferingsInput struct {
_ struct{} `type:"structure"`
@@ -33818,7 +38322,7 @@ func (s *DescribeReservedInstancesOfferingsInput) SetReservedInstancesOfferingId
}
// Contains the output of DescribeReservedInstancesOfferings.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesOfferingsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesOfferingsResult
type DescribeReservedInstancesOfferingsOutput struct {
_ struct{} `type:"structure"`
@@ -33853,7 +38357,7 @@ func (s *DescribeReservedInstancesOfferingsOutput) SetReservedInstancesOfferings
}
// Contains the output for DescribeReservedInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReservedInstancesResult
type DescribeReservedInstancesOutput struct {
_ struct{} `type:"structure"`
@@ -33878,7 +38382,7 @@ func (s *DescribeReservedInstancesOutput) SetReservedInstances(v []*ReservedInst
}
// Contains the parameters for DescribeRouteTables.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRouteTablesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRouteTablesRequest
type DescribeRouteTablesInput struct {
_ struct{} `type:"structure"`
@@ -33991,7 +38495,7 @@ func (s *DescribeRouteTablesInput) SetRouteTableIds(v []*string) *DescribeRouteT
}
// Contains the output of DescribeRouteTables.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRouteTablesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeRouteTablesResult
type DescribeRouteTablesOutput struct {
_ struct{} `type:"structure"`
@@ -34016,7 +38520,7 @@ func (s *DescribeRouteTablesOutput) SetRouteTables(v []*RouteTable) *DescribeRou
}
// Contains the parameters for DescribeScheduledInstanceAvailability.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstanceAvailabilityRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstanceAvailabilityRequest
type DescribeScheduledInstanceAvailabilityInput struct {
_ struct{} `type:"structure"`
@@ -34146,7 +38650,7 @@ func (s *DescribeScheduledInstanceAvailabilityInput) SetRecurrence(v *ScheduledI
}
// Contains the output of DescribeScheduledInstanceAvailability.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstanceAvailabilityResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstanceAvailabilityResult
type DescribeScheduledInstanceAvailabilityOutput struct {
_ struct{} `type:"structure"`
@@ -34181,7 +38685,7 @@ func (s *DescribeScheduledInstanceAvailabilityOutput) SetScheduledInstanceAvaila
}
// Contains the parameters for DescribeScheduledInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstancesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstancesRequest
type DescribeScheduledInstancesInput struct {
_ struct{} `type:"structure"`
@@ -34264,7 +38768,7 @@ func (s *DescribeScheduledInstancesInput) SetSlotStartTimeRange(v *SlotStartTime
}
// Contains the output of DescribeScheduledInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstancesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeScheduledInstancesResult
type DescribeScheduledInstancesOutput struct {
_ struct{} `type:"structure"`
@@ -34298,7 +38802,7 @@ func (s *DescribeScheduledInstancesOutput) SetScheduledInstanceSet(v []*Schedule
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroupReferencesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroupReferencesRequest
type DescribeSecurityGroupReferencesInput struct {
_ struct{} `type:"structure"`
@@ -34349,7 +38853,7 @@ func (s *DescribeSecurityGroupReferencesInput) SetGroupId(v []*string) *Describe
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroupReferencesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroupReferencesResult
type DescribeSecurityGroupReferencesOutput struct {
_ struct{} `type:"structure"`
@@ -34374,7 +38878,7 @@ func (s *DescribeSecurityGroupReferencesOutput) SetSecurityGroupReferenceSet(v [
}
// Contains the parameters for DescribeSecurityGroups.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroupsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroupsRequest
type DescribeSecurityGroupsInput struct {
_ struct{} `type:"structure"`
@@ -34390,36 +38894,63 @@ type DescribeSecurityGroupsInput struct {
//
// * description - The description of the security group.
//
+ // * egress.ip-permission.cidr - An IPv4 CIDR block for an outbound security
+ // group rule.
+ //
+ // * egress.ip-permission.from-port - For an outbound rule, the start of
+ // port range for the TCP and UDP protocols, or an ICMP type number.
+ //
+ // * egress.ip-permission.group-id - The ID of a security group that has
+ // been referenced in an outbound security group rule.
+ //
+ // * egress.ip-permission.group-name - The name of a security group that
+ // has been referenced in an outbound security group rule.
+ //
+ // * egress.ip-permission.ipv6-cidr - An IPv6 CIDR block for an outbound
+ // security group rule.
+ //
// * egress.ip-permission.prefix-list-id - The ID (prefix) of the AWS service
- // to which the security group allows access.
+ // to which a security group rule allows outbound access.
+ //
+ // * egress.ip-permission.protocol - The IP protocol for an outbound security
+ // group rule (tcp | udp | icmp or a protocol number).
+ //
+ // * egress.ip-permission.to-port - For an outbound rule, the end of port
+ // range for the TCP and UDP protocols, or an ICMP code.
+ //
+ // * egress.ip-permission.user-id - The ID of an AWS account that has been
+ // referenced in an outbound security group rule.
//
// * group-id - The ID of the security group.
//
// * group-name - The name of the security group.
//
- // * ip-permission.cidr - An IPv4 CIDR range that has been granted permission
- // in a security group rule.
+ // * ip-permission.cidr - An IPv4 CIDR block for an inbound security group
+ // rule.
//
- // * ip-permission.from-port - The start of port range for the TCP and UDP
- // protocols, or an ICMP type number.
+ // * ip-permission.from-port - For an inbound rule, the start of port range
+ // for the TCP and UDP protocols, or an ICMP type number.
//
- // * ip-permission.group-id - The ID of a security group that has been granted
- // permission.
+ // * ip-permission.group-id - The ID of a security group that has been referenced
+ // in an inbound security group rule.
//
// * ip-permission.group-name - The name of a security group that has been
- // granted permission.
+ // referenced in an inbound security group rule.
//
- // * ip-permission.ipv6-cidr - An IPv6 CIDR range that has been granted permission
- // in a security group rule.
+ // * ip-permission.ipv6-cidr - An IPv6 CIDR block for an inbound security
+ // group rule.
//
- // * ip-permission.protocol - The IP protocol for the permission (tcp | udp
- // | icmp or a protocol number).
+ // * ip-permission.prefix-list-id - The ID (prefix) of the AWS service from
+ // which a security group rule allows inbound access.
//
- // * ip-permission.to-port - The end of port range for the TCP and UDP protocols,
- // or an ICMP code.
+ // * ip-permission.protocol - The IP protocol for an inbound security group
+ // rule (tcp | udp | icmp or a protocol number).
//
- // * ip-permission.user-id - The ID of an AWS account that has been granted
- // permission.
+ // * ip-permission.to-port - For an inbound rule, the end of port range for
+ // the TCP and UDP protocols, or an ICMP code.
+ //
+ // * ip-permission.user-id - The ID of an AWS account that has been referenced
+ // in an inbound security group rule.
//
// * owner-id - The AWS account ID of the owner of the security group.
//
@@ -34443,6 +38974,14 @@ type DescribeSecurityGroupsInput struct {
//
// Default: Describes all your security groups.
GroupNames []*string `locationName:"GroupName" locationNameList:"GroupName" type:"list"`
+
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another request with the returned NextToken value.
+ // This value can be between 5 and 1000.
+ MaxResults *int64 `type:"integer"`
+
+ // The token to request the next page of results.
+ NextToken *string `type:"string"`
}
// String returns the string representation
@@ -34479,11 +39018,27 @@ func (s *DescribeSecurityGroupsInput) SetGroupNames(v []*string) *DescribeSecuri
return s
}
+// SetMaxResults sets the MaxResults field's value.
+func (s *DescribeSecurityGroupsInput) SetMaxResults(v int64) *DescribeSecurityGroupsInput {
+ s.MaxResults = &v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeSecurityGroupsInput) SetNextToken(v string) *DescribeSecurityGroupsInput {
+ s.NextToken = &v
+ return s
+}
+
// Contains the output of DescribeSecurityGroups.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroupsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroupsResult
type DescribeSecurityGroupsOutput struct {
_ struct{} `type:"structure"`
+ // The token to use to retrieve the next page of results. This value is null
+ // when there are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
// Information about one or more security groups.
SecurityGroups []*SecurityGroup `locationName:"securityGroupInfo" locationNameList:"item" type:"list"`
}
@@ -34498,6 +39053,12 @@ func (s DescribeSecurityGroupsOutput) GoString() string {
return s.String()
}
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeSecurityGroupsOutput) SetNextToken(v string) *DescribeSecurityGroupsOutput {
+ s.NextToken = &v
+ return s
+}
+
// SetSecurityGroups sets the SecurityGroups field's value.
func (s *DescribeSecurityGroupsOutput) SetSecurityGroups(v []*SecurityGroup) *DescribeSecurityGroupsOutput {
s.SecurityGroups = v
@@ -34505,7 +39066,7 @@ func (s *DescribeSecurityGroupsOutput) SetSecurityGroups(v []*SecurityGroup) *De
}
// Contains the parameters for DescribeSnapshotAttribute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshotAttributeRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshotAttributeRequest
type DescribeSnapshotAttributeInput struct {
_ struct{} `type:"structure"`
@@ -34571,7 +39132,7 @@ func (s *DescribeSnapshotAttributeInput) SetSnapshotId(v string) *DescribeSnapsh
}
// Contains the output of DescribeSnapshotAttribute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshotAttributeResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshotAttributeResult
type DescribeSnapshotAttributeOutput struct {
_ struct{} `type:"structure"`
@@ -34614,7 +39175,7 @@ func (s *DescribeSnapshotAttributeOutput) SetSnapshotId(v string) *DescribeSnaps
}
// Contains the parameters for DescribeSnapshots.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshotsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshotsRequest
type DescribeSnapshotsInput struct {
_ struct{} `type:"structure"`
@@ -34748,7 +39309,7 @@ func (s *DescribeSnapshotsInput) SetSnapshotIds(v []*string) *DescribeSnapshotsI
}
// Contains the output of DescribeSnapshots.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshotsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSnapshotsResult
type DescribeSnapshotsOutput struct {
_ struct{} `type:"structure"`
@@ -34785,7 +39346,7 @@ func (s *DescribeSnapshotsOutput) SetSnapshots(v []*Snapshot) *DescribeSnapshots
}
// Contains the parameters for DescribeSpotDatafeedSubscription.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotDatafeedSubscriptionRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotDatafeedSubscriptionRequest
type DescribeSpotDatafeedSubscriptionInput struct {
_ struct{} `type:"structure"`
@@ -34813,11 +39374,11 @@ func (s *DescribeSpotDatafeedSubscriptionInput) SetDryRun(v bool) *DescribeSpotD
}
// Contains the output of DescribeSpotDatafeedSubscription.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotDatafeedSubscriptionResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotDatafeedSubscriptionResult
type DescribeSpotDatafeedSubscriptionOutput struct {
_ struct{} `type:"structure"`
- // The Spot instance data feed subscription.
+ // The Spot Instance data feed subscription.
SpotDatafeedSubscription *SpotDatafeedSubscription `locationName:"spotDatafeedSubscription" type:"structure"`
}
@@ -34838,7 +39399,7 @@ func (s *DescribeSpotDatafeedSubscriptionOutput) SetSpotDatafeedSubscription(v *
}
// Contains the parameters for DescribeSpotFleetInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetInstancesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetInstancesRequest
type DescribeSpotFleetInstancesInput struct {
_ struct{} `type:"structure"`
@@ -34856,7 +39417,7 @@ type DescribeSpotFleetInstancesInput struct {
// The token for the next set of results.
NextToken *string `locationName:"nextToken" type:"string"`
- // The ID of the Spot fleet request.
+ // The ID of the Spot Fleet request.
//
// SpotFleetRequestId is a required field
SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
@@ -34910,7 +39471,7 @@ func (s *DescribeSpotFleetInstancesInput) SetSpotFleetRequestId(v string) *Descr
}
// Contains the output of DescribeSpotFleetInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetInstancesResponse
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetInstancesResponse
type DescribeSpotFleetInstancesOutput struct {
_ struct{} `type:"structure"`
@@ -34924,7 +39485,7 @@ type DescribeSpotFleetInstancesOutput struct {
// when there are no more results to return.
NextToken *string `locationName:"nextToken" type:"string"`
- // The ID of the Spot fleet request.
+ // The ID of the Spot Fleet request.
//
// SpotFleetRequestId is a required field
SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
@@ -34959,7 +39520,7 @@ func (s *DescribeSpotFleetInstancesOutput) SetSpotFleetRequestId(v string) *Desc
}
// Contains the parameters for DescribeSpotFleetRequestHistory.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequestHistoryRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequestHistoryRequest
type DescribeSpotFleetRequestHistoryInput struct {
_ struct{} `type:"structure"`
@@ -34980,7 +39541,7 @@ type DescribeSpotFleetRequestHistoryInput struct {
// The token for the next set of results.
NextToken *string `locationName:"nextToken" type:"string"`
- // The ID of the Spot fleet request.
+ // The ID of the Spot Fleet request.
//
// SpotFleetRequestId is a required field
SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
@@ -35054,11 +39615,11 @@ func (s *DescribeSpotFleetRequestHistoryInput) SetStartTime(v time.Time) *Descri
}
// Contains the output of DescribeSpotFleetRequestHistory.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequestHistoryResponse
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequestHistoryResponse
type DescribeSpotFleetRequestHistoryOutput struct {
_ struct{} `type:"structure"`
- // Information about the events in the history of the Spot fleet request.
+ // Information about the events in the history of the Spot Fleet request.
//
// HistoryRecords is a required field
HistoryRecords []*HistoryRecord `locationName:"historyRecordSet" locationNameList:"item" type:"list" required:"true"`
@@ -35075,7 +39636,7 @@ type DescribeSpotFleetRequestHistoryOutput struct {
// when there are no more results to return.
NextToken *string `locationName:"nextToken" type:"string"`
- // The ID of the Spot fleet request.
+ // The ID of the Spot Fleet request.
//
// SpotFleetRequestId is a required field
SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
@@ -35127,7 +39688,7 @@ func (s *DescribeSpotFleetRequestHistoryOutput) SetStartTime(v time.Time) *Descr
}
// Contains the parameters for DescribeSpotFleetRequests.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequestsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequestsRequest
type DescribeSpotFleetRequestsInput struct {
_ struct{} `type:"structure"`
@@ -35145,7 +39706,7 @@ type DescribeSpotFleetRequestsInput struct {
// The token for the next set of results.
NextToken *string `locationName:"nextToken" type:"string"`
- // The IDs of the Spot fleet requests.
+ // The IDs of the Spot Fleet requests.
SpotFleetRequestIds []*string `locationName:"spotFleetRequestId" locationNameList:"item" type:"list"`
}
@@ -35184,7 +39745,7 @@ func (s *DescribeSpotFleetRequestsInput) SetSpotFleetRequestIds(v []*string) *De
}
// Contains the output of DescribeSpotFleetRequests.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequestsResponse
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotFleetRequestsResponse
type DescribeSpotFleetRequestsOutput struct {
_ struct{} `type:"structure"`
@@ -35192,7 +39753,7 @@ type DescribeSpotFleetRequestsOutput struct {
// when there are no more results to return.
NextToken *string `locationName:"nextToken" type:"string"`
- // Information about the configuration of your Spot fleet.
+ // Information about the configuration of your Spot Fleet.
//
// SpotFleetRequestConfigs is a required field
SpotFleetRequestConfigs []*SpotFleetRequestConfig `locationName:"spotFleetRequestConfigSet" locationNameList:"item" type:"list" required:"true"`
@@ -35221,7 +39782,7 @@ func (s *DescribeSpotFleetRequestsOutput) SetSpotFleetRequestConfigs(v []*SpotFl
}
// Contains the parameters for DescribeSpotInstanceRequests.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotInstanceRequestsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotInstanceRequestsRequest
type DescribeSpotInstanceRequestsInput struct {
_ struct{} `type:"structure"`
@@ -35235,7 +39796,7 @@ type DescribeSpotInstanceRequestsInput struct {
//
// * availability-zone-group - The Availability Zone group.
//
- // * create-time - The time stamp when the Spot instance request was created.
+ // * create-time - The time stamp when the Spot Instance request was created.
//
// * fault-code - The fault code related to the request.
//
@@ -35243,23 +39804,23 @@ type DescribeSpotInstanceRequestsInput struct {
//
// * instance-id - The ID of the instance that fulfilled the request.
//
- // * launch-group - The Spot instance launch group.
+ // * launch-group - The Spot Instance launch group.
//
// * launch.block-device-mapping.delete-on-termination - Indicates whether
- // the Amazon EBS volume is deleted on instance termination.
+ // the EBS volume is deleted on instance termination.
//
- // * launch.block-device-mapping.device-name - The device name for the Amazon
- // EBS volume (for example, /dev/sdh).
+ // * launch.block-device-mapping.device-name - The device name for the volume
+ // in the block device mapping (for example, /dev/sdh or xvdh).
//
- // * launch.block-device-mapping.snapshot-id - The ID of the snapshot used
- // for the Amazon EBS volume.
+ // * launch.block-device-mapping.snapshot-id - The ID of the snapshot for
+ // the EBS volume.
//
- // * launch.block-device-mapping.volume-size - The size of the Amazon EBS
- // volume, in GiB.
+ // * launch.block-device-mapping.volume-size - The size of the EBS volume,
+ // in GiB.
//
- // * launch.block-device-mapping.volume-type - The type of the Amazon EBS
- // volume: gp2 for General Purpose SSD, io1 for Provisioned IOPS SSD, st1
- // for Throughput Optimized HDD, sc1for Cold HDD, or standard for Magnetic.
+ // * launch.block-device-mapping.volume-type - The type of EBS volume: gp2
+ // for General Purpose SSD, io1 for Provisioned IOPS SSD, st1 for Throughput
+ // Optimized HDD, sc1for Cold HDD, or standard for Magnetic.
//
// * launch.group-id - The security group for the instance.
//
@@ -35271,53 +39832,53 @@ type DescribeSpotInstanceRequestsInput struct {
//
// * launch.key-name - The name of the key pair the instance launched with.
//
- // * launch.monitoring-enabled - Whether monitoring is enabled for the Spot
- // instance.
+ // * launch.monitoring-enabled - Whether detailed monitoring is enabled for
+ // the Spot Instance.
//
// * launch.ramdisk-id - The RAM disk ID.
//
- // * network-interface.network-interface-id - The ID of the network interface.
- //
- // * network-interface.device-index - The index of the device for the network
- // interface attachment on the instance.
- //
- // * network-interface.subnet-id - The ID of the subnet for the instance.
- //
- // * network-interface.description - A description of the network interface.
- //
- // * network-interface.private-ip-address - The primary private IP address
- // of the network interface.
- //
- // * network-interface.delete-on-termination - Indicates whether the network
- // interface is deleted when the instance is terminated.
- //
- // * network-interface.group-id - The ID of the security group associated
- // with the network interface.
- //
- // * network-interface.group-name - The name of the security group associated
- // with the network interface.
+ // * launched-availability-zone - The Availability Zone in which the request
+ // is launched.
//
// * network-interface.addresses.primary - Indicates whether the IP address
// is the primary private IP address.
//
+ // * network-interface.delete-on-termination - Indicates whether the network
+ // interface is deleted when the instance is terminated.
+ //
+ // * network-interface.description - A description of the network interface.
+ //
+ // * network-interface.device-index - The index of the device for the network
+ // interface attachment on the instance.
+ //
+ // * network-interface.group-id - The ID of the security group associated
+ // with the network interface.
+ //
+ // * network-interface.network-interface-id - The ID of the network interface.
+ //
+ // * network-interface.private-ip-address - The primary private IP address
+ // of the network interface.
+ //
+ // * network-interface.subnet-id - The ID of the subnet for the instance.
+ //
// * product-description - The product description associated with the instance
// (Linux/UNIX | Windows).
//
- // * spot-instance-request-id - The Spot instance request ID.
+ // * spot-instance-request-id - The Spot Instance request ID.
//
- // * spot-price - The maximum hourly price for any Spot instance launched
+ // * spot-price - The maximum hourly price for any Spot Instance launched
// to fulfill the request.
//
- // * state - The state of the Spot instance request (open | active | closed
- // | cancelled | failed). Spot bid status information can help you track
- // your Amazon EC2 Spot instance requests. For more information, see Spot
- // Bid Status (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html)
+ // * state - The state of the Spot Instance request (open | active | closed
+ // | cancelled | failed). Spot request status information can help you track
+ // your Amazon EC2 Spot Instance requests. For more information, see Spot
+ // Request Status (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html)
// in the Amazon Elastic Compute Cloud User Guide.
//
// * status-code - The short code describing the most recent evaluation of
- // your Spot instance request.
+ // your Spot Instance request.
//
- // * status-message - The message explaining the status of the Spot instance
+ // * status-message - The message explaining the status of the Spot Instance
// request.
//
// * tag:key=value - The key/value combination of a tag assigned to the resource.
@@ -35336,17 +39897,14 @@ type DescribeSpotInstanceRequestsInput struct {
// * tag-value - The value of a tag assigned to the resource. This filter
// is independent of the tag-key filter.
//
- // * type - The type of Spot instance request (one-time | persistent).
- //
- // * launched-availability-zone - The Availability Zone in which the bid
- // is launched.
+ // * type - The type of Spot Instance request (one-time | persistent).
//
// * valid-from - The start date of the request.
//
// * valid-until - The end date of the request.
Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
- // One or more Spot instance request IDs.
+ // One or more Spot Instance request IDs.
SpotInstanceRequestIds []*string `locationName:"SpotInstanceRequestId" locationNameList:"SpotInstanceRequestId" type:"list"`
}
@@ -35379,11 +39937,11 @@ func (s *DescribeSpotInstanceRequestsInput) SetSpotInstanceRequestIds(v []*strin
}
// Contains the output of DescribeSpotInstanceRequests.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotInstanceRequestsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotInstanceRequestsResult
type DescribeSpotInstanceRequestsOutput struct {
_ struct{} `type:"structure"`
- // One or more Spot instance requests.
+ // One or more Spot Instance requests.
SpotInstanceRequests []*SpotInstanceRequest `locationName:"spotInstanceRequestSet" locationNameList:"item" type:"list"`
}
@@ -35404,7 +39962,7 @@ func (s *DescribeSpotInstanceRequestsOutput) SetSpotInstanceRequests(v []*SpotIn
}
// Contains the parameters for DescribeSpotPriceHistory.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotPriceHistoryRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotPriceHistoryRequest
type DescribeSpotPriceHistoryInput struct {
_ struct{} `type:"structure"`
@@ -35440,8 +39998,7 @@ type DescribeSpotPriceHistoryInput struct {
// than or less than comparison is not supported.
Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
- // Filters the results by the specified instance types. Note that T2 and HS1
- // instance types are not supported.
+ // Filters the results by the specified instance types.
InstanceTypes []*string `locationName:"InstanceType" type:"list"`
// The maximum number of results to return in a single call. Specify a value
@@ -35525,7 +40082,7 @@ func (s *DescribeSpotPriceHistoryInput) SetStartTime(v time.Time) *DescribeSpotP
}
// Contains the output of DescribeSpotPriceHistory.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotPriceHistoryResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSpotPriceHistoryResult
type DescribeSpotPriceHistoryOutput struct {
_ struct{} `type:"structure"`
@@ -35559,7 +40116,7 @@ func (s *DescribeSpotPriceHistoryOutput) SetSpotPriceHistory(v []*SpotPrice) *De
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeStaleSecurityGroupsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeStaleSecurityGroupsRequest
type DescribeStaleSecurityGroupsInput struct {
_ struct{} `type:"structure"`
@@ -35637,7 +40194,7 @@ func (s *DescribeStaleSecurityGroupsInput) SetVpcId(v string) *DescribeStaleSecu
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeStaleSecurityGroupsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeStaleSecurityGroupsResult
type DescribeStaleSecurityGroupsOutput struct {
_ struct{} `type:"structure"`
@@ -35672,7 +40229,7 @@ func (s *DescribeStaleSecurityGroupsOutput) SetStaleSecurityGroupSet(v []*StaleS
}
// Contains the parameters for DescribeSubnets.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSubnetsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSubnetsRequest
type DescribeSubnetsInput struct {
_ struct{} `type:"structure"`
@@ -35764,7 +40321,7 @@ func (s *DescribeSubnetsInput) SetSubnetIds(v []*string) *DescribeSubnetsInput {
}
// Contains the output of DescribeSubnets.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSubnetsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSubnetsResult
type DescribeSubnetsOutput struct {
_ struct{} `type:"structure"`
@@ -35789,7 +40346,7 @@ func (s *DescribeSubnetsOutput) SetSubnets(v []*Subnet) *DescribeSubnetsOutput {
}
// Contains the parameters for DescribeTags.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTagsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTagsRequest
type DescribeTagsInput struct {
_ struct{} `type:"structure"`
@@ -35806,9 +40363,10 @@ type DescribeTagsInput struct {
// * resource-id - The resource ID.
//
// * resource-type - The resource type (customer-gateway | dhcp-options |
- // image | instance | internet-gateway | network-acl | network-interface
- // | reserved-instances | route-table | security-group | snapshot | spot-instances-request
- // | subnet | volume | vpc | vpn-connection | vpn-gateway).
+ // elastic-ip | fpga-image | image | instance | internet-gateway | launch-template
+ // | natgateway | network-acl | network-interface | reserved-instances |
+ // route-table | security-group | snapshot | spot-instances-request | subnet
+ // | volume | vpc | vpc-peering-connection | vpn-connection | vpn-gateway).
//
// * value - The tag value.
Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
@@ -35857,7 +40415,7 @@ func (s *DescribeTagsInput) SetNextToken(v string) *DescribeTagsInput {
}
// Contains the output of DescribeTags.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTagsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTagsResult
type DescribeTagsOutput struct {
_ struct{} `type:"structure"`
@@ -35892,7 +40450,7 @@ func (s *DescribeTagsOutput) SetTags(v []*TagDescription) *DescribeTagsOutput {
}
// Contains the parameters for DescribeVolumeAttribute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeAttributeRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeAttributeRequest
type DescribeVolumeAttributeInput struct {
_ struct{} `type:"structure"`
@@ -35953,7 +40511,7 @@ func (s *DescribeVolumeAttributeInput) SetVolumeId(v string) *DescribeVolumeAttr
}
// Contains the output of DescribeVolumeAttribute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeAttributeResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeAttributeResult
type DescribeVolumeAttributeOutput struct {
_ struct{} `type:"structure"`
@@ -35996,7 +40554,7 @@ func (s *DescribeVolumeAttributeOutput) SetVolumeId(v string) *DescribeVolumeAtt
}
// Contains the parameters for DescribeVolumeStatus.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeStatusRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeStatusRequest
type DescribeVolumeStatusInput struct {
_ struct{} `type:"structure"`
@@ -36102,7 +40660,7 @@ func (s *DescribeVolumeStatusInput) SetVolumeIds(v []*string) *DescribeVolumeSta
}
// Contains the output of DescribeVolumeStatus.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeStatusResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumeStatusResult
type DescribeVolumeStatusOutput struct {
_ struct{} `type:"structure"`
@@ -36137,7 +40695,7 @@ func (s *DescribeVolumeStatusOutput) SetVolumeStatuses(v []*VolumeStatusItem) *D
}
// Contains the parameters for DescribeVolumes.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumesRequest
type DescribeVolumesInput struct {
_ struct{} `type:"structure"`
@@ -36154,7 +40712,7 @@ type DescribeVolumesInput struct {
// * attachment.delete-on-termination - Whether the volume is deleted on
// instance termination.
//
- // * attachment.device - The device name that is exposed to the instance
+ // * attachment.device - The device name specified in the block device mapping
// (for example, /dev/sda1).
//
// * attachment.instance-id - The ID of the instance the volume is attached
@@ -36260,7 +40818,7 @@ func (s *DescribeVolumesInput) SetVolumeIds(v []*string) *DescribeVolumesInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumesModificationsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumesModificationsRequest
type DescribeVolumesModificationsInput struct {
_ struct{} `type:"structure"`
@@ -36326,7 +40884,7 @@ func (s *DescribeVolumesModificationsInput) SetVolumeIds(v []*string) *DescribeV
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumesModificationsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumesModificationsResult
type DescribeVolumesModificationsOutput struct {
_ struct{} `type:"structure"`
@@ -36360,7 +40918,7 @@ func (s *DescribeVolumesModificationsOutput) SetVolumesModifications(v []*Volume
}
// Contains the output of DescribeVolumes.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVolumesResult
type DescribeVolumesOutput struct {
_ struct{} `type:"structure"`
@@ -36397,7 +40955,7 @@ func (s *DescribeVolumesOutput) SetVolumes(v []*Volume) *DescribeVolumesOutput {
}
// Contains the parameters for DescribeVpcAttribute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcAttributeRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcAttributeRequest
type DescribeVpcAttributeInput struct {
_ struct{} `type:"structure"`
@@ -36463,7 +41021,7 @@ func (s *DescribeVpcAttributeInput) SetVpcId(v string) *DescribeVpcAttributeInpu
}
// Contains the output of DescribeVpcAttribute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcAttributeResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcAttributeResult
type DescribeVpcAttributeOutput struct {
_ struct{} `type:"structure"`
@@ -36510,7 +41068,7 @@ func (s *DescribeVpcAttributeOutput) SetVpcId(v string) *DescribeVpcAttributeOut
}
// Contains the parameters for DescribeVpcClassicLinkDnsSupport.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLinkDnsSupportRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLinkDnsSupportRequest
type DescribeVpcClassicLinkDnsSupportInput struct {
_ struct{} `type:"structure"`
@@ -36572,7 +41130,7 @@ func (s *DescribeVpcClassicLinkDnsSupportInput) SetVpcIds(v []*string) *Describe
}
// Contains the output of DescribeVpcClassicLinkDnsSupport.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLinkDnsSupportResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLinkDnsSupportResult
type DescribeVpcClassicLinkDnsSupportOutput struct {
_ struct{} `type:"structure"`
@@ -36606,7 +41164,7 @@ func (s *DescribeVpcClassicLinkDnsSupportOutput) SetVpcs(v []*ClassicLinkDnsSupp
}
// Contains the parameters for DescribeVpcClassicLink.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLinkRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLinkRequest
type DescribeVpcClassicLinkInput struct {
_ struct{} `type:"structure"`
@@ -36671,7 +41229,7 @@ func (s *DescribeVpcClassicLinkInput) SetVpcIds(v []*string) *DescribeVpcClassic
}
// Contains the output of DescribeVpcClassicLink.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLinkResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcClassicLinkResult
type DescribeVpcClassicLinkOutput struct {
_ struct{} `type:"structure"`
@@ -36695,8 +41253,449 @@ func (s *DescribeVpcClassicLinkOutput) SetVpcs(v []*VpcClassicLink) *DescribeVpc
return s
}
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointConnectionNotificationsRequest
+type DescribeVpcEndpointConnectionNotificationsInput struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the notification.
+ ConnectionNotificationId *string `type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // One or more filters.
+ //
+ // * connection-notification-arn - The ARN of SNS topic for the notification.
+ //
+ // * connection-notification-id - The ID of the notification.
+ //
+ // * connection-notification-state - The state of the notification (Enabled
+ // | Disabled).
+ //
+ // * connection-notification-type - The type of notification (Topic).
+ //
+ // * service-id - The ID of the endpoint service.
+ //
+ // * vpc-endpoint-id - The ID of the VPC endpoint.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // The maximum number of results to return in a single call. To retrieve the
+ // remaining results, make another request with the returned NextToken value.
+ MaxResults *int64 `type:"integer"`
+
+ // The token to request the next page of results.
+ NextToken *string `type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeVpcEndpointConnectionNotificationsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVpcEndpointConnectionNotificationsInput) GoString() string {
+ return s.String()
+}
+
+// SetConnectionNotificationId sets the ConnectionNotificationId field's value.
+func (s *DescribeVpcEndpointConnectionNotificationsInput) SetConnectionNotificationId(v string) *DescribeVpcEndpointConnectionNotificationsInput {
+ s.ConnectionNotificationId = &v
+ return s
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *DescribeVpcEndpointConnectionNotificationsInput) SetDryRun(v bool) *DescribeVpcEndpointConnectionNotificationsInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetFilters sets the Filters field's value.
+func (s *DescribeVpcEndpointConnectionNotificationsInput) SetFilters(v []*Filter) *DescribeVpcEndpointConnectionNotificationsInput {
+ s.Filters = v
+ return s
+}
+
+// SetMaxResults sets the MaxResults field's value.
+func (s *DescribeVpcEndpointConnectionNotificationsInput) SetMaxResults(v int64) *DescribeVpcEndpointConnectionNotificationsInput {
+ s.MaxResults = &v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeVpcEndpointConnectionNotificationsInput) SetNextToken(v string) *DescribeVpcEndpointConnectionNotificationsInput {
+ s.NextToken = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointConnectionNotificationsResult
+type DescribeVpcEndpointConnectionNotificationsOutput struct {
+ _ struct{} `type:"structure"`
+
+ // One or more notifications.
+ ConnectionNotificationSet []*ConnectionNotification `locationName:"connectionNotificationSet" locationNameList:"item" type:"list"`
+
+ // The token to use to retrieve the next page of results. This value is null
+ // when there are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeVpcEndpointConnectionNotificationsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVpcEndpointConnectionNotificationsOutput) GoString() string {
+ return s.String()
+}
+
+// SetConnectionNotificationSet sets the ConnectionNotificationSet field's value.
+func (s *DescribeVpcEndpointConnectionNotificationsOutput) SetConnectionNotificationSet(v []*ConnectionNotification) *DescribeVpcEndpointConnectionNotificationsOutput {
+ s.ConnectionNotificationSet = v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeVpcEndpointConnectionNotificationsOutput) SetNextToken(v string) *DescribeVpcEndpointConnectionNotificationsOutput {
+ s.NextToken = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointConnectionsRequest
+type DescribeVpcEndpointConnectionsInput struct {
+ _ struct{} `type:"structure"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // One or more filters.
+ //
+ // * service-id - The ID of the service.
+ //
+ // * vpc-endpoint-owner - The AWS account number of the owner of the endpoint.
+ //
+ // * vpc-endpoint-state - The state of the endpoint (pendingAcceptance |
+ // pending | available | deleting | deleted | rejected | failed).
+ //
+ // * vpc-endpoint-id - The ID of the endpoint.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // The maximum number of results to return for the request in a single page.
+ // The remaining results of the initial request can be seen by sending another
+ // request with the returned NextToken value. This value can be between 5 and
+ // 1000; if MaxResults is given a value larger than 1000, only 1000 results
+ // are returned.
+ MaxResults *int64 `type:"integer"`
+
+ // The token to retrieve the next page of results.
+ NextToken *string `type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeVpcEndpointConnectionsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVpcEndpointConnectionsInput) GoString() string {
+ return s.String()
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *DescribeVpcEndpointConnectionsInput) SetDryRun(v bool) *DescribeVpcEndpointConnectionsInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetFilters sets the Filters field's value.
+func (s *DescribeVpcEndpointConnectionsInput) SetFilters(v []*Filter) *DescribeVpcEndpointConnectionsInput {
+ s.Filters = v
+ return s
+}
+
+// SetMaxResults sets the MaxResults field's value.
+func (s *DescribeVpcEndpointConnectionsInput) SetMaxResults(v int64) *DescribeVpcEndpointConnectionsInput {
+ s.MaxResults = &v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeVpcEndpointConnectionsInput) SetNextToken(v string) *DescribeVpcEndpointConnectionsInput {
+ s.NextToken = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointConnectionsResult
+type DescribeVpcEndpointConnectionsOutput struct {
+ _ struct{} `type:"structure"`
+
+ // The token to use to retrieve the next page of results. This value is null
+ // when there are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ // Information about one or more VPC endpoint connections.
+ VpcEndpointConnections []*VpcEndpointConnection `locationName:"vpcEndpointConnectionSet" locationNameList:"item" type:"list"`
+}
+
+// String returns the string representation
+func (s DescribeVpcEndpointConnectionsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVpcEndpointConnectionsOutput) GoString() string {
+ return s.String()
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeVpcEndpointConnectionsOutput) SetNextToken(v string) *DescribeVpcEndpointConnectionsOutput {
+ s.NextToken = &v
+ return s
+}
+
+// SetVpcEndpointConnections sets the VpcEndpointConnections field's value.
+func (s *DescribeVpcEndpointConnectionsOutput) SetVpcEndpointConnections(v []*VpcEndpointConnection) *DescribeVpcEndpointConnectionsOutput {
+ s.VpcEndpointConnections = v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServiceConfigurationsRequest
+type DescribeVpcEndpointServiceConfigurationsInput struct {
+ _ struct{} `type:"structure"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // One or more filters.
+ //
+ // * service-name - The name of the service.
+ //
+ // * service-id - The ID of the service.
+ //
+ // * service-state - The state of the service (Pending | Available | Deleting
+ // | Deleted | Failed).
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // The maximum number of results to return for the request in a single page.
+ // The remaining results of the initial request can be seen by sending another
+ // request with the returned NextToken value. This value can be between 5 and
+ // 1000; if MaxResults is given a value larger than 1000, only 1000 results
+ // are returned.
+ MaxResults *int64 `type:"integer"`
+
+ // The token to retrieve the next page of results.
+ NextToken *string `type:"string"`
+
+ // The IDs of one or more services.
+ ServiceIds []*string `locationName:"ServiceId" locationNameList:"item" type:"list"`
+}
+
+// String returns the string representation
+func (s DescribeVpcEndpointServiceConfigurationsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVpcEndpointServiceConfigurationsInput) GoString() string {
+ return s.String()
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *DescribeVpcEndpointServiceConfigurationsInput) SetDryRun(v bool) *DescribeVpcEndpointServiceConfigurationsInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetFilters sets the Filters field's value.
+func (s *DescribeVpcEndpointServiceConfigurationsInput) SetFilters(v []*Filter) *DescribeVpcEndpointServiceConfigurationsInput {
+ s.Filters = v
+ return s
+}
+
+// SetMaxResults sets the MaxResults field's value.
+func (s *DescribeVpcEndpointServiceConfigurationsInput) SetMaxResults(v int64) *DescribeVpcEndpointServiceConfigurationsInput {
+ s.MaxResults = &v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeVpcEndpointServiceConfigurationsInput) SetNextToken(v string) *DescribeVpcEndpointServiceConfigurationsInput {
+ s.NextToken = &v
+ return s
+}
+
+// SetServiceIds sets the ServiceIds field's value.
+func (s *DescribeVpcEndpointServiceConfigurationsInput) SetServiceIds(v []*string) *DescribeVpcEndpointServiceConfigurationsInput {
+ s.ServiceIds = v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServiceConfigurationsResult
+type DescribeVpcEndpointServiceConfigurationsOutput struct {
+ _ struct{} `type:"structure"`
+
+ // The token to use to retrieve the next page of results. This value is null
+ // when there are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ // Information about one or more services.
+ ServiceConfigurations []*ServiceConfiguration `locationName:"serviceConfigurationSet" locationNameList:"item" type:"list"`
+}
+
+// String returns the string representation
+func (s DescribeVpcEndpointServiceConfigurationsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVpcEndpointServiceConfigurationsOutput) GoString() string {
+ return s.String()
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeVpcEndpointServiceConfigurationsOutput) SetNextToken(v string) *DescribeVpcEndpointServiceConfigurationsOutput {
+ s.NextToken = &v
+ return s
+}
+
+// SetServiceConfigurations sets the ServiceConfigurations field's value.
+func (s *DescribeVpcEndpointServiceConfigurationsOutput) SetServiceConfigurations(v []*ServiceConfiguration) *DescribeVpcEndpointServiceConfigurationsOutput {
+ s.ServiceConfigurations = v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServicePermissionsRequest
+type DescribeVpcEndpointServicePermissionsInput struct {
+ _ struct{} `type:"structure"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // One or more filters.
+ //
+ // * principal - The ARN of the principal.
+ //
+ // * principal-type - The principal type (All | Service | OrganizationUnit
+ // | Account | User | Role).
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // The maximum number of results to return for the request in a single page.
+ // The remaining results of the initial request can be seen by sending another
+ // request with the returned NextToken value. This value can be between 5 and
+ // 1000; if MaxResults is given a value larger than 1000, only 1000 results
+ // are returned.
+ MaxResults *int64 `type:"integer"`
+
+ // The token to retrieve the next page of results.
+ NextToken *string `type:"string"`
+
+ // The ID of the service.
+ //
+ // ServiceId is a required field
+ ServiceId *string `type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s DescribeVpcEndpointServicePermissionsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVpcEndpointServicePermissionsInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DescribeVpcEndpointServicePermissionsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DescribeVpcEndpointServicePermissionsInput"}
+ if s.ServiceId == nil {
+ invalidParams.Add(request.NewErrParamRequired("ServiceId"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *DescribeVpcEndpointServicePermissionsInput) SetDryRun(v bool) *DescribeVpcEndpointServicePermissionsInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetFilters sets the Filters field's value.
+func (s *DescribeVpcEndpointServicePermissionsInput) SetFilters(v []*Filter) *DescribeVpcEndpointServicePermissionsInput {
+ s.Filters = v
+ return s
+}
+
+// SetMaxResults sets the MaxResults field's value.
+func (s *DescribeVpcEndpointServicePermissionsInput) SetMaxResults(v int64) *DescribeVpcEndpointServicePermissionsInput {
+ s.MaxResults = &v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeVpcEndpointServicePermissionsInput) SetNextToken(v string) *DescribeVpcEndpointServicePermissionsInput {
+ s.NextToken = &v
+ return s
+}
+
+// SetServiceId sets the ServiceId field's value.
+func (s *DescribeVpcEndpointServicePermissionsInput) SetServiceId(v string) *DescribeVpcEndpointServicePermissionsInput {
+ s.ServiceId = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServicePermissionsResult
+type DescribeVpcEndpointServicePermissionsOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Information about one or more allowed principals.
+ AllowedPrincipals []*AllowedPrincipal `locationName:"allowedPrincipals" locationNameList:"item" type:"list"`
+
+ // The token to use to retrieve the next page of results. This value is null
+ // when there are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+}
+
+// String returns the string representation
+func (s DescribeVpcEndpointServicePermissionsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVpcEndpointServicePermissionsOutput) GoString() string {
+ return s.String()
+}
+
+// SetAllowedPrincipals sets the AllowedPrincipals field's value.
+func (s *DescribeVpcEndpointServicePermissionsOutput) SetAllowedPrincipals(v []*AllowedPrincipal) *DescribeVpcEndpointServicePermissionsOutput {
+ s.AllowedPrincipals = v
+ return s
+}
+
+// SetNextToken sets the NextToken field's value.
+func (s *DescribeVpcEndpointServicePermissionsOutput) SetNextToken(v string) *DescribeVpcEndpointServicePermissionsOutput {
+ s.NextToken = &v
+ return s
+}
+
// Contains the parameters for DescribeVpcEndpointServices.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServicesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServicesRequest
type DescribeVpcEndpointServicesInput struct {
_ struct{} `type:"structure"`
@@ -36706,6 +41705,11 @@ type DescribeVpcEndpointServicesInput struct {
// it is UnauthorizedOperation.
DryRun *bool `type:"boolean"`
+ // One or more filters.
+ //
+ // * service-name: The name of the service.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
// The maximum number of items to return for this request. The request returns
// a token that you can specify in a subsequent call to get the next set of
// results.
@@ -36716,6 +41720,9 @@ type DescribeVpcEndpointServicesInput struct {
// The token for the next set of items to return. (You received this token from
// a prior call.)
NextToken *string `type:"string"`
+
+ // One or more service names.
+ ServiceNames []*string `locationName:"ServiceName" locationNameList:"item" type:"list"`
}
// String returns the string representation
@@ -36734,6 +41741,12 @@ func (s *DescribeVpcEndpointServicesInput) SetDryRun(v bool) *DescribeVpcEndpoin
return s
}
+// SetFilters sets the Filters field's value.
+func (s *DescribeVpcEndpointServicesInput) SetFilters(v []*Filter) *DescribeVpcEndpointServicesInput {
+ s.Filters = v
+ return s
+}
+
// SetMaxResults sets the MaxResults field's value.
func (s *DescribeVpcEndpointServicesInput) SetMaxResults(v int64) *DescribeVpcEndpointServicesInput {
s.MaxResults = &v
@@ -36746,8 +41759,14 @@ func (s *DescribeVpcEndpointServicesInput) SetNextToken(v string) *DescribeVpcEn
return s
}
+// SetServiceNames sets the ServiceNames field's value.
+func (s *DescribeVpcEndpointServicesInput) SetServiceNames(v []*string) *DescribeVpcEndpointServicesInput {
+ s.ServiceNames = v
+ return s
+}
+
// Contains the output of DescribeVpcEndpointServices.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServicesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointServicesResult
type DescribeVpcEndpointServicesOutput struct {
_ struct{} `type:"structure"`
@@ -36755,7 +41774,10 @@ type DescribeVpcEndpointServicesOutput struct {
// items to return, the string is empty.
NextToken *string `locationName:"nextToken" type:"string"`
- // A list of supported AWS services.
+ // Information about the service.
+ ServiceDetails []*ServiceDetail `locationName:"serviceDetailSet" locationNameList:"item" type:"list"`
+
+ // A list of supported services.
ServiceNames []*string `locationName:"serviceNameSet" locationNameList:"item" type:"list"`
}
@@ -36775,6 +41797,12 @@ func (s *DescribeVpcEndpointServicesOutput) SetNextToken(v string) *DescribeVpcE
return s
}
+// SetServiceDetails sets the ServiceDetails field's value.
+func (s *DescribeVpcEndpointServicesOutput) SetServiceDetails(v []*ServiceDetail) *DescribeVpcEndpointServicesOutput {
+ s.ServiceDetails = v
+ return s
+}
+
// SetServiceNames sets the ServiceNames field's value.
func (s *DescribeVpcEndpointServicesOutput) SetServiceNames(v []*string) *DescribeVpcEndpointServicesOutput {
s.ServiceNames = v
@@ -36782,7 +41810,7 @@ func (s *DescribeVpcEndpointServicesOutput) SetServiceNames(v []*string) *Descri
}
// Contains the parameters for DescribeVpcEndpoints.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointsRequest
type DescribeVpcEndpointsInput struct {
_ struct{} `type:"structure"`
@@ -36794,7 +41822,7 @@ type DescribeVpcEndpointsInput struct {
// One or more filters.
//
- // * service-name: The name of the AWS service.
+ // * service-name: The name of the service.
//
// * vpc-id: The ID of the VPC in which the endpoint resides.
//
@@ -36860,7 +41888,7 @@ func (s *DescribeVpcEndpointsInput) SetVpcEndpointIds(v []*string) *DescribeVpcE
}
// Contains the output of DescribeVpcEndpoints.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcEndpointsResult
type DescribeVpcEndpointsOutput struct {
_ struct{} `type:"structure"`
@@ -36895,7 +41923,7 @@ func (s *DescribeVpcEndpointsOutput) SetVpcEndpoints(v []*VpcEndpoint) *Describe
}
// Contains the parameters for DescribeVpcPeeringConnections.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnectionsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnectionsRequest
type DescribeVpcPeeringConnectionsInput struct {
_ struct{} `type:"structure"`
@@ -36907,12 +41935,12 @@ type DescribeVpcPeeringConnectionsInput struct {
// One or more filters.
//
- // * accepter-vpc-info.cidr-block - The IPv4 CIDR block of the peer VPC.
+ // * accepter-vpc-info.cidr-block - The IPv4 CIDR block of the accepter VPC.
//
// * accepter-vpc-info.owner-id - The AWS account ID of the owner of the
- // peer VPC.
+ // accepter VPC.
//
- // * accepter-vpc-info.vpc-id - The ID of the peer VPC.
+ // * accepter-vpc-info.vpc-id - The ID of the accepter VPC.
//
// * expiration-time - The expiration date and time for the VPC peering connection.
//
@@ -36925,7 +41953,7 @@ type DescribeVpcPeeringConnectionsInput struct {
// * requester-vpc-info.vpc-id - The ID of the requester VPC.
//
// * status-code - The status of the VPC peering connection (pending-acceptance
- // | failed | expired | provisioning | active | deleted | rejected).
+ // | failed | expired | provisioning | active | deleting | deleted | rejected).
//
// * status-message - A message that provides more information about the
// status of the VPC peering connection, if applicable.
@@ -36984,7 +42012,7 @@ func (s *DescribeVpcPeeringConnectionsInput) SetVpcPeeringConnectionIds(v []*str
}
// Contains the output of DescribeVpcPeeringConnections.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnectionsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcPeeringConnectionsResult
type DescribeVpcPeeringConnectionsOutput struct {
_ struct{} `type:"structure"`
@@ -37009,7 +42037,7 @@ func (s *DescribeVpcPeeringConnectionsOutput) SetVpcPeeringConnections(v []*VpcP
}
// Contains the parameters for DescribeVpcs.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcsRequest
type DescribeVpcsInput struct {
_ struct{} `type:"structure"`
@@ -37021,10 +42049,19 @@ type DescribeVpcsInput struct {
// One or more filters.
//
- // * cidr - The IPv4 CIDR block of the VPC. The CIDR block you specify must
- // exactly match the VPC's CIDR block for information to be returned for
- // the VPC. Must contain the slash followed by one or two digits (for example,
- // /28).
+ // * cidr - The primary IPv4 CIDR block of the VPC. The CIDR block you specify
+ // must exactly match the VPC's CIDR block for information to be returned
+ // for the VPC. Must contain the slash followed by one or two digits (for
+ // example, /28).
+ //
+ // * cidr-block-association.cidr-block - An IPv4 CIDR block associated with
+ // the VPC.
+ //
+ // * cidr-block-association.association-id - The association ID for an IPv4
+ // CIDR block associated with the VPC.
+ //
+ // * cidr-block-association.state - The state of an IPv4 CIDR block associated
+ // with the VPC.
//
// * dhcp-options-id - The ID of a set of DHCP options.
//
@@ -37095,7 +42132,7 @@ func (s *DescribeVpcsInput) SetVpcIds(v []*string) *DescribeVpcsInput {
}
// Contains the output of DescribeVpcs.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpcsResult
type DescribeVpcsOutput struct {
_ struct{} `type:"structure"`
@@ -37120,7 +42157,7 @@ func (s *DescribeVpcsOutput) SetVpcs(v []*Vpc) *DescribeVpcsOutput {
}
// Contains the parameters for DescribeVpnConnections.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnConnectionsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnConnectionsRequest
type DescribeVpnConnectionsInput struct {
_ struct{} `type:"structure"`
@@ -37211,7 +42248,7 @@ func (s *DescribeVpnConnectionsInput) SetVpnConnectionIds(v []*string) *Describe
}
// Contains the output of DescribeVpnConnections.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnConnectionsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnConnectionsResult
type DescribeVpnConnectionsOutput struct {
_ struct{} `type:"structure"`
@@ -37236,7 +42273,7 @@ func (s *DescribeVpnConnectionsOutput) SetVpnConnections(v []*VpnConnection) *De
}
// Contains the parameters for DescribeVpnGateways.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnGatewaysRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnGatewaysRequest
type DescribeVpnGatewaysInput struct {
_ struct{} `type:"structure"`
@@ -37248,6 +42285,9 @@ type DescribeVpnGatewaysInput struct {
// One or more filters.
//
+ // * amazon-side-asn - The Autonomous System Number (ASN) for the Amazon
+ // side of the gateway.
+ //
// * attachment.state - The current state of the attachment between the gateway
// and the VPC (attaching | attached | detaching | detached).
//
@@ -37316,7 +42356,7 @@ func (s *DescribeVpnGatewaysInput) SetVpnGatewayIds(v []*string) *DescribeVpnGat
}
// Contains the output of DescribeVpnGateways.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnGatewaysResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeVpnGatewaysResult
type DescribeVpnGatewaysOutput struct {
_ struct{} `type:"structure"`
@@ -37341,7 +42381,7 @@ func (s *DescribeVpnGatewaysOutput) SetVpnGateways(v []*VpnGateway) *DescribeVpn
}
// Contains the parameters for DetachClassicLinkVpc.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachClassicLinkVpcRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachClassicLinkVpcRequest
type DetachClassicLinkVpcInput struct {
_ struct{} `type:"structure"`
@@ -37407,7 +42447,7 @@ func (s *DetachClassicLinkVpcInput) SetVpcId(v string) *DetachClassicLinkVpcInpu
}
// Contains the output of DetachClassicLinkVpc.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachClassicLinkVpcResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachClassicLinkVpcResult
type DetachClassicLinkVpcOutput struct {
_ struct{} `type:"structure"`
@@ -37432,7 +42472,7 @@ func (s *DetachClassicLinkVpcOutput) SetReturn(v bool) *DetachClassicLinkVpcOutp
}
// Contains the parameters for DetachInternetGateway.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachInternetGatewayRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachInternetGatewayRequest
type DetachInternetGatewayInput struct {
_ struct{} `type:"structure"`
@@ -37497,7 +42537,7 @@ func (s *DetachInternetGatewayInput) SetVpcId(v string) *DetachInternetGatewayIn
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachInternetGatewayOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachInternetGatewayOutput
type DetachInternetGatewayOutput struct {
_ struct{} `type:"structure"`
}
@@ -37513,7 +42553,7 @@ func (s DetachInternetGatewayOutput) GoString() string {
}
// Contains the parameters for DetachNetworkInterface.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachNetworkInterfaceRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachNetworkInterfaceRequest
type DetachNetworkInterfaceInput struct {
_ struct{} `type:"structure"`
@@ -37573,7 +42613,7 @@ func (s *DetachNetworkInterfaceInput) SetForce(v bool) *DetachNetworkInterfaceIn
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachNetworkInterfaceOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachNetworkInterfaceOutput
type DetachNetworkInterfaceOutput struct {
_ struct{} `type:"structure"`
}
@@ -37589,7 +42629,7 @@ func (s DetachNetworkInterfaceOutput) GoString() string {
}
// Contains the parameters for DetachVolume.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVolumeRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVolumeRequest
type DetachVolumeInput struct {
_ struct{} `type:"structure"`
@@ -37674,7 +42714,7 @@ func (s *DetachVolumeInput) SetVolumeId(v string) *DetachVolumeInput {
}
// Contains the parameters for DetachVpnGateway.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVpnGatewayRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVpnGatewayRequest
type DetachVpnGatewayInput struct {
_ struct{} `type:"structure"`
@@ -37739,7 +42779,7 @@ func (s *DetachVpnGatewayInput) SetVpnGatewayId(v string) *DetachVpnGatewayInput
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVpnGatewayOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DetachVpnGatewayOutput
type DetachVpnGatewayOutput struct {
_ struct{} `type:"structure"`
}
@@ -37755,7 +42795,7 @@ func (s DetachVpnGatewayOutput) GoString() string {
}
// Describes a DHCP configuration option.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DhcpConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DhcpConfiguration
type DhcpConfiguration struct {
_ struct{} `type:"structure"`
@@ -37789,7 +42829,7 @@ func (s *DhcpConfiguration) SetValues(v []*AttributeValue) *DhcpConfiguration {
}
// Describes a set of DHCP options.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DhcpOptions
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DhcpOptions
type DhcpOptions struct {
_ struct{} `type:"structure"`
@@ -37832,7 +42872,7 @@ func (s *DhcpOptions) SetTags(v []*Tag) *DhcpOptions {
}
// Contains the parameters for DisableVgwRoutePropagation.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVgwRoutePropagationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVgwRoutePropagationRequest
type DisableVgwRoutePropagationInput struct {
_ struct{} `type:"structure"`
@@ -37885,7 +42925,7 @@ func (s *DisableVgwRoutePropagationInput) SetRouteTableId(v string) *DisableVgwR
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVgwRoutePropagationOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVgwRoutePropagationOutput
type DisableVgwRoutePropagationOutput struct {
_ struct{} `type:"structure"`
}
@@ -37901,7 +42941,7 @@ func (s DisableVgwRoutePropagationOutput) GoString() string {
}
// Contains the parameters for DisableVpcClassicLinkDnsSupport.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLinkDnsSupportRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLinkDnsSupportRequest
type DisableVpcClassicLinkDnsSupportInput struct {
_ struct{} `type:"structure"`
@@ -37926,7 +42966,7 @@ func (s *DisableVpcClassicLinkDnsSupportInput) SetVpcId(v string) *DisableVpcCla
}
// Contains the output of DisableVpcClassicLinkDnsSupport.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLinkDnsSupportResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLinkDnsSupportResult
type DisableVpcClassicLinkDnsSupportOutput struct {
_ struct{} `type:"structure"`
@@ -37951,7 +42991,7 @@ func (s *DisableVpcClassicLinkDnsSupportOutput) SetReturn(v bool) *DisableVpcCla
}
// Contains the parameters for DisableVpcClassicLink.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLinkRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLinkRequest
type DisableVpcClassicLinkInput struct {
_ struct{} `type:"structure"`
@@ -38003,7 +43043,7 @@ func (s *DisableVpcClassicLinkInput) SetVpcId(v string) *DisableVpcClassicLinkIn
}
// Contains the output of DisableVpcClassicLink.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLinkResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableVpcClassicLinkResult
type DisableVpcClassicLinkOutput struct {
_ struct{} `type:"structure"`
@@ -38028,7 +43068,7 @@ func (s *DisableVpcClassicLinkOutput) SetReturn(v bool) *DisableVpcClassicLinkOu
}
// Contains the parameters for DisassociateAddress.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateAddressRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateAddressRequest
type DisassociateAddressInput struct {
_ struct{} `type:"structure"`
@@ -38073,7 +43113,7 @@ func (s *DisassociateAddressInput) SetPublicIp(v string) *DisassociateAddressInp
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateAddressOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateAddressOutput
type DisassociateAddressOutput struct {
_ struct{} `type:"structure"`
}
@@ -38088,7 +43128,7 @@ func (s DisassociateAddressOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateIamInstanceProfileRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateIamInstanceProfileRequest
type DisassociateIamInstanceProfileInput struct {
_ struct{} `type:"structure"`
@@ -38127,7 +43167,7 @@ func (s *DisassociateIamInstanceProfileInput) SetAssociationId(v string) *Disass
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateIamInstanceProfileResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateIamInstanceProfileResult
type DisassociateIamInstanceProfileOutput struct {
_ struct{} `type:"structure"`
@@ -38152,7 +43192,7 @@ func (s *DisassociateIamInstanceProfileOutput) SetIamInstanceProfileAssociation(
}
// Contains the parameters for DisassociateRouteTable.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateRouteTableRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateRouteTableRequest
type DisassociateRouteTableInput struct {
_ struct{} `type:"structure"`
@@ -38204,7 +43244,7 @@ func (s *DisassociateRouteTableInput) SetDryRun(v bool) *DisassociateRouteTableI
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateRouteTableOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateRouteTableOutput
type DisassociateRouteTableOutput struct {
_ struct{} `type:"structure"`
}
@@ -38219,7 +43259,7 @@ func (s DisassociateRouteTableOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateSubnetCidrBlockRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateSubnetCidrBlockRequest
type DisassociateSubnetCidrBlockInput struct {
_ struct{} `type:"structure"`
@@ -38258,7 +43298,7 @@ func (s *DisassociateSubnetCidrBlockInput) SetAssociationId(v string) *Disassoci
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateSubnetCidrBlockResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateSubnetCidrBlockResult
type DisassociateSubnetCidrBlockOutput struct {
_ struct{} `type:"structure"`
@@ -38291,7 +43331,7 @@ func (s *DisassociateSubnetCidrBlockOutput) SetSubnetId(v string) *DisassociateS
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateVpcCidrBlockRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateVpcCidrBlockRequest
type DisassociateVpcCidrBlockInput struct {
_ struct{} `type:"structure"`
@@ -38330,10 +43370,13 @@ func (s *DisassociateVpcCidrBlockInput) SetAssociationId(v string) *Disassociate
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateVpcCidrBlockResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateVpcCidrBlockResult
type DisassociateVpcCidrBlockOutput struct {
_ struct{} `type:"structure"`
+ // Information about the IPv4 CIDR block association.
+ CidrBlockAssociation *VpcCidrBlockAssociation `locationName:"cidrBlockAssociation" type:"structure"`
+
// Information about the IPv6 CIDR block association.
Ipv6CidrBlockAssociation *VpcIpv6CidrBlockAssociation `locationName:"ipv6CidrBlockAssociation" type:"structure"`
@@ -38351,6 +43394,12 @@ func (s DisassociateVpcCidrBlockOutput) GoString() string {
return s.String()
}
+// SetCidrBlockAssociation sets the CidrBlockAssociation field's value.
+func (s *DisassociateVpcCidrBlockOutput) SetCidrBlockAssociation(v *VpcCidrBlockAssociation) *DisassociateVpcCidrBlockOutput {
+ s.CidrBlockAssociation = v
+ return s
+}
+
// SetIpv6CidrBlockAssociation sets the Ipv6CidrBlockAssociation field's value.
func (s *DisassociateVpcCidrBlockOutput) SetIpv6CidrBlockAssociation(v *VpcIpv6CidrBlockAssociation) *DisassociateVpcCidrBlockOutput {
s.Ipv6CidrBlockAssociation = v
@@ -38364,7 +43413,7 @@ func (s *DisassociateVpcCidrBlockOutput) SetVpcId(v string) *DisassociateVpcCidr
}
// Describes a disk image.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DiskImage
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DiskImage
type DiskImage struct {
_ struct{} `type:"structure"`
@@ -38427,7 +43476,7 @@ func (s *DiskImage) SetVolume(v *VolumeDetail) *DiskImage {
}
// Describes a disk image.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DiskImageDescription
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DiskImageDescription
type DiskImageDescription struct {
_ struct{} `type:"structure"`
@@ -38492,7 +43541,7 @@ func (s *DiskImageDescription) SetSize(v int64) *DiskImageDescription {
}
// Describes a disk image.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DiskImageDetail
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DiskImageDetail
type DiskImageDetail struct {
_ struct{} `type:"structure"`
@@ -38567,7 +43616,7 @@ func (s *DiskImageDetail) SetImportManifestUrl(v string) *DiskImageDetail {
}
// Describes a disk image volume.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DiskImageVolumeDescription
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DiskImageVolumeDescription
type DiskImageVolumeDescription struct {
_ struct{} `type:"structure"`
@@ -38602,16 +43651,52 @@ func (s *DiskImageVolumeDescription) SetSize(v int64) *DiskImageVolumeDescriptio
return s
}
+// Describes a DNS entry.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DnsEntry
+type DnsEntry struct {
+ _ struct{} `type:"structure"`
+
+ // The DNS name.
+ DnsName *string `locationName:"dnsName" type:"string"`
+
+ // The ID of the private hosted zone.
+ HostedZoneId *string `locationName:"hostedZoneId" type:"string"`
+}
+
+// String returns the string representation
+func (s DnsEntry) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DnsEntry) GoString() string {
+ return s.String()
+}
+
+// SetDnsName sets the DnsName field's value.
+func (s *DnsEntry) SetDnsName(v string) *DnsEntry {
+ s.DnsName = &v
+ return s
+}
+
+// SetHostedZoneId sets the HostedZoneId field's value.
+func (s *DnsEntry) SetHostedZoneId(v string) *DnsEntry {
+ s.HostedZoneId = &v
+ return s
+}
+
// Describes a block device for an EBS volume.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EbsBlockDevice
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EbsBlockDevice
type EbsBlockDevice struct {
_ struct{} `type:"structure"`
// Indicates whether the EBS volume is deleted on instance termination.
DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"`
- // Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes
- // may only be attached to instances that support Amazon EBS encryption.
+ // Indicates whether the EBS volume is encrypted. Encrypted volumes can only
+ // be attached to instances that support Amazon EBS encryption. If you are creating
+ // a volume from a snapshot, you can't specify an encryption value. This is
+ // because only blank volumes can be encrypted on creation.
Encrypted *bool `locationName:"encrypted" type:"boolean"`
// The number of I/O operations per second (IOPS) that the volume supports.
@@ -38629,6 +43714,14 @@ type EbsBlockDevice struct {
// it is not used in requests to create gp2, st1, sc1, or standard volumes.
Iops *int64 `locationName:"iops" type:"integer"`
+ // ID for a user-managed CMK under which the EBS volume is encrypted.
+ //
+ // Note: This parameter is only supported on BlockDeviceMapping objects called
+ // by RunInstances (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html),
+ // RequestSpotFleet (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotFleet.html),
+ // and RequestSpotInstances (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html).
+ KmsKeyId *string `type:"string"`
+
// The ID of the snapshot.
SnapshotId *string `locationName:"snapshotId" type:"string"`
@@ -38678,6 +43771,12 @@ func (s *EbsBlockDevice) SetIops(v int64) *EbsBlockDevice {
return s
}
+// SetKmsKeyId sets the KmsKeyId field's value.
+func (s *EbsBlockDevice) SetKmsKeyId(v string) *EbsBlockDevice {
+ s.KmsKeyId = &v
+ return s
+}
+
// SetSnapshotId sets the SnapshotId field's value.
func (s *EbsBlockDevice) SetSnapshotId(v string) *EbsBlockDevice {
s.SnapshotId = &v
@@ -38697,7 +43796,7 @@ func (s *EbsBlockDevice) SetVolumeType(v string) *EbsBlockDevice {
}
// Describes a parameter used to set up an EBS volume in a block device mapping.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EbsInstanceBlockDevice
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EbsInstanceBlockDevice
type EbsInstanceBlockDevice struct {
_ struct{} `type:"structure"`
@@ -38750,7 +43849,7 @@ func (s *EbsInstanceBlockDevice) SetVolumeId(v string) *EbsInstanceBlockDevice {
// Describes information used to set up an EBS volume specified in a block device
// mapping.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EbsInstanceBlockDeviceSpecification
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EbsInstanceBlockDeviceSpecification
type EbsInstanceBlockDeviceSpecification struct {
_ struct{} `type:"structure"`
@@ -38784,7 +43883,7 @@ func (s *EbsInstanceBlockDeviceSpecification) SetVolumeId(v string) *EbsInstance
}
// Describes an egress-only Internet gateway.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EgressOnlyInternetGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EgressOnlyInternetGateway
type EgressOnlyInternetGateway struct {
_ struct{} `type:"structure"`
@@ -38818,7 +43917,7 @@ func (s *EgressOnlyInternetGateway) SetEgressOnlyInternetGatewayId(v string) *Eg
}
// Describes the association between an instance and an Elastic GPU.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ElasticGpuAssociation
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ElasticGpuAssociation
type ElasticGpuAssociation struct {
_ struct{} `type:"structure"`
@@ -38870,7 +43969,7 @@ func (s *ElasticGpuAssociation) SetElasticGpuId(v string) *ElasticGpuAssociation
}
// Describes the status of an Elastic GPU.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ElasticGpuHealth
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ElasticGpuHealth
type ElasticGpuHealth struct {
_ struct{} `type:"structure"`
@@ -38895,7 +43994,7 @@ func (s *ElasticGpuHealth) SetStatus(v string) *ElasticGpuHealth {
}
// A specification for an Elastic GPU.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ElasticGpuSpecification
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ElasticGpuSpecification
type ElasticGpuSpecification struct {
_ struct{} `type:"structure"`
@@ -38934,8 +44033,33 @@ func (s *ElasticGpuSpecification) SetType(v string) *ElasticGpuSpecification {
return s
}
+// Describes an elastic GPU.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ElasticGpuSpecificationResponse
+type ElasticGpuSpecificationResponse struct {
+ _ struct{} `type:"structure"`
+
+ // The elastic GPU type.
+ Type *string `locationName:"type" type:"string"`
+}
+
+// String returns the string representation
+func (s ElasticGpuSpecificationResponse) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ElasticGpuSpecificationResponse) GoString() string {
+ return s.String()
+}
+
+// SetType sets the Type field's value.
+func (s *ElasticGpuSpecificationResponse) SetType(v string) *ElasticGpuSpecificationResponse {
+ s.Type = &v
+ return s
+}
+
// Describes an Elastic GPU.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ElasticGpus
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ElasticGpus
type ElasticGpus struct {
_ struct{} `type:"structure"`
@@ -39005,7 +44129,7 @@ func (s *ElasticGpus) SetInstanceId(v string) *ElasticGpus {
}
// Contains the parameters for EnableVgwRoutePropagation.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVgwRoutePropagationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVgwRoutePropagationRequest
type EnableVgwRoutePropagationInput struct {
_ struct{} `type:"structure"`
@@ -39058,7 +44182,7 @@ func (s *EnableVgwRoutePropagationInput) SetRouteTableId(v string) *EnableVgwRou
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVgwRoutePropagationOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVgwRoutePropagationOutput
type EnableVgwRoutePropagationOutput struct {
_ struct{} `type:"structure"`
}
@@ -39074,7 +44198,7 @@ func (s EnableVgwRoutePropagationOutput) GoString() string {
}
// Contains the parameters for EnableVolumeIO.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVolumeIORequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVolumeIORequest
type EnableVolumeIOInput struct {
_ struct{} `type:"structure"`
@@ -39125,7 +44249,7 @@ func (s *EnableVolumeIOInput) SetVolumeId(v string) *EnableVolumeIOInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVolumeIOOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVolumeIOOutput
type EnableVolumeIOOutput struct {
_ struct{} `type:"structure"`
}
@@ -39141,7 +44265,7 @@ func (s EnableVolumeIOOutput) GoString() string {
}
// Contains the parameters for EnableVpcClassicLinkDnsSupport.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLinkDnsSupportRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLinkDnsSupportRequest
type EnableVpcClassicLinkDnsSupportInput struct {
_ struct{} `type:"structure"`
@@ -39166,7 +44290,7 @@ func (s *EnableVpcClassicLinkDnsSupportInput) SetVpcId(v string) *EnableVpcClass
}
// Contains the output of EnableVpcClassicLinkDnsSupport.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLinkDnsSupportResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLinkDnsSupportResult
type EnableVpcClassicLinkDnsSupportOutput struct {
_ struct{} `type:"structure"`
@@ -39191,7 +44315,7 @@ func (s *EnableVpcClassicLinkDnsSupportOutput) SetReturn(v bool) *EnableVpcClass
}
// Contains the parameters for EnableVpcClassicLink.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLinkRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLinkRequest
type EnableVpcClassicLinkInput struct {
_ struct{} `type:"structure"`
@@ -39243,7 +44367,7 @@ func (s *EnableVpcClassicLinkInput) SetVpcId(v string) *EnableVpcClassicLinkInpu
}
// Contains the output of EnableVpcClassicLink.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLinkResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableVpcClassicLinkResult
type EnableVpcClassicLinkOutput struct {
_ struct{} `type:"structure"`
@@ -39267,8 +44391,8 @@ func (s *EnableVpcClassicLinkOutput) SetReturn(v bool) *EnableVpcClassicLinkOutp
return s
}
-// Describes a Spot fleet event.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EventInformation
+// Describes a Spot Fleet event.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EventInformation
type EventInformation struct {
_ struct{} `type:"structure"`
@@ -39277,9 +44401,9 @@ type EventInformation struct {
// The event.
//
- // The following are the error events.
+ // The following are the error events:
//
- // * iamFleetRoleInvalid - The Spot fleet did not have the required permissions
+ // * iamFleetRoleInvalid - The Spot Fleet did not have the required permissions
// either to launch or terminate an instance.
//
// * launchSpecTemporarilyBlacklisted - The configuration is not valid and
@@ -39290,43 +44414,52 @@ type EventInformation struct {
// For more information, see the description of the event.
//
// * spotInstanceCountLimitExceeded - You've reached the limit on the number
- // of Spot instances that you can launch.
+ // of Spot Instances that you can launch.
//
- // The following are the fleetRequestChange events.
+ // The following are the fleetRequestChange events:
//
- // * active - The Spot fleet has been validated and Amazon EC2 is attempting
- // to maintain the target number of running Spot instances.
+ // * active - The Spot Fleet has been validated and Amazon EC2 is attempting
+ // to maintain the target number of running Spot Instances.
//
- // * cancelled - The Spot fleet is canceled and has no running Spot instances.
- // The Spot fleet will be deleted two days after its instances were terminated.
+ // * cancelled - The Spot Fleet is canceled and has no running Spot Instances.
+ // The Spot Fleet will be deleted two days after its instances were terminated.
//
- // * cancelled_running - The Spot fleet is canceled and will not launch additional
- // Spot instances, but its existing Spot instances continue to run until
+ // * cancelled_running - The Spot Fleet is canceled and will not launch additional
+ // Spot Instances, but its existing Spot Instances continue to run until
// they are interrupted or terminated.
//
- // * cancelled_terminating - The Spot fleet is canceled and its Spot instances
+ // * cancelled_terminating - The Spot Fleet is canceled and its Spot Instances
// are terminating.
//
- // * expired - The Spot fleet request has expired. A subsequent event indicates
+ // * expired - The Spot Fleet request has expired. A subsequent event indicates
// that the instances were terminated, if the request was created with TerminateInstancesWithExpiration
// set.
//
- // * modify_in_progress - A request to modify the Spot fleet request was
+ // * modify_in_progress - A request to modify the Spot Fleet request was
// accepted and is in progress.
//
- // * modify_successful - The Spot fleet request was modified.
+ // * modify_successful - The Spot Fleet request was modified.
//
- // * price_update - The bid price for a launch configuration was adjusted
- // because it was too high. This change is permanent.
+ // * price_update - The price for a launch configuration was adjusted because
+ // it was too high. This change is permanent.
//
- // * submitted - The Spot fleet request is being evaluated and Amazon EC2
- // is preparing to launch the target number of Spot instances.
+ // * submitted - The Spot Fleet request is being evaluated and Amazon EC2
+ // is preparing to launch the target number of Spot Instances.
//
- // The following are the instanceChange events.
+ // The following are the instanceChange events:
//
- // * launched - A bid was fulfilled and a new instance was launched.
+ // * launched - A request was fulfilled and a new instance was launched.
//
// * terminated - An instance was terminated by the user.
+ //
+ // The following are the Information events:
+ //
+ // * launchSpecUnusable - The price in a launch specification is not valid
+ // because it is below the Spot price or the Spot price is above the On-Demand
+ // price.
+ //
+ // * fleetProgressHalted - The price in every launch specification is not
+ // valid. A launch specification might become valid if the Spot price changes.
EventSubType *string `locationName:"eventSubType" type:"string"`
// The ID of the instance. This information is available only for instanceChange
@@ -39363,7 +44496,7 @@ func (s *EventInformation) SetInstanceId(v string) *EventInformation {
}
// Describes an instance export task.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ExportTask
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ExportTask
type ExportTask struct {
_ struct{} `type:"structure"`
@@ -39433,7 +44566,7 @@ func (s *ExportTask) SetStatusMessage(v string) *ExportTask {
}
// Describes the format and location for an instance export task.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ExportToS3Task
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ExportToS3Task
type ExportToS3Task struct {
_ struct{} `type:"structure"`
@@ -39487,7 +44620,7 @@ func (s *ExportToS3Task) SetS3Key(v string) *ExportToS3Task {
}
// Describes an instance export task.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ExportToS3TaskSpecification
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ExportToS3TaskSpecification
type ExportToS3TaskSpecification struct {
_ struct{} `type:"structure"`
@@ -39544,7 +44677,7 @@ func (s *ExportToS3TaskSpecification) SetS3Prefix(v string) *ExportToS3TaskSpeci
// A filter name and value pair that is used to return a more specific list
// of results. Filters can be used to match a set of resources by various criteria,
// such as tags, attributes, or IDs.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Filter
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Filter
type Filter struct {
_ struct{} `type:"structure"`
@@ -39577,8 +44710,67 @@ func (s *Filter) SetValues(v []*string) *Filter {
return s
}
+// Describes a launch template.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/FleetLaunchTemplateSpecification
+type FleetLaunchTemplateSpecification struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the launch template. You must specify either a template ID or a
+ // template name.
+ LaunchTemplateId *string `locationName:"launchTemplateId" type:"string"`
+
+ // The name of the launch template. You must specify either a template name
+ // or a template ID.
+ LaunchTemplateName *string `locationName:"launchTemplateName" min:"3" type:"string"`
+
+ // The version number. By default, the default version of the launch template
+ // is used.
+ Version *string `locationName:"version" type:"string"`
+}
+
+// String returns the string representation
+func (s FleetLaunchTemplateSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s FleetLaunchTemplateSpecification) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *FleetLaunchTemplateSpecification) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "FleetLaunchTemplateSpecification"}
+ if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 {
+ invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetLaunchTemplateId sets the LaunchTemplateId field's value.
+func (s *FleetLaunchTemplateSpecification) SetLaunchTemplateId(v string) *FleetLaunchTemplateSpecification {
+ s.LaunchTemplateId = &v
+ return s
+}
+
+// SetLaunchTemplateName sets the LaunchTemplateName field's value.
+func (s *FleetLaunchTemplateSpecification) SetLaunchTemplateName(v string) *FleetLaunchTemplateSpecification {
+ s.LaunchTemplateName = &v
+ return s
+}
+
+// SetVersion sets the Version field's value.
+func (s *FleetLaunchTemplateSpecification) SetVersion(v string) *FleetLaunchTemplateSpecification {
+ s.Version = &v
+ return s
+}
+
// Describes a flow log.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/FlowLog
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/FlowLog
type FlowLog struct {
_ struct{} `type:"structure"`
@@ -39680,7 +44872,7 @@ func (s *FlowLog) SetTrafficType(v string) *FlowLog {
}
// Describes an Amazon FPGA image (AFI).
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/FpgaImage
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/FpgaImage
type FpgaImage struct {
_ struct{} `type:"structure"`
@@ -39711,6 +44903,9 @@ type FpgaImage struct {
// The product codes for the AFI.
ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"`
+ // Indicates whether the AFI is public.
+ Public *bool `locationName:"public" type:"boolean"`
+
// The version of the AWS Shell that was used to create the bitstream.
ShellVersion *string `locationName:"shellVersion" type:"string"`
@@ -39788,6 +44983,12 @@ func (s *FpgaImage) SetProductCodes(v []*ProductCode) *FpgaImage {
return s
}
+// SetPublic sets the Public field's value.
+func (s *FpgaImage) SetPublic(v bool) *FpgaImage {
+ s.Public = &v
+ return s
+}
+
// SetShellVersion sets the ShellVersion field's value.
func (s *FpgaImage) SetShellVersion(v string) *FpgaImage {
s.ShellVersion = &v
@@ -39812,9 +45013,70 @@ func (s *FpgaImage) SetUpdateTime(v time.Time) *FpgaImage {
return s
}
+// Describes an Amazon FPGA image (AFI) attribute.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/FpgaImageAttribute
+type FpgaImageAttribute struct {
+ _ struct{} `type:"structure"`
+
+ // The description of the AFI.
+ Description *string `locationName:"description" type:"string"`
+
+ // The ID of the AFI.
+ FpgaImageId *string `locationName:"fpgaImageId" type:"string"`
+
+ // One or more load permissions.
+ LoadPermissions []*LoadPermission `locationName:"loadPermissions" locationNameList:"item" type:"list"`
+
+ // The name of the AFI.
+ Name *string `locationName:"name" type:"string"`
+
+ // One or more product codes.
+ ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"`
+}
+
+// String returns the string representation
+func (s FpgaImageAttribute) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s FpgaImageAttribute) GoString() string {
+ return s.String()
+}
+
+// SetDescription sets the Description field's value.
+func (s *FpgaImageAttribute) SetDescription(v string) *FpgaImageAttribute {
+ s.Description = &v
+ return s
+}
+
+// SetFpgaImageId sets the FpgaImageId field's value.
+func (s *FpgaImageAttribute) SetFpgaImageId(v string) *FpgaImageAttribute {
+ s.FpgaImageId = &v
+ return s
+}
+
+// SetLoadPermissions sets the LoadPermissions field's value.
+func (s *FpgaImageAttribute) SetLoadPermissions(v []*LoadPermission) *FpgaImageAttribute {
+ s.LoadPermissions = v
+ return s
+}
+
+// SetName sets the Name field's value.
+func (s *FpgaImageAttribute) SetName(v string) *FpgaImageAttribute {
+ s.Name = &v
+ return s
+}
+
+// SetProductCodes sets the ProductCodes field's value.
+func (s *FpgaImageAttribute) SetProductCodes(v []*ProductCode) *FpgaImageAttribute {
+ s.ProductCodes = v
+ return s
+}
+
// Describes the state of the bitstream generation process for an Amazon FPGA
// image (AFI).
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/FpgaImageState
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/FpgaImageState
type FpgaImageState struct {
_ struct{} `type:"structure"`
@@ -39856,7 +45118,7 @@ func (s *FpgaImageState) SetMessage(v string) *FpgaImageState {
}
// Contains the parameters for GetConsoleOutput.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleOutputRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleOutputRequest
type GetConsoleOutputInput struct {
_ struct{} `type:"structure"`
@@ -39908,7 +45170,7 @@ func (s *GetConsoleOutputInput) SetInstanceId(v string) *GetConsoleOutputInput {
}
// Contains the output of GetConsoleOutput.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleOutputResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleOutputResult
type GetConsoleOutputOutput struct {
_ struct{} `type:"structure"`
@@ -39952,7 +45214,7 @@ func (s *GetConsoleOutputOutput) SetTimestamp(v time.Time) *GetConsoleOutputOutp
}
// Contains the parameters for the request.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleScreenshotRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleScreenshotRequest
type GetConsoleScreenshotInput struct {
_ struct{} `type:"structure"`
@@ -40014,7 +45276,7 @@ func (s *GetConsoleScreenshotInput) SetWakeUp(v bool) *GetConsoleScreenshotInput
}
// Contains the output of the request.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleScreenshotResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetConsoleScreenshotResult
type GetConsoleScreenshotOutput struct {
_ struct{} `type:"structure"`
@@ -40047,7 +45309,7 @@ func (s *GetConsoleScreenshotOutput) SetInstanceId(v string) *GetConsoleScreensh
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetHostReservationPurchasePreviewRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetHostReservationPurchasePreviewRequest
type GetHostReservationPurchasePreviewInput struct {
_ struct{} `type:"structure"`
@@ -40101,7 +45363,7 @@ func (s *GetHostReservationPurchasePreviewInput) SetOfferingId(v string) *GetHos
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetHostReservationPurchasePreviewResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetHostReservationPurchasePreviewResult
type GetHostReservationPurchasePreviewOutput struct {
_ struct{} `type:"structure"`
@@ -40111,7 +45373,7 @@ type GetHostReservationPurchasePreviewOutput struct {
// The purchase information of the Dedicated Host Reservation and the Dedicated
// Hosts associated with it.
- Purchase []*Purchase `locationName:"purchase" type:"list"`
+ Purchase []*Purchase `locationName:"purchase" locationNameList:"item" type:"list"`
// The potential total hourly price of the reservation per hour.
TotalHourlyPrice *string `locationName:"totalHourlyPrice" type:"string"`
@@ -40154,8 +45416,83 @@ func (s *GetHostReservationPurchasePreviewOutput) SetTotalUpfrontPrice(v string)
return s
}
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetLaunchTemplateDataRequest
+type GetLaunchTemplateDataInput struct {
+ _ struct{} `type:"structure"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The ID of the instance.
+ //
+ // InstanceId is a required field
+ InstanceId *string `type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s GetLaunchTemplateDataInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetLaunchTemplateDataInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *GetLaunchTemplateDataInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "GetLaunchTemplateDataInput"}
+ if s.InstanceId == nil {
+ invalidParams.Add(request.NewErrParamRequired("InstanceId"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *GetLaunchTemplateDataInput) SetDryRun(v bool) *GetLaunchTemplateDataInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetInstanceId sets the InstanceId field's value.
+func (s *GetLaunchTemplateDataInput) SetInstanceId(v string) *GetLaunchTemplateDataInput {
+ s.InstanceId = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetLaunchTemplateDataResult
+type GetLaunchTemplateDataOutput struct {
+ _ struct{} `type:"structure"`
+
+ // The instance data.
+ LaunchTemplateData *ResponseLaunchTemplateData `locationName:"launchTemplateData" type:"structure"`
+}
+
+// String returns the string representation
+func (s GetLaunchTemplateDataOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetLaunchTemplateDataOutput) GoString() string {
+ return s.String()
+}
+
+// SetLaunchTemplateData sets the LaunchTemplateData field's value.
+func (s *GetLaunchTemplateDataOutput) SetLaunchTemplateData(v *ResponseLaunchTemplateData) *GetLaunchTemplateDataOutput {
+ s.LaunchTemplateData = v
+ return s
+}
+
// Contains the parameters for GetPasswordData.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetPasswordDataRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetPasswordDataRequest
type GetPasswordDataInput struct {
_ struct{} `type:"structure"`
@@ -40207,14 +45544,15 @@ func (s *GetPasswordDataInput) SetInstanceId(v string) *GetPasswordDataInput {
}
// Contains the output of GetPasswordData.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetPasswordDataResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetPasswordDataResult
type GetPasswordDataOutput struct {
_ struct{} `type:"structure"`
// The ID of the Windows instance.
InstanceId *string `locationName:"instanceId" type:"string"`
- // The password of the instance.
+ // The password of the instance. Returns an empty string if the password is
+ // not available.
PasswordData *string `locationName:"passwordData" type:"string"`
// The time the data was last updated.
@@ -40250,7 +45588,7 @@ func (s *GetPasswordDataOutput) SetTimestamp(v time.Time) *GetPasswordDataOutput
}
// Contains the parameters for GetReservedInstanceExchangeQuote.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetReservedInstancesExchangeQuoteRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetReservedInstancesExchangeQuoteRequest
type GetReservedInstancesExchangeQuoteInput struct {
_ struct{} `type:"structure"`
@@ -40265,7 +45603,7 @@ type GetReservedInstancesExchangeQuoteInput struct {
// ReservedInstanceIds is a required field
ReservedInstanceIds []*string `locationName:"ReservedInstanceId" locationNameList:"ReservedInstanceId" type:"list" required:"true"`
- // The configuration requirements of the Convertible Reserved Instances to exchange
+ // The configuration of the target Convertible Reserved Instance to exchange
// for your current Convertible Reserved Instances.
TargetConfigurations []*TargetConfigurationRequest `locationName:"TargetConfiguration" locationNameList:"TargetConfigurationRequest" type:"list"`
}
@@ -40322,7 +45660,7 @@ func (s *GetReservedInstancesExchangeQuoteInput) SetTargetConfigurations(v []*Ta
}
// Contains the output of GetReservedInstancesExchangeQuote.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetReservedInstancesExchangeQuoteResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetReservedInstancesExchangeQuoteResult
type GetReservedInstancesExchangeQuoteOutput struct {
_ struct{} `type:"structure"`
@@ -40419,7 +45757,7 @@ func (s *GetReservedInstancesExchangeQuoteOutput) SetValidationFailureReason(v s
}
// Describes a security group.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GroupIdentifier
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GroupIdentifier
type GroupIdentifier struct {
_ struct{} `type:"structure"`
@@ -40452,8 +45790,8 @@ func (s *GroupIdentifier) SetGroupName(v string) *GroupIdentifier {
return s
}
-// Describes an event in the history of the Spot fleet request.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/HistoryRecord
+// Describes an event in the history of the Spot Fleet request.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/HistoryRecord
type HistoryRecord struct {
_ struct{} `type:"structure"`
@@ -40464,12 +45802,14 @@ type HistoryRecord struct {
// The event type.
//
- // * error - Indicates an error with the Spot fleet request.
+ // * error - An error with the Spot Fleet request.
//
- // * fleetRequestChange - Indicates a change in the status or configuration
- // of the Spot fleet request.
+ // * fleetRequestChange - A change in the status or configuration of the
+ // Spot Fleet request.
//
- // * instanceChange - Indicates that an instance was launched or terminated.
+ // * instanceChange - An instance was launched or terminated.
+ //
+ // * Information - An informational event.
//
// EventType is a required field
EventType *string `locationName:"eventType" type:"string" required:"true" enum:"EventType"`
@@ -40509,7 +45849,7 @@ func (s *HistoryRecord) SetTimestamp(v time.Time) *HistoryRecord {
}
// Describes the properties of the Dedicated Host.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Host
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Host
type Host struct {
_ struct{} `type:"structure"`
@@ -40609,7 +45949,7 @@ func (s *Host) SetState(v string) *Host {
}
// Describes an instance running on a Dedicated Host.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/HostInstance
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/HostInstance
type HostInstance struct {
_ struct{} `type:"structure"`
@@ -40643,7 +45983,7 @@ func (s *HostInstance) SetInstanceType(v string) *HostInstance {
}
// Details about the Dedicated Host Reservation offering.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/HostOffering
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/HostOffering
type HostOffering struct {
_ struct{} `type:"structure"`
@@ -40722,7 +46062,7 @@ func (s *HostOffering) SetUpfrontPrice(v string) *HostOffering {
}
// Describes properties of a Dedicated Host.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/HostProperties
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/HostProperties
type HostProperties struct {
_ struct{} `type:"structure"`
@@ -40774,7 +46114,7 @@ func (s *HostProperties) SetTotalVCpus(v int64) *HostProperties {
}
// Details about the Dedicated Host Reservation and associated Dedicated Hosts.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/HostReservation
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/HostReservation
type HostReservation struct {
_ struct{} `type:"structure"`
@@ -40912,7 +46252,7 @@ func (s *HostReservation) SetUpfrontPrice(v string) *HostReservation {
}
// Describes an IAM instance profile.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/IamInstanceProfile
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/IamInstanceProfile
type IamInstanceProfile struct {
_ struct{} `type:"structure"`
@@ -40946,7 +46286,7 @@ func (s *IamInstanceProfile) SetId(v string) *IamInstanceProfile {
}
// Describes an association between an IAM instance profile and an instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/IamInstanceProfileAssociation
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/IamInstanceProfileAssociation
type IamInstanceProfileAssociation struct {
_ struct{} `type:"structure"`
@@ -41007,7 +46347,7 @@ func (s *IamInstanceProfileAssociation) SetTimestamp(v time.Time) *IamInstancePr
}
// Describes an IAM instance profile.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/IamInstanceProfileSpecification
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/IamInstanceProfileSpecification
type IamInstanceProfileSpecification struct {
_ struct{} `type:"structure"`
@@ -41041,7 +46381,7 @@ func (s *IamInstanceProfileSpecification) SetName(v string) *IamInstanceProfileS
}
// Describes the ICMP type and code.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/IcmpTypeCode
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/IcmpTypeCode
type IcmpTypeCode struct {
_ struct{} `type:"structure"`
@@ -41075,7 +46415,7 @@ func (s *IcmpTypeCode) SetType(v int64) *IcmpTypeCode {
}
// Describes the ID format for a resource.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/IdFormat
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/IdFormat
type IdFormat struct {
_ struct{} `type:"structure"`
@@ -41120,7 +46460,7 @@ func (s *IdFormat) SetUseLongIds(v bool) *IdFormat {
}
// Describes an image.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Image
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Image
type Image struct {
_ struct{} `type:"structure"`
@@ -41180,7 +46520,7 @@ type Image struct {
// images.
RamdiskId *string `locationName:"ramdiskId" type:"string"`
- // The device name of the root device (for example, /dev/sda1 or /dev/xvda).
+ // The device name of the root device volume (for example, /dev/sda1).
RootDeviceName *string `locationName:"rootDeviceName" type:"string"`
// The type of root device used by the AMI. The AMI can use an EBS volume or
@@ -41360,7 +46700,7 @@ func (s *Image) SetVirtualizationType(v string) *Image {
}
// Describes the disk container object for an import image task.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImageDiskContainer
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImageDiskContainer
type ImageDiskContainer struct {
_ struct{} `type:"structure"`
@@ -41433,7 +46773,7 @@ func (s *ImageDiskContainer) SetUserBucket(v *UserBucket) *ImageDiskContainer {
}
// Contains the parameters for ImportImage.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportImageRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportImageRequest
type ImportImageInput struct {
_ struct{} `type:"structure"`
@@ -41555,7 +46895,7 @@ func (s *ImportImageInput) SetRoleName(v string) *ImportImageInput {
}
// Contains the output for ImportImage.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportImageResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportImageResult
type ImportImageOutput struct {
_ struct{} `type:"structure"`
@@ -41670,7 +47010,7 @@ func (s *ImportImageOutput) SetStatusMessage(v string) *ImportImageOutput {
}
// Describes an import image task.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportImageTask
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportImageTask
type ImportImageTask struct {
_ struct{} `type:"structure"`
@@ -41789,7 +47129,7 @@ func (s *ImportImageTask) SetStatusMessage(v string) *ImportImageTask {
}
// Contains the parameters for ImportInstance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportInstanceRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportInstanceRequest
type ImportInstanceInput struct {
_ struct{} `type:"structure"`
@@ -41878,7 +47218,7 @@ func (s *ImportInstanceInput) SetPlatform(v string) *ImportInstanceInput {
}
// Describes the launch specification for VM import.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportInstanceLaunchSpecification
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportInstanceLaunchSpecification
type ImportInstanceLaunchSpecification struct {
_ struct{} `type:"structure"`
@@ -41998,7 +47338,7 @@ func (s *ImportInstanceLaunchSpecification) SetUserData(v *UserData) *ImportInst
}
// Contains the output for ImportInstance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportInstanceResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportInstanceResult
type ImportInstanceOutput struct {
_ struct{} `type:"structure"`
@@ -42023,7 +47363,7 @@ func (s *ImportInstanceOutput) SetConversionTask(v *ConversionTask) *ImportInsta
}
// Describes an import instance task.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportInstanceTaskDetails
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportInstanceTaskDetails
type ImportInstanceTaskDetails struct {
_ struct{} `type:"structure"`
@@ -42077,7 +47417,7 @@ func (s *ImportInstanceTaskDetails) SetVolumes(v []*ImportInstanceVolumeDetailIt
}
// Describes an import volume task.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportInstanceVolumeDetailItem
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportInstanceVolumeDetailItem
type ImportInstanceVolumeDetailItem struct {
_ struct{} `type:"structure"`
@@ -42166,7 +47506,7 @@ func (s *ImportInstanceVolumeDetailItem) SetVolume(v *DiskImageVolumeDescription
}
// Contains the parameters for ImportKeyPair.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportKeyPairRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportKeyPairRequest
type ImportKeyPairInput struct {
_ struct{} `type:"structure"`
@@ -42235,7 +47575,7 @@ func (s *ImportKeyPairInput) SetPublicKeyMaterial(v []byte) *ImportKeyPairInput
}
// Contains the output of ImportKeyPair.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportKeyPairResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportKeyPairResult
type ImportKeyPairOutput struct {
_ struct{} `type:"structure"`
@@ -42269,7 +47609,7 @@ func (s *ImportKeyPairOutput) SetKeyName(v string) *ImportKeyPairOutput {
}
// Contains the parameters for ImportSnapshot.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportSnapshotRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportSnapshotRequest
type ImportSnapshotInput struct {
_ struct{} `type:"structure"`
@@ -42342,7 +47682,7 @@ func (s *ImportSnapshotInput) SetRoleName(v string) *ImportSnapshotInput {
}
// Contains the output for ImportSnapshot.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportSnapshotResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportSnapshotResult
type ImportSnapshotOutput struct {
_ struct{} `type:"structure"`
@@ -42385,7 +47725,7 @@ func (s *ImportSnapshotOutput) SetSnapshotTaskDetail(v *SnapshotTaskDetail) *Imp
}
// Describes an import snapshot task.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportSnapshotTask
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportSnapshotTask
type ImportSnapshotTask struct {
_ struct{} `type:"structure"`
@@ -42428,7 +47768,7 @@ func (s *ImportSnapshotTask) SetSnapshotTaskDetail(v *SnapshotTaskDetail) *Impor
}
// Contains the parameters for ImportVolume.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportVolumeRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportVolumeRequest
type ImportVolumeInput struct {
_ struct{} `type:"structure"`
@@ -42527,7 +47867,7 @@ func (s *ImportVolumeInput) SetVolume(v *VolumeDetail) *ImportVolumeInput {
}
// Contains the output for ImportVolume.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportVolumeResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportVolumeResult
type ImportVolumeOutput struct {
_ struct{} `type:"structure"`
@@ -42552,7 +47892,7 @@ func (s *ImportVolumeOutput) SetConversionTask(v *ConversionTask) *ImportVolumeO
}
// Describes an import volume task.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportVolumeTaskDetails
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportVolumeTaskDetails
type ImportVolumeTaskDetails struct {
_ struct{} `type:"structure"`
@@ -42621,7 +47961,7 @@ func (s *ImportVolumeTaskDetails) SetVolume(v *DiskImageVolumeDescription) *Impo
}
// Describes an instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Instance
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Instance
type Instance struct {
_ struct{} `type:"structure"`
@@ -42638,7 +47978,7 @@ type Instance struct {
// The idempotency token you provided when you launched the instance, if applicable.
ClientToken *string `locationName:"clientToken" type:"string"`
- // Indicates whether the instance is optimized for EBS I/O. This optimization
+ // Indicates whether the instance is optimized for Amazon EBS I/O. This optimization
// provides dedicated throughput to Amazon EBS and an optimized configuration
// stack to provide optimal I/O performance. This optimization isn't available
// with all instance types. Additional usage charges apply when using an EBS
@@ -42663,7 +48003,7 @@ type Instance struct {
// The ID of the instance.
InstanceId *string `locationName:"instanceId" type:"string"`
- // Indicates whether this is a Spot instance or a Scheduled Instance.
+ // Indicates whether this is a Spot Instance or a Scheduled Instance.
InstanceLifecycle *string `locationName:"instanceLifecycle" type:"string" enum:"InstanceLifecycleType"`
// The instance type.
@@ -42695,7 +48035,7 @@ type Instance struct {
// DNS hostname can only be used inside the Amazon EC2 network. This name is
// not available until the instance enters the running state.
//
- // [EC2-VPC] The Amazon-provided DNS server will resolve Amazon-provided private
+ // [EC2-VPC] The Amazon-provided DNS server resolves Amazon-provided private
// DNS hostnames if you've enabled DNS resolution and DNS hostnames in your
// VPC. If you are not using the Amazon-provided DNS server in your VPC, your
// custom domain name servers must resolve the hostname as appropriate.
@@ -42718,7 +48058,7 @@ type Instance struct {
// The RAM disk associated with this instance, if applicable.
RamdiskId *string `locationName:"ramdiskId" type:"string"`
- // The root device name (for example, /dev/sda1 or /dev/xvda).
+ // The device name of the root device volume (for example, /dev/sda1).
RootDeviceName *string `locationName:"rootDeviceName" type:"string"`
// The root device type used by the AMI. The AMI can use an EBS volume or an
@@ -42730,13 +48070,13 @@ type Instance struct {
// Specifies whether to enable an instance launched in a VPC to perform NAT.
// This controls whether source/destination checking is enabled on the instance.
- // A value of true means checking is enabled, and false means checking is disabled.
- // The value must be false for the instance to perform NAT. For more information,
- // see NAT Instances (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html)
+ // A value of true means that checking is enabled, and false means that checking
+ // is disabled. The value must be false for the instance to perform NAT. For
+ // more information, see NAT Instances (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html)
// in the Amazon Virtual Private Cloud User Guide.
SourceDestCheck *bool `locationName:"sourceDestCheck" type:"boolean"`
- // If the request is a Spot instance request, the ID of the request.
+ // If the request is a Spot Instance request, the ID of the request.
SpotInstanceRequestId *string `locationName:"spotInstanceRequestId" type:"string"`
// Specifies whether enhanced networking with the Intel 82599 Virtual Function
@@ -43010,11 +48350,11 @@ func (s *Instance) SetVpcId(v string) *Instance {
}
// Describes a block device mapping.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceBlockDeviceMapping
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceBlockDeviceMapping
type InstanceBlockDeviceMapping struct {
_ struct{} `type:"structure"`
- // The device name exposed to the instance (for example, /dev/sdh or xvdh).
+ // The device name (for example, /dev/sdh or xvdh).
DeviceName *string `locationName:"deviceName" type:"string"`
// Parameters used to automatically set up EBS volumes when the instance is
@@ -43045,11 +48385,11 @@ func (s *InstanceBlockDeviceMapping) SetEbs(v *EbsInstanceBlockDevice) *Instance
}
// Describes a block device mapping entry.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceBlockDeviceMappingSpecification
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceBlockDeviceMappingSpecification
type InstanceBlockDeviceMappingSpecification struct {
_ struct{} `type:"structure"`
- // The device name exposed to the instance (for example, /dev/sdh or xvdh).
+ // The device name (for example, /dev/sdh or xvdh).
DeviceName *string `locationName:"deviceName" type:"string"`
// Parameters used to automatically set up EBS volumes when the instance is
@@ -43098,7 +48438,7 @@ func (s *InstanceBlockDeviceMappingSpecification) SetVirtualName(v string) *Inst
}
// Information about the instance type that the Dedicated Host supports.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceCapacity
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceCapacity
type InstanceCapacity struct {
_ struct{} `type:"structure"`
@@ -43141,7 +48481,7 @@ func (s *InstanceCapacity) SetTotalCapacity(v int64) *InstanceCapacity {
}
// Describes a Reserved Instance listing state.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceCount
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceCount
type InstanceCount struct {
_ struct{} `type:"structure"`
@@ -43174,8 +48514,78 @@ func (s *InstanceCount) SetState(v string) *InstanceCount {
return s
}
+// Describes the credit option for CPU usage of a T2 instance.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceCreditSpecification
+type InstanceCreditSpecification struct {
+ _ struct{} `type:"structure"`
+
+ // The credit option for CPU usage of the instance. Valid values are standard
+ // and unlimited.
+ CpuCredits *string `locationName:"cpuCredits" type:"string"`
+
+ // The ID of the instance.
+ InstanceId *string `locationName:"instanceId" type:"string"`
+}
+
+// String returns the string representation
+func (s InstanceCreditSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InstanceCreditSpecification) GoString() string {
+ return s.String()
+}
+
+// SetCpuCredits sets the CpuCredits field's value.
+func (s *InstanceCreditSpecification) SetCpuCredits(v string) *InstanceCreditSpecification {
+ s.CpuCredits = &v
+ return s
+}
+
+// SetInstanceId sets the InstanceId field's value.
+func (s *InstanceCreditSpecification) SetInstanceId(v string) *InstanceCreditSpecification {
+ s.InstanceId = &v
+ return s
+}
+
+// Describes the credit option for CPU usage of a T2 instance.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceCreditSpecificationRequest
+type InstanceCreditSpecificationRequest struct {
+ _ struct{} `type:"structure"`
+
+ // The credit option for CPU usage of the instance. Valid values are standard
+ // and unlimited.
+ CpuCredits *string `type:"string"`
+
+ // The ID of the instance.
+ InstanceId *string `type:"string"`
+}
+
+// String returns the string representation
+func (s InstanceCreditSpecificationRequest) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InstanceCreditSpecificationRequest) GoString() string {
+ return s.String()
+}
+
+// SetCpuCredits sets the CpuCredits field's value.
+func (s *InstanceCreditSpecificationRequest) SetCpuCredits(v string) *InstanceCreditSpecificationRequest {
+ s.CpuCredits = &v
+ return s
+}
+
+// SetInstanceId sets the InstanceId field's value.
+func (s *InstanceCreditSpecificationRequest) SetInstanceId(v string) *InstanceCreditSpecificationRequest {
+ s.InstanceId = &v
+ return s
+}
+
// Describes an instance to export.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceExportDetails
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceExportDetails
type InstanceExportDetails struct {
_ struct{} `type:"structure"`
@@ -43209,7 +48619,7 @@ func (s *InstanceExportDetails) SetTargetEnvironment(v string) *InstanceExportDe
}
// Describes an IPv6 address.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceIpv6Address
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceIpv6Address
type InstanceIpv6Address struct {
_ struct{} `type:"structure"`
@@ -43233,8 +48643,67 @@ func (s *InstanceIpv6Address) SetIpv6Address(v string) *InstanceIpv6Address {
return s
}
+// Describes an IPv6 address.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceIpv6AddressRequest
+type InstanceIpv6AddressRequest struct {
+ _ struct{} `type:"structure"`
+
+ // The IPv6 address.
+ Ipv6Address *string `type:"string"`
+}
+
+// String returns the string representation
+func (s InstanceIpv6AddressRequest) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InstanceIpv6AddressRequest) GoString() string {
+ return s.String()
+}
+
+// SetIpv6Address sets the Ipv6Address field's value.
+func (s *InstanceIpv6AddressRequest) SetIpv6Address(v string) *InstanceIpv6AddressRequest {
+ s.Ipv6Address = &v
+ return s
+}
+
+// Describes the market (purchasing) option for the instances.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceMarketOptionsRequest
+type InstanceMarketOptionsRequest struct {
+ _ struct{} `type:"structure"`
+
+ // The market type.
+ MarketType *string `type:"string" enum:"MarketType"`
+
+ // The options for Spot Instances.
+ SpotOptions *SpotMarketOptions `type:"structure"`
+}
+
+// String returns the string representation
+func (s InstanceMarketOptionsRequest) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InstanceMarketOptionsRequest) GoString() string {
+ return s.String()
+}
+
+// SetMarketType sets the MarketType field's value.
+func (s *InstanceMarketOptionsRequest) SetMarketType(v string) *InstanceMarketOptionsRequest {
+ s.MarketType = &v
+ return s
+}
+
+// SetSpotOptions sets the SpotOptions field's value.
+func (s *InstanceMarketOptionsRequest) SetSpotOptions(v *SpotMarketOptions) *InstanceMarketOptionsRequest {
+ s.SpotOptions = v
+ return s
+}
+
// Describes the monitoring of an instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceMonitoring
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceMonitoring
type InstanceMonitoring struct {
_ struct{} `type:"structure"`
@@ -43268,7 +48737,7 @@ func (s *InstanceMonitoring) SetMonitoring(v *Monitoring) *InstanceMonitoring {
}
// Describes a network interface.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceNetworkInterface
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceNetworkInterface
type InstanceNetworkInterface struct {
_ struct{} `type:"structure"`
@@ -43420,7 +48889,7 @@ func (s *InstanceNetworkInterface) SetVpcId(v string) *InstanceNetworkInterface
}
// Describes association information for an Elastic IP address (IPv4).
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceNetworkInterfaceAssociation
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceNetworkInterfaceAssociation
type InstanceNetworkInterfaceAssociation struct {
_ struct{} `type:"structure"`
@@ -43463,7 +48932,7 @@ func (s *InstanceNetworkInterfaceAssociation) SetPublicIp(v string) *InstanceNet
}
// Describes a network interface attachment.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceNetworkInterfaceAttachment
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceNetworkInterfaceAttachment
type InstanceNetworkInterfaceAttachment struct {
_ struct{} `type:"structure"`
@@ -43524,7 +48993,7 @@ func (s *InstanceNetworkInterfaceAttachment) SetStatus(v string) *InstanceNetwor
}
// Describes a network interface.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceNetworkInterfaceSpecification
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceNetworkInterfaceSpecification
type InstanceNetworkInterfaceSpecification struct {
_ struct{} `type:"structure"`
@@ -43694,7 +49163,7 @@ func (s *InstanceNetworkInterfaceSpecification) SetSubnetId(v string) *InstanceN
}
// Describes a private IPv4 address.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstancePrivateIpAddress
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstancePrivateIpAddress
type InstancePrivateIpAddress struct {
_ struct{} `type:"structure"`
@@ -43747,7 +49216,7 @@ func (s *InstancePrivateIpAddress) SetPrivateIpAddress(v string) *InstancePrivat
}
// Describes the current state of an instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceState
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceState
type InstanceState struct {
_ struct{} `type:"structure"`
@@ -43794,7 +49263,7 @@ func (s *InstanceState) SetName(v string) *InstanceState {
}
// Describes an instance state change.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceStateChange
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceStateChange
type InstanceStateChange struct {
_ struct{} `type:"structure"`
@@ -43837,7 +49306,7 @@ func (s *InstanceStateChange) SetPreviousState(v *InstanceState) *InstanceStateC
}
// Describes the status of an instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceStatus
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceStatus
type InstanceStatus struct {
_ struct{} `type:"structure"`
@@ -43911,7 +49380,7 @@ func (s *InstanceStatus) SetSystemStatus(v *InstanceStatusSummary) *InstanceStat
}
// Describes the instance status.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceStatusDetails
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceStatusDetails
type InstanceStatusDetails struct {
_ struct{} `type:"structure"`
@@ -43955,7 +49424,7 @@ func (s *InstanceStatusDetails) SetStatus(v string) *InstanceStatusDetails {
}
// Describes a scheduled event for an instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceStatusEvent
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceStatusEvent
type InstanceStatusEvent struct {
_ struct{} `type:"structure"`
@@ -44011,7 +49480,7 @@ func (s *InstanceStatusEvent) SetNotBefore(v time.Time) *InstanceStatusEvent {
}
// Describes the status of an instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceStatusSummary
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InstanceStatusSummary
type InstanceStatusSummary struct {
_ struct{} `type:"structure"`
@@ -44045,7 +49514,7 @@ func (s *InstanceStatusSummary) SetStatus(v string) *InstanceStatusSummary {
}
// Describes an Internet gateway.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InternetGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InternetGateway
type InternetGateway struct {
_ struct{} `type:"structure"`
@@ -44089,11 +49558,12 @@ func (s *InternetGateway) SetTags(v []*Tag) *InternetGateway {
// Describes the attachment of a VPC to an Internet gateway or an egress-only
// Internet gateway.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InternetGatewayAttachment
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/InternetGatewayAttachment
type InternetGatewayAttachment struct {
_ struct{} `type:"structure"`
- // The current state of the attachment.
+ // The current state of the attachment. For an Internet gateway, the state is
+ // available when attached to a VPC; otherwise, this value is not returned.
State *string `locationName:"state" type:"string" enum:"AttachmentStatus"`
// The ID of the VPC.
@@ -44122,13 +49592,14 @@ func (s *InternetGatewayAttachment) SetVpcId(v string) *InternetGatewayAttachmen
return s
}
-// Describes a security group rule.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/IpPermission
+// Describes a set of permissions for a security group rule.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/IpPermission
type IpPermission struct {
_ struct{} `type:"structure"`
// The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6
- // type number. A value of -1 indicates all ICMP/ICMPv6 types.
+ // type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify
+ // all ICMP/ICMPv6 types, you must specify all codes.
FromPort *int64 `locationName:"fromPort" type:"integer"`
// The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)).
@@ -44147,14 +49618,16 @@ type IpPermission struct {
// [EC2-VPC only] One or more IPv6 ranges.
Ipv6Ranges []*Ipv6Range `locationName:"ipv6Ranges" locationNameList:"item" type:"list"`
- // (Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups
- // only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress
- // request, this is the AWS service that you want to access through a VPC endpoint
- // from instances associated with the security group.
+ // (EC2-VPC only; valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress
+ // and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service.
+ // In an AuthorizeSecurityGroupEgress request, this is the AWS service that
+ // you want to access through a VPC endpoint from instances associated with
+ // the security group.
PrefixListIds []*PrefixListId `locationName:"prefixListIds" locationNameList:"item" type:"list"`
// The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
// A value of -1 indicates all ICMP/ICMPv6 codes for the specified ICMP type.
+ // If you specify all ICMP/ICMPv6 types, you must specify all codes.
ToPort *int64 `locationName:"toPort" type:"integer"`
// One or more security group and AWS account ID pairs.
@@ -44214,13 +49687,20 @@ func (s *IpPermission) SetUserIdGroupPairs(v []*UserIdGroupPair) *IpPermission {
}
// Describes an IPv4 range.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/IpRange
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/IpRange
type IpRange struct {
_ struct{} `type:"structure"`
// The IPv4 CIDR range. You can either specify a CIDR range or a source security
- // group, not both. To specify a single IPv4 address, use the /32 prefix.
+ // group, not both. To specify a single IPv4 address, use the /32 prefix length.
CidrIp *string `locationName:"cidrIp" type:"string"`
+
+ // A description for the security group rule that references this IPv4 address
+ // range.
+ //
+ // Constraints: Up to 255 characters in length. Allowed characters are a-z,
+ // A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*
+ Description *string `locationName:"description" type:"string"`
}
// String returns the string representation
@@ -44239,8 +49719,14 @@ func (s *IpRange) SetCidrIp(v string) *IpRange {
return s
}
+// SetDescription sets the Description field's value.
+func (s *IpRange) SetDescription(v string) *IpRange {
+ s.Description = &v
+ return s
+}
+
// Describes an IPv6 CIDR block.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Ipv6CidrBlock
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Ipv6CidrBlock
type Ipv6CidrBlock struct {
_ struct{} `type:"structure"`
@@ -44265,13 +49751,20 @@ func (s *Ipv6CidrBlock) SetIpv6CidrBlock(v string) *Ipv6CidrBlock {
}
// [EC2-VPC only] Describes an IPv6 range.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Ipv6Range
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Ipv6Range
type Ipv6Range struct {
_ struct{} `type:"structure"`
// The IPv6 CIDR range. You can either specify a CIDR range or a source security
- // group, not both. To specify a single IPv6 address, use the /128 prefix.
+ // group, not both. To specify a single IPv6 address, use the /128 prefix length.
CidrIpv6 *string `locationName:"cidrIpv6" type:"string"`
+
+ // A description for the security group rule that references this IPv6 address
+ // range.
+ //
+ // Constraints: Up to 255 characters in length. Allowed characters are a-z,
+ // A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*
+ Description *string `locationName:"description" type:"string"`
}
// String returns the string representation
@@ -44290,8 +49783,14 @@ func (s *Ipv6Range) SetCidrIpv6(v string) *Ipv6Range {
return s
}
+// SetDescription sets the Description field's value.
+func (s *Ipv6Range) SetDescription(v string) *Ipv6Range {
+ s.Description = &v
+ return s
+}
+
// Describes a key pair.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/KeyPairInfo
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/KeyPairInfo
type KeyPairInfo struct {
_ struct{} `type:"structure"`
@@ -44328,7 +49827,7 @@ func (s *KeyPairInfo) SetKeyName(v string) *KeyPairInfo {
}
// Describes a launch permission.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchPermission
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchPermission
type LaunchPermission struct {
_ struct{} `type:"structure"`
@@ -44362,7 +49861,7 @@ func (s *LaunchPermission) SetUserId(v string) *LaunchPermission {
}
// Describes a launch permission modification.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchPermissionModifications
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchPermissionModifications
type LaunchPermissionModifications struct {
_ struct{} `type:"structure"`
@@ -44397,7 +49896,7 @@ func (s *LaunchPermissionModifications) SetRemove(v []*LaunchPermission) *Launch
}
// Describes the launch specification for an instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchSpecification
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchSpecification
type LaunchSpecification struct {
_ struct{} `type:"structure"`
@@ -44405,9 +49904,6 @@ type LaunchSpecification struct {
AddressingType *string `locationName:"addressingType" type:"string"`
// One or more block device mapping entries.
- //
- // Although you can specify encrypted EBS volumes in this block device mapping
- // for your Spot Instances, these volumes are not encrypted.
BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"`
// Indicates whether the instance is optimized for EBS I/O. This optimization
@@ -44561,8 +50057,1727 @@ func (s *LaunchSpecification) SetUserData(v string) *LaunchSpecification {
return s
}
+// Describes a launch template.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplate
+type LaunchTemplate struct {
+ _ struct{} `type:"structure"`
+
+ // The time launch template was created.
+ CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601"`
+
+ // The principal that created the launch template.
+ CreatedBy *string `locationName:"createdBy" type:"string"`
+
+ // The version number of the default version of the launch template.
+ DefaultVersionNumber *int64 `locationName:"defaultVersionNumber" type:"long"`
+
+ // The version number of the latest version of the launch template.
+ LatestVersionNumber *int64 `locationName:"latestVersionNumber" type:"long"`
+
+ // The ID of the launch template.
+ LaunchTemplateId *string `locationName:"launchTemplateId" type:"string"`
+
+ // The name of the launch template.
+ LaunchTemplateName *string `locationName:"launchTemplateName" min:"3" type:"string"`
+
+ // The tags for the launch template.
+ Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
+}
+
+// String returns the string representation
+func (s LaunchTemplate) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchTemplate) GoString() string {
+ return s.String()
+}
+
+// SetCreateTime sets the CreateTime field's value.
+func (s *LaunchTemplate) SetCreateTime(v time.Time) *LaunchTemplate {
+ s.CreateTime = &v
+ return s
+}
+
+// SetCreatedBy sets the CreatedBy field's value.
+func (s *LaunchTemplate) SetCreatedBy(v string) *LaunchTemplate {
+ s.CreatedBy = &v
+ return s
+}
+
+// SetDefaultVersionNumber sets the DefaultVersionNumber field's value.
+func (s *LaunchTemplate) SetDefaultVersionNumber(v int64) *LaunchTemplate {
+ s.DefaultVersionNumber = &v
+ return s
+}
+
+// SetLatestVersionNumber sets the LatestVersionNumber field's value.
+func (s *LaunchTemplate) SetLatestVersionNumber(v int64) *LaunchTemplate {
+ s.LatestVersionNumber = &v
+ return s
+}
+
+// SetLaunchTemplateId sets the LaunchTemplateId field's value.
+func (s *LaunchTemplate) SetLaunchTemplateId(v string) *LaunchTemplate {
+ s.LaunchTemplateId = &v
+ return s
+}
+
+// SetLaunchTemplateName sets the LaunchTemplateName field's value.
+func (s *LaunchTemplate) SetLaunchTemplateName(v string) *LaunchTemplate {
+ s.LaunchTemplateName = &v
+ return s
+}
+
+// SetTags sets the Tags field's value.
+func (s *LaunchTemplate) SetTags(v []*Tag) *LaunchTemplate {
+ s.Tags = v
+ return s
+}
+
+// Describes a block device mapping.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplateBlockDeviceMapping
+type LaunchTemplateBlockDeviceMapping struct {
+ _ struct{} `type:"structure"`
+
+ // The device name.
+ DeviceName *string `locationName:"deviceName" type:"string"`
+
+ // Information about the block device for an EBS volume.
+ Ebs *LaunchTemplateEbsBlockDevice `locationName:"ebs" type:"structure"`
+
+ // Suppresses the specified device included in the block device mapping of the
+ // AMI.
+ NoDevice *string `locationName:"noDevice" type:"string"`
+
+ // The virtual device name (ephemeralN).
+ VirtualName *string `locationName:"virtualName" type:"string"`
+}
+
+// String returns the string representation
+func (s LaunchTemplateBlockDeviceMapping) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchTemplateBlockDeviceMapping) GoString() string {
+ return s.String()
+}
+
+// SetDeviceName sets the DeviceName field's value.
+func (s *LaunchTemplateBlockDeviceMapping) SetDeviceName(v string) *LaunchTemplateBlockDeviceMapping {
+ s.DeviceName = &v
+ return s
+}
+
+// SetEbs sets the Ebs field's value.
+func (s *LaunchTemplateBlockDeviceMapping) SetEbs(v *LaunchTemplateEbsBlockDevice) *LaunchTemplateBlockDeviceMapping {
+ s.Ebs = v
+ return s
+}
+
+// SetNoDevice sets the NoDevice field's value.
+func (s *LaunchTemplateBlockDeviceMapping) SetNoDevice(v string) *LaunchTemplateBlockDeviceMapping {
+ s.NoDevice = &v
+ return s
+}
+
+// SetVirtualName sets the VirtualName field's value.
+func (s *LaunchTemplateBlockDeviceMapping) SetVirtualName(v string) *LaunchTemplateBlockDeviceMapping {
+ s.VirtualName = &v
+ return s
+}
+
+// Describes a block device mapping.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplateBlockDeviceMappingRequest
+type LaunchTemplateBlockDeviceMappingRequest struct {
+ _ struct{} `type:"structure"`
+
+ // The device name (for example, /dev/sdh or xvdh).
+ DeviceName *string `type:"string"`
+
+ // Parameters used to automatically set up EBS volumes when the instance is
+ // launched.
+ Ebs *LaunchTemplateEbsBlockDeviceRequest `type:"structure"`
+
+ // Suppresses the specified device included in the block device mapping of the
+ // AMI.
+ NoDevice *string `type:"string"`
+
+ // The virtual device name (ephemeralN). Instance store volumes are numbered
+ // starting from 0. An instance type with 2 available instance store volumes
+ // can specify mappings for ephemeral0 and ephemeral1. The number of available
+ // instance store volumes depends on the instance type. After you connect to
+ // the instance, you must mount the volume.
+ VirtualName *string `type:"string"`
+}
+
+// String returns the string representation
+func (s LaunchTemplateBlockDeviceMappingRequest) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchTemplateBlockDeviceMappingRequest) GoString() string {
+ return s.String()
+}
+
+// SetDeviceName sets the DeviceName field's value.
+func (s *LaunchTemplateBlockDeviceMappingRequest) SetDeviceName(v string) *LaunchTemplateBlockDeviceMappingRequest {
+ s.DeviceName = &v
+ return s
+}
+
+// SetEbs sets the Ebs field's value.
+func (s *LaunchTemplateBlockDeviceMappingRequest) SetEbs(v *LaunchTemplateEbsBlockDeviceRequest) *LaunchTemplateBlockDeviceMappingRequest {
+ s.Ebs = v
+ return s
+}
+
+// SetNoDevice sets the NoDevice field's value.
+func (s *LaunchTemplateBlockDeviceMappingRequest) SetNoDevice(v string) *LaunchTemplateBlockDeviceMappingRequest {
+ s.NoDevice = &v
+ return s
+}
+
+// SetVirtualName sets the VirtualName field's value.
+func (s *LaunchTemplateBlockDeviceMappingRequest) SetVirtualName(v string) *LaunchTemplateBlockDeviceMappingRequest {
+ s.VirtualName = &v
+ return s
+}
+
+// Describes a launch template and overrides.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplateConfig
+type LaunchTemplateConfig struct {
+ _ struct{} `type:"structure"`
+
+ // The launch template.
+ LaunchTemplateSpecification *FleetLaunchTemplateSpecification `locationName:"launchTemplateSpecification" type:"structure"`
+
+ // Any parameters that you specify override the same parameters in the launch
+ // template.
+ Overrides []*LaunchTemplateOverrides `locationName:"overrides" locationNameList:"item" type:"list"`
+}
+
+// String returns the string representation
+func (s LaunchTemplateConfig) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchTemplateConfig) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *LaunchTemplateConfig) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "LaunchTemplateConfig"}
+ if s.LaunchTemplateSpecification != nil {
+ if err := s.LaunchTemplateSpecification.Validate(); err != nil {
+ invalidParams.AddNested("LaunchTemplateSpecification", err.(request.ErrInvalidParams))
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetLaunchTemplateSpecification sets the LaunchTemplateSpecification field's value.
+func (s *LaunchTemplateConfig) SetLaunchTemplateSpecification(v *FleetLaunchTemplateSpecification) *LaunchTemplateConfig {
+ s.LaunchTemplateSpecification = v
+ return s
+}
+
+// SetOverrides sets the Overrides field's value.
+func (s *LaunchTemplateConfig) SetOverrides(v []*LaunchTemplateOverrides) *LaunchTemplateConfig {
+ s.Overrides = v
+ return s
+}
+
+// Describes a block device for an EBS volume.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplateEbsBlockDevice
+type LaunchTemplateEbsBlockDevice struct {
+ _ struct{} `type:"structure"`
+
+ // Indicates whether the EBS volume is deleted on instance termination.
+ DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"`
+
+ // Indicates whether the EBS volume is encrypted.
+ Encrypted *bool `locationName:"encrypted" type:"boolean"`
+
+ // The number of I/O operations per second (IOPS) that the volume supports.
+ Iops *int64 `locationName:"iops" type:"integer"`
+
+ // The ARN of the AWS Key Management Service (AWS KMS) CMK used for encryption.
+ KmsKeyId *string `locationName:"kmsKeyId" type:"string"`
+
+ // The ID of the snapshot.
+ SnapshotId *string `locationName:"snapshotId" type:"string"`
+
+ // The size of the volume, in GiB.
+ VolumeSize *int64 `locationName:"volumeSize" type:"integer"`
+
+ // The volume type.
+ VolumeType *string `locationName:"volumeType" type:"string" enum:"VolumeType"`
+}
+
+// String returns the string representation
+func (s LaunchTemplateEbsBlockDevice) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchTemplateEbsBlockDevice) GoString() string {
+ return s.String()
+}
+
+// SetDeleteOnTermination sets the DeleteOnTermination field's value.
+func (s *LaunchTemplateEbsBlockDevice) SetDeleteOnTermination(v bool) *LaunchTemplateEbsBlockDevice {
+ s.DeleteOnTermination = &v
+ return s
+}
+
+// SetEncrypted sets the Encrypted field's value.
+func (s *LaunchTemplateEbsBlockDevice) SetEncrypted(v bool) *LaunchTemplateEbsBlockDevice {
+ s.Encrypted = &v
+ return s
+}
+
+// SetIops sets the Iops field's value.
+func (s *LaunchTemplateEbsBlockDevice) SetIops(v int64) *LaunchTemplateEbsBlockDevice {
+ s.Iops = &v
+ return s
+}
+
+// SetKmsKeyId sets the KmsKeyId field's value.
+func (s *LaunchTemplateEbsBlockDevice) SetKmsKeyId(v string) *LaunchTemplateEbsBlockDevice {
+ s.KmsKeyId = &v
+ return s
+}
+
+// SetSnapshotId sets the SnapshotId field's value.
+func (s *LaunchTemplateEbsBlockDevice) SetSnapshotId(v string) *LaunchTemplateEbsBlockDevice {
+ s.SnapshotId = &v
+ return s
+}
+
+// SetVolumeSize sets the VolumeSize field's value.
+func (s *LaunchTemplateEbsBlockDevice) SetVolumeSize(v int64) *LaunchTemplateEbsBlockDevice {
+ s.VolumeSize = &v
+ return s
+}
+
+// SetVolumeType sets the VolumeType field's value.
+func (s *LaunchTemplateEbsBlockDevice) SetVolumeType(v string) *LaunchTemplateEbsBlockDevice {
+ s.VolumeType = &v
+ return s
+}
+
+// The parameters for a block device for an EBS volume.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplateEbsBlockDeviceRequest
+type LaunchTemplateEbsBlockDeviceRequest struct {
+ _ struct{} `type:"structure"`
+
+ // Indicates whether the EBS volume is deleted on instance termination.
+ DeleteOnTermination *bool `type:"boolean"`
+
+ // Indicates whether the EBS volume is encrypted. Encrypted volumes can only
+ // be attached to instances that support Amazon EBS encryption. If you are creating
+ // a volume from a snapshot, you can't specify an encryption value.
+ Encrypted *bool `type:"boolean"`
+
+ // The number of I/O operations per second (IOPS) that the volume supports.
+ // For io1, this represents the number of IOPS that are provisioned for the
+ // volume. For gp2, this represents the baseline performance of the volume and
+ // the rate at which the volume accumulates I/O credits for bursting. For more
+ // information about General Purpose SSD baseline performance, I/O credits,
+ // and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud
+ // User Guide.
+ //
+ // Condition: This parameter is required for requests to create io1 volumes;
+ // it is not used in requests to create gp2, st1, sc1, or standard volumes.
+ Iops *int64 `type:"integer"`
+
+ // The ARN of the AWS Key Management Service (AWS KMS) CMK used for encryption.
+ KmsKeyId *string `type:"string"`
+
+ // The ID of the snapshot.
+ SnapshotId *string `type:"string"`
+
+ // The size of the volume, in GiB.
+ //
+ // Default: If you're creating the volume from a snapshot and don't specify
+ // a volume size, the default is the snapshot size.
+ VolumeSize *int64 `type:"integer"`
+
+ // The volume type.
+ VolumeType *string `type:"string" enum:"VolumeType"`
+}
+
+// String returns the string representation
+func (s LaunchTemplateEbsBlockDeviceRequest) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchTemplateEbsBlockDeviceRequest) GoString() string {
+ return s.String()
+}
+
+// SetDeleteOnTermination sets the DeleteOnTermination field's value.
+func (s *LaunchTemplateEbsBlockDeviceRequest) SetDeleteOnTermination(v bool) *LaunchTemplateEbsBlockDeviceRequest {
+ s.DeleteOnTermination = &v
+ return s
+}
+
+// SetEncrypted sets the Encrypted field's value.
+func (s *LaunchTemplateEbsBlockDeviceRequest) SetEncrypted(v bool) *LaunchTemplateEbsBlockDeviceRequest {
+ s.Encrypted = &v
+ return s
+}
+
+// SetIops sets the Iops field's value.
+func (s *LaunchTemplateEbsBlockDeviceRequest) SetIops(v int64) *LaunchTemplateEbsBlockDeviceRequest {
+ s.Iops = &v
+ return s
+}
+
+// SetKmsKeyId sets the KmsKeyId field's value.
+func (s *LaunchTemplateEbsBlockDeviceRequest) SetKmsKeyId(v string) *LaunchTemplateEbsBlockDeviceRequest {
+ s.KmsKeyId = &v
+ return s
+}
+
+// SetSnapshotId sets the SnapshotId field's value.
+func (s *LaunchTemplateEbsBlockDeviceRequest) SetSnapshotId(v string) *LaunchTemplateEbsBlockDeviceRequest {
+ s.SnapshotId = &v
+ return s
+}
+
+// SetVolumeSize sets the VolumeSize field's value.
+func (s *LaunchTemplateEbsBlockDeviceRequest) SetVolumeSize(v int64) *LaunchTemplateEbsBlockDeviceRequest {
+ s.VolumeSize = &v
+ return s
+}
+
+// SetVolumeType sets the VolumeType field's value.
+func (s *LaunchTemplateEbsBlockDeviceRequest) SetVolumeType(v string) *LaunchTemplateEbsBlockDeviceRequest {
+ s.VolumeType = &v
+ return s
+}
+
+// Describes an IAM instance profile.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplateIamInstanceProfileSpecification
+type LaunchTemplateIamInstanceProfileSpecification struct {
+ _ struct{} `type:"structure"`
+
+ // The Amazon Resource Name (ARN) of the instance profile.
+ Arn *string `locationName:"arn" type:"string"`
+
+ // The name of the instance profile.
+ Name *string `locationName:"name" type:"string"`
+}
+
+// String returns the string representation
+func (s LaunchTemplateIamInstanceProfileSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchTemplateIamInstanceProfileSpecification) GoString() string {
+ return s.String()
+}
+
+// SetArn sets the Arn field's value.
+func (s *LaunchTemplateIamInstanceProfileSpecification) SetArn(v string) *LaunchTemplateIamInstanceProfileSpecification {
+ s.Arn = &v
+ return s
+}
+
+// SetName sets the Name field's value.
+func (s *LaunchTemplateIamInstanceProfileSpecification) SetName(v string) *LaunchTemplateIamInstanceProfileSpecification {
+ s.Name = &v
+ return s
+}
+
+// An IAM instance profile.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplateIamInstanceProfileSpecificationRequest
+type LaunchTemplateIamInstanceProfileSpecificationRequest struct {
+ _ struct{} `type:"structure"`
+
+ // The Amazon Resource Name (ARN) of the instance profile.
+ Arn *string `type:"string"`
+
+ // The name of the instance profile.
+ Name *string `type:"string"`
+}
+
+// String returns the string representation
+func (s LaunchTemplateIamInstanceProfileSpecificationRequest) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchTemplateIamInstanceProfileSpecificationRequest) GoString() string {
+ return s.String()
+}
+
+// SetArn sets the Arn field's value.
+func (s *LaunchTemplateIamInstanceProfileSpecificationRequest) SetArn(v string) *LaunchTemplateIamInstanceProfileSpecificationRequest {
+ s.Arn = &v
+ return s
+}
+
+// SetName sets the Name field's value.
+func (s *LaunchTemplateIamInstanceProfileSpecificationRequest) SetName(v string) *LaunchTemplateIamInstanceProfileSpecificationRequest {
+ s.Name = &v
+ return s
+}
+
+// The market (purchasing) option for the instances.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplateInstanceMarketOptions
+type LaunchTemplateInstanceMarketOptions struct {
+ _ struct{} `type:"structure"`
+
+ // The market type.
+ MarketType *string `locationName:"marketType" type:"string" enum:"MarketType"`
+
+ // The options for Spot Instances.
+ SpotOptions *LaunchTemplateSpotMarketOptions `locationName:"spotOptions" type:"structure"`
+}
+
+// String returns the string representation
+func (s LaunchTemplateInstanceMarketOptions) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchTemplateInstanceMarketOptions) GoString() string {
+ return s.String()
+}
+
+// SetMarketType sets the MarketType field's value.
+func (s *LaunchTemplateInstanceMarketOptions) SetMarketType(v string) *LaunchTemplateInstanceMarketOptions {
+ s.MarketType = &v
+ return s
+}
+
+// SetSpotOptions sets the SpotOptions field's value.
+func (s *LaunchTemplateInstanceMarketOptions) SetSpotOptions(v *LaunchTemplateSpotMarketOptions) *LaunchTemplateInstanceMarketOptions {
+ s.SpotOptions = v
+ return s
+}
+
+// The market (purchasing) option for the instances.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplateInstanceMarketOptionsRequest
+type LaunchTemplateInstanceMarketOptionsRequest struct {
+ _ struct{} `type:"structure"`
+
+ // The market type.
+ MarketType *string `type:"string" enum:"MarketType"`
+
+ // The options for Spot Instances.
+ SpotOptions *LaunchTemplateSpotMarketOptionsRequest `type:"structure"`
+}
+
+// String returns the string representation
+func (s LaunchTemplateInstanceMarketOptionsRequest) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchTemplateInstanceMarketOptionsRequest) GoString() string {
+ return s.String()
+}
+
+// SetMarketType sets the MarketType field's value.
+func (s *LaunchTemplateInstanceMarketOptionsRequest) SetMarketType(v string) *LaunchTemplateInstanceMarketOptionsRequest {
+ s.MarketType = &v
+ return s
+}
+
+// SetSpotOptions sets the SpotOptions field's value.
+func (s *LaunchTemplateInstanceMarketOptionsRequest) SetSpotOptions(v *LaunchTemplateSpotMarketOptionsRequest) *LaunchTemplateInstanceMarketOptionsRequest {
+ s.SpotOptions = v
+ return s
+}
+
+// Describes a network interface.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplateInstanceNetworkInterfaceSpecification
+type LaunchTemplateInstanceNetworkInterfaceSpecification struct {
+ _ struct{} `type:"structure"`
+
+ // Indicates whether to associate a public IPv4 address with eth0 for a new
+ // network interface.
+ AssociatePublicIpAddress *bool `locationName:"associatePublicIpAddress" type:"boolean"`
+
+ // Indicates whether the network interface is deleted when the instance is terminated.
+ DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"`
+
+ // A description for the network interface.
+ Description *string `locationName:"description" type:"string"`
+
+ // The device index for the network interface attachment.
+ DeviceIndex *int64 `locationName:"deviceIndex" type:"integer"`
+
+ // The IDs of one or more security groups.
+ Groups []*string `locationName:"groupSet" locationNameList:"groupId" type:"list"`
+
+ // The number of IPv6 addresses for the network interface.
+ Ipv6AddressCount *int64 `locationName:"ipv6AddressCount" type:"integer"`
+
+ // The IPv6 addresses for the network interface.
+ Ipv6Addresses []*InstanceIpv6Address `locationName:"ipv6AddressesSet" locationNameList:"item" type:"list"`
+
+ // The ID of the network interface.
+ NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"`
+
+ // The primary private IPv4 address of the network interface.
+ PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"`
+
+ // One or more private IPv4 addresses.
+ PrivateIpAddresses []*PrivateIpAddressSpecification `locationName:"privateIpAddressesSet" locationNameList:"item" type:"list"`
+
+ // The number of secondary private IPv4 addresses for the network interface.
+ SecondaryPrivateIpAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"`
+
+ // The ID of the subnet for the network interface.
+ SubnetId *string `locationName:"subnetId" type:"string"`
+}
+
+// String returns the string representation
+func (s LaunchTemplateInstanceNetworkInterfaceSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchTemplateInstanceNetworkInterfaceSpecification) GoString() string {
+ return s.String()
+}
+
+// SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value.
+func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetAssociatePublicIpAddress(v bool) *LaunchTemplateInstanceNetworkInterfaceSpecification {
+ s.AssociatePublicIpAddress = &v
+ return s
+}
+
+// SetDeleteOnTermination sets the DeleteOnTermination field's value.
+func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetDeleteOnTermination(v bool) *LaunchTemplateInstanceNetworkInterfaceSpecification {
+ s.DeleteOnTermination = &v
+ return s
+}
+
+// SetDescription sets the Description field's value.
+func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetDescription(v string) *LaunchTemplateInstanceNetworkInterfaceSpecification {
+ s.Description = &v
+ return s
+}
+
+// SetDeviceIndex sets the DeviceIndex field's value.
+func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetDeviceIndex(v int64) *LaunchTemplateInstanceNetworkInterfaceSpecification {
+ s.DeviceIndex = &v
+ return s
+}
+
+// SetGroups sets the Groups field's value.
+func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetGroups(v []*string) *LaunchTemplateInstanceNetworkInterfaceSpecification {
+ s.Groups = v
+ return s
+}
+
+// SetIpv6AddressCount sets the Ipv6AddressCount field's value.
+func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetIpv6AddressCount(v int64) *LaunchTemplateInstanceNetworkInterfaceSpecification {
+ s.Ipv6AddressCount = &v
+ return s
+}
+
+// SetIpv6Addresses sets the Ipv6Addresses field's value.
+func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetIpv6Addresses(v []*InstanceIpv6Address) *LaunchTemplateInstanceNetworkInterfaceSpecification {
+ s.Ipv6Addresses = v
+ return s
+}
+
+// SetNetworkInterfaceId sets the NetworkInterfaceId field's value.
+func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetNetworkInterfaceId(v string) *LaunchTemplateInstanceNetworkInterfaceSpecification {
+ s.NetworkInterfaceId = &v
+ return s
+}
+
+// SetPrivateIpAddress sets the PrivateIpAddress field's value.
+func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetPrivateIpAddress(v string) *LaunchTemplateInstanceNetworkInterfaceSpecification {
+ s.PrivateIpAddress = &v
+ return s
+}
+
+// SetPrivateIpAddresses sets the PrivateIpAddresses field's value.
+func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetPrivateIpAddresses(v []*PrivateIpAddressSpecification) *LaunchTemplateInstanceNetworkInterfaceSpecification {
+ s.PrivateIpAddresses = v
+ return s
+}
+
+// SetSecondaryPrivateIpAddressCount sets the SecondaryPrivateIpAddressCount field's value.
+func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetSecondaryPrivateIpAddressCount(v int64) *LaunchTemplateInstanceNetworkInterfaceSpecification {
+ s.SecondaryPrivateIpAddressCount = &v
+ return s
+}
+
+// SetSubnetId sets the SubnetId field's value.
+func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetSubnetId(v string) *LaunchTemplateInstanceNetworkInterfaceSpecification {
+ s.SubnetId = &v
+ return s
+}
+
+// The parameters for a network interface.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplateInstanceNetworkInterfaceSpecificationRequest
+type LaunchTemplateInstanceNetworkInterfaceSpecificationRequest struct {
+ _ struct{} `type:"structure"`
+
+ // Associates a public IPv4 address with eth0 for a new network interface.
+ AssociatePublicIpAddress *bool `type:"boolean"`
+
+ // Indicates whether the network interface is deleted when the instance is terminated.
+ DeleteOnTermination *bool `type:"boolean"`
+
+ // A description for the network interface.
+ Description *string `type:"string"`
+
+ // The device index for the network interface attachment.
+ DeviceIndex *int64 `type:"integer"`
+
+ // The IDs of one or more security groups.
+ Groups []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"`
+
+ // The number of IPv6 addresses to assign to a network interface. Amazon EC2
+ // automatically selects the IPv6 addresses from the subnet range. You can't
+ // use this option if specifying specific IPv6 addresses.
+ Ipv6AddressCount *int64 `type:"integer"`
+
+ // One or more specific IPv6 addresses from the IPv6 CIDR block range of your
+ // subnet. You can't use this option if you're specifying a number of IPv6 addresses.
+ Ipv6Addresses []*InstanceIpv6AddressRequest `locationNameList:"InstanceIpv6Address" type:"list"`
+
+ // The ID of the network interface.
+ NetworkInterfaceId *string `type:"string"`
+
+ // The primary private IPv4 address of the network interface.
+ PrivateIpAddress *string `type:"string"`
+
+ // One or more private IPv4 addresses.
+ PrivateIpAddresses []*PrivateIpAddressSpecification `locationNameList:"item" type:"list"`
+
+ // The number of secondary private IPv4 addresses to assign to a network interface.
+ SecondaryPrivateIpAddressCount *int64 `type:"integer"`
+
+ // The ID of the subnet for the network interface.
+ SubnetId *string `type:"string"`
+}
+
+// String returns the string representation
+func (s LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "LaunchTemplateInstanceNetworkInterfaceSpecificationRequest"}
+ if s.PrivateIpAddresses != nil {
+ for i, v := range s.PrivateIpAddresses {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PrivateIpAddresses", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value.
+func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetAssociatePublicIpAddress(v bool) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest {
+ s.AssociatePublicIpAddress = &v
+ return s
+}
+
+// SetDeleteOnTermination sets the DeleteOnTermination field's value.
+func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetDeleteOnTermination(v bool) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest {
+ s.DeleteOnTermination = &v
+ return s
+}
+
+// SetDescription sets the Description field's value.
+func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetDescription(v string) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest {
+ s.Description = &v
+ return s
+}
+
+// SetDeviceIndex sets the DeviceIndex field's value.
+func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetDeviceIndex(v int64) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest {
+ s.DeviceIndex = &v
+ return s
+}
+
+// SetGroups sets the Groups field's value.
+func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetGroups(v []*string) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest {
+ s.Groups = v
+ return s
+}
+
+// SetIpv6AddressCount sets the Ipv6AddressCount field's value.
+func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetIpv6AddressCount(v int64) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest {
+ s.Ipv6AddressCount = &v
+ return s
+}
+
+// SetIpv6Addresses sets the Ipv6Addresses field's value.
+func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetIpv6Addresses(v []*InstanceIpv6AddressRequest) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest {
+ s.Ipv6Addresses = v
+ return s
+}
+
+// SetNetworkInterfaceId sets the NetworkInterfaceId field's value.
+func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetNetworkInterfaceId(v string) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest {
+ s.NetworkInterfaceId = &v
+ return s
+}
+
+// SetPrivateIpAddress sets the PrivateIpAddress field's value.
+func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetPrivateIpAddress(v string) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest {
+ s.PrivateIpAddress = &v
+ return s
+}
+
+// SetPrivateIpAddresses sets the PrivateIpAddresses field's value.
+func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetPrivateIpAddresses(v []*PrivateIpAddressSpecification) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest {
+ s.PrivateIpAddresses = v
+ return s
+}
+
+// SetSecondaryPrivateIpAddressCount sets the SecondaryPrivateIpAddressCount field's value.
+func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetSecondaryPrivateIpAddressCount(v int64) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest {
+ s.SecondaryPrivateIpAddressCount = &v
+ return s
+}
+
+// SetSubnetId sets the SubnetId field's value.
+func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetSubnetId(v string) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest {
+ s.SubnetId = &v
+ return s
+}
+
+// Describes overrides for a launch template.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplateOverrides
+type LaunchTemplateOverrides struct {
+ _ struct{} `type:"structure"`
+
+ // The Availability Zone in which to launch the instances.
+ AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
+
+ // The instance type.
+ InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"`
+
+ // The maximum price per unit hour that you are willing to pay for a Spot Instance.
+ SpotPrice *string `locationName:"spotPrice" type:"string"`
+
+ // The ID of the subnet in which to launch the instances.
+ SubnetId *string `locationName:"subnetId" type:"string"`
+
+ // The number of units provided by the specified instance type.
+ WeightedCapacity *float64 `locationName:"weightedCapacity" type:"double"`
+}
+
+// String returns the string representation
+func (s LaunchTemplateOverrides) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchTemplateOverrides) GoString() string {
+ return s.String()
+}
+
+// SetAvailabilityZone sets the AvailabilityZone field's value.
+func (s *LaunchTemplateOverrides) SetAvailabilityZone(v string) *LaunchTemplateOverrides {
+ s.AvailabilityZone = &v
+ return s
+}
+
+// SetInstanceType sets the InstanceType field's value.
+func (s *LaunchTemplateOverrides) SetInstanceType(v string) *LaunchTemplateOverrides {
+ s.InstanceType = &v
+ return s
+}
+
+// SetSpotPrice sets the SpotPrice field's value.
+func (s *LaunchTemplateOverrides) SetSpotPrice(v string) *LaunchTemplateOverrides {
+ s.SpotPrice = &v
+ return s
+}
+
+// SetSubnetId sets the SubnetId field's value.
+func (s *LaunchTemplateOverrides) SetSubnetId(v string) *LaunchTemplateOverrides {
+ s.SubnetId = &v
+ return s
+}
+
+// SetWeightedCapacity sets the WeightedCapacity field's value.
+func (s *LaunchTemplateOverrides) SetWeightedCapacity(v float64) *LaunchTemplateOverrides {
+ s.WeightedCapacity = &v
+ return s
+}
+
+// Describes the placement of an instance.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplatePlacement
+type LaunchTemplatePlacement struct {
+ _ struct{} `type:"structure"`
+
+ // The affinity setting for the instance on the Dedicated Host.
+ Affinity *string `locationName:"affinity" type:"string"`
+
+ // The Availability Zone of the instance.
+ AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
+
+ // The name of the placement group for the instance.
+ GroupName *string `locationName:"groupName" type:"string"`
+
+ // The ID of the Dedicated Host for the instance.
+ HostId *string `locationName:"hostId" type:"string"`
+
+ // Reserved for future use.
+ SpreadDomain *string `locationName:"spreadDomain" type:"string"`
+
+ // The tenancy of the instance (if the instance is running in a VPC). An instance
+ // with a tenancy of dedicated runs on single-tenant hardware.
+ Tenancy *string `locationName:"tenancy" type:"string" enum:"Tenancy"`
+}
+
+// String returns the string representation
+func (s LaunchTemplatePlacement) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchTemplatePlacement) GoString() string {
+ return s.String()
+}
+
+// SetAffinity sets the Affinity field's value.
+func (s *LaunchTemplatePlacement) SetAffinity(v string) *LaunchTemplatePlacement {
+ s.Affinity = &v
+ return s
+}
+
+// SetAvailabilityZone sets the AvailabilityZone field's value.
+func (s *LaunchTemplatePlacement) SetAvailabilityZone(v string) *LaunchTemplatePlacement {
+ s.AvailabilityZone = &v
+ return s
+}
+
+// SetGroupName sets the GroupName field's value.
+func (s *LaunchTemplatePlacement) SetGroupName(v string) *LaunchTemplatePlacement {
+ s.GroupName = &v
+ return s
+}
+
+// SetHostId sets the HostId field's value.
+func (s *LaunchTemplatePlacement) SetHostId(v string) *LaunchTemplatePlacement {
+ s.HostId = &v
+ return s
+}
+
+// SetSpreadDomain sets the SpreadDomain field's value.
+func (s *LaunchTemplatePlacement) SetSpreadDomain(v string) *LaunchTemplatePlacement {
+ s.SpreadDomain = &v
+ return s
+}
+
+// SetTenancy sets the Tenancy field's value.
+func (s *LaunchTemplatePlacement) SetTenancy(v string) *LaunchTemplatePlacement {
+ s.Tenancy = &v
+ return s
+}
+
+// The placement for the instance.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplatePlacementRequest
+type LaunchTemplatePlacementRequest struct {
+ _ struct{} `type:"structure"`
+
+ // The affinity setting for an instance on a Dedicated Host.
+ Affinity *string `type:"string"`
+
+ // The Availability Zone for the instance.
+ AvailabilityZone *string `type:"string"`
+
+ // The name of the placement group for the instance.
+ GroupName *string `type:"string"`
+
+ // The ID of the Dedicated Host for the instance.
+ HostId *string `type:"string"`
+
+ // Reserved for future use.
+ SpreadDomain *string `type:"string"`
+
+ // The tenancy of the instance (if the instance is running in a VPC). An instance
+ // with a tenancy of dedicated runs on single-tenant hardware.
+ Tenancy *string `type:"string" enum:"Tenancy"`
+}
+
+// String returns the string representation
+func (s LaunchTemplatePlacementRequest) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchTemplatePlacementRequest) GoString() string {
+ return s.String()
+}
+
+// SetAffinity sets the Affinity field's value.
+func (s *LaunchTemplatePlacementRequest) SetAffinity(v string) *LaunchTemplatePlacementRequest {
+ s.Affinity = &v
+ return s
+}
+
+// SetAvailabilityZone sets the AvailabilityZone field's value.
+func (s *LaunchTemplatePlacementRequest) SetAvailabilityZone(v string) *LaunchTemplatePlacementRequest {
+ s.AvailabilityZone = &v
+ return s
+}
+
+// SetGroupName sets the GroupName field's value.
+func (s *LaunchTemplatePlacementRequest) SetGroupName(v string) *LaunchTemplatePlacementRequest {
+ s.GroupName = &v
+ return s
+}
+
+// SetHostId sets the HostId field's value.
+func (s *LaunchTemplatePlacementRequest) SetHostId(v string) *LaunchTemplatePlacementRequest {
+ s.HostId = &v
+ return s
+}
+
+// SetSpreadDomain sets the SpreadDomain field's value.
+func (s *LaunchTemplatePlacementRequest) SetSpreadDomain(v string) *LaunchTemplatePlacementRequest {
+ s.SpreadDomain = &v
+ return s
+}
+
+// SetTenancy sets the Tenancy field's value.
+func (s *LaunchTemplatePlacementRequest) SetTenancy(v string) *LaunchTemplatePlacementRequest {
+ s.Tenancy = &v
+ return s
+}
+
+// The launch template to use. You must specify either the launch template ID
+// or launch template name in the request.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplateSpecification
+type LaunchTemplateSpecification struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the launch template.
+ LaunchTemplateId *string `type:"string"`
+
+ // The name of the launch template.
+ LaunchTemplateName *string `type:"string"`
+
+ // The version number of the launch template.
+ //
+ // Default: The default version for the launch template.
+ Version *string `type:"string"`
+}
+
+// String returns the string representation
+func (s LaunchTemplateSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchTemplateSpecification) GoString() string {
+ return s.String()
+}
+
+// SetLaunchTemplateId sets the LaunchTemplateId field's value.
+func (s *LaunchTemplateSpecification) SetLaunchTemplateId(v string) *LaunchTemplateSpecification {
+ s.LaunchTemplateId = &v
+ return s
+}
+
+// SetLaunchTemplateName sets the LaunchTemplateName field's value.
+func (s *LaunchTemplateSpecification) SetLaunchTemplateName(v string) *LaunchTemplateSpecification {
+ s.LaunchTemplateName = &v
+ return s
+}
+
+// SetVersion sets the Version field's value.
+func (s *LaunchTemplateSpecification) SetVersion(v string) *LaunchTemplateSpecification {
+ s.Version = &v
+ return s
+}
+
+// The options for Spot Instances.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplateSpotMarketOptions
+type LaunchTemplateSpotMarketOptions struct {
+ _ struct{} `type:"structure"`
+
+ // The required duration for the Spot Instances (also known as Spot blocks),
+ // in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300,
+ // or 360).
+ BlockDurationMinutes *int64 `locationName:"blockDurationMinutes" type:"integer"`
+
+ // The behavior when a Spot Instance is interrupted.
+ InstanceInterruptionBehavior *string `locationName:"instanceInterruptionBehavior" type:"string" enum:"InstanceInterruptionBehavior"`
+
+ // The maximum hourly price you're willing to pay for the Spot Instances.
+ MaxPrice *string `locationName:"maxPrice" type:"string"`
+
+ // The Spot Instance request type.
+ SpotInstanceType *string `locationName:"spotInstanceType" type:"string" enum:"SpotInstanceType"`
+
+ // The end date of the request. For a one-time request, the request remains
+ // active until all instances launch, the request is canceled, or this date
+ // is reached. If the request is persistent, it remains active until it is canceled
+ // or this date and time is reached.
+ ValidUntil *time.Time `locationName:"validUntil" type:"timestamp" timestampFormat:"iso8601"`
+}
+
+// String returns the string representation
+func (s LaunchTemplateSpotMarketOptions) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchTemplateSpotMarketOptions) GoString() string {
+ return s.String()
+}
+
+// SetBlockDurationMinutes sets the BlockDurationMinutes field's value.
+func (s *LaunchTemplateSpotMarketOptions) SetBlockDurationMinutes(v int64) *LaunchTemplateSpotMarketOptions {
+ s.BlockDurationMinutes = &v
+ return s
+}
+
+// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value.
+func (s *LaunchTemplateSpotMarketOptions) SetInstanceInterruptionBehavior(v string) *LaunchTemplateSpotMarketOptions {
+ s.InstanceInterruptionBehavior = &v
+ return s
+}
+
+// SetMaxPrice sets the MaxPrice field's value.
+func (s *LaunchTemplateSpotMarketOptions) SetMaxPrice(v string) *LaunchTemplateSpotMarketOptions {
+ s.MaxPrice = &v
+ return s
+}
+
+// SetSpotInstanceType sets the SpotInstanceType field's value.
+func (s *LaunchTemplateSpotMarketOptions) SetSpotInstanceType(v string) *LaunchTemplateSpotMarketOptions {
+ s.SpotInstanceType = &v
+ return s
+}
+
+// SetValidUntil sets the ValidUntil field's value.
+func (s *LaunchTemplateSpotMarketOptions) SetValidUntil(v time.Time) *LaunchTemplateSpotMarketOptions {
+ s.ValidUntil = &v
+ return s
+}
+
+// The options for Spot Instances.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplateSpotMarketOptionsRequest
+type LaunchTemplateSpotMarketOptionsRequest struct {
+ _ struct{} `type:"structure"`
+
+ // The required duration for the Spot Instances (also known as Spot blocks),
+ // in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300,
+ // or 360).
+ BlockDurationMinutes *int64 `type:"integer"`
+
+ // The behavior when a Spot Instance is interrupted. The default is terminate.
+ InstanceInterruptionBehavior *string `type:"string" enum:"InstanceInterruptionBehavior"`
+
+ // The maximum hourly price you're willing to pay for the Spot Instances.
+ MaxPrice *string `type:"string"`
+
+ // The Spot Instance request type.
+ SpotInstanceType *string `type:"string" enum:"SpotInstanceType"`
+
+ // The end date of the request. For a one-time request, the request remains
+ // active until all instances launch, the request is canceled, or this date
+ // is reached. If the request is persistent, it remains active until it is canceled
+ // or this date and time is reached. The default end date is 7 days from the
+ // current date.
+ ValidUntil *time.Time `type:"timestamp" timestampFormat:"iso8601"`
+}
+
+// String returns the string representation
+func (s LaunchTemplateSpotMarketOptionsRequest) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchTemplateSpotMarketOptionsRequest) GoString() string {
+ return s.String()
+}
+
+// SetBlockDurationMinutes sets the BlockDurationMinutes field's value.
+func (s *LaunchTemplateSpotMarketOptionsRequest) SetBlockDurationMinutes(v int64) *LaunchTemplateSpotMarketOptionsRequest {
+ s.BlockDurationMinutes = &v
+ return s
+}
+
+// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value.
+func (s *LaunchTemplateSpotMarketOptionsRequest) SetInstanceInterruptionBehavior(v string) *LaunchTemplateSpotMarketOptionsRequest {
+ s.InstanceInterruptionBehavior = &v
+ return s
+}
+
+// SetMaxPrice sets the MaxPrice field's value.
+func (s *LaunchTemplateSpotMarketOptionsRequest) SetMaxPrice(v string) *LaunchTemplateSpotMarketOptionsRequest {
+ s.MaxPrice = &v
+ return s
+}
+
+// SetSpotInstanceType sets the SpotInstanceType field's value.
+func (s *LaunchTemplateSpotMarketOptionsRequest) SetSpotInstanceType(v string) *LaunchTemplateSpotMarketOptionsRequest {
+ s.SpotInstanceType = &v
+ return s
+}
+
+// SetValidUntil sets the ValidUntil field's value.
+func (s *LaunchTemplateSpotMarketOptionsRequest) SetValidUntil(v time.Time) *LaunchTemplateSpotMarketOptionsRequest {
+ s.ValidUntil = &v
+ return s
+}
+
+// The tag specification for the launch template.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplateTagSpecification
+type LaunchTemplateTagSpecification struct {
+ _ struct{} `type:"structure"`
+
+ // The type of resource.
+ ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"`
+
+ // The tags for the resource.
+ Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
+}
+
+// String returns the string representation
+func (s LaunchTemplateTagSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchTemplateTagSpecification) GoString() string {
+ return s.String()
+}
+
+// SetResourceType sets the ResourceType field's value.
+func (s *LaunchTemplateTagSpecification) SetResourceType(v string) *LaunchTemplateTagSpecification {
+ s.ResourceType = &v
+ return s
+}
+
+// SetTags sets the Tags field's value.
+func (s *LaunchTemplateTagSpecification) SetTags(v []*Tag) *LaunchTemplateTagSpecification {
+ s.Tags = v
+ return s
+}
+
+// The tags specification for the launch template.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplateTagSpecificationRequest
+type LaunchTemplateTagSpecificationRequest struct {
+ _ struct{} `type:"structure"`
+
+ // The type of resource to tag. Currently, the resource types that support tagging
+ // on creation are instance and volume.
+ ResourceType *string `type:"string" enum:"ResourceType"`
+
+ // The tags to apply to the resource.
+ Tags []*Tag `locationName:"Tag" locationNameList:"item" type:"list"`
+}
+
+// String returns the string representation
+func (s LaunchTemplateTagSpecificationRequest) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchTemplateTagSpecificationRequest) GoString() string {
+ return s.String()
+}
+
+// SetResourceType sets the ResourceType field's value.
+func (s *LaunchTemplateTagSpecificationRequest) SetResourceType(v string) *LaunchTemplateTagSpecificationRequest {
+ s.ResourceType = &v
+ return s
+}
+
+// SetTags sets the Tags field's value.
+func (s *LaunchTemplateTagSpecificationRequest) SetTags(v []*Tag) *LaunchTemplateTagSpecificationRequest {
+ s.Tags = v
+ return s
+}
+
+// Describes a launch template version.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplateVersion
+type LaunchTemplateVersion struct {
+ _ struct{} `type:"structure"`
+
+ // The time the version was created.
+ CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601"`
+
+ // The principal that created the version.
+ CreatedBy *string `locationName:"createdBy" type:"string"`
+
+ // Indicates whether the version is the default version.
+ DefaultVersion *bool `locationName:"defaultVersion" type:"boolean"`
+
+ // Information about the launch template.
+ LaunchTemplateData *ResponseLaunchTemplateData `locationName:"launchTemplateData" type:"structure"`
+
+ // The ID of the launch template.
+ LaunchTemplateId *string `locationName:"launchTemplateId" type:"string"`
+
+ // The name of the launch template.
+ LaunchTemplateName *string `locationName:"launchTemplateName" min:"3" type:"string"`
+
+ // The description for the version.
+ VersionDescription *string `locationName:"versionDescription" type:"string"`
+
+ // The version number.
+ VersionNumber *int64 `locationName:"versionNumber" type:"long"`
+}
+
+// String returns the string representation
+func (s LaunchTemplateVersion) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchTemplateVersion) GoString() string {
+ return s.String()
+}
+
+// SetCreateTime sets the CreateTime field's value.
+func (s *LaunchTemplateVersion) SetCreateTime(v time.Time) *LaunchTemplateVersion {
+ s.CreateTime = &v
+ return s
+}
+
+// SetCreatedBy sets the CreatedBy field's value.
+func (s *LaunchTemplateVersion) SetCreatedBy(v string) *LaunchTemplateVersion {
+ s.CreatedBy = &v
+ return s
+}
+
+// SetDefaultVersion sets the DefaultVersion field's value.
+func (s *LaunchTemplateVersion) SetDefaultVersion(v bool) *LaunchTemplateVersion {
+ s.DefaultVersion = &v
+ return s
+}
+
+// SetLaunchTemplateData sets the LaunchTemplateData field's value.
+func (s *LaunchTemplateVersion) SetLaunchTemplateData(v *ResponseLaunchTemplateData) *LaunchTemplateVersion {
+ s.LaunchTemplateData = v
+ return s
+}
+
+// SetLaunchTemplateId sets the LaunchTemplateId field's value.
+func (s *LaunchTemplateVersion) SetLaunchTemplateId(v string) *LaunchTemplateVersion {
+ s.LaunchTemplateId = &v
+ return s
+}
+
+// SetLaunchTemplateName sets the LaunchTemplateName field's value.
+func (s *LaunchTemplateVersion) SetLaunchTemplateName(v string) *LaunchTemplateVersion {
+ s.LaunchTemplateName = &v
+ return s
+}
+
+// SetVersionDescription sets the VersionDescription field's value.
+func (s *LaunchTemplateVersion) SetVersionDescription(v string) *LaunchTemplateVersion {
+ s.VersionDescription = &v
+ return s
+}
+
+// SetVersionNumber sets the VersionNumber field's value.
+func (s *LaunchTemplateVersion) SetVersionNumber(v int64) *LaunchTemplateVersion {
+ s.VersionNumber = &v
+ return s
+}
+
+// Describes the monitoring for the instance.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplatesMonitoring
+type LaunchTemplatesMonitoring struct {
+ _ struct{} `type:"structure"`
+
+ // Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring
+ // is enabled.
+ Enabled *bool `locationName:"enabled" type:"boolean"`
+}
+
+// String returns the string representation
+func (s LaunchTemplatesMonitoring) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchTemplatesMonitoring) GoString() string {
+ return s.String()
+}
+
+// SetEnabled sets the Enabled field's value.
+func (s *LaunchTemplatesMonitoring) SetEnabled(v bool) *LaunchTemplatesMonitoring {
+ s.Enabled = &v
+ return s
+}
+
+// Describes the monitoring for the instance.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplatesMonitoringRequest
+type LaunchTemplatesMonitoringRequest struct {
+ _ struct{} `type:"structure"`
+
+ // Specify true to enable detailed monitoring. Otherwise, basic monitoring is
+ // enabled.
+ Enabled *bool `type:"boolean"`
+}
+
+// String returns the string representation
+func (s LaunchTemplatesMonitoringRequest) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchTemplatesMonitoringRequest) GoString() string {
+ return s.String()
+}
+
+// SetEnabled sets the Enabled field's value.
+func (s *LaunchTemplatesMonitoringRequest) SetEnabled(v bool) *LaunchTemplatesMonitoringRequest {
+ s.Enabled = &v
+ return s
+}
+
+// Describes the Classic Load Balancers and target groups to attach to a Spot
+// Fleet request.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LoadBalancersConfig
+type LoadBalancersConfig struct {
+ _ struct{} `type:"structure"`
+
+ // The Classic Load Balancers.
+ ClassicLoadBalancersConfig *ClassicLoadBalancersConfig `locationName:"classicLoadBalancersConfig" type:"structure"`
+
+ // The target groups.
+ TargetGroupsConfig *TargetGroupsConfig `locationName:"targetGroupsConfig" type:"structure"`
+}
+
+// String returns the string representation
+func (s LoadBalancersConfig) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LoadBalancersConfig) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *LoadBalancersConfig) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "LoadBalancersConfig"}
+ if s.ClassicLoadBalancersConfig != nil {
+ if err := s.ClassicLoadBalancersConfig.Validate(); err != nil {
+ invalidParams.AddNested("ClassicLoadBalancersConfig", err.(request.ErrInvalidParams))
+ }
+ }
+ if s.TargetGroupsConfig != nil {
+ if err := s.TargetGroupsConfig.Validate(); err != nil {
+ invalidParams.AddNested("TargetGroupsConfig", err.(request.ErrInvalidParams))
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetClassicLoadBalancersConfig sets the ClassicLoadBalancersConfig field's value.
+func (s *LoadBalancersConfig) SetClassicLoadBalancersConfig(v *ClassicLoadBalancersConfig) *LoadBalancersConfig {
+ s.ClassicLoadBalancersConfig = v
+ return s
+}
+
+// SetTargetGroupsConfig sets the TargetGroupsConfig field's value.
+func (s *LoadBalancersConfig) SetTargetGroupsConfig(v *TargetGroupsConfig) *LoadBalancersConfig {
+ s.TargetGroupsConfig = v
+ return s
+}
+
+// Describes a load permission.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LoadPermission
+type LoadPermission struct {
+ _ struct{} `type:"structure"`
+
+ // The name of the group.
+ Group *string `locationName:"group" type:"string" enum:"PermissionGroup"`
+
+ // The AWS account ID.
+ UserId *string `locationName:"userId" type:"string"`
+}
+
+// String returns the string representation
+func (s LoadPermission) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LoadPermission) GoString() string {
+ return s.String()
+}
+
+// SetGroup sets the Group field's value.
+func (s *LoadPermission) SetGroup(v string) *LoadPermission {
+ s.Group = &v
+ return s
+}
+
+// SetUserId sets the UserId field's value.
+func (s *LoadPermission) SetUserId(v string) *LoadPermission {
+ s.UserId = &v
+ return s
+}
+
+// Describes modifications to the load permissions of an Amazon FPGA image (AFI).
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LoadPermissionModifications
+type LoadPermissionModifications struct {
+ _ struct{} `type:"structure"`
+
+ // The load permissions to add.
+ Add []*LoadPermissionRequest `locationNameList:"item" type:"list"`
+
+ // The load permissions to remove.
+ Remove []*LoadPermissionRequest `locationNameList:"item" type:"list"`
+}
+
+// String returns the string representation
+func (s LoadPermissionModifications) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LoadPermissionModifications) GoString() string {
+ return s.String()
+}
+
+// SetAdd sets the Add field's value.
+func (s *LoadPermissionModifications) SetAdd(v []*LoadPermissionRequest) *LoadPermissionModifications {
+ s.Add = v
+ return s
+}
+
+// SetRemove sets the Remove field's value.
+func (s *LoadPermissionModifications) SetRemove(v []*LoadPermissionRequest) *LoadPermissionModifications {
+ s.Remove = v
+ return s
+}
+
+// Describes a load permission.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LoadPermissionRequest
+type LoadPermissionRequest struct {
+ _ struct{} `type:"structure"`
+
+ // The name of the group.
+ Group *string `type:"string" enum:"PermissionGroup"`
+
+ // The AWS account ID.
+ UserId *string `type:"string"`
+}
+
+// String returns the string representation
+func (s LoadPermissionRequest) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LoadPermissionRequest) GoString() string {
+ return s.String()
+}
+
+// SetGroup sets the Group field's value.
+func (s *LoadPermissionRequest) SetGroup(v string) *LoadPermissionRequest {
+ s.Group = &v
+ return s
+}
+
+// SetUserId sets the UserId field's value.
+func (s *LoadPermissionRequest) SetUserId(v string) *LoadPermissionRequest {
+ s.UserId = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyFpgaImageAttributeRequest
+type ModifyFpgaImageAttributeInput struct {
+ _ struct{} `type:"structure"`
+
+ // The name of the attribute.
+ Attribute *string `type:"string" enum:"FpgaImageAttributeName"`
+
+ // A description for the AFI.
+ Description *string `type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The ID of the AFI.
+ //
+ // FpgaImageId is a required field
+ FpgaImageId *string `type:"string" required:"true"`
+
+ // The load permission for the AFI.
+ LoadPermission *LoadPermissionModifications `type:"structure"`
+
+ // A name for the AFI.
+ Name *string `type:"string"`
+
+ // The operation type.
+ OperationType *string `type:"string" enum:"OperationType"`
+
+ // One or more product codes. After you add a product code to an AFI, it can't
+ // be removed. This parameter is valid only when modifying the productCodes
+ // attribute.
+ ProductCodes []*string `locationName:"ProductCode" locationNameList:"ProductCode" type:"list"`
+
+ // One or more user groups. This parameter is valid only when modifying the
+ // loadPermission attribute.
+ UserGroups []*string `locationName:"UserGroup" locationNameList:"UserGroup" type:"list"`
+
+ // One or more AWS account IDs. This parameter is valid only when modifying
+ // the loadPermission attribute.
+ UserIds []*string `locationName:"UserId" locationNameList:"UserId" type:"list"`
+}
+
+// String returns the string representation
+func (s ModifyFpgaImageAttributeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyFpgaImageAttributeInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ModifyFpgaImageAttributeInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ModifyFpgaImageAttributeInput"}
+ if s.FpgaImageId == nil {
+ invalidParams.Add(request.NewErrParamRequired("FpgaImageId"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetAttribute sets the Attribute field's value.
+func (s *ModifyFpgaImageAttributeInput) SetAttribute(v string) *ModifyFpgaImageAttributeInput {
+ s.Attribute = &v
+ return s
+}
+
+// SetDescription sets the Description field's value.
+func (s *ModifyFpgaImageAttributeInput) SetDescription(v string) *ModifyFpgaImageAttributeInput {
+ s.Description = &v
+ return s
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *ModifyFpgaImageAttributeInput) SetDryRun(v bool) *ModifyFpgaImageAttributeInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetFpgaImageId sets the FpgaImageId field's value.
+func (s *ModifyFpgaImageAttributeInput) SetFpgaImageId(v string) *ModifyFpgaImageAttributeInput {
+ s.FpgaImageId = &v
+ return s
+}
+
+// SetLoadPermission sets the LoadPermission field's value.
+func (s *ModifyFpgaImageAttributeInput) SetLoadPermission(v *LoadPermissionModifications) *ModifyFpgaImageAttributeInput {
+ s.LoadPermission = v
+ return s
+}
+
+// SetName sets the Name field's value.
+func (s *ModifyFpgaImageAttributeInput) SetName(v string) *ModifyFpgaImageAttributeInput {
+ s.Name = &v
+ return s
+}
+
+// SetOperationType sets the OperationType field's value.
+func (s *ModifyFpgaImageAttributeInput) SetOperationType(v string) *ModifyFpgaImageAttributeInput {
+ s.OperationType = &v
+ return s
+}
+
+// SetProductCodes sets the ProductCodes field's value.
+func (s *ModifyFpgaImageAttributeInput) SetProductCodes(v []*string) *ModifyFpgaImageAttributeInput {
+ s.ProductCodes = v
+ return s
+}
+
+// SetUserGroups sets the UserGroups field's value.
+func (s *ModifyFpgaImageAttributeInput) SetUserGroups(v []*string) *ModifyFpgaImageAttributeInput {
+ s.UserGroups = v
+ return s
+}
+
+// SetUserIds sets the UserIds field's value.
+func (s *ModifyFpgaImageAttributeInput) SetUserIds(v []*string) *ModifyFpgaImageAttributeInput {
+ s.UserIds = v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyFpgaImageAttributeResult
+type ModifyFpgaImageAttributeOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Information about the attribute.
+ FpgaImageAttribute *FpgaImageAttribute `locationName:"fpgaImageAttribute" type:"structure"`
+}
+
+// String returns the string representation
+func (s ModifyFpgaImageAttributeOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyFpgaImageAttributeOutput) GoString() string {
+ return s.String()
+}
+
+// SetFpgaImageAttribute sets the FpgaImageAttribute field's value.
+func (s *ModifyFpgaImageAttributeOutput) SetFpgaImageAttribute(v *FpgaImageAttribute) *ModifyFpgaImageAttributeOutput {
+ s.FpgaImageAttribute = v
+ return s
+}
+
// Contains the parameters for ModifyHosts.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyHostsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyHostsRequest
type ModifyHostsInput struct {
_ struct{} `type:"structure"`
@@ -44616,7 +51831,7 @@ func (s *ModifyHostsInput) SetHostIds(v []*string) *ModifyHostsInput {
}
// Contains the output of ModifyHosts.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyHostsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyHostsResult
type ModifyHostsOutput struct {
_ struct{} `type:"structure"`
@@ -44651,7 +51866,7 @@ func (s *ModifyHostsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *ModifyHostsO
}
// Contains the parameters of ModifyIdFormat.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdFormatRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdFormatRequest
type ModifyIdFormatInput struct {
_ struct{} `type:"structure"`
@@ -44704,7 +51919,7 @@ func (s *ModifyIdFormatInput) SetUseLongIds(v bool) *ModifyIdFormatInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdFormatOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdFormatOutput
type ModifyIdFormatOutput struct {
_ struct{} `type:"structure"`
}
@@ -44720,7 +51935,7 @@ func (s ModifyIdFormatOutput) GoString() string {
}
// Contains the parameters of ModifyIdentityIdFormat.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdentityIdFormatRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdentityIdFormatRequest
type ModifyIdentityIdFormatInput struct {
_ struct{} `type:"structure"`
@@ -44789,7 +52004,7 @@ func (s *ModifyIdentityIdFormatInput) SetUseLongIds(v bool) *ModifyIdentityIdFor
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdentityIdFormatOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyIdentityIdFormatOutput
type ModifyIdentityIdFormatOutput struct {
_ struct{} `type:"structure"`
}
@@ -44805,14 +52020,15 @@ func (s ModifyIdentityIdFormatOutput) GoString() string {
}
// Contains the parameters for ModifyImageAttribute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyImageAttributeRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyImageAttributeRequest
type ModifyImageAttributeInput struct {
_ struct{} `type:"structure"`
- // The name of the attribute to modify.
+ // The name of the attribute to modify. The valid values are description, launchPermission,
+ // and productCodes.
Attribute *string `type:"string"`
- // A description for the AMI.
+ // A new description for the AMI.
Description *AttributeValue `type:"structure"`
// Checks whether you have the required permissions for the action, without
@@ -44826,26 +52042,27 @@ type ModifyImageAttributeInput struct {
// ImageId is a required field
ImageId *string `type:"string" required:"true"`
- // A launch permission modification.
+ // A new launch permission for the AMI.
LaunchPermission *LaunchPermissionModifications `type:"structure"`
- // The operation type.
+ // The operation type. This parameter can be used only when the Attribute parameter
+ // is launchPermission.
OperationType *string `type:"string" enum:"OperationType"`
- // One or more product codes. After you add a product code to an AMI, it can't
- // be removed. This is only valid when modifying the productCodes attribute.
+ // One or more DevPay product codes. After you add a product code to an AMI,
+ // it can't be removed.
ProductCodes []*string `locationName:"ProductCode" locationNameList:"ProductCode" type:"list"`
- // One or more user groups. This is only valid when modifying the launchPermission
- // attribute.
+ // One or more user groups. This parameter can be used only when the Attribute
+ // parameter is launchPermission.
UserGroups []*string `locationName:"UserGroup" locationNameList:"UserGroup" type:"list"`
- // One or more AWS account IDs. This is only valid when modifying the launchPermission
- // attribute.
+ // One or more AWS account IDs. This parameter can be used only when the Attribute
+ // parameter is launchPermission.
UserIds []*string `locationName:"UserId" locationNameList:"UserId" type:"list"`
- // The value of the attribute being modified. This is only valid when modifying
- // the description attribute.
+ // The value of the attribute being modified. This parameter can be used only
+ // when the Attribute parameter is description or productCodes.
Value *string `type:"string"`
}
@@ -44932,7 +52149,7 @@ func (s *ModifyImageAttributeInput) SetValue(v string) *ModifyImageAttributeInpu
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyImageAttributeOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyImageAttributeOutput
type ModifyImageAttributeOutput struct {
_ struct{} `type:"structure"`
}
@@ -44948,7 +52165,7 @@ func (s ModifyImageAttributeOutput) GoString() string {
}
// Contains the parameters for ModifyInstanceAttribute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceAttributeRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceAttributeRequest
type ModifyInstanceAttributeInput struct {
_ struct{} `type:"structure"`
@@ -44977,7 +52194,7 @@ type ModifyInstanceAttributeInput struct {
// it is UnauthorizedOperation.
DryRun *bool `locationName:"dryRun" type:"boolean"`
- // Specifies whether the instance is optimized for EBS I/O. This optimization
+ // Specifies whether the instance is optimized for Amazon EBS I/O. This optimization
// provides dedicated throughput to Amazon EBS and an optimized configuration
// stack to provide optimal EBS I/O performance. This optimization isn't available
// with all instance types. Additional usage charges apply when using an EBS
@@ -45020,8 +52237,8 @@ type ModifyInstanceAttributeInput struct {
Ramdisk *AttributeValue `locationName:"ramdisk" type:"structure"`
// Specifies whether source/destination checking is enabled. A value of true
- // means that checking is enabled, and false means checking is disabled. This
- // value must be false for a NAT instance to perform NAT.
+ // means that checking is enabled, and false means that checking is disabled.
+ // This value must be false for a NAT instance to perform NAT.
SourceDestCheck *AttributeBooleanValue `type:"structure"`
// Set to simple to enable enhanced networking with the Intel 82599 Virtual
@@ -45035,8 +52252,8 @@ type ModifyInstanceAttributeInput struct {
SriovNetSupport *AttributeValue `locationName:"sriovNetSupport" type:"structure"`
// Changes the instance's user data to the specified value. If you are using
- // an AWS SDK or command line tool, Base64-encoding is performed for you, and
- // you can load the text from a file. Otherwise, you must provide Base64-encoded
+ // an AWS SDK or command line tool, base64-encoding is performed for you, and
+ // you can load the text from a file. Otherwise, you must provide base64-encoded
// text.
UserData *BlobAttributeValue `locationName:"userData" type:"structure"`
@@ -45164,7 +52381,7 @@ func (s *ModifyInstanceAttributeInput) SetValue(v string) *ModifyInstanceAttribu
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceAttributeOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceAttributeOutput
type ModifyInstanceAttributeOutput struct {
_ struct{} `type:"structure"`
}
@@ -45179,8 +52396,105 @@ func (s ModifyInstanceAttributeOutput) GoString() string {
return s.String()
}
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceCreditSpecificationRequest
+type ModifyInstanceCreditSpecificationInput struct {
+ _ struct{} `type:"structure"`
+
+ // A unique, case-sensitive token that you provide to ensure idempotency of
+ // your modification request. For more information, see Ensuring Idempotency
+ // (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string `type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // Information about the credit option for CPU usage.
+ //
+ // InstanceCreditSpecifications is a required field
+ InstanceCreditSpecifications []*InstanceCreditSpecificationRequest `locationName:"InstanceCreditSpecification" locationNameList:"item" type:"list" required:"true"`
+}
+
+// String returns the string representation
+func (s ModifyInstanceCreditSpecificationInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyInstanceCreditSpecificationInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ModifyInstanceCreditSpecificationInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ModifyInstanceCreditSpecificationInput"}
+ if s.InstanceCreditSpecifications == nil {
+ invalidParams.Add(request.NewErrParamRequired("InstanceCreditSpecifications"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetClientToken sets the ClientToken field's value.
+func (s *ModifyInstanceCreditSpecificationInput) SetClientToken(v string) *ModifyInstanceCreditSpecificationInput {
+ s.ClientToken = &v
+ return s
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *ModifyInstanceCreditSpecificationInput) SetDryRun(v bool) *ModifyInstanceCreditSpecificationInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetInstanceCreditSpecifications sets the InstanceCreditSpecifications field's value.
+func (s *ModifyInstanceCreditSpecificationInput) SetInstanceCreditSpecifications(v []*InstanceCreditSpecificationRequest) *ModifyInstanceCreditSpecificationInput {
+ s.InstanceCreditSpecifications = v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceCreditSpecificationResult
+type ModifyInstanceCreditSpecificationOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Information about the instances whose credit option for CPU usage was successfully
+ // modified.
+ SuccessfulInstanceCreditSpecifications []*SuccessfulInstanceCreditSpecificationItem `locationName:"successfulInstanceCreditSpecificationSet" locationNameList:"item" type:"list"`
+
+ // Information about the instances whose credit option for CPU usage was not
+ // modified.
+ UnsuccessfulInstanceCreditSpecifications []*UnsuccessfulInstanceCreditSpecificationItem `locationName:"unsuccessfulInstanceCreditSpecificationSet" locationNameList:"item" type:"list"`
+}
+
+// String returns the string representation
+func (s ModifyInstanceCreditSpecificationOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyInstanceCreditSpecificationOutput) GoString() string {
+ return s.String()
+}
+
+// SetSuccessfulInstanceCreditSpecifications sets the SuccessfulInstanceCreditSpecifications field's value.
+func (s *ModifyInstanceCreditSpecificationOutput) SetSuccessfulInstanceCreditSpecifications(v []*SuccessfulInstanceCreditSpecificationItem) *ModifyInstanceCreditSpecificationOutput {
+ s.SuccessfulInstanceCreditSpecifications = v
+ return s
+}
+
+// SetUnsuccessfulInstanceCreditSpecifications sets the UnsuccessfulInstanceCreditSpecifications field's value.
+func (s *ModifyInstanceCreditSpecificationOutput) SetUnsuccessfulInstanceCreditSpecifications(v []*UnsuccessfulInstanceCreditSpecificationItem) *ModifyInstanceCreditSpecificationOutput {
+ s.UnsuccessfulInstanceCreditSpecifications = v
+ return s
+}
+
// Contains the parameters for ModifyInstancePlacement.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstancePlacementRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstancePlacementRequest
type ModifyInstancePlacementInput struct {
_ struct{} `type:"structure"`
@@ -45247,7 +52561,7 @@ func (s *ModifyInstancePlacementInput) SetTenancy(v string) *ModifyInstancePlace
}
// Contains the output of ModifyInstancePlacement.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstancePlacementResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstancePlacementResult
type ModifyInstancePlacementOutput struct {
_ struct{} `type:"structure"`
@@ -45271,8 +52585,111 @@ func (s *ModifyInstancePlacementOutput) SetReturn(v bool) *ModifyInstancePlaceme
return s
}
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyLaunchTemplateRequest
+type ModifyLaunchTemplateInput struct {
+ _ struct{} `type:"structure"`
+
+ // Unique, case-sensitive identifier you provide to ensure the idempotency of
+ // the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string `type:"string"`
+
+ // The version number of the launch template to set as the default version.
+ DefaultVersion *string `locationName:"SetDefaultVersion" type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The ID of the launch template. You must specify either the launch template
+ // ID or launch template name in the request.
+ LaunchTemplateId *string `type:"string"`
+
+ // The name of the launch template. You must specify either the launch template
+ // ID or launch template name in the request.
+ LaunchTemplateName *string `min:"3" type:"string"`
+}
+
+// String returns the string representation
+func (s ModifyLaunchTemplateInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyLaunchTemplateInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ModifyLaunchTemplateInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ModifyLaunchTemplateInput"}
+ if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 {
+ invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetClientToken sets the ClientToken field's value.
+func (s *ModifyLaunchTemplateInput) SetClientToken(v string) *ModifyLaunchTemplateInput {
+ s.ClientToken = &v
+ return s
+}
+
+// SetDefaultVersion sets the DefaultVersion field's value.
+func (s *ModifyLaunchTemplateInput) SetDefaultVersion(v string) *ModifyLaunchTemplateInput {
+ s.DefaultVersion = &v
+ return s
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *ModifyLaunchTemplateInput) SetDryRun(v bool) *ModifyLaunchTemplateInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetLaunchTemplateId sets the LaunchTemplateId field's value.
+func (s *ModifyLaunchTemplateInput) SetLaunchTemplateId(v string) *ModifyLaunchTemplateInput {
+ s.LaunchTemplateId = &v
+ return s
+}
+
+// SetLaunchTemplateName sets the LaunchTemplateName field's value.
+func (s *ModifyLaunchTemplateInput) SetLaunchTemplateName(v string) *ModifyLaunchTemplateInput {
+ s.LaunchTemplateName = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyLaunchTemplateResult
+type ModifyLaunchTemplateOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Information about the launch template.
+ LaunchTemplate *LaunchTemplate `locationName:"launchTemplate" type:"structure"`
+}
+
+// String returns the string representation
+func (s ModifyLaunchTemplateOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyLaunchTemplateOutput) GoString() string {
+ return s.String()
+}
+
+// SetLaunchTemplate sets the LaunchTemplate field's value.
+func (s *ModifyLaunchTemplateOutput) SetLaunchTemplate(v *LaunchTemplate) *ModifyLaunchTemplateOutput {
+ s.LaunchTemplate = v
+ return s
+}
+
// Contains the parameters for ModifyNetworkInterfaceAttribute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyNetworkInterfaceAttributeRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyNetworkInterfaceAttributeRequest
type ModifyNetworkInterfaceAttributeInput struct {
_ struct{} `type:"structure"`
@@ -45367,7 +52784,7 @@ func (s *ModifyNetworkInterfaceAttributeInput) SetSourceDestCheck(v *AttributeBo
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyNetworkInterfaceAttributeOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyNetworkInterfaceAttributeOutput
type ModifyNetworkInterfaceAttributeOutput struct {
_ struct{} `type:"structure"`
}
@@ -45383,7 +52800,7 @@ func (s ModifyNetworkInterfaceAttributeOutput) GoString() string {
}
// Contains the parameters for ModifyReservedInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyReservedInstancesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyReservedInstancesRequest
type ModifyReservedInstancesInput struct {
_ struct{} `type:"structure"`
@@ -45447,7 +52864,7 @@ func (s *ModifyReservedInstancesInput) SetTargetConfigurations(v []*ReservedInst
}
// Contains the output of ModifyReservedInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyReservedInstancesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyReservedInstancesResult
type ModifyReservedInstancesOutput struct {
_ struct{} `type:"structure"`
@@ -45472,7 +52889,7 @@ func (s *ModifyReservedInstancesOutput) SetReservedInstancesModificationId(v str
}
// Contains the parameters for ModifySnapshotAttribute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySnapshotAttributeRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySnapshotAttributeRequest
type ModifySnapshotAttributeInput struct {
_ struct{} `type:"structure"`
@@ -45570,7 +52987,7 @@ func (s *ModifySnapshotAttributeInput) SetUserIds(v []*string) *ModifySnapshotAt
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySnapshotAttributeOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySnapshotAttributeOutput
type ModifySnapshotAttributeOutput struct {
_ struct{} `type:"structure"`
}
@@ -45586,16 +53003,16 @@ func (s ModifySnapshotAttributeOutput) GoString() string {
}
// Contains the parameters for ModifySpotFleetRequest.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySpotFleetRequestRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySpotFleetRequestRequest
type ModifySpotFleetRequestInput struct {
_ struct{} `type:"structure"`
- // Indicates whether running Spot instances should be terminated if the target
- // capacity of the Spot fleet request is decreased below the current size of
- // the Spot fleet.
+ // Indicates whether running Spot Instances should be terminated if the target
+ // capacity of the Spot Fleet request is decreased below the current size of
+ // the Spot Fleet.
ExcessCapacityTerminationPolicy *string `locationName:"excessCapacityTerminationPolicy" type:"string" enum:"ExcessCapacityTerminationPolicy"`
- // The ID of the Spot fleet request.
+ // The ID of the Spot Fleet request.
//
// SpotFleetRequestId is a required field
SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
@@ -45646,7 +53063,7 @@ func (s *ModifySpotFleetRequestInput) SetTargetCapacity(v int64) *ModifySpotFlee
}
// Contains the output of ModifySpotFleetRequest.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySpotFleetRequestResponse
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySpotFleetRequestResponse
type ModifySpotFleetRequestOutput struct {
_ struct{} `type:"structure"`
@@ -45671,7 +53088,7 @@ func (s *ModifySpotFleetRequestOutput) SetReturn(v bool) *ModifySpotFleetRequest
}
// Contains the parameters for ModifySubnetAttribute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySubnetAttributeRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySubnetAttributeRequest
type ModifySubnetAttributeInput struct {
_ struct{} `type:"structure"`
@@ -45738,7 +53155,7 @@ func (s *ModifySubnetAttributeInput) SetSubnetId(v string) *ModifySubnetAttribut
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySubnetAttributeOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySubnetAttributeOutput
type ModifySubnetAttributeOutput struct {
_ struct{} `type:"structure"`
}
@@ -45754,7 +53171,7 @@ func (s ModifySubnetAttributeOutput) GoString() string {
}
// Contains the parameters for ModifyVolumeAttribute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolumeAttributeRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolumeAttributeRequest
type ModifyVolumeAttributeInput struct {
_ struct{} `type:"structure"`
@@ -45814,7 +53231,7 @@ func (s *ModifyVolumeAttributeInput) SetVolumeId(v string) *ModifyVolumeAttribut
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolumeAttributeOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolumeAttributeOutput
type ModifyVolumeAttributeOutput struct {
_ struct{} `type:"structure"`
}
@@ -45829,7 +53246,7 @@ func (s ModifyVolumeAttributeOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolumeRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolumeRequest
type ModifyVolumeInput struct {
_ struct{} `type:"structure"`
@@ -45921,7 +53338,7 @@ func (s *ModifyVolumeInput) SetVolumeType(v string) *ModifyVolumeInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolumeResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVolumeResult
type ModifyVolumeOutput struct {
_ struct{} `type:"structure"`
@@ -45946,7 +53363,7 @@ func (s *ModifyVolumeOutput) SetVolumeModification(v *VolumeModification) *Modif
}
// Contains the parameters for ModifyVpcAttribute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcAttributeRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcAttributeRequest
type ModifyVpcAttributeInput struct {
_ struct{} `type:"structure"`
@@ -46015,7 +53432,7 @@ func (s *ModifyVpcAttributeInput) SetVpcId(v string) *ModifyVpcAttributeInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcAttributeOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcAttributeOutput
type ModifyVpcAttributeOutput struct {
_ struct{} `type:"structure"`
}
@@ -46030,29 +53447,141 @@ func (s ModifyVpcAttributeOutput) GoString() string {
return s.String()
}
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointConnectionNotificationRequest
+type ModifyVpcEndpointConnectionNotificationInput struct {
+ _ struct{} `type:"structure"`
+
+ // One or more events for the endpoint. Valid values are Accept, Connect, Delete,
+ // and Reject.
+ ConnectionEvents []*string `locationNameList:"item" type:"list"`
+
+ // The ARN for the SNS topic for the notification.
+ ConnectionNotificationArn *string `type:"string"`
+
+ // The ID of the notification.
+ //
+ // ConnectionNotificationId is a required field
+ ConnectionNotificationId *string `type:"string" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+}
+
+// String returns the string representation
+func (s ModifyVpcEndpointConnectionNotificationInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyVpcEndpointConnectionNotificationInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ModifyVpcEndpointConnectionNotificationInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ModifyVpcEndpointConnectionNotificationInput"}
+ if s.ConnectionNotificationId == nil {
+ invalidParams.Add(request.NewErrParamRequired("ConnectionNotificationId"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetConnectionEvents sets the ConnectionEvents field's value.
+func (s *ModifyVpcEndpointConnectionNotificationInput) SetConnectionEvents(v []*string) *ModifyVpcEndpointConnectionNotificationInput {
+ s.ConnectionEvents = v
+ return s
+}
+
+// SetConnectionNotificationArn sets the ConnectionNotificationArn field's value.
+func (s *ModifyVpcEndpointConnectionNotificationInput) SetConnectionNotificationArn(v string) *ModifyVpcEndpointConnectionNotificationInput {
+ s.ConnectionNotificationArn = &v
+ return s
+}
+
+// SetConnectionNotificationId sets the ConnectionNotificationId field's value.
+func (s *ModifyVpcEndpointConnectionNotificationInput) SetConnectionNotificationId(v string) *ModifyVpcEndpointConnectionNotificationInput {
+ s.ConnectionNotificationId = &v
+ return s
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *ModifyVpcEndpointConnectionNotificationInput) SetDryRun(v bool) *ModifyVpcEndpointConnectionNotificationInput {
+ s.DryRun = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointConnectionNotificationResult
+type ModifyVpcEndpointConnectionNotificationOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ ReturnValue *bool `locationName:"return" type:"boolean"`
+}
+
+// String returns the string representation
+func (s ModifyVpcEndpointConnectionNotificationOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyVpcEndpointConnectionNotificationOutput) GoString() string {
+ return s.String()
+}
+
+// SetReturnValue sets the ReturnValue field's value.
+func (s *ModifyVpcEndpointConnectionNotificationOutput) SetReturnValue(v bool) *ModifyVpcEndpointConnectionNotificationOutput {
+ s.ReturnValue = &v
+ return s
+}
+
// Contains the parameters for ModifyVpcEndpoint.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointRequest
type ModifyVpcEndpointInput struct {
_ struct{} `type:"structure"`
- // One or more route tables IDs to associate with the endpoint.
+ // (Gateway endpoint) One or more route tables IDs to associate with the endpoint.
AddRouteTableIds []*string `locationName:"AddRouteTableId" locationNameList:"item" type:"list"`
+ // (Interface endpoint) One or more security group IDs to associate with the
+ // network interface.
+ AddSecurityGroupIds []*string `locationName:"AddSecurityGroupId" locationNameList:"item" type:"list"`
+
+ // (Interface endpoint) One or more subnet IDs in which to serve the endpoint.
+ AddSubnetIds []*string `locationName:"AddSubnetId" locationNameList:"item" type:"list"`
+
// Checks whether you have the required permissions for the action, without
// actually making the request, and provides an error response. If you have
// the required permissions, the error response is DryRunOperation. Otherwise,
// it is UnauthorizedOperation.
DryRun *bool `type:"boolean"`
- // A policy document to attach to the endpoint. The policy must be in valid
- // JSON format.
+ // (Gateway endpoint) A policy document to attach to the endpoint. The policy
+ // must be in valid JSON format.
PolicyDocument *string `type:"string"`
- // One or more route table IDs to disassociate from the endpoint.
+ // (Interface endpoint) Indicate whether a private hosted zone is associated
+ // with the VPC.
+ PrivateDnsEnabled *bool `type:"boolean"`
+
+ // (Gateway endpoint) One or more route table IDs to disassociate from the endpoint.
RemoveRouteTableIds []*string `locationName:"RemoveRouteTableId" locationNameList:"item" type:"list"`
- // Specify true to reset the policy document to the default policy. The default
- // policy allows access to the service.
+ // (Interface endpoint) One or more security group IDs to disassociate from
+ // the network interface.
+ RemoveSecurityGroupIds []*string `locationName:"RemoveSecurityGroupId" locationNameList:"item" type:"list"`
+
+ // (Interface endpoint) One or more subnets IDs in which to remove the endpoint.
+ RemoveSubnetIds []*string `locationName:"RemoveSubnetId" locationNameList:"item" type:"list"`
+
+ // (Gateway endpoint) Specify true to reset the policy document to the default
+ // policy. The default policy allows full access to the service.
ResetPolicy *bool `type:"boolean"`
// The ID of the endpoint.
@@ -46090,6 +53619,18 @@ func (s *ModifyVpcEndpointInput) SetAddRouteTableIds(v []*string) *ModifyVpcEndp
return s
}
+// SetAddSecurityGroupIds sets the AddSecurityGroupIds field's value.
+func (s *ModifyVpcEndpointInput) SetAddSecurityGroupIds(v []*string) *ModifyVpcEndpointInput {
+ s.AddSecurityGroupIds = v
+ return s
+}
+
+// SetAddSubnetIds sets the AddSubnetIds field's value.
+func (s *ModifyVpcEndpointInput) SetAddSubnetIds(v []*string) *ModifyVpcEndpointInput {
+ s.AddSubnetIds = v
+ return s
+}
+
// SetDryRun sets the DryRun field's value.
func (s *ModifyVpcEndpointInput) SetDryRun(v bool) *ModifyVpcEndpointInput {
s.DryRun = &v
@@ -46102,12 +53643,30 @@ func (s *ModifyVpcEndpointInput) SetPolicyDocument(v string) *ModifyVpcEndpointI
return s
}
+// SetPrivateDnsEnabled sets the PrivateDnsEnabled field's value.
+func (s *ModifyVpcEndpointInput) SetPrivateDnsEnabled(v bool) *ModifyVpcEndpointInput {
+ s.PrivateDnsEnabled = &v
+ return s
+}
+
// SetRemoveRouteTableIds sets the RemoveRouteTableIds field's value.
func (s *ModifyVpcEndpointInput) SetRemoveRouteTableIds(v []*string) *ModifyVpcEndpointInput {
s.RemoveRouteTableIds = v
return s
}
+// SetRemoveSecurityGroupIds sets the RemoveSecurityGroupIds field's value.
+func (s *ModifyVpcEndpointInput) SetRemoveSecurityGroupIds(v []*string) *ModifyVpcEndpointInput {
+ s.RemoveSecurityGroupIds = v
+ return s
+}
+
+// SetRemoveSubnetIds sets the RemoveSubnetIds field's value.
+func (s *ModifyVpcEndpointInput) SetRemoveSubnetIds(v []*string) *ModifyVpcEndpointInput {
+ s.RemoveSubnetIds = v
+ return s
+}
+
// SetResetPolicy sets the ResetPolicy field's value.
func (s *ModifyVpcEndpointInput) SetResetPolicy(v bool) *ModifyVpcEndpointInput {
s.ResetPolicy = &v
@@ -46120,8 +53679,7 @@ func (s *ModifyVpcEndpointInput) SetVpcEndpointId(v string) *ModifyVpcEndpointIn
return s
}
-// Contains the output of ModifyVpcEndpoint.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointResult
type ModifyVpcEndpointOutput struct {
_ struct{} `type:"structure"`
@@ -46145,7 +53703,206 @@ func (s *ModifyVpcEndpointOutput) SetReturn(v bool) *ModifyVpcEndpointOutput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcPeeringConnectionOptionsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointServiceConfigurationRequest
+type ModifyVpcEndpointServiceConfigurationInput struct {
+ _ struct{} `type:"structure"`
+
+ // Indicate whether requests to create an endpoint to your service must be accepted.
+ AcceptanceRequired *bool `type:"boolean"`
+
+ // The Amazon Resource Names (ARNs) of Network Load Balancers to add to your
+ // service configuration.
+ AddNetworkLoadBalancerArns []*string `locationName:"addNetworkLoadBalancerArn" locationNameList:"item" type:"list"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The Amazon Resource Names (ARNs) of Network Load Balancers to remove from
+ // your service configuration.
+ RemoveNetworkLoadBalancerArns []*string `locationName:"removeNetworkLoadBalancerArn" locationNameList:"item" type:"list"`
+
+ // The ID of the service.
+ //
+ // ServiceId is a required field
+ ServiceId *string `type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s ModifyVpcEndpointServiceConfigurationInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyVpcEndpointServiceConfigurationInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ModifyVpcEndpointServiceConfigurationInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ModifyVpcEndpointServiceConfigurationInput"}
+ if s.ServiceId == nil {
+ invalidParams.Add(request.NewErrParamRequired("ServiceId"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetAcceptanceRequired sets the AcceptanceRequired field's value.
+func (s *ModifyVpcEndpointServiceConfigurationInput) SetAcceptanceRequired(v bool) *ModifyVpcEndpointServiceConfigurationInput {
+ s.AcceptanceRequired = &v
+ return s
+}
+
+// SetAddNetworkLoadBalancerArns sets the AddNetworkLoadBalancerArns field's value.
+func (s *ModifyVpcEndpointServiceConfigurationInput) SetAddNetworkLoadBalancerArns(v []*string) *ModifyVpcEndpointServiceConfigurationInput {
+ s.AddNetworkLoadBalancerArns = v
+ return s
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *ModifyVpcEndpointServiceConfigurationInput) SetDryRun(v bool) *ModifyVpcEndpointServiceConfigurationInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetRemoveNetworkLoadBalancerArns sets the RemoveNetworkLoadBalancerArns field's value.
+func (s *ModifyVpcEndpointServiceConfigurationInput) SetRemoveNetworkLoadBalancerArns(v []*string) *ModifyVpcEndpointServiceConfigurationInput {
+ s.RemoveNetworkLoadBalancerArns = v
+ return s
+}
+
+// SetServiceId sets the ServiceId field's value.
+func (s *ModifyVpcEndpointServiceConfigurationInput) SetServiceId(v string) *ModifyVpcEndpointServiceConfigurationInput {
+ s.ServiceId = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointServiceConfigurationResult
+type ModifyVpcEndpointServiceConfigurationOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool `locationName:"return" type:"boolean"`
+}
+
+// String returns the string representation
+func (s ModifyVpcEndpointServiceConfigurationOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyVpcEndpointServiceConfigurationOutput) GoString() string {
+ return s.String()
+}
+
+// SetReturn sets the Return field's value.
+func (s *ModifyVpcEndpointServiceConfigurationOutput) SetReturn(v bool) *ModifyVpcEndpointServiceConfigurationOutput {
+ s.Return = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointServicePermissionsRequest
+type ModifyVpcEndpointServicePermissionsInput struct {
+ _ struct{} `type:"structure"`
+
+ // One or more Amazon Resource Names (ARNs) of principals for which to allow
+ // permission. Specify * to allow all principals.
+ AddAllowedPrincipals []*string `locationNameList:"item" type:"list"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // One or more Amazon Resource Names (ARNs) of principals for which to remove
+ // permission.
+ RemoveAllowedPrincipals []*string `locationNameList:"item" type:"list"`
+
+ // The ID of the service.
+ //
+ // ServiceId is a required field
+ ServiceId *string `type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s ModifyVpcEndpointServicePermissionsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyVpcEndpointServicePermissionsInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ModifyVpcEndpointServicePermissionsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ModifyVpcEndpointServicePermissionsInput"}
+ if s.ServiceId == nil {
+ invalidParams.Add(request.NewErrParamRequired("ServiceId"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetAddAllowedPrincipals sets the AddAllowedPrincipals field's value.
+func (s *ModifyVpcEndpointServicePermissionsInput) SetAddAllowedPrincipals(v []*string) *ModifyVpcEndpointServicePermissionsInput {
+ s.AddAllowedPrincipals = v
+ return s
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *ModifyVpcEndpointServicePermissionsInput) SetDryRun(v bool) *ModifyVpcEndpointServicePermissionsInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetRemoveAllowedPrincipals sets the RemoveAllowedPrincipals field's value.
+func (s *ModifyVpcEndpointServicePermissionsInput) SetRemoveAllowedPrincipals(v []*string) *ModifyVpcEndpointServicePermissionsInput {
+ s.RemoveAllowedPrincipals = v
+ return s
+}
+
+// SetServiceId sets the ServiceId field's value.
+func (s *ModifyVpcEndpointServicePermissionsInput) SetServiceId(v string) *ModifyVpcEndpointServicePermissionsInput {
+ s.ServiceId = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcEndpointServicePermissionsResult
+type ModifyVpcEndpointServicePermissionsOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ ReturnValue *bool `locationName:"return" type:"boolean"`
+}
+
+// String returns the string representation
+func (s ModifyVpcEndpointServicePermissionsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyVpcEndpointServicePermissionsOutput) GoString() string {
+ return s.String()
+}
+
+// SetReturnValue sets the ReturnValue field's value.
+func (s *ModifyVpcEndpointServicePermissionsOutput) SetReturnValue(v bool) *ModifyVpcEndpointServicePermissionsOutput {
+ s.ReturnValue = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcPeeringConnectionOptionsRequest
type ModifyVpcPeeringConnectionOptionsInput struct {
_ struct{} `type:"structure"`
@@ -46214,7 +53971,7 @@ func (s *ModifyVpcPeeringConnectionOptionsInput) SetVpcPeeringConnectionId(v str
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcPeeringConnectionOptionsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcPeeringConnectionOptionsResult
type ModifyVpcPeeringConnectionOptionsOutput struct {
_ struct{} `type:"structure"`
@@ -46247,8 +54004,99 @@ func (s *ModifyVpcPeeringConnectionOptionsOutput) SetRequesterPeeringConnectionO
return s
}
+// Contains the parameters for ModifyVpcTenancy.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcTenancyRequest
+type ModifyVpcTenancyInput struct {
+ _ struct{} `type:"structure"`
+
+ // Checks whether you have the required permissions for the operation, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The instance tenancy attribute for the VPC.
+ //
+ // InstanceTenancy is a required field
+ InstanceTenancy *string `type:"string" required:"true" enum:"VpcTenancy"`
+
+ // The ID of the VPC.
+ //
+ // VpcId is a required field
+ VpcId *string `type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s ModifyVpcTenancyInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyVpcTenancyInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ModifyVpcTenancyInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ModifyVpcTenancyInput"}
+ if s.InstanceTenancy == nil {
+ invalidParams.Add(request.NewErrParamRequired("InstanceTenancy"))
+ }
+ if s.VpcId == nil {
+ invalidParams.Add(request.NewErrParamRequired("VpcId"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *ModifyVpcTenancyInput) SetDryRun(v bool) *ModifyVpcTenancyInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetInstanceTenancy sets the InstanceTenancy field's value.
+func (s *ModifyVpcTenancyInput) SetInstanceTenancy(v string) *ModifyVpcTenancyInput {
+ s.InstanceTenancy = &v
+ return s
+}
+
+// SetVpcId sets the VpcId field's value.
+func (s *ModifyVpcTenancyInput) SetVpcId(v string) *ModifyVpcTenancyInput {
+ s.VpcId = &v
+ return s
+}
+
+// Contains the output of ModifyVpcTenancy.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyVpcTenancyResult
+type ModifyVpcTenancyOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Returns true if the request succeeds; otherwise, returns an error.
+ ReturnValue *bool `locationName:"return" type:"boolean"`
+}
+
+// String returns the string representation
+func (s ModifyVpcTenancyOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyVpcTenancyOutput) GoString() string {
+ return s.String()
+}
+
+// SetReturnValue sets the ReturnValue field's value.
+func (s *ModifyVpcTenancyOutput) SetReturnValue(v bool) *ModifyVpcTenancyOutput {
+ s.ReturnValue = &v
+ return s
+}
+
// Contains the parameters for MonitorInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MonitorInstancesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MonitorInstancesRequest
type MonitorInstancesInput struct {
_ struct{} `type:"structure"`
@@ -46300,7 +54148,7 @@ func (s *MonitorInstancesInput) SetInstanceIds(v []*string) *MonitorInstancesInp
}
// Contains the output of MonitorInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MonitorInstancesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MonitorInstancesResult
type MonitorInstancesOutput struct {
_ struct{} `type:"structure"`
@@ -46325,7 +54173,7 @@ func (s *MonitorInstancesOutput) SetInstanceMonitorings(v []*InstanceMonitoring)
}
// Describes the monitoring of an instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Monitoring
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Monitoring
type Monitoring struct {
_ struct{} `type:"structure"`
@@ -46351,7 +54199,7 @@ func (s *Monitoring) SetState(v string) *Monitoring {
}
// Contains the parameters for MoveAddressToVpc.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MoveAddressToVpcRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MoveAddressToVpcRequest
type MoveAddressToVpcInput struct {
_ struct{} `type:"structure"`
@@ -46403,7 +54251,7 @@ func (s *MoveAddressToVpcInput) SetPublicIp(v string) *MoveAddressToVpcInput {
}
// Contains the output of MoveAddressToVpc.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MoveAddressToVpcResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MoveAddressToVpcResult
type MoveAddressToVpcOutput struct {
_ struct{} `type:"structure"`
@@ -46437,7 +54285,7 @@ func (s *MoveAddressToVpcOutput) SetStatus(v string) *MoveAddressToVpcOutput {
}
// Describes the status of a moving Elastic IP address.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MovingAddressStatus
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/MovingAddressStatus
type MovingAddressStatus struct {
_ struct{} `type:"structure"`
@@ -46472,7 +54320,7 @@ func (s *MovingAddressStatus) SetPublicIp(v string) *MovingAddressStatus {
}
// Describes a NAT gateway.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NatGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NatGateway
type NatGateway struct {
_ struct{} `type:"structure"`
@@ -46543,6 +54391,9 @@ type NatGateway struct {
// The ID of the subnet in which the NAT gateway is located.
SubnetId *string `locationName:"subnetId" type:"string"`
+ // The tags for the NAT gateway.
+ Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
+
// The ID of the VPC in which the NAT gateway is located.
VpcId *string `locationName:"vpcId" type:"string"`
}
@@ -46611,6 +54462,12 @@ func (s *NatGateway) SetSubnetId(v string) *NatGateway {
return s
}
+// SetTags sets the Tags field's value.
+func (s *NatGateway) SetTags(v []*Tag) *NatGateway {
+ s.Tags = v
+ return s
+}
+
// SetVpcId sets the VpcId field's value.
func (s *NatGateway) SetVpcId(v string) *NatGateway {
s.VpcId = &v
@@ -46618,7 +54475,7 @@ func (s *NatGateway) SetVpcId(v string) *NatGateway {
}
// Describes the IP addresses and network interface associated with a NAT gateway.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NatGatewayAddress
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NatGatewayAddress
type NatGatewayAddress struct {
_ struct{} `type:"structure"`
@@ -46671,7 +54528,7 @@ func (s *NatGatewayAddress) SetPublicIp(v string) *NatGatewayAddress {
}
// Describes a network ACL.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkAcl
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkAcl
type NetworkAcl struct {
_ struct{} `type:"structure"`
@@ -46741,7 +54598,7 @@ func (s *NetworkAcl) SetVpcId(v string) *NetworkAcl {
}
// Describes an association between a network ACL and a subnet.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkAclAssociation
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkAclAssociation
type NetworkAclAssociation struct {
_ struct{} `type:"structure"`
@@ -46784,7 +54641,7 @@ func (s *NetworkAclAssociation) SetSubnetId(v string) *NetworkAclAssociation {
}
// Describes an entry in a network ACL.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkAclEntry
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkAclEntry
type NetworkAclEntry struct {
_ struct{} `type:"structure"`
@@ -46874,7 +54731,7 @@ func (s *NetworkAclEntry) SetRuleNumber(v int64) *NetworkAclEntry {
}
// Describes a network interface.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkInterface
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkInterface
type NetworkInterface struct {
_ struct{} `type:"structure"`
@@ -47072,7 +54929,7 @@ func (s *NetworkInterface) SetVpcId(v string) *NetworkInterface {
}
// Describes association information for an Elastic IP address (IPv4 only).
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkInterfaceAssociation
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkInterfaceAssociation
type NetworkInterfaceAssociation struct {
_ struct{} `type:"structure"`
@@ -47133,7 +54990,7 @@ func (s *NetworkInterfaceAssociation) SetPublicIp(v string) *NetworkInterfaceAss
}
// Describes a network interface attachment.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkInterfaceAttachment
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkInterfaceAttachment
type NetworkInterfaceAttachment struct {
_ struct{} `type:"structure"`
@@ -47212,7 +55069,7 @@ func (s *NetworkInterfaceAttachment) SetStatus(v string) *NetworkInterfaceAttach
}
// Describes an attachment change.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkInterfaceAttachmentChanges
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkInterfaceAttachmentChanges
type NetworkInterfaceAttachmentChanges struct {
_ struct{} `type:"structure"`
@@ -47246,7 +55103,7 @@ func (s *NetworkInterfaceAttachmentChanges) SetDeleteOnTermination(v bool) *Netw
}
// Describes an IPv6 address associated with a network interface.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkInterfaceIpv6Address
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkInterfaceIpv6Address
type NetworkInterfaceIpv6Address struct {
_ struct{} `type:"structure"`
@@ -47271,7 +55128,7 @@ func (s *NetworkInterfaceIpv6Address) SetIpv6Address(v string) *NetworkInterface
}
// Describes a permission for a network interface.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkInterfacePermission
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkInterfacePermission
type NetworkInterfacePermission struct {
_ struct{} `type:"structure"`
@@ -47341,7 +55198,7 @@ func (s *NetworkInterfacePermission) SetPermissionState(v *NetworkInterfacePermi
}
// Describes the state of a network interface permission.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkInterfacePermissionState
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkInterfacePermissionState
type NetworkInterfacePermissionState struct {
_ struct{} `type:"structure"`
@@ -47375,7 +55232,7 @@ func (s *NetworkInterfacePermissionState) SetStatusMessage(v string) *NetworkInt
}
// Describes the private IPv4 address of a network interface.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkInterfacePrivateIpAddress
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NetworkInterfacePrivateIpAddress
type NetworkInterfacePrivateIpAddress struct {
_ struct{} `type:"structure"`
@@ -47428,7 +55285,7 @@ func (s *NetworkInterfacePrivateIpAddress) SetPrivateIpAddress(v string) *Networ
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NewDhcpConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/NewDhcpConfiguration
type NewDhcpConfiguration struct {
_ struct{} `type:"structure"`
@@ -47461,7 +55318,7 @@ func (s *NewDhcpConfiguration) SetValues(v []*string) *NewDhcpConfiguration {
// Describes the data that identifies an Amazon FPGA image (AFI) on the PCI
// bus.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PciId
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PciId
type PciId struct {
_ struct{} `type:"structure"`
@@ -47513,7 +55370,7 @@ func (s *PciId) SetVendorId(v string) *PciId {
}
// Describes the VPC peering connection options.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PeeringConnectionOptions
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PeeringConnectionOptions
type PeeringConnectionOptions struct {
_ struct{} `type:"structure"`
@@ -47559,7 +55416,7 @@ func (s *PeeringConnectionOptions) SetAllowEgressFromLocalVpcToRemoteClassicLink
}
// The VPC peering connection options.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PeeringConnectionOptionsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PeeringConnectionOptionsRequest
type PeeringConnectionOptionsRequest struct {
_ struct{} `type:"structure"`
@@ -47605,7 +55462,7 @@ func (s *PeeringConnectionOptionsRequest) SetAllowEgressFromLocalVpcToRemoteClas
}
// Describes the placement of an instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Placement
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Placement
type Placement struct {
_ struct{} `type:"structure"`
@@ -47679,7 +55536,7 @@ func (s *Placement) SetTenancy(v string) *Placement {
}
// Describes a placement group.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PlacementGroup
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PlacementGroup
type PlacementGroup struct {
_ struct{} `type:"structure"`
@@ -47722,7 +55579,7 @@ func (s *PlacementGroup) SetStrategy(v string) *PlacementGroup {
}
// Describes a range of ports.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PortRange
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PortRange
type PortRange struct {
_ struct{} `type:"structure"`
@@ -47756,7 +55613,7 @@ func (s *PortRange) SetTo(v int64) *PortRange {
}
// Describes prefixes for AWS services.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PrefixList
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PrefixList
type PrefixList struct {
_ struct{} `type:"structure"`
@@ -47798,11 +55655,18 @@ func (s *PrefixList) SetPrefixListName(v string) *PrefixList {
return s
}
-// The ID of the prefix.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PrefixListId
+// [EC2-VPC only] The ID of the prefix.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PrefixListId
type PrefixListId struct {
_ struct{} `type:"structure"`
+ // A description for the security group rule that references this prefix list
+ // ID.
+ //
+ // Constraints: Up to 255 characters in length. Allowed characters are a-z,
+ // A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*
+ Description *string `locationName:"description" type:"string"`
+
// The ID of the prefix.
PrefixListId *string `locationName:"prefixListId" type:"string"`
}
@@ -47817,6 +55681,12 @@ func (s PrefixListId) GoString() string {
return s.String()
}
+// SetDescription sets the Description field's value.
+func (s *PrefixListId) SetDescription(v string) *PrefixListId {
+ s.Description = &v
+ return s
+}
+
// SetPrefixListId sets the PrefixListId field's value.
func (s *PrefixListId) SetPrefixListId(v string) *PrefixListId {
s.PrefixListId = &v
@@ -47824,7 +55694,7 @@ func (s *PrefixListId) SetPrefixListId(v string) *PrefixListId {
}
// Describes the price for a Reserved Instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PriceSchedule
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PriceSchedule
type PriceSchedule struct {
_ struct{} `type:"structure"`
@@ -47887,7 +55757,7 @@ func (s *PriceSchedule) SetTerm(v int64) *PriceSchedule {
}
// Describes the price for a Reserved Instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PriceScheduleSpecification
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PriceScheduleSpecification
type PriceScheduleSpecification struct {
_ struct{} `type:"structure"`
@@ -47932,7 +55802,7 @@ func (s *PriceScheduleSpecification) SetTerm(v int64) *PriceScheduleSpecificatio
}
// Describes a Reserved Instance offering.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PricingDetail
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PricingDetail
type PricingDetail struct {
_ struct{} `type:"structure"`
@@ -47966,7 +55836,7 @@ func (s *PricingDetail) SetPrice(v float64) *PricingDetail {
}
// Describes a secondary private IPv4 address for a network interface.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PrivateIpAddressSpecification
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PrivateIpAddressSpecification
type PrivateIpAddressSpecification struct {
_ struct{} `type:"structure"`
@@ -48016,7 +55886,7 @@ func (s *PrivateIpAddressSpecification) SetPrivateIpAddress(v string) *PrivateIp
}
// Describes a product code.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ProductCode
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ProductCode
type ProductCode struct {
_ struct{} `type:"structure"`
@@ -48050,7 +55920,7 @@ func (s *ProductCode) SetProductCodeType(v string) *ProductCode {
}
// Describes a virtual private gateway propagating route.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PropagatingVgw
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PropagatingVgw
type PropagatingVgw struct {
_ struct{} `type:"structure"`
@@ -48077,7 +55947,7 @@ func (s *PropagatingVgw) SetGatewayId(v string) *PropagatingVgw {
// Reserved. If you need to sustain traffic greater than the documented limits
// (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html),
// contact us through the Support Center (https://console.aws.amazon.com/support/home?).
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ProvisionedBandwidth
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ProvisionedBandwidth
type ProvisionedBandwidth struct {
_ struct{} `type:"structure"`
@@ -48148,7 +56018,7 @@ func (s *ProvisionedBandwidth) SetStatus(v string) *ProvisionedBandwidth {
}
// Describes the result of the purchase.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Purchase
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Purchase
type Purchase struct {
_ struct{} `type:"structure"`
@@ -48237,7 +56107,7 @@ func (s *Purchase) SetUpfrontPrice(v string) *Purchase {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseHostReservationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseHostReservationRequest
type PurchaseHostReservationInput struct {
_ struct{} `type:"structure"`
@@ -48327,7 +56197,7 @@ func (s *PurchaseHostReservationInput) SetOfferingId(v string) *PurchaseHostRese
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseHostReservationResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseHostReservationResult
type PurchaseHostReservationOutput struct {
_ struct{} `type:"structure"`
@@ -48341,7 +56211,7 @@ type PurchaseHostReservationOutput struct {
CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"`
// Describes the details of the purchase.
- Purchase []*Purchase `locationName:"purchase" type:"list"`
+ Purchase []*Purchase `locationName:"purchase" locationNameList:"item" type:"list"`
// The total hourly price of the reservation calculated per hour.
TotalHourlyPrice *string `locationName:"totalHourlyPrice" type:"string"`
@@ -48392,7 +56262,7 @@ func (s *PurchaseHostReservationOutput) SetTotalUpfrontPrice(v string) *Purchase
}
// Describes a request to purchase Scheduled Instances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseRequest
type PurchaseRequest struct {
_ struct{} `type:"structure"`
@@ -48446,7 +56316,7 @@ func (s *PurchaseRequest) SetPurchaseToken(v string) *PurchaseRequest {
}
// Contains the parameters for PurchaseReservedInstancesOffering.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseReservedInstancesOfferingRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseReservedInstancesOfferingRequest
type PurchaseReservedInstancesOfferingInput struct {
_ struct{} `type:"structure"`
@@ -48523,7 +56393,7 @@ func (s *PurchaseReservedInstancesOfferingInput) SetReservedInstancesOfferingId(
}
// Contains the output of PurchaseReservedInstancesOffering.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseReservedInstancesOfferingResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseReservedInstancesOfferingResult
type PurchaseReservedInstancesOfferingOutput struct {
_ struct{} `type:"structure"`
@@ -48548,7 +56418,7 @@ func (s *PurchaseReservedInstancesOfferingOutput) SetReservedInstancesId(v strin
}
// Contains the parameters for PurchaseScheduledInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseScheduledInstancesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseScheduledInstancesRequest
type PurchaseScheduledInstancesInput struct {
_ struct{} `type:"structure"`
@@ -48623,7 +56493,7 @@ func (s *PurchaseScheduledInstancesInput) SetPurchaseRequests(v []*PurchaseReque
}
// Contains the output of PurchaseScheduledInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseScheduledInstancesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseScheduledInstancesResult
type PurchaseScheduledInstancesOutput struct {
_ struct{} `type:"structure"`
@@ -48648,7 +56518,7 @@ func (s *PurchaseScheduledInstancesOutput) SetScheduledInstanceSet(v []*Schedule
}
// Contains the parameters for RebootInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RebootInstancesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RebootInstancesRequest
type RebootInstancesInput struct {
_ struct{} `type:"structure"`
@@ -48699,7 +56569,7 @@ func (s *RebootInstancesInput) SetInstanceIds(v []*string) *RebootInstancesInput
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RebootInstancesOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RebootInstancesOutput
type RebootInstancesOutput struct {
_ struct{} `type:"structure"`
}
@@ -48715,7 +56585,7 @@ func (s RebootInstancesOutput) GoString() string {
}
// Describes a recurring charge.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RecurringCharge
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RecurringCharge
type RecurringCharge struct {
_ struct{} `type:"structure"`
@@ -48749,7 +56619,7 @@ func (s *RecurringCharge) SetFrequency(v string) *RecurringCharge {
}
// Describes a region.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Region
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Region
type Region struct {
_ struct{} `type:"structure"`
@@ -48783,7 +56653,7 @@ func (s *Region) SetRegionName(v string) *Region {
}
// Contains the parameters for RegisterImage.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RegisterImageRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RegisterImageRequest
type RegisterImageInput struct {
_ struct{} `type:"structure"`
@@ -48835,7 +56705,7 @@ type RegisterImageInput struct {
// The ID of the RAM disk.
RamdiskId *string `locationName:"ramdiskId" type:"string"`
- // The name of the root device (for example, /dev/sda1, or /dev/xvda).
+ // The device name of the root device volume (for example, /dev/sda1).
RootDeviceName *string `locationName:"rootDeviceName" type:"string"`
// Set to simple to enable enhanced networking with the Intel 82599 Virtual
@@ -48848,7 +56718,7 @@ type RegisterImageInput struct {
// PV AMI can make instances launched from the AMI unreachable.
SriovNetSupport *string `locationName:"sriovNetSupport" type:"string"`
- // The type of virtualization.
+ // The type of virtualization (hvm | paravirtual).
//
// Default: paravirtual
VirtualizationType *string `locationName:"virtualizationType" type:"string"`
@@ -48956,7 +56826,7 @@ func (s *RegisterImageInput) SetVirtualizationType(v string) *RegisterImageInput
}
// Contains the output of RegisterImage.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RegisterImageResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RegisterImageResult
type RegisterImageOutput struct {
_ struct{} `type:"structure"`
@@ -48980,8 +56850,97 @@ func (s *RegisterImageOutput) SetImageId(v string) *RegisterImageOutput {
return s
}
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectVpcEndpointConnectionsRequest
+type RejectVpcEndpointConnectionsInput struct {
+ _ struct{} `type:"structure"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The ID of the service.
+ //
+ // ServiceId is a required field
+ ServiceId *string `type:"string" required:"true"`
+
+ // The IDs of one or more VPC endpoints.
+ //
+ // VpcEndpointIds is a required field
+ VpcEndpointIds []*string `locationName:"VpcEndpointId" locationNameList:"item" type:"list" required:"true"`
+}
+
+// String returns the string representation
+func (s RejectVpcEndpointConnectionsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RejectVpcEndpointConnectionsInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *RejectVpcEndpointConnectionsInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "RejectVpcEndpointConnectionsInput"}
+ if s.ServiceId == nil {
+ invalidParams.Add(request.NewErrParamRequired("ServiceId"))
+ }
+ if s.VpcEndpointIds == nil {
+ invalidParams.Add(request.NewErrParamRequired("VpcEndpointIds"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *RejectVpcEndpointConnectionsInput) SetDryRun(v bool) *RejectVpcEndpointConnectionsInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetServiceId sets the ServiceId field's value.
+func (s *RejectVpcEndpointConnectionsInput) SetServiceId(v string) *RejectVpcEndpointConnectionsInput {
+ s.ServiceId = &v
+ return s
+}
+
+// SetVpcEndpointIds sets the VpcEndpointIds field's value.
+func (s *RejectVpcEndpointConnectionsInput) SetVpcEndpointIds(v []*string) *RejectVpcEndpointConnectionsInput {
+ s.VpcEndpointIds = v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectVpcEndpointConnectionsResult
+type RejectVpcEndpointConnectionsOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Information about the endpoints that were not rejected, if applicable.
+ Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"`
+}
+
+// String returns the string representation
+func (s RejectVpcEndpointConnectionsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RejectVpcEndpointConnectionsOutput) GoString() string {
+ return s.String()
+}
+
+// SetUnsuccessful sets the Unsuccessful field's value.
+func (s *RejectVpcEndpointConnectionsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *RejectVpcEndpointConnectionsOutput {
+ s.Unsuccessful = v
+ return s
+}
+
// Contains the parameters for RejectVpcPeeringConnection.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectVpcPeeringConnectionRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectVpcPeeringConnectionRequest
type RejectVpcPeeringConnectionInput struct {
_ struct{} `type:"structure"`
@@ -49033,7 +56992,7 @@ func (s *RejectVpcPeeringConnectionInput) SetVpcPeeringConnectionId(v string) *R
}
// Contains the output of RejectVpcPeeringConnection.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectVpcPeeringConnectionResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectVpcPeeringConnectionResult
type RejectVpcPeeringConnectionOutput struct {
_ struct{} `type:"structure"`
@@ -49058,7 +57017,7 @@ func (s *RejectVpcPeeringConnectionOutput) SetReturn(v bool) *RejectVpcPeeringCo
}
// Contains the parameters for ReleaseAddress.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseAddressRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseAddressRequest
type ReleaseAddressInput struct {
_ struct{} `type:"structure"`
@@ -49103,7 +57062,7 @@ func (s *ReleaseAddressInput) SetPublicIp(v string) *ReleaseAddressInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseAddressOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseAddressOutput
type ReleaseAddressOutput struct {
_ struct{} `type:"structure"`
}
@@ -49119,7 +57078,7 @@ func (s ReleaseAddressOutput) GoString() string {
}
// Contains the parameters for ReleaseHosts.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseHostsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseHostsRequest
type ReleaseHostsInput struct {
_ struct{} `type:"structure"`
@@ -49159,7 +57118,7 @@ func (s *ReleaseHostsInput) SetHostIds(v []*string) *ReleaseHostsInput {
}
// Contains the output of ReleaseHosts.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseHostsResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReleaseHostsResult
type ReleaseHostsOutput struct {
_ struct{} `type:"structure"`
@@ -49193,7 +57152,7 @@ func (s *ReleaseHostsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *ReleaseHost
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceIamInstanceProfileAssociationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceIamInstanceProfileAssociationRequest
type ReplaceIamInstanceProfileAssociationInput struct {
_ struct{} `type:"structure"`
@@ -49246,7 +57205,7 @@ func (s *ReplaceIamInstanceProfileAssociationInput) SetIamInstanceProfile(v *Iam
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceIamInstanceProfileAssociationResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceIamInstanceProfileAssociationResult
type ReplaceIamInstanceProfileAssociationOutput struct {
_ struct{} `type:"structure"`
@@ -49271,7 +57230,7 @@ func (s *ReplaceIamInstanceProfileAssociationOutput) SetIamInstanceProfileAssoci
}
// Contains the parameters for ReplaceNetworkAclAssociation.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclAssociationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclAssociationRequest
type ReplaceNetworkAclAssociationInput struct {
_ struct{} `type:"structure"`
@@ -49338,7 +57297,7 @@ func (s *ReplaceNetworkAclAssociationInput) SetNetworkAclId(v string) *ReplaceNe
}
// Contains the output of ReplaceNetworkAclAssociation.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclAssociationResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclAssociationResult
type ReplaceNetworkAclAssociationOutput struct {
_ struct{} `type:"structure"`
@@ -49363,7 +57322,7 @@ func (s *ReplaceNetworkAclAssociationOutput) SetNewAssociationId(v string) *Repl
}
// Contains the parameters for ReplaceNetworkAclEntry.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclEntryRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclEntryRequest
type ReplaceNetworkAclEntryInput struct {
_ struct{} `type:"structure"`
@@ -49516,7 +57475,7 @@ func (s *ReplaceNetworkAclEntryInput) SetRuleNumber(v int64) *ReplaceNetworkAclE
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclEntryOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceNetworkAclEntryOutput
type ReplaceNetworkAclEntryOutput struct {
_ struct{} `type:"structure"`
}
@@ -49532,7 +57491,7 @@ func (s ReplaceNetworkAclEntryOutput) GoString() string {
}
// Contains the parameters for ReplaceRoute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRouteRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRouteRequest
type ReplaceRouteInput struct {
_ struct{} `type:"structure"`
@@ -49657,7 +57616,7 @@ func (s *ReplaceRouteInput) SetVpcPeeringConnectionId(v string) *ReplaceRouteInp
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRouteOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRouteOutput
type ReplaceRouteOutput struct {
_ struct{} `type:"structure"`
}
@@ -49673,7 +57632,7 @@ func (s ReplaceRouteOutput) GoString() string {
}
// Contains the parameters for ReplaceRouteTableAssociation.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRouteTableAssociationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRouteTableAssociationRequest
type ReplaceRouteTableAssociationInput struct {
_ struct{} `type:"structure"`
@@ -49739,7 +57698,7 @@ func (s *ReplaceRouteTableAssociationInput) SetRouteTableId(v string) *ReplaceRo
}
// Contains the output of ReplaceRouteTableAssociation.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRouteTableAssociationResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceRouteTableAssociationResult
type ReplaceRouteTableAssociationOutput struct {
_ struct{} `type:"structure"`
@@ -49764,7 +57723,7 @@ func (s *ReplaceRouteTableAssociationOutput) SetNewAssociationId(v string) *Repl
}
// Contains the parameters for ReportInstanceStatus.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReportInstanceStatusRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReportInstanceStatusRequest
type ReportInstanceStatusInput struct {
_ struct{} `type:"structure"`
@@ -49785,7 +57744,7 @@ type ReportInstanceStatusInput struct {
// Instances is a required field
Instances []*string `locationName:"instanceId" locationNameList:"InstanceId" type:"list" required:"true"`
- // One or more reason codes that describes the health state of your instance.
+ // One or more reason codes that describe the health state of your instance.
//
// * instance-stuck-in-state: My instance is stuck in a state.
//
@@ -49796,13 +57755,13 @@ type ReportInstanceStatusInput struct {
// * password-not-available: A password is not available for my instance.
//
// * performance-network: My instance is experiencing performance problems
- // which I believe are network related.
+ // that I believe are network related.
//
// * performance-instance-store: My instance is experiencing performance
- // problems which I believe are related to the instance stores.
+ // problems that I believe are related to the instance stores.
//
// * performance-ebs-volume: My instance is experiencing performance problems
- // which I believe are related to an EBS volume.
+ // that I believe are related to an EBS volume.
//
// * performance-other: My instance is experiencing performance problems.
//
@@ -49891,7 +57850,7 @@ func (s *ReportInstanceStatusInput) SetStatus(v string) *ReportInstanceStatusInp
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReportInstanceStatusOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReportInstanceStatusOutput
type ReportInstanceStatusOutput struct {
_ struct{} `type:"structure"`
}
@@ -49906,8 +57865,277 @@ func (s ReportInstanceStatusOutput) GoString() string {
return s.String()
}
+// The information to include in the launch template.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestLaunchTemplateData
+type RequestLaunchTemplateData struct {
+ _ struct{} `type:"structure"`
+
+ // The block device mapping.
+ //
+ // Supplying both a snapshot ID and an encryption value as arguments for block-device
+ // mapping results in an error. This is because only blank volumes can be encrypted
+ // on start, and these are not created from a snapshot. If a snapshot is the
+ // basis for the volume, it contains data by definition and its encryption status
+ // cannot be changed using this action.
+ BlockDeviceMappings []*LaunchTemplateBlockDeviceMappingRequest `locationName:"BlockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"`
+
+ // The credit option for CPU usage of the instance. Valid for T2 instances only.
+ CreditSpecification *CreditSpecificationRequest `type:"structure"`
+
+ // If set to true, you can't terminate the instance using the Amazon EC2 console,
+ // CLI, or API. To change this attribute to false after launch, use ModifyInstanceAttribute.
+ DisableApiTermination *bool `type:"boolean"`
+
+ // Indicates whether the instance is optimized for Amazon EBS I/O. This optimization
+ // provides dedicated throughput to Amazon EBS and an optimized configuration
+ // stack to provide optimal Amazon EBS I/O performance. This optimization isn't
+ // available with all instance types. Additional usage charges apply when using
+ // an EBS-optimized instance.
+ EbsOptimized *bool `type:"boolean"`
+
+ // An elastic GPU to associate with the instance.
+ ElasticGpuSpecifications []*ElasticGpuSpecification `locationName:"ElasticGpuSpecification" locationNameList:"ElasticGpuSpecification" type:"list"`
+
+ // The IAM instance profile.
+ IamInstanceProfile *LaunchTemplateIamInstanceProfileSpecificationRequest `type:"structure"`
+
+ // The ID of the AMI, which you can get by using DescribeImages.
+ ImageId *string `type:"string"`
+
+ // Indicates whether an instance stops or terminates when you initiate shutdown
+ // from the instance (using the operating system command for system shutdown).
+ //
+ // Default: stop
+ InstanceInitiatedShutdownBehavior *string `type:"string" enum:"ShutdownBehavior"`
+
+ // The market (purchasing) option for the instances.
+ InstanceMarketOptions *LaunchTemplateInstanceMarketOptionsRequest `type:"structure"`
+
+ // The instance type. For more information, see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ InstanceType *string `type:"string" enum:"InstanceType"`
+
+ // The ID of the kernel.
+ //
+ // We recommend that you use PV-GRUB instead of kernels and RAM disks. For more
+ // information, see User Provided Kernels (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ KernelId *string `type:"string"`
+
+ // The name of the key pair. You can create a key pair using CreateKeyPair or
+ // ImportKeyPair.
+ //
+ // If you do not specify a key pair, you can't connect to the instance unless
+ // you choose an AMI that is configured to allow users another way to log in.
+ KeyName *string `type:"string"`
+
+ // The monitoring for the instance.
+ Monitoring *LaunchTemplatesMonitoringRequest `type:"structure"`
+
+ // One or more network interfaces.
+ NetworkInterfaces []*LaunchTemplateInstanceNetworkInterfaceSpecificationRequest `locationName:"NetworkInterface" locationNameList:"InstanceNetworkInterfaceSpecification" type:"list"`
+
+ // The placement for the instance.
+ Placement *LaunchTemplatePlacementRequest `type:"structure"`
+
+ // The ID of the RAM disk.
+ //
+ // We recommend that you use PV-GRUB instead of kernels and RAM disks. For more
+ // information, see User Provided Kernels (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ RamDiskId *string `type:"string"`
+
+ // One or more security group IDs. You can create a security group using CreateSecurityGroup.
+ // You cannot specify both a security group ID and security name in the same
+ // request.
+ SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"`
+
+ // [EC2-Classic, default VPC] One or more security group names. For a nondefault
+ // VPC, you must use security group IDs instead. You cannot specify both a security
+ // group ID and security name in the same request.
+ SecurityGroups []*string `locationName:"SecurityGroup" locationNameList:"SecurityGroup" type:"list"`
+
+ // The tags to apply to the resources during launch. You can tag instances and
+ // volumes. The specified tags are applied to all instances or volumes that
+ // are created during launch.
+ TagSpecifications []*LaunchTemplateTagSpecificationRequest `locationName:"TagSpecification" locationNameList:"LaunchTemplateTagSpecificationRequest" type:"list"`
+
+ // The user data to make available to the instance. For more information, see
+ // Running Commands on Your Linux Instance at Launch (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html)
+ // (Linux) and Adding User Data (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data)
+ // (Windows). If you are using a command line tool, base64-encoding is performed
+ // for you and you can load the text from a file. Otherwise, you must provide
+ // base64-encoded text.
+ UserData *string `type:"string"`
+}
+
+// String returns the string representation
+func (s RequestLaunchTemplateData) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RequestLaunchTemplateData) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *RequestLaunchTemplateData) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "RequestLaunchTemplateData"}
+ if s.CreditSpecification != nil {
+ if err := s.CreditSpecification.Validate(); err != nil {
+ invalidParams.AddNested("CreditSpecification", err.(request.ErrInvalidParams))
+ }
+ }
+ if s.ElasticGpuSpecifications != nil {
+ for i, v := range s.ElasticGpuSpecifications {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ElasticGpuSpecifications", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
+ if s.NetworkInterfaces != nil {
+ for i, v := range s.NetworkInterfaces {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NetworkInterfaces", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetBlockDeviceMappings sets the BlockDeviceMappings field's value.
+func (s *RequestLaunchTemplateData) SetBlockDeviceMappings(v []*LaunchTemplateBlockDeviceMappingRequest) *RequestLaunchTemplateData {
+ s.BlockDeviceMappings = v
+ return s
+}
+
+// SetCreditSpecification sets the CreditSpecification field's value.
+func (s *RequestLaunchTemplateData) SetCreditSpecification(v *CreditSpecificationRequest) *RequestLaunchTemplateData {
+ s.CreditSpecification = v
+ return s
+}
+
+// SetDisableApiTermination sets the DisableApiTermination field's value.
+func (s *RequestLaunchTemplateData) SetDisableApiTermination(v bool) *RequestLaunchTemplateData {
+ s.DisableApiTermination = &v
+ return s
+}
+
+// SetEbsOptimized sets the EbsOptimized field's value.
+func (s *RequestLaunchTemplateData) SetEbsOptimized(v bool) *RequestLaunchTemplateData {
+ s.EbsOptimized = &v
+ return s
+}
+
+// SetElasticGpuSpecifications sets the ElasticGpuSpecifications field's value.
+func (s *RequestLaunchTemplateData) SetElasticGpuSpecifications(v []*ElasticGpuSpecification) *RequestLaunchTemplateData {
+ s.ElasticGpuSpecifications = v
+ return s
+}
+
+// SetIamInstanceProfile sets the IamInstanceProfile field's value.
+func (s *RequestLaunchTemplateData) SetIamInstanceProfile(v *LaunchTemplateIamInstanceProfileSpecificationRequest) *RequestLaunchTemplateData {
+ s.IamInstanceProfile = v
+ return s
+}
+
+// SetImageId sets the ImageId field's value.
+func (s *RequestLaunchTemplateData) SetImageId(v string) *RequestLaunchTemplateData {
+ s.ImageId = &v
+ return s
+}
+
+// SetInstanceInitiatedShutdownBehavior sets the InstanceInitiatedShutdownBehavior field's value.
+func (s *RequestLaunchTemplateData) SetInstanceInitiatedShutdownBehavior(v string) *RequestLaunchTemplateData {
+ s.InstanceInitiatedShutdownBehavior = &v
+ return s
+}
+
+// SetInstanceMarketOptions sets the InstanceMarketOptions field's value.
+func (s *RequestLaunchTemplateData) SetInstanceMarketOptions(v *LaunchTemplateInstanceMarketOptionsRequest) *RequestLaunchTemplateData {
+ s.InstanceMarketOptions = v
+ return s
+}
+
+// SetInstanceType sets the InstanceType field's value.
+func (s *RequestLaunchTemplateData) SetInstanceType(v string) *RequestLaunchTemplateData {
+ s.InstanceType = &v
+ return s
+}
+
+// SetKernelId sets the KernelId field's value.
+func (s *RequestLaunchTemplateData) SetKernelId(v string) *RequestLaunchTemplateData {
+ s.KernelId = &v
+ return s
+}
+
+// SetKeyName sets the KeyName field's value.
+func (s *RequestLaunchTemplateData) SetKeyName(v string) *RequestLaunchTemplateData {
+ s.KeyName = &v
+ return s
+}
+
+// SetMonitoring sets the Monitoring field's value.
+func (s *RequestLaunchTemplateData) SetMonitoring(v *LaunchTemplatesMonitoringRequest) *RequestLaunchTemplateData {
+ s.Monitoring = v
+ return s
+}
+
+// SetNetworkInterfaces sets the NetworkInterfaces field's value.
+func (s *RequestLaunchTemplateData) SetNetworkInterfaces(v []*LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) *RequestLaunchTemplateData {
+ s.NetworkInterfaces = v
+ return s
+}
+
+// SetPlacement sets the Placement field's value.
+func (s *RequestLaunchTemplateData) SetPlacement(v *LaunchTemplatePlacementRequest) *RequestLaunchTemplateData {
+ s.Placement = v
+ return s
+}
+
+// SetRamDiskId sets the RamDiskId field's value.
+func (s *RequestLaunchTemplateData) SetRamDiskId(v string) *RequestLaunchTemplateData {
+ s.RamDiskId = &v
+ return s
+}
+
+// SetSecurityGroupIds sets the SecurityGroupIds field's value.
+func (s *RequestLaunchTemplateData) SetSecurityGroupIds(v []*string) *RequestLaunchTemplateData {
+ s.SecurityGroupIds = v
+ return s
+}
+
+// SetSecurityGroups sets the SecurityGroups field's value.
+func (s *RequestLaunchTemplateData) SetSecurityGroups(v []*string) *RequestLaunchTemplateData {
+ s.SecurityGroups = v
+ return s
+}
+
+// SetTagSpecifications sets the TagSpecifications field's value.
+func (s *RequestLaunchTemplateData) SetTagSpecifications(v []*LaunchTemplateTagSpecificationRequest) *RequestLaunchTemplateData {
+ s.TagSpecifications = v
+ return s
+}
+
+// SetUserData sets the UserData field's value.
+func (s *RequestLaunchTemplateData) SetUserData(v string) *RequestLaunchTemplateData {
+ s.UserData = &v
+ return s
+}
+
// Contains the parameters for RequestSpotFleet.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotFleetRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotFleetRequest
type RequestSpotFleetInput struct {
_ struct{} `type:"structure"`
@@ -49917,7 +58145,7 @@ type RequestSpotFleetInput struct {
// it is UnauthorizedOperation.
DryRun *bool `locationName:"dryRun" type:"boolean"`
- // The configuration for the Spot fleet request.
+ // The configuration for the Spot Fleet request.
//
// SpotFleetRequestConfig is a required field
SpotFleetRequestConfig *SpotFleetRequestConfigData `locationName:"spotFleetRequestConfig" type:"structure" required:"true"`
@@ -49964,11 +58192,11 @@ func (s *RequestSpotFleetInput) SetSpotFleetRequestConfig(v *SpotFleetRequestCon
}
// Contains the output of RequestSpotFleet.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotFleetResponse
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotFleetResponse
type RequestSpotFleetOutput struct {
_ struct{} `type:"structure"`
- // The ID of the Spot fleet request.
+ // The ID of the Spot Fleet request.
//
// SpotFleetRequestId is a required field
SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
@@ -49991,38 +58219,38 @@ func (s *RequestSpotFleetOutput) SetSpotFleetRequestId(v string) *RequestSpotFle
}
// Contains the parameters for RequestSpotInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotInstancesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotInstancesRequest
type RequestSpotInstancesInput struct {
_ struct{} `type:"structure"`
- // The user-specified name for a logical grouping of bids.
+ // The user-specified name for a logical grouping of requests.
//
// When you specify an Availability Zone group in a Spot Instance request, all
- // Spot instances in the request are launched in the same Availability Zone.
+ // Spot Instances in the request are launched in the same Availability Zone.
// Instance proximity is maintained with this parameter, but the choice of Availability
- // Zone is not. The group applies only to bids for Spot Instances of the same
- // instance type. Any additional Spot instance requests that are specified with
- // the same Availability Zone group name are launched in that same Availability
+ // Zone is not. The group applies only to requests for Spot Instances of the
+ // same instance type. Any additional Spot Instance requests that are specified
+ // with the same Availability Zone group name are launched in that same Availability
// Zone, as long as at least one instance from the group is still active.
//
// If there is no active instance running in the Availability Zone group that
- // you specify for a new Spot instance request (all instances are terminated,
- // the bid is expired, or the bid falls below current market), then Amazon EC2
- // launches the instance in any Availability Zone where the constraint can be
- // met. Consequently, the subsequent set of Spot instances could be placed in
- // a different zone from the original request, even if you specified the same
- // Availability Zone group.
+ // you specify for a new Spot Instance request (all instances are terminated,
+ // the request is expired, or the maximum price you specified falls below current
+ // Spot price), then Amazon EC2 launches the instance in any Availability Zone
+ // where the constraint can be met. Consequently, the subsequent set of Spot
+ // Instances could be placed in a different zone from the original request,
+ // even if you specified the same Availability Zone group.
//
// Default: Instances are launched in any available Availability Zone.
AvailabilityZoneGroup *string `locationName:"availabilityZoneGroup" type:"string"`
- // The required duration for the Spot instances (also known as Spot blocks),
+ // The required duration for the Spot Instances (also known as Spot blocks),
// in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300,
// or 360).
//
- // The duration period starts as soon as your Spot instance receives its instance
- // ID. At the end of the duration period, Amazon EC2 marks the Spot instance
- // for termination and provides a Spot instance termination notice, which gives
+ // The duration period starts as soon as your Spot Instance receives its instance
+ // ID. At the end of the duration period, Amazon EC2 marks the Spot Instance
+ // for termination and provides a Spot Instance termination notice, which gives
// the instance a two-minute warning before it terminates.
//
// Note that you can't specify an Availability Zone group or a launch group
@@ -50040,12 +58268,15 @@ type RequestSpotInstancesInput struct {
// it is UnauthorizedOperation.
DryRun *bool `locationName:"dryRun" type:"boolean"`
- // The maximum number of Spot instances to launch.
+ // The maximum number of Spot Instances to launch.
//
// Default: 1
InstanceCount *int64 `locationName:"instanceCount" type:"integer"`
- // The instance launch group. Launch groups are Spot instances that launch together
+ // The behavior when a Spot Instance is interrupted. The default is terminate.
+ InstanceInterruptionBehavior *string `type:"string" enum:"InstanceInterruptionBehavior"`
+
+ // The instance launch group. Launch groups are Spot Instances that launch together
// and terminate together.
//
// Default: Instances are launched and terminated individually
@@ -50054,13 +58285,11 @@ type RequestSpotInstancesInput struct {
// The launch specification.
LaunchSpecification *RequestSpotLaunchSpecification `type:"structure"`
- // The maximum hourly price (bid) for any Spot instance launched to fulfill
- // the request.
- //
- // SpotPrice is a required field
- SpotPrice *string `locationName:"spotPrice" type:"string" required:"true"`
+ // The maximum price per hour that you are willing to pay for a Spot Instance.
+ // The default is the On-Demand price.
+ SpotPrice *string `locationName:"spotPrice" type:"string"`
- // The Spot instance request type.
+ // The Spot Instance request type.
//
// Default: one-time
Type *string `locationName:"type" type:"string" enum:"SpotInstanceType"`
@@ -50070,16 +58299,13 @@ type RequestSpotInstancesInput struct {
// launch, the request expires, or the request is canceled. If the request is
// persistent, the request becomes active at this date and time and remains
// active until it expires or is canceled.
- //
- // Default: The request is effective indefinitely.
ValidFrom *time.Time `locationName:"validFrom" type:"timestamp" timestampFormat:"iso8601"`
// The end date of the request. If this is a one-time request, the request remains
// active until all instances launch, the request is canceled, or this date
// is reached. If the request is persistent, it remains active until it is canceled
- // or this date and time is reached.
- //
- // Default: The request is effective indefinitely.
+ // or this date is reached. The default end date is 7 days from the current
+ // date.
ValidUntil *time.Time `locationName:"validUntil" type:"timestamp" timestampFormat:"iso8601"`
}
@@ -50096,9 +58322,6 @@ func (s RequestSpotInstancesInput) GoString() string {
// Validate inspects the fields of the type to determine if they are valid.
func (s *RequestSpotInstancesInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "RequestSpotInstancesInput"}
- if s.SpotPrice == nil {
- invalidParams.Add(request.NewErrParamRequired("SpotPrice"))
- }
if s.LaunchSpecification != nil {
if err := s.LaunchSpecification.Validate(); err != nil {
invalidParams.AddNested("LaunchSpecification", err.(request.ErrInvalidParams))
@@ -50141,6 +58364,12 @@ func (s *RequestSpotInstancesInput) SetInstanceCount(v int64) *RequestSpotInstan
return s
}
+// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value.
+func (s *RequestSpotInstancesInput) SetInstanceInterruptionBehavior(v string) *RequestSpotInstancesInput {
+ s.InstanceInterruptionBehavior = &v
+ return s
+}
+
// SetLaunchGroup sets the LaunchGroup field's value.
func (s *RequestSpotInstancesInput) SetLaunchGroup(v string) *RequestSpotInstancesInput {
s.LaunchGroup = &v
@@ -50178,11 +58407,11 @@ func (s *RequestSpotInstancesInput) SetValidUntil(v time.Time) *RequestSpotInsta
}
// Contains the output of RequestSpotInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotInstancesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotInstancesResult
type RequestSpotInstancesOutput struct {
_ struct{} `type:"structure"`
- // One or more Spot instance requests.
+ // One or more Spot Instance requests.
SpotInstanceRequests []*SpotInstanceRequest `locationName:"spotInstanceRequestSet" locationNameList:"item" type:"list"`
}
@@ -50203,17 +58432,17 @@ func (s *RequestSpotInstancesOutput) SetSpotInstanceRequests(v []*SpotInstanceRe
}
// Describes the launch specification for an instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotLaunchSpecification
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RequestSpotLaunchSpecification
type RequestSpotLaunchSpecification struct {
_ struct{} `type:"structure"`
// Deprecated.
AddressingType *string `locationName:"addressingType" type:"string"`
- // One or more block device mapping entries.
- //
- // Although you can specify encrypted EBS volumes in this block device mapping
- // for your Spot Instances, these volumes are not encrypted.
+ // One or more block device mapping entries. You can't specify both a snapshot
+ // ID and an encryption value. This is because only blank volumes can be encrypted
+ // on creation. If a snapshot is the basis for a volume, it is not blank and
+ // its encryption status is used for the volume encryption status.
BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"`
// Indicates whether the instance is optimized for EBS I/O. This optimization
@@ -50404,7 +58633,7 @@ func (s *RequestSpotLaunchSpecification) SetUserData(v string) *RequestSpotLaunc
}
// Describes a reservation.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Reservation
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Reservation
type Reservation struct {
_ struct{} `type:"structure"`
@@ -50466,7 +58695,7 @@ func (s *Reservation) SetReservationId(v string) *Reservation {
}
// The cost associated with the Reserved Instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReservationValue
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReservationValue
type ReservationValue struct {
_ struct{} `type:"structure"`
@@ -50510,7 +58739,7 @@ func (s *ReservationValue) SetRemainingUpfrontValue(v string) *ReservationValue
}
// Describes the limit price of a Reserved Instance offering.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReservedInstanceLimitPrice
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReservedInstanceLimitPrice
type ReservedInstanceLimitPrice struct {
_ struct{} `type:"structure"`
@@ -50546,7 +58775,7 @@ func (s *ReservedInstanceLimitPrice) SetCurrencyCode(v string) *ReservedInstance
}
// The total value of the Convertible Reserved Instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReservedInstanceReservationValue
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReservedInstanceReservationValue
type ReservedInstanceReservationValue struct {
_ struct{} `type:"structure"`
@@ -50580,7 +58809,7 @@ func (s *ReservedInstanceReservationValue) SetReservedInstanceId(v string) *Rese
}
// Describes a Reserved Instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReservedInstances
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReservedInstances
type ReservedInstances struct {
_ struct{} `type:"structure"`
@@ -50759,7 +58988,7 @@ func (s *ReservedInstances) SetUsagePrice(v float64) *ReservedInstances {
}
// Describes the configuration settings for the modified Reserved Instances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReservedInstancesConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReservedInstancesConfiguration
type ReservedInstancesConfiguration struct {
_ struct{} `type:"structure"`
@@ -50822,7 +59051,7 @@ func (s *ReservedInstancesConfiguration) SetScope(v string) *ReservedInstancesCo
}
// Describes the ID of a Reserved Instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReservedInstancesId
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReservedInstancesId
type ReservedInstancesId struct {
_ struct{} `type:"structure"`
@@ -50847,7 +59076,7 @@ func (s *ReservedInstancesId) SetReservedInstancesId(v string) *ReservedInstance
}
// Describes a Reserved Instance listing.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReservedInstancesListing
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReservedInstancesListing
type ReservedInstancesListing struct {
_ struct{} `type:"structure"`
@@ -50955,7 +59184,7 @@ func (s *ReservedInstancesListing) SetUpdateDate(v time.Time) *ReservedInstances
}
// Describes a Reserved Instance modification.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReservedInstancesModification
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReservedInstancesModification
type ReservedInstancesModification struct {
_ struct{} `type:"structure"`
@@ -51054,7 +59283,7 @@ func (s *ReservedInstancesModification) SetUpdateDate(v time.Time) *ReservedInst
}
// Describes the modification request/s.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReservedInstancesModificationResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReservedInstancesModificationResult
type ReservedInstancesModificationResult struct {
_ struct{} `type:"structure"`
@@ -51090,7 +59319,7 @@ func (s *ReservedInstancesModificationResult) SetTargetConfiguration(v *Reserved
}
// Describes a Reserved Instance offering.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReservedInstancesOffering
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReservedInstancesOffering
type ReservedInstancesOffering struct {
_ struct{} `type:"structure"`
@@ -51248,8 +59477,92 @@ func (s *ReservedInstancesOffering) SetUsagePrice(v float64) *ReservedInstancesO
return s
}
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetFpgaImageAttributeRequest
+type ResetFpgaImageAttributeInput struct {
+ _ struct{} `type:"structure"`
+
+ // The attribute.
+ Attribute *string `type:"string" enum:"ResetFpgaImageAttributeName"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The ID of the AFI.
+ //
+ // FpgaImageId is a required field
+ FpgaImageId *string `type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s ResetFpgaImageAttributeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResetFpgaImageAttributeInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ResetFpgaImageAttributeInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ResetFpgaImageAttributeInput"}
+ if s.FpgaImageId == nil {
+ invalidParams.Add(request.NewErrParamRequired("FpgaImageId"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetAttribute sets the Attribute field's value.
+func (s *ResetFpgaImageAttributeInput) SetAttribute(v string) *ResetFpgaImageAttributeInput {
+ s.Attribute = &v
+ return s
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *ResetFpgaImageAttributeInput) SetDryRun(v bool) *ResetFpgaImageAttributeInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetFpgaImageId sets the FpgaImageId field's value.
+func (s *ResetFpgaImageAttributeInput) SetFpgaImageId(v string) *ResetFpgaImageAttributeInput {
+ s.FpgaImageId = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetFpgaImageAttributeResult
+type ResetFpgaImageAttributeOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Is true if the request succeeds, and an error otherwise.
+ Return *bool `locationName:"return" type:"boolean"`
+}
+
+// String returns the string representation
+func (s ResetFpgaImageAttributeOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResetFpgaImageAttributeOutput) GoString() string {
+ return s.String()
+}
+
+// SetReturn sets the Return field's value.
+func (s *ResetFpgaImageAttributeOutput) SetReturn(v bool) *ResetFpgaImageAttributeOutput {
+ s.Return = &v
+ return s
+}
+
// Contains the parameters for ResetImageAttribute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetImageAttributeRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetImageAttributeRequest
type ResetImageAttributeInput struct {
_ struct{} `type:"structure"`
@@ -51315,7 +59628,7 @@ func (s *ResetImageAttributeInput) SetImageId(v string) *ResetImageAttributeInpu
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetImageAttributeOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetImageAttributeOutput
type ResetImageAttributeOutput struct {
_ struct{} `type:"structure"`
}
@@ -51331,7 +59644,7 @@ func (s ResetImageAttributeOutput) GoString() string {
}
// Contains the parameters for ResetInstanceAttribute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetInstanceAttributeRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetInstanceAttributeRequest
type ResetInstanceAttributeInput struct {
_ struct{} `type:"structure"`
@@ -51399,7 +59712,7 @@ func (s *ResetInstanceAttributeInput) SetInstanceId(v string) *ResetInstanceAttr
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetInstanceAttributeOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetInstanceAttributeOutput
type ResetInstanceAttributeOutput struct {
_ struct{} `type:"structure"`
}
@@ -51415,7 +59728,7 @@ func (s ResetInstanceAttributeOutput) GoString() string {
}
// Contains the parameters for ResetNetworkInterfaceAttribute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetNetworkInterfaceAttributeRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetNetworkInterfaceAttributeRequest
type ResetNetworkInterfaceAttributeInput struct {
_ struct{} `type:"structure"`
@@ -51475,7 +59788,7 @@ func (s *ResetNetworkInterfaceAttributeInput) SetSourceDestCheck(v string) *Rese
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetNetworkInterfaceAttributeOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetNetworkInterfaceAttributeOutput
type ResetNetworkInterfaceAttributeOutput struct {
_ struct{} `type:"structure"`
}
@@ -51491,7 +59804,7 @@ func (s ResetNetworkInterfaceAttributeOutput) GoString() string {
}
// Contains the parameters for ResetSnapshotAttribute.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetSnapshotAttributeRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetSnapshotAttributeRequest
type ResetSnapshotAttributeInput struct {
_ struct{} `type:"structure"`
@@ -51557,7 +59870,7 @@ func (s *ResetSnapshotAttributeInput) SetSnapshotId(v string) *ResetSnapshotAttr
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetSnapshotAttributeOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetSnapshotAttributeOutput
type ResetSnapshotAttributeOutput struct {
_ struct{} `type:"structure"`
}
@@ -51572,8 +59885,241 @@ func (s ResetSnapshotAttributeOutput) GoString() string {
return s.String()
}
+// Describes the error that's returned when you cannot delete a launch template
+// version.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResponseError
+type ResponseError struct {
+ _ struct{} `type:"structure"`
+
+ // The error code.
+ Code *string `locationName:"code" type:"string" enum:"LaunchTemplateErrorCode"`
+
+ // The error message, if applicable.
+ Message *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s ResponseError) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResponseError) GoString() string {
+ return s.String()
+}
+
+// SetCode sets the Code field's value.
+func (s *ResponseError) SetCode(v string) *ResponseError {
+ s.Code = &v
+ return s
+}
+
+// SetMessage sets the Message field's value.
+func (s *ResponseError) SetMessage(v string) *ResponseError {
+ s.Message = &v
+ return s
+}
+
+// The information for a launch template.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResponseLaunchTemplateData
+type ResponseLaunchTemplateData struct {
+ _ struct{} `type:"structure"`
+
+ // The block device mappings.
+ BlockDeviceMappings []*LaunchTemplateBlockDeviceMapping `locationName:"blockDeviceMappingSet" locationNameList:"item" type:"list"`
+
+ // The credit option for CPU usage of the instance.
+ CreditSpecification *CreditSpecification `locationName:"creditSpecification" type:"structure"`
+
+ // If set to true, indicates that the instance cannot be terminated using the
+ // Amazon EC2 console, command line tool, or API.
+ DisableApiTermination *bool `locationName:"disableApiTermination" type:"boolean"`
+
+ // Indicates whether the instance is optimized for Amazon EBS I/O.
+ EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"`
+
+ // The elastic GPU specification.
+ ElasticGpuSpecifications []*ElasticGpuSpecificationResponse `locationName:"elasticGpuSpecificationSet" locationNameList:"item" type:"list"`
+
+ // The IAM instance profile.
+ IamInstanceProfile *LaunchTemplateIamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"`
+
+ // The ID of the AMI that was used to launch the instance.
+ ImageId *string `locationName:"imageId" type:"string"`
+
+ // Indicates whether an instance stops or terminates when you initiate shutdown
+ // from the instance (using the operating system command for system shutdown).
+ InstanceInitiatedShutdownBehavior *string `locationName:"instanceInitiatedShutdownBehavior" type:"string" enum:"ShutdownBehavior"`
+
+ // The market (purchasing) option for the instances.
+ InstanceMarketOptions *LaunchTemplateInstanceMarketOptions `locationName:"instanceMarketOptions" type:"structure"`
+
+ // The instance type.
+ InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"`
+
+ // The ID of the kernel, if applicable.
+ KernelId *string `locationName:"kernelId" type:"string"`
+
+ // The name of the key pair.
+ KeyName *string `locationName:"keyName" type:"string"`
+
+ // The monitoring for the instance.
+ Monitoring *LaunchTemplatesMonitoring `locationName:"monitoring" type:"structure"`
+
+ // The network interfaces.
+ NetworkInterfaces []*LaunchTemplateInstanceNetworkInterfaceSpecification `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"`
+
+ // The placement of the instance.
+ Placement *LaunchTemplatePlacement `locationName:"placement" type:"structure"`
+
+ // The ID of the RAM disk, if applicable.
+ RamDiskId *string `locationName:"ramDiskId" type:"string"`
+
+ // The security group IDs.
+ SecurityGroupIds []*string `locationName:"securityGroupIdSet" locationNameList:"item" type:"list"`
+
+ // The security group names.
+ SecurityGroups []*string `locationName:"securityGroupSet" locationNameList:"item" type:"list"`
+
+ // The tags.
+ TagSpecifications []*LaunchTemplateTagSpecification `locationName:"tagSpecificationSet" locationNameList:"item" type:"list"`
+
+ // The user data for the instance.
+ UserData *string `locationName:"userData" type:"string"`
+}
+
+// String returns the string representation
+func (s ResponseLaunchTemplateData) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResponseLaunchTemplateData) GoString() string {
+ return s.String()
+}
+
+// SetBlockDeviceMappings sets the BlockDeviceMappings field's value.
+func (s *ResponseLaunchTemplateData) SetBlockDeviceMappings(v []*LaunchTemplateBlockDeviceMapping) *ResponseLaunchTemplateData {
+ s.BlockDeviceMappings = v
+ return s
+}
+
+// SetCreditSpecification sets the CreditSpecification field's value.
+func (s *ResponseLaunchTemplateData) SetCreditSpecification(v *CreditSpecification) *ResponseLaunchTemplateData {
+ s.CreditSpecification = v
+ return s
+}
+
+// SetDisableApiTermination sets the DisableApiTermination field's value.
+func (s *ResponseLaunchTemplateData) SetDisableApiTermination(v bool) *ResponseLaunchTemplateData {
+ s.DisableApiTermination = &v
+ return s
+}
+
+// SetEbsOptimized sets the EbsOptimized field's value.
+func (s *ResponseLaunchTemplateData) SetEbsOptimized(v bool) *ResponseLaunchTemplateData {
+ s.EbsOptimized = &v
+ return s
+}
+
+// SetElasticGpuSpecifications sets the ElasticGpuSpecifications field's value.
+func (s *ResponseLaunchTemplateData) SetElasticGpuSpecifications(v []*ElasticGpuSpecificationResponse) *ResponseLaunchTemplateData {
+ s.ElasticGpuSpecifications = v
+ return s
+}
+
+// SetIamInstanceProfile sets the IamInstanceProfile field's value.
+func (s *ResponseLaunchTemplateData) SetIamInstanceProfile(v *LaunchTemplateIamInstanceProfileSpecification) *ResponseLaunchTemplateData {
+ s.IamInstanceProfile = v
+ return s
+}
+
+// SetImageId sets the ImageId field's value.
+func (s *ResponseLaunchTemplateData) SetImageId(v string) *ResponseLaunchTemplateData {
+ s.ImageId = &v
+ return s
+}
+
+// SetInstanceInitiatedShutdownBehavior sets the InstanceInitiatedShutdownBehavior field's value.
+func (s *ResponseLaunchTemplateData) SetInstanceInitiatedShutdownBehavior(v string) *ResponseLaunchTemplateData {
+ s.InstanceInitiatedShutdownBehavior = &v
+ return s
+}
+
+// SetInstanceMarketOptions sets the InstanceMarketOptions field's value.
+func (s *ResponseLaunchTemplateData) SetInstanceMarketOptions(v *LaunchTemplateInstanceMarketOptions) *ResponseLaunchTemplateData {
+ s.InstanceMarketOptions = v
+ return s
+}
+
+// SetInstanceType sets the InstanceType field's value.
+func (s *ResponseLaunchTemplateData) SetInstanceType(v string) *ResponseLaunchTemplateData {
+ s.InstanceType = &v
+ return s
+}
+
+// SetKernelId sets the KernelId field's value.
+func (s *ResponseLaunchTemplateData) SetKernelId(v string) *ResponseLaunchTemplateData {
+ s.KernelId = &v
+ return s
+}
+
+// SetKeyName sets the KeyName field's value.
+func (s *ResponseLaunchTemplateData) SetKeyName(v string) *ResponseLaunchTemplateData {
+ s.KeyName = &v
+ return s
+}
+
+// SetMonitoring sets the Monitoring field's value.
+func (s *ResponseLaunchTemplateData) SetMonitoring(v *LaunchTemplatesMonitoring) *ResponseLaunchTemplateData {
+ s.Monitoring = v
+ return s
+}
+
+// SetNetworkInterfaces sets the NetworkInterfaces field's value.
+func (s *ResponseLaunchTemplateData) SetNetworkInterfaces(v []*LaunchTemplateInstanceNetworkInterfaceSpecification) *ResponseLaunchTemplateData {
+ s.NetworkInterfaces = v
+ return s
+}
+
+// SetPlacement sets the Placement field's value.
+func (s *ResponseLaunchTemplateData) SetPlacement(v *LaunchTemplatePlacement) *ResponseLaunchTemplateData {
+ s.Placement = v
+ return s
+}
+
+// SetRamDiskId sets the RamDiskId field's value.
+func (s *ResponseLaunchTemplateData) SetRamDiskId(v string) *ResponseLaunchTemplateData {
+ s.RamDiskId = &v
+ return s
+}
+
+// SetSecurityGroupIds sets the SecurityGroupIds field's value.
+func (s *ResponseLaunchTemplateData) SetSecurityGroupIds(v []*string) *ResponseLaunchTemplateData {
+ s.SecurityGroupIds = v
+ return s
+}
+
+// SetSecurityGroups sets the SecurityGroups field's value.
+func (s *ResponseLaunchTemplateData) SetSecurityGroups(v []*string) *ResponseLaunchTemplateData {
+ s.SecurityGroups = v
+ return s
+}
+
+// SetTagSpecifications sets the TagSpecifications field's value.
+func (s *ResponseLaunchTemplateData) SetTagSpecifications(v []*LaunchTemplateTagSpecification) *ResponseLaunchTemplateData {
+ s.TagSpecifications = v
+ return s
+}
+
+// SetUserData sets the UserData field's value.
+func (s *ResponseLaunchTemplateData) SetUserData(v string) *ResponseLaunchTemplateData {
+ s.UserData = &v
+ return s
+}
+
// Contains the parameters for RestoreAddressToClassic.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RestoreAddressToClassicRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RestoreAddressToClassicRequest
type RestoreAddressToClassicInput struct {
_ struct{} `type:"structure"`
@@ -51625,7 +60171,7 @@ func (s *RestoreAddressToClassicInput) SetPublicIp(v string) *RestoreAddressToCl
}
// Contains the output of RestoreAddressToClassic.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RestoreAddressToClassicResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RestoreAddressToClassicResult
type RestoreAddressToClassicOutput struct {
_ struct{} `type:"structure"`
@@ -51659,12 +60205,11 @@ func (s *RestoreAddressToClassicOutput) SetStatus(v string) *RestoreAddressToCla
}
// Contains the parameters for RevokeSecurityGroupEgress.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupEgressRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupEgressRequest
type RevokeSecurityGroupEgressInput struct {
_ struct{} `type:"structure"`
- // The CIDR IP address range. We recommend that you specify the CIDR range in
- // a set of IP permissions instead.
+ // Not supported. Use a set of IP permissions to specify the CIDR.
CidrIp *string `locationName:"cidrIp" type:"string"`
// Checks whether you have the required permissions for the action, without
@@ -51673,8 +60218,7 @@ type RevokeSecurityGroupEgressInput struct {
// it is UnauthorizedOperation.
DryRun *bool `locationName:"dryRun" type:"boolean"`
- // The start of port range for the TCP and UDP protocols, or an ICMP type number.
- // We recommend that you specify the port range in a set of IP permissions instead.
+ // Not supported. Use a set of IP permissions to specify the port.
FromPort *int64 `locationName:"fromPort" type:"integer"`
// The ID of the security group.
@@ -51682,26 +60226,23 @@ type RevokeSecurityGroupEgressInput struct {
// GroupId is a required field
GroupId *string `locationName:"groupId" type:"string" required:"true"`
- // A set of IP permissions. You can't specify a destination security group and
- // a CIDR IP address range.
+ // One or more sets of IP permissions. You can't specify a destination security
+ // group and a CIDR IP address range in the same set of permissions.
IpPermissions []*IpPermission `locationName:"ipPermissions" locationNameList:"item" type:"list"`
- // The IP protocol name or number. We recommend that you specify the protocol
- // in a set of IP permissions instead.
+ // Not supported. Use a set of IP permissions to specify the protocol name or
+ // number.
IpProtocol *string `locationName:"ipProtocol" type:"string"`
- // The name of a destination security group. To revoke outbound access to a
- // destination security group, we recommend that you use a set of IP permissions
- // instead.
+ // Not supported. Use a set of IP permissions to specify a destination security
+ // group.
SourceSecurityGroupName *string `locationName:"sourceSecurityGroupName" type:"string"`
- // The AWS account number for a destination security group. To revoke outbound
- // access to a destination security group, we recommend that you use a set of
- // IP permissions instead.
+ // Not supported. Use a set of IP permissions to specify a destination security
+ // group.
SourceSecurityGroupOwnerId *string `locationName:"sourceSecurityGroupOwnerId" type:"string"`
- // The end of port range for the TCP and UDP protocols, or an ICMP type number.
- // We recommend that you specify the port range in a set of IP permissions instead.
+ // Not supported. Use a set of IP permissions to specify the port.
ToPort *int64 `locationName:"toPort" type:"integer"`
}
@@ -51782,7 +60323,7 @@ func (s *RevokeSecurityGroupEgressInput) SetToPort(v int64) *RevokeSecurityGroup
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupEgressOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupEgressOutput
type RevokeSecurityGroupEgressOutput struct {
_ struct{} `type:"structure"`
}
@@ -51798,7 +60339,7 @@ func (s RevokeSecurityGroupEgressOutput) GoString() string {
}
// Contains the parameters for RevokeSecurityGroupIngress.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupIngressRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupIngressRequest
type RevokeSecurityGroupIngressInput struct {
_ struct{} `type:"structure"`
@@ -51816,15 +60357,17 @@ type RevokeSecurityGroupIngressInput struct {
// For the ICMP type number, use -1 to specify all ICMP types.
FromPort *int64 `type:"integer"`
- // The ID of the security group. Required for a security group in a nondefault
- // VPC.
+ // The ID of the security group. You must specify either the security group
+ // ID or the security group name in the request. For security groups in a nondefault
+ // VPC, you must specify the security group ID.
GroupId *string `type:"string"`
- // [EC2-Classic, default VPC] The name of the security group.
+ // [EC2-Classic, default VPC] The name of the security group. You must specify
+ // either the security group ID or the security group name in the request.
GroupName *string `type:"string"`
- // A set of IP permissions. You can't specify a source security group and a
- // CIDR IP address range.
+ // One or more sets of IP permissions. You can't specify a source security group
+ // and a CIDR IP address range in the same set of permissions.
IpPermissions []*IpPermission `locationNameList:"item" type:"list"`
// The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)).
@@ -51922,7 +60465,7 @@ func (s *RevokeSecurityGroupIngressInput) SetToPort(v int64) *RevokeSecurityGrou
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupIngressOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeSecurityGroupIngressOutput
type RevokeSecurityGroupIngressOutput struct {
_ struct{} `type:"structure"`
}
@@ -51938,7 +60481,7 @@ func (s RevokeSecurityGroupIngressOutput) GoString() string {
}
// Describes a route in a route table.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Route
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Route
type Route struct {
_ struct{} `type:"structure"`
@@ -52071,7 +60614,7 @@ func (s *Route) SetVpcPeeringConnectionId(v string) *Route {
}
// Describes a route table.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RouteTable
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RouteTable
type RouteTable struct {
_ struct{} `type:"structure"`
@@ -52141,7 +60684,7 @@ func (s *RouteTable) SetVpcId(v string) *RouteTable {
}
// Describes an association between a route table and a subnet.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RouteTableAssociation
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RouteTableAssociation
type RouteTableAssociation struct {
_ struct{} `type:"structure"`
@@ -52193,20 +60736,17 @@ func (s *RouteTableAssociation) SetSubnetId(v string) *RouteTableAssociation {
}
// Contains the parameters for RunInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunInstancesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunInstancesRequest
type RunInstancesInput struct {
_ struct{} `type:"structure"`
// Reserved.
AdditionalInfo *string `locationName:"additionalInfo" type:"string"`
- // The block device mapping.
- //
- // Supplying both a snapshot ID and an encryption value as arguments for block-device
- // mapping results in an error. This is because only blank volumes can be encrypted
- // on start, and these are not created from a snapshot. If a snapshot is the
- // basis for the volume, it contains data by definition and its encryption status
- // cannot be changed using this action.
+ // One or more block device mapping entries. You can't specify both a snapshot
+ // ID and an encryption value. This is because only blank volumes can be encrypted
+ // on creation. If a snapshot is the basis for a volume, it is not blank and
+ // its encryption status is used for the volume encryption status.
BlockDeviceMappings []*BlockDeviceMapping `locationName:"BlockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"`
// Unique, case-sensitive identifier you provide to ensure the idempotency of
@@ -52215,6 +60755,14 @@ type RunInstancesInput struct {
// Constraints: Maximum 64 ASCII characters
ClientToken *string `locationName:"clientToken" type:"string"`
+ // The credit option for CPU usage of the instance. Valid values are standard
+ // and unlimited. To change this attribute after launch, use ModifyInstanceCreditSpecification.
+ // For more information, see T2 Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-instances.html)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ //
+ // Default: standard
+ CreditSpecification *CreditSpecificationRequest `type:"structure"`
+
// If you set this parameter to true, you can't terminate the instance using
// the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute
// to false after launch, use ModifyInstanceAttribute. Alternatively, if you
@@ -52230,25 +60778,25 @@ type RunInstancesInput struct {
// it is UnauthorizedOperation.
DryRun *bool `locationName:"dryRun" type:"boolean"`
- // Indicates whether the instance is optimized for EBS I/O. This optimization
+ // Indicates whether the instance is optimized for Amazon EBS I/O. This optimization
// provides dedicated throughput to Amazon EBS and an optimized configuration
- // stack to provide optimal EBS I/O performance. This optimization isn't available
- // with all instance types. Additional usage charges apply when using an EBS-optimized
- // instance.
+ // stack to provide optimal Amazon EBS I/O performance. This optimization isn't
+ // available with all instance types. Additional usage charges apply when using
+ // an EBS-optimized instance.
//
// Default: false
EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"`
- // An Elastic GPU to associate with the instance.
+ // An elastic GPU to associate with the instance.
ElasticGpuSpecification []*ElasticGpuSpecification `locationNameList:"item" type:"list"`
// The IAM instance profile.
IamInstanceProfile *IamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"`
- // The ID of the AMI, which you can get by calling DescribeImages.
- //
- // ImageId is a required field
- ImageId *string `type:"string" required:"true"`
+ // The ID of the AMI, which you can get by calling DescribeImages. An AMI is
+ // required to launch an instance and must be specified here or in a launch
+ // template.
+ ImageId *string `type:"string"`
// Indicates whether an instance stops or terminates when you initiate shutdown
// from the instance (using the operating system command for system shutdown).
@@ -52256,6 +60804,9 @@ type RunInstancesInput struct {
// Default: stop
InstanceInitiatedShutdownBehavior *string `locationName:"instanceInitiatedShutdownBehavior" type:"string" enum:"ShutdownBehavior"`
+ // The market (purchasing) option for the instances.
+ InstanceMarketOptions *InstanceMarketOptionsRequest `type:"structure"`
+
// The instance type. For more information, see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html)
// in the Amazon Elastic Compute Cloud User Guide.
//
@@ -52290,6 +60841,10 @@ type RunInstancesInput struct {
// you choose an AMI that is configured to allow users another way to log in.
KeyName *string `type:"string"`
+ // The launch template to use to launch the instances. Any parameters that you
+ // specify in RunInstances override the same parameters in the launch template.
+ LaunchTemplate *LaunchTemplateSpecification `type:"structure"`
+
// The maximum number of instances to launch. If you specify more instances
// than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches
// the largest possible number of instances above MinCount.
@@ -52361,9 +60916,9 @@ type RunInstancesInput struct {
// The user data to make available to the instance. For more information, see
// Running Commands on Your Linux Instance at Launch (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html)
// (Linux) and Adding User Data (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data)
- // (Windows). If you are using an AWS SDK or command line tool, Base64-encoding
- // is performed for you, and you can load the text from a file. Otherwise, you
- // must provide Base64-encoded text.
+ // (Windows). If you are using a command line tool, base64-encoding is performed
+ // for you, and you can load the text from a file. Otherwise, you must provide
+ // base64-encoded text.
UserData *string `type:"string"`
}
@@ -52380,15 +60935,17 @@ func (s RunInstancesInput) GoString() string {
// Validate inspects the fields of the type to determine if they are valid.
func (s *RunInstancesInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "RunInstancesInput"}
- if s.ImageId == nil {
- invalidParams.Add(request.NewErrParamRequired("ImageId"))
- }
if s.MaxCount == nil {
invalidParams.Add(request.NewErrParamRequired("MaxCount"))
}
if s.MinCount == nil {
invalidParams.Add(request.NewErrParamRequired("MinCount"))
}
+ if s.CreditSpecification != nil {
+ if err := s.CreditSpecification.Validate(); err != nil {
+ invalidParams.AddNested("CreditSpecification", err.(request.ErrInvalidParams))
+ }
+ }
if s.ElasticGpuSpecification != nil {
for i, v := range s.ElasticGpuSpecification {
if v == nil {
@@ -52439,6 +60996,12 @@ func (s *RunInstancesInput) SetClientToken(v string) *RunInstancesInput {
return s
}
+// SetCreditSpecification sets the CreditSpecification field's value.
+func (s *RunInstancesInput) SetCreditSpecification(v *CreditSpecificationRequest) *RunInstancesInput {
+ s.CreditSpecification = v
+ return s
+}
+
// SetDisableApiTermination sets the DisableApiTermination field's value.
func (s *RunInstancesInput) SetDisableApiTermination(v bool) *RunInstancesInput {
s.DisableApiTermination = &v
@@ -52481,6 +61044,12 @@ func (s *RunInstancesInput) SetInstanceInitiatedShutdownBehavior(v string) *RunI
return s
}
+// SetInstanceMarketOptions sets the InstanceMarketOptions field's value.
+func (s *RunInstancesInput) SetInstanceMarketOptions(v *InstanceMarketOptionsRequest) *RunInstancesInput {
+ s.InstanceMarketOptions = v
+ return s
+}
+
// SetInstanceType sets the InstanceType field's value.
func (s *RunInstancesInput) SetInstanceType(v string) *RunInstancesInput {
s.InstanceType = &v
@@ -52511,6 +61080,12 @@ func (s *RunInstancesInput) SetKeyName(v string) *RunInstancesInput {
return s
}
+// SetLaunchTemplate sets the LaunchTemplate field's value.
+func (s *RunInstancesInput) SetLaunchTemplate(v *LaunchTemplateSpecification) *RunInstancesInput {
+ s.LaunchTemplate = v
+ return s
+}
+
// SetMaxCount sets the MaxCount field's value.
func (s *RunInstancesInput) SetMaxCount(v int64) *RunInstancesInput {
s.MaxCount = &v
@@ -52584,7 +61159,7 @@ func (s *RunInstancesInput) SetUserData(v string) *RunInstancesInput {
}
// Describes the monitoring of an instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunInstancesMonitoringEnabled
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunInstancesMonitoringEnabled
type RunInstancesMonitoringEnabled struct {
_ struct{} `type:"structure"`
@@ -52625,7 +61200,7 @@ func (s *RunInstancesMonitoringEnabled) SetEnabled(v bool) *RunInstancesMonitori
}
// Contains the parameters for RunScheduledInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunScheduledInstancesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunScheduledInstancesRequest
type RunScheduledInstancesInput struct {
_ struct{} `type:"structure"`
@@ -52718,7 +61293,7 @@ func (s *RunScheduledInstancesInput) SetScheduledInstanceId(v string) *RunSchedu
}
// Contains the output of RunScheduledInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunScheduledInstancesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RunScheduledInstancesResult
type RunScheduledInstancesOutput struct {
_ struct{} `type:"structure"`
@@ -52744,7 +61319,7 @@ func (s *RunScheduledInstancesOutput) SetInstanceIdSet(v []*string) *RunSchedule
// Describes the storage parameters for S3 and S3 buckets for an instance store-backed
// AMI.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/S3Storage
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/S3Storage
type S3Storage struct {
_ struct{} `type:"structure"`
@@ -52812,7 +61387,7 @@ func (s *S3Storage) SetUploadPolicySignature(v string) *S3Storage {
}
// Describes a Scheduled Instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstance
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstance
type ScheduledInstance struct {
_ struct{} `type:"structure"`
@@ -52963,7 +61538,7 @@ func (s *ScheduledInstance) SetTotalScheduledInstanceHours(v int64) *ScheduledIn
}
// Describes a schedule that is available for your Scheduled Instances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstanceAvailability
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstanceAvailability
type ScheduledInstanceAvailability struct {
_ struct{} `type:"structure"`
@@ -53097,7 +61672,7 @@ func (s *ScheduledInstanceAvailability) SetTotalScheduledInstanceHours(v int64)
}
// Describes the recurring schedule for a Scheduled Instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstanceRecurrence
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstanceRecurrence
type ScheduledInstanceRecurrence struct {
_ struct{} `type:"structure"`
@@ -53162,7 +61737,7 @@ func (s *ScheduledInstanceRecurrence) SetOccurrenceUnit(v string) *ScheduledInst
}
// Describes the recurring schedule for a Scheduled Instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstanceRecurrenceRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstanceRecurrenceRequest
type ScheduledInstanceRecurrenceRequest struct {
_ struct{} `type:"structure"`
@@ -53230,11 +61805,11 @@ func (s *ScheduledInstanceRecurrenceRequest) SetOccurrenceUnit(v string) *Schedu
}
// Describes a block device mapping for a Scheduled Instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstancesBlockDeviceMapping
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstancesBlockDeviceMapping
type ScheduledInstancesBlockDeviceMapping struct {
_ struct{} `type:"structure"`
- // The device name exposed to the instance (for example, /dev/sdh or xvdh).
+ // The device name (for example, /dev/sdh or xvdh).
DeviceName *string `type:"string"`
// Parameters used to set up EBS volumes automatically when the instance is
@@ -53247,7 +61822,7 @@ type ScheduledInstancesBlockDeviceMapping struct {
// The virtual device name (ephemeralN). Instance store volumes are numbered
// starting from 0. An instance type with two available instance store volumes
- // can specify mappings for ephemeral0 and ephemeral1.The number of available
+ // can specify mappings for ephemeral0 and ephemeral1. The number of available
// instance store volumes depends on the instance type. After you connect to
// the instance, you must mount the volume.
//
@@ -53293,7 +61868,7 @@ func (s *ScheduledInstancesBlockDeviceMapping) SetVirtualName(v string) *Schedul
}
// Describes an EBS volume for a Scheduled Instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstancesEbs
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstancesEbs
type ScheduledInstancesEbs struct {
_ struct{} `type:"structure"`
@@ -53382,7 +61957,7 @@ func (s *ScheduledInstancesEbs) SetVolumeType(v string) *ScheduledInstancesEbs {
}
// Describes an IAM instance profile for a Scheduled Instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstancesIamInstanceProfile
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstancesIamInstanceProfile
type ScheduledInstancesIamInstanceProfile struct {
_ struct{} `type:"structure"`
@@ -53416,7 +61991,7 @@ func (s *ScheduledInstancesIamInstanceProfile) SetName(v string) *ScheduledInsta
}
// Describes an IPv6 address.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstancesIpv6Address
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstancesIpv6Address
type ScheduledInstancesIpv6Address struct {
_ struct{} `type:"structure"`
@@ -53445,7 +62020,7 @@ func (s *ScheduledInstancesIpv6Address) SetIpv6Address(v string) *ScheduledInsta
// If you are launching the Scheduled Instance in EC2-VPC, you must specify
// the ID of the subnet. You can specify the subnet using either SubnetId or
// NetworkInterface.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstancesLaunchSpecification
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstancesLaunchSpecification
type ScheduledInstancesLaunchSpecification struct {
_ struct{} `type:"structure"`
@@ -53608,7 +62183,7 @@ func (s *ScheduledInstancesLaunchSpecification) SetUserData(v string) *Scheduled
}
// Describes whether monitoring is enabled for a Scheduled Instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstancesMonitoring
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstancesMonitoring
type ScheduledInstancesMonitoring struct {
_ struct{} `type:"structure"`
@@ -53633,7 +62208,7 @@ func (s *ScheduledInstancesMonitoring) SetEnabled(v bool) *ScheduledInstancesMon
}
// Describes a network interface for a Scheduled Instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstancesNetworkInterface
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstancesNetworkInterface
type ScheduledInstancesNetworkInterface struct {
_ struct{} `type:"structure"`
@@ -53762,7 +62337,7 @@ func (s *ScheduledInstancesNetworkInterface) SetSubnetId(v string) *ScheduledIns
}
// Describes the placement for a Scheduled Instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstancesPlacement
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstancesPlacement
type ScheduledInstancesPlacement struct {
_ struct{} `type:"structure"`
@@ -53796,7 +62371,7 @@ func (s *ScheduledInstancesPlacement) SetGroupName(v string) *ScheduledInstances
}
// Describes a private IPv4 address for a Scheduled Instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstancesPrivateIpAddressConfig
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstancesPrivateIpAddressConfig
type ScheduledInstancesPrivateIpAddressConfig struct {
_ struct{} `type:"structure"`
@@ -53831,7 +62406,7 @@ func (s *ScheduledInstancesPrivateIpAddressConfig) SetPrivateIpAddress(v string)
}
// Describes a security group
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SecurityGroup
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SecurityGroup
type SecurityGroup struct {
_ struct{} `type:"structure"`
@@ -53918,8 +62493,42 @@ func (s *SecurityGroup) SetVpcId(v string) *SecurityGroup {
return s
}
+// Describes a security group.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SecurityGroupIdentifier
+type SecurityGroupIdentifier struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the security group.
+ GroupId *string `locationName:"groupId" type:"string"`
+
+ // The name of the security group.
+ GroupName *string `locationName:"groupName" type:"string"`
+}
+
+// String returns the string representation
+func (s SecurityGroupIdentifier) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SecurityGroupIdentifier) GoString() string {
+ return s.String()
+}
+
+// SetGroupId sets the GroupId field's value.
+func (s *SecurityGroupIdentifier) SetGroupId(v string) *SecurityGroupIdentifier {
+ s.GroupId = &v
+ return s
+}
+
+// SetGroupName sets the GroupName field's value.
+func (s *SecurityGroupIdentifier) SetGroupName(v string) *SecurityGroupIdentifier {
+ s.GroupName = &v
+ return s
+}
+
// Describes a VPC with a security group that references your security group.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SecurityGroupReference
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SecurityGroupReference
type SecurityGroupReference struct {
_ struct{} `type:"structure"`
@@ -53965,9 +62574,221 @@ func (s *SecurityGroupReference) SetVpcPeeringConnectionId(v string) *SecurityGr
return s
}
+// Describes a service configuration for a VPC endpoint service.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ServiceConfiguration
+type ServiceConfiguration struct {
+ _ struct{} `type:"structure"`
+
+ // Indicates whether requests from other AWS accounts to create an endpoint
+ // to the service must first be accepted.
+ AcceptanceRequired *bool `locationName:"acceptanceRequired" type:"boolean"`
+
+ // In the Availability Zones in which the service is available.
+ AvailabilityZones []*string `locationName:"availabilityZoneSet" locationNameList:"item" type:"list"`
+
+ // The DNS names for the service.
+ BaseEndpointDnsNames []*string `locationName:"baseEndpointDnsNameSet" locationNameList:"item" type:"list"`
+
+ // The Amazon Resource Names (ARNs) of the Network Load Balancers for the service.
+ NetworkLoadBalancerArns []*string `locationName:"networkLoadBalancerArnSet" locationNameList:"item" type:"list"`
+
+ // The private DNS name for the service.
+ PrivateDnsName *string `locationName:"privateDnsName" type:"string"`
+
+ // The ID of the service.
+ ServiceId *string `locationName:"serviceId" type:"string"`
+
+ // The name of the service.
+ ServiceName *string `locationName:"serviceName" type:"string"`
+
+ // The service state.
+ ServiceState *string `locationName:"serviceState" type:"string" enum:"ServiceState"`
+
+ // The type of service.
+ ServiceType []*ServiceTypeDetail `locationName:"serviceType" locationNameList:"item" type:"list"`
+}
+
+// String returns the string representation
+func (s ServiceConfiguration) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ServiceConfiguration) GoString() string {
+ return s.String()
+}
+
+// SetAcceptanceRequired sets the AcceptanceRequired field's value.
+func (s *ServiceConfiguration) SetAcceptanceRequired(v bool) *ServiceConfiguration {
+ s.AcceptanceRequired = &v
+ return s
+}
+
+// SetAvailabilityZones sets the AvailabilityZones field's value.
+func (s *ServiceConfiguration) SetAvailabilityZones(v []*string) *ServiceConfiguration {
+ s.AvailabilityZones = v
+ return s
+}
+
+// SetBaseEndpointDnsNames sets the BaseEndpointDnsNames field's value.
+func (s *ServiceConfiguration) SetBaseEndpointDnsNames(v []*string) *ServiceConfiguration {
+ s.BaseEndpointDnsNames = v
+ return s
+}
+
+// SetNetworkLoadBalancerArns sets the NetworkLoadBalancerArns field's value.
+func (s *ServiceConfiguration) SetNetworkLoadBalancerArns(v []*string) *ServiceConfiguration {
+ s.NetworkLoadBalancerArns = v
+ return s
+}
+
+// SetPrivateDnsName sets the PrivateDnsName field's value.
+func (s *ServiceConfiguration) SetPrivateDnsName(v string) *ServiceConfiguration {
+ s.PrivateDnsName = &v
+ return s
+}
+
+// SetServiceId sets the ServiceId field's value.
+func (s *ServiceConfiguration) SetServiceId(v string) *ServiceConfiguration {
+ s.ServiceId = &v
+ return s
+}
+
+// SetServiceName sets the ServiceName field's value.
+func (s *ServiceConfiguration) SetServiceName(v string) *ServiceConfiguration {
+ s.ServiceName = &v
+ return s
+}
+
+// SetServiceState sets the ServiceState field's value.
+func (s *ServiceConfiguration) SetServiceState(v string) *ServiceConfiguration {
+ s.ServiceState = &v
+ return s
+}
+
+// SetServiceType sets the ServiceType field's value.
+func (s *ServiceConfiguration) SetServiceType(v []*ServiceTypeDetail) *ServiceConfiguration {
+ s.ServiceType = v
+ return s
+}
+
+// Describes a VPC endpoint service.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ServiceDetail
+type ServiceDetail struct {
+ _ struct{} `type:"structure"`
+
+ // Indicates whether VPC endpoint connection requests to the service must be
+ // accepted by the service owner.
+ AcceptanceRequired *bool `locationName:"acceptanceRequired" type:"boolean"`
+
+ // The Availability Zones in which the service is available.
+ AvailabilityZones []*string `locationName:"availabilityZoneSet" locationNameList:"item" type:"list"`
+
+ // The DNS names for the service.
+ BaseEndpointDnsNames []*string `locationName:"baseEndpointDnsNameSet" locationNameList:"item" type:"list"`
+
+ // The AWS account ID of the service owner.
+ Owner *string `locationName:"owner" type:"string"`
+
+ // The private DNS name for the service.
+ PrivateDnsName *string `locationName:"privateDnsName" type:"string"`
+
+ // The Amazon Resource Name (ARN) of the service.
+ ServiceName *string `locationName:"serviceName" type:"string"`
+
+ // The type of service.
+ ServiceType []*ServiceTypeDetail `locationName:"serviceType" locationNameList:"item" type:"list"`
+
+ // Indicates whether the service supports endpoint policies.
+ VpcEndpointPolicySupported *bool `locationName:"vpcEndpointPolicySupported" type:"boolean"`
+}
+
+// String returns the string representation
+func (s ServiceDetail) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ServiceDetail) GoString() string {
+ return s.String()
+}
+
+// SetAcceptanceRequired sets the AcceptanceRequired field's value.
+func (s *ServiceDetail) SetAcceptanceRequired(v bool) *ServiceDetail {
+ s.AcceptanceRequired = &v
+ return s
+}
+
+// SetAvailabilityZones sets the AvailabilityZones field's value.
+func (s *ServiceDetail) SetAvailabilityZones(v []*string) *ServiceDetail {
+ s.AvailabilityZones = v
+ return s
+}
+
+// SetBaseEndpointDnsNames sets the BaseEndpointDnsNames field's value.
+func (s *ServiceDetail) SetBaseEndpointDnsNames(v []*string) *ServiceDetail {
+ s.BaseEndpointDnsNames = v
+ return s
+}
+
+// SetOwner sets the Owner field's value.
+func (s *ServiceDetail) SetOwner(v string) *ServiceDetail {
+ s.Owner = &v
+ return s
+}
+
+// SetPrivateDnsName sets the PrivateDnsName field's value.
+func (s *ServiceDetail) SetPrivateDnsName(v string) *ServiceDetail {
+ s.PrivateDnsName = &v
+ return s
+}
+
+// SetServiceName sets the ServiceName field's value.
+func (s *ServiceDetail) SetServiceName(v string) *ServiceDetail {
+ s.ServiceName = &v
+ return s
+}
+
+// SetServiceType sets the ServiceType field's value.
+func (s *ServiceDetail) SetServiceType(v []*ServiceTypeDetail) *ServiceDetail {
+ s.ServiceType = v
+ return s
+}
+
+// SetVpcEndpointPolicySupported sets the VpcEndpointPolicySupported field's value.
+func (s *ServiceDetail) SetVpcEndpointPolicySupported(v bool) *ServiceDetail {
+ s.VpcEndpointPolicySupported = &v
+ return s
+}
+
+// Describes the type of service for a VPC endpoint.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ServiceTypeDetail
+type ServiceTypeDetail struct {
+ _ struct{} `type:"structure"`
+
+ // The type of service.
+ ServiceType *string `locationName:"serviceType" type:"string" enum:"ServiceType"`
+}
+
+// String returns the string representation
+func (s ServiceTypeDetail) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ServiceTypeDetail) GoString() string {
+ return s.String()
+}
+
+// SetServiceType sets the ServiceType field's value.
+func (s *ServiceTypeDetail) SetServiceType(v string) *ServiceTypeDetail {
+ s.ServiceType = &v
+ return s
+}
+
// Describes the time period for a Scheduled Instance to start its first schedule.
// The time period must span less than one day.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SlotDateTimeRangeRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SlotDateTimeRangeRequest
type SlotDateTimeRangeRequest struct {
_ struct{} `type:"structure"`
@@ -54023,7 +62844,7 @@ func (s *SlotDateTimeRangeRequest) SetLatestTime(v time.Time) *SlotDateTimeRange
}
// Describes the time period for a Scheduled Instance to start its first schedule.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SlotStartTimeRangeRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SlotStartTimeRangeRequest
type SlotStartTimeRangeRequest struct {
_ struct{} `type:"structure"`
@@ -54057,7 +62878,7 @@ func (s *SlotStartTimeRangeRequest) SetLatestTime(v time.Time) *SlotStartTimeRan
}
// Describes a snapshot.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Snapshot
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Snapshot
type Snapshot struct {
_ struct{} `type:"structure"`
@@ -54215,7 +63036,7 @@ func (s *Snapshot) SetVolumeSize(v int64) *Snapshot {
}
// Describes the snapshot created from the imported disk.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SnapshotDetail
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SnapshotDetail
type SnapshotDetail struct {
_ struct{} `type:"structure"`
@@ -54321,7 +63142,7 @@ func (s *SnapshotDetail) SetUserBucket(v *UserBucketDetails) *SnapshotDetail {
}
// The disk container object for the import snapshot request.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SnapshotDiskContainer
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SnapshotDiskContainer
type SnapshotDiskContainer struct {
_ struct{} `type:"structure"`
@@ -54376,7 +63197,7 @@ func (s *SnapshotDiskContainer) SetUserBucket(v *UserBucket) *SnapshotDiskContai
}
// Details about the import snapshot task.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SnapshotTaskDetail
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SnapshotTaskDetail
type SnapshotTaskDetail struct {
_ struct{} `type:"structure"`
@@ -54472,15 +63293,15 @@ func (s *SnapshotTaskDetail) SetUserBucket(v *UserBucketDetails) *SnapshotTaskDe
return s
}
-// Describes the data feed for a Spot instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotDatafeedSubscription
+// Describes the data feed for a Spot Instance.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotDatafeedSubscription
type SpotDatafeedSubscription struct {
_ struct{} `type:"structure"`
- // The Amazon S3 bucket where the Spot instance data feed is located.
+ // The Amazon S3 bucket where the Spot Instance data feed is located.
Bucket *string `locationName:"bucket" type:"string"`
- // The fault codes for the Spot instance request, if any.
+ // The fault codes for the Spot Instance request, if any.
Fault *SpotInstanceStateFault `locationName:"fault" type:"structure"`
// The AWS account ID of the account.
@@ -54489,7 +63310,7 @@ type SpotDatafeedSubscription struct {
// The prefix that is prepended to data feed files.
Prefix *string `locationName:"prefix" type:"string"`
- // The state of the Spot instance data feed subscription.
+ // The state of the Spot Instance data feed subscription.
State *string `locationName:"state" type:"string" enum:"DatafeedSubscriptionState"`
}
@@ -54533,15 +63354,18 @@ func (s *SpotDatafeedSubscription) SetState(v string) *SpotDatafeedSubscription
return s
}
-// Describes the launch specification for one or more Spot instances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotFleetLaunchSpecification
+// Describes the launch specification for one or more Spot Instances.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotFleetLaunchSpecification
type SpotFleetLaunchSpecification struct {
_ struct{} `type:"structure"`
// Deprecated.
AddressingType *string `locationName:"addressingType" type:"string"`
- // One or more block device mapping entries.
+ // One or more block device mapping entries. You can't specify both a snapshot
+ // ID and an encryption value. This is because only blank volumes can be encrypted
+ // on creation. If a snapshot is the basis for a volume, it is not blank and
+ // its encryption status is used for the volume encryption status.
BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"`
// Indicates whether the instances are optimized for EBS I/O. This optimization
@@ -54559,7 +63383,7 @@ type SpotFleetLaunchSpecification struct {
// The ID of the AMI.
ImageId *string `locationName:"imageId" type:"string"`
- // The instance type. Note that T2 and HS1 instance types are not supported.
+ // The instance type.
InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"`
// The ID of the kernel.
@@ -54586,10 +63410,10 @@ type SpotFleetLaunchSpecification struct {
// you can specify the names or the IDs of the security groups.
SecurityGroups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"`
- // The bid price per unit hour for the specified instance type. If this value
- // is not specified, the default is the Spot bid price specified for the fleet.
- // To determine the bid price per unit hour, divide the Spot bid price by the
- // value of WeightedCapacity.
+ // The maximum price per unit hour that you are willing to pay for a Spot Instance.
+ // If this value is not specified, the default is the Spot price specified for
+ // the fleet. To determine the Spot price per unit hour, divide the Spot price
+ // by the value of WeightedCapacity.
SpotPrice *string `locationName:"spotPrice" type:"string"`
// The ID of the subnet in which to launch the instances. To specify multiple
@@ -54753,7 +63577,7 @@ func (s *SpotFleetLaunchSpecification) SetWeightedCapacity(v float64) *SpotFleet
}
// Describes whether monitoring is enabled.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotFleetMonitoring
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotFleetMonitoring
type SpotFleetMonitoring struct {
_ struct{} `type:"structure"`
@@ -54779,16 +63603,16 @@ func (s *SpotFleetMonitoring) SetEnabled(v bool) *SpotFleetMonitoring {
return s
}
-// Describes a Spot fleet request.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotFleetRequestConfig
+// Describes a Spot Fleet request.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotFleetRequestConfig
type SpotFleetRequestConfig struct {
_ struct{} `type:"structure"`
- // The progress of the Spot fleet request. If there is an error, the status
- // is error. After all bids are placed, the status is pending_fulfillment. If
- // the size of the fleet is equal to or greater than its target capacity, the
- // status is fulfilled. If the size of the fleet is decreased, the status is
- // pending_termination while Spot instances are terminating.
+ // The progress of the Spot Fleet request. If there is an error, the status
+ // is error. After all requests are placed, the status is pending_fulfillment.
+ // If the size of the fleet is equal to or greater than its target capacity,
+ // the status is fulfilled. If the size of the fleet is decreased, the status
+ // is pending_termination while Spot Instances are terminating.
ActivityStatus *string `locationName:"activityStatus" type:"string" enum:"ActivityStatus"`
// The creation date and time of the request.
@@ -54796,17 +63620,17 @@ type SpotFleetRequestConfig struct {
// CreateTime is a required field
CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601" required:"true"`
- // Information about the configuration of the Spot fleet request.
+ // The configuration of the Spot Fleet request.
//
// SpotFleetRequestConfig is a required field
SpotFleetRequestConfig *SpotFleetRequestConfigData `locationName:"spotFleetRequestConfig" type:"structure" required:"true"`
- // The ID of the Spot fleet request.
+ // The ID of the Spot Fleet request.
//
// SpotFleetRequestId is a required field
SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
- // The state of the Spot fleet request.
+ // The state of the Spot Fleet request.
//
// SpotFleetRequestState is a required field
SpotFleetRequestState *string `locationName:"spotFleetRequestState" type:"string" required:"true" enum:"BatchState"`
@@ -54852,13 +63676,13 @@ func (s *SpotFleetRequestConfig) SetSpotFleetRequestState(v string) *SpotFleetRe
return s
}
-// Describes the configuration of a Spot fleet request.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotFleetRequestConfigData
+// Describes the configuration of a Spot Fleet request.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotFleetRequestConfigData
type SpotFleetRequestConfigData struct {
_ struct{} `type:"structure"`
// Indicates how to allocate the target capacity across the Spot pools specified
- // by the Spot fleet request. The default is lowestPrice.
+ // by the Spot Fleet request. The default is lowestPrice.
AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"AllocationStrategy"`
// A unique, case-sensitive identifier you provide to ensure idempotency of
@@ -54866,54 +63690,68 @@ type SpotFleetRequestConfigData struct {
// see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
ClientToken *string `locationName:"clientToken" type:"string"`
- // Indicates whether running Spot instances should be terminated if the target
- // capacity of the Spot fleet request is decreased below the current size of
- // the Spot fleet.
+ // Indicates whether running Spot Instances should be terminated if the target
+ // capacity of the Spot Fleet request is decreased below the current size of
+ // the Spot Fleet.
ExcessCapacityTerminationPolicy *string `locationName:"excessCapacityTerminationPolicy" type:"string" enum:"ExcessCapacityTerminationPolicy"`
// The number of units fulfilled by this request compared to the set target
// capacity.
FulfilledCapacity *float64 `locationName:"fulfilledCapacity" type:"double"`
- // Grants the Spot fleet permission to terminate Spot instances on your behalf
- // when you cancel its Spot fleet request using CancelSpotFleetRequests or when
- // the Spot fleet request expires, if you set terminateInstancesWithExpiration.
+ // Grants the Spot Fleet permission to terminate Spot Instances on your behalf
+ // when you cancel its Spot Fleet request using CancelSpotFleetRequests or when
+ // the Spot Fleet request expires, if you set terminateInstancesWithExpiration.
//
// IamFleetRole is a required field
IamFleetRole *string `locationName:"iamFleetRole" type:"string" required:"true"`
- // Information about the launch specifications for the Spot fleet request.
- //
- // LaunchSpecifications is a required field
- LaunchSpecifications []*SpotFleetLaunchSpecification `locationName:"launchSpecifications" locationNameList:"item" min:"1" type:"list" required:"true"`
+ // The behavior when a Spot Instance is interrupted. The default is terminate.
+ InstanceInterruptionBehavior *string `locationName:"instanceInterruptionBehavior" type:"string" enum:"InstanceInterruptionBehavior"`
- // Indicates whether Spot fleet should replace unhealthy instances.
+ // The launch specifications for the Spot Fleet request.
+ LaunchSpecifications []*SpotFleetLaunchSpecification `locationName:"launchSpecifications" locationNameList:"item" type:"list"`
+
+ // The launch template and overrides.
+ LaunchTemplateConfigs []*LaunchTemplateConfig `locationName:"launchTemplateConfigs" locationNameList:"item" type:"list"`
+
+ // One or more Classic Load Balancers and target groups to attach to the Spot
+ // Fleet request. Spot Fleet registers the running Spot Instances with the specified
+ // Classic Load Balancers and target groups.
+ //
+ // With Network Load Balancers, Spot Fleet cannot register instances that have
+ // the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1,
+ // HS1, M1, M2, M3, and T1.
+ LoadBalancersConfig *LoadBalancersConfig `locationName:"loadBalancersConfig" type:"structure"`
+
+ // Indicates whether Spot Fleet should replace unhealthy instances.
ReplaceUnhealthyInstances *bool `locationName:"replaceUnhealthyInstances" type:"boolean"`
- // The bid price per unit hour.
- //
- // SpotPrice is a required field
- SpotPrice *string `locationName:"spotPrice" type:"string" required:"true"`
+ // The maximum price per unit hour that you are willing to pay for a Spot Instance.
+ // The default is the On-Demand price.
+ SpotPrice *string `locationName:"spotPrice" type:"string"`
// The number of units to request. You can choose to set the target capacity
// in terms of instances or a performance characteristic that is important to
- // your application workload, such as vCPUs, memory, or I/O.
+ // your application workload, such as vCPUs, memory, or I/O. If the request
+ // type is maintain, you can specify a target capacity of 0 and add capacity
+ // later.
//
// TargetCapacity is a required field
TargetCapacity *int64 `locationName:"targetCapacity" type:"integer" required:"true"`
- // Indicates whether running Spot instances should be terminated when the Spot
- // fleet request expires.
+ // Indicates whether running Spot Instances should be terminated when the Spot
+ // Fleet request expires.
TerminateInstancesWithExpiration *bool `locationName:"terminateInstancesWithExpiration" type:"boolean"`
// The type of request. Indicates whether the fleet will only request the target
// capacity or also attempt to maintain it. When you request a certain target
- // capacity, the fleet will only place the required bids. It will not attempt
- // to replenish Spot instances if capacity is diminished, nor will it submit
- // bids in alternative Spot pools if capacity is not available. When you want
- // to maintain a certain target capacity, fleet will place the required bids
- // to meet this target capacity. It will also automatically replenish any interrupted
- // instances. Default: maintain.
+ // capacity, the fleet will only place the required requests. It will not attempt
+ // to replenish Spot Instances if capacity is diminished, nor will it submit
+ // requests in alternative Spot pools if capacity is not available. When you
+ // want to maintain a certain target capacity, fleet will place the required
+ // requests to meet this target capacity. It will also automatically replenish
+ // any interrupted instances. Default: maintain.
Type *string `locationName:"type" type:"string" enum:"FleetType"`
// The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
@@ -54921,8 +63759,8 @@ type SpotFleetRequestConfigData struct {
ValidFrom *time.Time `locationName:"validFrom" type:"timestamp" timestampFormat:"iso8601"`
// The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
- // At this point, no new Spot instance requests are placed or enabled to fulfill
- // the request.
+ // At this point, no new Spot Instance requests are placed or able to fulfill
+ // the request. The default end date is 7 days from the current date.
ValidUntil *time.Time `locationName:"validUntil" type:"timestamp" timestampFormat:"iso8601"`
}
@@ -54942,15 +63780,6 @@ func (s *SpotFleetRequestConfigData) Validate() error {
if s.IamFleetRole == nil {
invalidParams.Add(request.NewErrParamRequired("IamFleetRole"))
}
- if s.LaunchSpecifications == nil {
- invalidParams.Add(request.NewErrParamRequired("LaunchSpecifications"))
- }
- if s.LaunchSpecifications != nil && len(s.LaunchSpecifications) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LaunchSpecifications", 1))
- }
- if s.SpotPrice == nil {
- invalidParams.Add(request.NewErrParamRequired("SpotPrice"))
- }
if s.TargetCapacity == nil {
invalidParams.Add(request.NewErrParamRequired("TargetCapacity"))
}
@@ -54964,6 +63793,21 @@ func (s *SpotFleetRequestConfigData) Validate() error {
}
}
}
+ if s.LaunchTemplateConfigs != nil {
+ for i, v := range s.LaunchTemplateConfigs {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LaunchTemplateConfigs", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
+ if s.LoadBalancersConfig != nil {
+ if err := s.LoadBalancersConfig.Validate(); err != nil {
+ invalidParams.AddNested("LoadBalancersConfig", err.(request.ErrInvalidParams))
+ }
+ }
if invalidParams.Len() > 0 {
return invalidParams
@@ -55001,12 +63845,30 @@ func (s *SpotFleetRequestConfigData) SetIamFleetRole(v string) *SpotFleetRequest
return s
}
+// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value.
+func (s *SpotFleetRequestConfigData) SetInstanceInterruptionBehavior(v string) *SpotFleetRequestConfigData {
+ s.InstanceInterruptionBehavior = &v
+ return s
+}
+
// SetLaunchSpecifications sets the LaunchSpecifications field's value.
func (s *SpotFleetRequestConfigData) SetLaunchSpecifications(v []*SpotFleetLaunchSpecification) *SpotFleetRequestConfigData {
s.LaunchSpecifications = v
return s
}
+// SetLaunchTemplateConfigs sets the LaunchTemplateConfigs field's value.
+func (s *SpotFleetRequestConfigData) SetLaunchTemplateConfigs(v []*LaunchTemplateConfig) *SpotFleetRequestConfigData {
+ s.LaunchTemplateConfigs = v
+ return s
+}
+
+// SetLoadBalancersConfig sets the LoadBalancersConfig field's value.
+func (s *SpotFleetRequestConfigData) SetLoadBalancersConfig(v *LoadBalancersConfig) *SpotFleetRequestConfigData {
+ s.LoadBalancersConfig = v
+ return s
+}
+
// SetReplaceUnhealthyInstances sets the ReplaceUnhealthyInstances field's value.
func (s *SpotFleetRequestConfigData) SetReplaceUnhealthyInstances(v bool) *SpotFleetRequestConfigData {
s.ReplaceUnhealthyInstances = &v
@@ -55049,8 +63911,8 @@ func (s *SpotFleetRequestConfigData) SetValidUntil(v time.Time) *SpotFleetReques
return s
}
-// The tags for a Spot fleet resource.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotFleetTagSpecification
+// The tags for a Spot Fleet resource.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotFleetTagSpecification
type SpotFleetTagSpecification struct {
_ struct{} `type:"structure"`
@@ -55084,67 +63946,69 @@ func (s *SpotFleetTagSpecification) SetTags(v []*Tag) *SpotFleetTagSpecification
return s
}
-// Describes a Spot instance request.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotInstanceRequest
+// Describes a Spot Instance request.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotInstanceRequest
type SpotInstanceRequest struct {
_ struct{} `type:"structure"`
- // If you specified a duration and your Spot instance request was fulfilled,
- // this is the fixed hourly price in effect for the Spot instance while it runs.
+ // If you specified a duration and your Spot Instance request was fulfilled,
+ // this is the fixed hourly price in effect for the Spot Instance while it runs.
ActualBlockHourlyPrice *string `locationName:"actualBlockHourlyPrice" type:"string"`
// The Availability Zone group. If you specify the same Availability Zone group
- // for all Spot instance requests, all Spot instances are launched in the same
+ // for all Spot Instance requests, all Spot Instances are launched in the same
// Availability Zone.
AvailabilityZoneGroup *string `locationName:"availabilityZoneGroup" type:"string"`
- // The duration for the Spot instance, in minutes.
+ // The duration for the Spot Instance, in minutes.
BlockDurationMinutes *int64 `locationName:"blockDurationMinutes" type:"integer"`
- // The date and time when the Spot instance request was created, in UTC format
+ // The date and time when the Spot Instance request was created, in UTC format
// (for example, YYYY-MM-DDTHH:MM:SSZ).
CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601"`
- // The fault codes for the Spot instance request, if any.
+ // The fault codes for the Spot Instance request, if any.
Fault *SpotInstanceStateFault `locationName:"fault" type:"structure"`
- // The instance ID, if an instance has been launched to fulfill the Spot instance
+ // The instance ID, if an instance has been launched to fulfill the Spot Instance
// request.
InstanceId *string `locationName:"instanceId" type:"string"`
- // The instance launch group. Launch groups are Spot instances that launch together
+ // The behavior when a Spot Instance is interrupted.
+ InstanceInterruptionBehavior *string `locationName:"instanceInterruptionBehavior" type:"string" enum:"InstanceInterruptionBehavior"`
+
+ // The instance launch group. Launch groups are Spot Instances that launch together
// and terminate together.
LaunchGroup *string `locationName:"launchGroup" type:"string"`
// Additional information for launching instances.
LaunchSpecification *LaunchSpecification `locationName:"launchSpecification" type:"structure"`
- // The Availability Zone in which the bid is launched.
+ // The Availability Zone in which the request is launched.
LaunchedAvailabilityZone *string `locationName:"launchedAvailabilityZone" type:"string"`
- // The product description associated with the Spot instance.
+ // The product description associated with the Spot Instance.
ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"`
- // The ID of the Spot instance request.
+ // The ID of the Spot Instance request.
SpotInstanceRequestId *string `locationName:"spotInstanceRequestId" type:"string"`
- // The maximum hourly price (bid) for the Spot instance launched to fulfill
- // the request.
+ // The maximum price per hour that you are willing to pay for a Spot Instance.
SpotPrice *string `locationName:"spotPrice" type:"string"`
- // The state of the Spot instance request. Spot bid status information can help
- // you track your Spot instance requests. For more information, see Spot Bid
- // Status (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html)
+ // The state of the Spot Instance request. Spot status information can help
+ // you track your Spot Instance requests. For more information, see Spot Status
+ // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html)
// in the Amazon Elastic Compute Cloud User Guide.
State *string `locationName:"state" type:"string" enum:"SpotInstanceState"`
- // The status code and status message describing the Spot instance request.
+ // The status code and status message describing the Spot Instance request.
Status *SpotInstanceStatus `locationName:"status" type:"structure"`
// Any tags assigned to the resource.
Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
- // The Spot instance request type.
+ // The Spot Instance request type.
Type *string `locationName:"type" type:"string" enum:"SpotInstanceType"`
// The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
@@ -55154,7 +64018,8 @@ type SpotInstanceRequest struct {
// The end date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
// If this is a one-time request, it remains active until all instances launch,
// the request is canceled, or this date is reached. If the request is persistent,
- // it remains active until it is canceled or this date is reached.
+ // it remains active until it is canceled or this date is reached. The default
+ // end date is 7 days from the current date.
ValidUntil *time.Time `locationName:"validUntil" type:"timestamp" timestampFormat:"iso8601"`
}
@@ -55204,6 +64069,12 @@ func (s *SpotInstanceRequest) SetInstanceId(v string) *SpotInstanceRequest {
return s
}
+// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value.
+func (s *SpotInstanceRequest) SetInstanceInterruptionBehavior(v string) *SpotInstanceRequest {
+ s.InstanceInterruptionBehavior = &v
+ return s
+}
+
// SetLaunchGroup sets the LaunchGroup field's value.
func (s *SpotInstanceRequest) SetLaunchGroup(v string) *SpotInstanceRequest {
s.LaunchGroup = &v
@@ -55276,15 +64147,15 @@ func (s *SpotInstanceRequest) SetValidUntil(v time.Time) *SpotInstanceRequest {
return s
}
-// Describes a Spot instance state change.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotInstanceStateFault
+// Describes a Spot Instance state change.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotInstanceStateFault
type SpotInstanceStateFault struct {
_ struct{} `type:"structure"`
- // The reason code for the Spot instance state change.
+ // The reason code for the Spot Instance state change.
Code *string `locationName:"code" type:"string"`
- // The message for the Spot instance state change.
+ // The message for the Spot Instance state change.
Message *string `locationName:"message" type:"string"`
}
@@ -55310,12 +64181,12 @@ func (s *SpotInstanceStateFault) SetMessage(v string) *SpotInstanceStateFault {
return s
}
-// Describes the status of a Spot instance request.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotInstanceStatus
+// Describes the status of a Spot Instance request.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotInstanceStatus
type SpotInstanceStatus struct {
_ struct{} `type:"structure"`
- // The status code. For a list of status codes, see Spot Bid Status Codes (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html#spot-instance-bid-status-understand)
+ // The status code. For a list of status codes, see Spot Status Codes (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html#spot-instance-bid-status-understand)
// in the Amazon Elastic Compute Cloud User Guide.
Code *string `locationName:"code" type:"string"`
@@ -55355,23 +64226,91 @@ func (s *SpotInstanceStatus) SetUpdateTime(v time.Time) *SpotInstanceStatus {
return s
}
-// Describes Spot instance placement.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotPlacement
+// The options for Spot Instances.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotMarketOptions
+type SpotMarketOptions struct {
+ _ struct{} `type:"structure"`
+
+ // The required duration for the Spot Instances (also known as Spot blocks),
+ // in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300,
+ // or 360).
+ BlockDurationMinutes *int64 `type:"integer"`
+
+ // The behavior when a Spot Instance is interrupted. The default is terminate.
+ InstanceInterruptionBehavior *string `type:"string" enum:"InstanceInterruptionBehavior"`
+
+ // The maximum hourly price you're willing to pay for the Spot Instances. The
+ // default is the On-Demand price.
+ MaxPrice *string `type:"string"`
+
+ // The Spot Instance request type.
+ SpotInstanceType *string `type:"string" enum:"SpotInstanceType"`
+
+ // The end date of the request. For a one-time request, the request remains
+ // active until all instances launch, the request is canceled, or this date
+ // is reached. If the request is persistent, it remains active until it is canceled
+ // or this date and time is reached. The default end date is 7 days from the
+ // current date.
+ ValidUntil *time.Time `type:"timestamp" timestampFormat:"iso8601"`
+}
+
+// String returns the string representation
+func (s SpotMarketOptions) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SpotMarketOptions) GoString() string {
+ return s.String()
+}
+
+// SetBlockDurationMinutes sets the BlockDurationMinutes field's value.
+func (s *SpotMarketOptions) SetBlockDurationMinutes(v int64) *SpotMarketOptions {
+ s.BlockDurationMinutes = &v
+ return s
+}
+
+// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value.
+func (s *SpotMarketOptions) SetInstanceInterruptionBehavior(v string) *SpotMarketOptions {
+ s.InstanceInterruptionBehavior = &v
+ return s
+}
+
+// SetMaxPrice sets the MaxPrice field's value.
+func (s *SpotMarketOptions) SetMaxPrice(v string) *SpotMarketOptions {
+ s.MaxPrice = &v
+ return s
+}
+
+// SetSpotInstanceType sets the SpotInstanceType field's value.
+func (s *SpotMarketOptions) SetSpotInstanceType(v string) *SpotMarketOptions {
+ s.SpotInstanceType = &v
+ return s
+}
+
+// SetValidUntil sets the ValidUntil field's value.
+func (s *SpotMarketOptions) SetValidUntil(v time.Time) *SpotMarketOptions {
+ s.ValidUntil = &v
+ return s
+}
+
+// Describes Spot Instance placement.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotPlacement
type SpotPlacement struct {
_ struct{} `type:"structure"`
// The Availability Zone.
//
- // [Spot fleet only] To specify multiple Availability Zones, separate them using
+ // [Spot Fleet only] To specify multiple Availability Zones, separate them using
// commas; for example, "us-west-2a, us-west-2b".
AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
- // The name of the placement group (for cluster instances).
+ // The name of the placement group.
GroupName *string `locationName:"groupName" type:"string"`
// The tenancy of the instance (if the instance is running in a VPC). An instance
// with a tenancy of dedicated runs on single-tenant hardware. The host tenancy
- // is not supported for Spot instances.
+ // is not supported for Spot Instances.
Tenancy *string `locationName:"tenancy" type:"string" enum:"Tenancy"`
}
@@ -55403,22 +64342,22 @@ func (s *SpotPlacement) SetTenancy(v string) *SpotPlacement {
return s
}
-// Describes the maximum hourly price (bid) for any Spot instance launched to
-// fulfill the request.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotPrice
+// Describes the maximum price per hour that you are willing to pay for a Spot
+// Instance.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotPrice
type SpotPrice struct {
_ struct{} `type:"structure"`
// The Availability Zone.
AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
- // The instance type. Note that T2 and HS1 instance types are not supported.
+ // The instance type.
InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"`
// A general description of the AMI.
ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"`
- // The maximum price (bid) that you are willing to pay for a Spot instance.
+ // The maximum price per hour that you are willing to pay for a Spot Instance.
SpotPrice *string `locationName:"spotPrice" type:"string"`
// The date and time the request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
@@ -55466,7 +64405,7 @@ func (s *SpotPrice) SetTimestamp(v time.Time) *SpotPrice {
}
// Describes a stale rule in a security group.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StaleIpPermission
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StaleIpPermission
type StaleIpPermission struct {
_ struct{} `type:"structure"`
@@ -55541,7 +64480,7 @@ func (s *StaleIpPermission) SetUserIdGroupPairs(v []*UserIdGroupPair) *StaleIpPe
}
// Describes a stale security group (a security group that contains stale rules).
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StaleSecurityGroup
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StaleSecurityGroup
type StaleSecurityGroup struct {
_ struct{} `type:"structure"`
@@ -55613,7 +64552,7 @@ func (s *StaleSecurityGroup) SetVpcId(v string) *StaleSecurityGroup {
}
// Contains the parameters for StartInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StartInstancesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StartInstancesRequest
type StartInstancesInput struct {
_ struct{} `type:"structure"`
@@ -55674,7 +64613,7 @@ func (s *StartInstancesInput) SetInstanceIds(v []*string) *StartInstancesInput {
}
// Contains the output of StartInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StartInstancesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StartInstancesResult
type StartInstancesOutput struct {
_ struct{} `type:"structure"`
@@ -55699,7 +64638,7 @@ func (s *StartInstancesOutput) SetStartingInstances(v []*InstanceStateChange) *S
}
// Describes a state change.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StateReason
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StateReason
type StateReason struct {
_ struct{} `type:"structure"`
@@ -55716,8 +64655,8 @@ type StateReason struct {
//
// * Server.ScheduledStop: The instance was stopped due to a scheduled retirement.
//
- // * Server.SpotInstanceTermination: A Spot instance was terminated due to
- // an increase in the market price.
+ // * Server.SpotInstanceTermination: A Spot Instance was terminated due to
+ // an increase in the Spot price.
//
// * Client.InternalError: A client error caused the instance to terminate
// on launch.
@@ -55725,6 +64664,9 @@ type StateReason struct {
// * Client.InstanceInitiatedShutdown: The instance was shut down using the
// shutdown -h command from the instance.
//
+ // * Client.InstanceTerminated: The instance was terminated or rebooted during
+ // AMI creation.
+ //
// * Client.UserInitiatedShutdown: The instance was shut down using the Amazon
// EC2 API.
//
@@ -55759,7 +64701,7 @@ func (s *StateReason) SetMessage(v string) *StateReason {
}
// Contains the parameters for StopInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StopInstancesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StopInstancesRequest
type StopInstancesInput struct {
_ struct{} `type:"structure"`
@@ -55825,7 +64767,7 @@ func (s *StopInstancesInput) SetInstanceIds(v []*string) *StopInstancesInput {
}
// Contains the output of StopInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StopInstancesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StopInstancesResult
type StopInstancesOutput struct {
_ struct{} `type:"structure"`
@@ -55850,7 +64792,7 @@ func (s *StopInstancesOutput) SetStoppingInstances(v []*InstanceStateChange) *St
}
// Describes the storage location for an instance store-backed AMI.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Storage
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Storage
type Storage struct {
_ struct{} `type:"structure"`
@@ -55875,7 +64817,7 @@ func (s *Storage) SetS3(v *S3Storage) *Storage {
}
// Describes a storage location in Amazon S3.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StorageLocation
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StorageLocation
type StorageLocation struct {
_ struct{} `type:"structure"`
@@ -55909,7 +64851,7 @@ func (s *StorageLocation) SetKey(v string) *StorageLocation {
}
// Describes a subnet.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Subnet
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Subnet
type Subnet struct {
_ struct{} `type:"structure"`
@@ -56027,7 +64969,7 @@ func (s *Subnet) SetVpcId(v string) *Subnet {
}
// Describes the state of a CIDR block.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SubnetCidrBlockState
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SubnetCidrBlockState
type SubnetCidrBlockState struct {
_ struct{} `type:"structure"`
@@ -56061,7 +65003,7 @@ func (s *SubnetCidrBlockState) SetStatusMessage(v string) *SubnetCidrBlockState
}
// Describes an IPv6 CIDR block associated with a subnet.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SubnetIpv6CidrBlockAssociation
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SubnetIpv6CidrBlockAssociation
type SubnetIpv6CidrBlockAssociation struct {
_ struct{} `type:"structure"`
@@ -56103,8 +65045,34 @@ func (s *SubnetIpv6CidrBlockAssociation) SetIpv6CidrBlockState(v *SubnetCidrBloc
return s
}
+// Describes the T2 instance whose credit option for CPU usage was successfully
+// modified.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SuccessfulInstanceCreditSpecificationItem
+type SuccessfulInstanceCreditSpecificationItem struct {
+ _ struct{} `type:"structure"`
+
+ // The ID of the instance.
+ InstanceId *string `locationName:"instanceId" type:"string"`
+}
+
+// String returns the string representation
+func (s SuccessfulInstanceCreditSpecificationItem) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SuccessfulInstanceCreditSpecificationItem) GoString() string {
+ return s.String()
+}
+
+// SetInstanceId sets the InstanceId field's value.
+func (s *SuccessfulInstanceCreditSpecificationItem) SetInstanceId(v string) *SuccessfulInstanceCreditSpecificationItem {
+ s.InstanceId = &v
+ return s
+}
+
// Describes a tag.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Tag
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Tag
type Tag struct {
_ struct{} `type:"structure"`
@@ -56144,7 +65112,7 @@ func (s *Tag) SetValue(v string) *Tag {
}
// Describes a tag.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TagDescription
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TagDescription
type TagDescription struct {
_ struct{} `type:"structure"`
@@ -56196,7 +65164,7 @@ func (s *TagDescription) SetValue(v string) *TagDescription {
}
// The tags to apply to a resource when the resource is being created.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TagSpecification
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TagSpecification
type TagSpecification struct {
_ struct{} `type:"structure"`
@@ -56231,7 +65199,7 @@ func (s *TagSpecification) SetTags(v []*Tag) *TagSpecification {
}
// Information about the Convertible Reserved Instance offering.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TargetConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TargetConfiguration
type TargetConfiguration struct {
_ struct{} `type:"structure"`
@@ -56266,7 +65234,7 @@ func (s *TargetConfiguration) SetOfferingId(v string) *TargetConfiguration {
}
// Details about the target configuration.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TargetConfigurationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TargetConfigurationRequest
type TargetConfigurationRequest struct {
_ struct{} `type:"structure"`
@@ -56315,8 +65283,102 @@ func (s *TargetConfigurationRequest) SetOfferingId(v string) *TargetConfiguratio
return s
}
+// Describes a load balancer target group.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TargetGroup
+type TargetGroup struct {
+ _ struct{} `type:"structure"`
+
+ // The Amazon Resource Name (ARN) of the target group.
+ //
+ // Arn is a required field
+ Arn *string `locationName:"arn" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s TargetGroup) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TargetGroup) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *TargetGroup) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "TargetGroup"}
+ if s.Arn == nil {
+ invalidParams.Add(request.NewErrParamRequired("Arn"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetArn sets the Arn field's value.
+func (s *TargetGroup) SetArn(v string) *TargetGroup {
+ s.Arn = &v
+ return s
+}
+
+// Describes the target groups to attach to a Spot Fleet. Spot Fleet registers
+// the running Spot Instances with these target groups.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TargetGroupsConfig
+type TargetGroupsConfig struct {
+ _ struct{} `type:"structure"`
+
+ // One or more target groups.
+ //
+ // TargetGroups is a required field
+ TargetGroups []*TargetGroup `locationName:"targetGroups" locationNameList:"item" min:"1" type:"list" required:"true"`
+}
+
+// String returns the string representation
+func (s TargetGroupsConfig) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TargetGroupsConfig) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *TargetGroupsConfig) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "TargetGroupsConfig"}
+ if s.TargetGroups == nil {
+ invalidParams.Add(request.NewErrParamRequired("TargetGroups"))
+ }
+ if s.TargetGroups != nil && len(s.TargetGroups) < 1 {
+ invalidParams.Add(request.NewErrParamMinLen("TargetGroups", 1))
+ }
+ if s.TargetGroups != nil {
+ for i, v := range s.TargetGroups {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetGroups", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetTargetGroups sets the TargetGroups field's value.
+func (s *TargetGroupsConfig) SetTargetGroups(v []*TargetGroup) *TargetGroupsConfig {
+ s.TargetGroups = v
+ return s
+}
+
// The total value of the new Convertible Reserved Instances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TargetReservationValue
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TargetReservationValue
type TargetReservationValue struct {
_ struct{} `type:"structure"`
@@ -56353,7 +65415,7 @@ func (s *TargetReservationValue) SetTargetConfiguration(v *TargetConfiguration)
}
// Contains the parameters for TerminateInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TerminateInstancesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TerminateInstancesRequest
type TerminateInstancesInput struct {
_ struct{} `type:"structure"`
@@ -56408,7 +65470,7 @@ func (s *TerminateInstancesInput) SetInstanceIds(v []*string) *TerminateInstance
}
// Contains the output of TerminateInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TerminateInstancesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TerminateInstancesResult
type TerminateInstancesOutput struct {
_ struct{} `type:"structure"`
@@ -56432,7 +65494,7 @@ func (s *TerminateInstancesOutput) SetTerminatingInstances(v []*InstanceStateCha
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignIpv6AddressesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignIpv6AddressesRequest
type UnassignIpv6AddressesInput struct {
_ struct{} `type:"structure"`
@@ -56485,7 +65547,7 @@ func (s *UnassignIpv6AddressesInput) SetNetworkInterfaceId(v string) *UnassignIp
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignIpv6AddressesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignIpv6AddressesResult
type UnassignIpv6AddressesOutput struct {
_ struct{} `type:"structure"`
@@ -56519,7 +65581,7 @@ func (s *UnassignIpv6AddressesOutput) SetUnassignedIpv6Addresses(v []*string) *U
}
// Contains the parameters for UnassignPrivateIpAddresses.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignPrivateIpAddressesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignPrivateIpAddressesRequest
type UnassignPrivateIpAddressesInput struct {
_ struct{} `type:"structure"`
@@ -56573,7 +65635,7 @@ func (s *UnassignPrivateIpAddressesInput) SetPrivateIpAddresses(v []*string) *Un
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignPrivateIpAddressesOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnassignPrivateIpAddressesOutput
type UnassignPrivateIpAddressesOutput struct {
_ struct{} `type:"structure"`
}
@@ -56589,7 +65651,7 @@ func (s UnassignPrivateIpAddressesOutput) GoString() string {
}
// Contains the parameters for UnmonitorInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnmonitorInstancesRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnmonitorInstancesRequest
type UnmonitorInstancesInput struct {
_ struct{} `type:"structure"`
@@ -56641,7 +65703,7 @@ func (s *UnmonitorInstancesInput) SetInstanceIds(v []*string) *UnmonitorInstance
}
// Contains the output of UnmonitorInstances.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnmonitorInstancesResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnmonitorInstancesResult
type UnmonitorInstancesOutput struct {
_ struct{} `type:"structure"`
@@ -56665,8 +65727,78 @@ func (s *UnmonitorInstancesOutput) SetInstanceMonitorings(v []*InstanceMonitorin
return s
}
+// Describes the T2 instance whose credit option for CPU usage was not modified.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnsuccessfulInstanceCreditSpecificationItem
+type UnsuccessfulInstanceCreditSpecificationItem struct {
+ _ struct{} `type:"structure"`
+
+ // The applicable error for the T2 instance whose credit option for CPU usage
+ // was not modified.
+ Error *UnsuccessfulInstanceCreditSpecificationItemError `locationName:"error" type:"structure"`
+
+ // The ID of the instance.
+ InstanceId *string `locationName:"instanceId" type:"string"`
+}
+
+// String returns the string representation
+func (s UnsuccessfulInstanceCreditSpecificationItem) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UnsuccessfulInstanceCreditSpecificationItem) GoString() string {
+ return s.String()
+}
+
+// SetError sets the Error field's value.
+func (s *UnsuccessfulInstanceCreditSpecificationItem) SetError(v *UnsuccessfulInstanceCreditSpecificationItemError) *UnsuccessfulInstanceCreditSpecificationItem {
+ s.Error = v
+ return s
+}
+
+// SetInstanceId sets the InstanceId field's value.
+func (s *UnsuccessfulInstanceCreditSpecificationItem) SetInstanceId(v string) *UnsuccessfulInstanceCreditSpecificationItem {
+ s.InstanceId = &v
+ return s
+}
+
+// Information about the error for the T2 instance whose credit option for CPU
+// usage was not modified.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnsuccessfulInstanceCreditSpecificationItemError
+type UnsuccessfulInstanceCreditSpecificationItemError struct {
+ _ struct{} `type:"structure"`
+
+ // The error code.
+ Code *string `locationName:"code" type:"string" enum:"UnsuccessfulInstanceCreditSpecificationErrorCode"`
+
+ // The applicable error message.
+ Message *string `locationName:"message" type:"string"`
+}
+
+// String returns the string representation
+func (s UnsuccessfulInstanceCreditSpecificationItemError) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UnsuccessfulInstanceCreditSpecificationItemError) GoString() string {
+ return s.String()
+}
+
+// SetCode sets the Code field's value.
+func (s *UnsuccessfulInstanceCreditSpecificationItemError) SetCode(v string) *UnsuccessfulInstanceCreditSpecificationItemError {
+ s.Code = &v
+ return s
+}
+
+// SetMessage sets the Message field's value.
+func (s *UnsuccessfulInstanceCreditSpecificationItemError) SetMessage(v string) *UnsuccessfulInstanceCreditSpecificationItemError {
+ s.Message = &v
+ return s
+}
+
// Information about items that were not successfully processed in a batch call.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnsuccessfulItem
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnsuccessfulItem
type UnsuccessfulItem struct {
_ struct{} `type:"structure"`
@@ -56703,7 +65835,7 @@ func (s *UnsuccessfulItem) SetResourceId(v string) *UnsuccessfulItem {
// Information about the error that occurred. For more information about errors,
// see Error Codes (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html).
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnsuccessfulItemError
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UnsuccessfulItemError
type UnsuccessfulItemError struct {
_ struct{} `type:"structure"`
@@ -56740,8 +65872,204 @@ func (s *UnsuccessfulItemError) SetMessage(v string) *UnsuccessfulItemError {
return s
}
+// Contains the parameters for UpdateSecurityGroupRuleDescriptionsEgress.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UpdateSecurityGroupRuleDescriptionsEgressRequest
+type UpdateSecurityGroupRuleDescriptionsEgressInput struct {
+ _ struct{} `type:"structure"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The ID of the security group. You must specify either the security group
+ // ID or the security group name in the request. For security groups in a nondefault
+ // VPC, you must specify the security group ID.
+ GroupId *string `type:"string"`
+
+ // [Default VPC] The name of the security group. You must specify either the
+ // security group ID or the security group name in the request.
+ GroupName *string `type:"string"`
+
+ // The IP permissions for the security group rule.
+ //
+ // IpPermissions is a required field
+ IpPermissions []*IpPermission `locationNameList:"item" type:"list" required:"true"`
+}
+
+// String returns the string representation
+func (s UpdateSecurityGroupRuleDescriptionsEgressInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UpdateSecurityGroupRuleDescriptionsEgressInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *UpdateSecurityGroupRuleDescriptionsEgressInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "UpdateSecurityGroupRuleDescriptionsEgressInput"}
+ if s.IpPermissions == nil {
+ invalidParams.Add(request.NewErrParamRequired("IpPermissions"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *UpdateSecurityGroupRuleDescriptionsEgressInput) SetDryRun(v bool) *UpdateSecurityGroupRuleDescriptionsEgressInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetGroupId sets the GroupId field's value.
+func (s *UpdateSecurityGroupRuleDescriptionsEgressInput) SetGroupId(v string) *UpdateSecurityGroupRuleDescriptionsEgressInput {
+ s.GroupId = &v
+ return s
+}
+
+// SetGroupName sets the GroupName field's value.
+func (s *UpdateSecurityGroupRuleDescriptionsEgressInput) SetGroupName(v string) *UpdateSecurityGroupRuleDescriptionsEgressInput {
+ s.GroupName = &v
+ return s
+}
+
+// SetIpPermissions sets the IpPermissions field's value.
+func (s *UpdateSecurityGroupRuleDescriptionsEgressInput) SetIpPermissions(v []*IpPermission) *UpdateSecurityGroupRuleDescriptionsEgressInput {
+ s.IpPermissions = v
+ return s
+}
+
+// Contains the output of UpdateSecurityGroupRuleDescriptionsEgress.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UpdateSecurityGroupRuleDescriptionsEgressResult
+type UpdateSecurityGroupRuleDescriptionsEgressOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Returns true if the request succeeds; otherwise, returns an error.
+ Return *bool `locationName:"return" type:"boolean"`
+}
+
+// String returns the string representation
+func (s UpdateSecurityGroupRuleDescriptionsEgressOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UpdateSecurityGroupRuleDescriptionsEgressOutput) GoString() string {
+ return s.String()
+}
+
+// SetReturn sets the Return field's value.
+func (s *UpdateSecurityGroupRuleDescriptionsEgressOutput) SetReturn(v bool) *UpdateSecurityGroupRuleDescriptionsEgressOutput {
+ s.Return = &v
+ return s
+}
+
+// Contains the parameters for UpdateSecurityGroupRuleDescriptionsIngress.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UpdateSecurityGroupRuleDescriptionsIngressRequest
+type UpdateSecurityGroupRuleDescriptionsIngressInput struct {
+ _ struct{} `type:"structure"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The ID of the security group. You must specify either the security group
+ // ID or the security group name in the request. For security groups in a nondefault
+ // VPC, you must specify the security group ID.
+ GroupId *string `type:"string"`
+
+ // [EC2-Classic, default VPC] The name of the security group. You must specify
+ // either the security group ID or the security group name in the request.
+ GroupName *string `type:"string"`
+
+ // The IP permissions for the security group rule.
+ //
+ // IpPermissions is a required field
+ IpPermissions []*IpPermission `locationNameList:"item" type:"list" required:"true"`
+}
+
+// String returns the string representation
+func (s UpdateSecurityGroupRuleDescriptionsIngressInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UpdateSecurityGroupRuleDescriptionsIngressInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *UpdateSecurityGroupRuleDescriptionsIngressInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "UpdateSecurityGroupRuleDescriptionsIngressInput"}
+ if s.IpPermissions == nil {
+ invalidParams.Add(request.NewErrParamRequired("IpPermissions"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetDryRun sets the DryRun field's value.
+func (s *UpdateSecurityGroupRuleDescriptionsIngressInput) SetDryRun(v bool) *UpdateSecurityGroupRuleDescriptionsIngressInput {
+ s.DryRun = &v
+ return s
+}
+
+// SetGroupId sets the GroupId field's value.
+func (s *UpdateSecurityGroupRuleDescriptionsIngressInput) SetGroupId(v string) *UpdateSecurityGroupRuleDescriptionsIngressInput {
+ s.GroupId = &v
+ return s
+}
+
+// SetGroupName sets the GroupName field's value.
+func (s *UpdateSecurityGroupRuleDescriptionsIngressInput) SetGroupName(v string) *UpdateSecurityGroupRuleDescriptionsIngressInput {
+ s.GroupName = &v
+ return s
+}
+
+// SetIpPermissions sets the IpPermissions field's value.
+func (s *UpdateSecurityGroupRuleDescriptionsIngressInput) SetIpPermissions(v []*IpPermission) *UpdateSecurityGroupRuleDescriptionsIngressInput {
+ s.IpPermissions = v
+ return s
+}
+
+// Contains the output of UpdateSecurityGroupRuleDescriptionsIngress.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UpdateSecurityGroupRuleDescriptionsIngressResult
+type UpdateSecurityGroupRuleDescriptionsIngressOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Returns true if the request succeeds; otherwise, returns an error.
+ Return *bool `locationName:"return" type:"boolean"`
+}
+
+// String returns the string representation
+func (s UpdateSecurityGroupRuleDescriptionsIngressOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UpdateSecurityGroupRuleDescriptionsIngressOutput) GoString() string {
+ return s.String()
+}
+
+// SetReturn sets the Return field's value.
+func (s *UpdateSecurityGroupRuleDescriptionsIngressOutput) SetReturn(v bool) *UpdateSecurityGroupRuleDescriptionsIngressOutput {
+ s.Return = &v
+ return s
+}
+
// Describes the S3 bucket for the disk image.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UserBucket
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UserBucket
type UserBucket struct {
_ struct{} `type:"structure"`
@@ -56775,7 +66103,7 @@ func (s *UserBucket) SetS3Key(v string) *UserBucket {
}
// Describes the S3 bucket for the disk image.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UserBucketDetails
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UserBucketDetails
type UserBucketDetails struct {
_ struct{} `type:"structure"`
@@ -56809,7 +66137,7 @@ func (s *UserBucketDetails) SetS3Key(v string) *UserBucketDetails {
}
// Describes the user data for an instance.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UserData
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UserData
type UserData struct {
_ struct{} `type:"structure"`
@@ -56836,23 +66164,36 @@ func (s *UserData) SetData(v string) *UserData {
}
// Describes a security group and AWS account ID pair.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UserIdGroupPair
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/UserIdGroupPair
type UserIdGroupPair struct {
_ struct{} `type:"structure"`
+ // A description for the security group rule that references this user ID group
+ // pair.
+ //
+ // Constraints: Up to 255 characters in length. Allowed characters are a-z,
+ // A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*
+ Description *string `locationName:"description" type:"string"`
+
// The ID of the security group.
GroupId *string `locationName:"groupId" type:"string"`
// The name of the security group. In a request, use this parameter for a security
// group in EC2-Classic or a default VPC only. For a security group in a nondefault
// VPC, use the security group ID.
+ //
+ // For a referenced security group in another VPC, this value is not returned
+ // if the referenced security group is deleted.
GroupName *string `locationName:"groupName" type:"string"`
// The status of a VPC peering connection, if applicable.
PeeringStatus *string `locationName:"peeringStatus" type:"string"`
- // The ID of an AWS account. For a referenced security group in another VPC,
- // the account ID of the referenced security group is returned.
+ // The ID of an AWS account.
+ //
+ // For a referenced security group in another VPC, the account ID of the referenced
+ // security group is returned in the response. If the referenced security group
+ // is deleted, this value is not returned.
//
// [EC2-Classic] Required when adding or removing rules that reference a security
// group in another AWS account.
@@ -56875,6 +66216,12 @@ func (s UserIdGroupPair) GoString() string {
return s.String()
}
+// SetDescription sets the Description field's value.
+func (s *UserIdGroupPair) SetDescription(v string) *UserIdGroupPair {
+ s.Description = &v
+ return s
+}
+
// SetGroupId sets the GroupId field's value.
func (s *UserIdGroupPair) SetGroupId(v string) *UserIdGroupPair {
s.GroupId = &v
@@ -56912,7 +66259,7 @@ func (s *UserIdGroupPair) SetVpcPeeringConnectionId(v string) *UserIdGroupPair {
}
// Describes telemetry for a VPN tunnel.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VgwTelemetry
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VgwTelemetry
type VgwTelemetry struct {
_ struct{} `type:"structure"`
@@ -56974,7 +66321,7 @@ func (s *VgwTelemetry) SetStatusMessage(v string) *VgwTelemetry {
}
// Describes a volume.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Volume
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Volume
type Volume struct {
_ struct{} `type:"structure"`
@@ -57113,7 +66460,7 @@ func (s *Volume) SetVolumeType(v string) *Volume {
}
// Describes volume attachment details.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VolumeAttachment
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VolumeAttachment
type VolumeAttachment struct {
_ struct{} `type:"structure"`
@@ -57183,7 +66530,7 @@ func (s *VolumeAttachment) SetVolumeId(v string) *VolumeAttachment {
}
// Describes an EBS volume.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VolumeDetail
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VolumeDetail
type VolumeDetail struct {
_ struct{} `type:"structure"`
@@ -57225,7 +66572,7 @@ func (s *VolumeDetail) SetSize(v int64) *VolumeDetail {
// Describes the modification status of an EBS volume.
//
// If the volume has never been modified, some element values will be null.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VolumeModification
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VolumeModification
type VolumeModification struct {
_ struct{} `type:"structure"`
@@ -57350,7 +66697,7 @@ func (s *VolumeModification) SetVolumeId(v string) *VolumeModification {
}
// Describes a volume status operation code.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VolumeStatusAction
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VolumeStatusAction
type VolumeStatusAction struct {
_ struct{} `type:"structure"`
@@ -57402,7 +66749,7 @@ func (s *VolumeStatusAction) SetEventType(v string) *VolumeStatusAction {
}
// Describes a volume status.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VolumeStatusDetails
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VolumeStatusDetails
type VolumeStatusDetails struct {
_ struct{} `type:"structure"`
@@ -57436,7 +66783,7 @@ func (s *VolumeStatusDetails) SetStatus(v string) *VolumeStatusDetails {
}
// Describes a volume status event.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VolumeStatusEvent
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VolumeStatusEvent
type VolumeStatusEvent struct {
_ struct{} `type:"structure"`
@@ -57497,7 +66844,7 @@ func (s *VolumeStatusEvent) SetNotBefore(v time.Time) *VolumeStatusEvent {
}
// Describes the status of a volume.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VolumeStatusInfo
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VolumeStatusInfo
type VolumeStatusInfo struct {
_ struct{} `type:"structure"`
@@ -57531,7 +66878,7 @@ func (s *VolumeStatusInfo) SetStatus(v string) *VolumeStatusInfo {
}
// Describes the volume status.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VolumeStatusItem
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VolumeStatusItem
type VolumeStatusItem struct {
_ struct{} `type:"structure"`
@@ -57592,13 +66939,16 @@ func (s *VolumeStatusItem) SetVolumeStatus(v *VolumeStatusInfo) *VolumeStatusIte
}
// Describes a VPC.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Vpc
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/Vpc
type Vpc struct {
_ struct{} `type:"structure"`
- // The IPv4 CIDR block for the VPC.
+ // The primary IPv4 CIDR block for the VPC.
CidrBlock *string `locationName:"cidrBlock" type:"string"`
+ // Information about the IPv4 CIDR blocks associated with the VPC.
+ CidrBlockAssociationSet []*VpcCidrBlockAssociation `locationName:"cidrBlockAssociationSet" locationNameList:"item" type:"list"`
+
// The ID of the set of DHCP options you've associated with the VPC (or default
// if the default options are associated with the VPC).
DhcpOptionsId *string `locationName:"dhcpOptionsId" type:"string"`
@@ -57638,6 +66988,12 @@ func (s *Vpc) SetCidrBlock(v string) *Vpc {
return s
}
+// SetCidrBlockAssociationSet sets the CidrBlockAssociationSet field's value.
+func (s *Vpc) SetCidrBlockAssociationSet(v []*VpcCidrBlockAssociation) *Vpc {
+ s.CidrBlockAssociationSet = v
+ return s
+}
+
// SetDhcpOptionsId sets the DhcpOptionsId field's value.
func (s *Vpc) SetDhcpOptionsId(v string) *Vpc {
s.DhcpOptionsId = &v
@@ -57681,7 +67037,7 @@ func (s *Vpc) SetVpcId(v string) *Vpc {
}
// Describes an attachment between a virtual private gateway and a VPC.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpcAttachment
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpcAttachment
type VpcAttachment struct {
_ struct{} `type:"structure"`
@@ -57714,8 +67070,51 @@ func (s *VpcAttachment) SetVpcId(v string) *VpcAttachment {
return s
}
+// Describes an IPv4 CIDR block associated with a VPC.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpcCidrBlockAssociation
+type VpcCidrBlockAssociation struct {
+ _ struct{} `type:"structure"`
+
+ // The association ID for the IPv4 CIDR block.
+ AssociationId *string `locationName:"associationId" type:"string"`
+
+ // The IPv4 CIDR block.
+ CidrBlock *string `locationName:"cidrBlock" type:"string"`
+
+ // Information about the state of the CIDR block.
+ CidrBlockState *VpcCidrBlockState `locationName:"cidrBlockState" type:"structure"`
+}
+
+// String returns the string representation
+func (s VpcCidrBlockAssociation) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s VpcCidrBlockAssociation) GoString() string {
+ return s.String()
+}
+
+// SetAssociationId sets the AssociationId field's value.
+func (s *VpcCidrBlockAssociation) SetAssociationId(v string) *VpcCidrBlockAssociation {
+ s.AssociationId = &v
+ return s
+}
+
+// SetCidrBlock sets the CidrBlock field's value.
+func (s *VpcCidrBlockAssociation) SetCidrBlock(v string) *VpcCidrBlockAssociation {
+ s.CidrBlock = &v
+ return s
+}
+
+// SetCidrBlockState sets the CidrBlockState field's value.
+func (s *VpcCidrBlockAssociation) SetCidrBlockState(v *VpcCidrBlockState) *VpcCidrBlockAssociation {
+ s.CidrBlockState = v
+ return s
+}
+
// Describes the state of a CIDR block.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpcCidrBlockState
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpcCidrBlockState
type VpcCidrBlockState struct {
_ struct{} `type:"structure"`
@@ -57749,7 +67148,7 @@ func (s *VpcCidrBlockState) SetStatusMessage(v string) *VpcCidrBlockState {
}
// Describes whether a VPC is enabled for ClassicLink.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpcClassicLink
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpcClassicLink
type VpcClassicLink struct {
_ struct{} `type:"structure"`
@@ -57792,28 +67191,48 @@ func (s *VpcClassicLink) SetVpcId(v string) *VpcClassicLink {
}
// Describes a VPC endpoint.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpcEndpoint
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpcEndpoint
type VpcEndpoint struct {
_ struct{} `type:"structure"`
// The date and time the VPC endpoint was created.
CreationTimestamp *time.Time `locationName:"creationTimestamp" type:"timestamp" timestampFormat:"iso8601"`
- // The policy document associated with the endpoint.
+ // (Interface endpoint) The DNS entries for the endpoint.
+ DnsEntries []*DnsEntry `locationName:"dnsEntrySet" locationNameList:"item" type:"list"`
+
+ // (Interface endpoint) Information about the security groups associated with
+ // the network interface.
+ Groups []*SecurityGroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"`
+
+ // (Interface endpoint) One or more network interfaces for the endpoint.
+ NetworkInterfaceIds []*string `locationName:"networkInterfaceIdSet" locationNameList:"item" type:"list"`
+
+ // The policy document associated with the endpoint, if applicable.
PolicyDocument *string `locationName:"policyDocument" type:"string"`
- // One or more route tables associated with the endpoint.
+ // (Interface endpoint) Indicates whether the VPC is associated with a private
+ // hosted zone.
+ PrivateDnsEnabled *bool `locationName:"privateDnsEnabled" type:"boolean"`
+
+ // (Gateway endpoint) One or more route tables associated with the endpoint.
RouteTableIds []*string `locationName:"routeTableIdSet" locationNameList:"item" type:"list"`
- // The name of the AWS service to which the endpoint is associated.
+ // The name of the service to which the endpoint is associated.
ServiceName *string `locationName:"serviceName" type:"string"`
// The state of the VPC endpoint.
State *string `locationName:"state" type:"string" enum:"State"`
+ // (Interface endpoint) One or more subnets in which the endpoint is located.
+ SubnetIds []*string `locationName:"subnetIdSet" locationNameList:"item" type:"list"`
+
// The ID of the VPC endpoint.
VpcEndpointId *string `locationName:"vpcEndpointId" type:"string"`
+ // The type of endpoint.
+ VpcEndpointType *string `locationName:"vpcEndpointType" type:"string" enum:"VpcEndpointType"`
+
// The ID of the VPC to which the endpoint is associated.
VpcId *string `locationName:"vpcId" type:"string"`
}
@@ -57834,12 +67253,36 @@ func (s *VpcEndpoint) SetCreationTimestamp(v time.Time) *VpcEndpoint {
return s
}
+// SetDnsEntries sets the DnsEntries field's value.
+func (s *VpcEndpoint) SetDnsEntries(v []*DnsEntry) *VpcEndpoint {
+ s.DnsEntries = v
+ return s
+}
+
+// SetGroups sets the Groups field's value.
+func (s *VpcEndpoint) SetGroups(v []*SecurityGroupIdentifier) *VpcEndpoint {
+ s.Groups = v
+ return s
+}
+
+// SetNetworkInterfaceIds sets the NetworkInterfaceIds field's value.
+func (s *VpcEndpoint) SetNetworkInterfaceIds(v []*string) *VpcEndpoint {
+ s.NetworkInterfaceIds = v
+ return s
+}
+
// SetPolicyDocument sets the PolicyDocument field's value.
func (s *VpcEndpoint) SetPolicyDocument(v string) *VpcEndpoint {
s.PolicyDocument = &v
return s
}
+// SetPrivateDnsEnabled sets the PrivateDnsEnabled field's value.
+func (s *VpcEndpoint) SetPrivateDnsEnabled(v bool) *VpcEndpoint {
+ s.PrivateDnsEnabled = &v
+ return s
+}
+
// SetRouteTableIds sets the RouteTableIds field's value.
func (s *VpcEndpoint) SetRouteTableIds(v []*string) *VpcEndpoint {
s.RouteTableIds = v
@@ -57858,20 +67301,93 @@ func (s *VpcEndpoint) SetState(v string) *VpcEndpoint {
return s
}
+// SetSubnetIds sets the SubnetIds field's value.
+func (s *VpcEndpoint) SetSubnetIds(v []*string) *VpcEndpoint {
+ s.SubnetIds = v
+ return s
+}
+
// SetVpcEndpointId sets the VpcEndpointId field's value.
func (s *VpcEndpoint) SetVpcEndpointId(v string) *VpcEndpoint {
s.VpcEndpointId = &v
return s
}
+// SetVpcEndpointType sets the VpcEndpointType field's value.
+func (s *VpcEndpoint) SetVpcEndpointType(v string) *VpcEndpoint {
+ s.VpcEndpointType = &v
+ return s
+}
+
// SetVpcId sets the VpcId field's value.
func (s *VpcEndpoint) SetVpcId(v string) *VpcEndpoint {
s.VpcId = &v
return s
}
+// Describes a VPC endpoint connection to a service.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpcEndpointConnection
+type VpcEndpointConnection struct {
+ _ struct{} `type:"structure"`
+
+ // The date and time the VPC endpoint was created.
+ CreationTimestamp *time.Time `locationName:"creationTimestamp" type:"timestamp" timestampFormat:"iso8601"`
+
+ // The ID of the service to which the endpoint is connected.
+ ServiceId *string `locationName:"serviceId" type:"string"`
+
+ // The ID of the VPC endpoint.
+ VpcEndpointId *string `locationName:"vpcEndpointId" type:"string"`
+
+ // The AWS account ID of the owner of the VPC endpoint.
+ VpcEndpointOwner *string `locationName:"vpcEndpointOwner" type:"string"`
+
+ // The state of the VPC endpoint.
+ VpcEndpointState *string `locationName:"vpcEndpointState" type:"string" enum:"State"`
+}
+
+// String returns the string representation
+func (s VpcEndpointConnection) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s VpcEndpointConnection) GoString() string {
+ return s.String()
+}
+
+// SetCreationTimestamp sets the CreationTimestamp field's value.
+func (s *VpcEndpointConnection) SetCreationTimestamp(v time.Time) *VpcEndpointConnection {
+ s.CreationTimestamp = &v
+ return s
+}
+
+// SetServiceId sets the ServiceId field's value.
+func (s *VpcEndpointConnection) SetServiceId(v string) *VpcEndpointConnection {
+ s.ServiceId = &v
+ return s
+}
+
+// SetVpcEndpointId sets the VpcEndpointId field's value.
+func (s *VpcEndpointConnection) SetVpcEndpointId(v string) *VpcEndpointConnection {
+ s.VpcEndpointId = &v
+ return s
+}
+
+// SetVpcEndpointOwner sets the VpcEndpointOwner field's value.
+func (s *VpcEndpointConnection) SetVpcEndpointOwner(v string) *VpcEndpointConnection {
+ s.VpcEndpointOwner = &v
+ return s
+}
+
+// SetVpcEndpointState sets the VpcEndpointState field's value.
+func (s *VpcEndpointConnection) SetVpcEndpointState(v string) *VpcEndpointConnection {
+ s.VpcEndpointState = &v
+ return s
+}
+
// Describes an IPv6 CIDR block associated with a VPC.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpcIpv6CidrBlockAssociation
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpcIpv6CidrBlockAssociation
type VpcIpv6CidrBlockAssociation struct {
_ struct{} `type:"structure"`
@@ -57914,7 +67430,7 @@ func (s *VpcIpv6CidrBlockAssociation) SetIpv6CidrBlockState(v *VpcCidrBlockState
}
// Describes a VPC peering connection.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpcPeeringConnection
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpcPeeringConnection
type VpcPeeringConnection struct {
_ struct{} `type:"structure"`
@@ -57986,7 +67502,7 @@ func (s *VpcPeeringConnection) SetVpcPeeringConnectionId(v string) *VpcPeeringCo
}
// Describes the VPC peering connection options.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpcPeeringConnectionOptionsDescription
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpcPeeringConnectionOptionsDescription
type VpcPeeringConnectionOptionsDescription struct {
_ struct{} `type:"structure"`
@@ -58032,7 +67548,7 @@ func (s *VpcPeeringConnectionOptionsDescription) SetAllowEgressFromLocalVpcToRem
}
// Describes the status of a VPC peering connection.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpcPeeringConnectionStateReason
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpcPeeringConnectionStateReason
type VpcPeeringConnectionStateReason struct {
_ struct{} `type:"structure"`
@@ -58066,13 +67582,16 @@ func (s *VpcPeeringConnectionStateReason) SetMessage(v string) *VpcPeeringConnec
}
// Describes a VPC in a VPC peering connection.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpcPeeringConnectionVpcInfo
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpcPeeringConnectionVpcInfo
type VpcPeeringConnectionVpcInfo struct {
_ struct{} `type:"structure"`
// The IPv4 CIDR block for the VPC.
CidrBlock *string `locationName:"cidrBlock" type:"string"`
+ // Information about the IPv4 CIDR blocks for the VPC.
+ CidrBlockSet []*CidrBlock `locationName:"cidrBlockSet" locationNameList:"item" type:"list"`
+
// The IPv6 CIDR block for the VPC.
Ipv6CidrBlockSet []*Ipv6CidrBlock `locationName:"ipv6CidrBlockSet" locationNameList:"item" type:"list"`
@@ -58083,6 +67602,9 @@ type VpcPeeringConnectionVpcInfo struct {
// requester VPC.
PeeringOptions *VpcPeeringConnectionOptionsDescription `locationName:"peeringOptions" type:"structure"`
+ // The region in which the VPC is located.
+ Region *string `locationName:"region" type:"string"`
+
// The ID of the VPC.
VpcId *string `locationName:"vpcId" type:"string"`
}
@@ -58103,6 +67625,12 @@ func (s *VpcPeeringConnectionVpcInfo) SetCidrBlock(v string) *VpcPeeringConnecti
return s
}
+// SetCidrBlockSet sets the CidrBlockSet field's value.
+func (s *VpcPeeringConnectionVpcInfo) SetCidrBlockSet(v []*CidrBlock) *VpcPeeringConnectionVpcInfo {
+ s.CidrBlockSet = v
+ return s
+}
+
// SetIpv6CidrBlockSet sets the Ipv6CidrBlockSet field's value.
func (s *VpcPeeringConnectionVpcInfo) SetIpv6CidrBlockSet(v []*Ipv6CidrBlock) *VpcPeeringConnectionVpcInfo {
s.Ipv6CidrBlockSet = v
@@ -58121,6 +67649,12 @@ func (s *VpcPeeringConnectionVpcInfo) SetPeeringOptions(v *VpcPeeringConnectionO
return s
}
+// SetRegion sets the Region field's value.
+func (s *VpcPeeringConnectionVpcInfo) SetRegion(v string) *VpcPeeringConnectionVpcInfo {
+ s.Region = &v
+ return s
+}
+
// SetVpcId sets the VpcId field's value.
func (s *VpcPeeringConnectionVpcInfo) SetVpcId(v string) *VpcPeeringConnectionVpcInfo {
s.VpcId = &v
@@ -58128,10 +67662,16 @@ func (s *VpcPeeringConnectionVpcInfo) SetVpcId(v string) *VpcPeeringConnectionVp
}
// Describes a VPN connection.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpnConnection
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpnConnection
type VpnConnection struct {
_ struct{} `type:"structure"`
+ // The category of the VPN connection. A value of VPN indicates an AWS VPN connection.
+ // A value of VPN-Classic indicates an AWS Classic VPN connection. For more
+ // information, see AWS Managed VPN Categories (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html#vpn-categories)
+ // in the Amazon Virtual Private Cloud User Guide.
+ Category *string `locationName:"category" type:"string"`
+
// The configuration information for the VPN connection's customer gateway (in
// the native XML format). This element is always present in the CreateVpnConnection
// response; however, it's present in the DescribeVpnConnections response only
@@ -58176,6 +67716,12 @@ func (s VpnConnection) GoString() string {
return s.String()
}
+// SetCategory sets the Category field's value.
+func (s *VpnConnection) SetCategory(v string) *VpnConnection {
+ s.Category = &v
+ return s
+}
+
// SetCustomerGatewayConfiguration sets the CustomerGatewayConfiguration field's value.
func (s *VpnConnection) SetCustomerGatewayConfiguration(v string) *VpnConnection {
s.CustomerGatewayConfiguration = &v
@@ -58237,7 +67783,7 @@ func (s *VpnConnection) SetVpnGatewayId(v string) *VpnConnection {
}
// Describes VPN connection options.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpnConnectionOptions
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpnConnectionOptions
type VpnConnectionOptions struct {
_ struct{} `type:"structure"`
@@ -58263,13 +67809,19 @@ func (s *VpnConnectionOptions) SetStaticRoutesOnly(v bool) *VpnConnectionOptions
}
// Describes VPN connection options.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpnConnectionOptionsSpecification
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpnConnectionOptionsSpecification
type VpnConnectionOptionsSpecification struct {
_ struct{} `type:"structure"`
- // Indicates whether the VPN connection uses static routes only. Static routes
- // must be used for devices that don't support BGP.
+ // Indicate whether the VPN connection uses static routes only. If you are creating
+ // a VPN connection for a device that does not support BGP, you must specify
+ // true.
+ //
+ // Default: false
StaticRoutesOnly *bool `locationName:"staticRoutesOnly" type:"boolean"`
+
+ // The tunnel options for the VPN connection.
+ TunnelOptions []*VpnTunnelOptionsSpecification `locationNameList:"item" type:"list"`
}
// String returns the string representation
@@ -58288,11 +67840,20 @@ func (s *VpnConnectionOptionsSpecification) SetStaticRoutesOnly(v bool) *VpnConn
return s
}
+// SetTunnelOptions sets the TunnelOptions field's value.
+func (s *VpnConnectionOptionsSpecification) SetTunnelOptions(v []*VpnTunnelOptionsSpecification) *VpnConnectionOptionsSpecification {
+ s.TunnelOptions = v
+ return s
+}
+
// Describes a virtual private gateway.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpnGateway
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpnGateway
type VpnGateway struct {
_ struct{} `type:"structure"`
+ // The private Autonomous System Number (ASN) for the Amazon side of a BGP session.
+ AmazonSideAsn *int64 `locationName:"amazonSideAsn" type:"long"`
+
// The Availability Zone where the virtual private gateway was created, if applicable.
// This field may be empty or not returned.
AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
@@ -58323,6 +67884,12 @@ func (s VpnGateway) GoString() string {
return s.String()
}
+// SetAmazonSideAsn sets the AmazonSideAsn field's value.
+func (s *VpnGateway) SetAmazonSideAsn(v int64) *VpnGateway {
+ s.AmazonSideAsn = &v
+ return s
+}
+
// SetAvailabilityZone sets the AvailabilityZone field's value.
func (s *VpnGateway) SetAvailabilityZone(v string) *VpnGateway {
s.AvailabilityZone = &v
@@ -58360,7 +67927,7 @@ func (s *VpnGateway) SetVpnGatewayId(v string) *VpnGateway {
}
// Describes a static route for a VPN connection.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpnStaticRoute
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpnStaticRoute
type VpnStaticRoute struct {
_ struct{} `type:"structure"`
@@ -58402,6 +67969,63 @@ func (s *VpnStaticRoute) SetState(v string) *VpnStaticRoute {
return s
}
+// The tunnel options for a VPN connection.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/VpnTunnelOptionsSpecification
+type VpnTunnelOptionsSpecification struct {
+ _ struct{} `type:"structure"`
+
+ // The pre-shared key (PSK) to establish initial authentication between the
+ // virtual private gateway and customer gateway.
+ //
+ // Constraints: Allowed characters are alphanumeric characters and ._. Must
+ // be between 8 and 64 characters in length and cannot start with zero (0).
+ PreSharedKey *string `type:"string"`
+
+ // The range of inside IP addresses for the tunnel. Any specified CIDR blocks
+ // must be unique across all VPN connections that use the same virtual private
+ // gateway.
+ //
+ // Constraints: A size /30 CIDR block from the 169.254.0.0/16 range. The following
+ // CIDR blocks are reserved and cannot be used:
+ //
+ // * 169.254.0.0/30
+ //
+ // * 169.254.1.0/30
+ //
+ // * 169.254.2.0/30
+ //
+ // * 169.254.3.0/30
+ //
+ // * 169.254.4.0/30
+ //
+ // * 169.254.5.0/30
+ //
+ // * 169.254.169.252/30
+ TunnelInsideCidr *string `type:"string"`
+}
+
+// String returns the string representation
+func (s VpnTunnelOptionsSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s VpnTunnelOptionsSpecification) GoString() string {
+ return s.String()
+}
+
+// SetPreSharedKey sets the PreSharedKey field's value.
+func (s *VpnTunnelOptionsSpecification) SetPreSharedKey(v string) *VpnTunnelOptionsSpecification {
+ s.PreSharedKey = &v
+ return s
+}
+
+// SetTunnelInsideCidr sets the TunnelInsideCidr field's value.
+func (s *VpnTunnelOptionsSpecification) SetTunnelInsideCidr(v string) *VpnTunnelOptionsSpecification {
+ s.TunnelInsideCidr = &v
+ return s
+}
+
const (
// AccountAttributeNameSupportedPlatforms is a AccountAttributeName enum value
AccountAttributeNameSupportedPlatforms = "supported-platforms"
@@ -58578,6 +68202,19 @@ const (
CancelSpotInstanceRequestStateCompleted = "completed"
)
+const (
+ // ConnectionNotificationStateEnabled is a ConnectionNotificationState enum value
+ ConnectionNotificationStateEnabled = "Enabled"
+
+ // ConnectionNotificationStateDisabled is a ConnectionNotificationState enum value
+ ConnectionNotificationStateDisabled = "Disabled"
+)
+
+const (
+ // ConnectionNotificationTypeTopic is a ConnectionNotificationType enum value
+ ConnectionNotificationTypeTopic = "Topic"
+)
+
const (
// ContainerFormatOva is a ContainerFormat enum value
ContainerFormatOva = "ova"
@@ -58730,6 +68367,20 @@ const (
FlowLogsResourceTypeNetworkInterface = "NetworkInterface"
)
+const (
+ // FpgaImageAttributeNameDescription is a FpgaImageAttributeName enum value
+ FpgaImageAttributeNameDescription = "description"
+
+ // FpgaImageAttributeNameName is a FpgaImageAttributeName enum value
+ FpgaImageAttributeNameName = "name"
+
+ // FpgaImageAttributeNameLoadPermission is a FpgaImageAttributeName enum value
+ FpgaImageAttributeNameLoadPermission = "loadPermission"
+
+ // FpgaImageAttributeNameProductCodes is a FpgaImageAttributeName enum value
+ FpgaImageAttributeNameProductCodes = "productCodes"
+)
+
const (
// FpgaImageStateCodePending is a FpgaImageStateCode enum value
FpgaImageStateCodePending = "pending"
@@ -58888,6 +68539,17 @@ const (
InstanceHealthStatusUnhealthy = "unhealthy"
)
+const (
+ // InstanceInterruptionBehaviorHibernate is a InstanceInterruptionBehavior enum value
+ InstanceInterruptionBehaviorHibernate = "hibernate"
+
+ // InstanceInterruptionBehaviorStop is a InstanceInterruptionBehavior enum value
+ InstanceInterruptionBehaviorStop = "stop"
+
+ // InstanceInterruptionBehaviorTerminate is a InstanceInterruptionBehavior enum value
+ InstanceInterruptionBehaviorTerminate = "terminate"
+)
+
const (
// InstanceLifecycleTypeSpot is a InstanceLifecycleType enum value
InstanceLifecycleTypeSpot = "spot"
@@ -59034,6 +68696,24 @@ const (
// InstanceTypeX132xlarge is a InstanceType enum value
InstanceTypeX132xlarge = "x1.32xlarge"
+ // InstanceTypeX1eXlarge is a InstanceType enum value
+ InstanceTypeX1eXlarge = "x1e.xlarge"
+
+ // InstanceTypeX1e2xlarge is a InstanceType enum value
+ InstanceTypeX1e2xlarge = "x1e.2xlarge"
+
+ // InstanceTypeX1e4xlarge is a InstanceType enum value
+ InstanceTypeX1e4xlarge = "x1e.4xlarge"
+
+ // InstanceTypeX1e8xlarge is a InstanceType enum value
+ InstanceTypeX1e8xlarge = "x1e.8xlarge"
+
+ // InstanceTypeX1e16xlarge is a InstanceType enum value
+ InstanceTypeX1e16xlarge = "x1e.16xlarge"
+
+ // InstanceTypeX1e32xlarge is a InstanceType enum value
+ InstanceTypeX1e32xlarge = "x1e.32xlarge"
+
// InstanceTypeI2Xlarge is a InstanceType enum value
InstanceTypeI2Xlarge = "i2.xlarge"
@@ -59106,6 +68786,24 @@ const (
// InstanceTypeC48xlarge is a InstanceType enum value
InstanceTypeC48xlarge = "c4.8xlarge"
+ // InstanceTypeC5Large is a InstanceType enum value
+ InstanceTypeC5Large = "c5.large"
+
+ // InstanceTypeC5Xlarge is a InstanceType enum value
+ InstanceTypeC5Xlarge = "c5.xlarge"
+
+ // InstanceTypeC52xlarge is a InstanceType enum value
+ InstanceTypeC52xlarge = "c5.2xlarge"
+
+ // InstanceTypeC54xlarge is a InstanceType enum value
+ InstanceTypeC54xlarge = "c5.4xlarge"
+
+ // InstanceTypeC59xlarge is a InstanceType enum value
+ InstanceTypeC59xlarge = "c5.9xlarge"
+
+ // InstanceTypeC518xlarge is a InstanceType enum value
+ InstanceTypeC518xlarge = "c5.18xlarge"
+
// InstanceTypeCc14xlarge is a InstanceType enum value
InstanceTypeCc14xlarge = "cc1.4xlarge"
@@ -59139,6 +68837,15 @@ const (
// InstanceTypeP216xlarge is a InstanceType enum value
InstanceTypeP216xlarge = "p2.16xlarge"
+ // InstanceTypeP32xlarge is a InstanceType enum value
+ InstanceTypeP32xlarge = "p3.2xlarge"
+
+ // InstanceTypeP38xlarge is a InstanceType enum value
+ InstanceTypeP38xlarge = "p3.8xlarge"
+
+ // InstanceTypeP316xlarge is a InstanceType enum value
+ InstanceTypeP316xlarge = "p3.16xlarge"
+
// InstanceTypeD2Xlarge is a InstanceType enum value
InstanceTypeD2Xlarge = "d2.xlarge"
@@ -59156,6 +68863,36 @@ const (
// InstanceTypeF116xlarge is a InstanceType enum value
InstanceTypeF116xlarge = "f1.16xlarge"
+
+ // InstanceTypeM5Large is a InstanceType enum value
+ InstanceTypeM5Large = "m5.large"
+
+ // InstanceTypeM5Xlarge is a InstanceType enum value
+ InstanceTypeM5Xlarge = "m5.xlarge"
+
+ // InstanceTypeM52xlarge is a InstanceType enum value
+ InstanceTypeM52xlarge = "m5.2xlarge"
+
+ // InstanceTypeM54xlarge is a InstanceType enum value
+ InstanceTypeM54xlarge = "m5.4xlarge"
+
+ // InstanceTypeM512xlarge is a InstanceType enum value
+ InstanceTypeM512xlarge = "m5.12xlarge"
+
+ // InstanceTypeM524xlarge is a InstanceType enum value
+ InstanceTypeM524xlarge = "m5.24xlarge"
+
+ // InstanceTypeH12xlarge is a InstanceType enum value
+ InstanceTypeH12xlarge = "h1.2xlarge"
+
+ // InstanceTypeH14xlarge is a InstanceType enum value
+ InstanceTypeH14xlarge = "h1.4xlarge"
+
+ // InstanceTypeH18xlarge is a InstanceType enum value
+ InstanceTypeH18xlarge = "h1.8xlarge"
+
+ // InstanceTypeH116xlarge is a InstanceType enum value
+ InstanceTypeH116xlarge = "h1.16xlarge"
)
const (
@@ -59166,6 +68903,26 @@ const (
InterfacePermissionTypeEipAssociate = "EIP-ASSOCIATE"
)
+const (
+ // LaunchTemplateErrorCodeLaunchTemplateIdDoesNotExist is a LaunchTemplateErrorCode enum value
+ LaunchTemplateErrorCodeLaunchTemplateIdDoesNotExist = "launchTemplateIdDoesNotExist"
+
+ // LaunchTemplateErrorCodeLaunchTemplateIdMalformed is a LaunchTemplateErrorCode enum value
+ LaunchTemplateErrorCodeLaunchTemplateIdMalformed = "launchTemplateIdMalformed"
+
+ // LaunchTemplateErrorCodeLaunchTemplateNameDoesNotExist is a LaunchTemplateErrorCode enum value
+ LaunchTemplateErrorCodeLaunchTemplateNameDoesNotExist = "launchTemplateNameDoesNotExist"
+
+ // LaunchTemplateErrorCodeLaunchTemplateNameMalformed is a LaunchTemplateErrorCode enum value
+ LaunchTemplateErrorCodeLaunchTemplateNameMalformed = "launchTemplateNameMalformed"
+
+ // LaunchTemplateErrorCodeLaunchTemplateVersionDoesNotExist is a LaunchTemplateErrorCode enum value
+ LaunchTemplateErrorCodeLaunchTemplateVersionDoesNotExist = "launchTemplateVersionDoesNotExist"
+
+ // LaunchTemplateErrorCodeUnexpectedError is a LaunchTemplateErrorCode enum value
+ LaunchTemplateErrorCodeUnexpectedError = "unexpectedError"
+)
+
const (
// ListingStateAvailable is a ListingState enum value
ListingStateAvailable = "available"
@@ -59194,6 +68951,11 @@ const (
ListingStatusClosed = "closed"
)
+const (
+ // MarketTypeSpot is a MarketType enum value
+ MarketTypeSpot = "spot"
+)
+
const (
// MonitoringStateDisabled is a MonitoringState enum value
MonitoringStateDisabled = "disabled"
@@ -59352,6 +69114,9 @@ const (
const (
// PlacementStrategyCluster is a PlacementStrategy enum value
PlacementStrategyCluster = "cluster"
+
+ // PlacementStrategySpread is a PlacementStrategy enum value
+ PlacementStrategySpread = "spread"
)
const (
@@ -59359,6 +69124,26 @@ const (
PlatformValuesWindows = "Windows"
)
+const (
+ // PrincipalTypeAll is a PrincipalType enum value
+ PrincipalTypeAll = "All"
+
+ // PrincipalTypeService is a PrincipalType enum value
+ PrincipalTypeService = "Service"
+
+ // PrincipalTypeOrganizationUnit is a PrincipalType enum value
+ PrincipalTypeOrganizationUnit = "OrganizationUnit"
+
+ // PrincipalTypeAccount is a PrincipalType enum value
+ PrincipalTypeAccount = "Account"
+
+ // PrincipalTypeUser is a PrincipalType enum value
+ PrincipalTypeUser = "User"
+
+ // PrincipalTypeRole is a PrincipalType enum value
+ PrincipalTypeRole = "Role"
+)
+
const (
// ProductCodeValuesDevpay is a ProductCodeValues enum value
ProductCodeValuesDevpay = "devpay"
@@ -59451,6 +69236,11 @@ const (
ReservedInstanceStateRetired = "retired"
)
+const (
+ // ResetFpgaImageAttributeNameLoadPermission is a ResetFpgaImageAttributeName enum value
+ ResetFpgaImageAttributeNameLoadPermission = "loadPermission"
+)
+
const (
// ResetImageAttributeNameLaunchPermission is a ResetImageAttributeName enum value
ResetImageAttributeNameLaunchPermission = "launchPermission"
@@ -59536,6 +69326,31 @@ const (
RuleActionDeny = "deny"
)
+const (
+ // ServiceStatePending is a ServiceState enum value
+ ServiceStatePending = "Pending"
+
+ // ServiceStateAvailable is a ServiceState enum value
+ ServiceStateAvailable = "Available"
+
+ // ServiceStateDeleting is a ServiceState enum value
+ ServiceStateDeleting = "Deleting"
+
+ // ServiceStateDeleted is a ServiceState enum value
+ ServiceStateDeleted = "Deleted"
+
+ // ServiceStateFailed is a ServiceState enum value
+ ServiceStateFailed = "Failed"
+)
+
+const (
+ // ServiceTypeInterface is a ServiceType enum value
+ ServiceTypeInterface = "Interface"
+
+ // ServiceTypeGateway is a ServiceType enum value
+ ServiceTypeGateway = "Gateway"
+)
+
const (
// ShutdownBehaviorStop is a ShutdownBehavior enum value
ShutdownBehaviorStop = "stop"
@@ -59589,6 +69404,9 @@ const (
)
const (
+ // StatePendingAcceptance is a State enum value
+ StatePendingAcceptance = "PendingAcceptance"
+
// StatePending is a State enum value
StatePending = "Pending"
@@ -59600,6 +69418,15 @@ const (
// StateDeleted is a State enum value
StateDeleted = "Deleted"
+
+ // StateRejected is a State enum value
+ StateRejected = "Rejected"
+
+ // StateFailed is a State enum value
+ StateFailed = "Failed"
+
+ // StateExpired is a State enum value
+ StateExpired = "Expired"
)
const (
@@ -59707,6 +69534,20 @@ const (
TrafficTypeAll = "ALL"
)
+const (
+ // UnsuccessfulInstanceCreditSpecificationErrorCodeInvalidInstanceIdMalformed is a UnsuccessfulInstanceCreditSpecificationErrorCode enum value
+ UnsuccessfulInstanceCreditSpecificationErrorCodeInvalidInstanceIdMalformed = "InvalidInstanceID.Malformed"
+
+ // UnsuccessfulInstanceCreditSpecificationErrorCodeInvalidInstanceIdNotFound is a UnsuccessfulInstanceCreditSpecificationErrorCode enum value
+ UnsuccessfulInstanceCreditSpecificationErrorCodeInvalidInstanceIdNotFound = "InvalidInstanceID.NotFound"
+
+ // UnsuccessfulInstanceCreditSpecificationErrorCodeIncorrectInstanceState is a UnsuccessfulInstanceCreditSpecificationErrorCode enum value
+ UnsuccessfulInstanceCreditSpecificationErrorCodeIncorrectInstanceState = "IncorrectInstanceState"
+
+ // UnsuccessfulInstanceCreditSpecificationErrorCodeInstanceCreditSpecificationNotSupported is a UnsuccessfulInstanceCreditSpecificationErrorCode enum value
+ UnsuccessfulInstanceCreditSpecificationErrorCodeInstanceCreditSpecificationNotSupported = "InstanceCreditSpecification.NotSupported"
+)
+
const (
// VirtualizationTypeHvm is a VirtualizationType enum value
VirtualizationTypeHvm = "hvm"
@@ -59727,6 +69568,9 @@ const (
// VolumeAttachmentStateDetached is a VolumeAttachmentState enum value
VolumeAttachmentStateDetached = "detached"
+
+ // VolumeAttachmentStateBusy is a VolumeAttachmentState enum value
+ VolumeAttachmentStateBusy = "busy"
)
const (
@@ -59835,6 +69679,14 @@ const (
VpcCidrBlockStateCodeFailed = "failed"
)
+const (
+ // VpcEndpointTypeInterface is a VpcEndpointType enum value
+ VpcEndpointTypeInterface = "Interface"
+
+ // VpcEndpointTypeGateway is a VpcEndpointType enum value
+ VpcEndpointTypeGateway = "Gateway"
+)
+
const (
// VpcPeeringConnectionStateReasonCodeInitiatingRequest is a VpcPeeringConnectionStateReasonCode enum value
VpcPeeringConnectionStateReasonCodeInitiatingRequest = "initiating-request"
@@ -59872,6 +69724,11 @@ const (
VpcStateAvailable = "available"
)
+const (
+ // VpcTenancyDefault is a VpcTenancy enum value
+ VpcTenancyDefault = "default"
+)
+
const (
// VpnStatePending is a VpnState enum value
VpnStatePending = "pending"
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go
index 4aa6618b466..432a54df4e7 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go
@@ -4,9 +4,8 @@
// requests to Amazon Elastic Compute Cloud.
//
// Amazon Elastic Compute Cloud (Amazon EC2) provides resizable computing capacity
-// in the Amazon Web Services (AWS) cloud. Using Amazon EC2 eliminates your
-// need to invest in hardware up front, so you can develop and deploy applications
-// faster.
+// in the AWS Cloud. Using Amazon EC2 eliminates your need to invest in hardware
+// up front, so you can develop and deploy applications faster.
//
// See https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15 for more information on this service.
//
@@ -15,69 +14,17 @@
//
// Using the Client
//
-// To use the client for Amazon Elastic Compute Cloud you will first need
-// to create a new instance of it.
+// To contact Amazon Elastic Compute Cloud with the SDK use the New function to create
+// a new service client. With that client you can make API requests to the service.
+// These clients are safe to use concurrently.
//
-// When creating a client for an AWS service you'll first need to have a Session
-// already created. The Session provides configuration that can be shared
-// between multiple service clients. Additional configuration can be applied to
-// the Session and service's client when they are constructed. The aws package's
-// Config type contains several fields such as Region for the AWS Region the
-// client should make API requests too. The optional Config value can be provided
-// as the variadic argument for Sessions and client creation.
-//
-// Once the service's client is created you can use it to make API requests the
-// AWS service. These clients are safe to use concurrently.
-//
-// // Create a session to share configuration, and load external configuration.
-// sess := session.Must(session.NewSession())
-//
-// // Create the service's client with the session.
-// svc := ec2.New(sess)
-//
-// See the SDK's documentation for more information on how to use service clients.
+// See the SDK's documentation for more information on how to use the SDK.
// https://docs.aws.amazon.com/sdk-for-go/api/
//
-// See aws package's Config type for more information on configuration options.
+// See aws.Config documentation for more information on configuring SDK clients.
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
//
// See the Amazon Elastic Compute Cloud client EC2 for more
-// information on creating the service's client.
+// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#New
-//
-// Once the client is created you can make an API request to the service.
-// Each API method takes a input parameter, and returns the service response
-// and an error.
-//
-// The API method will document which error codes the service can be returned
-// by the operation if the service models the API operation's errors. These
-// errors will also be available as const strings prefixed with "ErrCode".
-//
-// result, err := svc.AcceptReservedInstancesExchangeQuote(params)
-// if err != nil {
-// // Cast err to awserr.Error to handle specific error codes.
-// aerr, ok := err.(awserr.Error)
-// if ok && aerr.Code() == {
-// // Specific error code handling
-// }
-// return err
-// }
-//
-// fmt.Println("AcceptReservedInstancesExchangeQuote result:")
-// fmt.Println(result)
-//
-// Using the Client with Context
-//
-// The service's client also provides methods to make API requests with a Context
-// value. This allows you to control the timeout, and cancellation of pending
-// requests. These methods also take request Option as variadic parameter to apply
-// additional configuration to the API request.
-//
-// ctx := context.Background()
-//
-// result, err := svc.AcceptReservedInstancesExchangeQuoteWithContext(ctx, params)
-//
-// See the request package documentation for more information on using Context pattern
-// with the SDK.
-// https://docs.aws.amazon.com/sdk-for-go/api/aws/request/
package ec2
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/ec2iface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/ec2iface/interface.go
index 77882a6b505..37688ed46b9 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/ec2/ec2iface/interface.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/ec2iface/interface.go
@@ -21,7 +21,7 @@ import (
//
// The best way to use this interface is so the SDK's service client's calls
// can be stubbed out for unit testing your code with the SDK without needing
-// to inject custom request handlers into the the SDK's request pipeline.
+// to inject custom request handlers into the SDK's request pipeline.
//
// // myFunc uses an SDK service client to make a request to
// // Amazon Elastic Compute Cloud.
@@ -64,6 +64,10 @@ type EC2API interface {
AcceptReservedInstancesExchangeQuoteWithContext(aws.Context, *ec2.AcceptReservedInstancesExchangeQuoteInput, ...request.Option) (*ec2.AcceptReservedInstancesExchangeQuoteOutput, error)
AcceptReservedInstancesExchangeQuoteRequest(*ec2.AcceptReservedInstancesExchangeQuoteInput) (*request.Request, *ec2.AcceptReservedInstancesExchangeQuoteOutput)
+ AcceptVpcEndpointConnections(*ec2.AcceptVpcEndpointConnectionsInput) (*ec2.AcceptVpcEndpointConnectionsOutput, error)
+ AcceptVpcEndpointConnectionsWithContext(aws.Context, *ec2.AcceptVpcEndpointConnectionsInput, ...request.Option) (*ec2.AcceptVpcEndpointConnectionsOutput, error)
+ AcceptVpcEndpointConnectionsRequest(*ec2.AcceptVpcEndpointConnectionsInput) (*request.Request, *ec2.AcceptVpcEndpointConnectionsOutput)
+
AcceptVpcPeeringConnection(*ec2.AcceptVpcPeeringConnectionInput) (*ec2.AcceptVpcPeeringConnectionOutput, error)
AcceptVpcPeeringConnectionWithContext(aws.Context, *ec2.AcceptVpcPeeringConnectionInput, ...request.Option) (*ec2.AcceptVpcPeeringConnectionOutput, error)
AcceptVpcPeeringConnectionRequest(*ec2.AcceptVpcPeeringConnectionInput) (*request.Request, *ec2.AcceptVpcPeeringConnectionOutput)
@@ -172,6 +176,10 @@ type EC2API interface {
ConfirmProductInstanceWithContext(aws.Context, *ec2.ConfirmProductInstanceInput, ...request.Option) (*ec2.ConfirmProductInstanceOutput, error)
ConfirmProductInstanceRequest(*ec2.ConfirmProductInstanceInput) (*request.Request, *ec2.ConfirmProductInstanceOutput)
+ CopyFpgaImage(*ec2.CopyFpgaImageInput) (*ec2.CopyFpgaImageOutput, error)
+ CopyFpgaImageWithContext(aws.Context, *ec2.CopyFpgaImageInput, ...request.Option) (*ec2.CopyFpgaImageOutput, error)
+ CopyFpgaImageRequest(*ec2.CopyFpgaImageInput) (*request.Request, *ec2.CopyFpgaImageOutput)
+
CopyImage(*ec2.CopyImageInput) (*ec2.CopyImageOutput, error)
CopyImageWithContext(aws.Context, *ec2.CopyImageInput, ...request.Option) (*ec2.CopyImageOutput, error)
CopyImageRequest(*ec2.CopyImageInput) (*request.Request, *ec2.CopyImageOutput)
@@ -184,6 +192,10 @@ type EC2API interface {
CreateCustomerGatewayWithContext(aws.Context, *ec2.CreateCustomerGatewayInput, ...request.Option) (*ec2.CreateCustomerGatewayOutput, error)
CreateCustomerGatewayRequest(*ec2.CreateCustomerGatewayInput) (*request.Request, *ec2.CreateCustomerGatewayOutput)
+ CreateDefaultSubnet(*ec2.CreateDefaultSubnetInput) (*ec2.CreateDefaultSubnetOutput, error)
+ CreateDefaultSubnetWithContext(aws.Context, *ec2.CreateDefaultSubnetInput, ...request.Option) (*ec2.CreateDefaultSubnetOutput, error)
+ CreateDefaultSubnetRequest(*ec2.CreateDefaultSubnetInput) (*request.Request, *ec2.CreateDefaultSubnetOutput)
+
CreateDefaultVpc(*ec2.CreateDefaultVpcInput) (*ec2.CreateDefaultVpcOutput, error)
CreateDefaultVpcWithContext(aws.Context, *ec2.CreateDefaultVpcInput, ...request.Option) (*ec2.CreateDefaultVpcOutput, error)
CreateDefaultVpcRequest(*ec2.CreateDefaultVpcInput) (*request.Request, *ec2.CreateDefaultVpcOutput)
@@ -220,6 +232,14 @@ type EC2API interface {
CreateKeyPairWithContext(aws.Context, *ec2.CreateKeyPairInput, ...request.Option) (*ec2.CreateKeyPairOutput, error)
CreateKeyPairRequest(*ec2.CreateKeyPairInput) (*request.Request, *ec2.CreateKeyPairOutput)
+ CreateLaunchTemplate(*ec2.CreateLaunchTemplateInput) (*ec2.CreateLaunchTemplateOutput, error)
+ CreateLaunchTemplateWithContext(aws.Context, *ec2.CreateLaunchTemplateInput, ...request.Option) (*ec2.CreateLaunchTemplateOutput, error)
+ CreateLaunchTemplateRequest(*ec2.CreateLaunchTemplateInput) (*request.Request, *ec2.CreateLaunchTemplateOutput)
+
+ CreateLaunchTemplateVersion(*ec2.CreateLaunchTemplateVersionInput) (*ec2.CreateLaunchTemplateVersionOutput, error)
+ CreateLaunchTemplateVersionWithContext(aws.Context, *ec2.CreateLaunchTemplateVersionInput, ...request.Option) (*ec2.CreateLaunchTemplateVersionOutput, error)
+ CreateLaunchTemplateVersionRequest(*ec2.CreateLaunchTemplateVersionInput) (*request.Request, *ec2.CreateLaunchTemplateVersionOutput)
+
CreateNatGateway(*ec2.CreateNatGatewayInput) (*ec2.CreateNatGatewayOutput, error)
CreateNatGatewayWithContext(aws.Context, *ec2.CreateNatGatewayInput, ...request.Option) (*ec2.CreateNatGatewayOutput, error)
CreateNatGatewayRequest(*ec2.CreateNatGatewayInput) (*request.Request, *ec2.CreateNatGatewayOutput)
@@ -288,6 +308,14 @@ type EC2API interface {
CreateVpcEndpointWithContext(aws.Context, *ec2.CreateVpcEndpointInput, ...request.Option) (*ec2.CreateVpcEndpointOutput, error)
CreateVpcEndpointRequest(*ec2.CreateVpcEndpointInput) (*request.Request, *ec2.CreateVpcEndpointOutput)
+ CreateVpcEndpointConnectionNotification(*ec2.CreateVpcEndpointConnectionNotificationInput) (*ec2.CreateVpcEndpointConnectionNotificationOutput, error)
+ CreateVpcEndpointConnectionNotificationWithContext(aws.Context, *ec2.CreateVpcEndpointConnectionNotificationInput, ...request.Option) (*ec2.CreateVpcEndpointConnectionNotificationOutput, error)
+ CreateVpcEndpointConnectionNotificationRequest(*ec2.CreateVpcEndpointConnectionNotificationInput) (*request.Request, *ec2.CreateVpcEndpointConnectionNotificationOutput)
+
+ CreateVpcEndpointServiceConfiguration(*ec2.CreateVpcEndpointServiceConfigurationInput) (*ec2.CreateVpcEndpointServiceConfigurationOutput, error)
+ CreateVpcEndpointServiceConfigurationWithContext(aws.Context, *ec2.CreateVpcEndpointServiceConfigurationInput, ...request.Option) (*ec2.CreateVpcEndpointServiceConfigurationOutput, error)
+ CreateVpcEndpointServiceConfigurationRequest(*ec2.CreateVpcEndpointServiceConfigurationInput) (*request.Request, *ec2.CreateVpcEndpointServiceConfigurationOutput)
+
CreateVpcPeeringConnection(*ec2.CreateVpcPeeringConnectionInput) (*ec2.CreateVpcPeeringConnectionOutput, error)
CreateVpcPeeringConnectionWithContext(aws.Context, *ec2.CreateVpcPeeringConnectionInput, ...request.Option) (*ec2.CreateVpcPeeringConnectionOutput, error)
CreateVpcPeeringConnectionRequest(*ec2.CreateVpcPeeringConnectionInput) (*request.Request, *ec2.CreateVpcPeeringConnectionOutput)
@@ -320,6 +348,10 @@ type EC2API interface {
DeleteFlowLogsWithContext(aws.Context, *ec2.DeleteFlowLogsInput, ...request.Option) (*ec2.DeleteFlowLogsOutput, error)
DeleteFlowLogsRequest(*ec2.DeleteFlowLogsInput) (*request.Request, *ec2.DeleteFlowLogsOutput)
+ DeleteFpgaImage(*ec2.DeleteFpgaImageInput) (*ec2.DeleteFpgaImageOutput, error)
+ DeleteFpgaImageWithContext(aws.Context, *ec2.DeleteFpgaImageInput, ...request.Option) (*ec2.DeleteFpgaImageOutput, error)
+ DeleteFpgaImageRequest(*ec2.DeleteFpgaImageInput) (*request.Request, *ec2.DeleteFpgaImageOutput)
+
DeleteInternetGateway(*ec2.DeleteInternetGatewayInput) (*ec2.DeleteInternetGatewayOutput, error)
DeleteInternetGatewayWithContext(aws.Context, *ec2.DeleteInternetGatewayInput, ...request.Option) (*ec2.DeleteInternetGatewayOutput, error)
DeleteInternetGatewayRequest(*ec2.DeleteInternetGatewayInput) (*request.Request, *ec2.DeleteInternetGatewayOutput)
@@ -328,6 +360,14 @@ type EC2API interface {
DeleteKeyPairWithContext(aws.Context, *ec2.DeleteKeyPairInput, ...request.Option) (*ec2.DeleteKeyPairOutput, error)
DeleteKeyPairRequest(*ec2.DeleteKeyPairInput) (*request.Request, *ec2.DeleteKeyPairOutput)
+ DeleteLaunchTemplate(*ec2.DeleteLaunchTemplateInput) (*ec2.DeleteLaunchTemplateOutput, error)
+ DeleteLaunchTemplateWithContext(aws.Context, *ec2.DeleteLaunchTemplateInput, ...request.Option) (*ec2.DeleteLaunchTemplateOutput, error)
+ DeleteLaunchTemplateRequest(*ec2.DeleteLaunchTemplateInput) (*request.Request, *ec2.DeleteLaunchTemplateOutput)
+
+ DeleteLaunchTemplateVersions(*ec2.DeleteLaunchTemplateVersionsInput) (*ec2.DeleteLaunchTemplateVersionsOutput, error)
+ DeleteLaunchTemplateVersionsWithContext(aws.Context, *ec2.DeleteLaunchTemplateVersionsInput, ...request.Option) (*ec2.DeleteLaunchTemplateVersionsOutput, error)
+ DeleteLaunchTemplateVersionsRequest(*ec2.DeleteLaunchTemplateVersionsInput) (*request.Request, *ec2.DeleteLaunchTemplateVersionsOutput)
+
DeleteNatGateway(*ec2.DeleteNatGatewayInput) (*ec2.DeleteNatGatewayOutput, error)
DeleteNatGatewayWithContext(aws.Context, *ec2.DeleteNatGatewayInput, ...request.Option) (*ec2.DeleteNatGatewayOutput, error)
DeleteNatGatewayRequest(*ec2.DeleteNatGatewayInput) (*request.Request, *ec2.DeleteNatGatewayOutput)
@@ -388,6 +428,14 @@ type EC2API interface {
DeleteVpcWithContext(aws.Context, *ec2.DeleteVpcInput, ...request.Option) (*ec2.DeleteVpcOutput, error)
DeleteVpcRequest(*ec2.DeleteVpcInput) (*request.Request, *ec2.DeleteVpcOutput)
+ DeleteVpcEndpointConnectionNotifications(*ec2.DeleteVpcEndpointConnectionNotificationsInput) (*ec2.DeleteVpcEndpointConnectionNotificationsOutput, error)
+ DeleteVpcEndpointConnectionNotificationsWithContext(aws.Context, *ec2.DeleteVpcEndpointConnectionNotificationsInput, ...request.Option) (*ec2.DeleteVpcEndpointConnectionNotificationsOutput, error)
+ DeleteVpcEndpointConnectionNotificationsRequest(*ec2.DeleteVpcEndpointConnectionNotificationsInput) (*request.Request, *ec2.DeleteVpcEndpointConnectionNotificationsOutput)
+
+ DeleteVpcEndpointServiceConfigurations(*ec2.DeleteVpcEndpointServiceConfigurationsInput) (*ec2.DeleteVpcEndpointServiceConfigurationsOutput, error)
+ DeleteVpcEndpointServiceConfigurationsWithContext(aws.Context, *ec2.DeleteVpcEndpointServiceConfigurationsInput, ...request.Option) (*ec2.DeleteVpcEndpointServiceConfigurationsOutput, error)
+ DeleteVpcEndpointServiceConfigurationsRequest(*ec2.DeleteVpcEndpointServiceConfigurationsInput) (*request.Request, *ec2.DeleteVpcEndpointServiceConfigurationsOutput)
+
DeleteVpcEndpoints(*ec2.DeleteVpcEndpointsInput) (*ec2.DeleteVpcEndpointsOutput, error)
DeleteVpcEndpointsWithContext(aws.Context, *ec2.DeleteVpcEndpointsInput, ...request.Option) (*ec2.DeleteVpcEndpointsOutput, error)
DeleteVpcEndpointsRequest(*ec2.DeleteVpcEndpointsInput) (*request.Request, *ec2.DeleteVpcEndpointsOutput)
@@ -460,6 +508,10 @@ type EC2API interface {
DescribeFlowLogsWithContext(aws.Context, *ec2.DescribeFlowLogsInput, ...request.Option) (*ec2.DescribeFlowLogsOutput, error)
DescribeFlowLogsRequest(*ec2.DescribeFlowLogsInput) (*request.Request, *ec2.DescribeFlowLogsOutput)
+ DescribeFpgaImageAttribute(*ec2.DescribeFpgaImageAttributeInput) (*ec2.DescribeFpgaImageAttributeOutput, error)
+ DescribeFpgaImageAttributeWithContext(aws.Context, *ec2.DescribeFpgaImageAttributeInput, ...request.Option) (*ec2.DescribeFpgaImageAttributeOutput, error)
+ DescribeFpgaImageAttributeRequest(*ec2.DescribeFpgaImageAttributeInput) (*request.Request, *ec2.DescribeFpgaImageAttributeOutput)
+
DescribeFpgaImages(*ec2.DescribeFpgaImagesInput) (*ec2.DescribeFpgaImagesOutput, error)
DescribeFpgaImagesWithContext(aws.Context, *ec2.DescribeFpgaImagesInput, ...request.Option) (*ec2.DescribeFpgaImagesOutput, error)
DescribeFpgaImagesRequest(*ec2.DescribeFpgaImagesInput) (*request.Request, *ec2.DescribeFpgaImagesOutput)
@@ -508,6 +560,10 @@ type EC2API interface {
DescribeInstanceAttributeWithContext(aws.Context, *ec2.DescribeInstanceAttributeInput, ...request.Option) (*ec2.DescribeInstanceAttributeOutput, error)
DescribeInstanceAttributeRequest(*ec2.DescribeInstanceAttributeInput) (*request.Request, *ec2.DescribeInstanceAttributeOutput)
+ DescribeInstanceCreditSpecifications(*ec2.DescribeInstanceCreditSpecificationsInput) (*ec2.DescribeInstanceCreditSpecificationsOutput, error)
+ DescribeInstanceCreditSpecificationsWithContext(aws.Context, *ec2.DescribeInstanceCreditSpecificationsInput, ...request.Option) (*ec2.DescribeInstanceCreditSpecificationsOutput, error)
+ DescribeInstanceCreditSpecificationsRequest(*ec2.DescribeInstanceCreditSpecificationsInput) (*request.Request, *ec2.DescribeInstanceCreditSpecificationsOutput)
+
DescribeInstanceStatus(*ec2.DescribeInstanceStatusInput) (*ec2.DescribeInstanceStatusOutput, error)
DescribeInstanceStatusWithContext(aws.Context, *ec2.DescribeInstanceStatusInput, ...request.Option) (*ec2.DescribeInstanceStatusOutput, error)
DescribeInstanceStatusRequest(*ec2.DescribeInstanceStatusInput) (*request.Request, *ec2.DescribeInstanceStatusOutput)
@@ -530,6 +586,14 @@ type EC2API interface {
DescribeKeyPairsWithContext(aws.Context, *ec2.DescribeKeyPairsInput, ...request.Option) (*ec2.DescribeKeyPairsOutput, error)
DescribeKeyPairsRequest(*ec2.DescribeKeyPairsInput) (*request.Request, *ec2.DescribeKeyPairsOutput)
+ DescribeLaunchTemplateVersions(*ec2.DescribeLaunchTemplateVersionsInput) (*ec2.DescribeLaunchTemplateVersionsOutput, error)
+ DescribeLaunchTemplateVersionsWithContext(aws.Context, *ec2.DescribeLaunchTemplateVersionsInput, ...request.Option) (*ec2.DescribeLaunchTemplateVersionsOutput, error)
+ DescribeLaunchTemplateVersionsRequest(*ec2.DescribeLaunchTemplateVersionsInput) (*request.Request, *ec2.DescribeLaunchTemplateVersionsOutput)
+
+ DescribeLaunchTemplates(*ec2.DescribeLaunchTemplatesInput) (*ec2.DescribeLaunchTemplatesOutput, error)
+ DescribeLaunchTemplatesWithContext(aws.Context, *ec2.DescribeLaunchTemplatesInput, ...request.Option) (*ec2.DescribeLaunchTemplatesOutput, error)
+ DescribeLaunchTemplatesRequest(*ec2.DescribeLaunchTemplatesInput) (*request.Request, *ec2.DescribeLaunchTemplatesOutput)
+
DescribeMovingAddresses(*ec2.DescribeMovingAddressesInput) (*ec2.DescribeMovingAddressesOutput, error)
DescribeMovingAddressesWithContext(aws.Context, *ec2.DescribeMovingAddressesInput, ...request.Option) (*ec2.DescribeMovingAddressesOutput, error)
DescribeMovingAddressesRequest(*ec2.DescribeMovingAddressesInput) (*request.Request, *ec2.DescribeMovingAddressesOutput)
@@ -701,6 +765,22 @@ type EC2API interface {
DescribeVpcClassicLinkDnsSupportWithContext(aws.Context, *ec2.DescribeVpcClassicLinkDnsSupportInput, ...request.Option) (*ec2.DescribeVpcClassicLinkDnsSupportOutput, error)
DescribeVpcClassicLinkDnsSupportRequest(*ec2.DescribeVpcClassicLinkDnsSupportInput) (*request.Request, *ec2.DescribeVpcClassicLinkDnsSupportOutput)
+ DescribeVpcEndpointConnectionNotifications(*ec2.DescribeVpcEndpointConnectionNotificationsInput) (*ec2.DescribeVpcEndpointConnectionNotificationsOutput, error)
+ DescribeVpcEndpointConnectionNotificationsWithContext(aws.Context, *ec2.DescribeVpcEndpointConnectionNotificationsInput, ...request.Option) (*ec2.DescribeVpcEndpointConnectionNotificationsOutput, error)
+ DescribeVpcEndpointConnectionNotificationsRequest(*ec2.DescribeVpcEndpointConnectionNotificationsInput) (*request.Request, *ec2.DescribeVpcEndpointConnectionNotificationsOutput)
+
+ DescribeVpcEndpointConnections(*ec2.DescribeVpcEndpointConnectionsInput) (*ec2.DescribeVpcEndpointConnectionsOutput, error)
+ DescribeVpcEndpointConnectionsWithContext(aws.Context, *ec2.DescribeVpcEndpointConnectionsInput, ...request.Option) (*ec2.DescribeVpcEndpointConnectionsOutput, error)
+ DescribeVpcEndpointConnectionsRequest(*ec2.DescribeVpcEndpointConnectionsInput) (*request.Request, *ec2.DescribeVpcEndpointConnectionsOutput)
+
+ DescribeVpcEndpointServiceConfigurations(*ec2.DescribeVpcEndpointServiceConfigurationsInput) (*ec2.DescribeVpcEndpointServiceConfigurationsOutput, error)
+ DescribeVpcEndpointServiceConfigurationsWithContext(aws.Context, *ec2.DescribeVpcEndpointServiceConfigurationsInput, ...request.Option) (*ec2.DescribeVpcEndpointServiceConfigurationsOutput, error)
+ DescribeVpcEndpointServiceConfigurationsRequest(*ec2.DescribeVpcEndpointServiceConfigurationsInput) (*request.Request, *ec2.DescribeVpcEndpointServiceConfigurationsOutput)
+
+ DescribeVpcEndpointServicePermissions(*ec2.DescribeVpcEndpointServicePermissionsInput) (*ec2.DescribeVpcEndpointServicePermissionsOutput, error)
+ DescribeVpcEndpointServicePermissionsWithContext(aws.Context, *ec2.DescribeVpcEndpointServicePermissionsInput, ...request.Option) (*ec2.DescribeVpcEndpointServicePermissionsOutput, error)
+ DescribeVpcEndpointServicePermissionsRequest(*ec2.DescribeVpcEndpointServicePermissionsInput) (*request.Request, *ec2.DescribeVpcEndpointServicePermissionsOutput)
+
DescribeVpcEndpointServices(*ec2.DescribeVpcEndpointServicesInput) (*ec2.DescribeVpcEndpointServicesOutput, error)
DescribeVpcEndpointServicesWithContext(aws.Context, *ec2.DescribeVpcEndpointServicesInput, ...request.Option) (*ec2.DescribeVpcEndpointServicesOutput, error)
DescribeVpcEndpointServicesRequest(*ec2.DescribeVpcEndpointServicesInput) (*request.Request, *ec2.DescribeVpcEndpointServicesOutput)
@@ -805,6 +885,10 @@ type EC2API interface {
GetHostReservationPurchasePreviewWithContext(aws.Context, *ec2.GetHostReservationPurchasePreviewInput, ...request.Option) (*ec2.GetHostReservationPurchasePreviewOutput, error)
GetHostReservationPurchasePreviewRequest(*ec2.GetHostReservationPurchasePreviewInput) (*request.Request, *ec2.GetHostReservationPurchasePreviewOutput)
+ GetLaunchTemplateData(*ec2.GetLaunchTemplateDataInput) (*ec2.GetLaunchTemplateDataOutput, error)
+ GetLaunchTemplateDataWithContext(aws.Context, *ec2.GetLaunchTemplateDataInput, ...request.Option) (*ec2.GetLaunchTemplateDataOutput, error)
+ GetLaunchTemplateDataRequest(*ec2.GetLaunchTemplateDataInput) (*request.Request, *ec2.GetLaunchTemplateDataOutput)
+
GetPasswordData(*ec2.GetPasswordDataInput) (*ec2.GetPasswordDataOutput, error)
GetPasswordDataWithContext(aws.Context, *ec2.GetPasswordDataInput, ...request.Option) (*ec2.GetPasswordDataOutput, error)
GetPasswordDataRequest(*ec2.GetPasswordDataInput) (*request.Request, *ec2.GetPasswordDataOutput)
@@ -833,6 +917,10 @@ type EC2API interface {
ImportVolumeWithContext(aws.Context, *ec2.ImportVolumeInput, ...request.Option) (*ec2.ImportVolumeOutput, error)
ImportVolumeRequest(*ec2.ImportVolumeInput) (*request.Request, *ec2.ImportVolumeOutput)
+ ModifyFpgaImageAttribute(*ec2.ModifyFpgaImageAttributeInput) (*ec2.ModifyFpgaImageAttributeOutput, error)
+ ModifyFpgaImageAttributeWithContext(aws.Context, *ec2.ModifyFpgaImageAttributeInput, ...request.Option) (*ec2.ModifyFpgaImageAttributeOutput, error)
+ ModifyFpgaImageAttributeRequest(*ec2.ModifyFpgaImageAttributeInput) (*request.Request, *ec2.ModifyFpgaImageAttributeOutput)
+
ModifyHosts(*ec2.ModifyHostsInput) (*ec2.ModifyHostsOutput, error)
ModifyHostsWithContext(aws.Context, *ec2.ModifyHostsInput, ...request.Option) (*ec2.ModifyHostsOutput, error)
ModifyHostsRequest(*ec2.ModifyHostsInput) (*request.Request, *ec2.ModifyHostsOutput)
@@ -853,10 +941,18 @@ type EC2API interface {
ModifyInstanceAttributeWithContext(aws.Context, *ec2.ModifyInstanceAttributeInput, ...request.Option) (*ec2.ModifyInstanceAttributeOutput, error)
ModifyInstanceAttributeRequest(*ec2.ModifyInstanceAttributeInput) (*request.Request, *ec2.ModifyInstanceAttributeOutput)
+ ModifyInstanceCreditSpecification(*ec2.ModifyInstanceCreditSpecificationInput) (*ec2.ModifyInstanceCreditSpecificationOutput, error)
+ ModifyInstanceCreditSpecificationWithContext(aws.Context, *ec2.ModifyInstanceCreditSpecificationInput, ...request.Option) (*ec2.ModifyInstanceCreditSpecificationOutput, error)
+ ModifyInstanceCreditSpecificationRequest(*ec2.ModifyInstanceCreditSpecificationInput) (*request.Request, *ec2.ModifyInstanceCreditSpecificationOutput)
+
ModifyInstancePlacement(*ec2.ModifyInstancePlacementInput) (*ec2.ModifyInstancePlacementOutput, error)
ModifyInstancePlacementWithContext(aws.Context, *ec2.ModifyInstancePlacementInput, ...request.Option) (*ec2.ModifyInstancePlacementOutput, error)
ModifyInstancePlacementRequest(*ec2.ModifyInstancePlacementInput) (*request.Request, *ec2.ModifyInstancePlacementOutput)
+ ModifyLaunchTemplate(*ec2.ModifyLaunchTemplateInput) (*ec2.ModifyLaunchTemplateOutput, error)
+ ModifyLaunchTemplateWithContext(aws.Context, *ec2.ModifyLaunchTemplateInput, ...request.Option) (*ec2.ModifyLaunchTemplateOutput, error)
+ ModifyLaunchTemplateRequest(*ec2.ModifyLaunchTemplateInput) (*request.Request, *ec2.ModifyLaunchTemplateOutput)
+
ModifyNetworkInterfaceAttribute(*ec2.ModifyNetworkInterfaceAttributeInput) (*ec2.ModifyNetworkInterfaceAttributeOutput, error)
ModifyNetworkInterfaceAttributeWithContext(aws.Context, *ec2.ModifyNetworkInterfaceAttributeInput, ...request.Option) (*ec2.ModifyNetworkInterfaceAttributeOutput, error)
ModifyNetworkInterfaceAttributeRequest(*ec2.ModifyNetworkInterfaceAttributeInput) (*request.Request, *ec2.ModifyNetworkInterfaceAttributeOutput)
@@ -893,10 +989,26 @@ type EC2API interface {
ModifyVpcEndpointWithContext(aws.Context, *ec2.ModifyVpcEndpointInput, ...request.Option) (*ec2.ModifyVpcEndpointOutput, error)
ModifyVpcEndpointRequest(*ec2.ModifyVpcEndpointInput) (*request.Request, *ec2.ModifyVpcEndpointOutput)
+ ModifyVpcEndpointConnectionNotification(*ec2.ModifyVpcEndpointConnectionNotificationInput) (*ec2.ModifyVpcEndpointConnectionNotificationOutput, error)
+ ModifyVpcEndpointConnectionNotificationWithContext(aws.Context, *ec2.ModifyVpcEndpointConnectionNotificationInput, ...request.Option) (*ec2.ModifyVpcEndpointConnectionNotificationOutput, error)
+ ModifyVpcEndpointConnectionNotificationRequest(*ec2.ModifyVpcEndpointConnectionNotificationInput) (*request.Request, *ec2.ModifyVpcEndpointConnectionNotificationOutput)
+
+ ModifyVpcEndpointServiceConfiguration(*ec2.ModifyVpcEndpointServiceConfigurationInput) (*ec2.ModifyVpcEndpointServiceConfigurationOutput, error)
+ ModifyVpcEndpointServiceConfigurationWithContext(aws.Context, *ec2.ModifyVpcEndpointServiceConfigurationInput, ...request.Option) (*ec2.ModifyVpcEndpointServiceConfigurationOutput, error)
+ ModifyVpcEndpointServiceConfigurationRequest(*ec2.ModifyVpcEndpointServiceConfigurationInput) (*request.Request, *ec2.ModifyVpcEndpointServiceConfigurationOutput)
+
+ ModifyVpcEndpointServicePermissions(*ec2.ModifyVpcEndpointServicePermissionsInput) (*ec2.ModifyVpcEndpointServicePermissionsOutput, error)
+ ModifyVpcEndpointServicePermissionsWithContext(aws.Context, *ec2.ModifyVpcEndpointServicePermissionsInput, ...request.Option) (*ec2.ModifyVpcEndpointServicePermissionsOutput, error)
+ ModifyVpcEndpointServicePermissionsRequest(*ec2.ModifyVpcEndpointServicePermissionsInput) (*request.Request, *ec2.ModifyVpcEndpointServicePermissionsOutput)
+
ModifyVpcPeeringConnectionOptions(*ec2.ModifyVpcPeeringConnectionOptionsInput) (*ec2.ModifyVpcPeeringConnectionOptionsOutput, error)
ModifyVpcPeeringConnectionOptionsWithContext(aws.Context, *ec2.ModifyVpcPeeringConnectionOptionsInput, ...request.Option) (*ec2.ModifyVpcPeeringConnectionOptionsOutput, error)
ModifyVpcPeeringConnectionOptionsRequest(*ec2.ModifyVpcPeeringConnectionOptionsInput) (*request.Request, *ec2.ModifyVpcPeeringConnectionOptionsOutput)
+ ModifyVpcTenancy(*ec2.ModifyVpcTenancyInput) (*ec2.ModifyVpcTenancyOutput, error)
+ ModifyVpcTenancyWithContext(aws.Context, *ec2.ModifyVpcTenancyInput, ...request.Option) (*ec2.ModifyVpcTenancyOutput, error)
+ ModifyVpcTenancyRequest(*ec2.ModifyVpcTenancyInput) (*request.Request, *ec2.ModifyVpcTenancyOutput)
+
MonitorInstances(*ec2.MonitorInstancesInput) (*ec2.MonitorInstancesOutput, error)
MonitorInstancesWithContext(aws.Context, *ec2.MonitorInstancesInput, ...request.Option) (*ec2.MonitorInstancesOutput, error)
MonitorInstancesRequest(*ec2.MonitorInstancesInput) (*request.Request, *ec2.MonitorInstancesOutput)
@@ -925,6 +1037,10 @@ type EC2API interface {
RegisterImageWithContext(aws.Context, *ec2.RegisterImageInput, ...request.Option) (*ec2.RegisterImageOutput, error)
RegisterImageRequest(*ec2.RegisterImageInput) (*request.Request, *ec2.RegisterImageOutput)
+ RejectVpcEndpointConnections(*ec2.RejectVpcEndpointConnectionsInput) (*ec2.RejectVpcEndpointConnectionsOutput, error)
+ RejectVpcEndpointConnectionsWithContext(aws.Context, *ec2.RejectVpcEndpointConnectionsInput, ...request.Option) (*ec2.RejectVpcEndpointConnectionsOutput, error)
+ RejectVpcEndpointConnectionsRequest(*ec2.RejectVpcEndpointConnectionsInput) (*request.Request, *ec2.RejectVpcEndpointConnectionsOutput)
+
RejectVpcPeeringConnection(*ec2.RejectVpcPeeringConnectionInput) (*ec2.RejectVpcPeeringConnectionOutput, error)
RejectVpcPeeringConnectionWithContext(aws.Context, *ec2.RejectVpcPeeringConnectionInput, ...request.Option) (*ec2.RejectVpcPeeringConnectionOutput, error)
RejectVpcPeeringConnectionRequest(*ec2.RejectVpcPeeringConnectionInput) (*request.Request, *ec2.RejectVpcPeeringConnectionOutput)
@@ -969,6 +1085,10 @@ type EC2API interface {
RequestSpotInstancesWithContext(aws.Context, *ec2.RequestSpotInstancesInput, ...request.Option) (*ec2.RequestSpotInstancesOutput, error)
RequestSpotInstancesRequest(*ec2.RequestSpotInstancesInput) (*request.Request, *ec2.RequestSpotInstancesOutput)
+ ResetFpgaImageAttribute(*ec2.ResetFpgaImageAttributeInput) (*ec2.ResetFpgaImageAttributeOutput, error)
+ ResetFpgaImageAttributeWithContext(aws.Context, *ec2.ResetFpgaImageAttributeInput, ...request.Option) (*ec2.ResetFpgaImageAttributeOutput, error)
+ ResetFpgaImageAttributeRequest(*ec2.ResetFpgaImageAttributeInput) (*request.Request, *ec2.ResetFpgaImageAttributeOutput)
+
ResetImageAttribute(*ec2.ResetImageAttributeInput) (*ec2.ResetImageAttributeOutput, error)
ResetImageAttributeWithContext(aws.Context, *ec2.ResetImageAttributeInput, ...request.Option) (*ec2.ResetImageAttributeOutput, error)
ResetImageAttributeRequest(*ec2.ResetImageAttributeInput) (*request.Request, *ec2.ResetImageAttributeOutput)
@@ -1029,6 +1149,14 @@ type EC2API interface {
UnmonitorInstancesWithContext(aws.Context, *ec2.UnmonitorInstancesInput, ...request.Option) (*ec2.UnmonitorInstancesOutput, error)
UnmonitorInstancesRequest(*ec2.UnmonitorInstancesInput) (*request.Request, *ec2.UnmonitorInstancesOutput)
+ UpdateSecurityGroupRuleDescriptionsEgress(*ec2.UpdateSecurityGroupRuleDescriptionsEgressInput) (*ec2.UpdateSecurityGroupRuleDescriptionsEgressOutput, error)
+ UpdateSecurityGroupRuleDescriptionsEgressWithContext(aws.Context, *ec2.UpdateSecurityGroupRuleDescriptionsEgressInput, ...request.Option) (*ec2.UpdateSecurityGroupRuleDescriptionsEgressOutput, error)
+ UpdateSecurityGroupRuleDescriptionsEgressRequest(*ec2.UpdateSecurityGroupRuleDescriptionsEgressInput) (*request.Request, *ec2.UpdateSecurityGroupRuleDescriptionsEgressOutput)
+
+ UpdateSecurityGroupRuleDescriptionsIngress(*ec2.UpdateSecurityGroupRuleDescriptionsIngressInput) (*ec2.UpdateSecurityGroupRuleDescriptionsIngressOutput, error)
+ UpdateSecurityGroupRuleDescriptionsIngressWithContext(aws.Context, *ec2.UpdateSecurityGroupRuleDescriptionsIngressInput, ...request.Option) (*ec2.UpdateSecurityGroupRuleDescriptionsIngressOutput, error)
+ UpdateSecurityGroupRuleDescriptionsIngressRequest(*ec2.UpdateSecurityGroupRuleDescriptionsIngressInput) (*request.Request, *ec2.UpdateSecurityGroupRuleDescriptionsIngressOutput)
+
WaitUntilBundleTaskComplete(*ec2.DescribeBundleTasksInput) error
WaitUntilBundleTaskCompleteWithContext(aws.Context, *ec2.DescribeBundleTasksInput, ...request.WaiterOption) error
diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go
index c0a655fa0f0..0469f0f01a1 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go
@@ -11,7 +11,7 @@ import (
// WaitUntilBundleTaskComplete uses the Amazon EC2 API operation
// DescribeBundleTasks to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilBundleTaskComplete(input *DescribeBundleTasksInput) error {
return c.WaitUntilBundleTaskCompleteWithContext(aws.BackgroundContext(), input)
@@ -62,7 +62,7 @@ func (c *EC2) WaitUntilBundleTaskCompleteWithContext(ctx aws.Context, input *Des
// WaitUntilConversionTaskCancelled uses the Amazon EC2 API operation
// DescribeConversionTasks to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilConversionTaskCancelled(input *DescribeConversionTasksInput) error {
return c.WaitUntilConversionTaskCancelledWithContext(aws.BackgroundContext(), input)
@@ -108,7 +108,7 @@ func (c *EC2) WaitUntilConversionTaskCancelledWithContext(ctx aws.Context, input
// WaitUntilConversionTaskCompleted uses the Amazon EC2 API operation
// DescribeConversionTasks to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilConversionTaskCompleted(input *DescribeConversionTasksInput) error {
return c.WaitUntilConversionTaskCompletedWithContext(aws.BackgroundContext(), input)
@@ -164,7 +164,7 @@ func (c *EC2) WaitUntilConversionTaskCompletedWithContext(ctx aws.Context, input
// WaitUntilConversionTaskDeleted uses the Amazon EC2 API operation
// DescribeConversionTasks to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilConversionTaskDeleted(input *DescribeConversionTasksInput) error {
return c.WaitUntilConversionTaskDeletedWithContext(aws.BackgroundContext(), input)
@@ -210,7 +210,7 @@ func (c *EC2) WaitUntilConversionTaskDeletedWithContext(ctx aws.Context, input *
// WaitUntilCustomerGatewayAvailable uses the Amazon EC2 API operation
// DescribeCustomerGateways to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilCustomerGatewayAvailable(input *DescribeCustomerGatewaysInput) error {
return c.WaitUntilCustomerGatewayAvailableWithContext(aws.BackgroundContext(), input)
@@ -266,7 +266,7 @@ func (c *EC2) WaitUntilCustomerGatewayAvailableWithContext(ctx aws.Context, inpu
// WaitUntilExportTaskCancelled uses the Amazon EC2 API operation
// DescribeExportTasks to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilExportTaskCancelled(input *DescribeExportTasksInput) error {
return c.WaitUntilExportTaskCancelledWithContext(aws.BackgroundContext(), input)
@@ -312,7 +312,7 @@ func (c *EC2) WaitUntilExportTaskCancelledWithContext(ctx aws.Context, input *De
// WaitUntilExportTaskCompleted uses the Amazon EC2 API operation
// DescribeExportTasks to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilExportTaskCompleted(input *DescribeExportTasksInput) error {
return c.WaitUntilExportTaskCompletedWithContext(aws.BackgroundContext(), input)
@@ -358,7 +358,7 @@ func (c *EC2) WaitUntilExportTaskCompletedWithContext(ctx aws.Context, input *De
// WaitUntilImageAvailable uses the Amazon EC2 API operation
// DescribeImages to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilImageAvailable(input *DescribeImagesInput) error {
return c.WaitUntilImageAvailableWithContext(aws.BackgroundContext(), input)
@@ -409,7 +409,7 @@ func (c *EC2) WaitUntilImageAvailableWithContext(ctx aws.Context, input *Describ
// WaitUntilImageExists uses the Amazon EC2 API operation
// DescribeImages to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilImageExists(input *DescribeImagesInput) error {
return c.WaitUntilImageExistsWithContext(aws.BackgroundContext(), input)
@@ -460,7 +460,7 @@ func (c *EC2) WaitUntilImageExistsWithContext(ctx aws.Context, input *DescribeIm
// WaitUntilInstanceExists uses the Amazon EC2 API operation
// DescribeInstances to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilInstanceExists(input *DescribeInstancesInput) error {
return c.WaitUntilInstanceExistsWithContext(aws.BackgroundContext(), input)
@@ -511,7 +511,7 @@ func (c *EC2) WaitUntilInstanceExistsWithContext(ctx aws.Context, input *Describ
// WaitUntilInstanceRunning uses the Amazon EC2 API operation
// DescribeInstances to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilInstanceRunning(input *DescribeInstancesInput) error {
return c.WaitUntilInstanceRunningWithContext(aws.BackgroundContext(), input)
@@ -577,7 +577,7 @@ func (c *EC2) WaitUntilInstanceRunningWithContext(ctx aws.Context, input *Descri
// WaitUntilInstanceStatusOk uses the Amazon EC2 API operation
// DescribeInstanceStatus to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilInstanceStatusOk(input *DescribeInstanceStatusInput) error {
return c.WaitUntilInstanceStatusOkWithContext(aws.BackgroundContext(), input)
@@ -628,7 +628,7 @@ func (c *EC2) WaitUntilInstanceStatusOkWithContext(ctx aws.Context, input *Descr
// WaitUntilInstanceStopped uses the Amazon EC2 API operation
// DescribeInstances to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilInstanceStopped(input *DescribeInstancesInput) error {
return c.WaitUntilInstanceStoppedWithContext(aws.BackgroundContext(), input)
@@ -684,7 +684,7 @@ func (c *EC2) WaitUntilInstanceStoppedWithContext(ctx aws.Context, input *Descri
// WaitUntilInstanceTerminated uses the Amazon EC2 API operation
// DescribeInstances to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilInstanceTerminated(input *DescribeInstancesInput) error {
return c.WaitUntilInstanceTerminatedWithContext(aws.BackgroundContext(), input)
@@ -740,7 +740,7 @@ func (c *EC2) WaitUntilInstanceTerminatedWithContext(ctx aws.Context, input *Des
// WaitUntilKeyPairExists uses the Amazon EC2 API operation
// DescribeKeyPairs to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilKeyPairExists(input *DescribeKeyPairsInput) error {
return c.WaitUntilKeyPairExistsWithContext(aws.BackgroundContext(), input)
@@ -791,7 +791,7 @@ func (c *EC2) WaitUntilKeyPairExistsWithContext(ctx aws.Context, input *Describe
// WaitUntilNatGatewayAvailable uses the Amazon EC2 API operation
// DescribeNatGateways to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilNatGatewayAvailable(input *DescribeNatGatewaysInput) error {
return c.WaitUntilNatGatewayAvailableWithContext(aws.BackgroundContext(), input)
@@ -857,7 +857,7 @@ func (c *EC2) WaitUntilNatGatewayAvailableWithContext(ctx aws.Context, input *De
// WaitUntilNetworkInterfaceAvailable uses the Amazon EC2 API operation
// DescribeNetworkInterfaces to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilNetworkInterfaceAvailable(input *DescribeNetworkInterfacesInput) error {
return c.WaitUntilNetworkInterfaceAvailableWithContext(aws.BackgroundContext(), input)
@@ -908,7 +908,7 @@ func (c *EC2) WaitUntilNetworkInterfaceAvailableWithContext(ctx aws.Context, inp
// WaitUntilPasswordDataAvailable uses the Amazon EC2 API operation
// GetPasswordData to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilPasswordDataAvailable(input *GetPasswordDataInput) error {
return c.WaitUntilPasswordDataAvailableWithContext(aws.BackgroundContext(), input)
@@ -954,7 +954,7 @@ func (c *EC2) WaitUntilPasswordDataAvailableWithContext(ctx aws.Context, input *
// WaitUntilSnapshotCompleted uses the Amazon EC2 API operation
// DescribeSnapshots to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilSnapshotCompleted(input *DescribeSnapshotsInput) error {
return c.WaitUntilSnapshotCompletedWithContext(aws.BackgroundContext(), input)
@@ -1000,7 +1000,7 @@ func (c *EC2) WaitUntilSnapshotCompletedWithContext(ctx aws.Context, input *Desc
// WaitUntilSpotInstanceRequestFulfilled uses the Amazon EC2 API operation
// DescribeSpotInstanceRequests to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilSpotInstanceRequestFulfilled(input *DescribeSpotInstanceRequestsInput) error {
return c.WaitUntilSpotInstanceRequestFulfilledWithContext(aws.BackgroundContext(), input)
@@ -1025,6 +1025,11 @@ func (c *EC2) WaitUntilSpotInstanceRequestFulfilledWithContext(ctx aws.Context,
Matcher: request.PathAllWaiterMatch, Argument: "SpotInstanceRequests[].Status.Code",
Expected: "fulfilled",
},
+ {
+ State: request.SuccessWaiterState,
+ Matcher: request.PathAllWaiterMatch, Argument: "SpotInstanceRequests[].Status.Code",
+ Expected: "request-canceled-and-instance-running",
+ },
{
State: request.FailureWaiterState,
Matcher: request.PathAnyWaiterMatch, Argument: "SpotInstanceRequests[].Status.Code",
@@ -1045,6 +1050,11 @@ func (c *EC2) WaitUntilSpotInstanceRequestFulfilledWithContext(ctx aws.Context,
Matcher: request.PathAnyWaiterMatch, Argument: "SpotInstanceRequests[].Status.Code",
Expected: "system-error",
},
+ {
+ State: request.RetryWaiterState,
+ Matcher: request.ErrorWaiterMatch,
+ Expected: "InvalidSpotInstanceRequestID.NotFound",
+ },
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
@@ -1066,7 +1076,7 @@ func (c *EC2) WaitUntilSpotInstanceRequestFulfilledWithContext(ctx aws.Context,
// WaitUntilSubnetAvailable uses the Amazon EC2 API operation
// DescribeSubnets to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilSubnetAvailable(input *DescribeSubnetsInput) error {
return c.WaitUntilSubnetAvailableWithContext(aws.BackgroundContext(), input)
@@ -1112,7 +1122,7 @@ func (c *EC2) WaitUntilSubnetAvailableWithContext(ctx aws.Context, input *Descri
// WaitUntilSystemStatusOk uses the Amazon EC2 API operation
// DescribeInstanceStatus to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilSystemStatusOk(input *DescribeInstanceStatusInput) error {
return c.WaitUntilSystemStatusOkWithContext(aws.BackgroundContext(), input)
@@ -1158,7 +1168,7 @@ func (c *EC2) WaitUntilSystemStatusOkWithContext(ctx aws.Context, input *Describ
// WaitUntilVolumeAvailable uses the Amazon EC2 API operation
// DescribeVolumes to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVolumeAvailable(input *DescribeVolumesInput) error {
return c.WaitUntilVolumeAvailableWithContext(aws.BackgroundContext(), input)
@@ -1209,7 +1219,7 @@ func (c *EC2) WaitUntilVolumeAvailableWithContext(ctx aws.Context, input *Descri
// WaitUntilVolumeDeleted uses the Amazon EC2 API operation
// DescribeVolumes to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVolumeDeleted(input *DescribeVolumesInput) error {
return c.WaitUntilVolumeDeletedWithContext(aws.BackgroundContext(), input)
@@ -1260,7 +1270,7 @@ func (c *EC2) WaitUntilVolumeDeletedWithContext(ctx aws.Context, input *Describe
// WaitUntilVolumeInUse uses the Amazon EC2 API operation
// DescribeVolumes to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVolumeInUse(input *DescribeVolumesInput) error {
return c.WaitUntilVolumeInUseWithContext(aws.BackgroundContext(), input)
@@ -1311,7 +1321,7 @@ func (c *EC2) WaitUntilVolumeInUseWithContext(ctx aws.Context, input *DescribeVo
// WaitUntilVpcAvailable uses the Amazon EC2 API operation
// DescribeVpcs to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVpcAvailable(input *DescribeVpcsInput) error {
return c.WaitUntilVpcAvailableWithContext(aws.BackgroundContext(), input)
@@ -1357,7 +1367,7 @@ func (c *EC2) WaitUntilVpcAvailableWithContext(ctx aws.Context, input *DescribeV
// WaitUntilVpcExists uses the Amazon EC2 API operation
// DescribeVpcs to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVpcExists(input *DescribeVpcsInput) error {
return c.WaitUntilVpcExistsWithContext(aws.BackgroundContext(), input)
@@ -1408,7 +1418,7 @@ func (c *EC2) WaitUntilVpcExistsWithContext(ctx aws.Context, input *DescribeVpcs
// WaitUntilVpcPeeringConnectionDeleted uses the Amazon EC2 API operation
// DescribeVpcPeeringConnections to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVpcPeeringConnectionDeleted(input *DescribeVpcPeeringConnectionsInput) error {
return c.WaitUntilVpcPeeringConnectionDeletedWithContext(aws.BackgroundContext(), input)
@@ -1459,7 +1469,7 @@ func (c *EC2) WaitUntilVpcPeeringConnectionDeletedWithContext(ctx aws.Context, i
// WaitUntilVpcPeeringConnectionExists uses the Amazon EC2 API operation
// DescribeVpcPeeringConnections to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVpcPeeringConnectionExists(input *DescribeVpcPeeringConnectionsInput) error {
return c.WaitUntilVpcPeeringConnectionExistsWithContext(aws.BackgroundContext(), input)
@@ -1510,7 +1520,7 @@ func (c *EC2) WaitUntilVpcPeeringConnectionExistsWithContext(ctx aws.Context, in
// WaitUntilVpnConnectionAvailable uses the Amazon EC2 API operation
// DescribeVpnConnections to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVpnConnectionAvailable(input *DescribeVpnConnectionsInput) error {
return c.WaitUntilVpnConnectionAvailableWithContext(aws.BackgroundContext(), input)
@@ -1566,7 +1576,7 @@ func (c *EC2) WaitUntilVpnConnectionAvailableWithContext(ctx aws.Context, input
// WaitUntilVpnConnectionDeleted uses the Amazon EC2 API operation
// DescribeVpnConnections to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *EC2) WaitUntilVpnConnectionDeleted(input *DescribeVpnConnectionsInput) error {
return c.WaitUntilVpnConnectionDeletedWithContext(aws.BackgroundContext(), input)
diff --git a/vendor/github.com/aws/aws-sdk-go/service/generate.go b/vendor/github.com/aws/aws-sdk-go/service/generate.go
new file mode 100644
index 00000000000..3ffc9fcc5f6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/service/generate.go
@@ -0,0 +1,5 @@
+// Package service contains automatically generated AWS clients.
+package service
+
+//go:generate go run -tags codegen ../private/model/cli/gen-api/main.go -path=../service ../models/apis/*/*/api-2.json
+//go:generate gofmt -s -w ../service
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go
index 8a5fd8e17ef..0d852f59c80 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go
@@ -18,19 +18,18 @@ const opAbortMultipartUpload = "AbortMultipartUpload"
// AbortMultipartUploadRequest generates a "aws/request.Request" representing the
// client's request for the AbortMultipartUpload operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AbortMultipartUpload for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AbortMultipartUpload method directly
-// instead.
+// See AbortMultipartUpload for more information on using the AbortMultipartUpload
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AbortMultipartUploadRequest method.
// req, resp := client.AbortMultipartUploadRequest(params)
@@ -40,7 +39,7 @@ const opAbortMultipartUpload = "AbortMultipartUpload"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
func (c *S3) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req *request.Request, output *AbortMultipartUploadOutput) {
op := &request.Operation{
Name: opAbortMultipartUpload,
@@ -76,7 +75,7 @@ func (c *S3) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req
// * ErrCodeNoSuchUpload "NoSuchUpload"
// The specified multipart upload does not exist.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
func (c *S3) AbortMultipartUpload(input *AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error) {
req, out := c.AbortMultipartUploadRequest(input)
return out, req.Send()
@@ -102,19 +101,18 @@ const opCompleteMultipartUpload = "CompleteMultipartUpload"
// CompleteMultipartUploadRequest generates a "aws/request.Request" representing the
// client's request for the CompleteMultipartUpload operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CompleteMultipartUpload for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CompleteMultipartUpload method directly
-// instead.
+// See CompleteMultipartUpload for more information on using the CompleteMultipartUpload
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CompleteMultipartUploadRequest method.
// req, resp := client.CompleteMultipartUploadRequest(params)
@@ -124,7 +122,7 @@ const opCompleteMultipartUpload = "CompleteMultipartUpload"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput) (req *request.Request, output *CompleteMultipartUploadOutput) {
op := &request.Operation{
Name: opCompleteMultipartUpload,
@@ -151,7 +149,7 @@ func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput)
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation CompleteMultipartUpload for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
func (c *S3) CompleteMultipartUpload(input *CompleteMultipartUploadInput) (*CompleteMultipartUploadOutput, error) {
req, out := c.CompleteMultipartUploadRequest(input)
return out, req.Send()
@@ -177,19 +175,18 @@ const opCopyObject = "CopyObject"
// CopyObjectRequest generates a "aws/request.Request" representing the
// client's request for the CopyObject operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CopyObject for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CopyObject method directly
-// instead.
+// See CopyObject for more information on using the CopyObject
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CopyObjectRequest method.
// req, resp := client.CopyObjectRequest(params)
@@ -199,7 +196,7 @@ const opCopyObject = "CopyObject"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, output *CopyObjectOutput) {
op := &request.Operation{
Name: opCopyObject,
@@ -232,7 +229,7 @@ func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, ou
// The source object of the COPY operation is not in the active tier and is
// only stored in Amazon Glacier.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
func (c *S3) CopyObject(input *CopyObjectInput) (*CopyObjectOutput, error) {
req, out := c.CopyObjectRequest(input)
return out, req.Send()
@@ -258,19 +255,18 @@ const opCreateBucket = "CreateBucket"
// CreateBucketRequest generates a "aws/request.Request" representing the
// client's request for the CreateBucket operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateBucket for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateBucket method directly
-// instead.
+// See CreateBucket for more information on using the CreateBucket
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateBucketRequest method.
// req, resp := client.CreateBucketRequest(params)
@@ -280,7 +276,7 @@ const opCreateBucket = "CreateBucket"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request, output *CreateBucketOutput) {
op := &request.Operation{
Name: opCreateBucket,
@@ -315,7 +311,7 @@ func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request
//
// * ErrCodeBucketAlreadyOwnedByYou "BucketAlreadyOwnedByYou"
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
func (c *S3) CreateBucket(input *CreateBucketInput) (*CreateBucketOutput, error) {
req, out := c.CreateBucketRequest(input)
return out, req.Send()
@@ -341,19 +337,18 @@ const opCreateMultipartUpload = "CreateMultipartUpload"
// CreateMultipartUploadRequest generates a "aws/request.Request" representing the
// client's request for the CreateMultipartUpload operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See CreateMultipartUpload for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the CreateMultipartUpload method directly
-// instead.
+// See CreateMultipartUpload for more information on using the CreateMultipartUpload
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the CreateMultipartUploadRequest method.
// req, resp := client.CreateMultipartUploadRequest(params)
@@ -363,7 +358,7 @@ const opCreateMultipartUpload = "CreateMultipartUpload"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (req *request.Request, output *CreateMultipartUploadOutput) {
op := &request.Operation{
Name: opCreateMultipartUpload,
@@ -396,7 +391,7 @@ func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (re
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation CreateMultipartUpload for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
func (c *S3) CreateMultipartUpload(input *CreateMultipartUploadInput) (*CreateMultipartUploadOutput, error) {
req, out := c.CreateMultipartUploadRequest(input)
return out, req.Send()
@@ -422,19 +417,18 @@ const opDeleteBucket = "DeleteBucket"
// DeleteBucketRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucket operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucket for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucket method directly
-// instead.
+// See DeleteBucket for more information on using the DeleteBucket
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketRequest method.
// req, resp := client.DeleteBucketRequest(params)
@@ -444,7 +438,7 @@ const opDeleteBucket = "DeleteBucket"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
func (c *S3) DeleteBucketRequest(input *DeleteBucketInput) (req *request.Request, output *DeleteBucketOutput) {
op := &request.Operation{
Name: opDeleteBucket,
@@ -474,7 +468,7 @@ func (c *S3) DeleteBucketRequest(input *DeleteBucketInput) (req *request.Request
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation DeleteBucket for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
func (c *S3) DeleteBucket(input *DeleteBucketInput) (*DeleteBucketOutput, error) {
req, out := c.DeleteBucketRequest(input)
return out, req.Send()
@@ -500,19 +494,18 @@ const opDeleteBucketAnalyticsConfiguration = "DeleteBucketAnalyticsConfiguration
// DeleteBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketAnalyticsConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketAnalyticsConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketAnalyticsConfiguration method directly
-// instead.
+// See DeleteBucketAnalyticsConfiguration for more information on using the DeleteBucketAnalyticsConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketAnalyticsConfigurationRequest method.
// req, resp := client.DeleteBucketAnalyticsConfigurationRequest(params)
@@ -522,7 +515,7 @@ const opDeleteBucketAnalyticsConfiguration = "DeleteBucketAnalyticsConfiguration
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
func (c *S3) DeleteBucketAnalyticsConfigurationRequest(input *DeleteBucketAnalyticsConfigurationInput) (req *request.Request, output *DeleteBucketAnalyticsConfigurationOutput) {
op := &request.Operation{
Name: opDeleteBucketAnalyticsConfiguration,
@@ -552,7 +545,7 @@ func (c *S3) DeleteBucketAnalyticsConfigurationRequest(input *DeleteBucketAnalyt
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation DeleteBucketAnalyticsConfiguration for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
func (c *S3) DeleteBucketAnalyticsConfiguration(input *DeleteBucketAnalyticsConfigurationInput) (*DeleteBucketAnalyticsConfigurationOutput, error) {
req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
return out, req.Send()
@@ -578,19 +571,18 @@ const opDeleteBucketCors = "DeleteBucketCors"
// DeleteBucketCorsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketCors operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketCors for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketCors method directly
-// instead.
+// See DeleteBucketCors for more information on using the DeleteBucketCors
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketCorsRequest method.
// req, resp := client.DeleteBucketCorsRequest(params)
@@ -600,7 +592,7 @@ const opDeleteBucketCors = "DeleteBucketCors"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
func (c *S3) DeleteBucketCorsRequest(input *DeleteBucketCorsInput) (req *request.Request, output *DeleteBucketCorsOutput) {
op := &request.Operation{
Name: opDeleteBucketCors,
@@ -629,7 +621,7 @@ func (c *S3) DeleteBucketCorsRequest(input *DeleteBucketCorsInput) (req *request
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation DeleteBucketCors for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
func (c *S3) DeleteBucketCors(input *DeleteBucketCorsInput) (*DeleteBucketCorsOutput, error) {
req, out := c.DeleteBucketCorsRequest(input)
return out, req.Send()
@@ -651,23 +643,98 @@ func (c *S3) DeleteBucketCorsWithContext(ctx aws.Context, input *DeleteBucketCor
return out, req.Send()
}
+const opDeleteBucketEncryption = "DeleteBucketEncryption"
+
+// DeleteBucketEncryptionRequest generates a "aws/request.Request" representing the
+// client's request for the DeleteBucketEncryption operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See DeleteBucketEncryption for more information on using the DeleteBucketEncryption
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the DeleteBucketEncryptionRequest method.
+// req, resp := client.DeleteBucketEncryptionRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryption
+func (c *S3) DeleteBucketEncryptionRequest(input *DeleteBucketEncryptionInput) (req *request.Request, output *DeleteBucketEncryptionOutput) {
+ op := &request.Operation{
+ Name: opDeleteBucketEncryption,
+ HTTPMethod: "DELETE",
+ HTTPPath: "/{Bucket}?encryption",
+ }
+
+ if input == nil {
+ input = &DeleteBucketEncryptionInput{}
+ }
+
+ output = &DeleteBucketEncryptionOutput{}
+ req = c.newRequest(op, input, output)
+ req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
+ req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
+ return
+}
+
+// DeleteBucketEncryption API operation for Amazon Simple Storage Service.
+//
+// Deletes the server-side encryption configuration from the bucket.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Simple Storage Service's
+// API operation DeleteBucketEncryption for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryption
+func (c *S3) DeleteBucketEncryption(input *DeleteBucketEncryptionInput) (*DeleteBucketEncryptionOutput, error) {
+ req, out := c.DeleteBucketEncryptionRequest(input)
+ return out, req.Send()
+}
+
+// DeleteBucketEncryptionWithContext is the same as DeleteBucketEncryption with the addition of
+// the ability to pass a context and additional request options.
+//
+// See DeleteBucketEncryption for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) DeleteBucketEncryptionWithContext(ctx aws.Context, input *DeleteBucketEncryptionInput, opts ...request.Option) (*DeleteBucketEncryptionOutput, error) {
+ req, out := c.DeleteBucketEncryptionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opDeleteBucketInventoryConfiguration = "DeleteBucketInventoryConfiguration"
// DeleteBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketInventoryConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketInventoryConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketInventoryConfiguration method directly
-// instead.
+// See DeleteBucketInventoryConfiguration for more information on using the DeleteBucketInventoryConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketInventoryConfigurationRequest method.
// req, resp := client.DeleteBucketInventoryConfigurationRequest(params)
@@ -677,7 +744,7 @@ const opDeleteBucketInventoryConfiguration = "DeleteBucketInventoryConfiguration
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
func (c *S3) DeleteBucketInventoryConfigurationRequest(input *DeleteBucketInventoryConfigurationInput) (req *request.Request, output *DeleteBucketInventoryConfigurationOutput) {
op := &request.Operation{
Name: opDeleteBucketInventoryConfiguration,
@@ -707,7 +774,7 @@ func (c *S3) DeleteBucketInventoryConfigurationRequest(input *DeleteBucketInvent
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation DeleteBucketInventoryConfiguration for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
func (c *S3) DeleteBucketInventoryConfiguration(input *DeleteBucketInventoryConfigurationInput) (*DeleteBucketInventoryConfigurationOutput, error) {
req, out := c.DeleteBucketInventoryConfigurationRequest(input)
return out, req.Send()
@@ -733,19 +800,18 @@ const opDeleteBucketLifecycle = "DeleteBucketLifecycle"
// DeleteBucketLifecycleRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketLifecycle operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketLifecycle for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketLifecycle method directly
-// instead.
+// See DeleteBucketLifecycle for more information on using the DeleteBucketLifecycle
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketLifecycleRequest method.
// req, resp := client.DeleteBucketLifecycleRequest(params)
@@ -755,7 +821,7 @@ const opDeleteBucketLifecycle = "DeleteBucketLifecycle"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
func (c *S3) DeleteBucketLifecycleRequest(input *DeleteBucketLifecycleInput) (req *request.Request, output *DeleteBucketLifecycleOutput) {
op := &request.Operation{
Name: opDeleteBucketLifecycle,
@@ -784,7 +850,7 @@ func (c *S3) DeleteBucketLifecycleRequest(input *DeleteBucketLifecycleInput) (re
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation DeleteBucketLifecycle for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
func (c *S3) DeleteBucketLifecycle(input *DeleteBucketLifecycleInput) (*DeleteBucketLifecycleOutput, error) {
req, out := c.DeleteBucketLifecycleRequest(input)
return out, req.Send()
@@ -810,19 +876,18 @@ const opDeleteBucketMetricsConfiguration = "DeleteBucketMetricsConfiguration"
// DeleteBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketMetricsConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketMetricsConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketMetricsConfiguration method directly
-// instead.
+// See DeleteBucketMetricsConfiguration for more information on using the DeleteBucketMetricsConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketMetricsConfigurationRequest method.
// req, resp := client.DeleteBucketMetricsConfigurationRequest(params)
@@ -832,7 +897,7 @@ const opDeleteBucketMetricsConfiguration = "DeleteBucketMetricsConfiguration"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
func (c *S3) DeleteBucketMetricsConfigurationRequest(input *DeleteBucketMetricsConfigurationInput) (req *request.Request, output *DeleteBucketMetricsConfigurationOutput) {
op := &request.Operation{
Name: opDeleteBucketMetricsConfiguration,
@@ -862,7 +927,7 @@ func (c *S3) DeleteBucketMetricsConfigurationRequest(input *DeleteBucketMetricsC
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation DeleteBucketMetricsConfiguration for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
func (c *S3) DeleteBucketMetricsConfiguration(input *DeleteBucketMetricsConfigurationInput) (*DeleteBucketMetricsConfigurationOutput, error) {
req, out := c.DeleteBucketMetricsConfigurationRequest(input)
return out, req.Send()
@@ -888,19 +953,18 @@ const opDeleteBucketPolicy = "DeleteBucketPolicy"
// DeleteBucketPolicyRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketPolicy operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketPolicy for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketPolicy method directly
-// instead.
+// See DeleteBucketPolicy for more information on using the DeleteBucketPolicy
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketPolicyRequest method.
// req, resp := client.DeleteBucketPolicyRequest(params)
@@ -910,7 +974,7 @@ const opDeleteBucketPolicy = "DeleteBucketPolicy"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
func (c *S3) DeleteBucketPolicyRequest(input *DeleteBucketPolicyInput) (req *request.Request, output *DeleteBucketPolicyOutput) {
op := &request.Operation{
Name: opDeleteBucketPolicy,
@@ -939,7 +1003,7 @@ func (c *S3) DeleteBucketPolicyRequest(input *DeleteBucketPolicyInput) (req *req
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation DeleteBucketPolicy for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
func (c *S3) DeleteBucketPolicy(input *DeleteBucketPolicyInput) (*DeleteBucketPolicyOutput, error) {
req, out := c.DeleteBucketPolicyRequest(input)
return out, req.Send()
@@ -965,19 +1029,18 @@ const opDeleteBucketReplication = "DeleteBucketReplication"
// DeleteBucketReplicationRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketReplication operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketReplication for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketReplication method directly
-// instead.
+// See DeleteBucketReplication for more information on using the DeleteBucketReplication
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketReplicationRequest method.
// req, resp := client.DeleteBucketReplicationRequest(params)
@@ -987,7 +1050,7 @@ const opDeleteBucketReplication = "DeleteBucketReplication"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
func (c *S3) DeleteBucketReplicationRequest(input *DeleteBucketReplicationInput) (req *request.Request, output *DeleteBucketReplicationOutput) {
op := &request.Operation{
Name: opDeleteBucketReplication,
@@ -1016,7 +1079,7 @@ func (c *S3) DeleteBucketReplicationRequest(input *DeleteBucketReplicationInput)
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation DeleteBucketReplication for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
func (c *S3) DeleteBucketReplication(input *DeleteBucketReplicationInput) (*DeleteBucketReplicationOutput, error) {
req, out := c.DeleteBucketReplicationRequest(input)
return out, req.Send()
@@ -1042,19 +1105,18 @@ const opDeleteBucketTagging = "DeleteBucketTagging"
// DeleteBucketTaggingRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketTagging operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketTagging for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketTagging method directly
-// instead.
+// See DeleteBucketTagging for more information on using the DeleteBucketTagging
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketTaggingRequest method.
// req, resp := client.DeleteBucketTaggingRequest(params)
@@ -1064,7 +1126,7 @@ const opDeleteBucketTagging = "DeleteBucketTagging"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
func (c *S3) DeleteBucketTaggingRequest(input *DeleteBucketTaggingInput) (req *request.Request, output *DeleteBucketTaggingOutput) {
op := &request.Operation{
Name: opDeleteBucketTagging,
@@ -1093,7 +1155,7 @@ func (c *S3) DeleteBucketTaggingRequest(input *DeleteBucketTaggingInput) (req *r
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation DeleteBucketTagging for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
func (c *S3) DeleteBucketTagging(input *DeleteBucketTaggingInput) (*DeleteBucketTaggingOutput, error) {
req, out := c.DeleteBucketTaggingRequest(input)
return out, req.Send()
@@ -1119,19 +1181,18 @@ const opDeleteBucketWebsite = "DeleteBucketWebsite"
// DeleteBucketWebsiteRequest generates a "aws/request.Request" representing the
// client's request for the DeleteBucketWebsite operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteBucketWebsite for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteBucketWebsite method directly
-// instead.
+// See DeleteBucketWebsite for more information on using the DeleteBucketWebsite
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteBucketWebsiteRequest method.
// req, resp := client.DeleteBucketWebsiteRequest(params)
@@ -1141,7 +1202,7 @@ const opDeleteBucketWebsite = "DeleteBucketWebsite"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
func (c *S3) DeleteBucketWebsiteRequest(input *DeleteBucketWebsiteInput) (req *request.Request, output *DeleteBucketWebsiteOutput) {
op := &request.Operation{
Name: opDeleteBucketWebsite,
@@ -1170,7 +1231,7 @@ func (c *S3) DeleteBucketWebsiteRequest(input *DeleteBucketWebsiteInput) (req *r
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation DeleteBucketWebsite for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
func (c *S3) DeleteBucketWebsite(input *DeleteBucketWebsiteInput) (*DeleteBucketWebsiteOutput, error) {
req, out := c.DeleteBucketWebsiteRequest(input)
return out, req.Send()
@@ -1196,19 +1257,18 @@ const opDeleteObject = "DeleteObject"
// DeleteObjectRequest generates a "aws/request.Request" representing the
// client's request for the DeleteObject operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteObject for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteObject method directly
-// instead.
+// See DeleteObject for more information on using the DeleteObject
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteObjectRequest method.
// req, resp := client.DeleteObjectRequest(params)
@@ -1218,7 +1278,7 @@ const opDeleteObject = "DeleteObject"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
func (c *S3) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request, output *DeleteObjectOutput) {
op := &request.Operation{
Name: opDeleteObject,
@@ -1247,7 +1307,7 @@ func (c *S3) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation DeleteObject for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
func (c *S3) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error) {
req, out := c.DeleteObjectRequest(input)
return out, req.Send()
@@ -1273,19 +1333,18 @@ const opDeleteObjectTagging = "DeleteObjectTagging"
// DeleteObjectTaggingRequest generates a "aws/request.Request" representing the
// client's request for the DeleteObjectTagging operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteObjectTagging for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteObjectTagging method directly
-// instead.
+// See DeleteObjectTagging for more information on using the DeleteObjectTagging
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteObjectTaggingRequest method.
// req, resp := client.DeleteObjectTaggingRequest(params)
@@ -1295,7 +1354,7 @@ const opDeleteObjectTagging = "DeleteObjectTagging"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
func (c *S3) DeleteObjectTaggingRequest(input *DeleteObjectTaggingInput) (req *request.Request, output *DeleteObjectTaggingOutput) {
op := &request.Operation{
Name: opDeleteObjectTagging,
@@ -1322,7 +1381,7 @@ func (c *S3) DeleteObjectTaggingRequest(input *DeleteObjectTaggingInput) (req *r
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation DeleteObjectTagging for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
func (c *S3) DeleteObjectTagging(input *DeleteObjectTaggingInput) (*DeleteObjectTaggingOutput, error) {
req, out := c.DeleteObjectTaggingRequest(input)
return out, req.Send()
@@ -1348,19 +1407,18 @@ const opDeleteObjects = "DeleteObjects"
// DeleteObjectsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteObjects operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DeleteObjects for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DeleteObjects method directly
-// instead.
+// See DeleteObjects for more information on using the DeleteObjects
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DeleteObjectsRequest method.
// req, resp := client.DeleteObjectsRequest(params)
@@ -1370,7 +1428,7 @@ const opDeleteObjects = "DeleteObjects"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
func (c *S3) DeleteObjectsRequest(input *DeleteObjectsInput) (req *request.Request, output *DeleteObjectsOutput) {
op := &request.Operation{
Name: opDeleteObjects,
@@ -1398,7 +1456,7 @@ func (c *S3) DeleteObjectsRequest(input *DeleteObjectsInput) (req *request.Reque
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation DeleteObjects for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
func (c *S3) DeleteObjects(input *DeleteObjectsInput) (*DeleteObjectsOutput, error) {
req, out := c.DeleteObjectsRequest(input)
return out, req.Send()
@@ -1424,19 +1482,18 @@ const opGetBucketAccelerateConfiguration = "GetBucketAccelerateConfiguration"
// GetBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketAccelerateConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketAccelerateConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketAccelerateConfiguration method directly
-// instead.
+// See GetBucketAccelerateConfiguration for more information on using the GetBucketAccelerateConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketAccelerateConfigurationRequest method.
// req, resp := client.GetBucketAccelerateConfigurationRequest(params)
@@ -1446,7 +1503,7 @@ const opGetBucketAccelerateConfiguration = "GetBucketAccelerateConfiguration"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
func (c *S3) GetBucketAccelerateConfigurationRequest(input *GetBucketAccelerateConfigurationInput) (req *request.Request, output *GetBucketAccelerateConfigurationOutput) {
op := &request.Operation{
Name: opGetBucketAccelerateConfiguration,
@@ -1473,7 +1530,7 @@ func (c *S3) GetBucketAccelerateConfigurationRequest(input *GetBucketAccelerateC
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation GetBucketAccelerateConfiguration for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
func (c *S3) GetBucketAccelerateConfiguration(input *GetBucketAccelerateConfigurationInput) (*GetBucketAccelerateConfigurationOutput, error) {
req, out := c.GetBucketAccelerateConfigurationRequest(input)
return out, req.Send()
@@ -1499,19 +1556,18 @@ const opGetBucketAcl = "GetBucketAcl"
// GetBucketAclRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketAcl operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketAcl for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketAcl method directly
-// instead.
+// See GetBucketAcl for more information on using the GetBucketAcl
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketAclRequest method.
// req, resp := client.GetBucketAclRequest(params)
@@ -1521,7 +1577,7 @@ const opGetBucketAcl = "GetBucketAcl"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
func (c *S3) GetBucketAclRequest(input *GetBucketAclInput) (req *request.Request, output *GetBucketAclOutput) {
op := &request.Operation{
Name: opGetBucketAcl,
@@ -1548,7 +1604,7 @@ func (c *S3) GetBucketAclRequest(input *GetBucketAclInput) (req *request.Request
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation GetBucketAcl for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
func (c *S3) GetBucketAcl(input *GetBucketAclInput) (*GetBucketAclOutput, error) {
req, out := c.GetBucketAclRequest(input)
return out, req.Send()
@@ -1574,19 +1630,18 @@ const opGetBucketAnalyticsConfiguration = "GetBucketAnalyticsConfiguration"
// GetBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketAnalyticsConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketAnalyticsConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketAnalyticsConfiguration method directly
-// instead.
+// See GetBucketAnalyticsConfiguration for more information on using the GetBucketAnalyticsConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketAnalyticsConfigurationRequest method.
// req, resp := client.GetBucketAnalyticsConfigurationRequest(params)
@@ -1596,7 +1651,7 @@ const opGetBucketAnalyticsConfiguration = "GetBucketAnalyticsConfiguration"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
func (c *S3) GetBucketAnalyticsConfigurationRequest(input *GetBucketAnalyticsConfigurationInput) (req *request.Request, output *GetBucketAnalyticsConfigurationOutput) {
op := &request.Operation{
Name: opGetBucketAnalyticsConfiguration,
@@ -1624,7 +1679,7 @@ func (c *S3) GetBucketAnalyticsConfigurationRequest(input *GetBucketAnalyticsCon
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation GetBucketAnalyticsConfiguration for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
func (c *S3) GetBucketAnalyticsConfiguration(input *GetBucketAnalyticsConfigurationInput) (*GetBucketAnalyticsConfigurationOutput, error) {
req, out := c.GetBucketAnalyticsConfigurationRequest(input)
return out, req.Send()
@@ -1650,19 +1705,18 @@ const opGetBucketCors = "GetBucketCors"
// GetBucketCorsRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketCors operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketCors for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketCors method directly
-// instead.
+// See GetBucketCors for more information on using the GetBucketCors
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketCorsRequest method.
// req, resp := client.GetBucketCorsRequest(params)
@@ -1672,7 +1726,7 @@ const opGetBucketCors = "GetBucketCors"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
func (c *S3) GetBucketCorsRequest(input *GetBucketCorsInput) (req *request.Request, output *GetBucketCorsOutput) {
op := &request.Operation{
Name: opGetBucketCors,
@@ -1699,7 +1753,7 @@ func (c *S3) GetBucketCorsRequest(input *GetBucketCorsInput) (req *request.Reque
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation GetBucketCors for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
func (c *S3) GetBucketCors(input *GetBucketCorsInput) (*GetBucketCorsOutput, error) {
req, out := c.GetBucketCorsRequest(input)
return out, req.Send()
@@ -1721,23 +1775,96 @@ func (c *S3) GetBucketCorsWithContext(ctx aws.Context, input *GetBucketCorsInput
return out, req.Send()
}
+const opGetBucketEncryption = "GetBucketEncryption"
+
+// GetBucketEncryptionRequest generates a "aws/request.Request" representing the
+// client's request for the GetBucketEncryption operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See GetBucketEncryption for more information on using the GetBucketEncryption
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the GetBucketEncryptionRequest method.
+// req, resp := client.GetBucketEncryptionRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryption
+func (c *S3) GetBucketEncryptionRequest(input *GetBucketEncryptionInput) (req *request.Request, output *GetBucketEncryptionOutput) {
+ op := &request.Operation{
+ Name: opGetBucketEncryption,
+ HTTPMethod: "GET",
+ HTTPPath: "/{Bucket}?encryption",
+ }
+
+ if input == nil {
+ input = &GetBucketEncryptionInput{}
+ }
+
+ output = &GetBucketEncryptionOutput{}
+ req = c.newRequest(op, input, output)
+ return
+}
+
+// GetBucketEncryption API operation for Amazon Simple Storage Service.
+//
+// Returns the server-side encryption configuration of a bucket.
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Simple Storage Service's
+// API operation GetBucketEncryption for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryption
+func (c *S3) GetBucketEncryption(input *GetBucketEncryptionInput) (*GetBucketEncryptionOutput, error) {
+ req, out := c.GetBucketEncryptionRequest(input)
+ return out, req.Send()
+}
+
+// GetBucketEncryptionWithContext is the same as GetBucketEncryption with the addition of
+// the ability to pass a context and additional request options.
+//
+// See GetBucketEncryption for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) GetBucketEncryptionWithContext(ctx aws.Context, input *GetBucketEncryptionInput, opts ...request.Option) (*GetBucketEncryptionOutput, error) {
+ req, out := c.GetBucketEncryptionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opGetBucketInventoryConfiguration = "GetBucketInventoryConfiguration"
// GetBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketInventoryConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketInventoryConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketInventoryConfiguration method directly
-// instead.
+// See GetBucketInventoryConfiguration for more information on using the GetBucketInventoryConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketInventoryConfigurationRequest method.
// req, resp := client.GetBucketInventoryConfigurationRequest(params)
@@ -1747,7 +1874,7 @@ const opGetBucketInventoryConfiguration = "GetBucketInventoryConfiguration"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
func (c *S3) GetBucketInventoryConfigurationRequest(input *GetBucketInventoryConfigurationInput) (req *request.Request, output *GetBucketInventoryConfigurationOutput) {
op := &request.Operation{
Name: opGetBucketInventoryConfiguration,
@@ -1775,7 +1902,7 @@ func (c *S3) GetBucketInventoryConfigurationRequest(input *GetBucketInventoryCon
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation GetBucketInventoryConfiguration for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
func (c *S3) GetBucketInventoryConfiguration(input *GetBucketInventoryConfigurationInput) (*GetBucketInventoryConfigurationOutput, error) {
req, out := c.GetBucketInventoryConfigurationRequest(input)
return out, req.Send()
@@ -1801,19 +1928,18 @@ const opGetBucketLifecycle = "GetBucketLifecycle"
// GetBucketLifecycleRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketLifecycle operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketLifecycle for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketLifecycle method directly
-// instead.
+// See GetBucketLifecycle for more information on using the GetBucketLifecycle
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketLifecycleRequest method.
// req, resp := client.GetBucketLifecycleRequest(params)
@@ -1823,7 +1949,7 @@ const opGetBucketLifecycle = "GetBucketLifecycle"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *request.Request, output *GetBucketLifecycleOutput) {
if c.Client.Config.Logger != nil {
c.Client.Config.Logger.Log("This operation, GetBucketLifecycle, has been deprecated")
@@ -1853,7 +1979,7 @@ func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *req
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation GetBucketLifecycle for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
func (c *S3) GetBucketLifecycle(input *GetBucketLifecycleInput) (*GetBucketLifecycleOutput, error) {
req, out := c.GetBucketLifecycleRequest(input)
return out, req.Send()
@@ -1879,19 +2005,18 @@ const opGetBucketLifecycleConfiguration = "GetBucketLifecycleConfiguration"
// GetBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketLifecycleConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketLifecycleConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketLifecycleConfiguration method directly
-// instead.
+// See GetBucketLifecycleConfiguration for more information on using the GetBucketLifecycleConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketLifecycleConfigurationRequest method.
// req, resp := client.GetBucketLifecycleConfigurationRequest(params)
@@ -1901,7 +2026,7 @@ const opGetBucketLifecycleConfiguration = "GetBucketLifecycleConfiguration"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleConfigurationInput) (req *request.Request, output *GetBucketLifecycleConfigurationOutput) {
op := &request.Operation{
Name: opGetBucketLifecycleConfiguration,
@@ -1928,7 +2053,7 @@ func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleCon
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation GetBucketLifecycleConfiguration for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
func (c *S3) GetBucketLifecycleConfiguration(input *GetBucketLifecycleConfigurationInput) (*GetBucketLifecycleConfigurationOutput, error) {
req, out := c.GetBucketLifecycleConfigurationRequest(input)
return out, req.Send()
@@ -1954,19 +2079,18 @@ const opGetBucketLocation = "GetBucketLocation"
// GetBucketLocationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketLocation operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketLocation for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketLocation method directly
-// instead.
+// See GetBucketLocation for more information on using the GetBucketLocation
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketLocationRequest method.
// req, resp := client.GetBucketLocationRequest(params)
@@ -1976,7 +2100,7 @@ const opGetBucketLocation = "GetBucketLocation"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
func (c *S3) GetBucketLocationRequest(input *GetBucketLocationInput) (req *request.Request, output *GetBucketLocationOutput) {
op := &request.Operation{
Name: opGetBucketLocation,
@@ -2003,7 +2127,7 @@ func (c *S3) GetBucketLocationRequest(input *GetBucketLocationInput) (req *reque
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation GetBucketLocation for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
func (c *S3) GetBucketLocation(input *GetBucketLocationInput) (*GetBucketLocationOutput, error) {
req, out := c.GetBucketLocationRequest(input)
return out, req.Send()
@@ -2029,19 +2153,18 @@ const opGetBucketLogging = "GetBucketLogging"
// GetBucketLoggingRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketLogging operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketLogging for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketLogging method directly
-// instead.
+// See GetBucketLogging for more information on using the GetBucketLogging
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketLoggingRequest method.
// req, resp := client.GetBucketLoggingRequest(params)
@@ -2051,7 +2174,7 @@ const opGetBucketLogging = "GetBucketLogging"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
func (c *S3) GetBucketLoggingRequest(input *GetBucketLoggingInput) (req *request.Request, output *GetBucketLoggingOutput) {
op := &request.Operation{
Name: opGetBucketLogging,
@@ -2079,7 +2202,7 @@ func (c *S3) GetBucketLoggingRequest(input *GetBucketLoggingInput) (req *request
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation GetBucketLogging for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
func (c *S3) GetBucketLogging(input *GetBucketLoggingInput) (*GetBucketLoggingOutput, error) {
req, out := c.GetBucketLoggingRequest(input)
return out, req.Send()
@@ -2105,19 +2228,18 @@ const opGetBucketMetricsConfiguration = "GetBucketMetricsConfiguration"
// GetBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketMetricsConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketMetricsConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketMetricsConfiguration method directly
-// instead.
+// See GetBucketMetricsConfiguration for more information on using the GetBucketMetricsConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketMetricsConfigurationRequest method.
// req, resp := client.GetBucketMetricsConfigurationRequest(params)
@@ -2127,7 +2249,7 @@ const opGetBucketMetricsConfiguration = "GetBucketMetricsConfiguration"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
func (c *S3) GetBucketMetricsConfigurationRequest(input *GetBucketMetricsConfigurationInput) (req *request.Request, output *GetBucketMetricsConfigurationOutput) {
op := &request.Operation{
Name: opGetBucketMetricsConfiguration,
@@ -2155,7 +2277,7 @@ func (c *S3) GetBucketMetricsConfigurationRequest(input *GetBucketMetricsConfigu
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation GetBucketMetricsConfiguration for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
func (c *S3) GetBucketMetricsConfiguration(input *GetBucketMetricsConfigurationInput) (*GetBucketMetricsConfigurationOutput, error) {
req, out := c.GetBucketMetricsConfigurationRequest(input)
return out, req.Send()
@@ -2181,19 +2303,18 @@ const opGetBucketNotification = "GetBucketNotification"
// GetBucketNotificationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketNotification operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketNotification for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketNotification method directly
-// instead.
+// See GetBucketNotification for more information on using the GetBucketNotification
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketNotificationRequest method.
// req, resp := client.GetBucketNotificationRequest(params)
@@ -2203,7 +2324,7 @@ const opGetBucketNotification = "GetBucketNotification"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfigurationDeprecated) {
if c.Client.Config.Logger != nil {
c.Client.Config.Logger.Log("This operation, GetBucketNotification, has been deprecated")
@@ -2233,7 +2354,7 @@ func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurat
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation GetBucketNotification for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
func (c *S3) GetBucketNotification(input *GetBucketNotificationConfigurationRequest) (*NotificationConfigurationDeprecated, error) {
req, out := c.GetBucketNotificationRequest(input)
return out, req.Send()
@@ -2259,19 +2380,18 @@ const opGetBucketNotificationConfiguration = "GetBucketNotificationConfiguration
// GetBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketNotificationConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketNotificationConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketNotificationConfiguration method directly
-// instead.
+// See GetBucketNotificationConfiguration for more information on using the GetBucketNotificationConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketNotificationConfigurationRequest method.
// req, resp := client.GetBucketNotificationConfigurationRequest(params)
@@ -2281,7 +2401,7 @@ const opGetBucketNotificationConfiguration = "GetBucketNotificationConfiguration
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
func (c *S3) GetBucketNotificationConfigurationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfiguration) {
op := &request.Operation{
Name: opGetBucketNotificationConfiguration,
@@ -2308,7 +2428,7 @@ func (c *S3) GetBucketNotificationConfigurationRequest(input *GetBucketNotificat
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation GetBucketNotificationConfiguration for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
func (c *S3) GetBucketNotificationConfiguration(input *GetBucketNotificationConfigurationRequest) (*NotificationConfiguration, error) {
req, out := c.GetBucketNotificationConfigurationRequest(input)
return out, req.Send()
@@ -2334,19 +2454,18 @@ const opGetBucketPolicy = "GetBucketPolicy"
// GetBucketPolicyRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketPolicy operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketPolicy for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketPolicy method directly
-// instead.
+// See GetBucketPolicy for more information on using the GetBucketPolicy
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketPolicyRequest method.
// req, resp := client.GetBucketPolicyRequest(params)
@@ -2356,7 +2475,7 @@ const opGetBucketPolicy = "GetBucketPolicy"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
func (c *S3) GetBucketPolicyRequest(input *GetBucketPolicyInput) (req *request.Request, output *GetBucketPolicyOutput) {
op := &request.Operation{
Name: opGetBucketPolicy,
@@ -2383,7 +2502,7 @@ func (c *S3) GetBucketPolicyRequest(input *GetBucketPolicyInput) (req *request.R
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation GetBucketPolicy for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
func (c *S3) GetBucketPolicy(input *GetBucketPolicyInput) (*GetBucketPolicyOutput, error) {
req, out := c.GetBucketPolicyRequest(input)
return out, req.Send()
@@ -2409,19 +2528,18 @@ const opGetBucketReplication = "GetBucketReplication"
// GetBucketReplicationRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketReplication operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketReplication for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketReplication method directly
-// instead.
+// See GetBucketReplication for more information on using the GetBucketReplication
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketReplicationRequest method.
// req, resp := client.GetBucketReplicationRequest(params)
@@ -2431,7 +2549,7 @@ const opGetBucketReplication = "GetBucketReplication"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
func (c *S3) GetBucketReplicationRequest(input *GetBucketReplicationInput) (req *request.Request, output *GetBucketReplicationOutput) {
op := &request.Operation{
Name: opGetBucketReplication,
@@ -2458,7 +2576,7 @@ func (c *S3) GetBucketReplicationRequest(input *GetBucketReplicationInput) (req
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation GetBucketReplication for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
func (c *S3) GetBucketReplication(input *GetBucketReplicationInput) (*GetBucketReplicationOutput, error) {
req, out := c.GetBucketReplicationRequest(input)
return out, req.Send()
@@ -2484,19 +2602,18 @@ const opGetBucketRequestPayment = "GetBucketRequestPayment"
// GetBucketRequestPaymentRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketRequestPayment operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketRequestPayment for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketRequestPayment method directly
-// instead.
+// See GetBucketRequestPayment for more information on using the GetBucketRequestPayment
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketRequestPaymentRequest method.
// req, resp := client.GetBucketRequestPaymentRequest(params)
@@ -2506,7 +2623,7 @@ const opGetBucketRequestPayment = "GetBucketRequestPayment"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
func (c *S3) GetBucketRequestPaymentRequest(input *GetBucketRequestPaymentInput) (req *request.Request, output *GetBucketRequestPaymentOutput) {
op := &request.Operation{
Name: opGetBucketRequestPayment,
@@ -2533,7 +2650,7 @@ func (c *S3) GetBucketRequestPaymentRequest(input *GetBucketRequestPaymentInput)
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation GetBucketRequestPayment for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
func (c *S3) GetBucketRequestPayment(input *GetBucketRequestPaymentInput) (*GetBucketRequestPaymentOutput, error) {
req, out := c.GetBucketRequestPaymentRequest(input)
return out, req.Send()
@@ -2559,19 +2676,18 @@ const opGetBucketTagging = "GetBucketTagging"
// GetBucketTaggingRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketTagging operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketTagging for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketTagging method directly
-// instead.
+// See GetBucketTagging for more information on using the GetBucketTagging
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketTaggingRequest method.
// req, resp := client.GetBucketTaggingRequest(params)
@@ -2581,7 +2697,7 @@ const opGetBucketTagging = "GetBucketTagging"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
func (c *S3) GetBucketTaggingRequest(input *GetBucketTaggingInput) (req *request.Request, output *GetBucketTaggingOutput) {
op := &request.Operation{
Name: opGetBucketTagging,
@@ -2608,7 +2724,7 @@ func (c *S3) GetBucketTaggingRequest(input *GetBucketTaggingInput) (req *request
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation GetBucketTagging for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
func (c *S3) GetBucketTagging(input *GetBucketTaggingInput) (*GetBucketTaggingOutput, error) {
req, out := c.GetBucketTaggingRequest(input)
return out, req.Send()
@@ -2634,19 +2750,18 @@ const opGetBucketVersioning = "GetBucketVersioning"
// GetBucketVersioningRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketVersioning operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketVersioning for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketVersioning method directly
-// instead.
+// See GetBucketVersioning for more information on using the GetBucketVersioning
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketVersioningRequest method.
// req, resp := client.GetBucketVersioningRequest(params)
@@ -2656,7 +2771,7 @@ const opGetBucketVersioning = "GetBucketVersioning"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
func (c *S3) GetBucketVersioningRequest(input *GetBucketVersioningInput) (req *request.Request, output *GetBucketVersioningOutput) {
op := &request.Operation{
Name: opGetBucketVersioning,
@@ -2683,7 +2798,7 @@ func (c *S3) GetBucketVersioningRequest(input *GetBucketVersioningInput) (req *r
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation GetBucketVersioning for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
func (c *S3) GetBucketVersioning(input *GetBucketVersioningInput) (*GetBucketVersioningOutput, error) {
req, out := c.GetBucketVersioningRequest(input)
return out, req.Send()
@@ -2709,19 +2824,18 @@ const opGetBucketWebsite = "GetBucketWebsite"
// GetBucketWebsiteRequest generates a "aws/request.Request" representing the
// client's request for the GetBucketWebsite operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetBucketWebsite for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetBucketWebsite method directly
-// instead.
+// See GetBucketWebsite for more information on using the GetBucketWebsite
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetBucketWebsiteRequest method.
// req, resp := client.GetBucketWebsiteRequest(params)
@@ -2731,7 +2845,7 @@ const opGetBucketWebsite = "GetBucketWebsite"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
func (c *S3) GetBucketWebsiteRequest(input *GetBucketWebsiteInput) (req *request.Request, output *GetBucketWebsiteOutput) {
op := &request.Operation{
Name: opGetBucketWebsite,
@@ -2758,7 +2872,7 @@ func (c *S3) GetBucketWebsiteRequest(input *GetBucketWebsiteInput) (req *request
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation GetBucketWebsite for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
func (c *S3) GetBucketWebsite(input *GetBucketWebsiteInput) (*GetBucketWebsiteOutput, error) {
req, out := c.GetBucketWebsiteRequest(input)
return out, req.Send()
@@ -2784,19 +2898,18 @@ const opGetObject = "GetObject"
// GetObjectRequest generates a "aws/request.Request" representing the
// client's request for the GetObject operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetObject for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetObject method directly
-// instead.
+// See GetObject for more information on using the GetObject
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetObjectRequest method.
// req, resp := client.GetObjectRequest(params)
@@ -2806,7 +2919,7 @@ const opGetObject = "GetObject"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, output *GetObjectOutput) {
op := &request.Operation{
Name: opGetObject,
@@ -2838,7 +2951,7 @@ func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, outp
// * ErrCodeNoSuchKey "NoSuchKey"
// The specified key does not exist.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
func (c *S3) GetObject(input *GetObjectInput) (*GetObjectOutput, error) {
req, out := c.GetObjectRequest(input)
return out, req.Send()
@@ -2864,19 +2977,18 @@ const opGetObjectAcl = "GetObjectAcl"
// GetObjectAclRequest generates a "aws/request.Request" representing the
// client's request for the GetObjectAcl operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetObjectAcl for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetObjectAcl method directly
-// instead.
+// See GetObjectAcl for more information on using the GetObjectAcl
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetObjectAclRequest method.
// req, resp := client.GetObjectAclRequest(params)
@@ -2886,7 +2998,7 @@ const opGetObjectAcl = "GetObjectAcl"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
func (c *S3) GetObjectAclRequest(input *GetObjectAclInput) (req *request.Request, output *GetObjectAclOutput) {
op := &request.Operation{
Name: opGetObjectAcl,
@@ -2918,7 +3030,7 @@ func (c *S3) GetObjectAclRequest(input *GetObjectAclInput) (req *request.Request
// * ErrCodeNoSuchKey "NoSuchKey"
// The specified key does not exist.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
func (c *S3) GetObjectAcl(input *GetObjectAclInput) (*GetObjectAclOutput, error) {
req, out := c.GetObjectAclRequest(input)
return out, req.Send()
@@ -2944,19 +3056,18 @@ const opGetObjectTagging = "GetObjectTagging"
// GetObjectTaggingRequest generates a "aws/request.Request" representing the
// client's request for the GetObjectTagging operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetObjectTagging for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetObjectTagging method directly
-// instead.
+// See GetObjectTagging for more information on using the GetObjectTagging
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetObjectTaggingRequest method.
// req, resp := client.GetObjectTaggingRequest(params)
@@ -2966,7 +3077,7 @@ const opGetObjectTagging = "GetObjectTagging"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
func (c *S3) GetObjectTaggingRequest(input *GetObjectTaggingInput) (req *request.Request, output *GetObjectTaggingOutput) {
op := &request.Operation{
Name: opGetObjectTagging,
@@ -2993,7 +3104,7 @@ func (c *S3) GetObjectTaggingRequest(input *GetObjectTaggingInput) (req *request
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation GetObjectTagging for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
func (c *S3) GetObjectTagging(input *GetObjectTaggingInput) (*GetObjectTaggingOutput, error) {
req, out := c.GetObjectTaggingRequest(input)
return out, req.Send()
@@ -3019,19 +3130,18 @@ const opGetObjectTorrent = "GetObjectTorrent"
// GetObjectTorrentRequest generates a "aws/request.Request" representing the
// client's request for the GetObjectTorrent operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetObjectTorrent for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetObjectTorrent method directly
-// instead.
+// See GetObjectTorrent for more information on using the GetObjectTorrent
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetObjectTorrentRequest method.
// req, resp := client.GetObjectTorrentRequest(params)
@@ -3041,7 +3151,7 @@ const opGetObjectTorrent = "GetObjectTorrent"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *request.Request, output *GetObjectTorrentOutput) {
op := &request.Operation{
Name: opGetObjectTorrent,
@@ -3068,7 +3178,7 @@ func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *request
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation GetObjectTorrent for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
func (c *S3) GetObjectTorrent(input *GetObjectTorrentInput) (*GetObjectTorrentOutput, error) {
req, out := c.GetObjectTorrentRequest(input)
return out, req.Send()
@@ -3094,19 +3204,18 @@ const opHeadBucket = "HeadBucket"
// HeadBucketRequest generates a "aws/request.Request" representing the
// client's request for the HeadBucket operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See HeadBucket for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the HeadBucket method directly
-// instead.
+// See HeadBucket for more information on using the HeadBucket
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the HeadBucketRequest method.
// req, resp := client.HeadBucketRequest(params)
@@ -3116,7 +3225,7 @@ const opHeadBucket = "HeadBucket"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, output *HeadBucketOutput) {
op := &request.Operation{
Name: opHeadBucket,
@@ -3151,7 +3260,7 @@ func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, ou
// * ErrCodeNoSuchBucket "NoSuchBucket"
// The specified bucket does not exist.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
func (c *S3) HeadBucket(input *HeadBucketInput) (*HeadBucketOutput, error) {
req, out := c.HeadBucketRequest(input)
return out, req.Send()
@@ -3177,19 +3286,18 @@ const opHeadObject = "HeadObject"
// HeadObjectRequest generates a "aws/request.Request" representing the
// client's request for the HeadObject operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See HeadObject for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the HeadObject method directly
-// instead.
+// See HeadObject for more information on using the HeadObject
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the HeadObjectRequest method.
// req, resp := client.HeadObjectRequest(params)
@@ -3199,7 +3307,7 @@ const opHeadObject = "HeadObject"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, output *HeadObjectOutput) {
op := &request.Operation{
Name: opHeadObject,
@@ -3231,7 +3339,7 @@ func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, ou
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation HeadObject for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
func (c *S3) HeadObject(input *HeadObjectInput) (*HeadObjectOutput, error) {
req, out := c.HeadObjectRequest(input)
return out, req.Send()
@@ -3257,19 +3365,18 @@ const opListBucketAnalyticsConfigurations = "ListBucketAnalyticsConfigurations"
// ListBucketAnalyticsConfigurationsRequest generates a "aws/request.Request" representing the
// client's request for the ListBucketAnalyticsConfigurations operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListBucketAnalyticsConfigurations for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListBucketAnalyticsConfigurations method directly
-// instead.
+// See ListBucketAnalyticsConfigurations for more information on using the ListBucketAnalyticsConfigurations
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListBucketAnalyticsConfigurationsRequest method.
// req, resp := client.ListBucketAnalyticsConfigurationsRequest(params)
@@ -3279,7 +3386,7 @@ const opListBucketAnalyticsConfigurations = "ListBucketAnalyticsConfigurations"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
func (c *S3) ListBucketAnalyticsConfigurationsRequest(input *ListBucketAnalyticsConfigurationsInput) (req *request.Request, output *ListBucketAnalyticsConfigurationsOutput) {
op := &request.Operation{
Name: opListBucketAnalyticsConfigurations,
@@ -3306,7 +3413,7 @@ func (c *S3) ListBucketAnalyticsConfigurationsRequest(input *ListBucketAnalytics
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation ListBucketAnalyticsConfigurations for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
func (c *S3) ListBucketAnalyticsConfigurations(input *ListBucketAnalyticsConfigurationsInput) (*ListBucketAnalyticsConfigurationsOutput, error) {
req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
return out, req.Send()
@@ -3332,19 +3439,18 @@ const opListBucketInventoryConfigurations = "ListBucketInventoryConfigurations"
// ListBucketInventoryConfigurationsRequest generates a "aws/request.Request" representing the
// client's request for the ListBucketInventoryConfigurations operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListBucketInventoryConfigurations for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListBucketInventoryConfigurations method directly
-// instead.
+// See ListBucketInventoryConfigurations for more information on using the ListBucketInventoryConfigurations
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListBucketInventoryConfigurationsRequest method.
// req, resp := client.ListBucketInventoryConfigurationsRequest(params)
@@ -3354,7 +3460,7 @@ const opListBucketInventoryConfigurations = "ListBucketInventoryConfigurations"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
func (c *S3) ListBucketInventoryConfigurationsRequest(input *ListBucketInventoryConfigurationsInput) (req *request.Request, output *ListBucketInventoryConfigurationsOutput) {
op := &request.Operation{
Name: opListBucketInventoryConfigurations,
@@ -3381,7 +3487,7 @@ func (c *S3) ListBucketInventoryConfigurationsRequest(input *ListBucketInventory
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation ListBucketInventoryConfigurations for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
func (c *S3) ListBucketInventoryConfigurations(input *ListBucketInventoryConfigurationsInput) (*ListBucketInventoryConfigurationsOutput, error) {
req, out := c.ListBucketInventoryConfigurationsRequest(input)
return out, req.Send()
@@ -3407,19 +3513,18 @@ const opListBucketMetricsConfigurations = "ListBucketMetricsConfigurations"
// ListBucketMetricsConfigurationsRequest generates a "aws/request.Request" representing the
// client's request for the ListBucketMetricsConfigurations operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListBucketMetricsConfigurations for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListBucketMetricsConfigurations method directly
-// instead.
+// See ListBucketMetricsConfigurations for more information on using the ListBucketMetricsConfigurations
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListBucketMetricsConfigurationsRequest method.
// req, resp := client.ListBucketMetricsConfigurationsRequest(params)
@@ -3429,7 +3534,7 @@ const opListBucketMetricsConfigurations = "ListBucketMetricsConfigurations"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
func (c *S3) ListBucketMetricsConfigurationsRequest(input *ListBucketMetricsConfigurationsInput) (req *request.Request, output *ListBucketMetricsConfigurationsOutput) {
op := &request.Operation{
Name: opListBucketMetricsConfigurations,
@@ -3456,7 +3561,7 @@ func (c *S3) ListBucketMetricsConfigurationsRequest(input *ListBucketMetricsConf
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation ListBucketMetricsConfigurations for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
func (c *S3) ListBucketMetricsConfigurations(input *ListBucketMetricsConfigurationsInput) (*ListBucketMetricsConfigurationsOutput, error) {
req, out := c.ListBucketMetricsConfigurationsRequest(input)
return out, req.Send()
@@ -3482,19 +3587,18 @@ const opListBuckets = "ListBuckets"
// ListBucketsRequest generates a "aws/request.Request" representing the
// client's request for the ListBuckets operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListBuckets for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListBuckets method directly
-// instead.
+// See ListBuckets for more information on using the ListBuckets
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListBucketsRequest method.
// req, resp := client.ListBucketsRequest(params)
@@ -3504,7 +3608,7 @@ const opListBuckets = "ListBuckets"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
func (c *S3) ListBucketsRequest(input *ListBucketsInput) (req *request.Request, output *ListBucketsOutput) {
op := &request.Operation{
Name: opListBuckets,
@@ -3531,7 +3635,7 @@ func (c *S3) ListBucketsRequest(input *ListBucketsInput) (req *request.Request,
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation ListBuckets for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
func (c *S3) ListBuckets(input *ListBucketsInput) (*ListBucketsOutput, error) {
req, out := c.ListBucketsRequest(input)
return out, req.Send()
@@ -3557,19 +3661,18 @@ const opListMultipartUploads = "ListMultipartUploads"
// ListMultipartUploadsRequest generates a "aws/request.Request" representing the
// client's request for the ListMultipartUploads operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListMultipartUploads for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListMultipartUploads method directly
-// instead.
+// See ListMultipartUploads for more information on using the ListMultipartUploads
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListMultipartUploadsRequest method.
// req, resp := client.ListMultipartUploadsRequest(params)
@@ -3579,7 +3682,7 @@ const opListMultipartUploads = "ListMultipartUploads"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req *request.Request, output *ListMultipartUploadsOutput) {
op := &request.Operation{
Name: opListMultipartUploads,
@@ -3612,7 +3715,7 @@ func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation ListMultipartUploads for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
func (c *S3) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error) {
req, out := c.ListMultipartUploadsRequest(input)
return out, req.Send()
@@ -3688,19 +3791,18 @@ const opListObjectVersions = "ListObjectVersions"
// ListObjectVersionsRequest generates a "aws/request.Request" representing the
// client's request for the ListObjectVersions operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListObjectVersions for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListObjectVersions method directly
-// instead.
+// See ListObjectVersions for more information on using the ListObjectVersions
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListObjectVersionsRequest method.
// req, resp := client.ListObjectVersionsRequest(params)
@@ -3710,7 +3812,7 @@ const opListObjectVersions = "ListObjectVersions"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *request.Request, output *ListObjectVersionsOutput) {
op := &request.Operation{
Name: opListObjectVersions,
@@ -3743,7 +3845,7 @@ func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *req
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation ListObjectVersions for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
func (c *S3) ListObjectVersions(input *ListObjectVersionsInput) (*ListObjectVersionsOutput, error) {
req, out := c.ListObjectVersionsRequest(input)
return out, req.Send()
@@ -3819,19 +3921,18 @@ const opListObjects = "ListObjects"
// ListObjectsRequest generates a "aws/request.Request" representing the
// client's request for the ListObjects operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListObjects for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListObjects method directly
-// instead.
+// See ListObjects for more information on using the ListObjects
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListObjectsRequest method.
// req, resp := client.ListObjectsRequest(params)
@@ -3841,7 +3942,7 @@ const opListObjects = "ListObjects"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
func (c *S3) ListObjectsRequest(input *ListObjectsInput) (req *request.Request, output *ListObjectsOutput) {
op := &request.Operation{
Name: opListObjects,
@@ -3881,7 +3982,7 @@ func (c *S3) ListObjectsRequest(input *ListObjectsInput) (req *request.Request,
// * ErrCodeNoSuchBucket "NoSuchBucket"
// The specified bucket does not exist.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
func (c *S3) ListObjects(input *ListObjectsInput) (*ListObjectsOutput, error) {
req, out := c.ListObjectsRequest(input)
return out, req.Send()
@@ -3957,19 +4058,18 @@ const opListObjectsV2 = "ListObjectsV2"
// ListObjectsV2Request generates a "aws/request.Request" representing the
// client's request for the ListObjectsV2 operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListObjectsV2 for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListObjectsV2 method directly
-// instead.
+// See ListObjectsV2 for more information on using the ListObjectsV2
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListObjectsV2Request method.
// req, resp := client.ListObjectsV2Request(params)
@@ -3979,7 +4079,7 @@ const opListObjectsV2 = "ListObjectsV2"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
func (c *S3) ListObjectsV2Request(input *ListObjectsV2Input) (req *request.Request, output *ListObjectsV2Output) {
op := &request.Operation{
Name: opListObjectsV2,
@@ -4020,7 +4120,7 @@ func (c *S3) ListObjectsV2Request(input *ListObjectsV2Input) (req *request.Reque
// * ErrCodeNoSuchBucket "NoSuchBucket"
// The specified bucket does not exist.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
func (c *S3) ListObjectsV2(input *ListObjectsV2Input) (*ListObjectsV2Output, error) {
req, out := c.ListObjectsV2Request(input)
return out, req.Send()
@@ -4096,19 +4196,18 @@ const opListParts = "ListParts"
// ListPartsRequest generates a "aws/request.Request" representing the
// client's request for the ListParts operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See ListParts for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the ListParts method directly
-// instead.
+// See ListParts for more information on using the ListParts
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the ListPartsRequest method.
// req, resp := client.ListPartsRequest(params)
@@ -4118,7 +4217,7 @@ const opListParts = "ListParts"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
func (c *S3) ListPartsRequest(input *ListPartsInput) (req *request.Request, output *ListPartsOutput) {
op := &request.Operation{
Name: opListParts,
@@ -4151,7 +4250,7 @@ func (c *S3) ListPartsRequest(input *ListPartsInput) (req *request.Request, outp
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation ListParts for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
func (c *S3) ListParts(input *ListPartsInput) (*ListPartsOutput, error) {
req, out := c.ListPartsRequest(input)
return out, req.Send()
@@ -4227,19 +4326,18 @@ const opPutBucketAccelerateConfiguration = "PutBucketAccelerateConfiguration"
// PutBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketAccelerateConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketAccelerateConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketAccelerateConfiguration method directly
-// instead.
+// See PutBucketAccelerateConfiguration for more information on using the PutBucketAccelerateConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketAccelerateConfigurationRequest method.
// req, resp := client.PutBucketAccelerateConfigurationRequest(params)
@@ -4249,7 +4347,7 @@ const opPutBucketAccelerateConfiguration = "PutBucketAccelerateConfiguration"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
func (c *S3) PutBucketAccelerateConfigurationRequest(input *PutBucketAccelerateConfigurationInput) (req *request.Request, output *PutBucketAccelerateConfigurationOutput) {
op := &request.Operation{
Name: opPutBucketAccelerateConfiguration,
@@ -4278,7 +4376,7 @@ func (c *S3) PutBucketAccelerateConfigurationRequest(input *PutBucketAccelerateC
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation PutBucketAccelerateConfiguration for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
func (c *S3) PutBucketAccelerateConfiguration(input *PutBucketAccelerateConfigurationInput) (*PutBucketAccelerateConfigurationOutput, error) {
req, out := c.PutBucketAccelerateConfigurationRequest(input)
return out, req.Send()
@@ -4304,19 +4402,18 @@ const opPutBucketAcl = "PutBucketAcl"
// PutBucketAclRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketAcl operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketAcl for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketAcl method directly
-// instead.
+// See PutBucketAcl for more information on using the PutBucketAcl
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketAclRequest method.
// req, resp := client.PutBucketAclRequest(params)
@@ -4326,7 +4423,7 @@ const opPutBucketAcl = "PutBucketAcl"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
func (c *S3) PutBucketAclRequest(input *PutBucketAclInput) (req *request.Request, output *PutBucketAclOutput) {
op := &request.Operation{
Name: opPutBucketAcl,
@@ -4355,7 +4452,7 @@ func (c *S3) PutBucketAclRequest(input *PutBucketAclInput) (req *request.Request
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation PutBucketAcl for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
func (c *S3) PutBucketAcl(input *PutBucketAclInput) (*PutBucketAclOutput, error) {
req, out := c.PutBucketAclRequest(input)
return out, req.Send()
@@ -4381,19 +4478,18 @@ const opPutBucketAnalyticsConfiguration = "PutBucketAnalyticsConfiguration"
// PutBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketAnalyticsConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketAnalyticsConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketAnalyticsConfiguration method directly
-// instead.
+// See PutBucketAnalyticsConfiguration for more information on using the PutBucketAnalyticsConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketAnalyticsConfigurationRequest method.
// req, resp := client.PutBucketAnalyticsConfigurationRequest(params)
@@ -4403,7 +4499,7 @@ const opPutBucketAnalyticsConfiguration = "PutBucketAnalyticsConfiguration"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
func (c *S3) PutBucketAnalyticsConfigurationRequest(input *PutBucketAnalyticsConfigurationInput) (req *request.Request, output *PutBucketAnalyticsConfigurationOutput) {
op := &request.Operation{
Name: opPutBucketAnalyticsConfiguration,
@@ -4433,7 +4529,7 @@ func (c *S3) PutBucketAnalyticsConfigurationRequest(input *PutBucketAnalyticsCon
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation PutBucketAnalyticsConfiguration for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
func (c *S3) PutBucketAnalyticsConfiguration(input *PutBucketAnalyticsConfigurationInput) (*PutBucketAnalyticsConfigurationOutput, error) {
req, out := c.PutBucketAnalyticsConfigurationRequest(input)
return out, req.Send()
@@ -4459,19 +4555,18 @@ const opPutBucketCors = "PutBucketCors"
// PutBucketCorsRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketCors operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketCors for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketCors method directly
-// instead.
+// See PutBucketCors for more information on using the PutBucketCors
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketCorsRequest method.
// req, resp := client.PutBucketCorsRequest(params)
@@ -4481,7 +4576,7 @@ const opPutBucketCors = "PutBucketCors"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
func (c *S3) PutBucketCorsRequest(input *PutBucketCorsInput) (req *request.Request, output *PutBucketCorsOutput) {
op := &request.Operation{
Name: opPutBucketCors,
@@ -4510,7 +4605,7 @@ func (c *S3) PutBucketCorsRequest(input *PutBucketCorsInput) (req *request.Reque
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation PutBucketCors for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
func (c *S3) PutBucketCors(input *PutBucketCorsInput) (*PutBucketCorsOutput, error) {
req, out := c.PutBucketCorsRequest(input)
return out, req.Send()
@@ -4532,23 +4627,99 @@ func (c *S3) PutBucketCorsWithContext(ctx aws.Context, input *PutBucketCorsInput
return out, req.Send()
}
+const opPutBucketEncryption = "PutBucketEncryption"
+
+// PutBucketEncryptionRequest generates a "aws/request.Request" representing the
+// client's request for the PutBucketEncryption operation. The "output" return
+// value will be populated with the request's response once the request complets
+// successfuly.
+//
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
+//
+// See PutBucketEncryption for more information on using the PutBucketEncryption
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
+//
+//
+// // Example sending a request using the PutBucketEncryptionRequest method.
+// req, resp := client.PutBucketEncryptionRequest(params)
+//
+// err := req.Send()
+// if err == nil { // resp is now filled
+// fmt.Println(resp)
+// }
+//
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryption
+func (c *S3) PutBucketEncryptionRequest(input *PutBucketEncryptionInput) (req *request.Request, output *PutBucketEncryptionOutput) {
+ op := &request.Operation{
+ Name: opPutBucketEncryption,
+ HTTPMethod: "PUT",
+ HTTPPath: "/{Bucket}?encryption",
+ }
+
+ if input == nil {
+ input = &PutBucketEncryptionInput{}
+ }
+
+ output = &PutBucketEncryptionOutput{}
+ req = c.newRequest(op, input, output)
+ req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
+ req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
+ return
+}
+
+// PutBucketEncryption API operation for Amazon Simple Storage Service.
+//
+// Creates a new server-side encryption configuration (or replaces an existing
+// one, if present).
+//
+// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
+// with awserr.Error's Code and Message methods to get detailed information about
+// the error.
+//
+// See the AWS API reference guide for Amazon Simple Storage Service's
+// API operation PutBucketEncryption for usage and error information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryption
+func (c *S3) PutBucketEncryption(input *PutBucketEncryptionInput) (*PutBucketEncryptionOutput, error) {
+ req, out := c.PutBucketEncryptionRequest(input)
+ return out, req.Send()
+}
+
+// PutBucketEncryptionWithContext is the same as PutBucketEncryption with the addition of
+// the ability to pass a context and additional request options.
+//
+// See PutBucketEncryption for details on how to use this API operation.
+//
+// The context must be non-nil and will be used for request cancellation. If
+// the context is nil a panic will occur. In the future the SDK may create
+// sub-contexts for http.Requests. See https://golang.org/pkg/context/
+// for more information on using Contexts.
+func (c *S3) PutBucketEncryptionWithContext(ctx aws.Context, input *PutBucketEncryptionInput, opts ...request.Option) (*PutBucketEncryptionOutput, error) {
+ req, out := c.PutBucketEncryptionRequest(input)
+ req.SetContext(ctx)
+ req.ApplyOptions(opts...)
+ return out, req.Send()
+}
+
const opPutBucketInventoryConfiguration = "PutBucketInventoryConfiguration"
// PutBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketInventoryConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketInventoryConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketInventoryConfiguration method directly
-// instead.
+// See PutBucketInventoryConfiguration for more information on using the PutBucketInventoryConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketInventoryConfigurationRequest method.
// req, resp := client.PutBucketInventoryConfigurationRequest(params)
@@ -4558,7 +4729,7 @@ const opPutBucketInventoryConfiguration = "PutBucketInventoryConfiguration"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
func (c *S3) PutBucketInventoryConfigurationRequest(input *PutBucketInventoryConfigurationInput) (req *request.Request, output *PutBucketInventoryConfigurationOutput) {
op := &request.Operation{
Name: opPutBucketInventoryConfiguration,
@@ -4588,7 +4759,7 @@ func (c *S3) PutBucketInventoryConfigurationRequest(input *PutBucketInventoryCon
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation PutBucketInventoryConfiguration for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
func (c *S3) PutBucketInventoryConfiguration(input *PutBucketInventoryConfigurationInput) (*PutBucketInventoryConfigurationOutput, error) {
req, out := c.PutBucketInventoryConfigurationRequest(input)
return out, req.Send()
@@ -4614,19 +4785,18 @@ const opPutBucketLifecycle = "PutBucketLifecycle"
// PutBucketLifecycleRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketLifecycle operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketLifecycle for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketLifecycle method directly
-// instead.
+// See PutBucketLifecycle for more information on using the PutBucketLifecycle
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketLifecycleRequest method.
// req, resp := client.PutBucketLifecycleRequest(params)
@@ -4636,7 +4806,7 @@ const opPutBucketLifecycle = "PutBucketLifecycle"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *request.Request, output *PutBucketLifecycleOutput) {
if c.Client.Config.Logger != nil {
c.Client.Config.Logger.Log("This operation, PutBucketLifecycle, has been deprecated")
@@ -4668,7 +4838,7 @@ func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *req
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation PutBucketLifecycle for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
func (c *S3) PutBucketLifecycle(input *PutBucketLifecycleInput) (*PutBucketLifecycleOutput, error) {
req, out := c.PutBucketLifecycleRequest(input)
return out, req.Send()
@@ -4694,19 +4864,18 @@ const opPutBucketLifecycleConfiguration = "PutBucketLifecycleConfiguration"
// PutBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketLifecycleConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketLifecycleConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketLifecycleConfiguration method directly
-// instead.
+// See PutBucketLifecycleConfiguration for more information on using the PutBucketLifecycleConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketLifecycleConfigurationRequest method.
// req, resp := client.PutBucketLifecycleConfigurationRequest(params)
@@ -4716,7 +4885,7 @@ const opPutBucketLifecycleConfiguration = "PutBucketLifecycleConfiguration"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleConfigurationInput) (req *request.Request, output *PutBucketLifecycleConfigurationOutput) {
op := &request.Operation{
Name: opPutBucketLifecycleConfiguration,
@@ -4746,7 +4915,7 @@ func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleCon
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation PutBucketLifecycleConfiguration for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
func (c *S3) PutBucketLifecycleConfiguration(input *PutBucketLifecycleConfigurationInput) (*PutBucketLifecycleConfigurationOutput, error) {
req, out := c.PutBucketLifecycleConfigurationRequest(input)
return out, req.Send()
@@ -4772,19 +4941,18 @@ const opPutBucketLogging = "PutBucketLogging"
// PutBucketLoggingRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketLogging operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketLogging for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketLogging method directly
-// instead.
+// See PutBucketLogging for more information on using the PutBucketLogging
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketLoggingRequest method.
// req, resp := client.PutBucketLoggingRequest(params)
@@ -4794,7 +4962,7 @@ const opPutBucketLogging = "PutBucketLogging"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *request.Request, output *PutBucketLoggingOutput) {
op := &request.Operation{
Name: opPutBucketLogging,
@@ -4825,7 +4993,7 @@ func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *request
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation PutBucketLogging for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
func (c *S3) PutBucketLogging(input *PutBucketLoggingInput) (*PutBucketLoggingOutput, error) {
req, out := c.PutBucketLoggingRequest(input)
return out, req.Send()
@@ -4851,19 +5019,18 @@ const opPutBucketMetricsConfiguration = "PutBucketMetricsConfiguration"
// PutBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketMetricsConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketMetricsConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketMetricsConfiguration method directly
-// instead.
+// See PutBucketMetricsConfiguration for more information on using the PutBucketMetricsConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketMetricsConfigurationRequest method.
// req, resp := client.PutBucketMetricsConfigurationRequest(params)
@@ -4873,7 +5040,7 @@ const opPutBucketMetricsConfiguration = "PutBucketMetricsConfiguration"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
func (c *S3) PutBucketMetricsConfigurationRequest(input *PutBucketMetricsConfigurationInput) (req *request.Request, output *PutBucketMetricsConfigurationOutput) {
op := &request.Operation{
Name: opPutBucketMetricsConfiguration,
@@ -4903,7 +5070,7 @@ func (c *S3) PutBucketMetricsConfigurationRequest(input *PutBucketMetricsConfigu
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation PutBucketMetricsConfiguration for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
func (c *S3) PutBucketMetricsConfiguration(input *PutBucketMetricsConfigurationInput) (*PutBucketMetricsConfigurationOutput, error) {
req, out := c.PutBucketMetricsConfigurationRequest(input)
return out, req.Send()
@@ -4929,19 +5096,18 @@ const opPutBucketNotification = "PutBucketNotification"
// PutBucketNotificationRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketNotification operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketNotification for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketNotification method directly
-// instead.
+// See PutBucketNotification for more information on using the PutBucketNotification
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketNotificationRequest method.
// req, resp := client.PutBucketNotificationRequest(params)
@@ -4951,7 +5117,7 @@ const opPutBucketNotification = "PutBucketNotification"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (req *request.Request, output *PutBucketNotificationOutput) {
if c.Client.Config.Logger != nil {
c.Client.Config.Logger.Log("This operation, PutBucketNotification, has been deprecated")
@@ -4983,7 +5149,7 @@ func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (re
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation PutBucketNotification for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
func (c *S3) PutBucketNotification(input *PutBucketNotificationInput) (*PutBucketNotificationOutput, error) {
req, out := c.PutBucketNotificationRequest(input)
return out, req.Send()
@@ -5009,19 +5175,18 @@ const opPutBucketNotificationConfiguration = "PutBucketNotificationConfiguration
// PutBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketNotificationConfiguration operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketNotificationConfiguration for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketNotificationConfiguration method directly
-// instead.
+// See PutBucketNotificationConfiguration for more information on using the PutBucketNotificationConfiguration
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketNotificationConfigurationRequest method.
// req, resp := client.PutBucketNotificationConfigurationRequest(params)
@@ -5031,7 +5196,7 @@ const opPutBucketNotificationConfiguration = "PutBucketNotificationConfiguration
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
func (c *S3) PutBucketNotificationConfigurationRequest(input *PutBucketNotificationConfigurationInput) (req *request.Request, output *PutBucketNotificationConfigurationOutput) {
op := &request.Operation{
Name: opPutBucketNotificationConfiguration,
@@ -5060,7 +5225,7 @@ func (c *S3) PutBucketNotificationConfigurationRequest(input *PutBucketNotificat
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation PutBucketNotificationConfiguration for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
func (c *S3) PutBucketNotificationConfiguration(input *PutBucketNotificationConfigurationInput) (*PutBucketNotificationConfigurationOutput, error) {
req, out := c.PutBucketNotificationConfigurationRequest(input)
return out, req.Send()
@@ -5086,19 +5251,18 @@ const opPutBucketPolicy = "PutBucketPolicy"
// PutBucketPolicyRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketPolicy operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketPolicy for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketPolicy method directly
-// instead.
+// See PutBucketPolicy for more information on using the PutBucketPolicy
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketPolicyRequest method.
// req, resp := client.PutBucketPolicyRequest(params)
@@ -5108,7 +5272,7 @@ const opPutBucketPolicy = "PutBucketPolicy"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
func (c *S3) PutBucketPolicyRequest(input *PutBucketPolicyInput) (req *request.Request, output *PutBucketPolicyOutput) {
op := &request.Operation{
Name: opPutBucketPolicy,
@@ -5138,7 +5302,7 @@ func (c *S3) PutBucketPolicyRequest(input *PutBucketPolicyInput) (req *request.R
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation PutBucketPolicy for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
func (c *S3) PutBucketPolicy(input *PutBucketPolicyInput) (*PutBucketPolicyOutput, error) {
req, out := c.PutBucketPolicyRequest(input)
return out, req.Send()
@@ -5164,19 +5328,18 @@ const opPutBucketReplication = "PutBucketReplication"
// PutBucketReplicationRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketReplication operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketReplication for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketReplication method directly
-// instead.
+// See PutBucketReplication for more information on using the PutBucketReplication
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketReplicationRequest method.
// req, resp := client.PutBucketReplicationRequest(params)
@@ -5186,7 +5349,7 @@ const opPutBucketReplication = "PutBucketReplication"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
func (c *S3) PutBucketReplicationRequest(input *PutBucketReplicationInput) (req *request.Request, output *PutBucketReplicationOutput) {
op := &request.Operation{
Name: opPutBucketReplication,
@@ -5216,7 +5379,7 @@ func (c *S3) PutBucketReplicationRequest(input *PutBucketReplicationInput) (req
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation PutBucketReplication for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
func (c *S3) PutBucketReplication(input *PutBucketReplicationInput) (*PutBucketReplicationOutput, error) {
req, out := c.PutBucketReplicationRequest(input)
return out, req.Send()
@@ -5242,19 +5405,18 @@ const opPutBucketRequestPayment = "PutBucketRequestPayment"
// PutBucketRequestPaymentRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketRequestPayment operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketRequestPayment for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketRequestPayment method directly
-// instead.
+// See PutBucketRequestPayment for more information on using the PutBucketRequestPayment
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketRequestPaymentRequest method.
// req, resp := client.PutBucketRequestPaymentRequest(params)
@@ -5264,7 +5426,7 @@ const opPutBucketRequestPayment = "PutBucketRequestPayment"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
func (c *S3) PutBucketRequestPaymentRequest(input *PutBucketRequestPaymentInput) (req *request.Request, output *PutBucketRequestPaymentOutput) {
op := &request.Operation{
Name: opPutBucketRequestPayment,
@@ -5297,7 +5459,7 @@ func (c *S3) PutBucketRequestPaymentRequest(input *PutBucketRequestPaymentInput)
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation PutBucketRequestPayment for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
func (c *S3) PutBucketRequestPayment(input *PutBucketRequestPaymentInput) (*PutBucketRequestPaymentOutput, error) {
req, out := c.PutBucketRequestPaymentRequest(input)
return out, req.Send()
@@ -5323,19 +5485,18 @@ const opPutBucketTagging = "PutBucketTagging"
// PutBucketTaggingRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketTagging operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketTagging for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketTagging method directly
-// instead.
+// See PutBucketTagging for more information on using the PutBucketTagging
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketTaggingRequest method.
// req, resp := client.PutBucketTaggingRequest(params)
@@ -5345,7 +5506,7 @@ const opPutBucketTagging = "PutBucketTagging"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
func (c *S3) PutBucketTaggingRequest(input *PutBucketTaggingInput) (req *request.Request, output *PutBucketTaggingOutput) {
op := &request.Operation{
Name: opPutBucketTagging,
@@ -5374,7 +5535,7 @@ func (c *S3) PutBucketTaggingRequest(input *PutBucketTaggingInput) (req *request
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation PutBucketTagging for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
func (c *S3) PutBucketTagging(input *PutBucketTaggingInput) (*PutBucketTaggingOutput, error) {
req, out := c.PutBucketTaggingRequest(input)
return out, req.Send()
@@ -5400,19 +5561,18 @@ const opPutBucketVersioning = "PutBucketVersioning"
// PutBucketVersioningRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketVersioning operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketVersioning for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketVersioning method directly
-// instead.
+// See PutBucketVersioning for more information on using the PutBucketVersioning
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketVersioningRequest method.
// req, resp := client.PutBucketVersioningRequest(params)
@@ -5422,7 +5582,7 @@ const opPutBucketVersioning = "PutBucketVersioning"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
func (c *S3) PutBucketVersioningRequest(input *PutBucketVersioningInput) (req *request.Request, output *PutBucketVersioningOutput) {
op := &request.Operation{
Name: opPutBucketVersioning,
@@ -5452,7 +5612,7 @@ func (c *S3) PutBucketVersioningRequest(input *PutBucketVersioningInput) (req *r
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation PutBucketVersioning for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
func (c *S3) PutBucketVersioning(input *PutBucketVersioningInput) (*PutBucketVersioningOutput, error) {
req, out := c.PutBucketVersioningRequest(input)
return out, req.Send()
@@ -5478,19 +5638,18 @@ const opPutBucketWebsite = "PutBucketWebsite"
// PutBucketWebsiteRequest generates a "aws/request.Request" representing the
// client's request for the PutBucketWebsite operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutBucketWebsite for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutBucketWebsite method directly
-// instead.
+// See PutBucketWebsite for more information on using the PutBucketWebsite
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutBucketWebsiteRequest method.
// req, resp := client.PutBucketWebsiteRequest(params)
@@ -5500,7 +5659,7 @@ const opPutBucketWebsite = "PutBucketWebsite"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
func (c *S3) PutBucketWebsiteRequest(input *PutBucketWebsiteInput) (req *request.Request, output *PutBucketWebsiteOutput) {
op := &request.Operation{
Name: opPutBucketWebsite,
@@ -5529,7 +5688,7 @@ func (c *S3) PutBucketWebsiteRequest(input *PutBucketWebsiteInput) (req *request
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation PutBucketWebsite for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
func (c *S3) PutBucketWebsite(input *PutBucketWebsiteInput) (*PutBucketWebsiteOutput, error) {
req, out := c.PutBucketWebsiteRequest(input)
return out, req.Send()
@@ -5555,19 +5714,18 @@ const opPutObject = "PutObject"
// PutObjectRequest generates a "aws/request.Request" representing the
// client's request for the PutObject operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutObject for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutObject method directly
-// instead.
+// See PutObject for more information on using the PutObject
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutObjectRequest method.
// req, resp := client.PutObjectRequest(params)
@@ -5577,7 +5735,7 @@ const opPutObject = "PutObject"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, output *PutObjectOutput) {
op := &request.Operation{
Name: opPutObject,
@@ -5604,7 +5762,7 @@ func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, outp
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation PutObject for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
func (c *S3) PutObject(input *PutObjectInput) (*PutObjectOutput, error) {
req, out := c.PutObjectRequest(input)
return out, req.Send()
@@ -5630,19 +5788,18 @@ const opPutObjectAcl = "PutObjectAcl"
// PutObjectAclRequest generates a "aws/request.Request" representing the
// client's request for the PutObjectAcl operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutObjectAcl for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutObjectAcl method directly
-// instead.
+// See PutObjectAcl for more information on using the PutObjectAcl
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutObjectAclRequest method.
// req, resp := client.PutObjectAclRequest(params)
@@ -5652,7 +5809,7 @@ const opPutObjectAcl = "PutObjectAcl"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
func (c *S3) PutObjectAclRequest(input *PutObjectAclInput) (req *request.Request, output *PutObjectAclOutput) {
op := &request.Operation{
Name: opPutObjectAcl,
@@ -5685,7 +5842,7 @@ func (c *S3) PutObjectAclRequest(input *PutObjectAclInput) (req *request.Request
// * ErrCodeNoSuchKey "NoSuchKey"
// The specified key does not exist.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
func (c *S3) PutObjectAcl(input *PutObjectAclInput) (*PutObjectAclOutput, error) {
req, out := c.PutObjectAclRequest(input)
return out, req.Send()
@@ -5711,19 +5868,18 @@ const opPutObjectTagging = "PutObjectTagging"
// PutObjectTaggingRequest generates a "aws/request.Request" representing the
// client's request for the PutObjectTagging operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See PutObjectTagging for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the PutObjectTagging method directly
-// instead.
+// See PutObjectTagging for more information on using the PutObjectTagging
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the PutObjectTaggingRequest method.
// req, resp := client.PutObjectTaggingRequest(params)
@@ -5733,7 +5889,7 @@ const opPutObjectTagging = "PutObjectTagging"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
func (c *S3) PutObjectTaggingRequest(input *PutObjectTaggingInput) (req *request.Request, output *PutObjectTaggingOutput) {
op := &request.Operation{
Name: opPutObjectTagging,
@@ -5760,7 +5916,7 @@ func (c *S3) PutObjectTaggingRequest(input *PutObjectTaggingInput) (req *request
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation PutObjectTagging for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
func (c *S3) PutObjectTagging(input *PutObjectTaggingInput) (*PutObjectTaggingOutput, error) {
req, out := c.PutObjectTaggingRequest(input)
return out, req.Send()
@@ -5786,19 +5942,18 @@ const opRestoreObject = "RestoreObject"
// RestoreObjectRequest generates a "aws/request.Request" representing the
// client's request for the RestoreObject operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See RestoreObject for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the RestoreObject method directly
-// instead.
+// See RestoreObject for more information on using the RestoreObject
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the RestoreObjectRequest method.
// req, resp := client.RestoreObjectRequest(params)
@@ -5808,7 +5963,7 @@ const opRestoreObject = "RestoreObject"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Request, output *RestoreObjectOutput) {
op := &request.Operation{
Name: opRestoreObject,
@@ -5840,7 +5995,7 @@ func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Reque
// * ErrCodeObjectAlreadyInActiveTierError "ObjectAlreadyInActiveTierError"
// This operation is not allowed against this storage tier
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
func (c *S3) RestoreObject(input *RestoreObjectInput) (*RestoreObjectOutput, error) {
req, out := c.RestoreObjectRequest(input)
return out, req.Send()
@@ -5866,19 +6021,18 @@ const opUploadPart = "UploadPart"
// UploadPartRequest generates a "aws/request.Request" representing the
// client's request for the UploadPart operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See UploadPart for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the UploadPart method directly
-// instead.
+// See UploadPart for more information on using the UploadPart
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the UploadPartRequest method.
// req, resp := client.UploadPartRequest(params)
@@ -5888,7 +6042,7 @@ const opUploadPart = "UploadPart"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, output *UploadPartOutput) {
op := &request.Operation{
Name: opUploadPart,
@@ -5921,7 +6075,7 @@ func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, ou
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation UploadPart for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
func (c *S3) UploadPart(input *UploadPartInput) (*UploadPartOutput, error) {
req, out := c.UploadPartRequest(input)
return out, req.Send()
@@ -5947,19 +6101,18 @@ const opUploadPartCopy = "UploadPartCopy"
// UploadPartCopyRequest generates a "aws/request.Request" representing the
// client's request for the UploadPartCopy operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See UploadPartCopy for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the UploadPartCopy method directly
-// instead.
+// See UploadPartCopy for more information on using the UploadPartCopy
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the UploadPartCopyRequest method.
// req, resp := client.UploadPartCopyRequest(params)
@@ -5969,7 +6122,7 @@ const opUploadPartCopy = "UploadPartCopy"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *request.Request, output *UploadPartCopyOutput) {
op := &request.Operation{
Name: opUploadPartCopy,
@@ -5996,7 +6149,7 @@ func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *request.Req
//
// See the AWS API reference guide for Amazon Simple Storage Service's
// API operation UploadPartCopy for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
func (c *S3) UploadPartCopy(input *UploadPartCopyInput) (*UploadPartCopyOutput, error) {
req, out := c.UploadPartCopyRequest(input)
return out, req.Send()
@@ -6020,7 +6173,7 @@ func (c *S3) UploadPartCopyWithContext(ctx aws.Context, input *UploadPartCopyInp
// Specifies the days since the initiation of an Incomplete Multipart Upload
// that Lifecycle will wait before permanently removing all parts of the upload.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortIncompleteMultipartUpload
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortIncompleteMultipartUpload
type AbortIncompleteMultipartUpload struct {
_ struct{} `type:"structure"`
@@ -6045,7 +6198,7 @@ func (s *AbortIncompleteMultipartUpload) SetDaysAfterInitiation(v int64) *AbortI
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUploadRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUploadRequest
type AbortMultipartUploadInput struct {
_ struct{} `type:"structure"`
@@ -6128,7 +6281,7 @@ func (s *AbortMultipartUploadInput) SetUploadId(v string) *AbortMultipartUploadI
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUploadOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUploadOutput
type AbortMultipartUploadOutput struct {
_ struct{} `type:"structure"`
@@ -6153,7 +6306,7 @@ func (s *AbortMultipartUploadOutput) SetRequestCharged(v string) *AbortMultipart
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AccelerateConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AccelerateConfiguration
type AccelerateConfiguration struct {
_ struct{} `type:"structure"`
@@ -6177,7 +6330,7 @@ func (s *AccelerateConfiguration) SetStatus(v string) *AccelerateConfiguration {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AccessControlPolicy
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AccessControlPolicy
type AccessControlPolicy struct {
_ struct{} `type:"structure"`
@@ -6229,7 +6382,47 @@ func (s *AccessControlPolicy) SetOwner(v *Owner) *AccessControlPolicy {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsAndOperator
+// Container for information regarding the access control for replicas.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AccessControlTranslation
+type AccessControlTranslation struct {
+ _ struct{} `type:"structure"`
+
+ // The override value for the owner of the replica object.
+ //
+ // Owner is a required field
+ Owner *string `type:"string" required:"true" enum:"OwnerOverride"`
+}
+
+// String returns the string representation
+func (s AccessControlTranslation) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AccessControlTranslation) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *AccessControlTranslation) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "AccessControlTranslation"}
+ if s.Owner == nil {
+ invalidParams.Add(request.NewErrParamRequired("Owner"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetOwner sets the Owner field's value.
+func (s *AccessControlTranslation) SetOwner(v string) *AccessControlTranslation {
+ s.Owner = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsAndOperator
type AnalyticsAndOperator struct {
_ struct{} `type:"structure"`
@@ -6282,7 +6475,7 @@ func (s *AnalyticsAndOperator) SetTags(v []*Tag) *AnalyticsAndOperator {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsConfiguration
type AnalyticsConfiguration struct {
_ struct{} `type:"structure"`
@@ -6357,7 +6550,7 @@ func (s *AnalyticsConfiguration) SetStorageClassAnalysis(v *StorageClassAnalysis
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsExportDestination
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsExportDestination
type AnalyticsExportDestination struct {
_ struct{} `type:"structure"`
@@ -6401,7 +6594,7 @@ func (s *AnalyticsExportDestination) SetS3BucketDestination(v *AnalyticsS3Bucket
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsFilter
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsFilter
type AnalyticsFilter struct {
_ struct{} `type:"structure"`
@@ -6464,7 +6657,7 @@ func (s *AnalyticsFilter) SetTag(v *Tag) *AnalyticsFilter {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsS3BucketDestination
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsS3BucketDestination
type AnalyticsS3BucketDestination struct {
_ struct{} `type:"structure"`
@@ -6544,7 +6737,7 @@ func (s *AnalyticsS3BucketDestination) SetPrefix(v string) *AnalyticsS3BucketDes
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Bucket
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Bucket
type Bucket struct {
_ struct{} `type:"structure"`
@@ -6577,7 +6770,7 @@ func (s *Bucket) SetName(v string) *Bucket {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/BucketLifecycleConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/BucketLifecycleConfiguration
type BucketLifecycleConfiguration struct {
_ struct{} `type:"structure"`
@@ -6624,7 +6817,7 @@ func (s *BucketLifecycleConfiguration) SetRules(v []*LifecycleRule) *BucketLifec
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/BucketLoggingStatus
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/BucketLoggingStatus
type BucketLoggingStatus struct {
_ struct{} `type:"structure"`
@@ -6662,7 +6855,7 @@ func (s *BucketLoggingStatus) SetLoggingEnabled(v *LoggingEnabled) *BucketLoggin
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CORSConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CORSConfiguration
type CORSConfiguration struct {
_ struct{} `type:"structure"`
@@ -6709,7 +6902,7 @@ func (s *CORSConfiguration) SetCORSRules(v []*CORSRule) *CORSConfiguration {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CORSRule
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CORSRule
type CORSRule struct {
_ struct{} `type:"structure"`
@@ -6793,7 +6986,141 @@ func (s *CORSRule) SetMaxAgeSeconds(v int64) *CORSRule {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CloudFunctionConfiguration
+// Describes how a CSV-formatted input object is formatted.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CSVInput
+type CSVInput struct {
+ _ struct{} `type:"structure"`
+
+ // Single character used to indicate a row should be ignored when present at
+ // the start of a row.
+ Comments *string `type:"string"`
+
+ // Value used to separate individual fields in a record.
+ FieldDelimiter *string `type:"string"`
+
+ // Describes the first line of input. Valid values: None, Ignore, Use.
+ FileHeaderInfo *string `type:"string" enum:"FileHeaderInfo"`
+
+ // Value used for escaping where the field delimiter is part of the value.
+ QuoteCharacter *string `type:"string"`
+
+ // Single character used for escaping the quote character inside an already
+ // escaped value.
+ QuoteEscapeCharacter *string `type:"string"`
+
+ // Value used to separate individual records.
+ RecordDelimiter *string `type:"string"`
+}
+
+// String returns the string representation
+func (s CSVInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CSVInput) GoString() string {
+ return s.String()
+}
+
+// SetComments sets the Comments field's value.
+func (s *CSVInput) SetComments(v string) *CSVInput {
+ s.Comments = &v
+ return s
+}
+
+// SetFieldDelimiter sets the FieldDelimiter field's value.
+func (s *CSVInput) SetFieldDelimiter(v string) *CSVInput {
+ s.FieldDelimiter = &v
+ return s
+}
+
+// SetFileHeaderInfo sets the FileHeaderInfo field's value.
+func (s *CSVInput) SetFileHeaderInfo(v string) *CSVInput {
+ s.FileHeaderInfo = &v
+ return s
+}
+
+// SetQuoteCharacter sets the QuoteCharacter field's value.
+func (s *CSVInput) SetQuoteCharacter(v string) *CSVInput {
+ s.QuoteCharacter = &v
+ return s
+}
+
+// SetQuoteEscapeCharacter sets the QuoteEscapeCharacter field's value.
+func (s *CSVInput) SetQuoteEscapeCharacter(v string) *CSVInput {
+ s.QuoteEscapeCharacter = &v
+ return s
+}
+
+// SetRecordDelimiter sets the RecordDelimiter field's value.
+func (s *CSVInput) SetRecordDelimiter(v string) *CSVInput {
+ s.RecordDelimiter = &v
+ return s
+}
+
+// Describes how CSV-formatted results are formatted.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CSVOutput
+type CSVOutput struct {
+ _ struct{} `type:"structure"`
+
+ // Value used to separate individual fields in a record.
+ FieldDelimiter *string `type:"string"`
+
+ // Value used for escaping where the field delimiter is part of the value.
+ QuoteCharacter *string `type:"string"`
+
+ // Single character used for escaping the quote character inside an already
+ // escaped value.
+ QuoteEscapeCharacter *string `type:"string"`
+
+ // Indicates whether or not all output fields should be quoted.
+ QuoteFields *string `type:"string" enum:"QuoteFields"`
+
+ // Value used to separate individual records.
+ RecordDelimiter *string `type:"string"`
+}
+
+// String returns the string representation
+func (s CSVOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CSVOutput) GoString() string {
+ return s.String()
+}
+
+// SetFieldDelimiter sets the FieldDelimiter field's value.
+func (s *CSVOutput) SetFieldDelimiter(v string) *CSVOutput {
+ s.FieldDelimiter = &v
+ return s
+}
+
+// SetQuoteCharacter sets the QuoteCharacter field's value.
+func (s *CSVOutput) SetQuoteCharacter(v string) *CSVOutput {
+ s.QuoteCharacter = &v
+ return s
+}
+
+// SetQuoteEscapeCharacter sets the QuoteEscapeCharacter field's value.
+func (s *CSVOutput) SetQuoteEscapeCharacter(v string) *CSVOutput {
+ s.QuoteEscapeCharacter = &v
+ return s
+}
+
+// SetQuoteFields sets the QuoteFields field's value.
+func (s *CSVOutput) SetQuoteFields(v string) *CSVOutput {
+ s.QuoteFields = &v
+ return s
+}
+
+// SetRecordDelimiter sets the RecordDelimiter field's value.
+func (s *CSVOutput) SetRecordDelimiter(v string) *CSVOutput {
+ s.RecordDelimiter = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CloudFunctionConfiguration
type CloudFunctionConfiguration struct {
_ struct{} `type:"structure"`
@@ -6851,7 +7178,7 @@ func (s *CloudFunctionConfiguration) SetInvocationRole(v string) *CloudFunctionC
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CommonPrefix
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CommonPrefix
type CommonPrefix struct {
_ struct{} `type:"structure"`
@@ -6874,7 +7201,7 @@ func (s *CommonPrefix) SetPrefix(v string) *CommonPrefix {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUploadRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUploadRequest
type CompleteMultipartUploadInput struct {
_ struct{} `type:"structure" payload:"MultipartUpload"`
@@ -6965,7 +7292,7 @@ func (s *CompleteMultipartUploadInput) SetUploadId(v string) *CompleteMultipartU
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUploadOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUploadOutput
type CompleteMultipartUploadOutput struct {
_ struct{} `type:"structure"`
@@ -7069,7 +7396,7 @@ func (s *CompleteMultipartUploadOutput) SetVersionId(v string) *CompleteMultipar
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompletedMultipartUpload
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompletedMultipartUpload
type CompletedMultipartUpload struct {
_ struct{} `type:"structure"`
@@ -7092,7 +7419,7 @@ func (s *CompletedMultipartUpload) SetParts(v []*CompletedPart) *CompletedMultip
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompletedPart
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompletedPart
type CompletedPart struct {
_ struct{} `type:"structure"`
@@ -7126,7 +7453,7 @@ func (s *CompletedPart) SetPartNumber(v int64) *CompletedPart {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Condition
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Condition
type Condition struct {
_ struct{} `type:"structure"`
@@ -7169,7 +7496,7 @@ func (s *Condition) SetKeyPrefixEquals(v string) *Condition {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObjectRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObjectRequest
type CopyObjectInput struct {
_ struct{} `type:"structure"`
@@ -7553,7 +7880,7 @@ func (s *CopyObjectInput) SetWebsiteRedirectLocation(v string) *CopyObjectInput
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObjectOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObjectOutput
type CopyObjectOutput struct {
_ struct{} `type:"structure" payload:"CopyObjectResult"`
@@ -7654,7 +7981,7 @@ func (s *CopyObjectOutput) SetVersionId(v string) *CopyObjectOutput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObjectResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObjectResult
type CopyObjectResult struct {
_ struct{} `type:"structure"`
@@ -7685,7 +8012,7 @@ func (s *CopyObjectResult) SetLastModified(v time.Time) *CopyObjectResult {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyPartResult
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyPartResult
type CopyPartResult struct {
_ struct{} `type:"structure"`
@@ -7718,7 +8045,7 @@ func (s *CopyPartResult) SetLastModified(v time.Time) *CopyPartResult {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucketConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucketConfiguration
type CreateBucketConfiguration struct {
_ struct{} `type:"structure"`
@@ -7743,7 +8070,7 @@ func (s *CreateBucketConfiguration) SetLocationConstraint(v string) *CreateBucke
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucketRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucketRequest
type CreateBucketInput struct {
_ struct{} `type:"structure" payload:"CreateBucketConfiguration"`
@@ -7850,7 +8177,7 @@ func (s *CreateBucketInput) SetGrantWriteACP(v string) *CreateBucketInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucketOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucketOutput
type CreateBucketOutput struct {
_ struct{} `type:"structure"`
@@ -7873,7 +8200,7 @@ func (s *CreateBucketOutput) SetLocation(v string) *CreateBucketOutput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUploadRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUploadRequest
type CreateMultipartUploadInput struct {
_ struct{} `type:"structure"`
@@ -8145,7 +8472,7 @@ func (s *CreateMultipartUploadInput) SetWebsiteRedirectLocation(v string) *Creat
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUploadOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUploadOutput
type CreateMultipartUploadOutput struct {
_ struct{} `type:"structure"`
@@ -8265,7 +8592,7 @@ func (s *CreateMultipartUploadOutput) SetUploadId(v string) *CreateMultipartUplo
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Delete
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Delete
type Delete struct {
_ struct{} `type:"structure"`
@@ -8322,7 +8649,7 @@ func (s *Delete) SetQuiet(v bool) *Delete {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfigurationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfigurationRequest
type DeleteBucketAnalyticsConfigurationInput struct {
_ struct{} `type:"structure"`
@@ -8382,7 +8709,7 @@ func (s *DeleteBucketAnalyticsConfigurationInput) SetId(v string) *DeleteBucketA
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfigurationOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfigurationOutput
type DeleteBucketAnalyticsConfigurationOutput struct {
_ struct{} `type:"structure"`
}
@@ -8397,7 +8724,7 @@ func (s DeleteBucketAnalyticsConfigurationOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCorsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCorsRequest
type DeleteBucketCorsInput struct {
_ struct{} `type:"structure"`
@@ -8441,7 +8768,7 @@ func (s *DeleteBucketCorsInput) getBucket() (v string) {
return *s.Bucket
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCorsOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCorsOutput
type DeleteBucketCorsOutput struct {
_ struct{} `type:"structure"`
}
@@ -8456,7 +8783,69 @@ func (s DeleteBucketCorsOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryptionRequest
+type DeleteBucketEncryptionInput struct {
+ _ struct{} `type:"structure"`
+
+ // The name of the bucket containing the server-side encryption configuration
+ // to delete.
+ //
+ // Bucket is a required field
+ Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s DeleteBucketEncryptionInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteBucketEncryptionInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *DeleteBucketEncryptionInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "DeleteBucketEncryptionInput"}
+ if s.Bucket == nil {
+ invalidParams.Add(request.NewErrParamRequired("Bucket"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetBucket sets the Bucket field's value.
+func (s *DeleteBucketEncryptionInput) SetBucket(v string) *DeleteBucketEncryptionInput {
+ s.Bucket = &v
+ return s
+}
+
+func (s *DeleteBucketEncryptionInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryptionOutput
+type DeleteBucketEncryptionOutput struct {
+ _ struct{} `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteBucketEncryptionOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteBucketEncryptionOutput) GoString() string {
+ return s.String()
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketRequest
type DeleteBucketInput struct {
_ struct{} `type:"structure"`
@@ -8500,7 +8889,7 @@ func (s *DeleteBucketInput) getBucket() (v string) {
return *s.Bucket
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfigurationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfigurationRequest
type DeleteBucketInventoryConfigurationInput struct {
_ struct{} `type:"structure"`
@@ -8560,7 +8949,7 @@ func (s *DeleteBucketInventoryConfigurationInput) SetId(v string) *DeleteBucketI
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfigurationOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfigurationOutput
type DeleteBucketInventoryConfigurationOutput struct {
_ struct{} `type:"structure"`
}
@@ -8575,7 +8964,7 @@ func (s DeleteBucketInventoryConfigurationOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycleRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycleRequest
type DeleteBucketLifecycleInput struct {
_ struct{} `type:"structure"`
@@ -8619,7 +9008,7 @@ func (s *DeleteBucketLifecycleInput) getBucket() (v string) {
return *s.Bucket
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycleOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycleOutput
type DeleteBucketLifecycleOutput struct {
_ struct{} `type:"structure"`
}
@@ -8634,7 +9023,7 @@ func (s DeleteBucketLifecycleOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfigurationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfigurationRequest
type DeleteBucketMetricsConfigurationInput struct {
_ struct{} `type:"structure"`
@@ -8694,7 +9083,7 @@ func (s *DeleteBucketMetricsConfigurationInput) SetId(v string) *DeleteBucketMet
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfigurationOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfigurationOutput
type DeleteBucketMetricsConfigurationOutput struct {
_ struct{} `type:"structure"`
}
@@ -8709,7 +9098,7 @@ func (s DeleteBucketMetricsConfigurationOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketOutput
type DeleteBucketOutput struct {
_ struct{} `type:"structure"`
}
@@ -8724,7 +9113,7 @@ func (s DeleteBucketOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicyRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicyRequest
type DeleteBucketPolicyInput struct {
_ struct{} `type:"structure"`
@@ -8768,7 +9157,7 @@ func (s *DeleteBucketPolicyInput) getBucket() (v string) {
return *s.Bucket
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicyOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicyOutput
type DeleteBucketPolicyOutput struct {
_ struct{} `type:"structure"`
}
@@ -8783,7 +9172,7 @@ func (s DeleteBucketPolicyOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplicationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplicationRequest
type DeleteBucketReplicationInput struct {
_ struct{} `type:"structure"`
@@ -8827,7 +9216,7 @@ func (s *DeleteBucketReplicationInput) getBucket() (v string) {
return *s.Bucket
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplicationOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplicationOutput
type DeleteBucketReplicationOutput struct {
_ struct{} `type:"structure"`
}
@@ -8842,7 +9231,7 @@ func (s DeleteBucketReplicationOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTaggingRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTaggingRequest
type DeleteBucketTaggingInput struct {
_ struct{} `type:"structure"`
@@ -8886,7 +9275,7 @@ func (s *DeleteBucketTaggingInput) getBucket() (v string) {
return *s.Bucket
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTaggingOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTaggingOutput
type DeleteBucketTaggingOutput struct {
_ struct{} `type:"structure"`
}
@@ -8901,7 +9290,7 @@ func (s DeleteBucketTaggingOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsiteRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsiteRequest
type DeleteBucketWebsiteInput struct {
_ struct{} `type:"structure"`
@@ -8945,7 +9334,7 @@ func (s *DeleteBucketWebsiteInput) getBucket() (v string) {
return *s.Bucket
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsiteOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsiteOutput
type DeleteBucketWebsiteOutput struct {
_ struct{} `type:"structure"`
}
@@ -8960,7 +9349,7 @@ func (s DeleteBucketWebsiteOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteMarkerEntry
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteMarkerEntry
type DeleteMarkerEntry struct {
_ struct{} `type:"structure"`
@@ -9020,7 +9409,7 @@ func (s *DeleteMarkerEntry) SetVersionId(v string) *DeleteMarkerEntry {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectRequest
type DeleteObjectInput struct {
_ struct{} `type:"structure"`
@@ -9110,7 +9499,7 @@ func (s *DeleteObjectInput) SetVersionId(v string) *DeleteObjectInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectOutput
type DeleteObjectOutput struct {
_ struct{} `type:"structure"`
@@ -9155,7 +9544,7 @@ func (s *DeleteObjectOutput) SetVersionId(v string) *DeleteObjectOutput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTaggingRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTaggingRequest
type DeleteObjectTaggingInput struct {
_ struct{} `type:"structure"`
@@ -9223,7 +9612,7 @@ func (s *DeleteObjectTaggingInput) SetVersionId(v string) *DeleteObjectTaggingIn
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTaggingOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTaggingOutput
type DeleteObjectTaggingOutput struct {
_ struct{} `type:"structure"`
@@ -9247,7 +9636,7 @@ func (s *DeleteObjectTaggingOutput) SetVersionId(v string) *DeleteObjectTaggingO
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectsRequest
type DeleteObjectsInput struct {
_ struct{} `type:"structure" payload:"Delete"`
@@ -9330,7 +9719,7 @@ func (s *DeleteObjectsInput) SetRequestPayer(v string) *DeleteObjectsInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectsOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectsOutput
type DeleteObjectsOutput struct {
_ struct{} `type:"structure"`
@@ -9371,7 +9760,7 @@ func (s *DeleteObjectsOutput) SetRequestCharged(v string) *DeleteObjectsOutput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeletedObject
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeletedObject
type DeletedObject struct {
_ struct{} `type:"structure"`
@@ -9418,16 +9807,27 @@ func (s *DeletedObject) SetVersionId(v string) *DeletedObject {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Destination
+// Container for replication destination information.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Destination
type Destination struct {
_ struct{} `type:"structure"`
+ // Container for information regarding the access control for replicas.
+ AccessControlTranslation *AccessControlTranslation `type:"structure"`
+
+ // Account ID of the destination bucket. Currently this is only being verified
+ // if Access Control Translation is enabled
+ Account *string `type:"string"`
+
// Amazon resource name (ARN) of the bucket where you want Amazon S3 to store
// replicas of the object identified by the rule.
//
// Bucket is a required field
Bucket *string `type:"string" required:"true"`
+ // Container for information regarding encryption based configuration for replicas.
+ EncryptionConfiguration *EncryptionConfiguration `type:"structure"`
+
// The class of storage used to store the object.
StorageClass *string `type:"string" enum:"StorageClass"`
}
@@ -9448,6 +9848,11 @@ func (s *Destination) Validate() error {
if s.Bucket == nil {
invalidParams.Add(request.NewErrParamRequired("Bucket"))
}
+ if s.AccessControlTranslation != nil {
+ if err := s.AccessControlTranslation.Validate(); err != nil {
+ invalidParams.AddNested("AccessControlTranslation", err.(request.ErrInvalidParams))
+ }
+ }
if invalidParams.Len() > 0 {
return invalidParams
@@ -9455,6 +9860,18 @@ func (s *Destination) Validate() error {
return nil
}
+// SetAccessControlTranslation sets the AccessControlTranslation field's value.
+func (s *Destination) SetAccessControlTranslation(v *AccessControlTranslation) *Destination {
+ s.AccessControlTranslation = v
+ return s
+}
+
+// SetAccount sets the Account field's value.
+func (s *Destination) SetAccount(v string) *Destination {
+ s.Account = &v
+ return s
+}
+
// SetBucket sets the Bucket field's value.
func (s *Destination) SetBucket(v string) *Destination {
s.Bucket = &v
@@ -9468,13 +9885,106 @@ func (s *Destination) getBucket() (v string) {
return *s.Bucket
}
+// SetEncryptionConfiguration sets the EncryptionConfiguration field's value.
+func (s *Destination) SetEncryptionConfiguration(v *EncryptionConfiguration) *Destination {
+ s.EncryptionConfiguration = v
+ return s
+}
+
// SetStorageClass sets the StorageClass field's value.
func (s *Destination) SetStorageClass(v string) *Destination {
s.StorageClass = &v
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Error
+// Describes the server-side encryption that will be applied to the restore
+// results.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Encryption
+type Encryption struct {
+ _ struct{} `type:"structure"`
+
+ // The server-side encryption algorithm used when storing job results in Amazon
+ // S3 (e.g., AES256, aws:kms).
+ //
+ // EncryptionType is a required field
+ EncryptionType *string `type:"string" required:"true" enum:"ServerSideEncryption"`
+
+ // If the encryption type is aws:kms, this optional value can be used to specify
+ // the encryption context for the restore results.
+ KMSContext *string `type:"string"`
+
+ // If the encryption type is aws:kms, this optional value specifies the AWS
+ // KMS key ID to use for encryption of job results.
+ KMSKeyId *string `type:"string"`
+}
+
+// String returns the string representation
+func (s Encryption) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Encryption) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *Encryption) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "Encryption"}
+ if s.EncryptionType == nil {
+ invalidParams.Add(request.NewErrParamRequired("EncryptionType"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetEncryptionType sets the EncryptionType field's value.
+func (s *Encryption) SetEncryptionType(v string) *Encryption {
+ s.EncryptionType = &v
+ return s
+}
+
+// SetKMSContext sets the KMSContext field's value.
+func (s *Encryption) SetKMSContext(v string) *Encryption {
+ s.KMSContext = &v
+ return s
+}
+
+// SetKMSKeyId sets the KMSKeyId field's value.
+func (s *Encryption) SetKMSKeyId(v string) *Encryption {
+ s.KMSKeyId = &v
+ return s
+}
+
+// Container for information regarding encryption based configuration for replicas.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/EncryptionConfiguration
+type EncryptionConfiguration struct {
+ _ struct{} `type:"structure"`
+
+ // The id of the KMS key used to encrypt the replica object.
+ ReplicaKmsKeyID *string `type:"string"`
+}
+
+// String returns the string representation
+func (s EncryptionConfiguration) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s EncryptionConfiguration) GoString() string {
+ return s.String()
+}
+
+// SetReplicaKmsKeyID sets the ReplicaKmsKeyID field's value.
+func (s *EncryptionConfiguration) SetReplicaKmsKeyID(v string) *EncryptionConfiguration {
+ s.ReplicaKmsKeyID = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Error
type Error struct {
_ struct{} `type:"structure"`
@@ -9521,7 +10031,7 @@ func (s *Error) SetVersionId(v string) *Error {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ErrorDocument
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ErrorDocument
type ErrorDocument struct {
_ struct{} `type:"structure"`
@@ -9564,7 +10074,7 @@ func (s *ErrorDocument) SetKey(v string) *ErrorDocument {
}
// Container for key value pair that defines the criteria for the filter rule.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/FilterRule
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/FilterRule
type FilterRule struct {
_ struct{} `type:"structure"`
@@ -9599,7 +10109,7 @@ func (s *FilterRule) SetValue(v string) *FilterRule {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfigurationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfigurationRequest
type GetBucketAccelerateConfigurationInput struct {
_ struct{} `type:"structure"`
@@ -9645,7 +10155,7 @@ func (s *GetBucketAccelerateConfigurationInput) getBucket() (v string) {
return *s.Bucket
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfigurationOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfigurationOutput
type GetBucketAccelerateConfigurationOutput struct {
_ struct{} `type:"structure"`
@@ -9669,7 +10179,7 @@ func (s *GetBucketAccelerateConfigurationOutput) SetStatus(v string) *GetBucketA
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAclRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAclRequest
type GetBucketAclInput struct {
_ struct{} `type:"structure"`
@@ -9713,7 +10223,7 @@ func (s *GetBucketAclInput) getBucket() (v string) {
return *s.Bucket
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAclOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAclOutput
type GetBucketAclOutput struct {
_ struct{} `type:"structure"`
@@ -9745,7 +10255,7 @@ func (s *GetBucketAclOutput) SetOwner(v *Owner) *GetBucketAclOutput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfigurationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfigurationRequest
type GetBucketAnalyticsConfigurationInput struct {
_ struct{} `type:"structure"`
@@ -9805,7 +10315,7 @@ func (s *GetBucketAnalyticsConfigurationInput) SetId(v string) *GetBucketAnalyti
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfigurationOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfigurationOutput
type GetBucketAnalyticsConfigurationOutput struct {
_ struct{} `type:"structure" payload:"AnalyticsConfiguration"`
@@ -9829,7 +10339,7 @@ func (s *GetBucketAnalyticsConfigurationOutput) SetAnalyticsConfiguration(v *Ana
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCorsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCorsRequest
type GetBucketCorsInput struct {
_ struct{} `type:"structure"`
@@ -9873,7 +10383,7 @@ func (s *GetBucketCorsInput) getBucket() (v string) {
return *s.Bucket
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCorsOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCorsOutput
type GetBucketCorsOutput struct {
_ struct{} `type:"structure"`
@@ -9896,7 +10406,79 @@ func (s *GetBucketCorsOutput) SetCORSRules(v []*CORSRule) *GetBucketCorsOutput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfigurationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryptionRequest
+type GetBucketEncryptionInput struct {
+ _ struct{} `type:"structure"`
+
+ // The name of the bucket from which the server-side encryption configuration
+ // is retrieved.
+ //
+ // Bucket is a required field
+ Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s GetBucketEncryptionInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetBucketEncryptionInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *GetBucketEncryptionInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "GetBucketEncryptionInput"}
+ if s.Bucket == nil {
+ invalidParams.Add(request.NewErrParamRequired("Bucket"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetBucket sets the Bucket field's value.
+func (s *GetBucketEncryptionInput) SetBucket(v string) *GetBucketEncryptionInput {
+ s.Bucket = &v
+ return s
+}
+
+func (s *GetBucketEncryptionInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryptionOutput
+type GetBucketEncryptionOutput struct {
+ _ struct{} `type:"structure" payload:"ServerSideEncryptionConfiguration"`
+
+ // Container for server-side encryption configuration rules. Currently S3 supports
+ // one rule only.
+ ServerSideEncryptionConfiguration *ServerSideEncryptionConfiguration `type:"structure"`
+}
+
+// String returns the string representation
+func (s GetBucketEncryptionOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetBucketEncryptionOutput) GoString() string {
+ return s.String()
+}
+
+// SetServerSideEncryptionConfiguration sets the ServerSideEncryptionConfiguration field's value.
+func (s *GetBucketEncryptionOutput) SetServerSideEncryptionConfiguration(v *ServerSideEncryptionConfiguration) *GetBucketEncryptionOutput {
+ s.ServerSideEncryptionConfiguration = v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfigurationRequest
type GetBucketInventoryConfigurationInput struct {
_ struct{} `type:"structure"`
@@ -9956,7 +10538,7 @@ func (s *GetBucketInventoryConfigurationInput) SetId(v string) *GetBucketInvento
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfigurationOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfigurationOutput
type GetBucketInventoryConfigurationOutput struct {
_ struct{} `type:"structure" payload:"InventoryConfiguration"`
@@ -9980,7 +10562,7 @@ func (s *GetBucketInventoryConfigurationOutput) SetInventoryConfiguration(v *Inv
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfigurationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfigurationRequest
type GetBucketLifecycleConfigurationInput struct {
_ struct{} `type:"structure"`
@@ -10024,7 +10606,7 @@ func (s *GetBucketLifecycleConfigurationInput) getBucket() (v string) {
return *s.Bucket
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfigurationOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfigurationOutput
type GetBucketLifecycleConfigurationOutput struct {
_ struct{} `type:"structure"`
@@ -10047,7 +10629,7 @@ func (s *GetBucketLifecycleConfigurationOutput) SetRules(v []*LifecycleRule) *Ge
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleRequest
type GetBucketLifecycleInput struct {
_ struct{} `type:"structure"`
@@ -10091,7 +10673,7 @@ func (s *GetBucketLifecycleInput) getBucket() (v string) {
return *s.Bucket
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleOutput
type GetBucketLifecycleOutput struct {
_ struct{} `type:"structure"`
@@ -10114,7 +10696,7 @@ func (s *GetBucketLifecycleOutput) SetRules(v []*Rule) *GetBucketLifecycleOutput
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocationRequest
type GetBucketLocationInput struct {
_ struct{} `type:"structure"`
@@ -10158,7 +10740,7 @@ func (s *GetBucketLocationInput) getBucket() (v string) {
return *s.Bucket
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocationOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocationOutput
type GetBucketLocationOutput struct {
_ struct{} `type:"structure"`
@@ -10181,7 +10763,7 @@ func (s *GetBucketLocationOutput) SetLocationConstraint(v string) *GetBucketLoca
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLoggingRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLoggingRequest
type GetBucketLoggingInput struct {
_ struct{} `type:"structure"`
@@ -10225,7 +10807,7 @@ func (s *GetBucketLoggingInput) getBucket() (v string) {
return *s.Bucket
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLoggingOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLoggingOutput
type GetBucketLoggingOutput struct {
_ struct{} `type:"structure"`
@@ -10248,7 +10830,7 @@ func (s *GetBucketLoggingOutput) SetLoggingEnabled(v *LoggingEnabled) *GetBucket
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfigurationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfigurationRequest
type GetBucketMetricsConfigurationInput struct {
_ struct{} `type:"structure"`
@@ -10308,7 +10890,7 @@ func (s *GetBucketMetricsConfigurationInput) SetId(v string) *GetBucketMetricsCo
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfigurationOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfigurationOutput
type GetBucketMetricsConfigurationOutput struct {
_ struct{} `type:"structure" payload:"MetricsConfiguration"`
@@ -10332,7 +10914,7 @@ func (s *GetBucketMetricsConfigurationOutput) SetMetricsConfiguration(v *Metrics
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfigurationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfigurationRequest
type GetBucketNotificationConfigurationRequest struct {
_ struct{} `type:"structure"`
@@ -10378,7 +10960,7 @@ func (s *GetBucketNotificationConfigurationRequest) getBucket() (v string) {
return *s.Bucket
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyRequest
type GetBucketPolicyInput struct {
_ struct{} `type:"structure"`
@@ -10422,7 +11004,7 @@ func (s *GetBucketPolicyInput) getBucket() (v string) {
return *s.Bucket
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyOutput
type GetBucketPolicyOutput struct {
_ struct{} `type:"structure" payload:"Policy"`
@@ -10446,7 +11028,7 @@ func (s *GetBucketPolicyOutput) SetPolicy(v string) *GetBucketPolicyOutput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplicationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplicationRequest
type GetBucketReplicationInput struct {
_ struct{} `type:"structure"`
@@ -10490,7 +11072,7 @@ func (s *GetBucketReplicationInput) getBucket() (v string) {
return *s.Bucket
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplicationOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplicationOutput
type GetBucketReplicationOutput struct {
_ struct{} `type:"structure" payload:"ReplicationConfiguration"`
@@ -10515,7 +11097,7 @@ func (s *GetBucketReplicationOutput) SetReplicationConfiguration(v *ReplicationC
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPaymentRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPaymentRequest
type GetBucketRequestPaymentInput struct {
_ struct{} `type:"structure"`
@@ -10559,7 +11141,7 @@ func (s *GetBucketRequestPaymentInput) getBucket() (v string) {
return *s.Bucket
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPaymentOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPaymentOutput
type GetBucketRequestPaymentOutput struct {
_ struct{} `type:"structure"`
@@ -10583,7 +11165,7 @@ func (s *GetBucketRequestPaymentOutput) SetPayer(v string) *GetBucketRequestPaym
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTaggingRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTaggingRequest
type GetBucketTaggingInput struct {
_ struct{} `type:"structure"`
@@ -10627,7 +11209,7 @@ func (s *GetBucketTaggingInput) getBucket() (v string) {
return *s.Bucket
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTaggingOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTaggingOutput
type GetBucketTaggingOutput struct {
_ struct{} `type:"structure"`
@@ -10651,7 +11233,7 @@ func (s *GetBucketTaggingOutput) SetTagSet(v []*Tag) *GetBucketTaggingOutput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioningRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioningRequest
type GetBucketVersioningInput struct {
_ struct{} `type:"structure"`
@@ -10695,7 +11277,7 @@ func (s *GetBucketVersioningInput) getBucket() (v string) {
return *s.Bucket
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioningOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioningOutput
type GetBucketVersioningOutput struct {
_ struct{} `type:"structure"`
@@ -10730,7 +11312,7 @@ func (s *GetBucketVersioningOutput) SetStatus(v string) *GetBucketVersioningOutp
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsiteRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsiteRequest
type GetBucketWebsiteInput struct {
_ struct{} `type:"structure"`
@@ -10774,7 +11356,7 @@ func (s *GetBucketWebsiteInput) getBucket() (v string) {
return *s.Bucket
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsiteOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsiteOutput
type GetBucketWebsiteOutput struct {
_ struct{} `type:"structure"`
@@ -10821,7 +11403,7 @@ func (s *GetBucketWebsiteOutput) SetRoutingRules(v []*RoutingRule) *GetBucketWeb
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAclRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAclRequest
type GetObjectAclInput struct {
_ struct{} `type:"structure"`
@@ -10901,7 +11483,7 @@ func (s *GetObjectAclInput) SetVersionId(v string) *GetObjectAclInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAclOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAclOutput
type GetObjectAclOutput struct {
_ struct{} `type:"structure"`
@@ -10943,7 +11525,7 @@ func (s *GetObjectAclOutput) SetRequestCharged(v string) *GetObjectAclOutput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectRequest
type GetObjectInput struct {
_ struct{} `type:"structure"`
@@ -11178,7 +11760,7 @@ func (s *GetObjectInput) SetVersionId(v string) *GetObjectInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectOutput
type GetObjectOutput struct {
_ struct{} `type:"structure" payload:"Body"`
@@ -11462,7 +12044,7 @@ func (s *GetObjectOutput) SetWebsiteRedirectLocation(v string) *GetObjectOutput
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTaggingRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTaggingRequest
type GetObjectTaggingInput struct {
_ struct{} `type:"structure"`
@@ -11529,7 +12111,7 @@ func (s *GetObjectTaggingInput) SetVersionId(v string) *GetObjectTaggingInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTaggingOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTaggingOutput
type GetObjectTaggingOutput struct {
_ struct{} `type:"structure"`
@@ -11561,7 +12143,7 @@ func (s *GetObjectTaggingOutput) SetVersionId(v string) *GetObjectTaggingOutput
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrentRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrentRequest
type GetObjectTorrentInput struct {
_ struct{} `type:"structure"`
@@ -11632,7 +12214,7 @@ func (s *GetObjectTorrentInput) SetRequestPayer(v string) *GetObjectTorrentInput
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrentOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrentOutput
type GetObjectTorrentOutput struct {
_ struct{} `type:"structure" payload:"Body"`
@@ -11665,7 +12247,7 @@ func (s *GetObjectTorrentOutput) SetRequestCharged(v string) *GetObjectTorrentOu
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GlacierJobParameters
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GlacierJobParameters
type GlacierJobParameters struct {
_ struct{} `type:"structure"`
@@ -11704,7 +12286,7 @@ func (s *GlacierJobParameters) SetTier(v string) *GlacierJobParameters {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Grant
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Grant
type Grant struct {
_ struct{} `type:"structure"`
@@ -11751,7 +12333,7 @@ func (s *Grant) SetPermission(v string) *Grant {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Grantee
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Grantee
type Grantee struct {
_ struct{} `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
@@ -11826,7 +12408,7 @@ func (s *Grantee) SetURI(v string) *Grantee {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucketRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucketRequest
type HeadBucketInput struct {
_ struct{} `type:"structure"`
@@ -11870,7 +12452,7 @@ func (s *HeadBucketInput) getBucket() (v string) {
return *s.Bucket
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucketOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucketOutput
type HeadBucketOutput struct {
_ struct{} `type:"structure"`
}
@@ -11885,7 +12467,7 @@ func (s HeadBucketOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObjectRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObjectRequest
type HeadObjectInput struct {
_ struct{} `type:"structure"`
@@ -12067,7 +12649,7 @@ func (s *HeadObjectInput) SetVersionId(v string) *HeadObjectInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObjectOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObjectOutput
type HeadObjectOutput struct {
_ struct{} `type:"structure"`
@@ -12324,7 +12906,7 @@ func (s *HeadObjectOutput) SetWebsiteRedirectLocation(v string) *HeadObjectOutpu
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/IndexDocument
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/IndexDocument
type IndexDocument struct {
_ struct{} `type:"structure"`
@@ -12366,7 +12948,7 @@ func (s *IndexDocument) SetSuffix(v string) *IndexDocument {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Initiator
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Initiator
type Initiator struct {
_ struct{} `type:"structure"`
@@ -12400,7 +12982,32 @@ func (s *Initiator) SetID(v string) *Initiator {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryConfiguration
+// Describes the serialization format of the object.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InputSerialization
+type InputSerialization struct {
+ _ struct{} `type:"structure"`
+
+ // Describes the serialization of a CSV-encoded object.
+ CSV *CSVInput `type:"structure"`
+}
+
+// String returns the string representation
+func (s InputSerialization) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InputSerialization) GoString() string {
+ return s.String()
+}
+
+// SetCSV sets the CSV field's value.
+func (s *InputSerialization) SetCSV(v *CSVInput) *InputSerialization {
+ s.CSV = v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryConfiguration
type InventoryConfiguration struct {
_ struct{} `type:"structure"`
@@ -12529,7 +13136,7 @@ func (s *InventoryConfiguration) SetSchedule(v *InventorySchedule) *InventoryCon
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryDestination
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryDestination
type InventoryDestination struct {
_ struct{} `type:"structure"`
@@ -12574,7 +13181,57 @@ func (s *InventoryDestination) SetS3BucketDestination(v *InventoryS3BucketDestin
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryFilter
+// Contains the type of server-side encryption used to encrypt the inventory
+// results.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryEncryption
+type InventoryEncryption struct {
+ _ struct{} `type:"structure"`
+
+ // Specifies the use of SSE-KMS to encrypt delievered Inventory reports.
+ SSEKMS *SSEKMS `locationName:"SSE-KMS" type:"structure"`
+
+ // Specifies the use of SSE-S3 to encrypt delievered Inventory reports.
+ SSES3 *SSES3 `locationName:"SSE-S3" type:"structure"`
+}
+
+// String returns the string representation
+func (s InventoryEncryption) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InventoryEncryption) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *InventoryEncryption) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "InventoryEncryption"}
+ if s.SSEKMS != nil {
+ if err := s.SSEKMS.Validate(); err != nil {
+ invalidParams.AddNested("SSEKMS", err.(request.ErrInvalidParams))
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetSSEKMS sets the SSEKMS field's value.
+func (s *InventoryEncryption) SetSSEKMS(v *SSEKMS) *InventoryEncryption {
+ s.SSEKMS = v
+ return s
+}
+
+// SetSSES3 sets the SSES3 field's value.
+func (s *InventoryEncryption) SetSSES3(v *SSES3) *InventoryEncryption {
+ s.SSES3 = v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryFilter
type InventoryFilter struct {
_ struct{} `type:"structure"`
@@ -12613,7 +13270,7 @@ func (s *InventoryFilter) SetPrefix(v string) *InventoryFilter {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryS3BucketDestination
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryS3BucketDestination
type InventoryS3BucketDestination struct {
_ struct{} `type:"structure"`
@@ -12626,6 +13283,10 @@ type InventoryS3BucketDestination struct {
// Bucket is a required field
Bucket *string `type:"string" required:"true"`
+ // Contains the type of server-side encryption used to encrypt the inventory
+ // results.
+ Encryption *InventoryEncryption `type:"structure"`
+
// Specifies the output format of the inventory results.
//
// Format is a required field
@@ -12654,6 +13315,11 @@ func (s *InventoryS3BucketDestination) Validate() error {
if s.Format == nil {
invalidParams.Add(request.NewErrParamRequired("Format"))
}
+ if s.Encryption != nil {
+ if err := s.Encryption.Validate(); err != nil {
+ invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams))
+ }
+ }
if invalidParams.Len() > 0 {
return invalidParams
@@ -12680,6 +13346,12 @@ func (s *InventoryS3BucketDestination) getBucket() (v string) {
return *s.Bucket
}
+// SetEncryption sets the Encryption field's value.
+func (s *InventoryS3BucketDestination) SetEncryption(v *InventoryEncryption) *InventoryS3BucketDestination {
+ s.Encryption = v
+ return s
+}
+
// SetFormat sets the Format field's value.
func (s *InventoryS3BucketDestination) SetFormat(v string) *InventoryS3BucketDestination {
s.Format = &v
@@ -12692,7 +13364,7 @@ func (s *InventoryS3BucketDestination) SetPrefix(v string) *InventoryS3BucketDes
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventorySchedule
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventorySchedule
type InventorySchedule struct {
_ struct{} `type:"structure"`
@@ -12732,7 +13404,7 @@ func (s *InventorySchedule) SetFrequency(v string) *InventorySchedule {
}
// Container for object key name prefix and suffix filtering rules.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/S3KeyFilter
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/S3KeyFilter
type KeyFilter struct {
_ struct{} `type:"structure"`
@@ -12758,7 +13430,7 @@ func (s *KeyFilter) SetFilterRules(v []*FilterRule) *KeyFilter {
}
// Container for specifying the AWS Lambda notification configuration.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LambdaFunctionConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LambdaFunctionConfiguration
type LambdaFunctionConfiguration struct {
_ struct{} `type:"structure"`
@@ -12830,7 +13502,7 @@ func (s *LambdaFunctionConfiguration) SetLambdaFunctionArn(v string) *LambdaFunc
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleConfiguration
type LifecycleConfiguration struct {
_ struct{} `type:"structure"`
@@ -12877,7 +13549,7 @@ func (s *LifecycleConfiguration) SetRules(v []*Rule) *LifecycleConfiguration {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleExpiration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleExpiration
type LifecycleExpiration struct {
_ struct{} `type:"structure"`
@@ -12924,7 +13596,7 @@ func (s *LifecycleExpiration) SetExpiredObjectDeleteMarker(v bool) *LifecycleExp
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleRule
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleRule
type LifecycleRule struct {
_ struct{} `type:"structure"`
@@ -13048,7 +13720,7 @@ func (s *LifecycleRule) SetTransitions(v []*Transition) *LifecycleRule {
// This is used in a Lifecycle Rule Filter to apply a logical AND to two or
// more predicates. The Lifecycle Rule will apply to any object matching all
// of the predicates configured inside the And operator.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleRuleAndOperator
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleRuleAndOperator
type LifecycleRuleAndOperator struct {
_ struct{} `type:"structure"`
@@ -13103,7 +13775,7 @@ func (s *LifecycleRuleAndOperator) SetTags(v []*Tag) *LifecycleRuleAndOperator {
// The Filter is used to identify objects that a Lifecycle Rule applies to.
// A Filter must have exactly one of Prefix, Tag, or And specified.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleRuleFilter
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleRuleFilter
type LifecycleRuleFilter struct {
_ struct{} `type:"structure"`
@@ -13167,7 +13839,7 @@ func (s *LifecycleRuleFilter) SetTag(v *Tag) *LifecycleRuleFilter {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurationsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurationsRequest
type ListBucketAnalyticsConfigurationsInput struct {
_ struct{} `type:"structure"`
@@ -13223,7 +13895,7 @@ func (s *ListBucketAnalyticsConfigurationsInput) SetContinuationToken(v string)
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurationsOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurationsOutput
type ListBucketAnalyticsConfigurationsOutput struct {
_ struct{} `type:"structure"`
@@ -13278,7 +13950,7 @@ func (s *ListBucketAnalyticsConfigurationsOutput) SetNextContinuationToken(v str
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurationsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurationsRequest
type ListBucketInventoryConfigurationsInput struct {
_ struct{} `type:"structure"`
@@ -13336,7 +14008,7 @@ func (s *ListBucketInventoryConfigurationsInput) SetContinuationToken(v string)
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurationsOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurationsOutput
type ListBucketInventoryConfigurationsOutput struct {
_ struct{} `type:"structure"`
@@ -13391,7 +14063,7 @@ func (s *ListBucketInventoryConfigurationsOutput) SetNextContinuationToken(v str
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurationsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurationsRequest
type ListBucketMetricsConfigurationsInput struct {
_ struct{} `type:"structure"`
@@ -13449,7 +14121,7 @@ func (s *ListBucketMetricsConfigurationsInput) SetContinuationToken(v string) *L
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurationsOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurationsOutput
type ListBucketMetricsConfigurationsOutput struct {
_ struct{} `type:"structure"`
@@ -13506,7 +14178,7 @@ func (s *ListBucketMetricsConfigurationsOutput) SetNextContinuationToken(v strin
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketsInput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketsInput
type ListBucketsInput struct {
_ struct{} `type:"structure"`
}
@@ -13521,7 +14193,7 @@ func (s ListBucketsInput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketsOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketsOutput
type ListBucketsOutput struct {
_ struct{} `type:"structure"`
@@ -13552,7 +14224,7 @@ func (s *ListBucketsOutput) SetOwner(v *Owner) *ListBucketsOutput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploadsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploadsRequest
type ListMultipartUploadsInput struct {
_ struct{} `type:"structure"`
@@ -13661,7 +14333,7 @@ func (s *ListMultipartUploadsInput) SetUploadIdMarker(v string) *ListMultipartUp
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploadsOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploadsOutput
type ListMultipartUploadsOutput struct {
_ struct{} `type:"structure"`
@@ -13795,7 +14467,7 @@ func (s *ListMultipartUploadsOutput) SetUploads(v []*MultipartUpload) *ListMulti
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersionsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersionsRequest
type ListObjectVersionsInput struct {
_ struct{} `type:"structure"`
@@ -13899,7 +14571,7 @@ func (s *ListObjectVersionsInput) SetVersionIdMarker(v string) *ListObjectVersio
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersionsOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersionsOutput
type ListObjectVersionsOutput struct {
_ struct{} `type:"structure"`
@@ -14027,7 +14699,7 @@ func (s *ListObjectVersionsOutput) SetVersions(v []*ObjectVersion) *ListObjectVe
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsRequest
type ListObjectsInput struct {
_ struct{} `type:"structure"`
@@ -14133,7 +14805,7 @@ func (s *ListObjectsInput) SetRequestPayer(v string) *ListObjectsInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsOutput
type ListObjectsOutput struct {
_ struct{} `type:"structure"`
@@ -14238,7 +14910,7 @@ func (s *ListObjectsOutput) SetPrefix(v string) *ListObjectsOutput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2Request
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2Request
type ListObjectsV2Input struct {
_ struct{} `type:"structure"`
@@ -14364,7 +15036,7 @@ func (s *ListObjectsV2Input) SetStartAfter(v string) *ListObjectsV2Input {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2Output
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2Output
type ListObjectsV2Output struct {
_ struct{} `type:"structure"`
@@ -14498,7 +15170,7 @@ func (s *ListObjectsV2Output) SetStartAfter(v string) *ListObjectsV2Output {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListPartsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListPartsRequest
type ListPartsInput struct {
_ struct{} `type:"structure"`
@@ -14602,7 +15274,7 @@ func (s *ListPartsInput) SetUploadId(v string) *ListPartsInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListPartsOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListPartsOutput
type ListPartsOutput struct {
_ struct{} `type:"structure"`
@@ -14752,7 +15424,136 @@ func (s *ListPartsOutput) SetUploadId(v string) *ListPartsOutput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LoggingEnabled
+// Describes an S3 location that will receive the results of the restore request.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/S3Location
+type Location struct {
+ _ struct{} `type:"structure"`
+
+ // A list of grants that control access to the staged results.
+ AccessControlList []*Grant `locationNameList:"Grant" type:"list"`
+
+ // The name of the bucket where the restore results will be placed.
+ //
+ // BucketName is a required field
+ BucketName *string `type:"string" required:"true"`
+
+ // The canned ACL to apply to the restore results.
+ CannedACL *string `type:"string" enum:"ObjectCannedACL"`
+
+ // Describes the server-side encryption that will be applied to the restore
+ // results.
+ Encryption *Encryption `type:"structure"`
+
+ // The prefix that is prepended to the restore results for this request.
+ //
+ // Prefix is a required field
+ Prefix *string `type:"string" required:"true"`
+
+ // The class of storage used to store the restore results.
+ StorageClass *string `type:"string" enum:"StorageClass"`
+
+ // The tag-set that is applied to the restore results.
+ Tagging *Tagging `type:"structure"`
+
+ // A list of metadata to store with the restore results in S3.
+ UserMetadata []*MetadataEntry `locationNameList:"MetadataEntry" type:"list"`
+}
+
+// String returns the string representation
+func (s Location) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Location) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *Location) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "Location"}
+ if s.BucketName == nil {
+ invalidParams.Add(request.NewErrParamRequired("BucketName"))
+ }
+ if s.Prefix == nil {
+ invalidParams.Add(request.NewErrParamRequired("Prefix"))
+ }
+ if s.AccessControlList != nil {
+ for i, v := range s.AccessControlList {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AccessControlList", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
+ if s.Encryption != nil {
+ if err := s.Encryption.Validate(); err != nil {
+ invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams))
+ }
+ }
+ if s.Tagging != nil {
+ if err := s.Tagging.Validate(); err != nil {
+ invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetAccessControlList sets the AccessControlList field's value.
+func (s *Location) SetAccessControlList(v []*Grant) *Location {
+ s.AccessControlList = v
+ return s
+}
+
+// SetBucketName sets the BucketName field's value.
+func (s *Location) SetBucketName(v string) *Location {
+ s.BucketName = &v
+ return s
+}
+
+// SetCannedACL sets the CannedACL field's value.
+func (s *Location) SetCannedACL(v string) *Location {
+ s.CannedACL = &v
+ return s
+}
+
+// SetEncryption sets the Encryption field's value.
+func (s *Location) SetEncryption(v *Encryption) *Location {
+ s.Encryption = v
+ return s
+}
+
+// SetPrefix sets the Prefix field's value.
+func (s *Location) SetPrefix(v string) *Location {
+ s.Prefix = &v
+ return s
+}
+
+// SetStorageClass sets the StorageClass field's value.
+func (s *Location) SetStorageClass(v string) *Location {
+ s.StorageClass = &v
+ return s
+}
+
+// SetTagging sets the Tagging field's value.
+func (s *Location) SetTagging(v *Tagging) *Location {
+ s.Tagging = v
+ return s
+}
+
+// SetUserMetadata sets the UserMetadata field's value.
+func (s *Location) SetUserMetadata(v []*MetadataEntry) *Location {
+ s.UserMetadata = v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LoggingEnabled
type LoggingEnabled struct {
_ struct{} `type:"structure"`
@@ -14819,7 +15620,39 @@ func (s *LoggingEnabled) SetTargetPrefix(v string) *LoggingEnabled {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MetricsAndOperator
+// A metadata key-value pair to store with an object.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MetadataEntry
+type MetadataEntry struct {
+ _ struct{} `type:"structure"`
+
+ Name *string `type:"string"`
+
+ Value *string `type:"string"`
+}
+
+// String returns the string representation
+func (s MetadataEntry) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s MetadataEntry) GoString() string {
+ return s.String()
+}
+
+// SetName sets the Name field's value.
+func (s *MetadataEntry) SetName(v string) *MetadataEntry {
+ s.Name = &v
+ return s
+}
+
+// SetValue sets the Value field's value.
+func (s *MetadataEntry) SetValue(v string) *MetadataEntry {
+ s.Value = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MetricsAndOperator
type MetricsAndOperator struct {
_ struct{} `type:"structure"`
@@ -14872,7 +15705,7 @@ func (s *MetricsAndOperator) SetTags(v []*Tag) *MetricsAndOperator {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MetricsConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MetricsConfiguration
type MetricsConfiguration struct {
_ struct{} `type:"structure"`
@@ -14927,7 +15760,7 @@ func (s *MetricsConfiguration) SetId(v string) *MetricsConfiguration {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MetricsFilter
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MetricsFilter
type MetricsFilter struct {
_ struct{} `type:"structure"`
@@ -14991,7 +15824,7 @@ func (s *MetricsFilter) SetTag(v *Tag) *MetricsFilter {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MultipartUpload
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MultipartUpload
type MultipartUpload struct {
_ struct{} `type:"structure"`
@@ -15064,7 +15897,7 @@ func (s *MultipartUpload) SetUploadId(v string) *MultipartUpload {
// configuration action on a bucket that has versioning enabled (or suspended)
// to request that Amazon S3 delete noncurrent object versions at a specific
// period in the object's lifetime.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NoncurrentVersionExpiration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NoncurrentVersionExpiration
type NoncurrentVersionExpiration struct {
_ struct{} `type:"structure"`
@@ -15096,7 +15929,7 @@ func (s *NoncurrentVersionExpiration) SetNoncurrentDays(v int64) *NoncurrentVers
// versioning-enabled (or versioning is suspended), you can set this action
// to request that Amazon S3 transition noncurrent object versions to the STANDARD_IA
// or GLACIER storage class at a specific period in the object's lifetime.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NoncurrentVersionTransition
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NoncurrentVersionTransition
type NoncurrentVersionTransition struct {
_ struct{} `type:"structure"`
@@ -15134,7 +15967,7 @@ func (s *NoncurrentVersionTransition) SetStorageClass(v string) *NoncurrentVersi
// Container for specifying the notification configuration of the bucket. If
// this element is empty, notifications are turned off on the bucket.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NotificationConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NotificationConfiguration
type NotificationConfiguration struct {
_ struct{} `type:"structure"`
@@ -15213,7 +16046,7 @@ func (s *NotificationConfiguration) SetTopicConfigurations(v []*TopicConfigurati
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NotificationConfigurationDeprecated
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NotificationConfigurationDeprecated
type NotificationConfigurationDeprecated struct {
_ struct{} `type:"structure"`
@@ -15254,7 +16087,7 @@ func (s *NotificationConfigurationDeprecated) SetTopicConfiguration(v *TopicConf
// Container for object key name filtering rules. For information about key
// name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NotificationConfigurationFilter
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NotificationConfigurationFilter
type NotificationConfigurationFilter struct {
_ struct{} `type:"structure"`
@@ -15278,7 +16111,7 @@ func (s *NotificationConfigurationFilter) SetKey(v *KeyFilter) *NotificationConf
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Object
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Object
type Object struct {
_ struct{} `type:"structure"`
@@ -15342,7 +16175,7 @@ func (s *Object) SetStorageClass(v string) *Object {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ObjectIdentifier
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ObjectIdentifier
type ObjectIdentifier struct {
_ struct{} `type:"structure"`
@@ -15393,7 +16226,7 @@ func (s *ObjectIdentifier) SetVersionId(v string) *ObjectIdentifier {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ObjectVersion
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ObjectVersion
type ObjectVersion struct {
_ struct{} `type:"structure"`
@@ -15479,7 +16312,72 @@ func (s *ObjectVersion) SetVersionId(v string) *ObjectVersion {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Owner
+// Describes the location where the restore job's output is stored.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/OutputLocation
+type OutputLocation struct {
+ _ struct{} `type:"structure"`
+
+ // Describes an S3 location that will receive the results of the restore request.
+ S3 *Location `type:"structure"`
+}
+
+// String returns the string representation
+func (s OutputLocation) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s OutputLocation) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *OutputLocation) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "OutputLocation"}
+ if s.S3 != nil {
+ if err := s.S3.Validate(); err != nil {
+ invalidParams.AddNested("S3", err.(request.ErrInvalidParams))
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetS3 sets the S3 field's value.
+func (s *OutputLocation) SetS3(v *Location) *OutputLocation {
+ s.S3 = v
+ return s
+}
+
+// Describes how results of the Select job are serialized.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/OutputSerialization
+type OutputSerialization struct {
+ _ struct{} `type:"structure"`
+
+ // Describes the serialization of CSV-encoded Select results.
+ CSV *CSVOutput `type:"structure"`
+}
+
+// String returns the string representation
+func (s OutputSerialization) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s OutputSerialization) GoString() string {
+ return s.String()
+}
+
+// SetCSV sets the CSV field's value.
+func (s *OutputSerialization) SetCSV(v *CSVOutput) *OutputSerialization {
+ s.CSV = v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Owner
type Owner struct {
_ struct{} `type:"structure"`
@@ -15510,7 +16408,7 @@ func (s *Owner) SetID(v string) *Owner {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Part
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Part
type Part struct {
_ struct{} `type:"structure"`
@@ -15562,7 +16460,7 @@ func (s *Part) SetSize(v int64) *Part {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfigurationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfigurationRequest
type PutBucketAccelerateConfigurationInput struct {
_ struct{} `type:"structure" payload:"AccelerateConfiguration"`
@@ -15622,7 +16520,7 @@ func (s *PutBucketAccelerateConfigurationInput) getBucket() (v string) {
return *s.Bucket
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfigurationOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfigurationOutput
type PutBucketAccelerateConfigurationOutput struct {
_ struct{} `type:"structure"`
}
@@ -15637,7 +16535,7 @@ func (s PutBucketAccelerateConfigurationOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAclRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAclRequest
type PutBucketAclInput struct {
_ struct{} `type:"structure" payload:"AccessControlPolicy"`
@@ -15749,7 +16647,7 @@ func (s *PutBucketAclInput) SetGrantWriteACP(v string) *PutBucketAclInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAclOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAclOutput
type PutBucketAclOutput struct {
_ struct{} `type:"structure"`
}
@@ -15764,7 +16662,7 @@ func (s PutBucketAclOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfigurationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfigurationRequest
type PutBucketAnalyticsConfigurationInput struct {
_ struct{} `type:"structure" payload:"AnalyticsConfiguration"`
@@ -15843,7 +16741,7 @@ func (s *PutBucketAnalyticsConfigurationInput) SetId(v string) *PutBucketAnalyti
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfigurationOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfigurationOutput
type PutBucketAnalyticsConfigurationOutput struct {
_ struct{} `type:"structure"`
}
@@ -15858,7 +16756,7 @@ func (s PutBucketAnalyticsConfigurationOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCorsRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCorsRequest
type PutBucketCorsInput struct {
_ struct{} `type:"structure" payload:"CORSConfiguration"`
@@ -15919,7 +16817,7 @@ func (s *PutBucketCorsInput) SetCORSConfiguration(v *CORSConfiguration) *PutBuck
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCorsOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCorsOutput
type PutBucketCorsOutput struct {
_ struct{} `type:"structure"`
}
@@ -15934,7 +16832,89 @@ func (s PutBucketCorsOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfigurationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryptionRequest
+type PutBucketEncryptionInput struct {
+ _ struct{} `type:"structure" payload:"ServerSideEncryptionConfiguration"`
+
+ // The name of the bucket for which the server-side encryption configuration
+ // is set.
+ //
+ // Bucket is a required field
+ Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
+
+ // Container for server-side encryption configuration rules. Currently S3 supports
+ // one rule only.
+ //
+ // ServerSideEncryptionConfiguration is a required field
+ ServerSideEncryptionConfiguration *ServerSideEncryptionConfiguration `locationName:"ServerSideEncryptionConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
+}
+
+// String returns the string representation
+func (s PutBucketEncryptionInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketEncryptionInput) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *PutBucketEncryptionInput) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "PutBucketEncryptionInput"}
+ if s.Bucket == nil {
+ invalidParams.Add(request.NewErrParamRequired("Bucket"))
+ }
+ if s.ServerSideEncryptionConfiguration == nil {
+ invalidParams.Add(request.NewErrParamRequired("ServerSideEncryptionConfiguration"))
+ }
+ if s.ServerSideEncryptionConfiguration != nil {
+ if err := s.ServerSideEncryptionConfiguration.Validate(); err != nil {
+ invalidParams.AddNested("ServerSideEncryptionConfiguration", err.(request.ErrInvalidParams))
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetBucket sets the Bucket field's value.
+func (s *PutBucketEncryptionInput) SetBucket(v string) *PutBucketEncryptionInput {
+ s.Bucket = &v
+ return s
+}
+
+func (s *PutBucketEncryptionInput) getBucket() (v string) {
+ if s.Bucket == nil {
+ return v
+ }
+ return *s.Bucket
+}
+
+// SetServerSideEncryptionConfiguration sets the ServerSideEncryptionConfiguration field's value.
+func (s *PutBucketEncryptionInput) SetServerSideEncryptionConfiguration(v *ServerSideEncryptionConfiguration) *PutBucketEncryptionInput {
+ s.ServerSideEncryptionConfiguration = v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryptionOutput
+type PutBucketEncryptionOutput struct {
+ _ struct{} `type:"structure"`
+}
+
+// String returns the string representation
+func (s PutBucketEncryptionOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PutBucketEncryptionOutput) GoString() string {
+ return s.String()
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfigurationRequest
type PutBucketInventoryConfigurationInput struct {
_ struct{} `type:"structure" payload:"InventoryConfiguration"`
@@ -16013,7 +16993,7 @@ func (s *PutBucketInventoryConfigurationInput) SetInventoryConfiguration(v *Inve
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfigurationOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfigurationOutput
type PutBucketInventoryConfigurationOutput struct {
_ struct{} `type:"structure"`
}
@@ -16028,7 +17008,7 @@ func (s PutBucketInventoryConfigurationOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfigurationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfigurationRequest
type PutBucketLifecycleConfigurationInput struct {
_ struct{} `type:"structure" payload:"LifecycleConfiguration"`
@@ -16085,7 +17065,7 @@ func (s *PutBucketLifecycleConfigurationInput) SetLifecycleConfiguration(v *Buck
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfigurationOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfigurationOutput
type PutBucketLifecycleConfigurationOutput struct {
_ struct{} `type:"structure"`
}
@@ -16100,7 +17080,7 @@ func (s PutBucketLifecycleConfigurationOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleRequest
type PutBucketLifecycleInput struct {
_ struct{} `type:"structure" payload:"LifecycleConfiguration"`
@@ -16157,7 +17137,7 @@ func (s *PutBucketLifecycleInput) SetLifecycleConfiguration(v *LifecycleConfigur
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleOutput
type PutBucketLifecycleOutput struct {
_ struct{} `type:"structure"`
}
@@ -16172,7 +17152,7 @@ func (s PutBucketLifecycleOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLoggingRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLoggingRequest
type PutBucketLoggingInput struct {
_ struct{} `type:"structure" payload:"BucketLoggingStatus"`
@@ -16233,7 +17213,7 @@ func (s *PutBucketLoggingInput) SetBucketLoggingStatus(v *BucketLoggingStatus) *
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLoggingOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLoggingOutput
type PutBucketLoggingOutput struct {
_ struct{} `type:"structure"`
}
@@ -16248,7 +17228,7 @@ func (s PutBucketLoggingOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfigurationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfigurationRequest
type PutBucketMetricsConfigurationInput struct {
_ struct{} `type:"structure" payload:"MetricsConfiguration"`
@@ -16327,7 +17307,7 @@ func (s *PutBucketMetricsConfigurationInput) SetMetricsConfiguration(v *MetricsC
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfigurationOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfigurationOutput
type PutBucketMetricsConfigurationOutput struct {
_ struct{} `type:"structure"`
}
@@ -16342,7 +17322,7 @@ func (s PutBucketMetricsConfigurationOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfigurationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfigurationRequest
type PutBucketNotificationConfigurationInput struct {
_ struct{} `type:"structure" payload:"NotificationConfiguration"`
@@ -16406,7 +17386,7 @@ func (s *PutBucketNotificationConfigurationInput) SetNotificationConfiguration(v
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfigurationOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfigurationOutput
type PutBucketNotificationConfigurationOutput struct {
_ struct{} `type:"structure"`
}
@@ -16421,7 +17401,7 @@ func (s PutBucketNotificationConfigurationOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationRequest
type PutBucketNotificationInput struct {
_ struct{} `type:"structure" payload:"NotificationConfiguration"`
@@ -16477,7 +17457,7 @@ func (s *PutBucketNotificationInput) SetNotificationConfiguration(v *Notificatio
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationOutput
type PutBucketNotificationOutput struct {
_ struct{} `type:"structure"`
}
@@ -16492,13 +17472,17 @@ func (s PutBucketNotificationOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicyRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicyRequest
type PutBucketPolicyInput struct {
_ struct{} `type:"structure" payload:"Policy"`
// Bucket is a required field
Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
+ // Set this parameter to true to confirm that you want to remove your permissions
+ // to change this bucket policy in the future.
+ ConfirmRemoveSelfBucketAccess *bool `location:"header" locationName:"x-amz-confirm-remove-self-bucket-access" type:"boolean"`
+
// The bucket policy as a JSON document.
//
// Policy is a required field
@@ -16544,13 +17528,19 @@ func (s *PutBucketPolicyInput) getBucket() (v string) {
return *s.Bucket
}
+// SetConfirmRemoveSelfBucketAccess sets the ConfirmRemoveSelfBucketAccess field's value.
+func (s *PutBucketPolicyInput) SetConfirmRemoveSelfBucketAccess(v bool) *PutBucketPolicyInput {
+ s.ConfirmRemoveSelfBucketAccess = &v
+ return s
+}
+
// SetPolicy sets the Policy field's value.
func (s *PutBucketPolicyInput) SetPolicy(v string) *PutBucketPolicyInput {
s.Policy = &v
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicyOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicyOutput
type PutBucketPolicyOutput struct {
_ struct{} `type:"structure"`
}
@@ -16565,7 +17555,7 @@ func (s PutBucketPolicyOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplicationRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplicationRequest
type PutBucketReplicationInput struct {
_ struct{} `type:"structure" payload:"ReplicationConfiguration"`
@@ -16629,7 +17619,7 @@ func (s *PutBucketReplicationInput) SetReplicationConfiguration(v *ReplicationCo
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplicationOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplicationOutput
type PutBucketReplicationOutput struct {
_ struct{} `type:"structure"`
}
@@ -16644,7 +17634,7 @@ func (s PutBucketReplicationOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPaymentRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPaymentRequest
type PutBucketRequestPaymentInput struct {
_ struct{} `type:"structure" payload:"RequestPaymentConfiguration"`
@@ -16705,7 +17695,7 @@ func (s *PutBucketRequestPaymentInput) SetRequestPaymentConfiguration(v *Request
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPaymentOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPaymentOutput
type PutBucketRequestPaymentOutput struct {
_ struct{} `type:"structure"`
}
@@ -16720,7 +17710,7 @@ func (s PutBucketRequestPaymentOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTaggingRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTaggingRequest
type PutBucketTaggingInput struct {
_ struct{} `type:"structure" payload:"Tagging"`
@@ -16781,7 +17771,7 @@ func (s *PutBucketTaggingInput) SetTagging(v *Tagging) *PutBucketTaggingInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTaggingOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTaggingOutput
type PutBucketTaggingOutput struct {
_ struct{} `type:"structure"`
}
@@ -16796,7 +17786,7 @@ func (s PutBucketTaggingOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioningRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioningRequest
type PutBucketVersioningInput struct {
_ struct{} `type:"structure" payload:"VersioningConfiguration"`
@@ -16862,7 +17852,7 @@ func (s *PutBucketVersioningInput) SetVersioningConfiguration(v *VersioningConfi
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioningOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioningOutput
type PutBucketVersioningOutput struct {
_ struct{} `type:"structure"`
}
@@ -16877,7 +17867,7 @@ func (s PutBucketVersioningOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsiteRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsiteRequest
type PutBucketWebsiteInput struct {
_ struct{} `type:"structure" payload:"WebsiteConfiguration"`
@@ -16938,7 +17928,7 @@ func (s *PutBucketWebsiteInput) SetWebsiteConfiguration(v *WebsiteConfiguration)
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsiteOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsiteOutput
type PutBucketWebsiteOutput struct {
_ struct{} `type:"structure"`
}
@@ -16953,7 +17943,7 @@ func (s PutBucketWebsiteOutput) GoString() string {
return s.String()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAclRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAclRequest
type PutObjectAclInput struct {
_ struct{} `type:"structure" payload:"AccessControlPolicy"`
@@ -17101,7 +18091,7 @@ func (s *PutObjectAclInput) SetVersionId(v string) *PutObjectAclInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAclOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAclOutput
type PutObjectAclOutput struct {
_ struct{} `type:"structure"`
@@ -17126,7 +18116,7 @@ func (s *PutObjectAclOutput) SetRequestCharged(v string) *PutObjectAclOutput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectRequest
type PutObjectInput struct {
_ struct{} `type:"structure" payload:"Body"`
@@ -17159,6 +18149,9 @@ type PutObjectInput struct {
// body cannot be determined automatically.
ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
+ // The base64-encoded 128-bit MD5 digest of the part data.
+ ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`
+
// A standard MIME type describing the format of the object data.
ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
@@ -17312,6 +18305,12 @@ func (s *PutObjectInput) SetContentLength(v int64) *PutObjectInput {
return s
}
+// SetContentMD5 sets the ContentMD5 field's value.
+func (s *PutObjectInput) SetContentMD5(v string) *PutObjectInput {
+ s.ContentMD5 = &v
+ return s
+}
+
// SetContentType sets the ContentType field's value.
func (s *PutObjectInput) SetContentType(v string) *PutObjectInput {
s.ContentType = &v
@@ -17421,7 +18420,7 @@ func (s *PutObjectInput) SetWebsiteRedirectLocation(v string) *PutObjectInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectOutput
type PutObjectOutput struct {
_ struct{} `type:"structure"`
@@ -17516,7 +18515,7 @@ func (s *PutObjectOutput) SetVersionId(v string) *PutObjectOutput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTaggingRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTaggingRequest
type PutObjectTaggingInput struct {
_ struct{} `type:"structure" payload:"Tagging"`
@@ -17600,7 +18599,7 @@ func (s *PutObjectTaggingInput) SetVersionId(v string) *PutObjectTaggingInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTaggingOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTaggingOutput
type PutObjectTaggingOutput struct {
_ struct{} `type:"structure"`
@@ -17625,7 +18624,7 @@ func (s *PutObjectTaggingOutput) SetVersionId(v string) *PutObjectTaggingOutput
// Container for specifying an configuration when you want Amazon S3 to publish
// events to an Amazon Simple Queue Service (Amazon SQS) queue.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/QueueConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/QueueConfiguration
type QueueConfiguration struct {
_ struct{} `type:"structure"`
@@ -17697,7 +18696,7 @@ func (s *QueueConfiguration) SetQueueArn(v string) *QueueConfiguration {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/QueueConfigurationDeprecated
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/QueueConfigurationDeprecated
type QueueConfigurationDeprecated struct {
_ struct{} `type:"structure"`
@@ -17747,7 +18746,7 @@ func (s *QueueConfigurationDeprecated) SetQueue(v string) *QueueConfigurationDep
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Redirect
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Redirect
type Redirect struct {
_ struct{} `type:"structure"`
@@ -17816,7 +18815,7 @@ func (s *Redirect) SetReplaceKeyWith(v string) *Redirect {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RedirectAllRequestsTo
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RedirectAllRequestsTo
type RedirectAllRequestsTo struct {
_ struct{} `type:"structure"`
@@ -17867,7 +18866,7 @@ func (s *RedirectAllRequestsTo) SetProtocol(v string) *RedirectAllRequestsTo {
// Container for replication rules. You can add as many as 1,000 rules. Total
// replication configuration size can be up to 2 MB.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ReplicationConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ReplicationConfiguration
type ReplicationConfiguration struct {
_ struct{} `type:"structure"`
@@ -17932,10 +18931,13 @@ func (s *ReplicationConfiguration) SetRules(v []*ReplicationRule) *ReplicationCo
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ReplicationRule
+// Container for information about a particular replication rule.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ReplicationRule
type ReplicationRule struct {
_ struct{} `type:"structure"`
+ // Container for replication destination information.
+ //
// Destination is a required field
Destination *Destination `type:"structure" required:"true"`
@@ -17949,6 +18951,9 @@ type ReplicationRule struct {
// Prefix is a required field
Prefix *string `type:"string" required:"true"`
+ // Container for filters that define which source objects should be replicated.
+ SourceSelectionCriteria *SourceSelectionCriteria `type:"structure"`
+
// The rule is ignored if status is not Enabled.
//
// Status is a required field
@@ -17982,6 +18987,11 @@ func (s *ReplicationRule) Validate() error {
invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
}
}
+ if s.SourceSelectionCriteria != nil {
+ if err := s.SourceSelectionCriteria.Validate(); err != nil {
+ invalidParams.AddNested("SourceSelectionCriteria", err.(request.ErrInvalidParams))
+ }
+ }
if invalidParams.Len() > 0 {
return invalidParams
@@ -18007,13 +19017,19 @@ func (s *ReplicationRule) SetPrefix(v string) *ReplicationRule {
return s
}
+// SetSourceSelectionCriteria sets the SourceSelectionCriteria field's value.
+func (s *ReplicationRule) SetSourceSelectionCriteria(v *SourceSelectionCriteria) *ReplicationRule {
+ s.SourceSelectionCriteria = v
+ return s
+}
+
// SetStatus sets the Status field's value.
func (s *ReplicationRule) SetStatus(v string) *ReplicationRule {
s.Status = &v
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RequestPaymentConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RequestPaymentConfiguration
type RequestPaymentConfiguration struct {
_ struct{} `type:"structure"`
@@ -18052,7 +19068,7 @@ func (s *RequestPaymentConfiguration) SetPayer(v string) *RequestPaymentConfigur
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObjectRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObjectRequest
type RestoreObjectInput struct {
_ struct{} `type:"structure" payload:"RestoreRequest"`
@@ -18068,6 +19084,7 @@ type RestoreObjectInput struct {
// at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
+ // Container for restore job parameters.
RestoreRequest *RestoreRequest `locationName:"RestoreRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
@@ -18144,13 +19161,17 @@ func (s *RestoreObjectInput) SetVersionId(v string) *RestoreObjectInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObjectOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObjectOutput
type RestoreObjectOutput struct {
_ struct{} `type:"structure"`
// If present, indicates that the requester was successfully charged for the
// request.
RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
+
+ // Indicates the path in the provided S3 output location where Select results
+ // will be restored to.
+ RestoreOutputPath *string `location:"header" locationName:"x-amz-restore-output-path" type:"string"`
}
// String returns the string representation
@@ -18169,17 +19190,39 @@ func (s *RestoreObjectOutput) SetRequestCharged(v string) *RestoreObjectOutput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreRequest
+// SetRestoreOutputPath sets the RestoreOutputPath field's value.
+func (s *RestoreObjectOutput) SetRestoreOutputPath(v string) *RestoreObjectOutput {
+ s.RestoreOutputPath = &v
+ return s
+}
+
+// Container for restore job parameters.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreRequest
type RestoreRequest struct {
_ struct{} `type:"structure"`
- // Lifetime of the active copy in days
- //
- // Days is a required field
- Days *int64 `type:"integer" required:"true"`
+ // Lifetime of the active copy in days. Do not use with restores that specify
+ // OutputLocation.
+ Days *int64 `type:"integer"`
- // Glacier related prameters pertaining to this job.
+ // The optional description for the job.
+ Description *string `type:"string"`
+
+ // Glacier related parameters pertaining to this job. Do not use with restores
+ // that specify OutputLocation.
GlacierJobParameters *GlacierJobParameters `type:"structure"`
+
+ // Describes the location where the restore job's output is stored.
+ OutputLocation *OutputLocation `type:"structure"`
+
+ // Describes the parameters for Select job types.
+ SelectParameters *SelectParameters `type:"structure"`
+
+ // Glacier retrieval tier at which the restore will be processed.
+ Tier *string `type:"string" enum:"Tier"`
+
+ // Type of restore request.
+ Type *string `type:"string" enum:"RestoreRequestType"`
}
// String returns the string representation
@@ -18195,14 +19238,21 @@ func (s RestoreRequest) GoString() string {
// Validate inspects the fields of the type to determine if they are valid.
func (s *RestoreRequest) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "RestoreRequest"}
- if s.Days == nil {
- invalidParams.Add(request.NewErrParamRequired("Days"))
- }
if s.GlacierJobParameters != nil {
if err := s.GlacierJobParameters.Validate(); err != nil {
invalidParams.AddNested("GlacierJobParameters", err.(request.ErrInvalidParams))
}
}
+ if s.OutputLocation != nil {
+ if err := s.OutputLocation.Validate(); err != nil {
+ invalidParams.AddNested("OutputLocation", err.(request.ErrInvalidParams))
+ }
+ }
+ if s.SelectParameters != nil {
+ if err := s.SelectParameters.Validate(); err != nil {
+ invalidParams.AddNested("SelectParameters", err.(request.ErrInvalidParams))
+ }
+ }
if invalidParams.Len() > 0 {
return invalidParams
@@ -18216,13 +19266,43 @@ func (s *RestoreRequest) SetDays(v int64) *RestoreRequest {
return s
}
+// SetDescription sets the Description field's value.
+func (s *RestoreRequest) SetDescription(v string) *RestoreRequest {
+ s.Description = &v
+ return s
+}
+
// SetGlacierJobParameters sets the GlacierJobParameters field's value.
func (s *RestoreRequest) SetGlacierJobParameters(v *GlacierJobParameters) *RestoreRequest {
s.GlacierJobParameters = v
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RoutingRule
+// SetOutputLocation sets the OutputLocation field's value.
+func (s *RestoreRequest) SetOutputLocation(v *OutputLocation) *RestoreRequest {
+ s.OutputLocation = v
+ return s
+}
+
+// SetSelectParameters sets the SelectParameters field's value.
+func (s *RestoreRequest) SetSelectParameters(v *SelectParameters) *RestoreRequest {
+ s.SelectParameters = v
+ return s
+}
+
+// SetTier sets the Tier field's value.
+func (s *RestoreRequest) SetTier(v string) *RestoreRequest {
+ s.Tier = &v
+ return s
+}
+
+// SetType sets the Type field's value.
+func (s *RestoreRequest) SetType(v string) *RestoreRequest {
+ s.Type = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RoutingRule
type RoutingRule struct {
_ struct{} `type:"structure"`
@@ -18275,7 +19355,7 @@ func (s *RoutingRule) SetRedirect(v *Redirect) *RoutingRule {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Rule
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Rule
type Rule struct {
_ struct{} `type:"structure"`
@@ -18390,7 +19470,374 @@ func (s *Rule) SetTransition(v *Transition) *Rule {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/StorageClassAnalysis
+// Specifies the use of SSE-KMS to encrypt delievered Inventory reports.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SSEKMS
+type SSEKMS struct {
+ _ struct{} `locationName:"SSE-KMS" type:"structure"`
+
+ // Specifies the ID of the AWS Key Management Service (KMS) master encryption
+ // key to use for encrypting Inventory reports.
+ //
+ // KeyId is a required field
+ KeyId *string `type:"string" required:"true"`
+}
+
+// String returns the string representation
+func (s SSEKMS) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SSEKMS) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *SSEKMS) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "SSEKMS"}
+ if s.KeyId == nil {
+ invalidParams.Add(request.NewErrParamRequired("KeyId"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetKeyId sets the KeyId field's value.
+func (s *SSEKMS) SetKeyId(v string) *SSEKMS {
+ s.KeyId = &v
+ return s
+}
+
+// Specifies the use of SSE-S3 to encrypt delievered Inventory reports.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SSES3
+type SSES3 struct {
+ _ struct{} `locationName:"SSE-S3" type:"structure"`
+}
+
+// String returns the string representation
+func (s SSES3) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SSES3) GoString() string {
+ return s.String()
+}
+
+// Describes the parameters for Select job types.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectParameters
+type SelectParameters struct {
+ _ struct{} `type:"structure"`
+
+ // The expression that is used to query the object.
+ //
+ // Expression is a required field
+ Expression *string `type:"string" required:"true"`
+
+ // The type of the provided expression (e.g., SQL).
+ //
+ // ExpressionType is a required field
+ ExpressionType *string `type:"string" required:"true" enum:"ExpressionType"`
+
+ // Describes the serialization format of the object.
+ //
+ // InputSerialization is a required field
+ InputSerialization *InputSerialization `type:"structure" required:"true"`
+
+ // Describes how the results of the Select job are serialized.
+ //
+ // OutputSerialization is a required field
+ OutputSerialization *OutputSerialization `type:"structure" required:"true"`
+}
+
+// String returns the string representation
+func (s SelectParameters) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SelectParameters) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *SelectParameters) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "SelectParameters"}
+ if s.Expression == nil {
+ invalidParams.Add(request.NewErrParamRequired("Expression"))
+ }
+ if s.ExpressionType == nil {
+ invalidParams.Add(request.NewErrParamRequired("ExpressionType"))
+ }
+ if s.InputSerialization == nil {
+ invalidParams.Add(request.NewErrParamRequired("InputSerialization"))
+ }
+ if s.OutputSerialization == nil {
+ invalidParams.Add(request.NewErrParamRequired("OutputSerialization"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetExpression sets the Expression field's value.
+func (s *SelectParameters) SetExpression(v string) *SelectParameters {
+ s.Expression = &v
+ return s
+}
+
+// SetExpressionType sets the ExpressionType field's value.
+func (s *SelectParameters) SetExpressionType(v string) *SelectParameters {
+ s.ExpressionType = &v
+ return s
+}
+
+// SetInputSerialization sets the InputSerialization field's value.
+func (s *SelectParameters) SetInputSerialization(v *InputSerialization) *SelectParameters {
+ s.InputSerialization = v
+ return s
+}
+
+// SetOutputSerialization sets the OutputSerialization field's value.
+func (s *SelectParameters) SetOutputSerialization(v *OutputSerialization) *SelectParameters {
+ s.OutputSerialization = v
+ return s
+}
+
+// Describes the default server-side encryption to apply to new objects in the
+// bucket. If Put Object request does not specify any server-side encryption,
+// this default encryption will be applied.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ServerSideEncryptionByDefault
+type ServerSideEncryptionByDefault struct {
+ _ struct{} `type:"structure"`
+
+ // KMS master key ID to use for the default encryption. This parameter is allowed
+ // if SSEAlgorithm is aws:kms.
+ KMSMasterKeyID *string `type:"string"`
+
+ // Server-side encryption algorithm to use for the default encryption.
+ //
+ // SSEAlgorithm is a required field
+ SSEAlgorithm *string `type:"string" required:"true" enum:"ServerSideEncryption"`
+}
+
+// String returns the string representation
+func (s ServerSideEncryptionByDefault) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ServerSideEncryptionByDefault) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ServerSideEncryptionByDefault) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionByDefault"}
+ if s.SSEAlgorithm == nil {
+ invalidParams.Add(request.NewErrParamRequired("SSEAlgorithm"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetKMSMasterKeyID sets the KMSMasterKeyID field's value.
+func (s *ServerSideEncryptionByDefault) SetKMSMasterKeyID(v string) *ServerSideEncryptionByDefault {
+ s.KMSMasterKeyID = &v
+ return s
+}
+
+// SetSSEAlgorithm sets the SSEAlgorithm field's value.
+func (s *ServerSideEncryptionByDefault) SetSSEAlgorithm(v string) *ServerSideEncryptionByDefault {
+ s.SSEAlgorithm = &v
+ return s
+}
+
+// Container for server-side encryption configuration rules. Currently S3 supports
+// one rule only.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ServerSideEncryptionConfiguration
+type ServerSideEncryptionConfiguration struct {
+ _ struct{} `type:"structure"`
+
+ // Container for information about a particular server-side encryption configuration
+ // rule.
+ //
+ // Rules is a required field
+ Rules []*ServerSideEncryptionRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
+}
+
+// String returns the string representation
+func (s ServerSideEncryptionConfiguration) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ServerSideEncryptionConfiguration) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ServerSideEncryptionConfiguration) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionConfiguration"}
+ if s.Rules == nil {
+ invalidParams.Add(request.NewErrParamRequired("Rules"))
+ }
+ if s.Rules != nil {
+ for i, v := range s.Rules {
+ if v == nil {
+ continue
+ }
+ if err := v.Validate(); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
+ }
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetRules sets the Rules field's value.
+func (s *ServerSideEncryptionConfiguration) SetRules(v []*ServerSideEncryptionRule) *ServerSideEncryptionConfiguration {
+ s.Rules = v
+ return s
+}
+
+// Container for information about a particular server-side encryption configuration
+// rule.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ServerSideEncryptionRule
+type ServerSideEncryptionRule struct {
+ _ struct{} `type:"structure"`
+
+ // Describes the default server-side encryption to apply to new objects in the
+ // bucket. If Put Object request does not specify any server-side encryption,
+ // this default encryption will be applied.
+ ApplyServerSideEncryptionByDefault *ServerSideEncryptionByDefault `type:"structure"`
+}
+
+// String returns the string representation
+func (s ServerSideEncryptionRule) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ServerSideEncryptionRule) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *ServerSideEncryptionRule) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionRule"}
+ if s.ApplyServerSideEncryptionByDefault != nil {
+ if err := s.ApplyServerSideEncryptionByDefault.Validate(); err != nil {
+ invalidParams.AddNested("ApplyServerSideEncryptionByDefault", err.(request.ErrInvalidParams))
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetApplyServerSideEncryptionByDefault sets the ApplyServerSideEncryptionByDefault field's value.
+func (s *ServerSideEncryptionRule) SetApplyServerSideEncryptionByDefault(v *ServerSideEncryptionByDefault) *ServerSideEncryptionRule {
+ s.ApplyServerSideEncryptionByDefault = v
+ return s
+}
+
+// Container for filters that define which source objects should be replicated.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SourceSelectionCriteria
+type SourceSelectionCriteria struct {
+ _ struct{} `type:"structure"`
+
+ // Container for filter information of selection of KMS Encrypted S3 objects.
+ SseKmsEncryptedObjects *SseKmsEncryptedObjects `type:"structure"`
+}
+
+// String returns the string representation
+func (s SourceSelectionCriteria) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SourceSelectionCriteria) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *SourceSelectionCriteria) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "SourceSelectionCriteria"}
+ if s.SseKmsEncryptedObjects != nil {
+ if err := s.SseKmsEncryptedObjects.Validate(); err != nil {
+ invalidParams.AddNested("SseKmsEncryptedObjects", err.(request.ErrInvalidParams))
+ }
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetSseKmsEncryptedObjects sets the SseKmsEncryptedObjects field's value.
+func (s *SourceSelectionCriteria) SetSseKmsEncryptedObjects(v *SseKmsEncryptedObjects) *SourceSelectionCriteria {
+ s.SseKmsEncryptedObjects = v
+ return s
+}
+
+// Container for filter information of selection of KMS Encrypted S3 objects.
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SseKmsEncryptedObjects
+type SseKmsEncryptedObjects struct {
+ _ struct{} `type:"structure"`
+
+ // The replication for KMS encrypted S3 objects is disabled if status is not
+ // Enabled.
+ //
+ // Status is a required field
+ Status *string `type:"string" required:"true" enum:"SseKmsEncryptedObjectsStatus"`
+}
+
+// String returns the string representation
+func (s SseKmsEncryptedObjects) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SseKmsEncryptedObjects) GoString() string {
+ return s.String()
+}
+
+// Validate inspects the fields of the type to determine if they are valid.
+func (s *SseKmsEncryptedObjects) Validate() error {
+ invalidParams := request.ErrInvalidParams{Context: "SseKmsEncryptedObjects"}
+ if s.Status == nil {
+ invalidParams.Add(request.NewErrParamRequired("Status"))
+ }
+
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ }
+ return nil
+}
+
+// SetStatus sets the Status field's value.
+func (s *SseKmsEncryptedObjects) SetStatus(v string) *SseKmsEncryptedObjects {
+ s.Status = &v
+ return s
+}
+
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/StorageClassAnalysis
type StorageClassAnalysis struct {
_ struct{} `type:"structure"`
@@ -18430,7 +19877,7 @@ func (s *StorageClassAnalysis) SetDataExport(v *StorageClassAnalysisDataExport)
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/StorageClassAnalysisDataExport
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/StorageClassAnalysisDataExport
type StorageClassAnalysisDataExport struct {
_ struct{} `type:"structure"`
@@ -18488,7 +19935,7 @@ func (s *StorageClassAnalysisDataExport) SetOutputSchemaVersion(v string) *Stora
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Tag
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Tag
type Tag struct {
_ struct{} `type:"structure"`
@@ -18544,7 +19991,7 @@ func (s *Tag) SetValue(v string) *Tag {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Tagging
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Tagging
type Tagging struct {
_ struct{} `type:"structure"`
@@ -18591,7 +20038,7 @@ func (s *Tagging) SetTagSet(v []*Tag) *Tagging {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/TargetGrant
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/TargetGrant
type TargetGrant struct {
_ struct{} `type:"structure"`
@@ -18640,7 +20087,7 @@ func (s *TargetGrant) SetPermission(v string) *TargetGrant {
// Container for specifying the configuration when you want Amazon S3 to publish
// events to an Amazon Simple Notification Service (Amazon SNS) topic.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/TopicConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/TopicConfiguration
type TopicConfiguration struct {
_ struct{} `type:"structure"`
@@ -18712,7 +20159,7 @@ func (s *TopicConfiguration) SetTopicArn(v string) *TopicConfiguration {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/TopicConfigurationDeprecated
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/TopicConfigurationDeprecated
type TopicConfigurationDeprecated struct {
_ struct{} `type:"structure"`
@@ -18764,7 +20211,7 @@ func (s *TopicConfigurationDeprecated) SetTopic(v string) *TopicConfigurationDep
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Transition
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Transition
type Transition struct {
_ struct{} `type:"structure"`
@@ -18808,7 +20255,7 @@ func (s *Transition) SetStorageClass(v string) *Transition {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopyRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopyRequest
type UploadPartCopyInput struct {
_ struct{} `type:"structure"`
@@ -19052,7 +20499,7 @@ func (s *UploadPartCopyInput) SetUploadId(v string) *UploadPartCopyInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopyOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopyOutput
type UploadPartCopyOutput struct {
_ struct{} `type:"structure" payload:"CopyPartResult"`
@@ -19137,7 +20584,7 @@ func (s *UploadPartCopyOutput) SetServerSideEncryption(v string) *UploadPartCopy
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartRequest
type UploadPartInput struct {
_ struct{} `type:"structure" payload:"Body"`
@@ -19153,6 +20600,9 @@ type UploadPartInput struct {
// body cannot be determined automatically.
ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
+ // The base64-encoded 128-bit MD5 digest of the part data.
+ ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`
+
// Object key for which the multipart upload was initiated.
//
// Key is a required field
@@ -19252,6 +20702,12 @@ func (s *UploadPartInput) SetContentLength(v int64) *UploadPartInput {
return s
}
+// SetContentMD5 sets the ContentMD5 field's value.
+func (s *UploadPartInput) SetContentMD5(v string) *UploadPartInput {
+ s.ContentMD5 = &v
+ return s
+}
+
// SetKey sets the Key field's value.
func (s *UploadPartInput) SetKey(v string) *UploadPartInput {
s.Key = &v
@@ -19301,7 +20757,7 @@ func (s *UploadPartInput) SetUploadId(v string) *UploadPartInput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartOutput
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartOutput
type UploadPartOutput struct {
_ struct{} `type:"structure"`
@@ -19377,7 +20833,7 @@ func (s *UploadPartOutput) SetServerSideEncryption(v string) *UploadPartOutput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/VersioningConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/VersioningConfiguration
type VersioningConfiguration struct {
_ struct{} `type:"structure"`
@@ -19412,7 +20868,7 @@ func (s *VersioningConfiguration) SetStatus(v string) *VersioningConfiguration {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/WebsiteConfiguration
+// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/WebsiteConfiguration
type WebsiteConfiguration struct {
_ struct{} `type:"structure"`
@@ -19624,6 +21080,22 @@ const (
ExpirationStatusDisabled = "Disabled"
)
+const (
+ // ExpressionTypeSql is a ExpressionType enum value
+ ExpressionTypeSql = "SQL"
+)
+
+const (
+ // FileHeaderInfoUse is a FileHeaderInfo enum value
+ FileHeaderInfoUse = "USE"
+
+ // FileHeaderInfoIgnore is a FileHeaderInfo enum value
+ FileHeaderInfoIgnore = "IGNORE"
+
+ // FileHeaderInfoNone is a FileHeaderInfo enum value
+ FileHeaderInfoNone = "NONE"
+)
+
const (
// FilterRuleNamePrefix is a FilterRuleName enum value
FilterRuleNamePrefix = "prefix"
@@ -19635,6 +21107,9 @@ const (
const (
// InventoryFormatCsv is a InventoryFormat enum value
InventoryFormatCsv = "CSV"
+
+ // InventoryFormatOrc is a InventoryFormat enum value
+ InventoryFormatOrc = "ORC"
)
const (
@@ -19671,6 +21146,9 @@ const (
// InventoryOptionalFieldReplicationStatus is a InventoryOptionalField enum value
InventoryOptionalFieldReplicationStatus = "ReplicationStatus"
+
+ // InventoryOptionalFieldEncryptionStatus is a InventoryOptionalField enum value
+ InventoryOptionalFieldEncryptionStatus = "EncryptionStatus"
)
const (
@@ -19736,6 +21214,11 @@ const (
ObjectVersionStorageClassStandard = "STANDARD"
)
+const (
+ // OwnerOverrideDestination is a OwnerOverride enum value
+ OwnerOverrideDestination = "Destination"
+)
+
const (
// PayerRequester is a Payer enum value
PayerRequester = "Requester"
@@ -19769,6 +21252,14 @@ const (
ProtocolHttps = "https"
)
+const (
+ // QuoteFieldsAlways is a QuoteFields enum value
+ QuoteFieldsAlways = "ALWAYS"
+
+ // QuoteFieldsAsneeded is a QuoteFields enum value
+ QuoteFieldsAsneeded = "ASNEEDED"
+)
+
const (
// ReplicationRuleStatusEnabled is a ReplicationRuleStatus enum value
ReplicationRuleStatusEnabled = "Enabled"
@@ -19807,6 +21298,11 @@ const (
RequestPayerRequester = "requester"
)
+const (
+ // RestoreRequestTypeSelect is a RestoreRequestType enum value
+ RestoreRequestTypeSelect = "SELECT"
+)
+
const (
// ServerSideEncryptionAes256 is a ServerSideEncryption enum value
ServerSideEncryptionAes256 = "AES256"
@@ -19815,6 +21311,14 @@ const (
ServerSideEncryptionAwsKms = "aws:kms"
)
+const (
+ // SseKmsEncryptedObjectsStatusEnabled is a SseKmsEncryptedObjectsStatus enum value
+ SseKmsEncryptedObjectsStatusEnabled = "Enabled"
+
+ // SseKmsEncryptedObjectsStatusDisabled is a SseKmsEncryptedObjectsStatus enum value
+ SseKmsEncryptedObjectsStatusDisabled = "Disabled"
+)
+
const (
// StorageClassStandard is a StorageClass enum value
StorageClassStandard = "STANDARD"
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go b/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go
index f045fd0db9d..0def02255ac 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go
@@ -10,69 +10,17 @@
//
// Using the Client
//
-// To use the client for Amazon Simple Storage Service you will first need
-// to create a new instance of it.
+// To contact Amazon Simple Storage Service with the SDK use the New function to create
+// a new service client. With that client you can make API requests to the service.
+// These clients are safe to use concurrently.
//
-// When creating a client for an AWS service you'll first need to have a Session
-// already created. The Session provides configuration that can be shared
-// between multiple service clients. Additional configuration can be applied to
-// the Session and service's client when they are constructed. The aws package's
-// Config type contains several fields such as Region for the AWS Region the
-// client should make API requests too. The optional Config value can be provided
-// as the variadic argument for Sessions and client creation.
-//
-// Once the service's client is created you can use it to make API requests the
-// AWS service. These clients are safe to use concurrently.
-//
-// // Create a session to share configuration, and load external configuration.
-// sess := session.Must(session.NewSession())
-//
-// // Create the service's client with the session.
-// svc := s3.New(sess)
-//
-// See the SDK's documentation for more information on how to use service clients.
+// See the SDK's documentation for more information on how to use the SDK.
// https://docs.aws.amazon.com/sdk-for-go/api/
//
-// See aws package's Config type for more information on configuration options.
+// See aws.Config documentation for more information on configuring SDK clients.
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
//
// See the Amazon Simple Storage Service client S3 for more
-// information on creating the service's client.
+// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/#New
-//
-// Once the client is created you can make an API request to the service.
-// Each API method takes a input parameter, and returns the service response
-// and an error.
-//
-// The API method will document which error codes the service can be returned
-// by the operation if the service models the API operation's errors. These
-// errors will also be available as const strings prefixed with "ErrCode".
-//
-// result, err := svc.AbortMultipartUpload(params)
-// if err != nil {
-// // Cast err to awserr.Error to handle specific error codes.
-// aerr, ok := err.(awserr.Error)
-// if ok && aerr.Code() == {
-// // Specific error code handling
-// }
-// return err
-// }
-//
-// fmt.Println("AbortMultipartUpload result:")
-// fmt.Println(result)
-//
-// Using the Client with Context
-//
-// The service's client also provides methods to make API requests with a Context
-// value. This allows you to control the timeout, and cancellation of pending
-// requests. These methods also take request Option as variadic parameter to apply
-// additional configuration to the API request.
-//
-// ctx := context.Background()
-//
-// result, err := svc.AbortMultipartUploadWithContext(ctx, params)
-//
-// See the request package documentation for more information on using Context pattern
-// with the SDK.
-// https://docs.aws.amazon.com/sdk-for-go/api/aws/request/
package s3
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/doc_custom.go b/vendor/github.com/aws/aws-sdk-go/service/s3/doc_custom.go
index b794a63ba20..39b912c260b 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/doc_custom.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/doc_custom.go
@@ -35,7 +35,7 @@
//
// The s3manager package's Downloader provides concurrently downloading of Objects
// from S3. The Downloader will write S3 Object content with an io.WriterAt.
-// Once the Downloader instance is created you can call Upload concurrently from
+// Once the Downloader instance is created you can call Download concurrently from
// multiple goroutines safely.
//
// // The session the S3 Downloader will use
@@ -56,7 +56,7 @@
// Key: aws.String(myString),
// })
// if err != nil {
-// return fmt.Errorf("failed to upload file, %v", err)
+// return fmt.Errorf("failed to download file, %v", err)
// }
// fmt.Printf("file downloaded, %d bytes\n", n)
//
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go
index cccfa8c2b3f..2596c694b50 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go
@@ -11,7 +11,7 @@ import (
// WaitUntilBucketExists uses the Amazon S3 API operation
// HeadBucket to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *S3) WaitUntilBucketExists(input *HeadBucketInput) error {
return c.WaitUntilBucketExistsWithContext(aws.BackgroundContext(), input)
@@ -72,7 +72,7 @@ func (c *S3) WaitUntilBucketExistsWithContext(ctx aws.Context, input *HeadBucket
// WaitUntilBucketNotExists uses the Amazon S3 API operation
// HeadBucket to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *S3) WaitUntilBucketNotExists(input *HeadBucketInput) error {
return c.WaitUntilBucketNotExistsWithContext(aws.BackgroundContext(), input)
@@ -118,7 +118,7 @@ func (c *S3) WaitUntilBucketNotExistsWithContext(ctx aws.Context, input *HeadBuc
// WaitUntilObjectExists uses the Amazon S3 API operation
// HeadObject to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *S3) WaitUntilObjectExists(input *HeadObjectInput) error {
return c.WaitUntilObjectExistsWithContext(aws.BackgroundContext(), input)
@@ -169,7 +169,7 @@ func (c *S3) WaitUntilObjectExistsWithContext(ctx aws.Context, input *HeadObject
// WaitUntilObjectNotExists uses the Amazon S3 API operation
// HeadObject to wait for a condition to be met before returning.
-// If the condition is not meet within the max attempt window an error will
+// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *S3) WaitUntilObjectNotExists(input *HeadObjectInput) error {
return c.WaitUntilObjectNotExistsWithContext(aws.BackgroundContext(), input)
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go
index e5c105fed80..23f0a06db8a 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go
@@ -14,19 +14,18 @@ const opAssumeRole = "AssumeRole"
// AssumeRoleRequest generates a "aws/request.Request" representing the
// client's request for the AssumeRole operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssumeRole for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssumeRole method directly
-// instead.
+// See AssumeRole for more information on using the AssumeRole
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssumeRoleRequest method.
// req, resp := client.AssumeRoleRequest(params)
@@ -36,7 +35,7 @@ const opAssumeRole = "AssumeRole"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole
func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, output *AssumeRoleOutput) {
op := &request.Operation{
Name: opAssumeRole,
@@ -169,7 +168,7 @@ func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, o
// and Deactivating AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
// in the IAM User Guide.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole
func (c *STS) AssumeRole(input *AssumeRoleInput) (*AssumeRoleOutput, error) {
req, out := c.AssumeRoleRequest(input)
return out, req.Send()
@@ -195,19 +194,18 @@ const opAssumeRoleWithSAML = "AssumeRoleWithSAML"
// AssumeRoleWithSAMLRequest generates a "aws/request.Request" representing the
// client's request for the AssumeRoleWithSAML operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssumeRoleWithSAML for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssumeRoleWithSAML method directly
-// instead.
+// See AssumeRoleWithSAML for more information on using the AssumeRoleWithSAML
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssumeRoleWithSAMLRequest method.
// req, resp := client.AssumeRoleWithSAMLRequest(params)
@@ -217,7 +215,7 @@ const opAssumeRoleWithSAML = "AssumeRoleWithSAML"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML
func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *request.Request, output *AssumeRoleWithSAMLOutput) {
op := &request.Operation{
Name: opAssumeRoleWithSAML,
@@ -343,7 +341,7 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re
// and Deactivating AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
// in the IAM User Guide.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML
func (c *STS) AssumeRoleWithSAML(input *AssumeRoleWithSAMLInput) (*AssumeRoleWithSAMLOutput, error) {
req, out := c.AssumeRoleWithSAMLRequest(input)
return out, req.Send()
@@ -369,19 +367,18 @@ const opAssumeRoleWithWebIdentity = "AssumeRoleWithWebIdentity"
// AssumeRoleWithWebIdentityRequest generates a "aws/request.Request" representing the
// client's request for the AssumeRoleWithWebIdentity operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See AssumeRoleWithWebIdentity for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the AssumeRoleWithWebIdentity method directly
-// instead.
+// See AssumeRoleWithWebIdentity for more information on using the AssumeRoleWithWebIdentity
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the AssumeRoleWithWebIdentityRequest method.
// req, resp := client.AssumeRoleWithWebIdentityRequest(params)
@@ -391,7 +388,7 @@ const opAssumeRoleWithWebIdentity = "AssumeRoleWithWebIdentity"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity
func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityInput) (req *request.Request, output *AssumeRoleWithWebIdentityOutput) {
op := &request.Operation{
Name: opAssumeRoleWithWebIdentity,
@@ -546,7 +543,7 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI
// and Deactivating AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
// in the IAM User Guide.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity
func (c *STS) AssumeRoleWithWebIdentity(input *AssumeRoleWithWebIdentityInput) (*AssumeRoleWithWebIdentityOutput, error) {
req, out := c.AssumeRoleWithWebIdentityRequest(input)
return out, req.Send()
@@ -572,19 +569,18 @@ const opDecodeAuthorizationMessage = "DecodeAuthorizationMessage"
// DecodeAuthorizationMessageRequest generates a "aws/request.Request" representing the
// client's request for the DecodeAuthorizationMessage operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See DecodeAuthorizationMessage for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the DecodeAuthorizationMessage method directly
-// instead.
+// See DecodeAuthorizationMessage for more information on using the DecodeAuthorizationMessage
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the DecodeAuthorizationMessageRequest method.
// req, resp := client.DecodeAuthorizationMessageRequest(params)
@@ -594,7 +590,7 @@ const opDecodeAuthorizationMessage = "DecodeAuthorizationMessage"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessage
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessage
func (c *STS) DecodeAuthorizationMessageRequest(input *DecodeAuthorizationMessageInput) (req *request.Request, output *DecodeAuthorizationMessageOutput) {
op := &request.Operation{
Name: opDecodeAuthorizationMessage,
@@ -659,7 +655,7 @@ func (c *STS) DecodeAuthorizationMessageRequest(input *DecodeAuthorizationMessag
// invalid. This can happen if the token contains invalid characters, such as
// linebreaks.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessage
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessage
func (c *STS) DecodeAuthorizationMessage(input *DecodeAuthorizationMessageInput) (*DecodeAuthorizationMessageOutput, error) {
req, out := c.DecodeAuthorizationMessageRequest(input)
return out, req.Send()
@@ -685,19 +681,18 @@ const opGetCallerIdentity = "GetCallerIdentity"
// GetCallerIdentityRequest generates a "aws/request.Request" representing the
// client's request for the GetCallerIdentity operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetCallerIdentity for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetCallerIdentity method directly
-// instead.
+// See GetCallerIdentity for more information on using the GetCallerIdentity
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetCallerIdentityRequest method.
// req, resp := client.GetCallerIdentityRequest(params)
@@ -707,7 +702,7 @@ const opGetCallerIdentity = "GetCallerIdentity"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentity
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentity
func (c *STS) GetCallerIdentityRequest(input *GetCallerIdentityInput) (req *request.Request, output *GetCallerIdentityOutput) {
op := &request.Operation{
Name: opGetCallerIdentity,
@@ -735,7 +730,7 @@ func (c *STS) GetCallerIdentityRequest(input *GetCallerIdentityInput) (req *requ
//
// See the AWS API reference guide for AWS Security Token Service's
// API operation GetCallerIdentity for usage and error information.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentity
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentity
func (c *STS) GetCallerIdentity(input *GetCallerIdentityInput) (*GetCallerIdentityOutput, error) {
req, out := c.GetCallerIdentityRequest(input)
return out, req.Send()
@@ -761,19 +756,18 @@ const opGetFederationToken = "GetFederationToken"
// GetFederationTokenRequest generates a "aws/request.Request" representing the
// client's request for the GetFederationToken operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetFederationToken for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetFederationToken method directly
-// instead.
+// See GetFederationToken for more information on using the GetFederationToken
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetFederationTokenRequest method.
// req, resp := client.GetFederationTokenRequest(params)
@@ -783,7 +777,7 @@ const opGetFederationToken = "GetFederationToken"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationToken
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationToken
func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *request.Request, output *GetFederationTokenOutput) {
op := &request.Operation{
Name: opGetFederationToken,
@@ -905,7 +899,7 @@ func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *re
// and Deactivating AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
// in the IAM User Guide.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationToken
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationToken
func (c *STS) GetFederationToken(input *GetFederationTokenInput) (*GetFederationTokenOutput, error) {
req, out := c.GetFederationTokenRequest(input)
return out, req.Send()
@@ -931,19 +925,18 @@ const opGetSessionToken = "GetSessionToken"
// GetSessionTokenRequest generates a "aws/request.Request" representing the
// client's request for the GetSessionToken operation. The "output" return
-// value can be used to capture response data after the request's "Send" method
-// is called.
+// value will be populated with the request's response once the request complets
+// successfuly.
//
-// See GetSessionToken for usage and error information.
+// Use "Send" method on the returned Request to send the API call to the service.
+// the "output" return value is not valid until after Send returns without error.
//
-// Creating a request object using this method should be used when you want to inject
-// custom logic into the request's lifecycle using a custom handler, or if you want to
-// access properties on the request object before or after sending the request. If
-// you just want the service response, call the GetSessionToken method directly
-// instead.
+// See GetSessionToken for more information on using the GetSessionToken
+// API call, and error handling.
+//
+// This method is useful when you want to inject custom logic or configuration
+// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
-// Note: You must call the "Send" method on the returned request object in order
-// to execute the request.
//
// // Example sending a request using the GetSessionTokenRequest method.
// req, resp := client.GetSessionTokenRequest(params)
@@ -953,7 +946,7 @@ const opGetSessionToken = "GetSessionToken"
// fmt.Println(resp)
// }
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken
func (c *STS) GetSessionTokenRequest(input *GetSessionTokenInput) (req *request.Request, output *GetSessionTokenOutput) {
op := &request.Operation{
Name: opGetSessionToken,
@@ -1034,7 +1027,7 @@ func (c *STS) GetSessionTokenRequest(input *GetSessionTokenInput) (req *request.
// and Deactivating AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
// in the IAM User Guide.
//
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken
func (c *STS) GetSessionToken(input *GetSessionTokenInput) (*GetSessionTokenOutput, error) {
req, out := c.GetSessionTokenRequest(input)
return out, req.Send()
@@ -1056,7 +1049,7 @@ func (c *STS) GetSessionTokenWithContext(ctx aws.Context, input *GetSessionToken
return out, req.Send()
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleRequest
type AssumeRoleInput struct {
_ struct{} `type:"structure"`
@@ -1248,7 +1241,7 @@ func (s *AssumeRoleInput) SetTokenCode(v string) *AssumeRoleInput {
// Contains the response to a successful AssumeRole request, including temporary
// AWS credentials that can be used to make AWS requests.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleResponse
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleResponse
type AssumeRoleOutput struct {
_ struct{} `type:"structure"`
@@ -1302,7 +1295,7 @@ func (s *AssumeRoleOutput) SetPackedPolicySize(v int64) *AssumeRoleOutput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAMLRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAMLRequest
type AssumeRoleWithSAMLInput struct {
_ struct{} `type:"structure"`
@@ -1443,7 +1436,7 @@ func (s *AssumeRoleWithSAMLInput) SetSAMLAssertion(v string) *AssumeRoleWithSAML
// Contains the response to a successful AssumeRoleWithSAML request, including
// temporary AWS credentials that can be used to make AWS requests.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAMLResponse
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAMLResponse
type AssumeRoleWithSAMLOutput struct {
_ struct{} `type:"structure"`
@@ -1555,7 +1548,7 @@ func (s *AssumeRoleWithSAMLOutput) SetSubjectType(v string) *AssumeRoleWithSAMLO
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentityRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentityRequest
type AssumeRoleWithWebIdentityInput struct {
_ struct{} `type:"structure"`
@@ -1718,7 +1711,7 @@ func (s *AssumeRoleWithWebIdentityInput) SetWebIdentityToken(v string) *AssumeRo
// Contains the response to a successful AssumeRoleWithWebIdentity request,
// including temporary AWS credentials that can be used to make AWS requests.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentityResponse
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentityResponse
type AssumeRoleWithWebIdentityOutput struct {
_ struct{} `type:"structure"`
@@ -1811,7 +1804,7 @@ func (s *AssumeRoleWithWebIdentityOutput) SetSubjectFromWebIdentityToken(v strin
// The identifiers for the temporary security credentials that the operation
// returns.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumedRoleUser
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumedRoleUser
type AssumedRoleUser struct {
_ struct{} `type:"structure"`
@@ -1854,7 +1847,7 @@ func (s *AssumedRoleUser) SetAssumedRoleId(v string) *AssumedRoleUser {
}
// AWS credentials for API authentication.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/Credentials
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/Credentials
type Credentials struct {
_ struct{} `type:"structure"`
@@ -1913,7 +1906,7 @@ func (s *Credentials) SetSessionToken(v string) *Credentials {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessageRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessageRequest
type DecodeAuthorizationMessageInput struct {
_ struct{} `type:"structure"`
@@ -1958,7 +1951,7 @@ func (s *DecodeAuthorizationMessageInput) SetEncodedMessage(v string) *DecodeAut
// A document that contains additional information about the authorization status
// of a request from an encoded message that is returned in response to an AWS
// request.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessageResponse
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessageResponse
type DecodeAuthorizationMessageOutput struct {
_ struct{} `type:"structure"`
@@ -1983,7 +1976,7 @@ func (s *DecodeAuthorizationMessageOutput) SetDecodedMessage(v string) *DecodeAu
}
// Identifiers for the federated user that is associated with the credentials.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/FederatedUser
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/FederatedUser
type FederatedUser struct {
_ struct{} `type:"structure"`
@@ -2024,7 +2017,7 @@ func (s *FederatedUser) SetFederatedUserId(v string) *FederatedUser {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentityRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentityRequest
type GetCallerIdentityInput struct {
_ struct{} `type:"structure"`
}
@@ -2041,7 +2034,7 @@ func (s GetCallerIdentityInput) GoString() string {
// Contains the response to a successful GetCallerIdentity request, including
// information about the entity making the request.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentityResponse
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentityResponse
type GetCallerIdentityOutput struct {
_ struct{} `type:"structure"`
@@ -2087,7 +2080,7 @@ func (s *GetCallerIdentityOutput) SetUserId(v string) *GetCallerIdentityOutput {
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationTokenRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationTokenRequest
type GetFederationTokenInput struct {
_ struct{} `type:"structure"`
@@ -2196,7 +2189,7 @@ func (s *GetFederationTokenInput) SetPolicy(v string) *GetFederationTokenInput {
// Contains the response to a successful GetFederationToken request, including
// temporary AWS credentials that can be used to make AWS requests.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationTokenResponse
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationTokenResponse
type GetFederationTokenOutput struct {
_ struct{} `type:"structure"`
@@ -2249,7 +2242,7 @@ func (s *GetFederationTokenOutput) SetPackedPolicySize(v int64) *GetFederationTo
return s
}
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionTokenRequest
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionTokenRequest
type GetSessionTokenInput struct {
_ struct{} `type:"structure"`
@@ -2334,7 +2327,7 @@ func (s *GetSessionTokenInput) SetTokenCode(v string) *GetSessionTokenInput {
// Contains the response to a successful GetSessionToken request, including
// temporary AWS credentials that can be used to make AWS requests.
-// Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionTokenResponse
+// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionTokenResponse
type GetSessionTokenOutput struct {
_ struct{} `type:"structure"`
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go b/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go
index d2af518cfad..ef681ab0c63 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go
@@ -56,69 +56,17 @@
//
// Using the Client
//
-// To use the client for AWS Security Token Service you will first need
-// to create a new instance of it.
+// To contact AWS Security Token Service with the SDK use the New function to create
+// a new service client. With that client you can make API requests to the service.
+// These clients are safe to use concurrently.
//
-// When creating a client for an AWS service you'll first need to have a Session
-// already created. The Session provides configuration that can be shared
-// between multiple service clients. Additional configuration can be applied to
-// the Session and service's client when they are constructed. The aws package's
-// Config type contains several fields such as Region for the AWS Region the
-// client should make API requests too. The optional Config value can be provided
-// as the variadic argument for Sessions and client creation.
-//
-// Once the service's client is created you can use it to make API requests the
-// AWS service. These clients are safe to use concurrently.
-//
-// // Create a session to share configuration, and load external configuration.
-// sess := session.Must(session.NewSession())
-//
-// // Create the service's client with the session.
-// svc := sts.New(sess)
-//
-// See the SDK's documentation for more information on how to use service clients.
+// See the SDK's documentation for more information on how to use the SDK.
// https://docs.aws.amazon.com/sdk-for-go/api/
//
-// See aws package's Config type for more information on configuration options.
+// See aws.Config documentation for more information on configuring SDK clients.
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
//
// See the AWS Security Token Service client STS for more
-// information on creating the service's client.
+// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/sts/#New
-//
-// Once the client is created you can make an API request to the service.
-// Each API method takes a input parameter, and returns the service response
-// and an error.
-//
-// The API method will document which error codes the service can be returned
-// by the operation if the service models the API operation's errors. These
-// errors will also be available as const strings prefixed with "ErrCode".
-//
-// result, err := svc.AssumeRole(params)
-// if err != nil {
-// // Cast err to awserr.Error to handle specific error codes.
-// aerr, ok := err.(awserr.Error)
-// if ok && aerr.Code() == {
-// // Specific error code handling
-// }
-// return err
-// }
-//
-// fmt.Println("AssumeRole result:")
-// fmt.Println(result)
-//
-// Using the Client with Context
-//
-// The service's client also provides methods to make API requests with a Context
-// value. This allows you to control the timeout, and cancellation of pending
-// requests. These methods also take request Option as variadic parameter to apply
-// additional configuration to the API request.
-//
-// ctx := context.Background()
-//
-// result, err := svc.AssumeRoleWithContext(ctx, params)
-//
-// See the request package documentation for more information on using Context pattern
-// with the SDK.
-// https://docs.aws.amazon.com/sdk-for-go/api/aws/request/
package sts
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/stsiface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/sts/stsiface/interface.go
deleted file mode 100644
index 99531316c95..00000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/stsiface/interface.go
+++ /dev/null
@@ -1,92 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-// Package stsiface provides an interface to enable mocking the AWS Security Token Service service client
-// for testing your code.
-//
-// It is important to note that this interface will have breaking changes
-// when the service model is updated and adds new API operations, paginators,
-// and waiters.
-package stsiface
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/service/sts"
-)
-
-// STSAPI provides an interface to enable mocking the
-// sts.STS service client's API operation,
-// paginators, and waiters. This make unit testing your code that calls out
-// to the SDK's service client's calls easier.
-//
-// The best way to use this interface is so the SDK's service client's calls
-// can be stubbed out for unit testing your code with the SDK without needing
-// to inject custom request handlers into the the SDK's request pipeline.
-//
-// // myFunc uses an SDK service client to make a request to
-// // AWS Security Token Service.
-// func myFunc(svc stsiface.STSAPI) bool {
-// // Make svc.AssumeRole request
-// }
-//
-// func main() {
-// sess := session.New()
-// svc := sts.New(sess)
-//
-// myFunc(svc)
-// }
-//
-// In your _test.go file:
-//
-// // Define a mock struct to be used in your unit tests of myFunc.
-// type mockSTSClient struct {
-// stsiface.STSAPI
-// }
-// func (m *mockSTSClient) AssumeRole(input *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error) {
-// // mock response/functionality
-// }
-//
-// func TestMyFunc(t *testing.T) {
-// // Setup Test
-// mockSvc := &mockSTSClient{}
-//
-// myfunc(mockSvc)
-//
-// // Verify myFunc's functionality
-// }
-//
-// It is important to note that this interface will have breaking changes
-// when the service model is updated and adds new API operations, paginators,
-// and waiters. Its suggested to use the pattern above for testing, or using
-// tooling to generate mocks to satisfy the interfaces.
-type STSAPI interface {
- AssumeRole(*sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error)
- AssumeRoleWithContext(aws.Context, *sts.AssumeRoleInput, ...request.Option) (*sts.AssumeRoleOutput, error)
- AssumeRoleRequest(*sts.AssumeRoleInput) (*request.Request, *sts.AssumeRoleOutput)
-
- AssumeRoleWithSAML(*sts.AssumeRoleWithSAMLInput) (*sts.AssumeRoleWithSAMLOutput, error)
- AssumeRoleWithSAMLWithContext(aws.Context, *sts.AssumeRoleWithSAMLInput, ...request.Option) (*sts.AssumeRoleWithSAMLOutput, error)
- AssumeRoleWithSAMLRequest(*sts.AssumeRoleWithSAMLInput) (*request.Request, *sts.AssumeRoleWithSAMLOutput)
-
- AssumeRoleWithWebIdentity(*sts.AssumeRoleWithWebIdentityInput) (*sts.AssumeRoleWithWebIdentityOutput, error)
- AssumeRoleWithWebIdentityWithContext(aws.Context, *sts.AssumeRoleWithWebIdentityInput, ...request.Option) (*sts.AssumeRoleWithWebIdentityOutput, error)
- AssumeRoleWithWebIdentityRequest(*sts.AssumeRoleWithWebIdentityInput) (*request.Request, *sts.AssumeRoleWithWebIdentityOutput)
-
- DecodeAuthorizationMessage(*sts.DecodeAuthorizationMessageInput) (*sts.DecodeAuthorizationMessageOutput, error)
- DecodeAuthorizationMessageWithContext(aws.Context, *sts.DecodeAuthorizationMessageInput, ...request.Option) (*sts.DecodeAuthorizationMessageOutput, error)
- DecodeAuthorizationMessageRequest(*sts.DecodeAuthorizationMessageInput) (*request.Request, *sts.DecodeAuthorizationMessageOutput)
-
- GetCallerIdentity(*sts.GetCallerIdentityInput) (*sts.GetCallerIdentityOutput, error)
- GetCallerIdentityWithContext(aws.Context, *sts.GetCallerIdentityInput, ...request.Option) (*sts.GetCallerIdentityOutput, error)
- GetCallerIdentityRequest(*sts.GetCallerIdentityInput) (*request.Request, *sts.GetCallerIdentityOutput)
-
- GetFederationToken(*sts.GetFederationTokenInput) (*sts.GetFederationTokenOutput, error)
- GetFederationTokenWithContext(aws.Context, *sts.GetFederationTokenInput, ...request.Option) (*sts.GetFederationTokenOutput, error)
- GetFederationTokenRequest(*sts.GetFederationTokenInput) (*request.Request, *sts.GetFederationTokenOutput)
-
- GetSessionToken(*sts.GetSessionTokenInput) (*sts.GetSessionTokenOutput, error)
- GetSessionTokenWithContext(aws.Context, *sts.GetSessionTokenInput, ...request.Option) (*sts.GetSessionTokenOutput, error)
- GetSessionTokenRequest(*sts.GetSessionTokenInput) (*request.Request, *sts.GetSessionTokenOutput)
-}
-
-var _ STSAPI = (*sts.STS)(nil)
diff --git a/vendor/github.com/benbjohnson/clock/clock.go b/vendor/github.com/benbjohnson/clock/clock.go
index 518178d6dea..c4c52309ef1 100644
--- a/vendor/github.com/benbjohnson/clock/clock.go
+++ b/vendor/github.com/benbjohnson/clock/clock.go
@@ -15,6 +15,7 @@ type Clock interface {
After(d time.Duration) <-chan time.Time
AfterFunc(d time.Duration, f func()) *Timer
Now() time.Time
+ Since(t time.Time) time.Duration
Sleep(d time.Duration)
Tick(d time.Duration) <-chan time.Time
Ticker(d time.Duration) *Ticker
@@ -37,6 +38,8 @@ func (c *clock) AfterFunc(d time.Duration, f func()) *Timer {
func (c *clock) Now() time.Time { return time.Now() }
+func (c *clock) Since(t time.Time) time.Duration { return time.Since(t) }
+
func (c *clock) Sleep(d time.Duration) { time.Sleep(d) }
func (c *clock) Tick(d time.Duration) <-chan time.Time { return time.Tick(d) }
@@ -87,7 +90,7 @@ func (m *Mock) Add(d time.Duration) {
gosched()
}
-// Sets the current time of the mock clock to a specific one.
+// Set sets the current time of the mock clock to a specific one.
// This should only be called from a single goroutine at a time.
func (m *Mock) Set(t time.Time) {
// Continue to execute timers until there are no more before the new time.
@@ -158,6 +161,11 @@ func (m *Mock) Now() time.Time {
return m.now
}
+// Since returns time since the mock clocks wall time.
+func (m *Mock) Since(t time.Time) time.Duration {
+ return m.Now().Sub(t)
+}
+
// Sleep pauses the goroutine for the given duration on the mock clock.
// The clock must be moved forward in a separate goroutine.
func (m *Mock) Sleep(d time.Duration) {
diff --git a/vendor/github.com/beorn7/perks/.gitignore b/vendor/github.com/beorn7/perks/.gitignore
new file mode 100644
index 00000000000..1bd9209aa19
--- /dev/null
+++ b/vendor/github.com/beorn7/perks/.gitignore
@@ -0,0 +1,2 @@
+*.test
+*.prof
diff --git a/vendor/github.com/beorn7/perks/README.md b/vendor/github.com/beorn7/perks/README.md
new file mode 100644
index 00000000000..fc05777701a
--- /dev/null
+++ b/vendor/github.com/beorn7/perks/README.md
@@ -0,0 +1,31 @@
+# Perks for Go (golang.org)
+
+Perks contains the Go package quantile that computes approximate quantiles over
+an unbounded data stream within low memory and CPU bounds.
+
+For more information and examples, see:
+http://godoc.org/github.com/bmizerany/perks
+
+A very special thank you and shout out to Graham Cormode (Rutgers University),
+Flip Korn (AT&T Labs–Research), S. Muthukrishnan (Rutgers University), and
+Divesh Srivastava (AT&T Labs–Research) for their research and publication of
+[Effective Computation of Biased Quantiles over Data Streams](http://www.cs.rutgers.edu/~muthu/bquant.pdf)
+
+Thank you, also:
+* Armon Dadgar (@armon)
+* Andrew Gerrand (@nf)
+* Brad Fitzpatrick (@bradfitz)
+* Keith Rarick (@kr)
+
+FAQ:
+
+Q: Why not move the quantile package into the project root?
+A: I want to add more packages to perks later.
+
+Copyright (C) 2013 Blake Mizerany
+
+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/inconshreveable/log15/term/LICENSE b/vendor/github.com/bitly/go-simplejson/LICENSE
similarity index 94%
rename from vendor/github.com/inconshreveable/log15/term/LICENSE
rename to vendor/github.com/bitly/go-simplejson/LICENSE
index f090cb42f37..89de354795e 100644
--- a/vendor/github.com/inconshreveable/log15/term/LICENSE
+++ b/vendor/github.com/bitly/go-simplejson/LICENSE
@@ -1,7 +1,3 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Simon Eskildsen
-
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
diff --git a/vendor/github.com/bitly/go-simplejson/README.md b/vendor/github.com/bitly/go-simplejson/README.md
new file mode 100644
index 00000000000..8c6c101a827
--- /dev/null
+++ b/vendor/github.com/bitly/go-simplejson/README.md
@@ -0,0 +1,13 @@
+### go-simplejson
+
+a Go package to interact with arbitrary JSON
+
+[](http://travis-ci.org/bitly/go-simplejson)
+
+### Importing
+
+ import github.com/bitly/go-simplejson
+
+### Documentation
+
+Visit the docs on [gopkgdoc](http://godoc.org/github.com/bitly/go-simplejson)
diff --git a/vendor/github.com/bitly/go-simplejson/simplejson.go b/vendor/github.com/bitly/go-simplejson/simplejson.go
new file mode 100644
index 00000000000..27ce9861670
--- /dev/null
+++ b/vendor/github.com/bitly/go-simplejson/simplejson.go
@@ -0,0 +1,446 @@
+package simplejson
+
+import (
+ "encoding/json"
+ "errors"
+ "log"
+)
+
+// returns the current implementation version
+func Version() string {
+ return "0.5.0"
+}
+
+type Json struct {
+ data interface{}
+}
+
+// NewJson returns a pointer to a new `Json` object
+// after unmarshaling `body` bytes
+func NewJson(body []byte) (*Json, error) {
+ j := new(Json)
+ err := j.UnmarshalJSON(body)
+ if err != nil {
+ return nil, err
+ }
+ return j, nil
+}
+
+// New returns a pointer to a new, empty `Json` object
+func New() *Json {
+ return &Json{
+ data: make(map[string]interface{}),
+ }
+}
+
+// Interface returns the underlying data
+func (j *Json) Interface() interface{} {
+ return j.data
+}
+
+// Encode returns its marshaled data as `[]byte`
+func (j *Json) Encode() ([]byte, error) {
+ return j.MarshalJSON()
+}
+
+// EncodePretty returns its marshaled data as `[]byte` with indentation
+func (j *Json) EncodePretty() ([]byte, error) {
+ return json.MarshalIndent(&j.data, "", " ")
+}
+
+// Implements the json.Marshaler interface.
+func (j *Json) MarshalJSON() ([]byte, error) {
+ return json.Marshal(&j.data)
+}
+
+// Set modifies `Json` map by `key` and `value`
+// Useful for changing single key/value in a `Json` object easily.
+func (j *Json) Set(key string, val interface{}) {
+ m, err := j.Map()
+ if err != nil {
+ return
+ }
+ m[key] = val
+}
+
+// SetPath modifies `Json`, recursively checking/creating map keys for the supplied path,
+// and then finally writing in the value
+func (j *Json) SetPath(branch []string, val interface{}) {
+ if len(branch) == 0 {
+ j.data = val
+ return
+ }
+
+ // in order to insert our branch, we need map[string]interface{}
+ if _, ok := (j.data).(map[string]interface{}); !ok {
+ // have to replace with something suitable
+ j.data = make(map[string]interface{})
+ }
+ curr := j.data.(map[string]interface{})
+
+ for i := 0; i < len(branch)-1; i++ {
+ b := branch[i]
+ // key exists?
+ if _, ok := curr[b]; !ok {
+ n := make(map[string]interface{})
+ curr[b] = n
+ curr = n
+ continue
+ }
+
+ // make sure the value is the right sort of thing
+ if _, ok := curr[b].(map[string]interface{}); !ok {
+ // have to replace with something suitable
+ n := make(map[string]interface{})
+ curr[b] = n
+ }
+
+ curr = curr[b].(map[string]interface{})
+ }
+
+ // add remaining k/v
+ curr[branch[len(branch)-1]] = val
+}
+
+// Del modifies `Json` map by deleting `key` if it is present.
+func (j *Json) Del(key string) {
+ m, err := j.Map()
+ if err != nil {
+ return
+ }
+ delete(m, key)
+}
+
+// Get returns a pointer to a new `Json` object
+// for `key` in its `map` representation
+//
+// useful for chaining operations (to traverse a nested JSON):
+// js.Get("top_level").Get("dict").Get("value").Int()
+func (j *Json) Get(key string) *Json {
+ m, err := j.Map()
+ if err == nil {
+ if val, ok := m[key]; ok {
+ return &Json{val}
+ }
+ }
+ return &Json{nil}
+}
+
+// GetPath searches for the item as specified by the branch
+// without the need to deep dive using Get()'s.
+//
+// js.GetPath("top_level", "dict")
+func (j *Json) GetPath(branch ...string) *Json {
+ jin := j
+ for _, p := range branch {
+ jin = jin.Get(p)
+ }
+ return jin
+}
+
+// GetIndex returns a pointer to a new `Json` object
+// for `index` in its `array` representation
+//
+// this is the analog to Get when accessing elements of
+// a json array instead of a json object:
+// js.Get("top_level").Get("array").GetIndex(1).Get("key").Int()
+func (j *Json) GetIndex(index int) *Json {
+ a, err := j.Array()
+ if err == nil {
+ if len(a) > index {
+ return &Json{a[index]}
+ }
+ }
+ return &Json{nil}
+}
+
+// CheckGet returns a pointer to a new `Json` object and
+// a `bool` identifying success or failure
+//
+// useful for chained operations when success is important:
+// if data, ok := js.Get("top_level").CheckGet("inner"); ok {
+// log.Println(data)
+// }
+func (j *Json) CheckGet(key string) (*Json, bool) {
+ m, err := j.Map()
+ if err == nil {
+ if val, ok := m[key]; ok {
+ return &Json{val}, true
+ }
+ }
+ return nil, false
+}
+
+// Map type asserts to `map`
+func (j *Json) Map() (map[string]interface{}, error) {
+ if m, ok := (j.data).(map[string]interface{}); ok {
+ return m, nil
+ }
+ return nil, errors.New("type assertion to map[string]interface{} failed")
+}
+
+// Array type asserts to an `array`
+func (j *Json) Array() ([]interface{}, error) {
+ if a, ok := (j.data).([]interface{}); ok {
+ return a, nil
+ }
+ return nil, errors.New("type assertion to []interface{} failed")
+}
+
+// Bool type asserts to `bool`
+func (j *Json) Bool() (bool, error) {
+ if s, ok := (j.data).(bool); ok {
+ return s, nil
+ }
+ return false, errors.New("type assertion to bool failed")
+}
+
+// String type asserts to `string`
+func (j *Json) String() (string, error) {
+ if s, ok := (j.data).(string); ok {
+ return s, nil
+ }
+ return "", errors.New("type assertion to string failed")
+}
+
+// Bytes type asserts to `[]byte`
+func (j *Json) Bytes() ([]byte, error) {
+ if s, ok := (j.data).(string); ok {
+ return []byte(s), nil
+ }
+ return nil, errors.New("type assertion to []byte failed")
+}
+
+// StringArray type asserts to an `array` of `string`
+func (j *Json) StringArray() ([]string, error) {
+ arr, err := j.Array()
+ if err != nil {
+ return nil, err
+ }
+ retArr := make([]string, 0, len(arr))
+ for _, a := range arr {
+ if a == nil {
+ retArr = append(retArr, "")
+ continue
+ }
+ s, ok := a.(string)
+ if !ok {
+ return nil, err
+ }
+ retArr = append(retArr, s)
+ }
+ return retArr, nil
+}
+
+// MustArray guarantees the return of a `[]interface{}` (with optional default)
+//
+// useful when you want to interate over array values in a succinct manner:
+// for i, v := range js.Get("results").MustArray() {
+// fmt.Println(i, v)
+// }
+func (j *Json) MustArray(args ...[]interface{}) []interface{} {
+ var def []interface{}
+
+ switch len(args) {
+ case 0:
+ case 1:
+ def = args[0]
+ default:
+ log.Panicf("MustArray() received too many arguments %d", len(args))
+ }
+
+ a, err := j.Array()
+ if err == nil {
+ return a
+ }
+
+ return def
+}
+
+// MustMap guarantees the return of a `map[string]interface{}` (with optional default)
+//
+// useful when you want to interate over map values in a succinct manner:
+// for k, v := range js.Get("dictionary").MustMap() {
+// fmt.Println(k, v)
+// }
+func (j *Json) MustMap(args ...map[string]interface{}) map[string]interface{} {
+ var def map[string]interface{}
+
+ switch len(args) {
+ case 0:
+ case 1:
+ def = args[0]
+ default:
+ log.Panicf("MustMap() received too many arguments %d", len(args))
+ }
+
+ a, err := j.Map()
+ if err == nil {
+ return a
+ }
+
+ return def
+}
+
+// MustString guarantees the return of a `string` (with optional default)
+//
+// useful when you explicitly want a `string` in a single value return context:
+// myFunc(js.Get("param1").MustString(), js.Get("optional_param").MustString("my_default"))
+func (j *Json) MustString(args ...string) string {
+ var def string
+
+ switch len(args) {
+ case 0:
+ case 1:
+ def = args[0]
+ default:
+ log.Panicf("MustString() received too many arguments %d", len(args))
+ }
+
+ s, err := j.String()
+ if err == nil {
+ return s
+ }
+
+ return def
+}
+
+// MustStringArray guarantees the return of a `[]string` (with optional default)
+//
+// useful when you want to interate over array values in a succinct manner:
+// for i, s := range js.Get("results").MustStringArray() {
+// fmt.Println(i, s)
+// }
+func (j *Json) MustStringArray(args ...[]string) []string {
+ var def []string
+
+ switch len(args) {
+ case 0:
+ case 1:
+ def = args[0]
+ default:
+ log.Panicf("MustStringArray() received too many arguments %d", len(args))
+ }
+
+ a, err := j.StringArray()
+ if err == nil {
+ return a
+ }
+
+ return def
+}
+
+// MustInt guarantees the return of an `int` (with optional default)
+//
+// useful when you explicitly want an `int` in a single value return context:
+// myFunc(js.Get("param1").MustInt(), js.Get("optional_param").MustInt(5150))
+func (j *Json) MustInt(args ...int) int {
+ var def int
+
+ switch len(args) {
+ case 0:
+ case 1:
+ def = args[0]
+ default:
+ log.Panicf("MustInt() received too many arguments %d", len(args))
+ }
+
+ i, err := j.Int()
+ if err == nil {
+ return i
+ }
+
+ return def
+}
+
+// MustFloat64 guarantees the return of a `float64` (with optional default)
+//
+// useful when you explicitly want a `float64` in a single value return context:
+// myFunc(js.Get("param1").MustFloat64(), js.Get("optional_param").MustFloat64(5.150))
+func (j *Json) MustFloat64(args ...float64) float64 {
+ var def float64
+
+ switch len(args) {
+ case 0:
+ case 1:
+ def = args[0]
+ default:
+ log.Panicf("MustFloat64() received too many arguments %d", len(args))
+ }
+
+ f, err := j.Float64()
+ if err == nil {
+ return f
+ }
+
+ return def
+}
+
+// MustBool guarantees the return of a `bool` (with optional default)
+//
+// useful when you explicitly want a `bool` in a single value return context:
+// myFunc(js.Get("param1").MustBool(), js.Get("optional_param").MustBool(true))
+func (j *Json) MustBool(args ...bool) bool {
+ var def bool
+
+ switch len(args) {
+ case 0:
+ case 1:
+ def = args[0]
+ default:
+ log.Panicf("MustBool() received too many arguments %d", len(args))
+ }
+
+ b, err := j.Bool()
+ if err == nil {
+ return b
+ }
+
+ return def
+}
+
+// MustInt64 guarantees the return of an `int64` (with optional default)
+//
+// useful when you explicitly want an `int64` in a single value return context:
+// myFunc(js.Get("param1").MustInt64(), js.Get("optional_param").MustInt64(5150))
+func (j *Json) MustInt64(args ...int64) int64 {
+ var def int64
+
+ switch len(args) {
+ case 0:
+ case 1:
+ def = args[0]
+ default:
+ log.Panicf("MustInt64() received too many arguments %d", len(args))
+ }
+
+ i, err := j.Int64()
+ if err == nil {
+ return i
+ }
+
+ return def
+}
+
+// MustUInt64 guarantees the return of an `uint64` (with optional default)
+//
+// useful when you explicitly want an `uint64` in a single value return context:
+// myFunc(js.Get("param1").MustUint64(), js.Get("optional_param").MustUint64(5150))
+func (j *Json) MustUint64(args ...uint64) uint64 {
+ var def uint64
+
+ switch len(args) {
+ case 0:
+ case 1:
+ def = args[0]
+ default:
+ log.Panicf("MustUint64() received too many arguments %d", len(args))
+ }
+
+ i, err := j.Uint64()
+ if err == nil {
+ return i
+ }
+
+ return def
+}
diff --git a/vendor/github.com/bitly/go-simplejson/simplejson_go10.go b/vendor/github.com/bitly/go-simplejson/simplejson_go10.go
new file mode 100644
index 00000000000..c9151e9be85
--- /dev/null
+++ b/vendor/github.com/bitly/go-simplejson/simplejson_go10.go
@@ -0,0 +1,75 @@
+// +build !go1.1
+
+package simplejson
+
+import (
+ "encoding/json"
+ "errors"
+ "io"
+ "reflect"
+)
+
+// NewFromReader returns a *Json by decoding from an io.Reader
+func NewFromReader(r io.Reader) (*Json, error) {
+ j := new(Json)
+ dec := json.NewDecoder(r)
+ err := dec.Decode(&j.data)
+ return j, err
+}
+
+// Implements the json.Unmarshaler interface.
+func (j *Json) UnmarshalJSON(p []byte) error {
+ return json.Unmarshal(p, &j.data)
+}
+
+// Float64 coerces into a float64
+func (j *Json) Float64() (float64, error) {
+ switch j.data.(type) {
+ case float32, float64:
+ return reflect.ValueOf(j.data).Float(), nil
+ case int, int8, int16, int32, int64:
+ return float64(reflect.ValueOf(j.data).Int()), nil
+ case uint, uint8, uint16, uint32, uint64:
+ return float64(reflect.ValueOf(j.data).Uint()), nil
+ }
+ return 0, errors.New("invalid value type")
+}
+
+// Int coerces into an int
+func (j *Json) Int() (int, error) {
+ switch j.data.(type) {
+ case float32, float64:
+ return int(reflect.ValueOf(j.data).Float()), nil
+ case int, int8, int16, int32, int64:
+ return int(reflect.ValueOf(j.data).Int()), nil
+ case uint, uint8, uint16, uint32, uint64:
+ return int(reflect.ValueOf(j.data).Uint()), nil
+ }
+ return 0, errors.New("invalid value type")
+}
+
+// Int64 coerces into an int64
+func (j *Json) Int64() (int64, error) {
+ switch j.data.(type) {
+ case float32, float64:
+ return int64(reflect.ValueOf(j.data).Float()), nil
+ case int, int8, int16, int32, int64:
+ return reflect.ValueOf(j.data).Int(), nil
+ case uint, uint8, uint16, uint32, uint64:
+ return int64(reflect.ValueOf(j.data).Uint()), nil
+ }
+ return 0, errors.New("invalid value type")
+}
+
+// Uint64 coerces into an uint64
+func (j *Json) Uint64() (uint64, error) {
+ switch j.data.(type) {
+ case float32, float64:
+ return uint64(reflect.ValueOf(j.data).Float()), nil
+ case int, int8, int16, int32, int64:
+ return uint64(reflect.ValueOf(j.data).Int()), nil
+ case uint, uint8, uint16, uint32, uint64:
+ return reflect.ValueOf(j.data).Uint(), nil
+ }
+ return 0, errors.New("invalid value type")
+}
diff --git a/vendor/github.com/bitly/go-simplejson/simplejson_go11.go b/vendor/github.com/bitly/go-simplejson/simplejson_go11.go
new file mode 100644
index 00000000000..1c479532cf0
--- /dev/null
+++ b/vendor/github.com/bitly/go-simplejson/simplejson_go11.go
@@ -0,0 +1,89 @@
+// +build go1.1
+
+package simplejson
+
+import (
+ "bytes"
+ "encoding/json"
+ "errors"
+ "io"
+ "reflect"
+ "strconv"
+)
+
+// Implements the json.Unmarshaler interface.
+func (j *Json) UnmarshalJSON(p []byte) error {
+ dec := json.NewDecoder(bytes.NewBuffer(p))
+ dec.UseNumber()
+ return dec.Decode(&j.data)
+}
+
+// NewFromReader returns a *Json by decoding from an io.Reader
+func NewFromReader(r io.Reader) (*Json, error) {
+ j := new(Json)
+ dec := json.NewDecoder(r)
+ dec.UseNumber()
+ err := dec.Decode(&j.data)
+ return j, err
+}
+
+// Float64 coerces into a float64
+func (j *Json) Float64() (float64, error) {
+ switch j.data.(type) {
+ case json.Number:
+ return j.data.(json.Number).Float64()
+ case float32, float64:
+ return reflect.ValueOf(j.data).Float(), nil
+ case int, int8, int16, int32, int64:
+ return float64(reflect.ValueOf(j.data).Int()), nil
+ case uint, uint8, uint16, uint32, uint64:
+ return float64(reflect.ValueOf(j.data).Uint()), nil
+ }
+ return 0, errors.New("invalid value type")
+}
+
+// Int coerces into an int
+func (j *Json) Int() (int, error) {
+ switch j.data.(type) {
+ case json.Number:
+ i, err := j.data.(json.Number).Int64()
+ return int(i), err
+ case float32, float64:
+ return int(reflect.ValueOf(j.data).Float()), nil
+ case int, int8, int16, int32, int64:
+ return int(reflect.ValueOf(j.data).Int()), nil
+ case uint, uint8, uint16, uint32, uint64:
+ return int(reflect.ValueOf(j.data).Uint()), nil
+ }
+ return 0, errors.New("invalid value type")
+}
+
+// Int64 coerces into an int64
+func (j *Json) Int64() (int64, error) {
+ switch j.data.(type) {
+ case json.Number:
+ return j.data.(json.Number).Int64()
+ case float32, float64:
+ return int64(reflect.ValueOf(j.data).Float()), nil
+ case int, int8, int16, int32, int64:
+ return reflect.ValueOf(j.data).Int(), nil
+ case uint, uint8, uint16, uint32, uint64:
+ return int64(reflect.ValueOf(j.data).Uint()), nil
+ }
+ return 0, errors.New("invalid value type")
+}
+
+// Uint64 coerces into an uint64
+func (j *Json) Uint64() (uint64, error) {
+ switch j.data.(type) {
+ case json.Number:
+ return strconv.ParseUint(j.data.(json.Number).String(), 10, 64)
+ case float32, float64:
+ return uint64(reflect.ValueOf(j.data).Float()), nil
+ case int, int8, int16, int32, int64:
+ return uint64(reflect.ValueOf(j.data).Int()), nil
+ case uint, uint8, uint16, uint32, uint64:
+ return reflect.ValueOf(j.data).Uint(), nil
+ }
+ return 0, errors.New("invalid value type")
+}
diff --git a/vendor/github.com/bmizerany/assert/README.md b/vendor/github.com/bmizerany/assert/README.md
index 8b6b6fc4fc6..a682983a286 100644
--- a/vendor/github.com/bmizerany/assert/README.md
+++ b/vendor/github.com/bmizerany/assert/README.md
@@ -1,3 +1,5 @@
+# NO LONGER MAINTAINED - Just use Go's testing package.
+
# Assert (c) Blake Mizerany and Keith Rarick -- MIT LICENCE
## Assertions for Go tests
diff --git a/vendor/github.com/bmizerany/assert/example/point.go b/vendor/github.com/bmizerany/assert/example/point.go
deleted file mode 100644
index 15789fe10f4..00000000000
--- a/vendor/github.com/bmizerany/assert/example/point.go
+++ /dev/null
@@ -1,5 +0,0 @@
-package point
-
-type Point struct {
- X, Y int
-}
diff --git a/vendor/github.com/bmizerany/assert/example/point_test.go b/vendor/github.com/bmizerany/assert/example/point_test.go
deleted file mode 100644
index 34e791a43c9..00000000000
--- a/vendor/github.com/bmizerany/assert/example/point_test.go
+++ /dev/null
@@ -1,13 +0,0 @@
-package point
-
-import (
- "testing"
- "assert"
-)
-
-func TestAsserts(t *testing.T) {
- p1 := Point{1, 1}
- p2 := Point{2, 1}
-
- assert.Equal(t, p1, p2)
-}
diff --git a/vendor/github.com/bradfitz/gomemcache/.gitignore b/vendor/github.com/bradfitz/gomemcache/.gitignore
new file mode 100644
index 00000000000..02c604d7a84
--- /dev/null
+++ b/vendor/github.com/bradfitz/gomemcache/.gitignore
@@ -0,0 +1,3 @@
+_*
+*.out
+*~
diff --git a/vendor/github.com/bradfitz/gomemcache/README.md b/vendor/github.com/bradfitz/gomemcache/README.md
new file mode 100644
index 00000000000..f987363ccd3
--- /dev/null
+++ b/vendor/github.com/bradfitz/gomemcache/README.md
@@ -0,0 +1,37 @@
+## About
+
+This is a memcache client library for the Go programming language
+(http://golang.org/).
+
+## Installing
+
+### Using *go get*
+
+ $ go get github.com/bradfitz/gomemcache/memcache
+
+After this command *gomemcache* is ready to use. Its source will be in:
+
+ $GOPATH/src/github.com/bradfitz/gomemcache/memcache
+
+## Example
+
+ import (
+ "github.com/bradfitz/gomemcache/memcache"
+ )
+
+ func main() {
+ mc := memcache.New("10.0.0.1:11211", "10.0.0.2:11211", "10.0.0.3:11212")
+ mc.Set(&memcache.Item{Key: "foo", Value: []byte("my value")})
+
+ it, err := mc.Get("foo")
+ ...
+ }
+
+## Full docs, see:
+
+See https://godoc.org/github.com/bradfitz/gomemcache/memcache
+
+Or run:
+
+ $ godoc github.com/bradfitz/gomemcache/memcache
+
diff --git a/vendor/github.com/bradfitz/gomemcache/memcache/memcache.go b/vendor/github.com/bradfitz/gomemcache/memcache/memcache.go
index 6eed4fbe003..b98a7653467 100644
--- a/vendor/github.com/bradfitz/gomemcache/memcache/memcache.go
+++ b/vendor/github.com/bradfitz/gomemcache/memcache/memcache.go
@@ -56,7 +56,7 @@ var (
ErrNoStats = errors.New("memcache: no statistics available")
// ErrMalformedKey is returned when an invalid key is used.
- // Keys must be at maximum 250 bytes long, ASCII, and not
+ // Keys must be at maximum 250 bytes long and not
// contain whitespace or control characters.
ErrMalformedKey = errors.New("malformed: key is too long or contains invalid characters")
@@ -64,14 +64,17 @@ var (
ErrNoServers = errors.New("memcache: no servers configured or available")
)
-// DefaultTimeout is the default socket read/write timeout.
-const DefaultTimeout = 100 * time.Millisecond
-
const (
- buffered = 8 // arbitrary buffered channel size, for readability
- maxIdleConnsPerAddr = 2 // TODO(bradfitz): make this configurable?
+ // DefaultTimeout is the default socket read/write timeout.
+ DefaultTimeout = 100 * time.Millisecond
+
+ // DefaultMaxIdleConns is the default maximum number of idle connections
+ // kept for any single address.
+ DefaultMaxIdleConns = 2
)
+const buffered = 8 // arbitrary buffered channel size, for readability
+
// resumableError returns true if err is only a protocol-level cache error.
// This is used to determine whether or not a server connection should
// be re-used or not. If an error occurs, by default we don't reuse the
@@ -89,7 +92,7 @@ func legalKey(key string) bool {
return false
}
for i := 0; i < len(key); i++ {
- if key[i] <= ' ' || key[i] > 0x7e {
+ if key[i] <= ' ' || key[i] == 0x7f {
return false
}
}
@@ -133,6 +136,14 @@ type Client struct {
// If zero, DefaultTimeout is used.
Timeout time.Duration
+ // MaxIdleConns specifies the maximum number of idle connections that will
+ // be maintained per address. If less than one, DefaultMaxIdleConns will be
+ // used.
+ //
+ // Consider your expected traffic rates and latency carefully. This should
+ // be set to a number higher than your peak parallel requests.
+ MaxIdleConns int
+
selector ServerSelector
lk sync.Mutex
@@ -147,9 +158,6 @@ type Item struct {
// Value is the Item's value.
Value []byte
- // Object is the Item's value for use with a Codec.
- Object interface{}
-
// Flags are server-opaque flags whose semantics are entirely
// up to the app.
Flags uint32
@@ -199,7 +207,7 @@ func (c *Client) putFreeConn(addr net.Addr, cn *conn) {
c.freeconn = make(map[string][]*conn)
}
freelist := c.freeconn[addr.String()]
- if len(freelist) >= maxIdleConnsPerAddr {
+ if len(freelist) >= c.maxIdleConns() {
cn.nc.Close()
return
}
@@ -228,6 +236,13 @@ func (c *Client) netTimeout() time.Duration {
return DefaultTimeout
}
+func (c *Client) maxIdleConns() int {
+ if c.MaxIdleConns > 0 {
+ return c.MaxIdleConns
+ }
+ return DefaultMaxIdleConns
+}
+
// ConnectTimeoutError is the error type used when it takes
// too long to connect to the desired host. This level of
// detail can generally be ignored.
diff --git a/vendor/github.com/bradfitz/gomemcache/memcache/selector.go b/vendor/github.com/bradfitz/gomemcache/memcache/selector.go
index 10b04d349fe..89ad81e0d83 100644
--- a/vendor/github.com/bradfitz/gomemcache/memcache/selector.go
+++ b/vendor/github.com/bradfitz/gomemcache/memcache/selector.go
@@ -41,6 +41,21 @@ type ServerList struct {
addrs []net.Addr
}
+// staticAddr caches the Network() and String() values from any net.Addr.
+type staticAddr struct {
+ ntw, str string
+}
+
+func newStaticAddr(a net.Addr) net.Addr {
+ return &staticAddr{
+ ntw: a.Network(),
+ str: a.String(),
+ }
+}
+
+func (s *staticAddr) Network() string { return s.ntw }
+func (s *staticAddr) String() string { return s.str }
+
// SetServers changes a ServerList's set of servers at runtime and is
// safe for concurrent use by multiple goroutines.
//
@@ -58,13 +73,13 @@ func (ss *ServerList) SetServers(servers ...string) error {
if err != nil {
return err
}
- naddr[i] = addr
+ naddr[i] = newStaticAddr(addr)
} else {
tcpaddr, err := net.ResolveTCPAddr("tcp", server)
if err != nil {
return err
}
- naddr[i] = tcpaddr
+ naddr[i] = newStaticAddr(tcpaddr)
}
}
diff --git a/vendor/github.com/codegangsta/cli/.flake8 b/vendor/github.com/codegangsta/cli/.flake8
new file mode 100644
index 00000000000..6deafc26170
--- /dev/null
+++ b/vendor/github.com/codegangsta/cli/.flake8
@@ -0,0 +1,2 @@
+[flake8]
+max-line-length = 120
diff --git a/vendor/github.com/codegangsta/cli/.gitignore b/vendor/github.com/codegangsta/cli/.gitignore
new file mode 100644
index 00000000000..faf70c4c240
--- /dev/null
+++ b/vendor/github.com/codegangsta/cli/.gitignore
@@ -0,0 +1,2 @@
+*.coverprofile
+node_modules/
diff --git a/vendor/github.com/codegangsta/cli/.travis.yml b/vendor/github.com/codegangsta/cli/.travis.yml
index 87ba52f98ea..cf8d0980dca 100644
--- a/vendor/github.com/codegangsta/cli/.travis.yml
+++ b/vendor/github.com/codegangsta/cli/.travis.yml
@@ -1,19 +1,27 @@
language: go
sudo: false
+dist: trusty
+osx_image: xcode8.3
+go: 1.8.x
-go:
-- 1.0.3
-- 1.1.2
-- 1.2.2
-- 1.3.3
-- 1.4.2
-- 1.5.1
-- tip
+os:
+- linux
+- osx
-matrix:
- allow_failures:
- - go: tip
+cache:
+ directories:
+ - node_modules
+
+before_script:
+- go get github.com/urfave/gfmrun/... || true
+- go get golang.org/x/tools/cmd/goimports
+- if [ ! -f node_modules/.bin/markdown-toc ] ; then
+ npm install markdown-toc ;
+ fi
script:
-- go vet ./...
-- go test -v ./...
+- ./runtests gen
+- ./runtests vet
+- ./runtests test
+- ./runtests gfmrun
+- ./runtests toc
diff --git a/vendor/github.com/codegangsta/cli/CHANGELOG.md b/vendor/github.com/codegangsta/cli/CHANGELOG.md
new file mode 100644
index 00000000000..401eae5a2cc
--- /dev/null
+++ b/vendor/github.com/codegangsta/cli/CHANGELOG.md
@@ -0,0 +1,435 @@
+# Change Log
+
+**ATTN**: This project uses [semantic versioning](http://semver.org/).
+
+## [Unreleased]
+
+## 1.20.0 - 2017-08-10
+
+### Fixed
+
+* `HandleExitCoder` is now correctly iterates over all errors in
+ a `MultiError`. The exit code is the exit code of the last error or `1` if
+ there are no `ExitCoder`s in the `MultiError`.
+* Fixed YAML file loading on Windows (previously would fail validate the file path)
+* Subcommand `Usage`, `Description`, `ArgsUsage`, `OnUsageError` correctly
+ propogated
+* `ErrWriter` is now passed downwards through command structure to avoid the
+ need to redefine it
+* Pass `Command` context into `OnUsageError` rather than parent context so that
+ all fields are avaiable
+* Errors occuring in `Before` funcs are no longer double printed
+* Use `UsageText` in the help templates for commands and subcommands if
+ defined; otherwise build the usage as before (was previously ignoring this
+ field)
+* `IsSet` and `GlobalIsSet` now correctly return whether a flag is set if
+ a program calls `Set` or `GlobalSet` directly after flag parsing (would
+ previously only return `true` if the flag was set during parsing)
+
+### Changed
+
+* No longer exit the program on command/subcommand error if the error raised is
+ not an `OsExiter`. This exiting behavior was introduced in 1.19.0, but was
+ determined to be a regression in functionality. See [the
+ PR](https://github.com/urfave/cli/pull/595) for discussion.
+
+### Added
+
+* `CommandsByName` type was added to make it easy to sort `Command`s by name,
+ alphabetically
+* `altsrc` now handles loading of string and int arrays from TOML
+* Support for definition of custom help templates for `App` via
+ `CustomAppHelpTemplate`
+* Support for arbitrary key/value fields on `App` to be used with
+ `CustomAppHelpTemplate` via `ExtraInfo`
+* `HelpFlag`, `VersionFlag`, and `BashCompletionFlag` changed to explictly be
+ `cli.Flag`s allowing for the use of custom flags satisfying the `cli.Flag`
+ interface to be used.
+
+
+## [1.19.1] - 2016-11-21
+
+### Fixed
+
+- Fixes regression introduced in 1.19.0 where using an `ActionFunc` as
+ the `Action` for a command would cause it to error rather than calling the
+ function. Should not have a affected declarative cases using `func(c
+ *cli.Context) err)`.
+- Shell completion now handles the case where the user specifies
+ `--generate-bash-completion` immediately after a flag that takes an argument.
+ Previously it call the application with `--generate-bash-completion` as the
+ flag value.
+
+## [1.19.0] - 2016-11-19
+### Added
+- `FlagsByName` was added to make it easy to sort flags (e.g. `sort.Sort(cli.FlagsByName(app.Flags))`)
+- A `Description` field was added to `App` for a more detailed description of
+ the application (similar to the existing `Description` field on `Command`)
+- Flag type code generation via `go generate`
+- Write to stderr and exit 1 if action returns non-nil error
+- Added support for TOML to the `altsrc` loader
+- `SkipArgReorder` was added to allow users to skip the argument reordering.
+ This is useful if you want to consider all "flags" after an argument as
+ arguments rather than flags (the default behavior of the stdlib `flag`
+ library). This is backported functionality from the [removal of the flag
+ reordering](https://github.com/urfave/cli/pull/398) in the unreleased version
+ 2
+- For formatted errors (those implementing `ErrorFormatter`), the errors will
+ be formatted during output. Compatible with `pkg/errors`.
+
+### Changed
+- Raise minimum tested/supported Go version to 1.2+
+
+### Fixed
+- Consider empty environment variables as set (previously environment variables
+ with the equivalent of `""` would be skipped rather than their value used).
+- Return an error if the value in a given environment variable cannot be parsed
+ as the flag type. Previously these errors were silently swallowed.
+- Print full error when an invalid flag is specified (which includes the invalid flag)
+- `App.Writer` defaults to `stdout` when `nil`
+- If no action is specified on a command or app, the help is now printed instead of `panic`ing
+- `App.Metadata` is initialized automatically now (previously was `nil` unless initialized)
+- Correctly show help message if `-h` is provided to a subcommand
+- `context.(Global)IsSet` now respects environment variables. Previously it
+ would return `false` if a flag was specified in the environment rather than
+ as an argument
+- Removed deprecation warnings to STDERR to avoid them leaking to the end-user
+- `altsrc`s import paths were updated to use `gopkg.in/urfave/cli.v1`. This
+ fixes issues that occurred when `gopkg.in/urfave/cli.v1` was imported as well
+ as `altsrc` where Go would complain that the types didn't match
+
+## [1.18.1] - 2016-08-28
+### Fixed
+- Removed deprecation warnings to STDERR to avoid them leaking to the end-user (backported)
+
+## [1.18.0] - 2016-06-27
+### Added
+- `./runtests` test runner with coverage tracking by default
+- testing on OS X
+- testing on Windows
+- `UintFlag`, `Uint64Flag`, and `Int64Flag` types and supporting code
+
+### Changed
+- Use spaces for alignment in help/usage output instead of tabs, making the
+ output alignment consistent regardless of tab width
+
+### Fixed
+- Printing of command aliases in help text
+- Printing of visible flags for both struct and struct pointer flags
+- Display the `help` subcommand when using `CommandCategories`
+- No longer swallows `panic`s that occur within the `Action`s themselves when
+ detecting the signature of the `Action` field
+
+## [1.17.1] - 2016-08-28
+### Fixed
+- Removed deprecation warnings to STDERR to avoid them leaking to the end-user
+
+## [1.17.0] - 2016-05-09
+### Added
+- Pluggable flag-level help text rendering via `cli.DefaultFlagStringFunc`
+- `context.GlobalBoolT` was added as an analogue to `context.GlobalBool`
+- Support for hiding commands by setting `Hidden: true` -- this will hide the
+ commands in help output
+
+### Changed
+- `Float64Flag`, `IntFlag`, and `DurationFlag` default values are no longer
+ quoted in help text output.
+- All flag types now include `(default: {value})` strings following usage when a
+ default value can be (reasonably) detected.
+- `IntSliceFlag` and `StringSliceFlag` usage strings are now more consistent
+ with non-slice flag types
+- Apps now exit with a code of 3 if an unknown subcommand is specified
+ (previously they printed "No help topic for...", but still exited 0. This
+ makes it easier to script around apps built using `cli` since they can trust
+ that a 0 exit code indicated a successful execution.
+- cleanups based on [Go Report Card
+ feedback](https://goreportcard.com/report/github.com/urfave/cli)
+
+## [1.16.1] - 2016-08-28
+### Fixed
+- Removed deprecation warnings to STDERR to avoid them leaking to the end-user
+
+## [1.16.0] - 2016-05-02
+### Added
+- `Hidden` field on all flag struct types to omit from generated help text
+
+### Changed
+- `BashCompletionFlag` (`--enable-bash-completion`) is now omitted from
+generated help text via the `Hidden` field
+
+### Fixed
+- handling of error values in `HandleAction` and `HandleExitCoder`
+
+## [1.15.0] - 2016-04-30
+### Added
+- This file!
+- Support for placeholders in flag usage strings
+- `App.Metadata` map for arbitrary data/state management
+- `Set` and `GlobalSet` methods on `*cli.Context` for altering values after
+parsing.
+- Support for nested lookup of dot-delimited keys in structures loaded from
+YAML.
+
+### Changed
+- The `App.Action` and `Command.Action` now prefer a return signature of
+`func(*cli.Context) error`, as defined by `cli.ActionFunc`. If a non-nil
+`error` is returned, there may be two outcomes:
+ - If the error fulfills `cli.ExitCoder`, then `os.Exit` will be called
+ automatically
+ - Else the error is bubbled up and returned from `App.Run`
+- Specifying an `Action` with the legacy return signature of
+`func(*cli.Context)` will produce a deprecation message to stderr
+- Specifying an `Action` that is not a `func` type will produce a non-zero exit
+from `App.Run`
+- Specifying an `Action` func that has an invalid (input) signature will
+produce a non-zero exit from `App.Run`
+
+### Deprecated
+-
+`cli.App.RunAndExitOnError`, which should now be done by returning an error
+that fulfills `cli.ExitCoder` to `cli.App.Run`.
+- the legacy signature for
+`cli.App.Action` of `func(*cli.Context)`, which should now have a return
+signature of `func(*cli.Context) error`, as defined by `cli.ActionFunc`.
+
+### Fixed
+- Added missing `*cli.Context.GlobalFloat64` method
+
+## [1.14.0] - 2016-04-03 (backfilled 2016-04-25)
+### Added
+- Codebeat badge
+- Support for categorization via `CategorizedHelp` and `Categories` on app.
+
+### Changed
+- Use `filepath.Base` instead of `path.Base` in `Name` and `HelpName`.
+
+### Fixed
+- Ensure version is not shown in help text when `HideVersion` set.
+
+## [1.13.0] - 2016-03-06 (backfilled 2016-04-25)
+### Added
+- YAML file input support.
+- `NArg` method on context.
+
+## [1.12.0] - 2016-02-17 (backfilled 2016-04-25)
+### Added
+- Custom usage error handling.
+- Custom text support in `USAGE` section of help output.
+- Improved help messages for empty strings.
+- AppVeyor CI configuration.
+
+### Changed
+- Removed `panic` from default help printer func.
+- De-duping and optimizations.
+
+### Fixed
+- Correctly handle `Before`/`After` at command level when no subcommands.
+- Case of literal `-` argument causing flag reordering.
+- Environment variable hints on Windows.
+- Docs updates.
+
+## [1.11.1] - 2015-12-21 (backfilled 2016-04-25)
+### Changed
+- Use `path.Base` in `Name` and `HelpName`
+- Export `GetName` on flag types.
+
+### Fixed
+- Flag parsing when skipping is enabled.
+- Test output cleanup.
+- Move completion check to account for empty input case.
+
+## [1.11.0] - 2015-11-15 (backfilled 2016-04-25)
+### Added
+- Destination scan support for flags.
+- Testing against `tip` in Travis CI config.
+
+### Changed
+- Go version in Travis CI config.
+
+### Fixed
+- Removed redundant tests.
+- Use correct example naming in tests.
+
+## [1.10.2] - 2015-10-29 (backfilled 2016-04-25)
+### Fixed
+- Remove unused var in bash completion.
+
+## [1.10.1] - 2015-10-21 (backfilled 2016-04-25)
+### Added
+- Coverage and reference logos in README.
+
+### Fixed
+- Use specified values in help and version parsing.
+- Only display app version and help message once.
+
+## [1.10.0] - 2015-10-06 (backfilled 2016-04-25)
+### Added
+- More tests for existing functionality.
+- `ArgsUsage` at app and command level for help text flexibility.
+
+### Fixed
+- Honor `HideHelp` and `HideVersion` in `App.Run`.
+- Remove juvenile word from README.
+
+## [1.9.0] - 2015-09-08 (backfilled 2016-04-25)
+### Added
+- `FullName` on command with accompanying help output update.
+- Set default `$PROG` in bash completion.
+
+### Changed
+- Docs formatting.
+
+### Fixed
+- Removed self-referential imports in tests.
+
+## [1.8.0] - 2015-06-30 (backfilled 2016-04-25)
+### Added
+- Support for `Copyright` at app level.
+- `Parent` func at context level to walk up context lineage.
+
+### Fixed
+- Global flag processing at top level.
+
+## [1.7.1] - 2015-06-11 (backfilled 2016-04-25)
+### Added
+- Aggregate errors from `Before`/`After` funcs.
+- Doc comments on flag structs.
+- Include non-global flags when checking version and help.
+- Travis CI config updates.
+
+### Fixed
+- Ensure slice type flags have non-nil values.
+- Collect global flags from the full command hierarchy.
+- Docs prose.
+
+## [1.7.0] - 2015-05-03 (backfilled 2016-04-25)
+### Changed
+- `HelpPrinter` signature includes output writer.
+
+### Fixed
+- Specify go 1.1+ in docs.
+- Set `Writer` when running command as app.
+
+## [1.6.0] - 2015-03-23 (backfilled 2016-04-25)
+### Added
+- Multiple author support.
+- `NumFlags` at context level.
+- `Aliases` at command level.
+
+### Deprecated
+- `ShortName` at command level.
+
+### Fixed
+- Subcommand help output.
+- Backward compatible support for deprecated `Author` and `Email` fields.
+- Docs regarding `Names`/`Aliases`.
+
+## [1.5.0] - 2015-02-20 (backfilled 2016-04-25)
+### Added
+- `After` hook func support at app and command level.
+
+### Fixed
+- Use parsed context when running command as subcommand.
+- Docs prose.
+
+## [1.4.1] - 2015-01-09 (backfilled 2016-04-25)
+### Added
+- Support for hiding `-h / --help` flags, but not `help` subcommand.
+- Stop flag parsing after `--`.
+
+### Fixed
+- Help text for generic flags to specify single value.
+- Use double quotes in output for defaults.
+- Use `ParseInt` instead of `ParseUint` for int environment var values.
+- Use `0` as base when parsing int environment var values.
+
+## [1.4.0] - 2014-12-12 (backfilled 2016-04-25)
+### Added
+- Support for environment variable lookup "cascade".
+- Support for `Stdout` on app for output redirection.
+
+### Fixed
+- Print command help instead of app help in `ShowCommandHelp`.
+
+## [1.3.1] - 2014-11-13 (backfilled 2016-04-25)
+### Added
+- Docs and example code updates.
+
+### Changed
+- Default `-v / --version` flag made optional.
+
+## [1.3.0] - 2014-08-10 (backfilled 2016-04-25)
+### Added
+- `FlagNames` at context level.
+- Exposed `VersionPrinter` var for more control over version output.
+- Zsh completion hook.
+- `AUTHOR` section in default app help template.
+- Contribution guidelines.
+- `DurationFlag` type.
+
+## [1.2.0] - 2014-08-02
+### Added
+- Support for environment variable defaults on flags plus tests.
+
+## [1.1.0] - 2014-07-15
+### Added
+- Bash completion.
+- Optional hiding of built-in help command.
+- Optional skipping of flag parsing at command level.
+- `Author`, `Email`, and `Compiled` metadata on app.
+- `Before` hook func support at app and command level.
+- `CommandNotFound` func support at app level.
+- Command reference available on context.
+- `GenericFlag` type.
+- `Float64Flag` type.
+- `BoolTFlag` type.
+- `IsSet` flag helper on context.
+- More flag lookup funcs at context level.
+- More tests & docs.
+
+### Changed
+- Help template updates to account for presence/absence of flags.
+- Separated subcommand help template.
+- Exposed `HelpPrinter` var for more control over help output.
+
+## [1.0.0] - 2013-11-01
+### Added
+- `help` flag in default app flag set and each command flag set.
+- Custom handling of argument parsing errors.
+- Command lookup by name at app level.
+- `StringSliceFlag` type and supporting `StringSlice` type.
+- `IntSliceFlag` type and supporting `IntSlice` type.
+- Slice type flag lookups by name at context level.
+- Export of app and command help functions.
+- More tests & docs.
+
+## 0.1.0 - 2013-07-22
+### Added
+- Initial implementation.
+
+[Unreleased]: https://github.com/urfave/cli/compare/v1.18.0...HEAD
+[1.18.0]: https://github.com/urfave/cli/compare/v1.17.0...v1.18.0
+[1.17.0]: https://github.com/urfave/cli/compare/v1.16.0...v1.17.0
+[1.16.0]: https://github.com/urfave/cli/compare/v1.15.0...v1.16.0
+[1.15.0]: https://github.com/urfave/cli/compare/v1.14.0...v1.15.0
+[1.14.0]: https://github.com/urfave/cli/compare/v1.13.0...v1.14.0
+[1.13.0]: https://github.com/urfave/cli/compare/v1.12.0...v1.13.0
+[1.12.0]: https://github.com/urfave/cli/compare/v1.11.1...v1.12.0
+[1.11.1]: https://github.com/urfave/cli/compare/v1.11.0...v1.11.1
+[1.11.0]: https://github.com/urfave/cli/compare/v1.10.2...v1.11.0
+[1.10.2]: https://github.com/urfave/cli/compare/v1.10.1...v1.10.2
+[1.10.1]: https://github.com/urfave/cli/compare/v1.10.0...v1.10.1
+[1.10.0]: https://github.com/urfave/cli/compare/v1.9.0...v1.10.0
+[1.9.0]: https://github.com/urfave/cli/compare/v1.8.0...v1.9.0
+[1.8.0]: https://github.com/urfave/cli/compare/v1.7.1...v1.8.0
+[1.7.1]: https://github.com/urfave/cli/compare/v1.7.0...v1.7.1
+[1.7.0]: https://github.com/urfave/cli/compare/v1.6.0...v1.7.0
+[1.6.0]: https://github.com/urfave/cli/compare/v1.5.0...v1.6.0
+[1.5.0]: https://github.com/urfave/cli/compare/v1.4.1...v1.5.0
+[1.4.1]: https://github.com/urfave/cli/compare/v1.4.0...v1.4.1
+[1.4.0]: https://github.com/urfave/cli/compare/v1.3.1...v1.4.0
+[1.3.1]: https://github.com/urfave/cli/compare/v1.3.0...v1.3.1
+[1.3.0]: https://github.com/urfave/cli/compare/v1.2.0...v1.3.0
+[1.2.0]: https://github.com/urfave/cli/compare/v1.1.0...v1.2.0
+[1.1.0]: https://github.com/urfave/cli/compare/v1.0.0...v1.1.0
+[1.0.0]: https://github.com/urfave/cli/compare/v0.1.0...v1.0.0
diff --git a/vendor/github.com/codegangsta/cli/LICENSE b/vendor/github.com/codegangsta/cli/LICENSE
index 5515ccfb716..42a597e29bb 100644
--- a/vendor/github.com/codegangsta/cli/LICENSE
+++ b/vendor/github.com/codegangsta/cli/LICENSE
@@ -1,21 +1,21 @@
-Copyright (C) 2013 Jeremy Saenz
-All Rights Reserved.
+MIT License
-MIT LICENSE
+Copyright (c) 2016 Jeremy Saenz & 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:
+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.
+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/codegangsta/cli/README.md b/vendor/github.com/codegangsta/cli/README.md
index 26a183865dc..2bbbd8ea972 100644
--- a/vendor/github.com/codegangsta/cli/README.md
+++ b/vendor/github.com/codegangsta/cli/README.md
@@ -1,37 +1,146 @@
-[](http://gocover.io/github.com/codegangsta/cli)
-[](https://travis-ci.org/codegangsta/cli)
-[](https://godoc.org/github.com/codegangsta/cli)
+cli
+===
-# cli.go
-`cli.go` is simple, fast, and fun package for building command line apps in Go. The goal is to enable developers to write fast and distributable command line applications in an expressive way.
+[](https://travis-ci.org/urfave/cli)
+[](https://ci.appveyor.com/project/urfave/cli)
+[](https://godoc.org/github.com/urfave/cli)
+[](https://codebeat.co/projects/github-com-urfave-cli)
+[](https://goreportcard.com/report/urfave/cli)
+[](http://gocover.io/github.com/urfave/cli) /
+[](http://gocover.io/github.com/urfave/cli/altsrc)
+
+**Notice:** This is the library formerly known as
+`github.com/codegangsta/cli` -- Github will automatically redirect requests
+to this repository, but we recommend updating your references for clarity.
+
+cli is a simple, fast, and fun package for building command line apps in Go. The
+goal is to enable developers to write fast and distributable command line
+applications in an expressive way.
+
+
+
+- [Overview](#overview)
+- [Installation](#installation)
+ * [Supported platforms](#supported-platforms)
+ * [Using the `v2` branch](#using-the-v2-branch)
+ * [Pinning to the `v1` releases](#pinning-to-the-v1-releases)
+- [Getting Started](#getting-started)
+- [Examples](#examples)
+ * [Arguments](#arguments)
+ * [Flags](#flags)
+ + [Placeholder Values](#placeholder-values)
+ + [Alternate Names](#alternate-names)
+ + [Ordering](#ordering)
+ + [Values from the Environment](#values-from-the-environment)
+ + [Values from alternate input sources (YAML, TOML, and others)](#values-from-alternate-input-sources-yaml-toml-and-others)
+ * [Subcommands](#subcommands)
+ * [Subcommands categories](#subcommands-categories)
+ * [Exit code](#exit-code)
+ * [Bash Completion](#bash-completion)
+ + [Enabling](#enabling)
+ + [Distribution](#distribution)
+ + [Customization](#customization)
+ * [Generated Help Text](#generated-help-text)
+ + [Customization](#customization-1)
+ * [Version Flag](#version-flag)
+ + [Customization](#customization-2)
+ + [Full API Example](#full-api-example)
+- [Contribution Guidelines](#contribution-guidelines)
+
+
## Overview
-Command line apps are usually so tiny that there is absolutely no reason why your code should *not* be self-documenting. Things like generating help text and parsing command flags/options should not hinder productivity when writing a command line app.
-**This is where `cli.go` comes into play.** `cli.go` makes command line programming fun, organized, and expressive!
+Command line apps are usually so tiny that there is absolutely no reason why
+your code should *not* be self-documenting. Things like generating help text and
+parsing command flags/options should not hinder productivity when writing a
+command line app.
+
+**This is where cli comes into play.** cli makes command line programming fun,
+organized, and expressive!
## Installation
-Make sure you have a working Go environment (go 1.1+ is *required*). [See the install instructions](http://golang.org/doc/install.html).
-To install `cli.go`, simply run:
+Make sure you have a working Go environment. Go version 1.2+ is supported. [See
+the install instructions for Go](http://golang.org/doc/install.html).
+
+To install cli, simply run:
```
-$ go get github.com/codegangsta/cli
+$ go get github.com/urfave/cli
```
-Make sure your `PATH` includes to the `$GOPATH/bin` directory so your commands can be easily used:
+Make sure your `PATH` includes the `$GOPATH/bin` directory so your commands can
+be easily used:
```
export PATH=$PATH:$GOPATH/bin
```
-## Getting Started
-One of the philosophies behind `cli.go` is that an API should be playful and full of discovery. So a `cli.go` app can be as little as one line of code in `main()`.
+### Supported platforms
+cli is tested against multiple versions of Go on Linux, and against the latest
+released version of Go on OS X and Windows. For full details, see
+[`./.travis.yml`](./.travis.yml) and [`./appveyor.yml`](./appveyor.yml).
+
+### Using the `v2` branch
+
+**Warning**: The `v2` branch is currently unreleased and considered unstable.
+
+There is currently a long-lived branch named `v2` that is intended to land as
+the new `master` branch once development there has settled down. The current
+`master` branch (mirrored as `v1`) is being manually merged into `v2` on
+an irregular human-based schedule, but generally if one wants to "upgrade" to
+`v2` *now* and accept the volatility (read: "awesomeness") that comes along with
+that, please use whatever version pinning of your preference, such as via
+`gopkg.in`:
+
+```
+$ go get gopkg.in/urfave/cli.v2
+```
+
+``` go
+...
+import (
+ "gopkg.in/urfave/cli.v2" // imports as package "cli"
+)
+...
+```
+
+### Pinning to the `v1` releases
+
+Similarly to the section above describing use of the `v2` branch, if one wants
+to avoid any unexpected compatibility pains once `v2` becomes `master`, then
+pinning to `v1` is an acceptable option, e.g.:
+
+```
+$ go get gopkg.in/urfave/cli.v1
+```
+
+``` go
+...
+import (
+ "gopkg.in/urfave/cli.v1" // imports as package "cli"
+)
+...
+```
+
+This will pull the latest tagged `v1` release (e.g. `v1.18.1` at the time of writing).
+
+## Getting Started
+
+One of the philosophies behind cli is that an API should be playful and full of
+discovery. So a cli app can be as little as one line of code in `main()`.
+
+
``` go
package main
import (
"os"
- "github.com/codegangsta/cli"
+
+ "github.com/urfave/cli"
)
func main() {
@@ -39,50 +148,67 @@ func main() {
}
```
-This app will run and show help text, but is not very useful. Let's give an action to execute and some help documentation:
+This app will run and show help text, but is not very useful. Let's give an
+action to execute and some help documentation:
+
``` go
package main
import (
+ "fmt"
"os"
- "github.com/codegangsta/cli"
+
+ "github.com/urfave/cli"
)
func main() {
app := cli.NewApp()
app.Name = "boom"
app.Usage = "make an explosive entrance"
- app.Action = func(c *cli.Context) {
- println("boom! I say!")
+ app.Action = func(c *cli.Context) error {
+ fmt.Println("boom! I say!")
+ return nil
}
-
+
app.Run(os.Args)
}
```
-Running this already gives you a ton of functionality, plus support for things like subcommands and flags, which are covered below.
+Running this already gives you a ton of functionality, plus support for things
+like subcommands and flags, which are covered below.
-## Example
+## Examples
-Being a programmer can be a lonely job. Thankfully by the power of automation that is not the case! Let's create a greeter app to fend off our demons of loneliness!
+Being a programmer can be a lonely job. Thankfully by the power of automation
+that is not the case! Let's create a greeter app to fend off our demons of
+loneliness!
-Start by creating a directory named `greet`, and within it, add a file, `greet.go` with the following code in it:
+Start by creating a directory named `greet`, and within it, add a file,
+`greet.go` with the following code in it:
+
``` go
package main
import (
+ "fmt"
"os"
- "github.com/codegangsta/cli"
+
+ "github.com/urfave/cli"
)
func main() {
app := cli.NewApp()
app.Name = "greet"
app.Usage = "fight the loneliness!"
- app.Action = func(c *cli.Context) {
- println("Hello friend!")
+ app.Action = func(c *cli.Context) error {
+ fmt.Println("Hello friend!")
+ return nil
}
app.Run(os.Args)
@@ -102,7 +228,7 @@ $ greet
Hello friend!
```
-`cli.go` also generates neat help text:
+cli also generates neat help text:
```
$ greet help
@@ -119,162 +245,568 @@ COMMANDS:
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS
- --version Shows version information
+ --version Shows version information
```
### Arguments
-You can lookup arguments by calling the `Args` function on `cli.Context`.
+You can lookup arguments by calling the `Args` function on `cli.Context`, e.g.:
+
+
``` go
-...
-app.Action = func(c *cli.Context) {
- println("Hello", c.Args()[0])
+package main
+
+import (
+ "fmt"
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ app := cli.NewApp()
+
+ app.Action = func(c *cli.Context) error {
+ fmt.Printf("Hello %q", c.Args().Get(0))
+ return nil
+ }
+
+ app.Run(os.Args)
}
-...
```
### Flags
+
Setting and querying flags is simple.
+
+
``` go
-...
-app.Flags = []cli.Flag {
- cli.StringFlag{
- Name: "lang",
- Value: "english",
- Usage: "language for the greeting",
- },
-}
-app.Action = func(c *cli.Context) {
- name := "someone"
- if len(c.Args()) > 0 {
- name = c.Args()[0]
+package main
+
+import (
+ "fmt"
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ app := cli.NewApp()
+
+ app.Flags = []cli.Flag {
+ cli.StringFlag{
+ Name: "lang",
+ Value: "english",
+ Usage: "language for the greeting",
+ },
}
- if c.String("lang") == "spanish" {
- println("Hola", name)
- } else {
- println("Hello", name)
+
+ app.Action = func(c *cli.Context) error {
+ name := "Nefertiti"
+ if c.NArg() > 0 {
+ name = c.Args().Get(0)
+ }
+ if c.String("lang") == "spanish" {
+ fmt.Println("Hola", name)
+ } else {
+ fmt.Println("Hello", name)
+ }
+ return nil
}
+
+ app.Run(os.Args)
}
-...
```
-You can also set a destination variable for a flag, to which the content will be scanned.
+You can also set a destination variable for a flag, to which the content will be
+scanned.
+
+
``` go
-...
-var language string
-app.Flags = []cli.Flag {
- cli.StringFlag{
- Name: "lang",
- Value: "english",
- Usage: "language for the greeting",
- Destination: &language,
- },
-}
-app.Action = func(c *cli.Context) {
- name := "someone"
- if len(c.Args()) > 0 {
- name = c.Args()[0]
+package main
+
+import (
+ "os"
+ "fmt"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ var language string
+
+ app := cli.NewApp()
+
+ app.Flags = []cli.Flag {
+ cli.StringFlag{
+ Name: "lang",
+ Value: "english",
+ Usage: "language for the greeting",
+ Destination: &language,
+ },
}
- if language == "spanish" {
- println("Hola", name)
- } else {
- println("Hello", name)
+
+ app.Action = func(c *cli.Context) error {
+ name := "someone"
+ if c.NArg() > 0 {
+ name = c.Args()[0]
+ }
+ if language == "spanish" {
+ fmt.Println("Hola", name)
+ } else {
+ fmt.Println("Hello", name)
+ }
+ return nil
}
+
+ app.Run(os.Args)
}
-...
```
-See full list of flags at http://godoc.org/github.com/codegangsta/cli
+See full list of flags at http://godoc.org/github.com/urfave/cli
+
+#### Placeholder Values
+
+Sometimes it's useful to specify a flag's value within the usage string itself.
+Such placeholders are indicated with back quotes.
+
+For example this:
+
+
+```go
+package main
+
+import (
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ app := cli.NewApp()
+
+ app.Flags = []cli.Flag{
+ cli.StringFlag{
+ Name: "config, c",
+ Usage: "Load configuration from `FILE`",
+ },
+ }
+
+ app.Run(os.Args)
+}
+```
+
+Will result in help output like:
+
+```
+--config FILE, -c FILE Load configuration from FILE
+```
+
+Note that only the first placeholder is used. Subsequent back-quoted words will
+be left as-is.
#### Alternate Names
-You can set alternate (or short) names for flags by providing a comma-delimited list for the `Name`. e.g.
+You can set alternate (or short) names for flags by providing a comma-delimited
+list for the `Name`. e.g.
+
``` go
-app.Flags = []cli.Flag {
- cli.StringFlag{
- Name: "lang, l",
- Value: "english",
- Usage: "language for the greeting",
- },
+package main
+
+import (
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ app := cli.NewApp()
+
+ app.Flags = []cli.Flag {
+ cli.StringFlag{
+ Name: "lang, l",
+ Value: "english",
+ Usage: "language for the greeting",
+ },
+ }
+
+ app.Run(os.Args)
}
```
-That flag can then be set with `--lang spanish` or `-l spanish`. Note that giving two different forms of the same flag in the same command invocation is an error.
+That flag can then be set with `--lang spanish` or `-l spanish`. Note that
+giving two different forms of the same flag in the same command invocation is an
+error.
+
+#### Ordering
+
+Flags for the application and commands are shown in the order they are defined.
+However, it's possible to sort them from outside this library by using `FlagsByName`
+or `CommandsByName` with `sort`.
+
+For example this:
+
+
+``` go
+package main
+
+import (
+ "os"
+ "sort"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ app := cli.NewApp()
+
+ app.Flags = []cli.Flag {
+ cli.StringFlag{
+ Name: "lang, l",
+ Value: "english",
+ Usage: "Language for the greeting",
+ },
+ cli.StringFlag{
+ Name: "config, c",
+ Usage: "Load configuration from `FILE`",
+ },
+ }
+
+ app.Commands = []cli.Command{
+ {
+ Name: "complete",
+ Aliases: []string{"c"},
+ Usage: "complete a task on the list",
+ Action: func(c *cli.Context) error {
+ return nil
+ },
+ },
+ {
+ Name: "add",
+ Aliases: []string{"a"},
+ Usage: "add a task to the list",
+ Action: func(c *cli.Context) error {
+ return nil
+ },
+ },
+ }
+
+ sort.Sort(cli.FlagsByName(app.Flags))
+ sort.Sort(cli.CommandsByName(app.Commands))
+
+ app.Run(os.Args)
+}
+```
+
+Will result in help output like:
+
+```
+--config FILE, -c FILE Load configuration from FILE
+--lang value, -l value Language for the greeting (default: "english")
+```
#### Values from the Environment
You can also have the default value set from the environment via `EnvVar`. e.g.
+
``` go
-app.Flags = []cli.Flag {
- cli.StringFlag{
- Name: "lang, l",
- Value: "english",
- Usage: "language for the greeting",
- EnvVar: "APP_LANG",
- },
+package main
+
+import (
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ app := cli.NewApp()
+
+ app.Flags = []cli.Flag {
+ cli.StringFlag{
+ Name: "lang, l",
+ Value: "english",
+ Usage: "language for the greeting",
+ EnvVar: "APP_LANG",
+ },
+ }
+
+ app.Run(os.Args)
}
```
-The `EnvVar` may also be given as a comma-delimited "cascade", where the first environment variable that resolves is used as the default.
+The `EnvVar` may also be given as a comma-delimited "cascade", where the first
+environment variable that resolves is used as the default.
+
+
+``` go
+package main
+
+import (
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ app := cli.NewApp()
+
+ app.Flags = []cli.Flag {
+ cli.StringFlag{
+ Name: "lang, l",
+ Value: "english",
+ Usage: "language for the greeting",
+ EnvVar: "LEGACY_COMPAT_LANG,APP_LANG,LANG",
+ },
+ }
+
+ app.Run(os.Args)
+}
+```
+
+#### Values from alternate input sources (YAML, TOML, and others)
+
+There is a separate package altsrc that adds support for getting flag values
+from other file input sources.
+
+Currently supported input source formats:
+* YAML
+* TOML
+
+In order to get values for a flag from an alternate input source the following
+code would be added to wrap an existing cli.Flag like below:
``` go
-app.Flags = []cli.Flag {
- cli.StringFlag{
- Name: "lang, l",
- Value: "english",
- Usage: "language for the greeting",
- EnvVar: "LEGACY_COMPAT_LANG,APP_LANG,LANG",
- },
+ altsrc.NewIntFlag(cli.IntFlag{Name: "test"})
+```
+
+Initialization must also occur for these flags. Below is an example initializing
+getting data from a yaml file below.
+
+``` go
+ command.Before = altsrc.InitInputSourceWithContext(command.Flags, NewYamlSourceFromFlagFunc("load"))
+```
+
+The code above will use the "load" string as a flag name to get the file name of
+a yaml file from the cli.Context. It will then use that file name to initialize
+the yaml input source for any flags that are defined on that command. As a note
+the "load" flag used would also have to be defined on the command flags in order
+for this code snipped to work.
+
+Currently only the aboved specified formats are supported but developers can
+add support for other input sources by implementing the
+altsrc.InputSourceContext for their given sources.
+
+Here is a more complete sample of a command using YAML support:
+
+
+``` go
+package notmain
+
+import (
+ "fmt"
+ "os"
+
+ "github.com/urfave/cli"
+ "github.com/urfave/cli/altsrc"
+)
+
+func main() {
+ app := cli.NewApp()
+
+ flags := []cli.Flag{
+ altsrc.NewIntFlag(cli.IntFlag{Name: "test"}),
+ cli.StringFlag{Name: "load"},
+ }
+
+ app.Action = func(c *cli.Context) error {
+ fmt.Println("yaml ist rad")
+ return nil
+ }
+
+ app.Before = altsrc.InitInputSourceWithContext(flags, altsrc.NewYamlSourceFromFlagFunc("load"))
+ app.Flags = flags
+
+ app.Run(os.Args)
}
```
### Subcommands
Subcommands can be defined for a more git-like command line app.
+
+
```go
-...
-app.Commands = []cli.Command{
- {
- Name: "add",
- Aliases: []string{"a"},
- Usage: "add a task to the list",
- Action: func(c *cli.Context) {
- println("added task: ", c.Args().First())
- },
- },
- {
- Name: "complete",
- Aliases: []string{"c"},
- Usage: "complete a task on the list",
- Action: func(c *cli.Context) {
- println("completed task: ", c.Args().First())
- },
- },
- {
- Name: "template",
- Aliases: []string{"r"},
- Usage: "options for task templates",
- Subcommands: []cli.Command{
- {
- Name: "add",
- Usage: "add a new template",
- Action: func(c *cli.Context) {
- println("new task template: ", c.Args().First())
- },
+package main
+
+import (
+ "fmt"
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ app := cli.NewApp()
+
+ app.Commands = []cli.Command{
+ {
+ Name: "add",
+ Aliases: []string{"a"},
+ Usage: "add a task to the list",
+ Action: func(c *cli.Context) error {
+ fmt.Println("added task: ", c.Args().First())
+ return nil
},
- {
- Name: "remove",
- Usage: "remove an existing template",
- Action: func(c *cli.Context) {
- println("removed task template: ", c.Args().First())
+ },
+ {
+ Name: "complete",
+ Aliases: []string{"c"},
+ Usage: "complete a task on the list",
+ Action: func(c *cli.Context) error {
+ fmt.Println("completed task: ", c.Args().First())
+ return nil
+ },
+ },
+ {
+ Name: "template",
+ Aliases: []string{"t"},
+ Usage: "options for task templates",
+ Subcommands: []cli.Command{
+ {
+ Name: "add",
+ Usage: "add a new template",
+ Action: func(c *cli.Context) error {
+ fmt.Println("new task template: ", c.Args().First())
+ return nil
+ },
+ },
+ {
+ Name: "remove",
+ Usage: "remove an existing template",
+ Action: func(c *cli.Context) error {
+ fmt.Println("removed task template: ", c.Args().First())
+ return nil
+ },
},
},
},
- },
+ }
+
+ app.Run(os.Args)
+}
+```
+
+### Subcommands categories
+
+For additional organization in apps that have many subcommands, you can
+associate a category for each command to group them together in the help
+output.
+
+E.g.
+
+```go
+package main
+
+import (
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ app := cli.NewApp()
+
+ app.Commands = []cli.Command{
+ {
+ Name: "noop",
+ },
+ {
+ Name: "add",
+ Category: "template",
+ },
+ {
+ Name: "remove",
+ Category: "template",
+ },
+ }
+
+ app.Run(os.Args)
+}
+```
+
+Will include:
+
+```
+COMMANDS:
+ noop
+
+ Template actions:
+ add
+ remove
+```
+
+### Exit code
+
+Calling `App.Run` will not automatically call `os.Exit`, which means that by
+default the exit code will "fall through" to being `0`. An explicit exit code
+may be set by returning a non-nil error that fulfills `cli.ExitCoder`, *or* a
+`cli.MultiError` that includes an error that fulfills `cli.ExitCoder`, e.g.:
+
+``` go
+package main
+
+import (
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ app := cli.NewApp()
+ app.Flags = []cli.Flag{
+ cli.BoolTFlag{
+ Name: "ginger-crouton",
+ Usage: "is it in the soup?",
+ },
+ }
+ app.Action = func(ctx *cli.Context) error {
+ if !ctx.Bool("ginger-crouton") {
+ return cli.NewExitError("it is not in the soup", 86)
+ }
+ return nil
+ }
+
+ app.Run(os.Args)
}
-...
```
### Bash Completion
@@ -283,41 +815,59 @@ You can enable completion commands by setting the `EnableBashCompletion`
flag on the `App` object. By default, this setting will only auto-complete to
show an app's subcommands, but you can write your own completion methods for
the App or its subcommands.
-```go
-...
-var tasks = []string{"cook", "clean", "laundry", "eat", "sleep", "code"}
-app := cli.NewApp()
-app.EnableBashCompletion = true
-app.Commands = []cli.Command{
- {
- Name: "complete",
- Aliases: []string{"c"},
- Usage: "complete a task on the list",
- Action: func(c *cli.Context) {
- println("completed task: ", c.Args().First())
- },
- BashComplete: func(c *cli.Context) {
- // This will complete if no args are passed
- if len(c.Args()) > 0 {
- return
- }
- for _, t := range tasks {
- fmt.Println(t)
- }
+
+
+``` go
+package main
+
+import (
+ "fmt"
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ tasks := []string{"cook", "clean", "laundry", "eat", "sleep", "code"}
+
+ app := cli.NewApp()
+ app.EnableBashCompletion = true
+ app.Commands = []cli.Command{
+ {
+ Name: "complete",
+ Aliases: []string{"c"},
+ Usage: "complete a task on the list",
+ Action: func(c *cli.Context) error {
+ fmt.Println("completed task: ", c.Args().First())
+ return nil
+ },
+ BashComplete: func(c *cli.Context) {
+ // This will complete if no args are passed
+ if c.NArg() > 0 {
+ return
+ }
+ for _, t := range tasks {
+ fmt.Println(t)
+ }
+ },
},
}
+
+ app.Run(os.Args)
}
-...
```
-#### To Enable
+#### Enabling
Source the `autocomplete/bash_autocomplete` file in your `.bashrc` file while
setting the `PROG` variable to the name of your program:
`PROG=myprogram source /.../cli/autocomplete/bash_autocomplete`
-#### To Distribute
+#### Distribution
Copy `autocomplete/bash_autocomplete` into `/etc/bash_completion.d/` and rename
it to the name of the program you wish to add autocomplete support for (or
@@ -325,17 +875,507 @@ automatically install it there if you are distributing a package). Don't forget
to source the file to make it active in the current shell.
```
- sudo cp src/bash_autocomplete /etc/bash_completion.d/
- source /etc/bash_completion.d/
+sudo cp src/bash_autocomplete /etc/bash_completion.d/
+source /etc/bash_completion.d/
```
Alternatively, you can just document that users should source the generic
`autocomplete/bash_autocomplete` in their bash configuration with `$PROG` set
to the name of their program (as above).
+#### Customization
+
+The default bash completion flag (`--generate-bash-completion`) is defined as
+`cli.BashCompletionFlag`, and may be redefined if desired, e.g.:
+
+
+``` go
+package main
+
+import (
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ cli.BashCompletionFlag = cli.BoolFlag{
+ Name: "compgen",
+ Hidden: true,
+ }
+
+ app := cli.NewApp()
+ app.EnableBashCompletion = true
+ app.Commands = []cli.Command{
+ {
+ Name: "wat",
+ },
+ }
+ app.Run(os.Args)
+}
+```
+
+### Generated Help Text
+
+The default help flag (`-h/--help`) is defined as `cli.HelpFlag` and is checked
+by the cli internals in order to print generated help text for the app, command,
+or subcommand, and break execution.
+
+#### Customization
+
+All of the help text generation may be customized, and at multiple levels. The
+templates are exposed as variables `AppHelpTemplate`, `CommandHelpTemplate`, and
+`SubcommandHelpTemplate` which may be reassigned or augmented, and full override
+is possible by assigning a compatible func to the `cli.HelpPrinter` variable,
+e.g.:
+
+
+``` go
+package main
+
+import (
+ "fmt"
+ "io"
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ // EXAMPLE: Append to an existing template
+ cli.AppHelpTemplate = fmt.Sprintf(`%s
+
+WEBSITE: http://awesometown.example.com
+
+SUPPORT: support@awesometown.example.com
+
+`, cli.AppHelpTemplate)
+
+ // EXAMPLE: Override a template
+ cli.AppHelpTemplate = `NAME:
+ {{.Name}} - {{.Usage}}
+USAGE:
+ {{.HelpName}} {{if .VisibleFlags}}[global options]{{end}}{{if .Commands}} command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}
+ {{if len .Authors}}
+AUTHOR:
+ {{range .Authors}}{{ . }}{{end}}
+ {{end}}{{if .Commands}}
+COMMANDS:
+{{range .Commands}}{{if not .HideHelp}} {{join .Names ", "}}{{ "\t"}}{{.Usage}}{{ "\n" }}{{end}}{{end}}{{end}}{{if .VisibleFlags}}
+GLOBAL OPTIONS:
+ {{range .VisibleFlags}}{{.}}
+ {{end}}{{end}}{{if .Copyright }}
+COPYRIGHT:
+ {{.Copyright}}
+ {{end}}{{if .Version}}
+VERSION:
+ {{.Version}}
+ {{end}}
+`
+
+ // EXAMPLE: Replace the `HelpPrinter` func
+ cli.HelpPrinter = func(w io.Writer, templ string, data interface{}) {
+ fmt.Println("Ha HA. I pwnd the help!!1")
+ }
+
+ cli.NewApp().Run(os.Args)
+}
+```
+
+The default flag may be customized to something other than `-h/--help` by
+setting `cli.HelpFlag`, e.g.:
+
+
+``` go
+package main
+
+import (
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ cli.HelpFlag = cli.BoolFlag{
+ Name: "halp, haaaaalp",
+ Usage: "HALP",
+ EnvVar: "SHOW_HALP,HALPPLZ",
+ }
+
+ cli.NewApp().Run(os.Args)
+}
+```
+
+### Version Flag
+
+The default version flag (`-v/--version`) is defined as `cli.VersionFlag`, which
+is checked by the cli internals in order to print the `App.Version` via
+`cli.VersionPrinter` and break execution.
+
+#### Customization
+
+The default flag may be customized to something other than `-v/--version` by
+setting `cli.VersionFlag`, e.g.:
+
+
+``` go
+package main
+
+import (
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+func main() {
+ cli.VersionFlag = cli.BoolFlag{
+ Name: "print-version, V",
+ Usage: "print only the version",
+ }
+
+ app := cli.NewApp()
+ app.Name = "partay"
+ app.Version = "19.99.0"
+ app.Run(os.Args)
+}
+```
+
+Alternatively, the version printer at `cli.VersionPrinter` may be overridden, e.g.:
+
+
+``` go
+package main
+
+import (
+ "fmt"
+ "os"
+
+ "github.com/urfave/cli"
+)
+
+var (
+ Revision = "fafafaf"
+)
+
+func main() {
+ cli.VersionPrinter = func(c *cli.Context) {
+ fmt.Printf("version=%s revision=%s\n", c.App.Version, Revision)
+ }
+
+ app := cli.NewApp()
+ app.Name = "partay"
+ app.Version = "19.99.0"
+ app.Run(os.Args)
+}
+```
+
+#### Full API Example
+
+**Notice**: This is a contrived (functioning) example meant strictly for API
+demonstration purposes. Use of one's imagination is encouraged.
+
+
+``` go
+package main
+
+import (
+ "errors"
+ "flag"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "os"
+ "time"
+
+ "github.com/urfave/cli"
+)
+
+func init() {
+ cli.AppHelpTemplate += "\nCUSTOMIZED: you bet ur muffins\n"
+ cli.CommandHelpTemplate += "\nYMMV\n"
+ cli.SubcommandHelpTemplate += "\nor something\n"
+
+ cli.HelpFlag = cli.BoolFlag{Name: "halp"}
+ cli.BashCompletionFlag = cli.BoolFlag{Name: "compgen", Hidden: true}
+ cli.VersionFlag = cli.BoolFlag{Name: "print-version, V"}
+
+ cli.HelpPrinter = func(w io.Writer, templ string, data interface{}) {
+ fmt.Fprintf(w, "best of luck to you\n")
+ }
+ cli.VersionPrinter = func(c *cli.Context) {
+ fmt.Fprintf(c.App.Writer, "version=%s\n", c.App.Version)
+ }
+ cli.OsExiter = func(c int) {
+ fmt.Fprintf(cli.ErrWriter, "refusing to exit %d\n", c)
+ }
+ cli.ErrWriter = ioutil.Discard
+ cli.FlagStringer = func(fl cli.Flag) string {
+ return fmt.Sprintf("\t\t%s", fl.GetName())
+ }
+}
+
+type hexWriter struct{}
+
+func (w *hexWriter) Write(p []byte) (int, error) {
+ for _, b := range p {
+ fmt.Printf("%x", b)
+ }
+ fmt.Printf("\n")
+
+ return len(p), nil
+}
+
+type genericType struct{
+ s string
+}
+
+func (g *genericType) Set(value string) error {
+ g.s = value
+ return nil
+}
+
+func (g *genericType) String() string {
+ return g.s
+}
+
+func main() {
+ app := cli.NewApp()
+ app.Name = "kənˈtrīv"
+ app.Version = "19.99.0"
+ app.Compiled = time.Now()
+ app.Authors = []cli.Author{
+ cli.Author{
+ Name: "Example Human",
+ Email: "human@example.com",
+ },
+ }
+ app.Copyright = "(c) 1999 Serious Enterprise"
+ app.HelpName = "contrive"
+ app.Usage = "demonstrate available API"
+ app.UsageText = "contrive - demonstrating the available API"
+ app.ArgsUsage = "[args and such]"
+ app.Commands = []cli.Command{
+ cli.Command{
+ Name: "doo",
+ Aliases: []string{"do"},
+ Category: "motion",
+ Usage: "do the doo",
+ UsageText: "doo - does the dooing",
+ Description: "no really, there is a lot of dooing to be done",
+ ArgsUsage: "[arrgh]",
+ Flags: []cli.Flag{
+ cli.BoolFlag{Name: "forever, forevvarr"},
+ },
+ Subcommands: cli.Commands{
+ cli.Command{
+ Name: "wop",
+ Action: wopAction,
+ },
+ },
+ SkipFlagParsing: false,
+ HideHelp: false,
+ Hidden: false,
+ HelpName: "doo!",
+ BashComplete: func(c *cli.Context) {
+ fmt.Fprintf(c.App.Writer, "--better\n")
+ },
+ Before: func(c *cli.Context) error {
+ fmt.Fprintf(c.App.Writer, "brace for impact\n")
+ return nil
+ },
+ After: func(c *cli.Context) error {
+ fmt.Fprintf(c.App.Writer, "did we lose anyone?\n")
+ return nil
+ },
+ Action: func(c *cli.Context) error {
+ c.Command.FullName()
+ c.Command.HasName("wop")
+ c.Command.Names()
+ c.Command.VisibleFlags()
+ fmt.Fprintf(c.App.Writer, "dodododododoodododddooooododododooo\n")
+ if c.Bool("forever") {
+ c.Command.Run(c)
+ }
+ return nil
+ },
+ OnUsageError: func(c *cli.Context, err error, isSubcommand bool) error {
+ fmt.Fprintf(c.App.Writer, "for shame\n")
+ return err
+ },
+ },
+ }
+ app.Flags = []cli.Flag{
+ cli.BoolFlag{Name: "fancy"},
+ cli.BoolTFlag{Name: "fancier"},
+ cli.DurationFlag{Name: "howlong, H", Value: time.Second * 3},
+ cli.Float64Flag{Name: "howmuch"},
+ cli.GenericFlag{Name: "wat", Value: &genericType{}},
+ cli.Int64Flag{Name: "longdistance"},
+ cli.Int64SliceFlag{Name: "intervals"},
+ cli.IntFlag{Name: "distance"},
+ cli.IntSliceFlag{Name: "times"},
+ cli.StringFlag{Name: "dance-move, d"},
+ cli.StringSliceFlag{Name: "names, N"},
+ cli.UintFlag{Name: "age"},
+ cli.Uint64Flag{Name: "bigage"},
+ }
+ app.EnableBashCompletion = true
+ app.HideHelp = false
+ app.HideVersion = false
+ app.BashComplete = func(c *cli.Context) {
+ fmt.Fprintf(c.App.Writer, "lipstick\nkiss\nme\nlipstick\nringo\n")
+ }
+ app.Before = func(c *cli.Context) error {
+ fmt.Fprintf(c.App.Writer, "HEEEERE GOES\n")
+ return nil
+ }
+ app.After = func(c *cli.Context) error {
+ fmt.Fprintf(c.App.Writer, "Phew!\n")
+ return nil
+ }
+ app.CommandNotFound = func(c *cli.Context, command string) {
+ fmt.Fprintf(c.App.Writer, "Thar be no %q here.\n", command)
+ }
+ app.OnUsageError = func(c *cli.Context, err error, isSubcommand bool) error {
+ if isSubcommand {
+ return err
+ }
+
+ fmt.Fprintf(c.App.Writer, "WRONG: %#v\n", err)
+ return nil
+ }
+ app.Action = func(c *cli.Context) error {
+ cli.DefaultAppComplete(c)
+ cli.HandleExitCoder(errors.New("not an exit coder, though"))
+ cli.ShowAppHelp(c)
+ cli.ShowCommandCompletions(c, "nope")
+ cli.ShowCommandHelp(c, "also-nope")
+ cli.ShowCompletions(c)
+ cli.ShowSubcommandHelp(c)
+ cli.ShowVersion(c)
+
+ categories := c.App.Categories()
+ categories.AddCommand("sounds", cli.Command{
+ Name: "bloop",
+ })
+
+ for _, category := range c.App.Categories() {
+ fmt.Fprintf(c.App.Writer, "%s\n", category.Name)
+ fmt.Fprintf(c.App.Writer, "%#v\n", category.Commands)
+ fmt.Fprintf(c.App.Writer, "%#v\n", category.VisibleCommands())
+ }
+
+ fmt.Printf("%#v\n", c.App.Command("doo"))
+ if c.Bool("infinite") {
+ c.App.Run([]string{"app", "doo", "wop"})
+ }
+
+ if c.Bool("forevar") {
+ c.App.RunAsSubcommand(c)
+ }
+ c.App.Setup()
+ fmt.Printf("%#v\n", c.App.VisibleCategories())
+ fmt.Printf("%#v\n", c.App.VisibleCommands())
+ fmt.Printf("%#v\n", c.App.VisibleFlags())
+
+ fmt.Printf("%#v\n", c.Args().First())
+ if len(c.Args()) > 0 {
+ fmt.Printf("%#v\n", c.Args()[1])
+ }
+ fmt.Printf("%#v\n", c.Args().Present())
+ fmt.Printf("%#v\n", c.Args().Tail())
+
+ set := flag.NewFlagSet("contrive", 0)
+ nc := cli.NewContext(c.App, set, c)
+
+ fmt.Printf("%#v\n", nc.Args())
+ fmt.Printf("%#v\n", nc.Bool("nope"))
+ fmt.Printf("%#v\n", nc.BoolT("nerp"))
+ fmt.Printf("%#v\n", nc.Duration("howlong"))
+ fmt.Printf("%#v\n", nc.Float64("hay"))
+ fmt.Printf("%#v\n", nc.Generic("bloop"))
+ fmt.Printf("%#v\n", nc.Int64("bonk"))
+ fmt.Printf("%#v\n", nc.Int64Slice("burnks"))
+ fmt.Printf("%#v\n", nc.Int("bips"))
+ fmt.Printf("%#v\n", nc.IntSlice("blups"))
+ fmt.Printf("%#v\n", nc.String("snurt"))
+ fmt.Printf("%#v\n", nc.StringSlice("snurkles"))
+ fmt.Printf("%#v\n", nc.Uint("flub"))
+ fmt.Printf("%#v\n", nc.Uint64("florb"))
+ fmt.Printf("%#v\n", nc.GlobalBool("global-nope"))
+ fmt.Printf("%#v\n", nc.GlobalBoolT("global-nerp"))
+ fmt.Printf("%#v\n", nc.GlobalDuration("global-howlong"))
+ fmt.Printf("%#v\n", nc.GlobalFloat64("global-hay"))
+ fmt.Printf("%#v\n", nc.GlobalGeneric("global-bloop"))
+ fmt.Printf("%#v\n", nc.GlobalInt("global-bips"))
+ fmt.Printf("%#v\n", nc.GlobalIntSlice("global-blups"))
+ fmt.Printf("%#v\n", nc.GlobalString("global-snurt"))
+ fmt.Printf("%#v\n", nc.GlobalStringSlice("global-snurkles"))
+
+ fmt.Printf("%#v\n", nc.FlagNames())
+ fmt.Printf("%#v\n", nc.GlobalFlagNames())
+ fmt.Printf("%#v\n", nc.GlobalIsSet("wat"))
+ fmt.Printf("%#v\n", nc.GlobalSet("wat", "nope"))
+ fmt.Printf("%#v\n", nc.NArg())
+ fmt.Printf("%#v\n", nc.NumFlags())
+ fmt.Printf("%#v\n", nc.Parent())
+
+ nc.Set("wat", "also-nope")
+
+ ec := cli.NewExitError("ohwell", 86)
+ fmt.Fprintf(c.App.Writer, "%d", ec.ExitCode())
+ fmt.Printf("made it!\n")
+ return ec
+ }
+
+ if os.Getenv("HEXY") != "" {
+ app.Writer = &hexWriter{}
+ app.ErrWriter = &hexWriter{}
+ }
+
+ app.Metadata = map[string]interface{}{
+ "layers": "many",
+ "explicable": false,
+ "whatever-values": 19.99,
+ }
+
+ app.Run(os.Args)
+}
+
+func wopAction(c *cli.Context) error {
+ fmt.Fprintf(c.App.Writer, ":wave: over here, eh\n")
+ return nil
+}
+```
+
## Contribution Guidelines
-Feel free to put up a pull request to fix a bug or maybe add a feature. I will give it a code review and make sure that it does not break backwards compatibility. If I or any other collaborators agree that it is in line with the vision of the project, we will work with you to get the code into a mergeable state and merge it into the master branch.
-If you have contributed something significant to the project, I will most likely add you as a collaborator. As a collaborator you are given the ability to merge others pull requests. It is very important that new code does not break existing code, so be careful about what code you do choose to merge. If you have any questions feel free to link @codegangsta to the issue in question and we can review it together.
+Feel free to put up a pull request to fix a bug or maybe add a feature. I will
+give it a code review and make sure that it does not break backwards
+compatibility. If I or any other collaborators agree that it is in line with
+the vision of the project, we will work with you to get the code into
+a mergeable state and merge it into the master branch.
-If you feel like you have contributed to the project but have not yet been added as a collaborator, I probably forgot to add you. Hit @codegangsta up over email and we will get it figured out.
+If you have contributed something significant to the project, we will most
+likely add you as a collaborator. As a collaborator you are given the ability
+to merge others pull requests. It is very important that new code does not
+break existing code, so be careful about what code you do choose to merge.
+
+If you feel like you have contributed to the project but have not yet been
+added as a collaborator, we probably forgot to add you, please open an issue.
diff --git a/vendor/github.com/codegangsta/cli/app.go b/vendor/github.com/codegangsta/cli/app.go
index 2f992d0d7a7..51fc45d8781 100644
--- a/vendor/github.com/codegangsta/cli/app.go
+++ b/vendor/github.com/codegangsta/cli/app.go
@@ -5,11 +5,24 @@ import (
"io"
"io/ioutil"
"os"
- "path"
+ "path/filepath"
+ "sort"
"time"
)
-// App is the main structure of a cli application. It is recomended that
+var (
+ changeLogURL = "https://github.com/urfave/cli/blob/master/CHANGELOG.md"
+ appActionDeprecationURL = fmt.Sprintf("%s#deprecated-cli-app-action-signature", changeLogURL)
+ runAndExitOnErrorDeprecationURL = fmt.Sprintf("%s#deprecated-cli-app-runandexitonerror", changeLogURL)
+
+ contactSysadmin = "This is an error in the application. Please contact the distributor of this application if this is not you."
+
+ errInvalidActionType = NewExitError("ERROR invalid Action type. "+
+ fmt.Sprintf("Must be `func(*Context`)` or `func(*Context) error). %s", contactSysadmin)+
+ fmt.Sprintf("See %s", appActionDeprecationURL), 2)
+)
+
+// App is the main structure of a cli application. It is recommended that
// an app be created with the cli.NewApp() function
type App struct {
// The name of the program. Defaults to path.Base(os.Args[0])
@@ -18,10 +31,14 @@ type App struct {
HelpName string
// Description of the program.
Usage string
+ // Text to override the USAGE section of help
+ UsageText string
// Description of the program argument format.
ArgsUsage string
// Version of the program
Version string
+ // Description of the program
+ Description string
// List of commands to execute
Commands []Command
// List of flags to parse
@@ -30,20 +47,28 @@ type App struct {
EnableBashCompletion bool
// Boolean to hide built-in help command
HideHelp bool
- // Boolean to hide built-in version flag
+ // Boolean to hide built-in version flag and the VERSION section of help
HideVersion bool
+ // Populate on app startup, only gettable through method Categories()
+ categories CommandCategories
// An action to execute when the bash-completion flag is set
- BashComplete func(context *Context)
+ BashComplete BashCompleteFunc
// An action to execute before any subcommands are run, but after the context is ready
// If a non-nil error is returned, no subcommands are run
- Before func(context *Context) error
+ Before BeforeFunc
// An action to execute after any subcommands are run, but after the subcommand has finished
// It is run even if Action() panics
- After func(context *Context) error
+ After AfterFunc
+
// The action to execute when no subcommands are specified
- Action func(context *Context)
+ // Expects a `cli.ActionFunc` but will accept the *deprecated* signature of `func(*cli.Context) {}`
+ // *Note*: support for the deprecated `Action` signature will be removed in a future version
+ Action interface{}
+
// Execute this function if the proper command cannot be found
- CommandNotFound func(context *Context, command string)
+ CommandNotFound CommandNotFoundFunc
+ // Execute this function if an usage error occurs
+ OnUsageError OnUsageErrorFunc
// Compilation date
Compiled time.Time
// List of all authors who contributed
@@ -56,6 +81,18 @@ type App struct {
Email string
// Writer writer to write output to
Writer io.Writer
+ // ErrWriter writes error output
+ ErrWriter io.Writer
+ // Other custom info
+ Metadata map[string]interface{}
+ // Carries a function which returns app specific info.
+ ExtraInfo func() map[string]string
+ // CustomAppHelpTemplate the text template for app help topic.
+ // cli.go uses text/template to render templates. You can
+ // render custom help text by setting this variable.
+ CustomAppHelpTemplate string
+
+ didSetup bool
}
// Tries to find out when this binary was compiled.
@@ -68,12 +105,14 @@ func compileTime() time.Time {
return info.ModTime()
}
-// Creates a new cli Application with some reasonable defaults for Name, Usage, Version and Action.
+// NewApp creates a new cli Application with some reasonable defaults for Name,
+// Usage, Version and Action.
func NewApp() *App {
return &App{
- Name: path.Base(os.Args[0]),
- HelpName: path.Base(os.Args[0]),
+ Name: filepath.Base(os.Args[0]),
+ HelpName: filepath.Base(os.Args[0]),
Usage: "A new cli application",
+ UsageText: "",
Version: "0.0.0",
BashComplete: DefaultAppComplete,
Action: helpCommand.Action,
@@ -82,8 +121,16 @@ func NewApp() *App {
}
}
-// Entry point to the cli app. Parses the arguments slice and routes to the proper flag/args combination
-func (a *App) Run(arguments []string) (err error) {
+// Setup runs initialization code to ensure all data structures are ready for
+// `Run` or inspection prior to `Run`. It is internally called by `Run`, but
+// will return early if setup has already happened.
+func (a *App) Setup() {
+ if a.didSetup {
+ return
+ }
+
+ a.didSetup = true
+
if a.Author != "" || a.Email != "" {
a.Authors = append(a.Authors, Author{Name: a.Author, Email: a.Email})
}
@@ -97,7 +144,6 @@ func (a *App) Run(arguments []string) (err error) {
}
a.Commands = newCmds
- // append help to commands
if a.Command(helpCommand.Name) == nil && !a.HideHelp {
a.Commands = append(a.Commands, helpCommand)
if (HelpFlag != BoolFlag{}) {
@@ -105,35 +151,66 @@ func (a *App) Run(arguments []string) (err error) {
}
}
- //append version/help flags
- if a.EnableBashCompletion {
- a.appendFlag(BashCompletionFlag)
- }
-
if !a.HideVersion {
a.appendFlag(VersionFlag)
}
+ a.categories = CommandCategories{}
+ for _, command := range a.Commands {
+ a.categories = a.categories.AddCommand(command.Category, command)
+ }
+ sort.Sort(a.categories)
+
+ if a.Metadata == nil {
+ a.Metadata = make(map[string]interface{})
+ }
+
+ if a.Writer == nil {
+ a.Writer = os.Stdout
+ }
+}
+
+// Run is the entry point to the cli app. Parses the arguments slice and routes
+// to the proper flag/args combination
+func (a *App) Run(arguments []string) (err error) {
+ a.Setup()
+
+ // handle the completion flag separately from the flagset since
+ // completion could be attempted after a flag, but before its value was put
+ // on the command line. this causes the flagset to interpret the completion
+ // flag name as the value of the flag before it which is undesirable
+ // note that we can only do this because the shell autocomplete function
+ // always appends the completion flag at the end of the command
+ shellComplete, arguments := checkShellCompleteFlag(a, arguments)
+
// parse flags
- set := flagSet(a.Name, a.Flags)
+ set, err := flagSet(a.Name, a.Flags)
+ if err != nil {
+ return err
+ }
+
set.SetOutput(ioutil.Discard)
err = set.Parse(arguments[1:])
nerr := normalizeFlags(a.Flags, set)
+ context := NewContext(a, set, nil)
if nerr != nil {
fmt.Fprintln(a.Writer, nerr)
- context := NewContext(a, set, nil)
ShowAppHelp(context)
return nerr
}
- context := NewContext(a, set, nil)
+ context.shellComplete = shellComplete
if checkCompletions(context) {
return nil
}
if err != nil {
- fmt.Fprintln(a.Writer, "Incorrect Usage.")
- fmt.Fprintln(a.Writer)
+ if a.OnUsageError != nil {
+ err := a.OnUsageError(context, err, false)
+ HandleExitCoder(err)
+ return err
+ }
+ fmt.Fprintf(a.Writer, "%s %s\n\n", "Incorrect Usage.", err.Error())
ShowAppHelp(context)
return err
}
@@ -150,8 +227,7 @@ func (a *App) Run(arguments []string) (err error) {
if a.After != nil {
defer func() {
- afterErr := a.After(context)
- if afterErr != nil {
+ if afterErr := a.After(context); afterErr != nil {
if err != nil {
err = NewMultiError(err, afterErr)
} else {
@@ -162,8 +238,11 @@ func (a *App) Run(arguments []string) (err error) {
}
if a.Before != nil {
- err := a.Before(context)
- if err != nil {
+ beforeErr := a.Before(context)
+ if beforeErr != nil {
+ ShowAppHelp(context)
+ HandleExitCoder(beforeErr)
+ err = beforeErr
return err
}
}
@@ -177,20 +256,31 @@ func (a *App) Run(arguments []string) (err error) {
}
}
+ if a.Action == nil {
+ a.Action = helpCommand.Action
+ }
+
// Run default Action
- a.Action(context)
- return nil
+ err = HandleAction(a.Action, context)
+
+ HandleExitCoder(err)
+ return err
}
-// Another entry point to the cli app, takes care of passing arguments and error handling
+// RunAndExitOnError calls .Run() and exits non-zero if an error was returned
+//
+// Deprecated: instead you should return an error that fulfills cli.ExitCoder
+// to cli.App.Run. This will cause the application to exit with the given eror
+// code in the cli.ExitCoder
func (a *App) RunAndExitOnError() {
if err := a.Run(os.Args); err != nil {
- fmt.Fprintln(os.Stderr, err)
- os.Exit(1)
+ fmt.Fprintln(a.errWriter(), err)
+ OsExiter(1)
}
}
-// Invokes the subcommand given the context, parses ctx.Args() to generate command-specific flags
+// RunAsSubcommand invokes the subcommand given the context, parses ctx.Args() to
+// generate command-specific flags
func (a *App) RunAsSubcommand(ctx *Context) (err error) {
// append help to commands
if len(a.Commands) > 0 {
@@ -211,13 +301,12 @@ func (a *App) RunAsSubcommand(ctx *Context) (err error) {
}
a.Commands = newCmds
- // append flags
- if a.EnableBashCompletion {
- a.appendFlag(BashCompletionFlag)
+ // parse flags
+ set, err := flagSet(a.Name, a.Flags)
+ if err != nil {
+ return err
}
- // parse flags
- set := flagSet(a.Name, a.Flags)
set.SetOutput(ioutil.Discard)
err = set.Parse(ctx.Args().Tail())
nerr := normalizeFlags(a.Flags, set)
@@ -239,8 +328,12 @@ func (a *App) RunAsSubcommand(ctx *Context) (err error) {
}
if err != nil {
- fmt.Fprintln(a.Writer, "Incorrect Usage.")
- fmt.Fprintln(a.Writer)
+ if a.OnUsageError != nil {
+ err = a.OnUsageError(context, err, true)
+ HandleExitCoder(err)
+ return err
+ }
+ fmt.Fprintf(a.Writer, "%s %s\n\n", "Incorrect Usage.", err.Error())
ShowSubcommandHelp(context)
return err
}
@@ -259,6 +352,7 @@ func (a *App) RunAsSubcommand(ctx *Context) (err error) {
defer func() {
afterErr := a.After(context)
if afterErr != nil {
+ HandleExitCoder(err)
if err != nil {
err = NewMultiError(err, afterErr)
} else {
@@ -269,8 +363,10 @@ func (a *App) RunAsSubcommand(ctx *Context) (err error) {
}
if a.Before != nil {
- err := a.Before(context)
- if err != nil {
+ beforeErr := a.Before(context)
+ if beforeErr != nil {
+ HandleExitCoder(beforeErr)
+ err = beforeErr
return err
}
}
@@ -285,12 +381,13 @@ func (a *App) RunAsSubcommand(ctx *Context) (err error) {
}
// Run default Action
- a.Action(context)
+ err = HandleAction(a.Action, context)
- return nil
+ HandleExitCoder(err)
+ return err
}
-// Returns the named command on App. Returns nil if the command does not exist
+// Command returns the named command on App. Returns nil if the command does not exist
func (a *App) Command(name string) *Command {
for _, c := range a.Commands {
if c.HasName(name) {
@@ -301,6 +398,46 @@ func (a *App) Command(name string) *Command {
return nil
}
+// Categories returns a slice containing all the categories with the commands they contain
+func (a *App) Categories() CommandCategories {
+ return a.categories
+}
+
+// VisibleCategories returns a slice of categories and commands that are
+// Hidden=false
+func (a *App) VisibleCategories() []*CommandCategory {
+ ret := []*CommandCategory{}
+ for _, category := range a.categories {
+ if visible := func() *CommandCategory {
+ for _, command := range category.Commands {
+ if !command.Hidden {
+ return category
+ }
+ }
+ return nil
+ }(); visible != nil {
+ ret = append(ret, visible)
+ }
+ }
+ return ret
+}
+
+// VisibleCommands returns a slice of the Commands with Hidden=false
+func (a *App) VisibleCommands() []Command {
+ ret := []Command{}
+ for _, command := range a.Commands {
+ if !command.Hidden {
+ ret = append(ret, command)
+ }
+ }
+ return ret
+}
+
+// VisibleFlags returns a slice of the Flags with Hidden=false
+func (a *App) VisibleFlags() []Flag {
+ return visibleFlags(a.Flags)
+}
+
func (a *App) hasFlag(flag Flag) bool {
for _, f := range a.Flags {
if flag == f {
@@ -311,6 +448,16 @@ func (a *App) hasFlag(flag Flag) bool {
return false
}
+func (a *App) errWriter() io.Writer {
+
+ // When the app ErrWriter is nil use the package level one.
+ if a.ErrWriter == nil {
+ return ErrWriter
+ }
+
+ return a.ErrWriter
+}
+
func (a *App) appendFlag(flag Flag) {
if !a.hasFlag(flag) {
a.Flags = append(a.Flags, flag)
@@ -327,8 +474,24 @@ type Author struct {
func (a Author) String() string {
e := ""
if a.Email != "" {
- e = "<" + a.Email + "> "
+ e = " <" + a.Email + ">"
}
- return fmt.Sprintf("%v %v", a.Name, e)
+ return fmt.Sprintf("%v%v", a.Name, e)
+}
+
+// HandleAction attempts to figure out which Action signature was used. If
+// it's an ActionFunc or a func with the legacy signature for Action, the func
+// is run!
+func HandleAction(action interface{}, context *Context) (err error) {
+ if a, ok := action.(ActionFunc); ok {
+ return a(context)
+ } else if a, ok := action.(func(*Context) error); ok {
+ return a(context)
+ } else if a, ok := action.(func(*Context)); ok { // deprecated function signature
+ a(context)
+ return nil
+ } else {
+ return errInvalidActionType
+ }
}
diff --git a/vendor/github.com/codegangsta/cli/autocomplete/bash_autocomplete b/vendor/github.com/codegangsta/cli/autocomplete/bash_autocomplete
deleted file mode 100644
index 21a232f1f55..00000000000
--- a/vendor/github.com/codegangsta/cli/autocomplete/bash_autocomplete
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/bash
-
-: ${PROG:=$(basename ${BASH_SOURCE})}
-
-_cli_bash_autocomplete() {
- local cur opts base
- COMPREPLY=()
- cur="${COMP_WORDS[COMP_CWORD]}"
- opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion )
- COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
- return 0
- }
-
- complete -F _cli_bash_autocomplete $PROG
diff --git a/vendor/github.com/codegangsta/cli/autocomplete/zsh_autocomplete b/vendor/github.com/codegangsta/cli/autocomplete/zsh_autocomplete
deleted file mode 100644
index 5430a18f957..00000000000
--- a/vendor/github.com/codegangsta/cli/autocomplete/zsh_autocomplete
+++ /dev/null
@@ -1,5 +0,0 @@
-autoload -U compinit && compinit
-autoload -U bashcompinit && bashcompinit
-
-script_dir=$(dirname $0)
-source ${script_dir}/bash_autocomplete
diff --git a/vendor/github.com/codegangsta/cli/category.go b/vendor/github.com/codegangsta/cli/category.go
new file mode 100644
index 00000000000..1a6055023e7
--- /dev/null
+++ b/vendor/github.com/codegangsta/cli/category.go
@@ -0,0 +1,44 @@
+package cli
+
+// CommandCategories is a slice of *CommandCategory.
+type CommandCategories []*CommandCategory
+
+// CommandCategory is a category containing commands.
+type CommandCategory struct {
+ Name string
+ Commands Commands
+}
+
+func (c CommandCategories) Less(i, j int) bool {
+ return c[i].Name < c[j].Name
+}
+
+func (c CommandCategories) Len() int {
+ return len(c)
+}
+
+func (c CommandCategories) Swap(i, j int) {
+ c[i], c[j] = c[j], c[i]
+}
+
+// AddCommand adds a command to a category.
+func (c CommandCategories) AddCommand(category string, command Command) CommandCategories {
+ for _, commandCategory := range c {
+ if commandCategory.Name == category {
+ commandCategory.Commands = append(commandCategory.Commands, command)
+ return c
+ }
+ }
+ return append(c, &CommandCategory{Name: category, Commands: []Command{command}})
+}
+
+// VisibleCommands returns a slice of the Commands with Hidden=false
+func (c *CommandCategory) VisibleCommands() []Command {
+ ret := []Command{}
+ for _, command := range c.Commands {
+ if !command.Hidden {
+ ret = append(ret, command)
+ }
+ }
+ return ret
+}
diff --git a/vendor/github.com/codegangsta/cli/cli.go b/vendor/github.com/codegangsta/cli/cli.go
index 31dc9124d1e..90c07eb8ef9 100644
--- a/vendor/github.com/codegangsta/cli/cli.go
+++ b/vendor/github.com/codegangsta/cli/cli.go
@@ -10,31 +10,13 @@
// app := cli.NewApp()
// app.Name = "greet"
// app.Usage = "say a greeting"
-// app.Action = func(c *cli.Context) {
+// app.Action = func(c *cli.Context) error {
// println("Greetings")
+// return nil
// }
//
// app.Run(os.Args)
// }
package cli
-import (
- "strings"
-)
-
-type MultiError struct {
- Errors []error
-}
-
-func NewMultiError(err ...error) MultiError {
- return MultiError{Errors: err}
-}
-
-func (m MultiError) Error() string {
- errs := make([]string, len(m.Errors))
- for i, err := range m.Errors {
- errs[i] = err.Error()
- }
-
- return strings.Join(errs, "\n")
-}
+//go:generate python ./generate-flag-types cli -i flag-types.json -o flag_generated.go
diff --git a/vendor/github.com/codegangsta/cli/command.go b/vendor/github.com/codegangsta/cli/command.go
index 824e77bae3f..23de2944bea 100644
--- a/vendor/github.com/codegangsta/cli/command.go
+++ b/vendor/github.com/codegangsta/cli/command.go
@@ -3,6 +3,7 @@ package cli
import (
"fmt"
"io/ioutil"
+ "sort"
"strings"
)
@@ -16,35 +17,70 @@ type Command struct {
Aliases []string
// A short description of the usage of this command
Usage string
+ // Custom text to show on USAGE section of help
+ UsageText string
// A longer explanation of how the command works
Description string
// A short description of the arguments of this command
ArgsUsage string
+ // The category the command is part of
+ Category string
// The function to call when checking for bash command completions
- BashComplete func(context *Context)
+ BashComplete BashCompleteFunc
// An action to execute before any sub-subcommands are run, but after the context is ready
// If a non-nil error is returned, no sub-subcommands are run
- Before func(context *Context) error
+ Before BeforeFunc
// An action to execute after any subcommands are run, but after the subcommand has finished
// It is run even if Action() panics
- After func(context *Context) error
+ After AfterFunc
// The function to call when this command is invoked
- Action func(context *Context)
+ Action interface{}
+ // TODO: replace `Action: interface{}` with `Action: ActionFunc` once some kind
+ // of deprecation period has passed, maybe?
+
+ // Execute this function if a usage error occurs.
+ OnUsageError OnUsageErrorFunc
// List of child commands
- Subcommands []Command
+ Subcommands Commands
// List of flags to parse
Flags []Flag
// Treat all flags as normal arguments if true
SkipFlagParsing bool
+ // Skip argument reordering which attempts to move flags before arguments,
+ // but only works if all flags appear after all arguments. This behavior was
+ // removed n version 2 since it only works under specific conditions so we
+ // backport here by exposing it as an option for compatibility.
+ SkipArgReorder bool
// Boolean to hide built-in help command
HideHelp bool
+ // Boolean to hide this command from help or completion
+ Hidden bool
// Full name of command for help, defaults to full command name, including parent commands.
HelpName string
commandNamePath []string
+
+ // CustomHelpTemplate the text template for the command help topic.
+ // cli.go uses text/template to render templates. You can
+ // render custom help text by setting this variable.
+ CustomHelpTemplate string
}
-// Returns the full name of the command.
+type CommandsByName []Command
+
+func (c CommandsByName) Len() int {
+ return len(c)
+}
+
+func (c CommandsByName) Less(i, j int) bool {
+ return c[i].Name < c[j].Name
+}
+
+func (c CommandsByName) Swap(i, j int) {
+ c[i], c[j] = c[j], c[i]
+}
+
+// FullName returns the full name of the command.
// For subcommands this ensures that parent commands are part of the command path
func (c Command) FullName() string {
if c.commandNamePath == nil {
@@ -53,9 +89,12 @@ func (c Command) FullName() string {
return strings.Join(c.commandNamePath, " ")
}
-// Invokes the command given the context, parses ctx.Args() to generate command-specific flags
-func (c Command) Run(ctx *Context) error {
- if len(c.Subcommands) > 0 || c.Before != nil || c.After != nil {
+// Commands is a slice of Command
+type Commands []Command
+
+// Run invokes the command given the context, parses ctx.Args() to generate command-specific flags
+func (c Command) Run(ctx *Context) (err error) {
+ if len(c.Subcommands) > 0 {
return c.startApp(ctx)
}
@@ -67,21 +106,24 @@ func (c Command) Run(ctx *Context) error {
)
}
- if ctx.App.EnableBashCompletion {
- c.Flags = append(c.Flags, BashCompletionFlag)
+ set, err := flagSet(c.Name, c.Flags)
+ if err != nil {
+ return err
}
-
- set := flagSet(c.Name, c.Flags)
set.SetOutput(ioutil.Discard)
- var err error
- if !c.SkipFlagParsing {
+ if c.SkipFlagParsing {
+ err = set.Parse(append([]string{"--"}, ctx.Args().Tail()...))
+ } else if !c.SkipArgReorder {
firstFlagIndex := -1
terminatorIndex := -1
for index, arg := range ctx.Args() {
if arg == "--" {
terminatorIndex = index
break
+ } else if arg == "-" {
+ // Do nothing. A dash alone is not really a flag.
+ continue
} else if strings.HasPrefix(arg, "-") && firstFlagIndex == -1 {
firstFlagIndex = index
}
@@ -105,16 +147,7 @@ func (c Command) Run(ctx *Context) error {
err = set.Parse(ctx.Args().Tail())
}
} else {
- if c.SkipFlagParsing {
- err = set.Parse(append([]string{"--"}, ctx.Args().Tail()...))
- }
- }
-
- if err != nil {
- fmt.Fprintln(ctx.App.Writer, "Incorrect Usage.")
- fmt.Fprintln(ctx.App.Writer)
- ShowCommandHelp(ctx, c.Name)
- return err
+ err = set.Parse(ctx.Args().Tail())
}
nerr := normalizeFlags(c.Flags, set)
@@ -124,20 +157,65 @@ func (c Command) Run(ctx *Context) error {
ShowCommandHelp(ctx, c.Name)
return nerr
}
- context := NewContext(ctx.App, set, ctx)
+ context := NewContext(ctx.App, set, ctx)
+ context.Command = c
if checkCommandCompletions(context, c.Name) {
return nil
}
+ if err != nil {
+ if c.OnUsageError != nil {
+ err := c.OnUsageError(context, err, false)
+ HandleExitCoder(err)
+ return err
+ }
+ fmt.Fprintln(context.App.Writer, "Incorrect Usage:", err.Error())
+ fmt.Fprintln(context.App.Writer)
+ ShowCommandHelp(context, c.Name)
+ return err
+ }
+
if checkCommandHelp(context, c.Name) {
return nil
}
- context.Command = c
- c.Action(context)
- return nil
+
+ if c.After != nil {
+ defer func() {
+ afterErr := c.After(context)
+ if afterErr != nil {
+ HandleExitCoder(err)
+ if err != nil {
+ err = NewMultiError(err, afterErr)
+ } else {
+ err = afterErr
+ }
+ }
+ }()
+ }
+
+ if c.Before != nil {
+ err = c.Before(context)
+ if err != nil {
+ ShowCommandHelp(context, c.Name)
+ HandleExitCoder(err)
+ return err
+ }
+ }
+
+ if c.Action == nil {
+ c.Action = helpSubcommand.Action
+ }
+
+ err = HandleAction(c.Action, context)
+
+ if err != nil {
+ HandleExitCoder(err)
+ }
+ return err
}
+// Names returns the names including short names and aliases.
func (c Command) Names() []string {
names := []string{c.Name}
@@ -148,7 +226,7 @@ func (c Command) Names() []string {
return append(names, c.Aliases...)
}
-// Returns true if Command.Name or Command.ShortName matches given name
+// HasName returns true if Command.Name or Command.ShortName matches given name
func (c Command) HasName(name string) bool {
for _, n := range c.Names() {
if n == name {
@@ -160,23 +238,22 @@ func (c Command) HasName(name string) bool {
func (c Command) startApp(ctx *Context) error {
app := NewApp()
-
+ app.Metadata = ctx.App.Metadata
// set the name and usage
app.Name = fmt.Sprintf("%s %s", ctx.App.Name, c.Name)
if c.HelpName == "" {
app.HelpName = c.HelpName
} else {
- app.HelpName = fmt.Sprintf("%s %s", ctx.App.Name, c.Name)
+ app.HelpName = app.Name
}
- if c.Description != "" {
- app.Usage = c.Description
- } else {
- app.Usage = c.Usage
- }
+ app.Usage = c.Usage
+ app.Description = c.Description
+ app.ArgsUsage = c.ArgsUsage
// set CommandNotFound
app.CommandNotFound = ctx.App.CommandNotFound
+ app.CustomAppHelpTemplate = c.CustomHelpTemplate
// set the flags and commands
app.Commands = c.Subcommands
@@ -189,6 +266,14 @@ func (c Command) startApp(ctx *Context) error {
app.Author = ctx.App.Author
app.Email = ctx.App.Email
app.Writer = ctx.App.Writer
+ app.ErrWriter = ctx.App.ErrWriter
+
+ app.categories = CommandCategories{}
+ for _, command := range c.Subcommands {
+ app.categories = app.categories.AddCommand(command.Category, command)
+ }
+
+ sort.Sort(app.categories)
// bash completion
app.EnableBashCompletion = ctx.App.EnableBashCompletion
@@ -204,13 +289,16 @@ func (c Command) startApp(ctx *Context) error {
} else {
app.Action = helpSubcommand.Action
}
+ app.OnUsageError = c.OnUsageError
- var newCmds []Command
- for _, cc := range app.Commands {
- cc.commandNamePath = []string{c.Name, cc.Name}
- newCmds = append(newCmds, cc)
+ for index, cc := range app.Commands {
+ app.Commands[index].commandNamePath = []string{c.Name, cc.Name}
}
- app.Commands = newCmds
return app.RunAsSubcommand(ctx)
}
+
+// VisibleFlags returns a slice of the Flags with Hidden=false
+func (c Command) VisibleFlags() []Flag {
+ return visibleFlags(c.Flags)
+}
diff --git a/vendor/github.com/codegangsta/cli/context.go b/vendor/github.com/codegangsta/cli/context.go
index 0513d34f61e..db94191e2af 100644
--- a/vendor/github.com/codegangsta/cli/context.go
+++ b/vendor/github.com/codegangsta/cli/context.go
@@ -3,9 +3,9 @@ package cli
import (
"errors"
"flag"
- "strconv"
+ "reflect"
"strings"
- "time"
+ "syscall"
)
// Context is a type that is passed through to
@@ -13,154 +13,121 @@ import (
// can be used to retrieve context-specific Args and
// parsed command-line options.
type Context struct {
- App *App
- Command Command
- flagSet *flag.FlagSet
- setFlags map[string]bool
- globalSetFlags map[string]bool
- parentContext *Context
+ App *App
+ Command Command
+ shellComplete bool
+ flagSet *flag.FlagSet
+ setFlags map[string]bool
+ parentContext *Context
}
-// Creates a new context. For use in when invoking an App or Command action.
+// NewContext creates a new context. For use in when invoking an App or Command action.
func NewContext(app *App, set *flag.FlagSet, parentCtx *Context) *Context {
- return &Context{App: app, flagSet: set, parentContext: parentCtx}
-}
+ c := &Context{App: app, flagSet: set, parentContext: parentCtx}
-// Looks up the value of a local int flag, returns 0 if no int flag exists
-func (c *Context) Int(name string) int {
- return lookupInt(name, c.flagSet)
-}
-
-// Looks up the value of a local time.Duration flag, returns 0 if no time.Duration flag exists
-func (c *Context) Duration(name string) time.Duration {
- return lookupDuration(name, c.flagSet)
-}
-
-// Looks up the value of a local float64 flag, returns 0 if no float64 flag exists
-func (c *Context) Float64(name string) float64 {
- return lookupFloat64(name, c.flagSet)
-}
-
-// Looks up the value of a local bool flag, returns false if no bool flag exists
-func (c *Context) Bool(name string) bool {
- return lookupBool(name, c.flagSet)
-}
-
-// Looks up the value of a local boolT flag, returns false if no bool flag exists
-func (c *Context) BoolT(name string) bool {
- return lookupBoolT(name, c.flagSet)
-}
-
-// Looks up the value of a local string flag, returns "" if no string flag exists
-func (c *Context) String(name string) string {
- return lookupString(name, c.flagSet)
-}
-
-// Looks up the value of a local string slice flag, returns nil if no string slice flag exists
-func (c *Context) StringSlice(name string) []string {
- return lookupStringSlice(name, c.flagSet)
-}
-
-// Looks up the value of a local int slice flag, returns nil if no int slice flag exists
-func (c *Context) IntSlice(name string) []int {
- return lookupIntSlice(name, c.flagSet)
-}
-
-// Looks up the value of a local generic flag, returns nil if no generic flag exists
-func (c *Context) Generic(name string) interface{} {
- return lookupGeneric(name, c.flagSet)
-}
-
-// Looks up the value of a global int flag, returns 0 if no int flag exists
-func (c *Context) GlobalInt(name string) int {
- if fs := lookupGlobalFlagSet(name, c); fs != nil {
- return lookupInt(name, fs)
+ if parentCtx != nil {
+ c.shellComplete = parentCtx.shellComplete
}
- return 0
+
+ return c
}
-// Looks up the value of a global time.Duration flag, returns 0 if no time.Duration flag exists
-func (c *Context) GlobalDuration(name string) time.Duration {
- if fs := lookupGlobalFlagSet(name, c); fs != nil {
- return lookupDuration(name, fs)
- }
- return 0
-}
-
-// Looks up the value of a global bool flag, returns false if no bool flag exists
-func (c *Context) GlobalBool(name string) bool {
- if fs := lookupGlobalFlagSet(name, c); fs != nil {
- return lookupBool(name, fs)
- }
- return false
-}
-
-// Looks up the value of a global string flag, returns "" if no string flag exists
-func (c *Context) GlobalString(name string) string {
- if fs := lookupGlobalFlagSet(name, c); fs != nil {
- return lookupString(name, fs)
- }
- return ""
-}
-
-// Looks up the value of a global string slice flag, returns nil if no string slice flag exists
-func (c *Context) GlobalStringSlice(name string) []string {
- if fs := lookupGlobalFlagSet(name, c); fs != nil {
- return lookupStringSlice(name, fs)
- }
- return nil
-}
-
-// Looks up the value of a global int slice flag, returns nil if no int slice flag exists
-func (c *Context) GlobalIntSlice(name string) []int {
- if fs := lookupGlobalFlagSet(name, c); fs != nil {
- return lookupIntSlice(name, fs)
- }
- return nil
-}
-
-// Looks up the value of a global generic flag, returns nil if no generic flag exists
-func (c *Context) GlobalGeneric(name string) interface{} {
- if fs := lookupGlobalFlagSet(name, c); fs != nil {
- return lookupGeneric(name, fs)
- }
- return nil
-}
-
-// Returns the number of flags set
+// NumFlags returns the number of flags set
func (c *Context) NumFlags() int {
return c.flagSet.NFlag()
}
-// Determines if the flag was actually set
+// Set sets a context flag to a value.
+func (c *Context) Set(name, value string) error {
+ c.setFlags = nil
+ return c.flagSet.Set(name, value)
+}
+
+// GlobalSet sets a context flag to a value on the global flagset
+func (c *Context) GlobalSet(name, value string) error {
+ globalContext(c).setFlags = nil
+ return globalContext(c).flagSet.Set(name, value)
+}
+
+// IsSet determines if the flag was actually set
func (c *Context) IsSet(name string) bool {
if c.setFlags == nil {
c.setFlags = make(map[string]bool)
+
c.flagSet.Visit(func(f *flag.Flag) {
c.setFlags[f.Name] = true
})
- }
- return c.setFlags[name] == true
-}
-// Determines if the global flag was actually set
-func (c *Context) GlobalIsSet(name string) bool {
- if c.globalSetFlags == nil {
- c.globalSetFlags = make(map[string]bool)
- ctx := c
- if ctx.parentContext != nil {
- ctx = ctx.parentContext
+ c.flagSet.VisitAll(func(f *flag.Flag) {
+ if _, ok := c.setFlags[f.Name]; ok {
+ return
+ }
+ c.setFlags[f.Name] = false
+ })
+
+ // XXX hack to support IsSet for flags with EnvVar
+ //
+ // There isn't an easy way to do this with the current implementation since
+ // whether a flag was set via an environment variable is very difficult to
+ // determine here. Instead, we intend to introduce a backwards incompatible
+ // change in version 2 to add `IsSet` to the Flag interface to push the
+ // responsibility closer to where the information required to determine
+ // whether a flag is set by non-standard means such as environment
+ // variables is avaliable.
+ //
+ // See https://github.com/urfave/cli/issues/294 for additional discussion
+ flags := c.Command.Flags
+ if c.Command.Name == "" { // cannot == Command{} since it contains slice types
+ if c.App != nil {
+ flags = c.App.Flags
+ }
}
- for ; ctx != nil && c.globalSetFlags[name] == false; ctx = ctx.parentContext {
- ctx.flagSet.Visit(func(f *flag.Flag) {
- c.globalSetFlags[f.Name] = true
+ for _, f := range flags {
+ eachName(f.GetName(), func(name string) {
+ if isSet, ok := c.setFlags[name]; isSet || !ok {
+ return
+ }
+
+ val := reflect.ValueOf(f)
+ if val.Kind() == reflect.Ptr {
+ val = val.Elem()
+ }
+
+ envVarValue := val.FieldByName("EnvVar")
+ if !envVarValue.IsValid() {
+ return
+ }
+
+ eachName(envVarValue.String(), func(envVar string) {
+ envVar = strings.TrimSpace(envVar)
+ if _, ok := syscall.Getenv(envVar); ok {
+ c.setFlags[name] = true
+ return
+ }
+ })
})
}
}
- return c.globalSetFlags[name]
+
+ return c.setFlags[name]
}
-// Returns a slice of flag names used in this context.
+// GlobalIsSet determines if the global flag was actually set
+func (c *Context) GlobalIsSet(name string) bool {
+ ctx := c
+ if ctx.parentContext != nil {
+ ctx = ctx.parentContext
+ }
+
+ for ; ctx != nil; ctx = ctx.parentContext {
+ if ctx.IsSet(name) {
+ return true
+ }
+ }
+ return false
+}
+
+// FlagNames returns a slice of flag names used in this context.
func (c *Context) FlagNames() (names []string) {
for _, flag := range c.Command.Flags {
name := strings.Split(flag.GetName(), ",")[0]
@@ -172,7 +139,7 @@ func (c *Context) FlagNames() (names []string) {
return
}
-// Returns a slice of global flag names used by the app.
+// GlobalFlagNames returns a slice of global flag names used by the app.
func (c *Context) GlobalFlagNames() (names []string) {
for _, flag := range c.App.Flags {
name := strings.Split(flag.GetName(), ",")[0]
@@ -184,20 +151,31 @@ func (c *Context) GlobalFlagNames() (names []string) {
return
}
-// Returns the parent context, if any
+// Parent returns the parent context, if any
func (c *Context) Parent() *Context {
return c.parentContext
}
+// value returns the value of the flag coressponding to `name`
+func (c *Context) value(name string) interface{} {
+ return c.flagSet.Lookup(name).Value.(flag.Getter).Get()
+}
+
+// Args contains apps console arguments
type Args []string
-// Returns the command line arguments associated with the context.
+// Args returns the command line arguments associated with the context.
func (c *Context) Args() Args {
args := Args(c.flagSet.Args())
return args
}
-// Returns the nth argument, or else a blank string
+// NArg returns the number of the command line arguments.
+func (c *Context) NArg() int {
+ return len(c.Args())
+}
+
+// Get returns the nth argument, or else a blank string
func (a Args) Get(n int) string {
if len(a) > n {
return a[n]
@@ -205,12 +183,12 @@ func (a Args) Get(n int) string {
return ""
}
-// Returns the first argument, or else a blank string
+// First returns the first argument, or else a blank string
func (a Args) First() string {
return a.Get(0)
}
-// Return the rest of the arguments (not the first one)
+// Tail returns the rest of the arguments (not the first one)
// or else an empty string slice
func (a Args) Tail() []string {
if len(a) >= 2 {
@@ -219,12 +197,12 @@ func (a Args) Tail() []string {
return []string{}
}
-// Checks if there are any arguments present
+// Present checks if there are any arguments present
func (a Args) Present() bool {
return len(a) != 0
}
-// Swaps arguments at the given indexes
+// Swap swaps arguments at the given indexes
func (a Args) Swap(from, to int) error {
if from >= len(a) || to >= len(a) {
return errors.New("index out of range")
@@ -233,6 +211,19 @@ func (a Args) Swap(from, to int) error {
return nil
}
+func globalContext(ctx *Context) *Context {
+ if ctx == nil {
+ return nil
+ }
+
+ for {
+ if ctx.parentContext == nil {
+ return ctx
+ }
+ ctx = ctx.parentContext
+ }
+}
+
func lookupGlobalFlagSet(name string, ctx *Context) *flag.FlagSet {
if ctx.parentContext != nil {
ctx = ctx.parentContext
@@ -245,107 +236,6 @@ func lookupGlobalFlagSet(name string, ctx *Context) *flag.FlagSet {
return nil
}
-func lookupInt(name string, set *flag.FlagSet) int {
- f := set.Lookup(name)
- if f != nil {
- val, err := strconv.Atoi(f.Value.String())
- if err != nil {
- return 0
- }
- return val
- }
-
- return 0
-}
-
-func lookupDuration(name string, set *flag.FlagSet) time.Duration {
- f := set.Lookup(name)
- if f != nil {
- val, err := time.ParseDuration(f.Value.String())
- if err == nil {
- return val
- }
- }
-
- return 0
-}
-
-func lookupFloat64(name string, set *flag.FlagSet) float64 {
- f := set.Lookup(name)
- if f != nil {
- val, err := strconv.ParseFloat(f.Value.String(), 64)
- if err != nil {
- return 0
- }
- return val
- }
-
- return 0
-}
-
-func lookupString(name string, set *flag.FlagSet) string {
- f := set.Lookup(name)
- if f != nil {
- return f.Value.String()
- }
-
- return ""
-}
-
-func lookupStringSlice(name string, set *flag.FlagSet) []string {
- f := set.Lookup(name)
- if f != nil {
- return (f.Value.(*StringSlice)).Value()
-
- }
-
- return nil
-}
-
-func lookupIntSlice(name string, set *flag.FlagSet) []int {
- f := set.Lookup(name)
- if f != nil {
- return (f.Value.(*IntSlice)).Value()
-
- }
-
- return nil
-}
-
-func lookupGeneric(name string, set *flag.FlagSet) interface{} {
- f := set.Lookup(name)
- if f != nil {
- return f.Value
- }
- return nil
-}
-
-func lookupBool(name string, set *flag.FlagSet) bool {
- f := set.Lookup(name)
- if f != nil {
- val, err := strconv.ParseBool(f.Value.String())
- if err != nil {
- return false
- }
- return val
- }
-
- return false
-}
-
-func lookupBoolT(name string, set *flag.FlagSet) bool {
- f := set.Lookup(name)
- if f != nil {
- val, err := strconv.ParseBool(f.Value.String())
- if err != nil {
- return true
- }
- return val
- }
-
- return false
-}
-
func copyFlag(name string, ff *flag.Flag, set *flag.FlagSet) {
switch ff.Value.(type) {
case *StringSlice:
diff --git a/vendor/github.com/codegangsta/cli/errors.go b/vendor/github.com/codegangsta/cli/errors.go
new file mode 100644
index 00000000000..562b2953cf2
--- /dev/null
+++ b/vendor/github.com/codegangsta/cli/errors.go
@@ -0,0 +1,115 @@
+package cli
+
+import (
+ "fmt"
+ "io"
+ "os"
+ "strings"
+)
+
+// OsExiter is the function used when the app exits. If not set defaults to os.Exit.
+var OsExiter = os.Exit
+
+// ErrWriter is used to write errors to the user. This can be anything
+// implementing the io.Writer interface and defaults to os.Stderr.
+var ErrWriter io.Writer = os.Stderr
+
+// MultiError is an error that wraps multiple errors.
+type MultiError struct {
+ Errors []error
+}
+
+// NewMultiError creates a new MultiError. Pass in one or more errors.
+func NewMultiError(err ...error) MultiError {
+ return MultiError{Errors: err}
+}
+
+// Error implements the error interface.
+func (m MultiError) Error() string {
+ errs := make([]string, len(m.Errors))
+ for i, err := range m.Errors {
+ errs[i] = err.Error()
+ }
+
+ return strings.Join(errs, "\n")
+}
+
+type ErrorFormatter interface {
+ Format(s fmt.State, verb rune)
+}
+
+// ExitCoder is the interface checked by `App` and `Command` for a custom exit
+// code
+type ExitCoder interface {
+ error
+ ExitCode() int
+}
+
+// ExitError fulfills both the builtin `error` interface and `ExitCoder`
+type ExitError struct {
+ exitCode int
+ message interface{}
+}
+
+// NewExitError makes a new *ExitError
+func NewExitError(message interface{}, exitCode int) *ExitError {
+ return &ExitError{
+ exitCode: exitCode,
+ message: message,
+ }
+}
+
+// Error returns the string message, fulfilling the interface required by
+// `error`
+func (ee *ExitError) Error() string {
+ return fmt.Sprintf("%v", ee.message)
+}
+
+// ExitCode returns the exit code, fulfilling the interface required by
+// `ExitCoder`
+func (ee *ExitError) ExitCode() int {
+ return ee.exitCode
+}
+
+// HandleExitCoder checks if the error fulfills the ExitCoder interface, and if
+// so prints the error to stderr (if it is non-empty) and calls OsExiter with the
+// given exit code. If the given error is a MultiError, then this func is
+// called on all members of the Errors slice and calls OsExiter with the last exit code.
+func HandleExitCoder(err error) {
+ if err == nil {
+ return
+ }
+
+ if exitErr, ok := err.(ExitCoder); ok {
+ if err.Error() != "" {
+ if _, ok := exitErr.(ErrorFormatter); ok {
+ fmt.Fprintf(ErrWriter, "%+v\n", err)
+ } else {
+ fmt.Fprintln(ErrWriter, err)
+ }
+ }
+ OsExiter(exitErr.ExitCode())
+ return
+ }
+
+ if multiErr, ok := err.(MultiError); ok {
+ code := handleMultiError(multiErr)
+ OsExiter(code)
+ return
+ }
+}
+
+func handleMultiError(multiErr MultiError) int {
+ code := 1
+ for _, merr := range multiErr.Errors {
+ if multiErr2, ok := merr.(MultiError); ok {
+ code = handleMultiError(multiErr2)
+ } else {
+ fmt.Fprintln(ErrWriter, merr)
+ if exitErr, ok := merr.(ExitCoder); ok {
+ code = exitErr.ExitCode()
+ }
+ }
+ }
+ return code
+}
diff --git a/vendor/github.com/codegangsta/cli/flag-types.json b/vendor/github.com/codegangsta/cli/flag-types.json
new file mode 100644
index 00000000000..1223107859a
--- /dev/null
+++ b/vendor/github.com/codegangsta/cli/flag-types.json
@@ -0,0 +1,93 @@
+[
+ {
+ "name": "Bool",
+ "type": "bool",
+ "value": false,
+ "context_default": "false",
+ "parser": "strconv.ParseBool(f.Value.String())"
+ },
+ {
+ "name": "BoolT",
+ "type": "bool",
+ "value": false,
+ "doctail": " that is true by default",
+ "context_default": "false",
+ "parser": "strconv.ParseBool(f.Value.String())"
+ },
+ {
+ "name": "Duration",
+ "type": "time.Duration",
+ "doctail": " (see https://golang.org/pkg/time/#ParseDuration)",
+ "context_default": "0",
+ "parser": "time.ParseDuration(f.Value.String())"
+ },
+ {
+ "name": "Float64",
+ "type": "float64",
+ "context_default": "0",
+ "parser": "strconv.ParseFloat(f.Value.String(), 64)"
+ },
+ {
+ "name": "Generic",
+ "type": "Generic",
+ "dest": false,
+ "context_default": "nil",
+ "context_type": "interface{}"
+ },
+ {
+ "name": "Int64",
+ "type": "int64",
+ "context_default": "0",
+ "parser": "strconv.ParseInt(f.Value.String(), 0, 64)"
+ },
+ {
+ "name": "Int",
+ "type": "int",
+ "context_default": "0",
+ "parser": "strconv.ParseInt(f.Value.String(), 0, 64)",
+ "parser_cast": "int(parsed)"
+ },
+ {
+ "name": "IntSlice",
+ "type": "*IntSlice",
+ "dest": false,
+ "context_default": "nil",
+ "context_type": "[]int",
+ "parser": "(f.Value.(*IntSlice)).Value(), error(nil)"
+ },
+ {
+ "name": "Int64Slice",
+ "type": "*Int64Slice",
+ "dest": false,
+ "context_default": "nil",
+ "context_type": "[]int64",
+ "parser": "(f.Value.(*Int64Slice)).Value(), error(nil)"
+ },
+ {
+ "name": "String",
+ "type": "string",
+ "context_default": "\"\"",
+ "parser": "f.Value.String(), error(nil)"
+ },
+ {
+ "name": "StringSlice",
+ "type": "*StringSlice",
+ "dest": false,
+ "context_default": "nil",
+ "context_type": "[]string",
+ "parser": "(f.Value.(*StringSlice)).Value(), error(nil)"
+ },
+ {
+ "name": "Uint64",
+ "type": "uint64",
+ "context_default": "0",
+ "parser": "strconv.ParseUint(f.Value.String(), 0, 64)"
+ },
+ {
+ "name": "Uint",
+ "type": "uint",
+ "context_default": "0",
+ "parser": "strconv.ParseUint(f.Value.String(), 0, 64)",
+ "parser_cast": "uint(parsed)"
+ }
+]
diff --git a/vendor/github.com/codegangsta/cli/flag.go b/vendor/github.com/codegangsta/cli/flag.go
index 49f30994ea6..877ff3523db 100644
--- a/vendor/github.com/codegangsta/cli/flag.go
+++ b/vendor/github.com/codegangsta/cli/flag.go
@@ -3,33 +3,57 @@ package cli
import (
"flag"
"fmt"
- "os"
+ "reflect"
+ "runtime"
"strconv"
"strings"
+ "syscall"
"time"
)
-// This flag enables bash-completion for all commands and subcommands
-var BashCompletionFlag = BoolFlag{
- Name: "generate-bash-completion",
+const defaultPlaceholder = "value"
+
+// BashCompletionFlag enables bash-completion for all commands and subcommands
+var BashCompletionFlag Flag = BoolFlag{
+ Name: "generate-bash-completion",
+ Hidden: true,
}
-// This flag prints the version for the application
-var VersionFlag = BoolFlag{
+// VersionFlag prints the version for the application
+var VersionFlag Flag = BoolFlag{
Name: "version, v",
Usage: "print the version",
}
-// This flag prints the help for all commands and subcommands
+// HelpFlag prints the help for all commands and subcommands
// Set to the zero value (BoolFlag{}) to disable flag -- keeps subcommand
// unless HideHelp is set to true)
-var HelpFlag = BoolFlag{
+var HelpFlag Flag = BoolFlag{
Name: "help, h",
Usage: "show help",
}
+// FlagStringer converts a flag definition to a string. This is used by help
+// to display a flag.
+var FlagStringer FlagStringFunc = stringifyFlag
+
+// FlagsByName is a slice of Flag.
+type FlagsByName []Flag
+
+func (f FlagsByName) Len() int {
+ return len(f)
+}
+
+func (f FlagsByName) Less(i, j int) bool {
+ return f[i].GetName() < f[j].GetName()
+}
+
+func (f FlagsByName) Swap(i, j int) {
+ f[i], f[j] = f[j], f[i]
+}
+
// Flag is a common interface related to parsing flags in cli.
-// For more advanced flag parsing techniques, it is recomended that
+// For more advanced flag parsing techniques, it is recommended that
// this interface be implemented.
type Flag interface {
fmt.Stringer
@@ -38,13 +62,29 @@ type Flag interface {
GetName() string
}
-func flagSet(name string, flags []Flag) *flag.FlagSet {
+// errorableFlag is an interface that allows us to return errors during apply
+// it allows flags defined in this library to return errors in a fashion backwards compatible
+// TODO remove in v2 and modify the existing Flag interface to return errors
+type errorableFlag interface {
+ Flag
+
+ ApplyWithError(*flag.FlagSet) error
+}
+
+func flagSet(name string, flags []Flag) (*flag.FlagSet, error) {
set := flag.NewFlagSet(name, flag.ContinueOnError)
for _, f := range flags {
- f.Apply(set)
+ //TODO remove in v2 when errorableFlag is removed
+ if ef, ok := f.(errorableFlag); ok {
+ if err := ef.ApplyWithError(set); err != nil {
+ return nil, err
+ }
+ } else {
+ f.Apply(set)
+ }
}
- return set
+ return set, nil
}
func eachName(longName string, fn func(string)) {
@@ -61,30 +101,24 @@ type Generic interface {
String() string
}
-// GenericFlag is the flag type for types implementing Generic
-type GenericFlag struct {
- Name string
- Value Generic
- Usage string
- EnvVar string
-}
-
-// String returns the string representation of the generic flag to display the
-// help text to the user (uses the String() method of the generic flag to show
-// the value)
-func (f GenericFlag) String() string {
- return withEnvHint(f.EnvVar, fmt.Sprintf("%s%s \"%v\"\t%v", prefixFor(f.Name), f.Name, f.Value, f.Usage))
-}
-
// Apply takes the flagset and calls Set on the generic flag with the value
// provided by the user for parsing by the flag
+// Ignores parsing errors
func (f GenericFlag) Apply(set *flag.FlagSet) {
+ f.ApplyWithError(set)
+}
+
+// ApplyWithError takes the flagset and calls Set on the generic flag with the value
+// provided by the user for parsing by the flag
+func (f GenericFlag) ApplyWithError(set *flag.FlagSet) error {
val := f.Value
if f.EnvVar != "" {
for _, envVar := range strings.Split(f.EnvVar, ",") {
envVar = strings.TrimSpace(envVar)
- if envVal := os.Getenv(envVar); envVal != "" {
- val.Set(envVal)
+ if envVal, ok := syscall.Getenv(envVar); ok {
+ if err := val.Set(envVal); err != nil {
+ return fmt.Errorf("could not parse %s as value for flag %s: %s", envVal, f.Name, err)
+ }
break
}
}
@@ -93,13 +127,11 @@ func (f GenericFlag) Apply(set *flag.FlagSet) {
eachName(f.Name, func(name string) {
set.Var(f.Value, name, f.Usage)
})
+
+ return nil
}
-func (f GenericFlag) GetName() string {
- return f.Name
-}
-
-// StringSlice is an opaque type for []string to satisfy flag.Value
+// StringSlice is an opaque type for []string to satisfy flag.Value and flag.Getter
type StringSlice []string
// Set appends the string value to the list of values
@@ -118,32 +150,29 @@ func (f *StringSlice) Value() []string {
return *f
}
-// StringSlice is a string flag that can be specified multiple times on the
-// command-line
-type StringSliceFlag struct {
- Name string
- Value *StringSlice
- Usage string
- EnvVar string
-}
-
-// String returns the usage
-func (f StringSliceFlag) String() string {
- firstName := strings.Trim(strings.Split(f.Name, ",")[0], " ")
- pref := prefixFor(firstName)
- return withEnvHint(f.EnvVar, fmt.Sprintf("%s [%v]\t%v", prefixedNames(f.Name), pref+firstName+" option "+pref+firstName+" option", f.Usage))
+// Get returns the slice of strings set by this flag
+func (f *StringSlice) Get() interface{} {
+ return *f
}
// Apply populates the flag given the flag set and environment
+// Ignores errors
func (f StringSliceFlag) Apply(set *flag.FlagSet) {
+ f.ApplyWithError(set)
+}
+
+// ApplyWithError populates the flag given the flag set and environment
+func (f StringSliceFlag) ApplyWithError(set *flag.FlagSet) error {
if f.EnvVar != "" {
for _, envVar := range strings.Split(f.EnvVar, ",") {
envVar = strings.TrimSpace(envVar)
- if envVal := os.Getenv(envVar); envVal != "" {
+ if envVal, ok := syscall.Getenv(envVar); ok {
newVal := &StringSlice{}
for _, s := range strings.Split(envVal, ",") {
s = strings.TrimSpace(s)
- newVal.Set(s)
+ if err := newVal.Set(s); err != nil {
+ return fmt.Errorf("could not parse %s as string value for flag %s: %s", envVal, f.Name, err)
+ }
}
f.Value = newVal
break
@@ -157,13 +186,11 @@ func (f StringSliceFlag) Apply(set *flag.FlagSet) {
}
set.Var(f.Value, name, f.Usage)
})
+
+ return nil
}
-func (f StringSliceFlag) GetName() string {
- return f.Name
-}
-
-// StringSlice is an opaque type for []int to satisfy flag.Value
+// IntSlice is an opaque type for []int to satisfy flag.Value and flag.Getter
type IntSlice []int
// Set parses the value into an integer and appends it to the list of values
@@ -171,15 +198,14 @@ func (f *IntSlice) Set(value string) error {
tmp, err := strconv.Atoi(value)
if err != nil {
return err
- } else {
- *f = append(*f, tmp)
}
+ *f = append(*f, tmp)
return nil
}
// String returns a readable representation of this value (for usage defaults)
func (f *IntSlice) String() string {
- return fmt.Sprintf("%d", *f)
+ return fmt.Sprintf("%#v", *f)
}
// Value returns the slice of ints set by this flag
@@ -187,34 +213,28 @@ func (f *IntSlice) Value() []int {
return *f
}
-// IntSliceFlag is an int flag that can be specified multiple times on the
-// command-line
-type IntSliceFlag struct {
- Name string
- Value *IntSlice
- Usage string
- EnvVar string
-}
-
-// String returns the usage
-func (f IntSliceFlag) String() string {
- firstName := strings.Trim(strings.Split(f.Name, ",")[0], " ")
- pref := prefixFor(firstName)
- return withEnvHint(f.EnvVar, fmt.Sprintf("%s [%v]\t%v", prefixedNames(f.Name), pref+firstName+" option "+pref+firstName+" option", f.Usage))
+// Get returns the slice of ints set by this flag
+func (f *IntSlice) Get() interface{} {
+ return *f
}
// Apply populates the flag given the flag set and environment
+// Ignores errors
func (f IntSliceFlag) Apply(set *flag.FlagSet) {
+ f.ApplyWithError(set)
+}
+
+// ApplyWithError populates the flag given the flag set and environment
+func (f IntSliceFlag) ApplyWithError(set *flag.FlagSet) error {
if f.EnvVar != "" {
for _, envVar := range strings.Split(f.EnvVar, ",") {
envVar = strings.TrimSpace(envVar)
- if envVal := os.Getenv(envVar); envVal != "" {
+ if envVal, ok := syscall.Getenv(envVar); ok {
newVal := &IntSlice{}
for _, s := range strings.Split(envVal, ",") {
s = strings.TrimSpace(s)
- err := newVal.Set(s)
- if err != nil {
- fmt.Fprintf(os.Stderr, err.Error())
+ if err := newVal.Set(s); err != nil {
+ return fmt.Errorf("could not parse %s as int slice value for flag %s: %s", envVal, f.Name, err)
}
}
f.Value = newVal
@@ -229,36 +249,96 @@ func (f IntSliceFlag) Apply(set *flag.FlagSet) {
}
set.Var(f.Value, name, f.Usage)
})
+
+ return nil
}
-func (f IntSliceFlag) GetName() string {
- return f.Name
-}
+// Int64Slice is an opaque type for []int to satisfy flag.Value and flag.Getter
+type Int64Slice []int64
-// BoolFlag is a switch that defaults to false
-type BoolFlag struct {
- Name string
- Usage string
- EnvVar string
- Destination *bool
+// Set parses the value into an integer and appends it to the list of values
+func (f *Int64Slice) Set(value string) error {
+ tmp, err := strconv.ParseInt(value, 10, 64)
+ if err != nil {
+ return err
+ }
+ *f = append(*f, tmp)
+ return nil
}
// String returns a readable representation of this value (for usage defaults)
-func (f BoolFlag) String() string {
- return withEnvHint(f.EnvVar, fmt.Sprintf("%s\t%v", prefixedNames(f.Name), f.Usage))
+func (f *Int64Slice) String() string {
+ return fmt.Sprintf("%#v", *f)
+}
+
+// Value returns the slice of ints set by this flag
+func (f *Int64Slice) Value() []int64 {
+ return *f
+}
+
+// Get returns the slice of ints set by this flag
+func (f *Int64Slice) Get() interface{} {
+ return *f
}
// Apply populates the flag given the flag set and environment
+// Ignores errors
+func (f Int64SliceFlag) Apply(set *flag.FlagSet) {
+ f.ApplyWithError(set)
+}
+
+// ApplyWithError populates the flag given the flag set and environment
+func (f Int64SliceFlag) ApplyWithError(set *flag.FlagSet) error {
+ if f.EnvVar != "" {
+ for _, envVar := range strings.Split(f.EnvVar, ",") {
+ envVar = strings.TrimSpace(envVar)
+ if envVal, ok := syscall.Getenv(envVar); ok {
+ newVal := &Int64Slice{}
+ for _, s := range strings.Split(envVal, ",") {
+ s = strings.TrimSpace(s)
+ if err := newVal.Set(s); err != nil {
+ return fmt.Errorf("could not parse %s as int64 slice value for flag %s: %s", envVal, f.Name, err)
+ }
+ }
+ f.Value = newVal
+ break
+ }
+ }
+ }
+
+ eachName(f.Name, func(name string) {
+ if f.Value == nil {
+ f.Value = &Int64Slice{}
+ }
+ set.Var(f.Value, name, f.Usage)
+ })
+ return nil
+}
+
+// Apply populates the flag given the flag set and environment
+// Ignores errors
func (f BoolFlag) Apply(set *flag.FlagSet) {
+ f.ApplyWithError(set)
+}
+
+// ApplyWithError populates the flag given the flag set and environment
+func (f BoolFlag) ApplyWithError(set *flag.FlagSet) error {
val := false
if f.EnvVar != "" {
for _, envVar := range strings.Split(f.EnvVar, ",") {
envVar = strings.TrimSpace(envVar)
- if envVal := os.Getenv(envVar); envVal != "" {
- envValBool, err := strconv.ParseBool(envVal)
- if err == nil {
- val = envValBool
+ if envVal, ok := syscall.Getenv(envVar); ok {
+ if envVal == "" {
+ val = false
+ break
}
+
+ envValBool, err := strconv.ParseBool(envVal)
+ if err != nil {
+ return fmt.Errorf("could not parse %s as bool value for flag %s: %s", envVal, f.Name, err)
+ }
+
+ val = envValBool
break
}
}
@@ -271,38 +351,35 @@ func (f BoolFlag) Apply(set *flag.FlagSet) {
}
set.Bool(name, val, f.Usage)
})
-}
-func (f BoolFlag) GetName() string {
- return f.Name
-}
-
-// BoolTFlag this represents a boolean flag that is true by default, but can
-// still be set to false by --some-flag=false
-type BoolTFlag struct {
- Name string
- Usage string
- EnvVar string
- Destination *bool
-}
-
-// String returns a readable representation of this value (for usage defaults)
-func (f BoolTFlag) String() string {
- return withEnvHint(f.EnvVar, fmt.Sprintf("%s\t%v", prefixedNames(f.Name), f.Usage))
+ return nil
}
// Apply populates the flag given the flag set and environment
+// Ignores errors
func (f BoolTFlag) Apply(set *flag.FlagSet) {
+ f.ApplyWithError(set)
+}
+
+// ApplyWithError populates the flag given the flag set and environment
+func (f BoolTFlag) ApplyWithError(set *flag.FlagSet) error {
val := true
if f.EnvVar != "" {
for _, envVar := range strings.Split(f.EnvVar, ",") {
envVar = strings.TrimSpace(envVar)
- if envVal := os.Getenv(envVar); envVal != "" {
- envValBool, err := strconv.ParseBool(envVal)
- if err == nil {
- val = envValBool
+ if envVal, ok := syscall.Getenv(envVar); ok {
+ if envVal == "" {
+ val = false
break
}
+
+ envValBool, err := strconv.ParseBool(envVal)
+ if err != nil {
+ return fmt.Errorf("could not parse %s as bool value for flag %s: %s", envVal, f.Name, err)
+ }
+
+ val = envValBool
+ break
}
}
}
@@ -314,41 +391,22 @@ func (f BoolTFlag) Apply(set *flag.FlagSet) {
}
set.Bool(name, val, f.Usage)
})
-}
-func (f BoolTFlag) GetName() string {
- return f.Name
-}
-
-// StringFlag represents a flag that takes as string value
-type StringFlag struct {
- Name string
- Value string
- Usage string
- EnvVar string
- Destination *string
-}
-
-// String returns the usage
-func (f StringFlag) String() string {
- var fmtString string
- fmtString = "%s %v\t%v"
-
- if len(f.Value) > 0 {
- fmtString = "%s \"%v\"\t%v"
- } else {
- fmtString = "%s %v\t%v"
- }
-
- return withEnvHint(f.EnvVar, fmt.Sprintf(fmtString, prefixedNames(f.Name), f.Value, f.Usage))
+ return nil
}
// Apply populates the flag given the flag set and environment
+// Ignores errors
func (f StringFlag) Apply(set *flag.FlagSet) {
+ f.ApplyWithError(set)
+}
+
+// ApplyWithError populates the flag given the flag set and environment
+func (f StringFlag) ApplyWithError(set *flag.FlagSet) error {
if f.EnvVar != "" {
for _, envVar := range strings.Split(f.EnvVar, ",") {
envVar = strings.TrimSpace(envVar)
- if envVal := os.Getenv(envVar); envVal != "" {
+ if envVal, ok := syscall.Getenv(envVar); ok {
f.Value = envVal
break
}
@@ -362,38 +420,28 @@ func (f StringFlag) Apply(set *flag.FlagSet) {
}
set.String(name, f.Value, f.Usage)
})
-}
-func (f StringFlag) GetName() string {
- return f.Name
-}
-
-// IntFlag is a flag that takes an integer
-// Errors if the value provided cannot be parsed
-type IntFlag struct {
- Name string
- Value int
- Usage string
- EnvVar string
- Destination *int
-}
-
-// String returns the usage
-func (f IntFlag) String() string {
- return withEnvHint(f.EnvVar, fmt.Sprintf("%s \"%v\"\t%v", prefixedNames(f.Name), f.Value, f.Usage))
+ return nil
}
// Apply populates the flag given the flag set and environment
+// Ignores errors
func (f IntFlag) Apply(set *flag.FlagSet) {
+ f.ApplyWithError(set)
+}
+
+// ApplyWithError populates the flag given the flag set and environment
+func (f IntFlag) ApplyWithError(set *flag.FlagSet) error {
if f.EnvVar != "" {
for _, envVar := range strings.Split(f.EnvVar, ",") {
envVar = strings.TrimSpace(envVar)
- if envVal := os.Getenv(envVar); envVal != "" {
+ if envVal, ok := syscall.Getenv(envVar); ok {
envValInt, err := strconv.ParseInt(envVal, 0, 64)
- if err == nil {
- f.Value = int(envValInt)
- break
+ if err != nil {
+ return fmt.Errorf("could not parse %s as int value for flag %s: %s", envVal, f.Name, err)
}
+ f.Value = int(envValInt)
+ break
}
}
}
@@ -405,38 +453,131 @@ func (f IntFlag) Apply(set *flag.FlagSet) {
}
set.Int(name, f.Value, f.Usage)
})
-}
-func (f IntFlag) GetName() string {
- return f.Name
-}
-
-// DurationFlag is a flag that takes a duration specified in Go's duration
-// format: https://golang.org/pkg/time/#ParseDuration
-type DurationFlag struct {
- Name string
- Value time.Duration
- Usage string
- EnvVar string
- Destination *time.Duration
-}
-
-// String returns a readable representation of this value (for usage defaults)
-func (f DurationFlag) String() string {
- return withEnvHint(f.EnvVar, fmt.Sprintf("%s \"%v\"\t%v", prefixedNames(f.Name), f.Value, f.Usage))
+ return nil
}
// Apply populates the flag given the flag set and environment
-func (f DurationFlag) Apply(set *flag.FlagSet) {
+// Ignores errors
+func (f Int64Flag) Apply(set *flag.FlagSet) {
+ f.ApplyWithError(set)
+}
+
+// ApplyWithError populates the flag given the flag set and environment
+func (f Int64Flag) ApplyWithError(set *flag.FlagSet) error {
if f.EnvVar != "" {
for _, envVar := range strings.Split(f.EnvVar, ",") {
envVar = strings.TrimSpace(envVar)
- if envVal := os.Getenv(envVar); envVal != "" {
- envValDuration, err := time.ParseDuration(envVal)
- if err == nil {
- f.Value = envValDuration
- break
+ if envVal, ok := syscall.Getenv(envVar); ok {
+ envValInt, err := strconv.ParseInt(envVal, 0, 64)
+ if err != nil {
+ return fmt.Errorf("could not parse %s as int value for flag %s: %s", envVal, f.Name, err)
}
+
+ f.Value = envValInt
+ break
+ }
+ }
+ }
+
+ eachName(f.Name, func(name string) {
+ if f.Destination != nil {
+ set.Int64Var(f.Destination, name, f.Value, f.Usage)
+ return
+ }
+ set.Int64(name, f.Value, f.Usage)
+ })
+
+ return nil
+}
+
+// Apply populates the flag given the flag set and environment
+// Ignores errors
+func (f UintFlag) Apply(set *flag.FlagSet) {
+ f.ApplyWithError(set)
+}
+
+// ApplyWithError populates the flag given the flag set and environment
+func (f UintFlag) ApplyWithError(set *flag.FlagSet) error {
+ if f.EnvVar != "" {
+ for _, envVar := range strings.Split(f.EnvVar, ",") {
+ envVar = strings.TrimSpace(envVar)
+ if envVal, ok := syscall.Getenv(envVar); ok {
+ envValInt, err := strconv.ParseUint(envVal, 0, 64)
+ if err != nil {
+ return fmt.Errorf("could not parse %s as uint value for flag %s: %s", envVal, f.Name, err)
+ }
+
+ f.Value = uint(envValInt)
+ break
+ }
+ }
+ }
+
+ eachName(f.Name, func(name string) {
+ if f.Destination != nil {
+ set.UintVar(f.Destination, name, f.Value, f.Usage)
+ return
+ }
+ set.Uint(name, f.Value, f.Usage)
+ })
+
+ return nil
+}
+
+// Apply populates the flag given the flag set and environment
+// Ignores errors
+func (f Uint64Flag) Apply(set *flag.FlagSet) {
+ f.ApplyWithError(set)
+}
+
+// ApplyWithError populates the flag given the flag set and environment
+func (f Uint64Flag) ApplyWithError(set *flag.FlagSet) error {
+ if f.EnvVar != "" {
+ for _, envVar := range strings.Split(f.EnvVar, ",") {
+ envVar = strings.TrimSpace(envVar)
+ if envVal, ok := syscall.Getenv(envVar); ok {
+ envValInt, err := strconv.ParseUint(envVal, 0, 64)
+ if err != nil {
+ return fmt.Errorf("could not parse %s as uint64 value for flag %s: %s", envVal, f.Name, err)
+ }
+
+ f.Value = uint64(envValInt)
+ break
+ }
+ }
+ }
+
+ eachName(f.Name, func(name string) {
+ if f.Destination != nil {
+ set.Uint64Var(f.Destination, name, f.Value, f.Usage)
+ return
+ }
+ set.Uint64(name, f.Value, f.Usage)
+ })
+
+ return nil
+}
+
+// Apply populates the flag given the flag set and environment
+// Ignores errors
+func (f DurationFlag) Apply(set *flag.FlagSet) {
+ f.ApplyWithError(set)
+}
+
+// ApplyWithError populates the flag given the flag set and environment
+func (f DurationFlag) ApplyWithError(set *flag.FlagSet) error {
+ if f.EnvVar != "" {
+ for _, envVar := range strings.Split(f.EnvVar, ",") {
+ envVar = strings.TrimSpace(envVar)
+ if envVal, ok := syscall.Getenv(envVar); ok {
+ envValDuration, err := time.ParseDuration(envVal)
+ if err != nil {
+ return fmt.Errorf("could not parse %s as duration for flag %s: %s", envVal, f.Name, err)
+ }
+
+ f.Value = envValDuration
+ break
}
}
}
@@ -448,37 +589,29 @@ func (f DurationFlag) Apply(set *flag.FlagSet) {
}
set.Duration(name, f.Value, f.Usage)
})
-}
-func (f DurationFlag) GetName() string {
- return f.Name
-}
-
-// Float64Flag is a flag that takes an float value
-// Errors if the value provided cannot be parsed
-type Float64Flag struct {
- Name string
- Value float64
- Usage string
- EnvVar string
- Destination *float64
-}
-
-// String returns the usage
-func (f Float64Flag) String() string {
- return withEnvHint(f.EnvVar, fmt.Sprintf("%s \"%v\"\t%v", prefixedNames(f.Name), f.Value, f.Usage))
+ return nil
}
// Apply populates the flag given the flag set and environment
+// Ignores errors
func (f Float64Flag) Apply(set *flag.FlagSet) {
+ f.ApplyWithError(set)
+}
+
+// ApplyWithError populates the flag given the flag set and environment
+func (f Float64Flag) ApplyWithError(set *flag.FlagSet) error {
if f.EnvVar != "" {
for _, envVar := range strings.Split(f.EnvVar, ",") {
envVar = strings.TrimSpace(envVar)
- if envVal := os.Getenv(envVar); envVal != "" {
+ if envVal, ok := syscall.Getenv(envVar); ok {
envValFloat, err := strconv.ParseFloat(envVal, 10)
- if err == nil {
- f.Value = float64(envValFloat)
+ if err != nil {
+ return fmt.Errorf("could not parse %s as float64 value for flag %s: %s", envVal, f.Name, err)
}
+
+ f.Value = float64(envValFloat)
+ break
}
}
}
@@ -490,10 +623,19 @@ func (f Float64Flag) Apply(set *flag.FlagSet) {
}
set.Float64(name, f.Value, f.Usage)
})
+
+ return nil
}
-func (f Float64Flag) GetName() string {
- return f.Name
+func visibleFlags(fl []Flag) []Flag {
+ visible := []Flag{}
+ for _, flag := range fl {
+ field := flagValue(flag).FieldByName("Hidden")
+ if !field.IsValid() || !field.Bool() {
+ visible = append(visible, flag)
+ }
+ }
+ return visible
}
func prefixFor(name string) (prefix string) {
@@ -506,22 +648,152 @@ func prefixFor(name string) (prefix string) {
return
}
-func prefixedNames(fullName string) (prefixed string) {
+// Returns the placeholder, if any, and the unquoted usage string.
+func unquoteUsage(usage string) (string, string) {
+ for i := 0; i < len(usage); i++ {
+ if usage[i] == '`' {
+ for j := i + 1; j < len(usage); j++ {
+ if usage[j] == '`' {
+ name := usage[i+1 : j]
+ usage = usage[:i] + name + usage[j+1:]
+ return name, usage
+ }
+ }
+ break
+ }
+ }
+ return "", usage
+}
+
+func prefixedNames(fullName, placeholder string) string {
+ var prefixed string
parts := strings.Split(fullName, ",")
for i, name := range parts {
name = strings.Trim(name, " ")
prefixed += prefixFor(name) + name
+ if placeholder != "" {
+ prefixed += " " + placeholder
+ }
if i < len(parts)-1 {
prefixed += ", "
}
}
- return
+ return prefixed
}
func withEnvHint(envVar, str string) string {
envText := ""
if envVar != "" {
- envText = fmt.Sprintf(" [$%s]", strings.Join(strings.Split(envVar, ","), ", $"))
+ prefix := "$"
+ suffix := ""
+ sep := ", $"
+ if runtime.GOOS == "windows" {
+ prefix = "%"
+ suffix = "%"
+ sep = "%, %"
+ }
+ envText = fmt.Sprintf(" [%s%s%s]", prefix, strings.Join(strings.Split(envVar, ","), sep), suffix)
}
return str + envText
}
+
+func flagValue(f Flag) reflect.Value {
+ fv := reflect.ValueOf(f)
+ for fv.Kind() == reflect.Ptr {
+ fv = reflect.Indirect(fv)
+ }
+ return fv
+}
+
+func stringifyFlag(f Flag) string {
+ fv := flagValue(f)
+
+ switch f.(type) {
+ case IntSliceFlag:
+ return withEnvHint(fv.FieldByName("EnvVar").String(),
+ stringifyIntSliceFlag(f.(IntSliceFlag)))
+ case Int64SliceFlag:
+ return withEnvHint(fv.FieldByName("EnvVar").String(),
+ stringifyInt64SliceFlag(f.(Int64SliceFlag)))
+ case StringSliceFlag:
+ return withEnvHint(fv.FieldByName("EnvVar").String(),
+ stringifyStringSliceFlag(f.(StringSliceFlag)))
+ }
+
+ placeholder, usage := unquoteUsage(fv.FieldByName("Usage").String())
+
+ needsPlaceholder := false
+ defaultValueString := ""
+
+ if val := fv.FieldByName("Value"); val.IsValid() {
+ needsPlaceholder = true
+ defaultValueString = fmt.Sprintf(" (default: %v)", val.Interface())
+
+ if val.Kind() == reflect.String && val.String() != "" {
+ defaultValueString = fmt.Sprintf(" (default: %q)", val.String())
+ }
+ }
+
+ if defaultValueString == " (default: )" {
+ defaultValueString = ""
+ }
+
+ if needsPlaceholder && placeholder == "" {
+ placeholder = defaultPlaceholder
+ }
+
+ usageWithDefault := strings.TrimSpace(fmt.Sprintf("%s%s", usage, defaultValueString))
+
+ return withEnvHint(fv.FieldByName("EnvVar").String(),
+ fmt.Sprintf("%s\t%s", prefixedNames(fv.FieldByName("Name").String(), placeholder), usageWithDefault))
+}
+
+func stringifyIntSliceFlag(f IntSliceFlag) string {
+ defaultVals := []string{}
+ if f.Value != nil && len(f.Value.Value()) > 0 {
+ for _, i := range f.Value.Value() {
+ defaultVals = append(defaultVals, fmt.Sprintf("%d", i))
+ }
+ }
+
+ return stringifySliceFlag(f.Usage, f.Name, defaultVals)
+}
+
+func stringifyInt64SliceFlag(f Int64SliceFlag) string {
+ defaultVals := []string{}
+ if f.Value != nil && len(f.Value.Value()) > 0 {
+ for _, i := range f.Value.Value() {
+ defaultVals = append(defaultVals, fmt.Sprintf("%d", i))
+ }
+ }
+
+ return stringifySliceFlag(f.Usage, f.Name, defaultVals)
+}
+
+func stringifyStringSliceFlag(f StringSliceFlag) string {
+ defaultVals := []string{}
+ if f.Value != nil && len(f.Value.Value()) > 0 {
+ for _, s := range f.Value.Value() {
+ if len(s) > 0 {
+ defaultVals = append(defaultVals, fmt.Sprintf("%q", s))
+ }
+ }
+ }
+
+ return stringifySliceFlag(f.Usage, f.Name, defaultVals)
+}
+
+func stringifySliceFlag(usage, name string, defaultVals []string) string {
+ placeholder, usage := unquoteUsage(usage)
+ if placeholder == "" {
+ placeholder = defaultPlaceholder
+ }
+
+ defaultVal := ""
+ if len(defaultVals) > 0 {
+ defaultVal = fmt.Sprintf(" (default: %s)", strings.Join(defaultVals, ", "))
+ }
+
+ usageWithDefault := strings.TrimSpace(fmt.Sprintf("%s%s", usage, defaultVal))
+ return fmt.Sprintf("%s\t%s", prefixedNames(name, placeholder), usageWithDefault)
+}
diff --git a/vendor/github.com/codegangsta/cli/flag_generated.go b/vendor/github.com/codegangsta/cli/flag_generated.go
new file mode 100644
index 00000000000..491b61956c7
--- /dev/null
+++ b/vendor/github.com/codegangsta/cli/flag_generated.go
@@ -0,0 +1,627 @@
+package cli
+
+import (
+ "flag"
+ "strconv"
+ "time"
+)
+
+// WARNING: This file is generated!
+
+// BoolFlag is a flag with type bool
+type BoolFlag struct {
+ Name string
+ Usage string
+ EnvVar string
+ Hidden bool
+ Destination *bool
+}
+
+// String returns a readable representation of this value
+// (for usage defaults)
+func (f BoolFlag) String() string {
+ return FlagStringer(f)
+}
+
+// GetName returns the name of the flag
+func (f BoolFlag) GetName() string {
+ return f.Name
+}
+
+// Bool looks up the value of a local BoolFlag, returns
+// false if not found
+func (c *Context) Bool(name string) bool {
+ return lookupBool(name, c.flagSet)
+}
+
+// GlobalBool looks up the value of a global BoolFlag, returns
+// false if not found
+func (c *Context) GlobalBool(name string) bool {
+ if fs := lookupGlobalFlagSet(name, c); fs != nil {
+ return lookupBool(name, fs)
+ }
+ return false
+}
+
+func lookupBool(name string, set *flag.FlagSet) bool {
+ f := set.Lookup(name)
+ if f != nil {
+ parsed, err := strconv.ParseBool(f.Value.String())
+ if err != nil {
+ return false
+ }
+ return parsed
+ }
+ return false
+}
+
+// BoolTFlag is a flag with type bool that is true by default
+type BoolTFlag struct {
+ Name string
+ Usage string
+ EnvVar string
+ Hidden bool
+ Destination *bool
+}
+
+// String returns a readable representation of this value
+// (for usage defaults)
+func (f BoolTFlag) String() string {
+ return FlagStringer(f)
+}
+
+// GetName returns the name of the flag
+func (f BoolTFlag) GetName() string {
+ return f.Name
+}
+
+// BoolT looks up the value of a local BoolTFlag, returns
+// false if not found
+func (c *Context) BoolT(name string) bool {
+ return lookupBoolT(name, c.flagSet)
+}
+
+// GlobalBoolT looks up the value of a global BoolTFlag, returns
+// false if not found
+func (c *Context) GlobalBoolT(name string) bool {
+ if fs := lookupGlobalFlagSet(name, c); fs != nil {
+ return lookupBoolT(name, fs)
+ }
+ return false
+}
+
+func lookupBoolT(name string, set *flag.FlagSet) bool {
+ f := set.Lookup(name)
+ if f != nil {
+ parsed, err := strconv.ParseBool(f.Value.String())
+ if err != nil {
+ return false
+ }
+ return parsed
+ }
+ return false
+}
+
+// DurationFlag is a flag with type time.Duration (see https://golang.org/pkg/time/#ParseDuration)
+type DurationFlag struct {
+ Name string
+ Usage string
+ EnvVar string
+ Hidden bool
+ Value time.Duration
+ Destination *time.Duration
+}
+
+// String returns a readable representation of this value
+// (for usage defaults)
+func (f DurationFlag) String() string {
+ return FlagStringer(f)
+}
+
+// GetName returns the name of the flag
+func (f DurationFlag) GetName() string {
+ return f.Name
+}
+
+// Duration looks up the value of a local DurationFlag, returns
+// 0 if not found
+func (c *Context) Duration(name string) time.Duration {
+ return lookupDuration(name, c.flagSet)
+}
+
+// GlobalDuration looks up the value of a global DurationFlag, returns
+// 0 if not found
+func (c *Context) GlobalDuration(name string) time.Duration {
+ if fs := lookupGlobalFlagSet(name, c); fs != nil {
+ return lookupDuration(name, fs)
+ }
+ return 0
+}
+
+func lookupDuration(name string, set *flag.FlagSet) time.Duration {
+ f := set.Lookup(name)
+ if f != nil {
+ parsed, err := time.ParseDuration(f.Value.String())
+ if err != nil {
+ return 0
+ }
+ return parsed
+ }
+ return 0
+}
+
+// Float64Flag is a flag with type float64
+type Float64Flag struct {
+ Name string
+ Usage string
+ EnvVar string
+ Hidden bool
+ Value float64
+ Destination *float64
+}
+
+// String returns a readable representation of this value
+// (for usage defaults)
+func (f Float64Flag) String() string {
+ return FlagStringer(f)
+}
+
+// GetName returns the name of the flag
+func (f Float64Flag) GetName() string {
+ return f.Name
+}
+
+// Float64 looks up the value of a local Float64Flag, returns
+// 0 if not found
+func (c *Context) Float64(name string) float64 {
+ return lookupFloat64(name, c.flagSet)
+}
+
+// GlobalFloat64 looks up the value of a global Float64Flag, returns
+// 0 if not found
+func (c *Context) GlobalFloat64(name string) float64 {
+ if fs := lookupGlobalFlagSet(name, c); fs != nil {
+ return lookupFloat64(name, fs)
+ }
+ return 0
+}
+
+func lookupFloat64(name string, set *flag.FlagSet) float64 {
+ f := set.Lookup(name)
+ if f != nil {
+ parsed, err := strconv.ParseFloat(f.Value.String(), 64)
+ if err != nil {
+ return 0
+ }
+ return parsed
+ }
+ return 0
+}
+
+// GenericFlag is a flag with type Generic
+type GenericFlag struct {
+ Name string
+ Usage string
+ EnvVar string
+ Hidden bool
+ Value Generic
+}
+
+// String returns a readable representation of this value
+// (for usage defaults)
+func (f GenericFlag) String() string {
+ return FlagStringer(f)
+}
+
+// GetName returns the name of the flag
+func (f GenericFlag) GetName() string {
+ return f.Name
+}
+
+// Generic looks up the value of a local GenericFlag, returns
+// nil if not found
+func (c *Context) Generic(name string) interface{} {
+ return lookupGeneric(name, c.flagSet)
+}
+
+// GlobalGeneric looks up the value of a global GenericFlag, returns
+// nil if not found
+func (c *Context) GlobalGeneric(name string) interface{} {
+ if fs := lookupGlobalFlagSet(name, c); fs != nil {
+ return lookupGeneric(name, fs)
+ }
+ return nil
+}
+
+func lookupGeneric(name string, set *flag.FlagSet) interface{} {
+ f := set.Lookup(name)
+ if f != nil {
+ parsed, err := f.Value, error(nil)
+ if err != nil {
+ return nil
+ }
+ return parsed
+ }
+ return nil
+}
+
+// Int64Flag is a flag with type int64
+type Int64Flag struct {
+ Name string
+ Usage string
+ EnvVar string
+ Hidden bool
+ Value int64
+ Destination *int64
+}
+
+// String returns a readable representation of this value
+// (for usage defaults)
+func (f Int64Flag) String() string {
+ return FlagStringer(f)
+}
+
+// GetName returns the name of the flag
+func (f Int64Flag) GetName() string {
+ return f.Name
+}
+
+// Int64 looks up the value of a local Int64Flag, returns
+// 0 if not found
+func (c *Context) Int64(name string) int64 {
+ return lookupInt64(name, c.flagSet)
+}
+
+// GlobalInt64 looks up the value of a global Int64Flag, returns
+// 0 if not found
+func (c *Context) GlobalInt64(name string) int64 {
+ if fs := lookupGlobalFlagSet(name, c); fs != nil {
+ return lookupInt64(name, fs)
+ }
+ return 0
+}
+
+func lookupInt64(name string, set *flag.FlagSet) int64 {
+ f := set.Lookup(name)
+ if f != nil {
+ parsed, err := strconv.ParseInt(f.Value.String(), 0, 64)
+ if err != nil {
+ return 0
+ }
+ return parsed
+ }
+ return 0
+}
+
+// IntFlag is a flag with type int
+type IntFlag struct {
+ Name string
+ Usage string
+ EnvVar string
+ Hidden bool
+ Value int
+ Destination *int
+}
+
+// String returns a readable representation of this value
+// (for usage defaults)
+func (f IntFlag) String() string {
+ return FlagStringer(f)
+}
+
+// GetName returns the name of the flag
+func (f IntFlag) GetName() string {
+ return f.Name
+}
+
+// Int looks up the value of a local IntFlag, returns
+// 0 if not found
+func (c *Context) Int(name string) int {
+ return lookupInt(name, c.flagSet)
+}
+
+// GlobalInt looks up the value of a global IntFlag, returns
+// 0 if not found
+func (c *Context) GlobalInt(name string) int {
+ if fs := lookupGlobalFlagSet(name, c); fs != nil {
+ return lookupInt(name, fs)
+ }
+ return 0
+}
+
+func lookupInt(name string, set *flag.FlagSet) int {
+ f := set.Lookup(name)
+ if f != nil {
+ parsed, err := strconv.ParseInt(f.Value.String(), 0, 64)
+ if err != nil {
+ return 0
+ }
+ return int(parsed)
+ }
+ return 0
+}
+
+// IntSliceFlag is a flag with type *IntSlice
+type IntSliceFlag struct {
+ Name string
+ Usage string
+ EnvVar string
+ Hidden bool
+ Value *IntSlice
+}
+
+// String returns a readable representation of this value
+// (for usage defaults)
+func (f IntSliceFlag) String() string {
+ return FlagStringer(f)
+}
+
+// GetName returns the name of the flag
+func (f IntSliceFlag) GetName() string {
+ return f.Name
+}
+
+// IntSlice looks up the value of a local IntSliceFlag, returns
+// nil if not found
+func (c *Context) IntSlice(name string) []int {
+ return lookupIntSlice(name, c.flagSet)
+}
+
+// GlobalIntSlice looks up the value of a global IntSliceFlag, returns
+// nil if not found
+func (c *Context) GlobalIntSlice(name string) []int {
+ if fs := lookupGlobalFlagSet(name, c); fs != nil {
+ return lookupIntSlice(name, fs)
+ }
+ return nil
+}
+
+func lookupIntSlice(name string, set *flag.FlagSet) []int {
+ f := set.Lookup(name)
+ if f != nil {
+ parsed, err := (f.Value.(*IntSlice)).Value(), error(nil)
+ if err != nil {
+ return nil
+ }
+ return parsed
+ }
+ return nil
+}
+
+// Int64SliceFlag is a flag with type *Int64Slice
+type Int64SliceFlag struct {
+ Name string
+ Usage string
+ EnvVar string
+ Hidden bool
+ Value *Int64Slice
+}
+
+// String returns a readable representation of this value
+// (for usage defaults)
+func (f Int64SliceFlag) String() string {
+ return FlagStringer(f)
+}
+
+// GetName returns the name of the flag
+func (f Int64SliceFlag) GetName() string {
+ return f.Name
+}
+
+// Int64Slice looks up the value of a local Int64SliceFlag, returns
+// nil if not found
+func (c *Context) Int64Slice(name string) []int64 {
+ return lookupInt64Slice(name, c.flagSet)
+}
+
+// GlobalInt64Slice looks up the value of a global Int64SliceFlag, returns
+// nil if not found
+func (c *Context) GlobalInt64Slice(name string) []int64 {
+ if fs := lookupGlobalFlagSet(name, c); fs != nil {
+ return lookupInt64Slice(name, fs)
+ }
+ return nil
+}
+
+func lookupInt64Slice(name string, set *flag.FlagSet) []int64 {
+ f := set.Lookup(name)
+ if f != nil {
+ parsed, err := (f.Value.(*Int64Slice)).Value(), error(nil)
+ if err != nil {
+ return nil
+ }
+ return parsed
+ }
+ return nil
+}
+
+// StringFlag is a flag with type string
+type StringFlag struct {
+ Name string
+ Usage string
+ EnvVar string
+ Hidden bool
+ Value string
+ Destination *string
+}
+
+// String returns a readable representation of this value
+// (for usage defaults)
+func (f StringFlag) String() string {
+ return FlagStringer(f)
+}
+
+// GetName returns the name of the flag
+func (f StringFlag) GetName() string {
+ return f.Name
+}
+
+// String looks up the value of a local StringFlag, returns
+// "" if not found
+func (c *Context) String(name string) string {
+ return lookupString(name, c.flagSet)
+}
+
+// GlobalString looks up the value of a global StringFlag, returns
+// "" if not found
+func (c *Context) GlobalString(name string) string {
+ if fs := lookupGlobalFlagSet(name, c); fs != nil {
+ return lookupString(name, fs)
+ }
+ return ""
+}
+
+func lookupString(name string, set *flag.FlagSet) string {
+ f := set.Lookup(name)
+ if f != nil {
+ parsed, err := f.Value.String(), error(nil)
+ if err != nil {
+ return ""
+ }
+ return parsed
+ }
+ return ""
+}
+
+// StringSliceFlag is a flag with type *StringSlice
+type StringSliceFlag struct {
+ Name string
+ Usage string
+ EnvVar string
+ Hidden bool
+ Value *StringSlice
+}
+
+// String returns a readable representation of this value
+// (for usage defaults)
+func (f StringSliceFlag) String() string {
+ return FlagStringer(f)
+}
+
+// GetName returns the name of the flag
+func (f StringSliceFlag) GetName() string {
+ return f.Name
+}
+
+// StringSlice looks up the value of a local StringSliceFlag, returns
+// nil if not found
+func (c *Context) StringSlice(name string) []string {
+ return lookupStringSlice(name, c.flagSet)
+}
+
+// GlobalStringSlice looks up the value of a global StringSliceFlag, returns
+// nil if not found
+func (c *Context) GlobalStringSlice(name string) []string {
+ if fs := lookupGlobalFlagSet(name, c); fs != nil {
+ return lookupStringSlice(name, fs)
+ }
+ return nil
+}
+
+func lookupStringSlice(name string, set *flag.FlagSet) []string {
+ f := set.Lookup(name)
+ if f != nil {
+ parsed, err := (f.Value.(*StringSlice)).Value(), error(nil)
+ if err != nil {
+ return nil
+ }
+ return parsed
+ }
+ return nil
+}
+
+// Uint64Flag is a flag with type uint64
+type Uint64Flag struct {
+ Name string
+ Usage string
+ EnvVar string
+ Hidden bool
+ Value uint64
+ Destination *uint64
+}
+
+// String returns a readable representation of this value
+// (for usage defaults)
+func (f Uint64Flag) String() string {
+ return FlagStringer(f)
+}
+
+// GetName returns the name of the flag
+func (f Uint64Flag) GetName() string {
+ return f.Name
+}
+
+// Uint64 looks up the value of a local Uint64Flag, returns
+// 0 if not found
+func (c *Context) Uint64(name string) uint64 {
+ return lookupUint64(name, c.flagSet)
+}
+
+// GlobalUint64 looks up the value of a global Uint64Flag, returns
+// 0 if not found
+func (c *Context) GlobalUint64(name string) uint64 {
+ if fs := lookupGlobalFlagSet(name, c); fs != nil {
+ return lookupUint64(name, fs)
+ }
+ return 0
+}
+
+func lookupUint64(name string, set *flag.FlagSet) uint64 {
+ f := set.Lookup(name)
+ if f != nil {
+ parsed, err := strconv.ParseUint(f.Value.String(), 0, 64)
+ if err != nil {
+ return 0
+ }
+ return parsed
+ }
+ return 0
+}
+
+// UintFlag is a flag with type uint
+type UintFlag struct {
+ Name string
+ Usage string
+ EnvVar string
+ Hidden bool
+ Value uint
+ Destination *uint
+}
+
+// String returns a readable representation of this value
+// (for usage defaults)
+func (f UintFlag) String() string {
+ return FlagStringer(f)
+}
+
+// GetName returns the name of the flag
+func (f UintFlag) GetName() string {
+ return f.Name
+}
+
+// Uint looks up the value of a local UintFlag, returns
+// 0 if not found
+func (c *Context) Uint(name string) uint {
+ return lookupUint(name, c.flagSet)
+}
+
+// GlobalUint looks up the value of a global UintFlag, returns
+// 0 if not found
+func (c *Context) GlobalUint(name string) uint {
+ if fs := lookupGlobalFlagSet(name, c); fs != nil {
+ return lookupUint(name, fs)
+ }
+ return 0
+}
+
+func lookupUint(name string, set *flag.FlagSet) uint {
+ f := set.Lookup(name)
+ if f != nil {
+ parsed, err := strconv.ParseUint(f.Value.String(), 0, 64)
+ if err != nil {
+ return 0
+ }
+ return uint(parsed)
+ }
+ return 0
+}
diff --git a/vendor/github.com/codegangsta/cli/funcs.go b/vendor/github.com/codegangsta/cli/funcs.go
new file mode 100644
index 00000000000..cba5e6cb0cc
--- /dev/null
+++ b/vendor/github.com/codegangsta/cli/funcs.go
@@ -0,0 +1,28 @@
+package cli
+
+// BashCompleteFunc is an action to execute when the bash-completion flag is set
+type BashCompleteFunc func(*Context)
+
+// BeforeFunc is an action to execute before any subcommands are run, but after
+// the context is ready if a non-nil error is returned, no subcommands are run
+type BeforeFunc func(*Context) error
+
+// AfterFunc is an action to execute after any subcommands are run, but after the
+// subcommand has finished it is run even if Action() panics
+type AfterFunc func(*Context) error
+
+// ActionFunc is the action to execute when no subcommands are specified
+type ActionFunc func(*Context) error
+
+// CommandNotFoundFunc is executed if the proper command cannot be found
+type CommandNotFoundFunc func(*Context, string)
+
+// OnUsageErrorFunc is executed if an usage error occurs. This is useful for displaying
+// customized usage error messages. This function is able to replace the
+// original error messages. If this function is not set, the "Incorrect usage"
+// is displayed and the execution is interrupted.
+type OnUsageErrorFunc func(context *Context, err error, isSubcommand bool) error
+
+// FlagStringFunc is used by the help generation to display a flag, which is
+// expected to be a single line.
+type FlagStringFunc func(Flag) string
diff --git a/vendor/github.com/codegangsta/cli/generate-flag-types b/vendor/github.com/codegangsta/cli/generate-flag-types
new file mode 100755
index 00000000000..7147381ce37
--- /dev/null
+++ b/vendor/github.com/codegangsta/cli/generate-flag-types
@@ -0,0 +1,255 @@
+#!/usr/bin/env python
+"""
+The flag types that ship with the cli library have many things in common, and
+so we can take advantage of the `go generate` command to create much of the
+source code from a list of definitions. These definitions attempt to cover
+the parts that vary between flag types, and should evolve as needed.
+
+An example of the minimum definition needed is:
+
+ {
+ "name": "SomeType",
+ "type": "sometype",
+ "context_default": "nil"
+ }
+
+In this example, the code generated for the `cli` package will include a type
+named `SomeTypeFlag` that is expected to wrap a value of type `sometype`.
+Fetching values by name via `*cli.Context` will default to a value of `nil`.
+
+A more complete, albeit somewhat redundant, example showing all available
+definition keys is:
+
+ {
+ "name": "VeryMuchType",
+ "type": "*VeryMuchType",
+ "value": true,
+ "dest": false,
+ "doctail": " which really only wraps a []float64, oh well!",
+ "context_type": "[]float64",
+ "context_default": "nil",
+ "parser": "parseVeryMuchType(f.Value.String())",
+ "parser_cast": "[]float64(parsed)"
+ }
+
+The meaning of each field is as follows:
+
+ name (string) - The type "name", which will be suffixed with
+ `Flag` when generating the type definition
+ for `cli` and the wrapper type for `altsrc`
+ type (string) - The type that the generated `Flag` type for `cli`
+ is expected to "contain" as its `.Value` member
+ value (bool) - Should the generated `cli` type have a `Value`
+ member?
+ dest (bool) - Should the generated `cli` type support a
+ destination pointer?
+ doctail (string) - Additional docs for the `cli` flag type comment
+ context_type (string) - The literal type used in the `*cli.Context`
+ reader func signature
+ context_default (string) - The literal value used as the default by the
+ `*cli.Context` reader funcs when no value is
+ present
+ parser (string) - Literal code used to parse the flag `f`,
+ expected to have a return signature of
+ (value, error)
+ parser_cast (string) - Literal code used to cast the `parsed` value
+ returned from the `parser` code
+"""
+
+from __future__ import print_function, unicode_literals
+
+import argparse
+import json
+import os
+import subprocess
+import sys
+import tempfile
+import textwrap
+
+
+class _FancyFormatter(argparse.ArgumentDefaultsHelpFormatter,
+ argparse.RawDescriptionHelpFormatter):
+ pass
+
+
+def main(sysargs=sys.argv[:]):
+ parser = argparse.ArgumentParser(
+ description='Generate flag type code!',
+ formatter_class=_FancyFormatter)
+ parser.add_argument(
+ 'package',
+ type=str, default='cli', choices=_WRITEFUNCS.keys(),
+ help='Package for which flag types will be generated'
+ )
+ parser.add_argument(
+ '-i', '--in-json',
+ type=argparse.FileType('r'),
+ default=sys.stdin,
+ help='Input JSON file which defines each type to be generated'
+ )
+ parser.add_argument(
+ '-o', '--out-go',
+ type=argparse.FileType('w'),
+ default=sys.stdout,
+ help='Output file/stream to which generated source will be written'
+ )
+ parser.epilog = __doc__
+
+ args = parser.parse_args(sysargs[1:])
+ _generate_flag_types(_WRITEFUNCS[args.package], args.out_go, args.in_json)
+ return 0
+
+
+def _generate_flag_types(writefunc, output_go, input_json):
+ types = json.load(input_json)
+
+ tmp = tempfile.NamedTemporaryFile(suffix='.go', delete=False)
+ writefunc(tmp, types)
+ tmp.close()
+
+ new_content = subprocess.check_output(
+ ['goimports', tmp.name]
+ ).decode('utf-8')
+
+ print(new_content, file=output_go, end='')
+ output_go.flush()
+ os.remove(tmp.name)
+
+
+def _set_typedef_defaults(typedef):
+ typedef.setdefault('doctail', '')
+ typedef.setdefault('context_type', typedef['type'])
+ typedef.setdefault('dest', True)
+ typedef.setdefault('value', True)
+ typedef.setdefault('parser', 'f.Value, error(nil)')
+ typedef.setdefault('parser_cast', 'parsed')
+
+
+def _write_cli_flag_types(outfile, types):
+ _fwrite(outfile, """\
+ package cli
+
+ // WARNING: This file is generated!
+
+ """)
+
+ for typedef in types:
+ _set_typedef_defaults(typedef)
+
+ _fwrite(outfile, """\
+ // {name}Flag is a flag with type {type}{doctail}
+ type {name}Flag struct {{
+ Name string
+ Usage string
+ EnvVar string
+ Hidden bool
+ """.format(**typedef))
+
+ if typedef['value']:
+ _fwrite(outfile, """\
+ Value {type}
+ """.format(**typedef))
+
+ if typedef['dest']:
+ _fwrite(outfile, """\
+ Destination *{type}
+ """.format(**typedef))
+
+ _fwrite(outfile, "\n}\n\n")
+
+ _fwrite(outfile, """\
+ // String returns a readable representation of this value
+ // (for usage defaults)
+ func (f {name}Flag) String() string {{
+ return FlagStringer(f)
+ }}
+
+ // GetName returns the name of the flag
+ func (f {name}Flag) GetName() string {{
+ return f.Name
+ }}
+
+ // {name} looks up the value of a local {name}Flag, returns
+ // {context_default} if not found
+ func (c *Context) {name}(name string) {context_type} {{
+ return lookup{name}(name, c.flagSet)
+ }}
+
+ // Global{name} looks up the value of a global {name}Flag, returns
+ // {context_default} if not found
+ func (c *Context) Global{name}(name string) {context_type} {{
+ if fs := lookupGlobalFlagSet(name, c); fs != nil {{
+ return lookup{name}(name, fs)
+ }}
+ return {context_default}
+ }}
+
+ func lookup{name}(name string, set *flag.FlagSet) {context_type} {{
+ f := set.Lookup(name)
+ if f != nil {{
+ parsed, err := {parser}
+ if err != nil {{
+ return {context_default}
+ }}
+ return {parser_cast}
+ }}
+ return {context_default}
+ }}
+ """.format(**typedef))
+
+
+def _write_altsrc_flag_types(outfile, types):
+ _fwrite(outfile, """\
+ package altsrc
+
+ import (
+ "gopkg.in/urfave/cli.v1"
+ )
+
+ // WARNING: This file is generated!
+
+ """)
+
+ for typedef in types:
+ _set_typedef_defaults(typedef)
+
+ _fwrite(outfile, """\
+ // {name}Flag is the flag type that wraps cli.{name}Flag to allow
+ // for other values to be specified
+ type {name}Flag struct {{
+ cli.{name}Flag
+ set *flag.FlagSet
+ }}
+
+ // New{name}Flag creates a new {name}Flag
+ func New{name}Flag(fl cli.{name}Flag) *{name}Flag {{
+ return &{name}Flag{{{name}Flag: fl, set: nil}}
+ }}
+
+ // Apply saves the flagSet for later usage calls, then calls the
+ // wrapped {name}Flag.Apply
+ func (f *{name}Flag) Apply(set *flag.FlagSet) {{
+ f.set = set
+ f.{name}Flag.Apply(set)
+ }}
+
+ // ApplyWithError saves the flagSet for later usage calls, then calls the
+ // wrapped {name}Flag.ApplyWithError
+ func (f *{name}Flag) ApplyWithError(set *flag.FlagSet) error {{
+ f.set = set
+ return f.{name}Flag.ApplyWithError(set)
+ }}
+ """.format(**typedef))
+
+
+def _fwrite(outfile, text):
+ print(textwrap.dedent(text), end='', file=outfile)
+
+
+_WRITEFUNCS = {
+ 'cli': _write_cli_flag_types,
+ 'altsrc': _write_altsrc_flag_types
+}
+
+if __name__ == '__main__':
+ sys.exit(main())
diff --git a/vendor/github.com/codegangsta/cli/help.go b/vendor/github.com/codegangsta/cli/help.go
index a246f63ac4d..57ec98d58ad 100644
--- a/vendor/github.com/codegangsta/cli/help.go
+++ b/vendor/github.com/codegangsta/cli/help.go
@@ -3,68 +3,78 @@ package cli
import (
"fmt"
"io"
+ "os"
"strings"
"text/tabwriter"
"text/template"
)
-// The text template for the Default help topic.
+// AppHelpTemplate is the text template for the Default help topic.
// cli.go uses text/template to render templates. You can
// render custom help text by setting this variable.
var AppHelpTemplate = `NAME:
- {{.Name}} - {{.Usage}}
+ {{.Name}}{{if .Usage}} - {{.Usage}}{{end}}
USAGE:
- {{.HelpName}} {{if .Flags}}[global options]{{end}}{{if .Commands}} command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}
- {{if .Version}}
+ {{if .UsageText}}{{.UsageText}}{{else}}{{.HelpName}} {{if .VisibleFlags}}[global options]{{end}}{{if .Commands}} command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Version}}{{if not .HideVersion}}
+
VERSION:
- {{.Version}}
- {{end}}{{if len .Authors}}
-AUTHOR(S):
- {{range .Authors}}{{ . }}{{end}}
- {{end}}{{if .Commands}}
-COMMANDS:
- {{range .Commands}}{{join .Names ", "}}{{ "\t" }}{{.Usage}}
- {{end}}{{end}}{{if .Flags}}
+ {{.Version}}{{end}}{{end}}{{if .Description}}
+
+DESCRIPTION:
+ {{.Description}}{{end}}{{if len .Authors}}
+
+AUTHOR{{with $length := len .Authors}}{{if ne 1 $length}}S{{end}}{{end}}:
+ {{range $index, $author := .Authors}}{{if $index}}
+ {{end}}{{$author}}{{end}}{{end}}{{if .VisibleCommands}}
+
+COMMANDS:{{range .VisibleCategories}}{{if .Name}}
+ {{.Name}}:{{end}}{{range .VisibleCommands}}
+ {{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{end}}{{end}}{{if .VisibleFlags}}
+
GLOBAL OPTIONS:
- {{range .Flags}}{{.}}
- {{end}}{{end}}{{if .Copyright }}
+ {{range $index, $option := .VisibleFlags}}{{if $index}}
+ {{end}}{{$option}}{{end}}{{end}}{{if .Copyright}}
+
COPYRIGHT:
- {{.Copyright}}
- {{end}}
+ {{.Copyright}}{{end}}
`
-// The text template for the command help topic.
+// CommandHelpTemplate is the text template for the command help topic.
// cli.go uses text/template to render templates. You can
// render custom help text by setting this variable.
var CommandHelpTemplate = `NAME:
{{.HelpName}} - {{.Usage}}
USAGE:
- {{.HelpName}}{{if .Flags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{if .Description}}
+ {{if .UsageText}}{{.UsageText}}{{else}}{{.HelpName}}{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Category}}
+
+CATEGORY:
+ {{.Category}}{{end}}{{if .Description}}
DESCRIPTION:
- {{.Description}}{{end}}{{if .Flags}}
+ {{.Description}}{{end}}{{if .VisibleFlags}}
OPTIONS:
- {{range .Flags}}{{.}}
- {{end}}{{ end }}
+ {{range .VisibleFlags}}{{.}}
+ {{end}}{{end}}
`
-// The text template for the subcommand help topic.
+// SubcommandHelpTemplate is the text template for the subcommand help topic.
// cli.go uses text/template to render templates. You can
// render custom help text by setting this variable.
var SubcommandHelpTemplate = `NAME:
- {{.HelpName}} - {{.Usage}}
+ {{.HelpName}} - {{if .Description}}{{.Description}}{{else}}{{.Usage}}{{end}}
USAGE:
- {{.HelpName}} command{{if .Flags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}
+ {{if .UsageText}}{{.UsageText}}{{else}}{{.HelpName}} command{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}
-COMMANDS:
- {{range .Commands}}{{join .Names ", "}}{{ "\t" }}{{.Usage}}
- {{end}}{{if .Flags}}
+COMMANDS:{{range .VisibleCategories}}{{if .Name}}
+ {{.Name}}:{{end}}{{range .VisibleCommands}}
+ {{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}
+{{end}}{{if .VisibleFlags}}
OPTIONS:
- {{range .Flags}}{{.}}
+ {{range .VisibleFlags}}{{.}}
{{end}}{{end}}
`
@@ -73,13 +83,14 @@ var helpCommand = Command{
Aliases: []string{"h"},
Usage: "Shows a list of commands or help for one command",
ArgsUsage: "[command]",
- Action: func(c *Context) {
+ Action: func(c *Context) error {
args := c.Args()
if args.Present() {
- ShowCommandHelp(c, args.First())
- } else {
- ShowAppHelp(c)
+ return ShowCommandHelp(c, args.First())
}
+
+ ShowAppHelp(c)
+ return nil
},
}
@@ -88,65 +99,109 @@ var helpSubcommand = Command{
Aliases: []string{"h"},
Usage: "Shows a list of commands or help for one command",
ArgsUsage: "[command]",
- Action: func(c *Context) {
+ Action: func(c *Context) error {
args := c.Args()
if args.Present() {
- ShowCommandHelp(c, args.First())
- } else {
- ShowSubcommandHelp(c)
+ return ShowCommandHelp(c, args.First())
}
+
+ return ShowSubcommandHelp(c)
},
}
// Prints help for the App or Command
type helpPrinter func(w io.Writer, templ string, data interface{})
+// Prints help for the App or Command with custom template function.
+type helpPrinterCustom func(w io.Writer, templ string, data interface{}, customFunc map[string]interface{})
+
+// HelpPrinter is a function that writes the help output. If not set a default
+// is used. The function signature is:
+// func(w io.Writer, templ string, data interface{})
var HelpPrinter helpPrinter = printHelp
-// Prints version for the App
+// HelpPrinterCustom is same as HelpPrinter but
+// takes a custom function for template function map.
+var HelpPrinterCustom helpPrinterCustom = printHelpCustom
+
+// VersionPrinter prints the version for the App
var VersionPrinter = printVersion
-func ShowAppHelp(c *Context) {
- HelpPrinter(c.App.Writer, AppHelpTemplate, c.App)
+// ShowAppHelpAndExit - Prints the list of subcommands for the app and exits with exit code.
+func ShowAppHelpAndExit(c *Context, exitCode int) {
+ ShowAppHelp(c)
+ os.Exit(exitCode)
}
-// Prints the list of subcommands as the default app completion method
+// ShowAppHelp is an action that displays the help.
+func ShowAppHelp(c *Context) (err error) {
+ if c.App.CustomAppHelpTemplate == "" {
+ HelpPrinter(c.App.Writer, AppHelpTemplate, c.App)
+ return
+ }
+ customAppData := func() map[string]interface{} {
+ if c.App.ExtraInfo == nil {
+ return nil
+ }
+ return map[string]interface{}{
+ "ExtraInfo": c.App.ExtraInfo,
+ }
+ }
+ HelpPrinterCustom(c.App.Writer, c.App.CustomAppHelpTemplate, c.App, customAppData())
+ return nil
+}
+
+// DefaultAppComplete prints the list of subcommands as the default app completion method
func DefaultAppComplete(c *Context) {
for _, command := range c.App.Commands {
+ if command.Hidden {
+ continue
+ }
for _, name := range command.Names() {
fmt.Fprintln(c.App.Writer, name)
}
}
}
-// Prints help for the given command
-func ShowCommandHelp(ctx *Context, command string) {
+// ShowCommandHelpAndExit - exits with code after showing help
+func ShowCommandHelpAndExit(c *Context, command string, code int) {
+ ShowCommandHelp(c, command)
+ os.Exit(code)
+}
+
+// ShowCommandHelp prints help for the given command
+func ShowCommandHelp(ctx *Context, command string) error {
// show the subcommand help for a command with subcommands
if command == "" {
HelpPrinter(ctx.App.Writer, SubcommandHelpTemplate, ctx.App)
- return
+ return nil
}
for _, c := range ctx.App.Commands {
if c.HasName(command) {
- HelpPrinter(ctx.App.Writer, CommandHelpTemplate, c)
- return
+ if c.CustomHelpTemplate != "" {
+ HelpPrinterCustom(ctx.App.Writer, c.CustomHelpTemplate, c, nil)
+ } else {
+ HelpPrinter(ctx.App.Writer, CommandHelpTemplate, c)
+ }
+ return nil
}
}
- if ctx.App.CommandNotFound != nil {
- ctx.App.CommandNotFound(ctx, command)
- } else {
- fmt.Fprintf(ctx.App.Writer, "No help topic for '%v'\n", command)
+ if ctx.App.CommandNotFound == nil {
+ return NewExitError(fmt.Sprintf("No help topic for '%v'", command), 3)
}
+
+ ctx.App.CommandNotFound(ctx, command)
+ return nil
}
-// Prints help for the given subcommand
-func ShowSubcommandHelp(c *Context) {
- ShowCommandHelp(c, c.Command.Name)
+// ShowSubcommandHelp prints help for the given subcommand
+func ShowSubcommandHelp(c *Context) error {
+ return ShowCommandHelp(c, c.Command.Name)
}
-// Prints the version number of the App
+// ShowVersion prints the version number of the App
func ShowVersion(c *Context) {
VersionPrinter(c)
}
@@ -155,7 +210,7 @@ func printVersion(c *Context) {
fmt.Fprintf(c.App.Writer, "%v version %v\n", c.App.Name, c.App.Version)
}
-// Prints the lists of commands within a given context
+// ShowCompletions prints the lists of commands within a given context
func ShowCompletions(c *Context) {
a := c.App
if a != nil && a.BashComplete != nil {
@@ -163,7 +218,7 @@ func ShowCompletions(c *Context) {
}
}
-// Prints the custom completions for a given command
+// ShowCommandCompletions prints the custom completions for a given command
func ShowCommandCompletions(ctx *Context, command string) {
c := ctx.App.Command(command)
if c != nil && c.BashComplete != nil {
@@ -171,24 +226,38 @@ func ShowCommandCompletions(ctx *Context, command string) {
}
}
-func printHelp(out io.Writer, templ string, data interface{}) {
+func printHelpCustom(out io.Writer, templ string, data interface{}, customFunc map[string]interface{}) {
funcMap := template.FuncMap{
"join": strings.Join,
}
+ if customFunc != nil {
+ for key, value := range customFunc {
+ funcMap[key] = value
+ }
+ }
- w := tabwriter.NewWriter(out, 0, 8, 1, '\t', 0)
+ w := tabwriter.NewWriter(out, 1, 8, 2, ' ', 0)
t := template.Must(template.New("help").Funcs(funcMap).Parse(templ))
err := t.Execute(w, data)
if err != nil {
- panic(err)
+ // If the writer is closed, t.Execute will fail, and there's nothing
+ // we can do to recover.
+ if os.Getenv("CLI_TEMPLATE_ERROR_DEBUG") != "" {
+ fmt.Fprintf(ErrWriter, "CLI TEMPLATE ERROR: %#v\n", err)
+ }
+ return
}
w.Flush()
}
+func printHelp(out io.Writer, templ string, data interface{}) {
+ printHelpCustom(out, templ, data, nil)
+}
+
func checkVersion(c *Context) bool {
found := false
- if VersionFlag.Name != "" {
- eachName(VersionFlag.Name, func(name string) {
+ if VersionFlag.GetName() != "" {
+ eachName(VersionFlag.GetName(), func(name string) {
if c.GlobalBool(name) || c.Bool(name) {
found = true
}
@@ -199,8 +268,8 @@ func checkVersion(c *Context) bool {
func checkHelp(c *Context) bool {
found := false
- if HelpFlag.Name != "" {
- eachName(HelpFlag.Name, func(name string) {
+ if HelpFlag.GetName() != "" {
+ eachName(HelpFlag.GetName(), func(name string) {
if c.GlobalBool(name) || c.Bool(name) {
found = true
}
@@ -219,7 +288,7 @@ func checkCommandHelp(c *Context, name string) bool {
}
func checkSubcommandHelp(c *Context) bool {
- if c.GlobalBool("h") || c.GlobalBool("help") {
+ if c.Bool("h") || c.Bool("help") {
ShowSubcommandHelp(c)
return true
}
@@ -227,20 +296,43 @@ func checkSubcommandHelp(c *Context) bool {
return false
}
-func checkCompletions(c *Context) bool {
- if (c.GlobalBool(BashCompletionFlag.Name) || c.Bool(BashCompletionFlag.Name)) && c.App.EnableBashCompletion {
- ShowCompletions(c)
- return true
+func checkShellCompleteFlag(a *App, arguments []string) (bool, []string) {
+ if !a.EnableBashCompletion {
+ return false, arguments
}
- return false
+ pos := len(arguments) - 1
+ lastArg := arguments[pos]
+
+ if lastArg != "--"+BashCompletionFlag.GetName() {
+ return false, arguments
+ }
+
+ return true, arguments[:pos]
+}
+
+func checkCompletions(c *Context) bool {
+ if !c.shellComplete {
+ return false
+ }
+
+ if args := c.Args(); args.Present() {
+ name := args.First()
+ if cmd := c.App.Command(name); cmd != nil {
+ // let the command handle the completion
+ return false
+ }
+ }
+
+ ShowCompletions(c)
+ return true
}
func checkCommandCompletions(c *Context, name string) bool {
- if c.Bool(BashCompletionFlag.Name) && c.App.EnableBashCompletion {
- ShowCommandCompletions(c, name)
- return true
+ if !c.shellComplete {
+ return false
}
- return false
+ ShowCommandCompletions(c, name)
+ return true
}
diff --git a/vendor/github.com/codegangsta/cli/runtests b/vendor/github.com/codegangsta/cli/runtests
new file mode 100755
index 00000000000..ee22bdeed55
--- /dev/null
+++ b/vendor/github.com/codegangsta/cli/runtests
@@ -0,0 +1,122 @@
+#!/usr/bin/env python
+from __future__ import print_function
+
+import argparse
+import os
+import sys
+import tempfile
+
+from subprocess import check_call, check_output
+
+
+PACKAGE_NAME = os.environ.get(
+ 'CLI_PACKAGE_NAME', 'github.com/urfave/cli'
+)
+
+
+def main(sysargs=sys.argv[:]):
+ targets = {
+ 'vet': _vet,
+ 'test': _test,
+ 'gfmrun': _gfmrun,
+ 'toc': _toc,
+ 'gen': _gen,
+ }
+
+ parser = argparse.ArgumentParser()
+ parser.add_argument(
+ 'target', nargs='?', choices=tuple(targets.keys()), default='test'
+ )
+ args = parser.parse_args(sysargs[1:])
+
+ targets[args.target]()
+ return 0
+
+
+def _test():
+ if check_output('go version'.split()).split()[2] < 'go1.2':
+ _run('go test -v .')
+ return
+
+ coverprofiles = []
+ for subpackage in ['', 'altsrc']:
+ coverprofile = 'cli.coverprofile'
+ if subpackage != '':
+ coverprofile = '{}.coverprofile'.format(subpackage)
+
+ coverprofiles.append(coverprofile)
+
+ _run('go test -v'.split() + [
+ '-coverprofile={}'.format(coverprofile),
+ ('{}/{}'.format(PACKAGE_NAME, subpackage)).rstrip('/')
+ ])
+
+ combined_name = _combine_coverprofiles(coverprofiles)
+ _run('go tool cover -func={}'.format(combined_name))
+ os.remove(combined_name)
+
+
+def _gfmrun():
+ go_version = check_output('go version'.split()).split()[2]
+ if go_version < 'go1.3':
+ print('runtests: skip on {}'.format(go_version), file=sys.stderr)
+ return
+ _run(['gfmrun', '-c', str(_gfmrun_count()), '-s', 'README.md'])
+
+
+def _vet():
+ _run('go vet ./...')
+
+
+def _toc():
+ _run('node_modules/.bin/markdown-toc -i README.md')
+ _run('git diff --exit-code')
+
+
+def _gen():
+ go_version = check_output('go version'.split()).split()[2]
+ if go_version < 'go1.5':
+ print('runtests: skip on {}'.format(go_version), file=sys.stderr)
+ return
+
+ _run('go generate ./...')
+ _run('git diff --exit-code')
+
+
+def _run(command):
+ if hasattr(command, 'split'):
+ command = command.split()
+ print('runtests: {}'.format(' '.join(command)), file=sys.stderr)
+ check_call(command)
+
+
+def _gfmrun_count():
+ with open('README.md') as infile:
+ lines = infile.read().splitlines()
+ return len(filter(_is_go_runnable, lines))
+
+
+def _is_go_runnable(line):
+ return line.startswith('package main')
+
+
+def _combine_coverprofiles(coverprofiles):
+ combined = tempfile.NamedTemporaryFile(
+ suffix='.coverprofile', delete=False
+ )
+ combined.write('mode: set\n')
+
+ for coverprofile in coverprofiles:
+ with open(coverprofile, 'r') as infile:
+ for line in infile.readlines():
+ if not line.startswith('mode: '):
+ combined.write(line)
+
+ combined.flush()
+ name = combined.name
+ combined.close()
+ return name
+
+
+if __name__ == '__main__':
+ sys.exit(main())
diff --git a/vendor/github.com/davecgh/go-spew/.gitignore b/vendor/github.com/davecgh/go-spew/.gitignore
new file mode 100644
index 00000000000..00268614f04
--- /dev/null
+++ b/vendor/github.com/davecgh/go-spew/.gitignore
@@ -0,0 +1,22 @@
+# 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
diff --git a/vendor/github.com/davecgh/go-spew/LICENSE b/vendor/github.com/davecgh/go-spew/LICENSE
new file mode 100644
index 00000000000..c836416192d
--- /dev/null
+++ b/vendor/github.com/davecgh/go-spew/LICENSE
@@ -0,0 +1,15 @@
+ISC License
+
+Copyright (c) 2012-2016 Dave Collins
+
+Permission to use, copy, modify, and 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/davecgh/go-spew/README.md b/vendor/github.com/davecgh/go-spew/README.md
new file mode 100644
index 00000000000..262430449b2
--- /dev/null
+++ b/vendor/github.com/davecgh/go-spew/README.md
@@ -0,0 +1,205 @@
+go-spew
+=======
+
+[]
+(https://travis-ci.org/davecgh/go-spew) [![ISC License]
+(http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) [![Coverage Status]
+(https://img.shields.io/coveralls/davecgh/go-spew.svg)]
+(https://coveralls.io/r/davecgh/go-spew?branch=master)
+
+
+Go-spew implements a deep pretty printer for Go data structures to aid in
+debugging. A comprehensive suite of tests with 100% test coverage is provided
+to ensure proper functionality. See `test_coverage.txt` for the gocov coverage
+report. Go-spew is licensed under the liberal ISC license, so it may be used in
+open source or commercial projects.
+
+If you're interested in reading about how this package came to life and some
+of the challenges involved in providing a deep pretty printer, there is a blog
+post about it
+[here](https://web.archive.org/web/20160304013555/https://blog.cyphertite.com/go-spew-a-journey-into-dumping-go-data-structures/).
+
+## Documentation
+
+[]
+(http://godoc.org/github.com/davecgh/go-spew/spew)
+
+Full `go doc` style documentation for the project can be viewed online without
+installing this package by using the excellent GoDoc site here:
+http://godoc.org/github.com/davecgh/go-spew/spew
+
+You can also view the documentation locally once the package is installed with
+the `godoc` tool by running `godoc -http=":6060"` and pointing your browser to
+http://localhost:6060/pkg/github.com/davecgh/go-spew/spew
+
+## Installation
+
+```bash
+$ go get -u github.com/davecgh/go-spew/spew
+```
+
+## Quick Start
+
+Add this import line to the file you're working in:
+
+```Go
+import "github.com/davecgh/go-spew/spew"
+```
+
+To dump a variable with full newlines, indentation, type, and pointer
+information use Dump, Fdump, or Sdump:
+
+```Go
+spew.Dump(myVar1, myVar2, ...)
+spew.Fdump(someWriter, myVar1, myVar2, ...)
+str := spew.Sdump(myVar1, myVar2, ...)
+```
+
+Alternatively, if you would prefer to use format strings with a compacted inline
+printing style, use the convenience wrappers Printf, Fprintf, etc with %v (most
+compact), %+v (adds pointer addresses), %#v (adds types), or %#+v (adds types
+and pointer addresses):
+
+```Go
+spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2)
+spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4)
+spew.Fprintf(someWriter, "myVar1: %v -- myVar2: %+v", myVar1, myVar2)
+spew.Fprintf(someWriter, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4)
+```
+
+## Debugging a Web Application Example
+
+Here is an example of how you can use `spew.Sdump()` to help debug a web application. Please be sure to wrap your output using the `html.EscapeString()` function for safety reasons. You should also only use this debugging technique in a development environment, never in production.
+
+```Go
+package main
+
+import (
+ "fmt"
+ "html"
+ "net/http"
+
+ "github.com/davecgh/go-spew/spew"
+)
+
+func handler(w http.ResponseWriter, r *http.Request) {
+ w.Header().Set("Content-Type", "text/html")
+ fmt.Fprintf(w, "Hi there, %s!", r.URL.Path[1:])
+ fmt.Fprintf(w, "")
+}
+
+func main() {
+ http.HandleFunc("/", handler)
+ http.ListenAndServe(":8080", nil)
+}
+```
+
+## Sample Dump Output
+
+```
+(main.Foo) {
+ unexportedField: (*main.Bar)(0xf84002e210)({
+ flag: (main.Flag) flagTwo,
+ data: (uintptr)
+ }),
+ ExportedField: (map[interface {}]interface {}) {
+ (string) "one": (bool) true
+ }
+}
+([]uint8) {
+ 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... |
+ 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0|
+ 00000020 31 32 |12|
+}
+```
+
+## Sample Formatter Output
+
+Double pointer to a uint8:
+```
+ %v: <**>5
+ %+v: <**>(0xf8400420d0->0xf8400420c8)5
+ %#v: (**uint8)5
+ %#+v: (**uint8)(0xf8400420d0->0xf8400420c8)5
+```
+
+Pointer to circular struct with a uint8 field and a pointer to itself:
+```
+ %v: <*>{1 <*>}
+ %+v: <*>(0xf84003e260){ui8:1 c:<*>(0xf84003e260)}
+ %#v: (*main.circular){ui8:(uint8)1 c:(*main.circular)}
+ %#+v: (*main.circular)(0xf84003e260){ui8:(uint8)1 c:(*main.circular)(0xf84003e260)}
+```
+
+## Configuration Options
+
+Configuration of spew is handled by fields in the ConfigState type. For
+convenience, all of the top-level functions use a global state available via the
+spew.Config global.
+
+It is also possible to create a ConfigState instance that provides methods
+equivalent to the top-level functions. This allows concurrent configuration
+options. See the ConfigState documentation for more details.
+
+```
+* Indent
+ String to use for each indentation level for Dump functions.
+ It is a single space by default. A popular alternative is "\t".
+
+* MaxDepth
+ Maximum number of levels to descend into nested data structures.
+ There is no limit by default.
+
+* DisableMethods
+ Disables invocation of error and Stringer interface methods.
+ Method invocation is enabled by default.
+
+* DisablePointerMethods
+ Disables invocation of error and Stringer interface methods on types
+ which only accept pointer receivers from non-pointer variables. This option
+ relies on access to the unsafe package, so it will not have any effect when
+ running in environments without access to the unsafe package such as Google
+ App Engine or with the "safe" build tag specified.
+ Pointer method invocation is enabled by default.
+
+* DisablePointerAddresses
+ DisablePointerAddresses specifies whether to disable the printing of
+ pointer addresses. This is useful when diffing data structures in tests.
+
+* DisableCapacities
+ DisableCapacities specifies whether to disable the printing of capacities
+ for arrays, slices, maps and channels. This is useful when diffing data
+ structures in tests.
+
+* ContinueOnMethod
+ Enables recursion into types after invoking error and Stringer interface
+ methods. Recursion after method invocation is disabled by default.
+
+* SortKeys
+ Specifies map keys should be sorted before being printed. Use
+ this to have a more deterministic, diffable output. Note that
+ only native types (bool, int, uint, floats, uintptr and string)
+ and types which implement error or Stringer interfaces are supported,
+ with other types sorted according to the reflect.Value.String() output
+ which guarantees display stability. Natural map order is used by
+ default.
+
+* SpewKeys
+ SpewKeys specifies that, as a last resort attempt, map keys should be
+ spewed to strings and sorted by those strings. This is only considered
+ if SortKeys is true.
+
+```
+
+## Unsafe Package Dependency
+
+This package relies on the unsafe package to perform some of the more advanced
+features, however it also supports a "limited" mode which allows it to work in
+environments where the unsafe package is not available. By default, it will
+operate in this mode on Google App Engine and when compiled with GopherJS. The
+"safe" build tag may also be specified to force the package to build without
+using the unsafe package.
+
+## License
+
+Go-spew is licensed under the [copyfree](http://copyfree.org) ISC License.
diff --git a/vendor/github.com/davecgh/go-spew/cov_report.sh b/vendor/github.com/davecgh/go-spew/cov_report.sh
new file mode 100644
index 00000000000..9579497e411
--- /dev/null
+++ b/vendor/github.com/davecgh/go-spew/cov_report.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# This script uses gocov to generate a test coverage report.
+# The gocov tool my be obtained with the following command:
+# go get github.com/axw/gocov/gocov
+#
+# It will be installed to $GOPATH/bin, so ensure that location is in your $PATH.
+
+# Check for gocov.
+if ! type gocov >/dev/null 2>&1; then
+ echo >&2 "This script requires the gocov tool."
+ echo >&2 "You may obtain it with the following command:"
+ echo >&2 "go get github.com/axw/gocov/gocov"
+ exit 1
+fi
+
+# Only run the cgo tests if gcc is installed.
+if type gcc >/dev/null 2>&1; then
+ (cd spew && gocov test -tags testcgo | gocov report)
+else
+ (cd spew && gocov test | gocov report)
+fi
diff --git a/vendor/github.com/davecgh/go-spew/spew/bypass.go b/vendor/github.com/davecgh/go-spew/spew/bypass.go
index a8d27a3f677..8a4a6589a2d 100644
--- a/vendor/github.com/davecgh/go-spew/spew/bypass.go
+++ b/vendor/github.com/davecgh/go-spew/spew/bypass.go
@@ -1,4 +1,4 @@
-// Copyright (c) 2015 Dave Collins
+// Copyright (c) 2015-2016 Dave Collins
//
// Permission to use, copy, modify, and distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
@@ -13,9 +13,10 @@
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
// NOTE: Due to the following build constraints, this file will only be compiled
-// when the code is not running on Google App Engine and "-tags disableunsafe"
-// is not added to the go build command line.
-// +build !appengine,!disableunsafe
+// when the code is not running on Google App Engine, compiled by GopherJS, and
+// "-tags safe" is not added to the go build command line. The "disableunsafe"
+// tag is deprecated and thus should not be used.
+// +build !js,!appengine,!safe,!disableunsafe
package spew
@@ -91,6 +92,21 @@ func init() {
flagKindShift = 0
flagRO = 1 << 5
flagIndir = 1 << 6
+
+ // Commit adf9b30e5594 modified the flags to separate the
+ // flagRO flag into two bits which specifies whether or not the
+ // field is embedded. This causes flagIndir to move over a bit
+ // and means that flagRO is the combination of either of the
+ // original flagRO bit and the new bit.
+ //
+ // This code detects the change by extracting what used to be
+ // the indirect bit to ensure it's set. When it's not, the flag
+ // order has been changed to the newer format, so the flags are
+ // updated accordingly.
+ if upfv&flagIndir == 0 {
+ flagRO = 3 << 5
+ flagIndir = 1 << 7
+ }
}
}
diff --git a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go
index 457e41235ed..1fe3cf3d5d1 100644
--- a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go
+++ b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go
@@ -1,4 +1,4 @@
-// Copyright (c) 2015 Dave Collins
+// Copyright (c) 2015-2016 Dave Collins
//
// Permission to use, copy, modify, and distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
@@ -13,9 +13,10 @@
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
// NOTE: Due to the following build constraints, this file will only be compiled
-// when either the code is running on Google App Engine or "-tags disableunsafe"
-// is added to the go build command line.
-// +build appengine disableunsafe
+// when the code is running on Google App Engine, compiled by GopherJS, or
+// "-tags safe" is added to the go build command line. The "disableunsafe"
+// tag is deprecated and thus should not be used.
+// +build js appengine safe disableunsafe
package spew
diff --git a/vendor/github.com/davecgh/go-spew/spew/common.go b/vendor/github.com/davecgh/go-spew/spew/common.go
index 14f02dc15b7..7c519ff47ac 100644
--- a/vendor/github.com/davecgh/go-spew/spew/common.go
+++ b/vendor/github.com/davecgh/go-spew/spew/common.go
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Dave Collins
+ * Copyright (c) 2013-2016 Dave Collins
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
diff --git a/vendor/github.com/davecgh/go-spew/spew/common_test.go b/vendor/github.com/davecgh/go-spew/spew/common_test.go
index 39b7525b3d1..0f5ce47dcaf 100644
--- a/vendor/github.com/davecgh/go-spew/spew/common_test.go
+++ b/vendor/github.com/davecgh/go-spew/spew/common_test.go
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Dave Collins
+ * Copyright (c) 2013-2016 Dave Collins
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
diff --git a/vendor/github.com/davecgh/go-spew/spew/config.go b/vendor/github.com/davecgh/go-spew/spew/config.go
index ee1ab07b3fd..2e3d22f3120 100644
--- a/vendor/github.com/davecgh/go-spew/spew/config.go
+++ b/vendor/github.com/davecgh/go-spew/spew/config.go
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Dave Collins
+ * Copyright (c) 2013-2016 Dave Collins
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -64,9 +64,18 @@ type ConfigState struct {
// inside these interface methods. As a result, this option relies on
// access to the unsafe package, so it will not have any effect when
// running in environments without access to the unsafe package such as
- // Google App Engine or with the "disableunsafe" build tag specified.
+ // Google App Engine or with the "safe" build tag specified.
DisablePointerMethods bool
+ // DisablePointerAddresses specifies whether to disable the printing of
+ // pointer addresses. This is useful when diffing data structures in tests.
+ DisablePointerAddresses bool
+
+ // DisableCapacities specifies whether to disable the printing of capacities
+ // for arrays, slices, maps and channels. This is useful when diffing
+ // data structures in tests.
+ DisableCapacities bool
+
// ContinueOnMethod specifies whether or not recursion should continue once
// a custom error or Stringer interface is invoked. The default, false,
// means it will print the results of invoking the custom error or Stringer
diff --git a/vendor/github.com/davecgh/go-spew/spew/doc.go b/vendor/github.com/davecgh/go-spew/spew/doc.go
index 5be0c406090..aacaac6f1e1 100644
--- a/vendor/github.com/davecgh/go-spew/spew/doc.go
+++ b/vendor/github.com/davecgh/go-spew/spew/doc.go
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Dave Collins
+ * Copyright (c) 2013-2016 Dave Collins
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -91,6 +91,15 @@ The following configuration options are available:
which only accept pointer receivers from non-pointer variables.
Pointer method invocation is enabled by default.
+ * DisablePointerAddresses
+ DisablePointerAddresses specifies whether to disable the printing of
+ pointer addresses. This is useful when diffing data structures in tests.
+
+ * DisableCapacities
+ DisableCapacities specifies whether to disable the printing of
+ capacities for arrays, slices, maps and channels. This is useful when
+ diffing data structures in tests.
+
* ContinueOnMethod
Enables recursion into types after invoking error and Stringer interface
methods. Recursion after method invocation is disabled by default.
diff --git a/vendor/github.com/davecgh/go-spew/spew/dump.go b/vendor/github.com/davecgh/go-spew/spew/dump.go
index 36a2b6cc9b2..df1d582a728 100644
--- a/vendor/github.com/davecgh/go-spew/spew/dump.go
+++ b/vendor/github.com/davecgh/go-spew/spew/dump.go
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Dave Collins
+ * Copyright (c) 2013-2016 Dave Collins
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -129,7 +129,7 @@ func (d *dumpState) dumpPtr(v reflect.Value) {
d.w.Write(closeParenBytes)
// Display pointer information.
- if len(pointerChain) > 0 {
+ if !d.cs.DisablePointerAddresses && len(pointerChain) > 0 {
d.w.Write(openParenBytes)
for i, addr := range pointerChain {
if i > 0 {
@@ -181,8 +181,6 @@ func (d *dumpState) dumpSlice(v reflect.Value) {
// Try to use existing uint8 slices and fall back to converting
// and copying if that fails.
case vt.Kind() == reflect.Uint8:
- // TODO(davec): Fix up the disableUnsafe bits...
-
// We need an addressable interface to convert the type
// to a byte slice. However, the reflect package won't
// give us an interface on certain things like
@@ -284,13 +282,13 @@ func (d *dumpState) dump(v reflect.Value) {
case reflect.Map, reflect.String:
valueLen = v.Len()
}
- if valueLen != 0 || valueCap != 0 {
+ if valueLen != 0 || !d.cs.DisableCapacities && valueCap != 0 {
d.w.Write(openParenBytes)
if valueLen != 0 {
d.w.Write(lenEqualsBytes)
printInt(d.w, int64(valueLen), 10)
}
- if valueCap != 0 {
+ if !d.cs.DisableCapacities && valueCap != 0 {
if valueLen != 0 {
d.w.Write(spaceBytes)
}
diff --git a/vendor/github.com/davecgh/go-spew/spew/dump_test.go b/vendor/github.com/davecgh/go-spew/spew/dump_test.go
index 2b320401dfa..5aad9c7af0b 100644
--- a/vendor/github.com/davecgh/go-spew/spew/dump_test.go
+++ b/vendor/github.com/davecgh/go-spew/spew/dump_test.go
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Dave Collins
+ * Copyright (c) 2013-2016 Dave Collins
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -70,7 +70,7 @@ import (
"github.com/davecgh/go-spew/spew"
)
-// dumpTest is used to describe a test to be perfomed against the Dump method.
+// dumpTest is used to describe a test to be performed against the Dump method.
type dumpTest struct {
in interface{}
wants []string
diff --git a/vendor/github.com/davecgh/go-spew/spew/dumpcgo_test.go b/vendor/github.com/davecgh/go-spew/spew/dumpcgo_test.go
index 18a38358e05..6ab180809a6 100644
--- a/vendor/github.com/davecgh/go-spew/spew/dumpcgo_test.go
+++ b/vendor/github.com/davecgh/go-spew/spew/dumpcgo_test.go
@@ -1,4 +1,4 @@
-// Copyright (c) 2013 Dave Collins
+// Copyright (c) 2013-2016 Dave Collins
//
// Permission to use, copy, modify, and distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
@@ -59,10 +59,11 @@ func addCgoDumpTests() {
v3Len := fmt.Sprintf("%d", v3l)
v3Cap := fmt.Sprintf("%d", v3c)
v3t := "[6]testdata._Ctype_unsignedchar"
+ v3t2 := "[6]testdata._Ctype_uchar"
v3s := "(len=" + v3Len + " cap=" + v3Cap + ") " +
"{\n 00000000 74 65 73 74 33 00 " +
" |test3.|\n}"
- addDumpTest(v3, "("+v3t+") "+v3s+"\n")
+ addDumpTest(v3, "("+v3t+") "+v3s+"\n", "("+v3t2+") "+v3s+"\n")
// C signed char array.
v4, v4l, v4c := testdata.GetCgoSignedCharArray()
diff --git a/vendor/github.com/davecgh/go-spew/spew/example_test.go b/vendor/github.com/davecgh/go-spew/spew/example_test.go
index de6c4e3097d..c6ec8c6d59e 100644
--- a/vendor/github.com/davecgh/go-spew/spew/example_test.go
+++ b/vendor/github.com/davecgh/go-spew/spew/example_test.go
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Dave Collins
+ * Copyright (c) 2013-2016 Dave Collins
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
diff --git a/vendor/github.com/davecgh/go-spew/spew/format.go b/vendor/github.com/davecgh/go-spew/spew/format.go
index ecf3b80e24b..c49875bacbb 100644
--- a/vendor/github.com/davecgh/go-spew/spew/format.go
+++ b/vendor/github.com/davecgh/go-spew/spew/format.go
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Dave Collins
+ * Copyright (c) 2013-2016 Dave Collins
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
diff --git a/vendor/github.com/davecgh/go-spew/spew/format_test.go b/vendor/github.com/davecgh/go-spew/spew/format_test.go
index b664b3f135f..f9b93abe86b 100644
--- a/vendor/github.com/davecgh/go-spew/spew/format_test.go
+++ b/vendor/github.com/davecgh/go-spew/spew/format_test.go
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Dave Collins
+ * Copyright (c) 2013-2016 Dave Collins
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -75,7 +75,7 @@ import (
"github.com/davecgh/go-spew/spew"
)
-// formatterTest is used to describe a test to be perfomed against NewFormatter.
+// formatterTest is used to describe a test to be performed against NewFormatter.
type formatterTest struct {
format string
in interface{}
diff --git a/vendor/github.com/davecgh/go-spew/spew/internal_test.go b/vendor/github.com/davecgh/go-spew/spew/internal_test.go
index 1069ee21c1f..20a9cfefc61 100644
--- a/vendor/github.com/davecgh/go-spew/spew/internal_test.go
+++ b/vendor/github.com/davecgh/go-spew/spew/internal_test.go
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Dave Collins
+ * Copyright (c) 2013-2016 Dave Collins
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
diff --git a/vendor/github.com/davecgh/go-spew/spew/internalunsafe_test.go b/vendor/github.com/davecgh/go-spew/spew/internalunsafe_test.go
index 83e070e9a86..a0c612ec3d5 100644
--- a/vendor/github.com/davecgh/go-spew/spew/internalunsafe_test.go
+++ b/vendor/github.com/davecgh/go-spew/spew/internalunsafe_test.go
@@ -1,4 +1,4 @@
-// Copyright (c) 2013-2015 Dave Collins
+// Copyright (c) 2013-2016 Dave Collins
// Permission to use, copy, modify, and distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
@@ -13,9 +13,10 @@
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
// NOTE: Due to the following build constraints, this file will only be compiled
-// when the code is not running on Google App Engine and "-tags disableunsafe"
-// is not added to the go build command line.
-// +build !appengine,!disableunsafe
+// when the code is not running on Google App Engine, compiled by GopherJS, and
+// "-tags safe" is not added to the go build command line. The "disableunsafe"
+// tag is deprecated and thus should not be used.
+// +build !js,!appengine,!safe,!disableunsafe
/*
This test file is part of the spew package rather than than the spew_test
diff --git a/vendor/github.com/davecgh/go-spew/spew/spew.go b/vendor/github.com/davecgh/go-spew/spew/spew.go
index d8233f542e1..32c0e338825 100644
--- a/vendor/github.com/davecgh/go-spew/spew/spew.go
+++ b/vendor/github.com/davecgh/go-spew/spew/spew.go
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Dave Collins
+ * Copyright (c) 2013-2016 Dave Collins
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
diff --git a/vendor/github.com/davecgh/go-spew/spew/spew_test.go b/vendor/github.com/davecgh/go-spew/spew/spew_test.go
index dbbc0856792..b70466c69f8 100644
--- a/vendor/github.com/davecgh/go-spew/spew/spew_test.go
+++ b/vendor/github.com/davecgh/go-spew/spew/spew_test.go
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Dave Collins
+ * Copyright (c) 2013-2016 Dave Collins
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -130,12 +130,19 @@ func initSpewTests() {
scsNoPmethods := &spew.ConfigState{Indent: " ", DisablePointerMethods: true}
scsMaxDepth := &spew.ConfigState{Indent: " ", MaxDepth: 1}
scsContinue := &spew.ConfigState{Indent: " ", ContinueOnMethod: true}
+ scsNoPtrAddr := &spew.ConfigState{DisablePointerAddresses: true}
+ scsNoCap := &spew.ConfigState{DisableCapacities: true}
// Variables for tests on types which implement Stringer interface with and
// without a pointer receiver.
ts := stringer("test")
tps := pstringer("test")
+ type ptrTester struct {
+ s *struct{}
+ }
+ tptr := &ptrTester{s: &struct{}{}}
+
// depthTester is used to test max depth handling for structs, array, slices
// and maps.
type depthTester struct {
@@ -192,6 +199,10 @@ func initSpewTests() {
{scsContinue, fCSFprint, "", te, "(error: 10) 10"},
{scsContinue, fCSFdump, "", te, "(spew_test.customError) " +
"(error: 10) 10\n"},
+ {scsNoPtrAddr, fCSFprint, "", tptr, "<*>{<*>{}}"},
+ {scsNoPtrAddr, fCSSdump, "", tptr, "(*spew_test.ptrTester)({\ns: (*struct {})({\n})\n})\n"},
+ {scsNoCap, fCSSdump, "", make([]string, 0, 10), "([]string) {\n}\n"},
+ {scsNoCap, fCSSdump, "", make([]string, 1, 10), "([]string) (len=1) {\n(string) \"\"\n}\n"},
}
}
diff --git a/vendor/github.com/davecgh/go-spew/spew/testdata/dumpcgo.go b/vendor/github.com/davecgh/go-spew/spew/testdata/dumpcgo.go
deleted file mode 100644
index 5c87dd456ed..00000000000
--- a/vendor/github.com/davecgh/go-spew/spew/testdata/dumpcgo.go
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) 2013 Dave Collins
-//
-// Permission to use, copy, modify, and 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.
-
-// NOTE: Due to the following build constraints, this file will only be compiled
-// when both cgo is supported and "-tags testcgo" is added to the go test
-// command line. This code should really only be in the dumpcgo_test.go file,
-// but unfortunately Go will not allow cgo in test files, so this is a
-// workaround to allow cgo types to be tested. This configuration is used
-// because spew itself does not require cgo to run even though it does handle
-// certain cgo types specially. Rather than forcing all clients to require cgo
-// and an external C compiler just to run the tests, this scheme makes them
-// optional.
-// +build cgo,testcgo
-
-package testdata
-
-/*
-#include
-typedef unsigned char custom_uchar_t;
-
-char *ncp = 0;
-char *cp = "test";
-char ca[6] = {'t', 'e', 's', 't', '2', '\0'};
-unsigned char uca[6] = {'t', 'e', 's', 't', '3', '\0'};
-signed char sca[6] = {'t', 'e', 's', 't', '4', '\0'};
-uint8_t ui8ta[6] = {'t', 'e', 's', 't', '5', '\0'};
-custom_uchar_t tuca[6] = {'t', 'e', 's', 't', '6', '\0'};
-*/
-import "C"
-
-// GetCgoNullCharPointer returns a null char pointer via cgo. This is only
-// used for tests.
-func GetCgoNullCharPointer() interface{} {
- return C.ncp
-}
-
-// GetCgoCharPointer returns a char pointer via cgo. This is only used for
-// tests.
-func GetCgoCharPointer() interface{} {
- return C.cp
-}
-
-// GetCgoCharArray returns a char array via cgo and the array's len and cap.
-// This is only used for tests.
-func GetCgoCharArray() (interface{}, int, int) {
- return C.ca, len(C.ca), cap(C.ca)
-}
-
-// GetCgoUnsignedCharArray returns an unsigned char array via cgo and the
-// array's len and cap. This is only used for tests.
-func GetCgoUnsignedCharArray() (interface{}, int, int) {
- return C.uca, len(C.uca), cap(C.uca)
-}
-
-// GetCgoSignedCharArray returns a signed char array via cgo and the array's len
-// and cap. This is only used for tests.
-func GetCgoSignedCharArray() (interface{}, int, int) {
- return C.sca, len(C.sca), cap(C.sca)
-}
-
-// GetCgoUint8tArray returns a uint8_t array via cgo and the array's len and
-// cap. This is only used for tests.
-func GetCgoUint8tArray() (interface{}, int, int) {
- return C.ui8ta, len(C.ui8ta), cap(C.ui8ta)
-}
-
-// GetCgoTypdefedUnsignedCharArray returns a typedefed unsigned char array via
-// cgo and the array's len and cap. This is only used for tests.
-func GetCgoTypdefedUnsignedCharArray() (interface{}, int, int) {
- return C.tuca, len(C.tuca), cap(C.tuca)
-}
diff --git a/vendor/github.com/davecgh/go-spew/test_coverage.txt b/vendor/github.com/davecgh/go-spew/test_coverage.txt
new file mode 100644
index 00000000000..2cd087a2a12
--- /dev/null
+++ b/vendor/github.com/davecgh/go-spew/test_coverage.txt
@@ -0,0 +1,61 @@
+
+github.com/davecgh/go-spew/spew/dump.go dumpState.dump 100.00% (88/88)
+github.com/davecgh/go-spew/spew/format.go formatState.format 100.00% (82/82)
+github.com/davecgh/go-spew/spew/format.go formatState.formatPtr 100.00% (52/52)
+github.com/davecgh/go-spew/spew/dump.go dumpState.dumpPtr 100.00% (44/44)
+github.com/davecgh/go-spew/spew/dump.go dumpState.dumpSlice 100.00% (39/39)
+github.com/davecgh/go-spew/spew/common.go handleMethods 100.00% (30/30)
+github.com/davecgh/go-spew/spew/common.go printHexPtr 100.00% (18/18)
+github.com/davecgh/go-spew/spew/common.go unsafeReflectValue 100.00% (13/13)
+github.com/davecgh/go-spew/spew/format.go formatState.constructOrigFormat 100.00% (12/12)
+github.com/davecgh/go-spew/spew/dump.go fdump 100.00% (11/11)
+github.com/davecgh/go-spew/spew/format.go formatState.Format 100.00% (11/11)
+github.com/davecgh/go-spew/spew/common.go init 100.00% (10/10)
+github.com/davecgh/go-spew/spew/common.go printComplex 100.00% (9/9)
+github.com/davecgh/go-spew/spew/common.go valuesSorter.Less 100.00% (8/8)
+github.com/davecgh/go-spew/spew/format.go formatState.buildDefaultFormat 100.00% (7/7)
+github.com/davecgh/go-spew/spew/format.go formatState.unpackValue 100.00% (5/5)
+github.com/davecgh/go-spew/spew/dump.go dumpState.indent 100.00% (4/4)
+github.com/davecgh/go-spew/spew/common.go catchPanic 100.00% (4/4)
+github.com/davecgh/go-spew/spew/config.go ConfigState.convertArgs 100.00% (4/4)
+github.com/davecgh/go-spew/spew/spew.go convertArgs 100.00% (4/4)
+github.com/davecgh/go-spew/spew/format.go newFormatter 100.00% (3/3)
+github.com/davecgh/go-spew/spew/dump.go Sdump 100.00% (3/3)
+github.com/davecgh/go-spew/spew/common.go printBool 100.00% (3/3)
+github.com/davecgh/go-spew/spew/common.go sortValues 100.00% (3/3)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Sdump 100.00% (3/3)
+github.com/davecgh/go-spew/spew/dump.go dumpState.unpackValue 100.00% (3/3)
+github.com/davecgh/go-spew/spew/spew.go Printf 100.00% (1/1)
+github.com/davecgh/go-spew/spew/spew.go Println 100.00% (1/1)
+github.com/davecgh/go-spew/spew/spew.go Sprint 100.00% (1/1)
+github.com/davecgh/go-spew/spew/spew.go Sprintf 100.00% (1/1)
+github.com/davecgh/go-spew/spew/spew.go Sprintln 100.00% (1/1)
+github.com/davecgh/go-spew/spew/common.go printFloat 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go NewDefaultConfig 100.00% (1/1)
+github.com/davecgh/go-spew/spew/common.go printInt 100.00% (1/1)
+github.com/davecgh/go-spew/spew/common.go printUint 100.00% (1/1)
+github.com/davecgh/go-spew/spew/common.go valuesSorter.Len 100.00% (1/1)
+github.com/davecgh/go-spew/spew/common.go valuesSorter.Swap 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Errorf 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Fprint 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Fprintf 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Fprintln 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Print 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Printf 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Println 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Sprint 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Sprintf 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Sprintln 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.NewFormatter 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Fdump 100.00% (1/1)
+github.com/davecgh/go-spew/spew/config.go ConfigState.Dump 100.00% (1/1)
+github.com/davecgh/go-spew/spew/dump.go Fdump 100.00% (1/1)
+github.com/davecgh/go-spew/spew/dump.go Dump 100.00% (1/1)
+github.com/davecgh/go-spew/spew/spew.go Fprintln 100.00% (1/1)
+github.com/davecgh/go-spew/spew/format.go NewFormatter 100.00% (1/1)
+github.com/davecgh/go-spew/spew/spew.go Errorf 100.00% (1/1)
+github.com/davecgh/go-spew/spew/spew.go Fprint 100.00% (1/1)
+github.com/davecgh/go-spew/spew/spew.go Fprintf 100.00% (1/1)
+github.com/davecgh/go-spew/spew/spew.go Print 100.00% (1/1)
+github.com/davecgh/go-spew/spew ------------------------------- 100.00% (505/505)
+
diff --git a/vendor/github.com/fatih/color/.travis.yml b/vendor/github.com/fatih/color/.travis.yml
index 4f203dd1931..57b4b57c825 100644
--- a/vendor/github.com/fatih/color/.travis.yml
+++ b/vendor/github.com/fatih/color/.travis.yml
@@ -1,3 +1,5 @@
language: go
-go: 1.6
+go:
+ - 1.6
+ - tip
diff --git a/vendor/github.com/fatih/color/README.md b/vendor/github.com/fatih/color/README.md
index 0921f98a5f3..623baf3c39e 100644
--- a/vendor/github.com/fatih/color/README.md
+++ b/vendor/github.com/fatih/color/README.md
@@ -8,7 +8,6 @@ has support for Windows too! The API can be used in several ways, pick one that
suits you.
-

@@ -18,6 +17,9 @@ suits you.
go get github.com/fatih/color
```
+Note that the `vendor` folder is here for stability. Remove the folder if you
+already have the dependencies in your GOPATH.
+
## Examples
### Standard colors
@@ -56,6 +58,16 @@ whiteBackground := red.Add(color.BgWhite)
whiteBackground.Println("Red text with white background.")
```
+### Use your own output (io.Writer)
+
+```go
+// Use your own io.Writer output
+color.New(color.FgBlue).Fprintln(myWriter, "blue color!")
+
+blue := color.New(color.FgBlue)
+blue.Fprint(writer, "This will print text in blue.")
+```
+
### Custom print functions (PrintFunc)
```go
@@ -69,6 +81,17 @@ notice := color.New(color.Bold, color.FgGreen).PrintlnFunc()
notice("Don't forget this...")
```
+### Custom fprint functions (FprintFunc)
+
+```go
+blue := color.New(FgBlue).FprintfFunc()
+blue(myWriter, "important notice: %s", stars)
+
+// Mix up with multiple attributes
+success := color.New(color.Bold, color.FgGreen).FprintlnFunc()
+success(myWriter, "Don't forget this...")
+```
+
### Insert into noncolor strings (SprintFunc)
```go
@@ -81,8 +104,8 @@ info := color.New(color.FgWhite, color.BgGreen).SprintFunc()
fmt.Printf("This %s rocks!\n", info("package"))
// Use helper functions
-fmt.Printf("This", color.RedString("warning"), "should be not neglected.")
-fmt.Printf(color.GreenString("Info:"), "an important message." )
+fmt.Println("This", color.RedString("warning"), "should be not neglected.")
+fmt.Printf("%v %v\n", color.GreenString("Info:"), "an important message.")
// Windows supported too! Just don't forget to change the output to color.Output
fmt.Fprintf(color.Output, "Windows support: %s", color.GreenString("PASS"))
diff --git a/vendor/github.com/fatih/color/color.go b/vendor/github.com/fatih/color/color.go
index e3e997284d0..7b5f3146d33 100644
--- a/vendor/github.com/fatih/color/color.go
+++ b/vendor/github.com/fatih/color/color.go
@@ -2,19 +2,33 @@ package color
import (
"fmt"
+ "io"
"os"
"strconv"
"strings"
+ "sync"
"github.com/mattn/go-colorable"
"github.com/mattn/go-isatty"
)
-// NoColor defines if the output is colorized or not. It's dynamically set to
-// false or true based on the stdout's file descriptor referring to a terminal
-// or not. This is a global option and affects all colors. For more control
-// over each color block use the methods DisableColor() individually.
-var NoColor = !isatty.IsTerminal(os.Stdout.Fd())
+var (
+ // NoColor defines if the output is colorized or not. It's dynamically set to
+ // false or true based on the stdout's file descriptor referring to a terminal
+ // or not. This is a global option and affects all colors. For more control
+ // over each color block use the methods DisableColor() individually.
+ NoColor = os.Getenv("TERM") == "dumb" ||
+ (!isatty.IsTerminal(os.Stdout.Fd()) && !isatty.IsCygwinTerminal(os.Stdout.Fd()))
+
+ // Output defines the standard output of the print functions. By default
+ // os.Stdout is used.
+ Output = colorable.NewColorableStdout()
+
+ // colorsCache is used to reduce the count of created Color objects and
+ // allows to reuse already created objects with required Attribute.
+ colorsCache = make(map[Attribute]*Color)
+ colorsCacheMu sync.Mutex // protects colorsCache
+)
// Color defines a custom color object which is defined by SGR parameters.
type Color struct {
@@ -132,6 +146,27 @@ func (c *Color) unset() {
Unset()
}
+func (c *Color) setWriter(w io.Writer) *Color {
+ if c.isNoColorSet() {
+ return c
+ }
+
+ fmt.Fprintf(w, c.format())
+ return c
+}
+
+func (c *Color) unsetWriter(w io.Writer) {
+ if c.isNoColorSet() {
+ return
+ }
+
+ if NoColor {
+ return
+ }
+
+ fmt.Fprintf(w, "%s[%dm", escape, Reset)
+}
+
// Add is used to chain SGR parameters. Use as many as parameters to combine
// and create custom color objects. Example: Add(color.FgRed, color.Underline).
func (c *Color) Add(value ...Attribute) *Color {
@@ -145,9 +180,17 @@ func (c *Color) prepend(value Attribute) {
c.params[0] = value
}
-// Output defines the standard output of the print functions. By default
-// os.Stdout is used.
-var Output = colorable.NewColorableStdout()
+// Fprint formats using the default formats for its operands and writes to w.
+// Spaces are added between operands when neither is a string.
+// It returns the number of bytes written and any write error encountered.
+// On Windows, users should wrap w with colorable.NewColorable() if w is of
+// type *os.File.
+func (c *Color) Fprint(w io.Writer, a ...interface{}) (n int, err error) {
+ c.setWriter(w)
+ defer c.unsetWriter(w)
+
+ return fmt.Fprint(w, a...)
+}
// Print formats using the default formats for its operands and writes to
// standard output. Spaces are added between operands when neither is a
@@ -161,6 +204,17 @@ func (c *Color) Print(a ...interface{}) (n int, err error) {
return fmt.Fprint(Output, a...)
}
+// Fprintf formats according to a format specifier and writes to w.
+// It returns the number of bytes written and any write error encountered.
+// On Windows, users should wrap w with colorable.NewColorable() if w is of
+// type *os.File.
+func (c *Color) Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) {
+ c.setWriter(w)
+ defer c.unsetWriter(w)
+
+ return fmt.Fprintf(w, format, a...)
+}
+
// Printf formats according to a format specifier and writes to standard output.
// It returns the number of bytes written and any write error encountered.
// This is the standard fmt.Printf() method wrapped with the given color.
@@ -171,6 +225,17 @@ func (c *Color) Printf(format string, a ...interface{}) (n int, err error) {
return fmt.Fprintf(Output, format, a...)
}
+// Fprintln formats using the default formats for its operands and writes to w.
+// Spaces are always added between operands and a newline is appended.
+// On Windows, users should wrap w with colorable.NewColorable() if w is of
+// type *os.File.
+func (c *Color) Fprintln(w io.Writer, a ...interface{}) (n int, err error) {
+ c.setWriter(w)
+ defer c.unsetWriter(w)
+
+ return fmt.Fprintln(w, a...)
+}
+
// Println formats using the default formats for its operands and writes to
// standard output. Spaces are always added between operands and a newline is
// appended. It returns the number of bytes written and any write error
@@ -183,27 +248,72 @@ func (c *Color) Println(a ...interface{}) (n int, err error) {
return fmt.Fprintln(Output, a...)
}
+// Sprint is just like Print, but returns a string instead of printing it.
+func (c *Color) Sprint(a ...interface{}) string {
+ return c.wrap(fmt.Sprint(a...))
+}
+
+// Sprintln is just like Println, but returns a string instead of printing it.
+func (c *Color) Sprintln(a ...interface{}) string {
+ return c.wrap(fmt.Sprintln(a...))
+}
+
+// Sprintf is just like Printf, but returns a string instead of printing it.
+func (c *Color) Sprintf(format string, a ...interface{}) string {
+ return c.wrap(fmt.Sprintf(format, a...))
+}
+
+// FprintFunc returns a new function that prints the passed arguments as
+// colorized with color.Fprint().
+func (c *Color) FprintFunc() func(w io.Writer, a ...interface{}) {
+ return func(w io.Writer, a ...interface{}) {
+ c.Fprint(w, a...)
+ }
+}
+
// PrintFunc returns a new function that prints the passed arguments as
// colorized with color.Print().
func (c *Color) PrintFunc() func(a ...interface{}) {
- return func(a ...interface{}) { c.Print(a...) }
+ return func(a ...interface{}) {
+ c.Print(a...)
+ }
+}
+
+// FprintfFunc returns a new function that prints the passed arguments as
+// colorized with color.Fprintf().
+func (c *Color) FprintfFunc() func(w io.Writer, format string, a ...interface{}) {
+ return func(w io.Writer, format string, a ...interface{}) {
+ c.Fprintf(w, format, a...)
+ }
}
// PrintfFunc returns a new function that prints the passed arguments as
// colorized with color.Printf().
func (c *Color) PrintfFunc() func(format string, a ...interface{}) {
- return func(format string, a ...interface{}) { c.Printf(format, a...) }
+ return func(format string, a ...interface{}) {
+ c.Printf(format, a...)
+ }
+}
+
+// FprintlnFunc returns a new function that prints the passed arguments as
+// colorized with color.Fprintln().
+func (c *Color) FprintlnFunc() func(w io.Writer, a ...interface{}) {
+ return func(w io.Writer, a ...interface{}) {
+ c.Fprintln(w, a...)
+ }
}
// PrintlnFunc returns a new function that prints the passed arguments as
// colorized with color.Println().
func (c *Color) PrintlnFunc() func(a ...interface{}) {
- return func(a ...interface{}) { c.Println(a...) }
+ return func(a ...interface{}) {
+ c.Println(a...)
+ }
}
// SprintFunc returns a new function that returns colorized strings for the
// given arguments with fmt.Sprint(). Useful to put into or mix into other
-// string. Windows users should use this in conjuction with color.Output, example:
+// string. Windows users should use this in conjunction with color.Output, example:
//
// put := New(FgYellow).SprintFunc()
// fmt.Fprintf(color.Output, "This is a %s", put("warning"))
@@ -215,7 +325,7 @@ func (c *Color) SprintFunc() func(a ...interface{}) string {
// SprintfFunc returns a new function that returns colorized strings for the
// given arguments with fmt.Sprintf(). Useful to put into or mix into other
-// string. Windows users should use this in conjuction with color.Output.
+// string. Windows users should use this in conjunction with color.Output.
func (c *Color) SprintfFunc() func(format string, a ...interface{}) string {
return func(format string, a ...interface{}) string {
return c.wrap(fmt.Sprintf(format, a...))
@@ -224,7 +334,7 @@ func (c *Color) SprintfFunc() func(format string, a ...interface{}) string {
// SprintlnFunc returns a new function that returns colorized strings for the
// given arguments with fmt.Sprintln(). Useful to put into or mix into other
-// string. Windows users should use this in conjuction with color.Output.
+// string. Windows users should use this in conjunction with color.Output.
func (c *Color) SprintlnFunc() func(a ...interface{}) string {
return func(a ...interface{}) string {
return c.wrap(fmt.Sprintln(a...))
@@ -267,7 +377,7 @@ func (c *Color) DisableColor() {
c.noColor = boolPtr(true)
}
-// EnableColor enables the color output. Use it in conjuction with
+// EnableColor enables the color output. Use it in conjunction with
// DisableColor(). Otherwise this method has no side effects.
func (c *Color) EnableColor() {
c.noColor = boolPtr(false)
@@ -312,91 +422,179 @@ func boolPtr(v bool) *bool {
return &v
}
-// Black is an convenient helper function to print with black foreground. A
-// newline is appended to format by default.
-func Black(format string, a ...interface{}) { printColor(format, FgBlack, a...) }
+func getCachedColor(p Attribute) *Color {
+ colorsCacheMu.Lock()
+ defer colorsCacheMu.Unlock()
-// Red is an convenient helper function to print with red foreground. A
-// newline is appended to format by default.
-func Red(format string, a ...interface{}) { printColor(format, FgRed, a...) }
+ c, ok := colorsCache[p]
+ if !ok {
+ c = New(p)
+ colorsCache[p] = c
+ }
-// Green is an convenient helper function to print with green foreground. A
-// newline is appended to format by default.
-func Green(format string, a ...interface{}) { printColor(format, FgGreen, a...) }
+ return c
+}
-// Yellow is an convenient helper function to print with yellow foreground.
-// A newline is appended to format by default.
-func Yellow(format string, a ...interface{}) { printColor(format, FgYellow, a...) }
+func colorPrint(format string, p Attribute, a ...interface{}) {
+ c := getCachedColor(p)
-// Blue is an convenient helper function to print with blue foreground. A
-// newline is appended to format by default.
-func Blue(format string, a ...interface{}) { printColor(format, FgBlue, a...) }
-
-// Magenta is an convenient helper function to print with magenta foreground.
-// A newline is appended to format by default.
-func Magenta(format string, a ...interface{}) { printColor(format, FgMagenta, a...) }
-
-// Cyan is an convenient helper function to print with cyan foreground. A
-// newline is appended to format by default.
-func Cyan(format string, a ...interface{}) { printColor(format, FgCyan, a...) }
-
-// White is an convenient helper function to print with white foreground. A
-// newline is appended to format by default.
-func White(format string, a ...interface{}) { printColor(format, FgWhite, a...) }
-
-func printColor(format string, p Attribute, a ...interface{}) {
if !strings.HasSuffix(format, "\n") {
format += "\n"
}
- c := &Color{params: []Attribute{p}}
- c.Printf(format, a...)
+ if len(a) == 0 {
+ c.Print(format)
+ } else {
+ c.Printf(format, a...)
+ }
}
-// BlackString is an convenient helper function to return a string with black
+func colorString(format string, p Attribute, a ...interface{}) string {
+ c := getCachedColor(p)
+
+ if len(a) == 0 {
+ return c.SprintFunc()(format)
+ }
+
+ return c.SprintfFunc()(format, a...)
+}
+
+// Black is a convenient helper function to print with black foreground. A
+// newline is appended to format by default.
+func Black(format string, a ...interface{}) { colorPrint(format, FgBlack, a...) }
+
+// Red is a convenient helper function to print with red foreground. A
+// newline is appended to format by default.
+func Red(format string, a ...interface{}) { colorPrint(format, FgRed, a...) }
+
+// Green is a convenient helper function to print with green foreground. A
+// newline is appended to format by default.
+func Green(format string, a ...interface{}) { colorPrint(format, FgGreen, a...) }
+
+// Yellow is a convenient helper function to print with yellow foreground.
+// A newline is appended to format by default.
+func Yellow(format string, a ...interface{}) { colorPrint(format, FgYellow, a...) }
+
+// Blue is a convenient helper function to print with blue foreground. A
+// newline is appended to format by default.
+func Blue(format string, a ...interface{}) { colorPrint(format, FgBlue, a...) }
+
+// Magenta is a convenient helper function to print with magenta foreground.
+// A newline is appended to format by default.
+func Magenta(format string, a ...interface{}) { colorPrint(format, FgMagenta, a...) }
+
+// Cyan is a convenient helper function to print with cyan foreground. A
+// newline is appended to format by default.
+func Cyan(format string, a ...interface{}) { colorPrint(format, FgCyan, a...) }
+
+// White is a convenient helper function to print with white foreground. A
+// newline is appended to format by default.
+func White(format string, a ...interface{}) { colorPrint(format, FgWhite, a...) }
+
+// BlackString is a convenient helper function to return a string with black
// foreground.
-func BlackString(format string, a ...interface{}) string {
- return New(FgBlack).SprintfFunc()(format, a...)
-}
+func BlackString(format string, a ...interface{}) string { return colorString(format, FgBlack, a...) }
-// RedString is an convenient helper function to return a string with red
+// RedString is a convenient helper function to return a string with red
// foreground.
-func RedString(format string, a ...interface{}) string {
- return New(FgRed).SprintfFunc()(format, a...)
-}
+func RedString(format string, a ...interface{}) string { return colorString(format, FgRed, a...) }
-// GreenString is an convenient helper function to return a string with green
+// GreenString is a convenient helper function to return a string with green
// foreground.
-func GreenString(format string, a ...interface{}) string {
- return New(FgGreen).SprintfFunc()(format, a...)
-}
+func GreenString(format string, a ...interface{}) string { return colorString(format, FgGreen, a...) }
-// YellowString is an convenient helper function to return a string with yellow
+// YellowString is a convenient helper function to return a string with yellow
// foreground.
-func YellowString(format string, a ...interface{}) string {
- return New(FgYellow).SprintfFunc()(format, a...)
-}
+func YellowString(format string, a ...interface{}) string { return colorString(format, FgYellow, a...) }
-// BlueString is an convenient helper function to return a string with blue
+// BlueString is a convenient helper function to return a string with blue
// foreground.
-func BlueString(format string, a ...interface{}) string {
- return New(FgBlue).SprintfFunc()(format, a...)
-}
+func BlueString(format string, a ...interface{}) string { return colorString(format, FgBlue, a...) }
-// MagentaString is an convenient helper function to return a string with magenta
+// MagentaString is a convenient helper function to return a string with magenta
// foreground.
func MagentaString(format string, a ...interface{}) string {
- return New(FgMagenta).SprintfFunc()(format, a...)
+ return colorString(format, FgMagenta, a...)
}
-// CyanString is an convenient helper function to return a string with cyan
+// CyanString is a convenient helper function to return a string with cyan
// foreground.
-func CyanString(format string, a ...interface{}) string {
- return New(FgCyan).SprintfFunc()(format, a...)
+func CyanString(format string, a ...interface{}) string { return colorString(format, FgCyan, a...) }
+
+// WhiteString is a convenient helper function to return a string with white
+// foreground.
+func WhiteString(format string, a ...interface{}) string { return colorString(format, FgWhite, a...) }
+
+// HiBlack is a convenient helper function to print with hi-intensity black foreground. A
+// newline is appended to format by default.
+func HiBlack(format string, a ...interface{}) { colorPrint(format, FgHiBlack, a...) }
+
+// HiRed is a convenient helper function to print with hi-intensity red foreground. A
+// newline is appended to format by default.
+func HiRed(format string, a ...interface{}) { colorPrint(format, FgHiRed, a...) }
+
+// HiGreen is a convenient helper function to print with hi-intensity green foreground. A
+// newline is appended to format by default.
+func HiGreen(format string, a ...interface{}) { colorPrint(format, FgHiGreen, a...) }
+
+// HiYellow is a convenient helper function to print with hi-intensity yellow foreground.
+// A newline is appended to format by default.
+func HiYellow(format string, a ...interface{}) { colorPrint(format, FgHiYellow, a...) }
+
+// HiBlue is a convenient helper function to print with hi-intensity blue foreground. A
+// newline is appended to format by default.
+func HiBlue(format string, a ...interface{}) { colorPrint(format, FgHiBlue, a...) }
+
+// HiMagenta is a convenient helper function to print with hi-intensity magenta foreground.
+// A newline is appended to format by default.
+func HiMagenta(format string, a ...interface{}) { colorPrint(format, FgHiMagenta, a...) }
+
+// HiCyan is a convenient helper function to print with hi-intensity cyan foreground. A
+// newline is appended to format by default.
+func HiCyan(format string, a ...interface{}) { colorPrint(format, FgHiCyan, a...) }
+
+// HiWhite is a convenient helper function to print with hi-intensity white foreground. A
+// newline is appended to format by default.
+func HiWhite(format string, a ...interface{}) { colorPrint(format, FgHiWhite, a...) }
+
+// HiBlackString is a convenient helper function to return a string with hi-intensity black
+// foreground.
+func HiBlackString(format string, a ...interface{}) string {
+ return colorString(format, FgHiBlack, a...)
}
-// WhiteString is an convenient helper function to return a string with white
+// HiRedString is a convenient helper function to return a string with hi-intensity red
// foreground.
-func WhiteString(format string, a ...interface{}) string {
- return New(FgWhite).SprintfFunc()(format, a...)
+func HiRedString(format string, a ...interface{}) string { return colorString(format, FgHiRed, a...) }
+
+// HiGreenString is a convenient helper function to return a string with hi-intensity green
+// foreground.
+func HiGreenString(format string, a ...interface{}) string {
+ return colorString(format, FgHiGreen, a...)
+}
+
+// HiYellowString is a convenient helper function to return a string with hi-intensity yellow
+// foreground.
+func HiYellowString(format string, a ...interface{}) string {
+ return colorString(format, FgHiYellow, a...)
+}
+
+// HiBlueString is a convenient helper function to return a string with hi-intensity blue
+// foreground.
+func HiBlueString(format string, a ...interface{}) string { return colorString(format, FgHiBlue, a...) }
+
+// HiMagentaString is a convenient helper function to return a string with hi-intensity magenta
+// foreground.
+func HiMagentaString(format string, a ...interface{}) string {
+ return colorString(format, FgHiMagenta, a...)
+}
+
+// HiCyanString is a convenient helper function to return a string with hi-intensity cyan
+// foreground.
+func HiCyanString(format string, a ...interface{}) string { return colorString(format, FgHiCyan, a...) }
+
+// HiWhiteString is a convenient helper function to return a string with hi-intensity white
+// foreground.
+func HiWhiteString(format string, a ...interface{}) string {
+ return colorString(format, FgHiWhite, a...)
}
diff --git a/vendor/github.com/fatih/color/doc.go b/vendor/github.com/fatih/color/doc.go
index 17908787c99..cf1e96500f4 100644
--- a/vendor/github.com/fatih/color/doc.go
+++ b/vendor/github.com/fatih/color/doc.go
@@ -15,6 +15,11 @@ Use simple and default helper functions with predefined foreground colors:
color.Yellow("Yellow color too!")
color.Magenta("And many others ..")
+ // Hi-intensity colors
+ color.HiGreen("Bright green color.")
+ color.HiBlack("Bright black means gray..")
+ color.HiWhite("Shiny white color!")
+
However there are times where custom color mixes are required. Below are some
examples to create custom color objects and use the print functions of each
separate color object.
@@ -37,6 +42,11 @@ separate color object.
whiteBackground := red.Add(color.BgWhite)
whiteBackground.Println("Red text with White background.")
+ // Use your own io.Writer output
+ color.New(color.FgBlue).Fprintln(myWriter, "blue color!")
+
+ blue := color.New(color.FgBlue)
+ blue.Fprint(myWriter, "This will print text in blue.")
You can create PrintXxx functions to simplify even more:
@@ -49,6 +59,15 @@ You can create PrintXxx functions to simplify even more:
notice := color.New(color.Bold, color.FgGreen).PrintlnFunc()
notice("don't forget this...")
+You can also FprintXxx functions to pass your own io.Writer:
+
+ blue := color.New(FgBlue).FprintfFunc()
+ blue(myWriter, "important notice: %s", stars)
+
+ // Mix up with multiple attributes
+ success := color.New(color.Bold, color.FgGreen).FprintlnFunc()
+ success(myWriter, don't forget this...")
+
Or create SprintXxx functions to mix strings with other non-colorized strings:
@@ -60,7 +79,7 @@ Or create SprintXxx functions to mix strings with other non-colorized strings:
info := New(FgWhite, BgGreen).SprintFunc()
fmt.Printf("this %s rocks!\n", info("package"))
-Windows support is enabled by default. All Print functions works as intended.
+Windows support is enabled by default. All Print functions work as intended.
However only for color.SprintXXX functions, user should use fmt.FprintXXX and
set the output to color.Output:
diff --git a/vendor/github.com/go-ini/ini/.gitignore b/vendor/github.com/go-ini/ini/.gitignore
new file mode 100644
index 00000000000..12411127b39
--- /dev/null
+++ b/vendor/github.com/go-ini/ini/.gitignore
@@ -0,0 +1,6 @@
+testdata/conf_out.ini
+ini.sublime-project
+ini.sublime-workspace
+testdata/conf_reflect.ini
+.idea
+/.vscode
diff --git a/vendor/github.com/go-ini/ini/LICENSE b/vendor/github.com/go-ini/ini/LICENSE
index 37ec93a14fd..d361bbcdf5c 100644
--- a/vendor/github.com/go-ini/ini/LICENSE
+++ b/vendor/github.com/go-ini/ini/LICENSE
@@ -176,7 +176,7 @@ recommend that a file or class name and description of purpose be included on
the same "printed page" as the copyright notice for easier identification within
third-party archives.
- Copyright [yyyy] [name of copyright owner]
+ Copyright 2014 Unknwon
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/vendor/github.com/go-ini/ini/Makefile b/vendor/github.com/go-ini/ini/Makefile
index ac034e5258f..1316911d2df 100644
--- a/vendor/github.com/go-ini/ini/Makefile
+++ b/vendor/github.com/go-ini/ini/Makefile
@@ -1,4 +1,4 @@
-.PHONY: build test bench vet
+.PHONY: build test bench vet coverage
build: vet bench
@@ -10,3 +10,6 @@ bench:
vet:
go vet
+
+coverage:
+ go test -coverprofile=c.out && go tool cover -html=c.out && rm c.out
\ No newline at end of file
diff --git a/vendor/github.com/go-ini/ini/README.md b/vendor/github.com/go-ini/ini/README.md
index a939d75e9f2..f4ff27cd30c 100644
--- a/vendor/github.com/go-ini/ini/README.md
+++ b/vendor/github.com/go-ini/ini/README.md
@@ -1,4 +1,4 @@
-INI [](https://travis-ci.org/go-ini/ini)
+INI [](https://travis-ci.org/go-ini/ini) [](https://sourcegraph.com/github.com/go-ini/ini?badge)
===

@@ -9,7 +9,7 @@ Package ini provides INI file read and write functionality in Go.
## Feature
-- Load multiple data sources(`[]byte` or file) with overwrites.
+- Load multiple data sources(`[]byte`, file and `io.ReadCloser`) with overwrites.
- Read with recursion values.
- Read with parent-child sections.
- Read with auto-increment key names.
@@ -44,10 +44,10 @@ Please add `-u` flag to update in the future.
### Loading from data sources
-A **Data Source** is either raw data in type `[]byte` or a file name with type `string` and you can load **as many data sources as you want**. Passing other types will simply return an error.
+A **Data Source** is either raw data in type `[]byte`, a file name with type `string` or `io.ReadCloser`. You can load **as many data sources as you want**. Passing other types will simply return an error.
```go
-cfg, err := ini.Load([]byte("raw data"), "filename")
+cfg, err := ini.Load([]byte("raw data"), "filename", ioutil.NopCloser(bytes.NewReader([]byte("some other data"))))
```
Or start with an empty object:
@@ -83,8 +83,8 @@ sec1, err := cfg.GetSection("Section")
sec2, err := cfg.GetSection("SecTIOn")
// key1 and key2 are the exactly same key object
-key1, err := cfg.GetKey("Key")
-key2, err := cfg.GetKey("KeY")
+key1, err := sec1.GetKey("Key")
+key2, err := sec2.GetKey("KeY")
```
#### MySQL-like boolean key
@@ -101,11 +101,33 @@ skip-name-resolve
By default, this is considered as missing value. But if you know you're going to deal with those cases, you can assign advanced load options:
```go
-cfg, err := LoadSources(LoadOptions{AllowBooleanKeys: true}, "my.cnf"))
+cfg, err := ini.LoadSources(ini.LoadOptions{AllowBooleanKeys: true}, "my.cnf"))
```
The value of those keys are always `true`, and when you save to a file, it will keep in the same foramt as you read.
+To generate such keys in your program, you could use `NewBooleanKey`:
+
+```go
+key, err := sec.NewBooleanKey("skip-host-cache")
+```
+
+#### Comment
+
+Take care that following format will be treated as comment:
+
+1. Line begins with `#` or `;`
+2. Words after `#` or `;`
+3. Words after section name (i.e words after `[some section name]`)
+
+If you want to save a value with `#` or `;`, please quote them with ``` ` ``` or ``` """ ```.
+
+Alternatively, you can use following `LoadOptions` to completely ignore inline comments:
+
+```go
+cfg, err := ini.LoadSources(ini.LoadOptions{IgnoreInlineComment: true}, "app.ini"))
+```
+
### Working with sections
To get a section, you would need to:
@@ -123,7 +145,7 @@ section, err := cfg.GetSection("")
When you're pretty sure the section exists, following code could make your life easier:
```go
-section := cfg.Section("")
+section := cfg.Section("section name")
```
What happens when the section somehow does not exist? Don't panic, it automatically creates and returns a new section to you.
@@ -307,6 +329,20 @@ foo = "some value" // foo: some value
bar = 'some value' // bar: some value
```
+Sometimes you downloaded file from [Crowdin](https://crowdin.com/) has values like the following (value is surrounded by double quotes and quotes in the value are escaped):
+
+```ini
+create_repo="created repository %s"
+```
+
+How do you transform this to regular format automatically?
+
+```go
+cfg, err := ini.LoadSources(ini.LoadOptions{UnescapeValueDoubleQuotes: true}, "en-US.ini"))
+cfg.Section("").Key("create_repo").String()
+// You got: created repository %s
+```
+
That's all? Hmm, no.
#### Helper methods of working with values
@@ -400,6 +436,12 @@ cfg.WriteTo(writer)
cfg.WriteToIndent(writer, "\t")
```
+By default, spaces are used to align "=" sign between key and values, to disable that:
+
+```go
+ini.PrettyFormat = false
+```
+
## Advanced Usage
### Recursive Values
@@ -447,6 +489,21 @@ cfg.Section("package.sub").Key("CLONE_URL").String() // https://gopkg.in/ini.v1
cfg.Section("package.sub").ParentKeys() // ["CLONE_URL"]
```
+### Unparseable Sections
+
+Sometimes, you have sections that do not contain key-value pairs but raw content, to handle such case, you can use `LoadOptions.UnparsableSections`:
+
+```go
+cfg, err := ini.LoadSources(ini.LoadOptions{UnparseableSections: []string{"COMMENTS"}}, `[COMMENTS]
+<1> This slide has the fuel listed in the wrong units `))
+
+body := cfg.Section("COMMENTS").Body()
+
+/* --- start ---
+<1> This slide has the fuel listed in the wrong units
+------ end --- */
+```
+
### Auto-increment Key Names
If key name is `-` in data source, then it would be seen as special syntax for auto-increment key name start from 1, and every section is independent on counter.
@@ -530,7 +587,7 @@ Why not?
```go
type Embeded struct {
- Dates []time.Time `delim:"|"`
+ Dates []time.Time `delim:"|" comment:"Time data"`
Places []string `ini:"places,omitempty"`
None []int `ini:",omitempty"`
}
@@ -538,10 +595,10 @@ type Embeded struct {
type Author struct {
Name string `ini:"NAME"`
Male bool
- Age int
+ Age int `comment:"Author's age"`
GPA float64
NeverMind string `ini:"-"`
- *Embeded
+ *Embeded `comment:"Embeded section"`
}
func main() {
@@ -562,10 +619,13 @@ So, what do I get?
```ini
NAME = Unknwon
Male = true
+; Author's age
Age = 21
GPA = 2.8
+; Embeded section
[Embeded]
+; Time data
Dates = 2015-08-07T22:14:22+08:00|2015-08-07T22:14:22+08:00
places = HangZhou,Boston
```
diff --git a/vendor/github.com/go-ini/ini/README_ZH.md b/vendor/github.com/go-ini/ini/README_ZH.md
index 2178e47895d..69aefef12e9 100644
--- a/vendor/github.com/go-ini/ini/README_ZH.md
+++ b/vendor/github.com/go-ini/ini/README_ZH.md
@@ -2,7 +2,7 @@
## 功能特性
-- 支持覆盖加载多个数据源(`[]byte` 或文件)
+- 支持覆盖加载多个数据源(`[]byte`、文件和 `io.ReadCloser`)
- 支持递归读取键值
- 支持读取父子分区
- 支持读取自增键名
@@ -37,10 +37,10 @@
### 从数据源加载
-一个 **数据源** 可以是 `[]byte` 类型的原始数据,或 `string` 类型的文件路径。您可以加载 **任意多个** 数据源。如果您传递其它类型的数据源,则会直接返回错误。
+一个 **数据源** 可以是 `[]byte` 类型的原始数据,`string` 类型的文件路径或 `io.ReadCloser`。您可以加载 **任意多个** 数据源。如果您传递其它类型的数据源,则会直接返回错误。
```go
-cfg, err := ini.Load([]byte("raw data"), "filename")
+cfg, err := ini.Load([]byte("raw data"), "filename", ioutil.NopCloser(bytes.NewReader([]byte("some other data"))))
```
或者从一个空白的文件开始:
@@ -76,8 +76,8 @@ sec1, err := cfg.GetSection("Section")
sec2, err := cfg.GetSection("SecTIOn")
// key1 和 key2 指向同一个键对象
-key1, err := cfg.GetKey("Key")
-key2, err := cfg.GetKey("KeY")
+key1, err := sec1.GetKey("Key")
+key2, err := sec2.GetKey("KeY")
```
#### 类似 MySQL 配置中的布尔值键
@@ -94,11 +94,33 @@ skip-name-resolve
默认情况下这被认为是缺失值而无法完成解析,但可以通过高级的加载选项对它们进行处理:
```go
-cfg, err := LoadSources(LoadOptions{AllowBooleanKeys: true}, "my.cnf"))
+cfg, err := ini.LoadSources(ini.LoadOptions{AllowBooleanKeys: true}, "my.cnf"))
```
这些键的值永远为 `true`,且在保存到文件时也只会输出键名。
+如果您想要通过程序来生成此类键,则可以使用 `NewBooleanKey`:
+
+```go
+key, err := sec.NewBooleanKey("skip-host-cache")
+```
+
+#### 关于注释
+
+下述几种情况的内容将被视为注释:
+
+1. 所有以 `#` 或 `;` 开头的行
+2. 所有在 `#` 或 `;` 之后的内容
+3. 分区标签后的文字 (即 `[分区名]` 之后的内容)
+
+如果你希望使用包含 `#` 或 `;` 的值,请使用 ``` ` ``` 或 ``` """ ``` 进行包覆。
+
+除此之外,您还可以通过 `LoadOptions` 完全忽略行内注释:
+
+```go
+cfg, err := ini.LoadSources(ini.LoadOptions{IgnoreInlineComment: true}, "app.ini"))
+```
+
### 操作分区(Section)
获取指定分区:
@@ -116,7 +138,7 @@ section, err := cfg.GetSection("")
当您非常确定某个分区是存在的,可以使用以下简便方法:
```go
-section := cfg.Section("")
+section := cfg.Section("section name")
```
如果不小心判断错了,要获取的分区其实是不存在的,那会发生什么呢?没事的,它会自动创建并返回一个对应的分区对象给您。
@@ -300,6 +322,20 @@ foo = "some value" // foo: some value
bar = 'some value' // bar: some value
```
+有时您会获得像从 [Crowdin](https://crowdin.com/) 网站下载的文件那样具有特殊格式的值(值使用双引号括起来,内部的双引号被转义):
+
+```ini
+create_repo="创建了仓库 %s"
+```
+
+那么,怎么自动地将这类值进行处理呢?
+
+```go
+cfg, err := ini.LoadSources(ini.LoadOptions{UnescapeValueDoubleQuotes: true}, "en-US.ini"))
+cfg.Section("").Key("create_repo").String()
+// You got: 创建了仓库 %s
+```
+
这就是全部了?哈哈,当然不是。
#### 操作键值的辅助方法
@@ -393,9 +429,15 @@ cfg.WriteTo(writer)
cfg.WriteToIndent(writer, "\t")
```
-### 高级用法
+默认情况下,空格将被用于对齐键值之间的等号以美化输出结果,以下代码可以禁用该功能:
-#### 递归读取键值
+```go
+ini.PrettyFormat = false
+```
+
+## 高级用法
+
+### 递归读取键值
在获取所有键值的过程中,特殊语法 `%()s` 会被应用,其中 `` 可以是相同分区或者默认分区下的键名。字符串 `%()s` 会被相应的键值所替代,如果指定的键不存在,则会用空字符串替代。您可以最多使用 99 层的递归嵌套。
@@ -415,7 +457,7 @@ cfg.Section("author").Key("GITHUB").String() // https://github.com/Unknwon
cfg.Section("package").Key("FULL_NAME").String() // github.com/go-ini/ini
```
-#### 读取父子分区
+### 读取父子分区
您可以在分区名称中使用 `.` 来表示两个或多个分区之间的父子关系。如果某个键在子分区中不存在,则会去它的父分区中再次寻找,直到没有父分区为止。
@@ -440,7 +482,22 @@ cfg.Section("package.sub").Key("CLONE_URL").String() // https://gopkg.in/ini.v1
cfg.Section("package.sub").ParentKeys() // ["CLONE_URL"]
```
-#### 读取自增键名
+### 无法解析的分区
+
+如果遇到一些比较特殊的分区,它们不包含常见的键值对,而是没有固定格式的纯文本,则可以使用 `LoadOptions.UnparsableSections` 进行处理:
+
+```go
+cfg, err := LoadSources(ini.LoadOptions{UnparseableSections: []string{"COMMENTS"}}, `[COMMENTS]
+<1> This slide has the fuel listed in the wrong units `))
+
+body := cfg.Section("COMMENTS").Body()
+
+/* --- start ---
+<1> This slide has the fuel listed in the wrong units
+------ end --- */
+```
+
+### 读取自增键名
如果数据源中的键名为 `-`,则认为该键使用了自增键名的特殊语法。计数器从 1 开始,并且分区之间是相互独立的。
@@ -521,7 +578,7 @@ p := &Person{
```go
type Embeded struct {
- Dates []time.Time `delim:"|"`
+ Dates []time.Time `delim:"|" comment:"Time data"`
Places []string `ini:"places,omitempty"`
None []int `ini:",omitempty"`
}
@@ -529,10 +586,10 @@ type Embeded struct {
type Author struct {
Name string `ini:"NAME"`
Male bool
- Age int
+ Age int `comment:"Author's age"`
GPA float64
NeverMind string `ini:"-"`
- *Embeded
+ *Embeded `comment:"Embeded section"`
}
func main() {
@@ -553,10 +610,13 @@ func main() {
```ini
NAME = Unknwon
Male = true
+; Author's age
Age = 21
GPA = 2.8
+; Embeded section
[Embeded]
+; Time data
Dates = 2015-08-07T22:14:22+08:00|2015-08-07T22:14:22+08:00
places = HangZhou,Boston
```
diff --git a/vendor/github.com/go-ini/ini/file.go b/vendor/github.com/go-ini/ini/file.go
new file mode 100644
index 00000000000..ce26c3b3157
--- /dev/null
+++ b/vendor/github.com/go-ini/ini/file.go
@@ -0,0 +1,398 @@
+// 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 a or more INI file(s) 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
+ // 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 {
+ return &File{
+ BlockMode: true,
+ dataSources: dataSources,
+ sections: make(map[string]*Section),
+ sectionList: make([]string, 0, 10),
+ options: opts,
+ }
+}
+
+// Empty returns an empty file object.
+func Empty() *File {
+ // Ignore error here, we sure our data is good.
+ f, _ := Load([]byte(""))
+ return f
+}
+
+// NewSection creates a new section.
+func (f *File) NewSection(name string) (*Section, error) {
+ if len(name) == 0 {
+ return nil, errors.New("error creating new section: empty section name")
+ } else if f.options.Insensitive && name != DEFAULT_SECTION {
+ name = strings.ToLower(name)
+ }
+
+ if f.BlockMode {
+ f.lock.Lock()
+ defer f.lock.Unlock()
+ }
+
+ if inSlice(name, f.sectionList) {
+ return f.sections[name], nil
+ }
+
+ f.sectionList = append(f.sectionList, name)
+ f.sections[name] = newSection(f, name)
+ return f.sections[name], 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) {
+ if len(name) == 0 {
+ name = DEFAULT_SECTION
+ }
+ if f.options.Insensitive {
+ name = strings.ToLower(name)
+ }
+
+ if f.BlockMode {
+ f.lock.RLock()
+ defer f.lock.RUnlock()
+ }
+
+ sec := f.sections[name]
+ if sec == nil {
+ return nil, fmt.Errorf("section '%s' does not exist", name)
+ }
+ return sec, 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 {
+ // 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.
+ sec, _ = f.NewSection(name)
+ return sec
+ }
+ return sec
+}
+
+// Section returns list of Section.
+func (f *File) Sections() []*Section {
+ sections := make([]*Section, len(f.sectionList))
+ for i := range f.sectionList {
+ sections[i] = f.Section(f.sectionList[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.
+func (f *File) DeleteSection(name string) {
+ if f.BlockMode {
+ f.lock.Lock()
+ defer f.lock.Unlock()
+ }
+
+ if len(name) == 0 {
+ name = DEFAULT_SECTION
+ }
+
+ for i, s := range f.sectionList {
+ if s == name {
+ f.sectionList = append(f.sectionList[:i], f.sectionList[i+1:]...)
+ delete(f.sections, name)
+ return
+ }
+ }
+}
+
+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
+ }
+ }
+ 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 := "="
+ if PrettyFormat {
+ equalSign = " = "
+ }
+
+ // Use buffer to make sure target is safe until finish encoding.
+ buf := bytes.NewBuffer(nil)
+ for i, sname := range f.sectionList {
+ sec := f.Section(sname)
+ if len(sec.Comment) > 0 {
+ if sec.Comment[0] != '#' && sec.Comment[0] != ';' {
+ sec.Comment = "; " + sec.Comment
+ } else {
+ sec.Comment = sec.Comment[:1] + " " + strings.TrimSpace(sec.Comment[1:])
+ }
+ if _, err := buf.WriteString(sec.Comment + LineBreak); err != nil {
+ return nil, err
+ }
+ }
+
+ if i > 0 || DefaultHeader {
+ 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
+ }
+ }
+
+ if sec.isRawSection {
+ if _, err := buf.WriteString(sec.rawBody); err != nil {
+ return nil, err
+ }
+
+ if PrettySection {
+ // 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 modifed 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.ContainsAny(kname, "\"=:") {
+ keyLength += 2
+ } else if strings.Contains(kname, "`") {
+ keyLength += 6
+ }
+
+ if keyLength > alignLength {
+ alignLength = keyLength
+ }
+ }
+ }
+ alignSpaces := bytes.Repeat([]byte(" "), alignLength)
+
+ KEY_LIST:
+ for _, kname := range sec.keyList {
+ key := sec.Key(kname)
+ if len(key.Comment) > 0 {
+ if len(indent) > 0 && sname != DEFAULT_SECTION {
+ buf.WriteString(indent)
+ }
+ if key.Comment[0] != '#' && key.Comment[0] != ';' {
+ key.Comment = "; " + key.Comment
+ } else {
+ key.Comment = key.Comment[:1] + " " + strings.TrimSpace(key.Comment[1:])
+ }
+ if _, err := buf.WriteString(key.Comment + LineBreak); err != nil {
+ return nil, err
+ }
+ }
+
+ if len(indent) > 0 && sname != DEFAULT_SECTION {
+ buf.WriteString(indent)
+ }
+
+ switch {
+ case key.isAutoIncrement:
+ kname = "-"
+ case strings.ContainsAny(kname, "\"=:"):
+ kname = "`" + kname + "`"
+ case strings.Contains(kname, "`"):
+ kname = `"""` + kname + `"""`
+ }
+
+ for _, val := range key.ValueWithShadows() {
+ if _, err := buf.WriteString(kname); err != nil {
+ return nil, err
+ }
+
+ if key.isBooleanType {
+ if kname != sec.keyList[len(sec.keyList)-1] {
+ buf.WriteString(LineBreak)
+ }
+ continue KEY_LIST
+ }
+
+ // 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 + "`"
+ }
+ if _, err := buf.WriteString(equalSign + val + LineBreak); err != nil {
+ return nil, err
+ }
+ }
+
+ for _, val := range key.nestedValues {
+ if _, err := buf.WriteString(indent + " " + val + LineBreak); err != nil {
+ return nil, err
+ }
+ }
+ }
+
+ if PrettySection {
+ // 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 afte 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/github.com/go-ini/ini/ini.go b/vendor/github.com/go-ini/ini/ini.go
index cd065e7822b..535d3588a78 100644
--- a/vendor/github.com/go-ini/ini/ini.go
+++ b/vendor/github.com/go-ini/ini/ini.go
@@ -17,16 +17,12 @@ package ini
import (
"bytes"
- "errors"
"fmt"
"io"
+ "io/ioutil"
"os"
"regexp"
"runtime"
- "strconv"
- "strings"
- "sync"
- "time"
)
const (
@@ -36,7 +32,7 @@ const (
// Maximum allowed depth when recursively substituing variable names.
_DEPTH_VALUES = 99
- _VERSION = "1.21.1"
+ _VERSION = "1.32.0"
)
// Version returns current package version literal.
@@ -59,6 +55,9 @@ var (
// Explicitly write DEFAULT section header
DefaultHeader = false
+
+ // Indicate whether to put a line between sections
+ PrettySection = true
)
func init() {
@@ -90,57 +89,22 @@ func (s sourceFile) ReadCloser() (_ io.ReadCloser, err error) {
return os.Open(s.name)
}
-type bytesReadCloser struct {
- reader io.Reader
-}
-
-func (rc *bytesReadCloser) Read(p []byte) (n int, err error) {
- return rc.reader.Read(p)
-}
-
-func (rc *bytesReadCloser) Close() error {
- return nil
-}
-
// sourceData represents an object that contains content in memory.
type sourceData struct {
data []byte
}
func (s *sourceData) ReadCloser() (io.ReadCloser, error) {
- return &bytesReadCloser{bytes.NewReader(s.data)}, nil
+ return ioutil.NopCloser(bytes.NewReader(s.data)), nil
}
-// File represents a combination of a or more INI file(s) in memory.
-type File struct {
- // Should make things safe, but sometimes doesn't matter.
- BlockMode bool
- // Make sure data is safe in multiple goroutines.
- lock sync.RWMutex
-
- // Allow combination of multiple data sources.
- dataSources []dataSource
- // Actual data is stored here.
- sections map[string]*Section
-
- // To keep data in order.
- sectionList []string
-
- options LoadOptions
-
- NameMapper
- ValueMapper
+// sourceReadCloser represents an input stream with Close method.
+type sourceReadCloser struct {
+ reader io.ReadCloser
}
-// newFile initializes File object with given data sources.
-func newFile(dataSources []dataSource, opts LoadOptions) *File {
- return &File{
- BlockMode: true,
- dataSources: dataSources,
- sections: make(map[string]*Section),
- sectionList: make([]string, 0, 10),
- options: opts,
- }
+func (s *sourceReadCloser) ReadCloser() (io.ReadCloser, error) {
+ return s.reader, nil
}
func parseDataSource(source interface{}) (dataSource, error) {
@@ -149,6 +113,8 @@ func parseDataSource(source interface{}) (dataSource, error) {
return sourceFile{s}, nil
case []byte:
return &sourceData{s}, nil
+ case io.ReadCloser:
+ return &sourceReadCloser{s}, nil
default:
return nil, fmt.Errorf("error parsing data source: unknown type '%s'", s)
}
@@ -161,9 +127,26 @@ type LoadOptions struct {
Insensitive 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
// 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
+ // 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
+ // Some INI formats allow group blocks that store a block of raw content that doesn't otherwise
+ // conform to key/value pairs. Specify the names of those blocks here.
+ UnparseableSections []string
}
func LoadSources(opts LoadOptions, source interface{}, others ...interface{}) (_ *File, err error) {
@@ -204,298 +187,8 @@ func InsensitiveLoad(source interface{}, others ...interface{}) (*File, error) {
return LoadSources(LoadOptions{Insensitive: true}, source, others...)
}
-// Empty returns an empty file object.
-func Empty() *File {
- // Ignore error here, we sure our data is good.
- f, _ := Load([]byte(""))
- return f
-}
-
-// NewSection creates a new section.
-func (f *File) NewSection(name string) (*Section, error) {
- if len(name) == 0 {
- return nil, errors.New("error creating new section: empty section name")
- } else if f.options.Insensitive && name != DEFAULT_SECTION {
- name = strings.ToLower(name)
- }
-
- if f.BlockMode {
- f.lock.Lock()
- defer f.lock.Unlock()
- }
-
- if inSlice(name, f.sectionList) {
- return f.sections[name], nil
- }
-
- f.sectionList = append(f.sectionList, name)
- f.sections[name] = newSection(f, name)
- return f.sections[name], 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) {
- if len(name) == 0 {
- name = DEFAULT_SECTION
- } else if f.options.Insensitive {
- name = strings.ToLower(name)
- }
-
- if f.BlockMode {
- f.lock.RLock()
- defer f.lock.RUnlock()
- }
-
- sec := f.sections[name]
- if sec == nil {
- return nil, fmt.Errorf("section '%s' does not exist", name)
- }
- return sec, 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 {
- // 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.
- sec, _ = f.NewSection(name)
- return sec
- }
- return sec
-}
-
-// Section returns list of Section.
-func (f *File) Sections() []*Section {
- sections := make([]*Section, len(f.sectionList))
- for i := range f.sectionList {
- sections[i] = f.Section(f.sectionList[i])
- }
- return sections
-}
-
-// 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.
-func (f *File) DeleteSection(name string) {
- if f.BlockMode {
- f.lock.Lock()
- defer f.lock.Unlock()
- }
-
- if len(name) == 0 {
- name = DEFAULT_SECTION
- }
-
- for i, s := range f.sectionList {
- if s == name {
- f.sectionList = append(f.sectionList[:i], f.sectionList[i+1:]...)
- delete(f.sections, name)
- return
- }
- }
-}
-
-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
- }
- }
- 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()
-}
-
-// 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) (n int64, err error) {
- equalSign := "="
- if PrettyFormat {
- equalSign = " = "
- }
-
- // Use buffer to make sure target is safe until finish encoding.
- buf := bytes.NewBuffer(nil)
- for i, sname := range f.sectionList {
- sec := f.Section(sname)
- if len(sec.Comment) > 0 {
- if sec.Comment[0] != '#' && sec.Comment[0] != ';' {
- sec.Comment = "; " + sec.Comment
- }
- if _, err = buf.WriteString(sec.Comment + LineBreak); err != nil {
- return 0, err
- }
- }
-
- if i > 0 || DefaultHeader {
- if _, err = buf.WriteString("[" + sname + "]" + LineBreak); err != nil {
- return 0, err
- }
- } else {
- // Write nothing if default section is empty
- if len(sec.keyList) == 0 {
- continue
- }
- }
-
- // Count and generate alignment length and buffer spaces using the
- // longest key. Keys may be modifed 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.ContainsAny(kname, "\"=:") {
- keyLength += 2
- } else if strings.Contains(kname, "`") {
- keyLength += 6
- }
-
- if keyLength > alignLength {
- alignLength = keyLength
- }
- }
- }
- alignSpaces := bytes.Repeat([]byte(" "), alignLength)
-
- for _, kname := range sec.keyList {
- key := sec.Key(kname)
- if len(key.Comment) > 0 {
- if len(indent) > 0 && sname != DEFAULT_SECTION {
- buf.WriteString(indent)
- }
- if key.Comment[0] != '#' && key.Comment[0] != ';' {
- key.Comment = "; " + key.Comment
- }
- if _, err = buf.WriteString(key.Comment + LineBreak); err != nil {
- return 0, err
- }
- }
-
- if len(indent) > 0 && sname != DEFAULT_SECTION {
- buf.WriteString(indent)
- }
-
- switch {
- case key.isAutoIncrement:
- kname = "-"
- case strings.ContainsAny(kname, "\"=:"):
- kname = "`" + kname + "`"
- case strings.Contains(kname, "`"):
- kname = `"""` + kname + `"""`
- }
- if _, err = buf.WriteString(kname); err != nil {
- return 0, err
- }
-
- if key.isBooleanType {
- continue
- }
-
- // Write out alignment spaces before "=" sign
- if PrettyFormat {
- buf.Write(alignSpaces[:alignLength-len(kname)])
- }
-
- val := key.value
- // In case key value contains "\n", "`", "\"", "#" or ";"
- if strings.ContainsAny(val, "\n`") {
- val = `"""` + val + `"""`
- } else if strings.ContainsAny(val, "#;") {
- val = "`" + val + "`"
- }
- if _, err = buf.WriteString(equalSign + val + LineBreak); err != nil {
- return 0, err
- }
- }
-
- // Put a line between sections
- if _, err = buf.WriteString(LineBreak); 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 afte done.
- tmpPath := filename + "." + strconv.Itoa(time.Now().Nanosecond()) + ".tmp"
- defer os.Remove(tmpPath)
-
- fw, err := os.Create(tmpPath)
- if err != nil {
- return err
- }
-
- if _, err = f.WriteToIndent(fw, indent); err != nil {
- fw.Close()
- return err
- }
- fw.Close()
-
- // Remove old file and rename the new one.
- os.Remove(filename)
- return os.Rename(tmpPath, filename)
-}
-
-// SaveTo writes content to file system.
-func (f *File) SaveTo(filename string) error {
- return f.SaveToIndent(filename, "")
+// InsensitiveLoad 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/github.com/go-ini/ini/key.go b/vendor/github.com/go-ini/ini/key.go
index 9738c55a21b..7c8566a1b4c 100644
--- a/vendor/github.com/go-ini/ini/key.go
+++ b/vendor/github.com/go-ini/ini/key.go
@@ -15,6 +15,8 @@
package ini
import (
+ "bytes"
+ "errors"
"fmt"
"strconv"
"strings"
@@ -24,12 +26,62 @@ import (
// Key represents a key under a section.
type Key struct {
s *Section
+ Comment string
name string
value string
isAutoIncrement bool
isBooleanType bool
- Comment string
+ 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")
+ }
+
+ 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
+}
+
+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
@@ -45,16 +97,35 @@ func (k *Key) Value() string {
return k.value
}
-// String returns string representation of value.
-func (k *Key) String() string {
- val := k.value
+// ValueWithShadows returns raw values of key and its shadows if any.
+func (k *Key) ValueWithShadows() []string {
+ if len(k.shadows) == 0 {
+ return []string{k.value}
+ }
+ vals := make([]string, len(k.shadows)+1)
+ vals[0] = k.value
+ for i := range k.shadows {
+ vals[i+1] = k.shadows[i].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)
}
- if strings.Index(val, "%") == -1 {
+
+ // Fail-fast if no indicate char found for recursive value
+ if !strings.Contains(val, "%") {
return val
}
-
for i := 0; i < _DEPTH_VALUES; i++ {
vr := varPattern.FindString(val)
if len(vr) == 0 {
@@ -67,7 +138,7 @@ func (k *Key) String() string {
// Search in the same section.
nk, err := k.s.GetKey(noption)
- if err != nil {
+ if err != nil || k == nk {
// Search again in default section.
nk, _ = k.s.f.Section("").GetKey(noption)
}
@@ -78,6 +149,11 @@ func (k *Key) String() string {
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 {
@@ -392,47 +468,95 @@ func (k *Key) Strings(delim string) []string {
return []string{}
}
- vals := strings.Split(str, delim)
- for i := range vals {
- vals[i] = strings.TrimSpace(vals[i])
+ 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 += 1
+ 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.getFloat64s(delim, true, false)
+ 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.getInts(delim, true, false)
+ 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.getInt64s(delim, true, false)
+ 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.getUints(delim, true, false)
+ 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.getUint64s(delim, true, false)
+ vals, _ := k.parseUint64s(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.getTimesFormat(format, delim, true, false)
+ vals, _ := k.parseTimesFormat(format, k.Strings(delim), true, false)
return vals
}
@@ -445,41 +569,41 @@ func (k *Key) Times(delim string) []time.Time {
// 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.getFloat64s(delim, false, false)
+ 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.getInts(delim, false, false)
+ 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.getInt64s(delim, false, false)
+ 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.getUints(delim, false, false)
+ 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.getUint64s(delim, false, false)
+ vals, _ := k.parseUint64s(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.getTimesFormat(format, delim, false, false)
+ vals, _ := k.parseTimesFormat(format, k.Strings(delim), false, false)
return vals
}
@@ -490,33 +614,33 @@ func (k *Key) ValidTimes(delim string) []time.Time {
// 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.getFloat64s(delim, false, true)
+ 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.getInts(delim, false, true)
+ 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.getInt64s(delim, false, true)
+ 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.getUints(delim, false, true)
+ 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.getUint64s(delim, false, true)
+ return k.parseUint64s(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.getTimesFormat(format, delim, false, true)
+ return k.parseTimesFormat(format, k.Strings(delim), false, true)
}
// StrictTimes parses with RFC3339 format and returns list of time.Time divided by given delimiter
@@ -525,9 +649,8 @@ func (k *Key) StrictTimes(delim string) ([]time.Time, error) {
return k.StrictTimesFormat(time.RFC3339, delim)
}
-// getFloat64s returns list of float64 divided by given delimiter.
-func (k *Key) getFloat64s(delim string, addInvalid, returnOnInvalid bool) ([]float64, error) {
- strs := k.Strings(delim)
+// parseFloat64s transforms strings to float64s.
+func (k *Key) parseFloat64s(strs []string, addInvalid, returnOnInvalid bool) ([]float64, error) {
vals := make([]float64, 0, len(strs))
for _, str := range strs {
val, err := strconv.ParseFloat(str, 64)
@@ -541,9 +664,8 @@ func (k *Key) getFloat64s(delim string, addInvalid, returnOnInvalid bool) ([]flo
return vals, nil
}
-// getInts returns list of int divided by given delimiter.
-func (k *Key) getInts(delim string, addInvalid, returnOnInvalid bool) ([]int, error) {
- strs := k.Strings(delim)
+// parseInts transforms strings to ints.
+func (k *Key) parseInts(strs []string, addInvalid, returnOnInvalid bool) ([]int, error) {
vals := make([]int, 0, len(strs))
for _, str := range strs {
val, err := strconv.Atoi(str)
@@ -557,9 +679,8 @@ func (k *Key) getInts(delim string, addInvalid, returnOnInvalid bool) ([]int, er
return vals, nil
}
-// getInt64s returns list of int64 divided by given delimiter.
-func (k *Key) getInt64s(delim string, addInvalid, returnOnInvalid bool) ([]int64, error) {
- strs := k.Strings(delim)
+// parseInt64s transforms strings to int64s.
+func (k *Key) parseInt64s(strs []string, addInvalid, returnOnInvalid bool) ([]int64, error) {
vals := make([]int64, 0, len(strs))
for _, str := range strs {
val, err := strconv.ParseInt(str, 10, 64)
@@ -573,9 +694,8 @@ func (k *Key) getInt64s(delim string, addInvalid, returnOnInvalid bool) ([]int64
return vals, nil
}
-// getUints returns list of uint divided by given delimiter.
-func (k *Key) getUints(delim string, addInvalid, returnOnInvalid bool) ([]uint, error) {
- strs := k.Strings(delim)
+// parseUints transforms strings to uints.
+func (k *Key) parseUints(strs []string, addInvalid, returnOnInvalid bool) ([]uint, error) {
vals := make([]uint, 0, len(strs))
for _, str := range strs {
val, err := strconv.ParseUint(str, 10, 0)
@@ -589,9 +709,8 @@ func (k *Key) getUints(delim string, addInvalid, returnOnInvalid bool) ([]uint,
return vals, nil
}
-// getUint64s returns list of uint64 divided by given delimiter.
-func (k *Key) getUint64s(delim string, addInvalid, returnOnInvalid bool) ([]uint64, error) {
- strs := k.Strings(delim)
+// parseUint64s transforms strings to uint64s.
+func (k *Key) parseUint64s(strs []string, addInvalid, returnOnInvalid bool) ([]uint64, error) {
vals := make([]uint64, 0, len(strs))
for _, str := range strs {
val, err := strconv.ParseUint(str, 10, 64)
@@ -605,9 +724,8 @@ func (k *Key) getUint64s(delim string, addInvalid, returnOnInvalid bool) ([]uint
return vals, nil
}
-// getTimesFormat parses with given format and returns list of time.Time divided by given delimiter.
-func (k *Key) getTimesFormat(format, delim string, addInvalid, returnOnInvalid bool) ([]time.Time, error) {
- strs := k.Strings(delim)
+// 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))
for _, str := range strs {
val, err := time.Parse(format, str)
diff --git a/vendor/github.com/go-ini/ini/parser.go b/vendor/github.com/go-ini/ini/parser.go
index dc6df87a6c3..db3af8f0044 100644
--- a/vendor/github.com/go-ini/ini/parser.go
+++ b/vendor/github.com/go-ini/ini/parser.go
@@ -48,16 +48,31 @@ func newParser(r io.Reader) *parser {
}
}
-// BOM handles header of BOM-UTF8 format.
+// 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(3)
+ mask, err := p.buf.Peek(2)
if err != nil && err != io.EOF {
return err
- } else if len(mask) < 3 {
+ } else if len(mask) < 2 {
return nil
- } else if mask[0] == 239 && mask[1] == 187 && mask[2] == 191 {
+ }
+
+ switch {
+ case mask[0] == 254 && mask[1] == 255:
+ fallthrough
+ case mask[0] == 255 && mask[1] == 254:
p.buf.Read(mask)
+ 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 {
+ p.buf.Read(mask)
+ }
}
return nil
}
@@ -174,11 +189,13 @@ func (p *parser) readContinuationLines(val string) (string, error) {
// 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 &&
+ 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, ignoreContinuation bool) (string, error) {
+func (p *parser) readValue(in []byte,
+ ignoreContinuation, ignoreInlineComment, unescapeValueDoubleQuotes, unescapeValueCommentSymbols bool) (string, error) {
+
line := strings.TrimLeftFunc(string(in), unicode.IsSpace)
if len(line) == 0 {
return "", nil
@@ -189,6 +206,8 @@ func (p *parser) readValue(in []byte, ignoreContinuation bool) (string, error) {
valQuote = `"""`
} else if line[0] == '`' {
valQuote = "`"
+ } else if unescapeValueDoubleQuotes && line[0] == '"' {
+ valQuote = `"`
}
if len(valQuote) > 0 {
@@ -199,27 +218,40 @@ func (p *parser) readValue(in []byte, ignoreContinuation bool) (string, error) {
return p.readMultilines(line, line[startIdx:], valQuote)
}
+ if unescapeValueDoubleQuotes && valQuote == `"` {
+ return strings.Replace(line[startIdx:pos+startIdx], `\"`, `"`, -1), nil
+ }
return line[startIdx : pos+startIdx], nil
}
- // Won't be able to reach here if value only contains whitespace.
+ // Won't be able to reach here if value only contains whitespace
line = strings.TrimSpace(line)
- // Check continuation lines when desired.
+ // Check continuation lines when desired
if !ignoreContinuation && line[len(line)-1] == '\\' {
return p.readContinuationLines(line[:len(line)-1])
}
- i := strings.IndexAny(line, "#;")
- if i > -1 {
- p.comment.WriteString(line[i:])
- line = strings.TrimSpace(line[:i])
+ // Check if ignore inline comment
+ if !ignoreInlineComment {
+ i := strings.IndexAny(line, "#;")
+ if i > -1 {
+ p.comment.WriteString(line[i:])
+ line = strings.TrimSpace(line[:i])
+ }
}
- // Trim single quotes
+ // Trim single and double quotes
if hasSurroundedQuote(line, '\'') ||
hasSurroundedQuote(line, '"') {
line = line[1 : len(line)-1]
+ } else if len(valQuote) == 0 && unescapeValueCommentSymbols {
+ if strings.Contains(line, `\;`) {
+ line = strings.Replace(line, `\;`, ";", -1)
+ }
+ if strings.Contains(line, `\#`) {
+ line = strings.Replace(line, `\#`, "#", -1)
+ }
}
return line, nil
}
@@ -232,15 +264,32 @@ func (f *File) parse(reader io.Reader) (err error) {
}
// Ignore error because default section name is never empty string.
- section, _ := f.NewSection(DEFAULT_SECTION)
+ name := DEFAULT_SECTION
+ if f.options.Insensitive {
+ name = strings.ToLower(DEFAULT_SECTION)
+ }
+ 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
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' {
+ lastRegularKey.addNestedValue(string(bytes.TrimSpace(line)))
+ continue
+ }
+ }
+
line = bytes.TrimLeftFunc(line, unicode.IsSpace)
if len(line) == 0 {
continue
@@ -280,6 +329,21 @@ func (f *File) parse(reader io.Reader) (err error) {
// Reset aotu-counter and comments
p.comment.Reset()
p.count = 1
+
+ inUnparseableSection = false
+ for i := range f.options.UnparseableSections {
+ if f.options.UnparseableSections[i] == name ||
+ (f.options.Insensitive && strings.ToLower(f.options.UnparseableSections[i]) == strings.ToLower(name)) {
+ inUnparseableSection = true
+ continue
+ }
+ }
+ continue
+ }
+
+ if inUnparseableSection {
+ section.isRawSection = true
+ section.rawBody += string(line)
continue
}
@@ -287,11 +351,18 @@ func (f *File) parse(reader io.Reader) (err error) {
if err != nil {
// Treat as boolean key when desired, and whole line is key name.
if IsErrDelimiterNotFound(err) && f.options.AllowBooleanKeys {
- key, err := section.NewKey(string(line), "true")
+ kname, err := p.readValue(line,
+ f.options.IgnoreContinuation,
+ f.options.IgnoreInlineComment,
+ f.options.UnescapeValueDoubleQuotes,
+ f.options.UnescapeValueCommentSymbols)
+ if err != nil {
+ return err
+ }
+ key, err := section.NewBooleanKey(kname)
if err != nil {
return err
}
- key.isBooleanType = true
key.Comment = strings.TrimSpace(p.comment.String())
p.comment.Reset()
continue
@@ -307,19 +378,24 @@ func (f *File) parse(reader io.Reader) (err error) {
p.count++
}
- key, err := section.NewKey(kname, "")
+ value, err := p.readValue(line[offset:],
+ f.options.IgnoreContinuation,
+ f.options.IgnoreInlineComment,
+ f.options.UnescapeValueDoubleQuotes,
+ f.options.UnescapeValueCommentSymbols)
+ if err != nil {
+ return err
+ }
+ isLastValueEmpty = len(value) == 0
+
+ key, err := section.NewKey(kname, value)
if err != nil {
return err
}
key.isAutoIncrement = isAutoIncr
-
- value, err := p.readValue(line[offset:], f.options.IgnoreContinuation)
- if err != nil {
- return err
- }
- key.SetValue(value)
key.Comment = strings.TrimSpace(p.comment.String())
p.comment.Reset()
+ lastRegularKey = key
}
return nil
}
diff --git a/vendor/github.com/go-ini/ini/section.go b/vendor/github.com/go-ini/ini/section.go
index bbb73caf8cc..d8a40261920 100644
--- a/vendor/github.com/go-ini/ini/section.go
+++ b/vendor/github.com/go-ini/ini/section.go
@@ -28,10 +28,19 @@ type Section struct {
keys map[string]*Key
keyList []string
keysHash map[string]string
+
+ isRawSection bool
+ rawBody string
}
func newSection(f *File, name string) *Section {
- return &Section{f, "", name, make(map[string]*Key), make([]string, 0, 10), make(map[string]string)}
+ 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.
@@ -39,6 +48,20 @@ 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 {
@@ -53,20 +76,33 @@ func (s *Section) NewKey(name, val string) (*Key, error) {
}
if inSlice(name, s.keyList) {
- s.keys[name].value = val
+ if s.f.options.AllowShadows {
+ if err := s.keys[name].addShadow(val); err != nil {
+ return nil, err
+ }
+ } else {
+ s.keys[name].value = val
+ }
return s.keys[name], nil
}
s.keyList = append(s.keyList, name)
- s.keys[name] = &Key{
- s: s,
- name: name,
- value: val,
- }
+ 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) {
// FIXME: change to section level lock?
@@ -108,6 +144,7 @@ func (s *Section) HasKey(name string) bool {
}
// Haskey is a backwards-compatible name for HasKey.
+// TODO: delete me in v2
func (s *Section) Haskey(name string) bool {
return s.HasKey(name)
}
@@ -204,3 +241,17 @@ func (s *Section) DeleteKey(name string) {
}
}
}
+
+// 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 + "."
+ 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/github.com/go-ini/ini/struct.go b/vendor/github.com/go-ini/ini/struct.go
index d00fb4b8373..9719dc6985a 100644
--- a/vendor/github.com/go-ini/ini/struct.go
+++ b/vendor/github.com/go-ini/ini/struct.go
@@ -78,34 +78,44 @@ func parseDelim(actual string) string {
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) error {
- strs := key.Strings(delim)
+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 = key.Ints(delim)
+ vals, err = key.parseInts(strs, true, false)
case reflect.Int64:
- vals = key.Int64s(delim)
+ vals, err = key.parseInt64s(strs, true, false)
case reflect.Uint:
- vals = key.Uints(delim)
+ vals, err = key.parseUints(strs, true, false)
case reflect.Uint64:
- vals = key.Uint64s(delim)
+ vals, err = key.parseUint64s(strs, true, false)
case reflect.Float64:
- vals = key.Float64s(delim)
+ vals, err = key.parseFloat64s(strs, true, false)
case reflectTime:
- vals = key.Times(delim)
+ 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++ {
@@ -130,10 +140,17 @@ func setSliceWithProperType(key *Key, field reflect.Value, delim string) error {
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 strcut.
-func setWithProperType(t reflect.Type, key *Key, field reflect.Value, delim string) error {
+func setWithProperType(t reflect.Type, key *Key, field reflect.Value, delim string, allowShadow, isStrict bool) error {
switch t.Kind() {
case reflect.String:
if len(key.String()) == 0 {
@@ -143,20 +160,20 @@ func setWithProperType(t reflect.Type, key *Key, field reflect.Value, delim stri
case reflect.Bool:
boolVal, err := key.Bool()
if err != nil {
- return nil
+ return wrapStrictError(err, isStrict)
}
field.SetBool(boolVal)
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
durationVal, err := key.Duration()
// Skip zero value
- if err == nil && int(durationVal) > 0 {
+ if err == nil && int64(durationVal) > 0 {
field.Set(reflect.ValueOf(durationVal))
return nil
}
intVal, err := key.Int64()
- if err != nil || intVal == 0 {
- return nil
+ if err != nil {
+ return wrapStrictError(err, isStrict)
}
field.SetInt(intVal)
// byte is an alias for uint8, so supporting uint8 breaks support for byte
@@ -170,31 +187,43 @@ func setWithProperType(t reflect.Type, key *Key, field reflect.Value, delim stri
uintVal, err := key.Uint64()
if err != nil {
- return nil
+ return wrapStrictError(err, isStrict)
}
field.SetUint(uintVal)
- case reflect.Float64:
+ case reflect.Float32, reflect.Float64:
floatVal, err := key.Float64()
if err != nil {
- return nil
+ return wrapStrictError(err, isStrict)
}
field.SetFloat(floatVal)
case reflectTime:
timeVal, err := key.Time()
if err != nil {
- return nil
+ return wrapStrictError(err, isStrict)
}
field.Set(reflect.ValueOf(timeVal))
case reflect.Slice:
- return setSliceWithProperType(key, field, delim)
+ return setSliceWithProperType(key, field, delim, allowShadow, isStrict)
default:
return fmt.Errorf("unsupported type '%s'", t)
}
return nil
}
-func (s *Section) mapTo(val reflect.Value) error {
+func parseTagOptions(tag string) (rawName string, omitEmpty bool, allowShadow bool) {
+ opts := strings.SplitN(tag, ",", 3)
+ rawName = opts[0]
+ if len(opts) > 1 {
+ omitEmpty = opts[1] == "omitempty"
+ }
+ if len(opts) > 2 {
+ allowShadow = opts[2] == "allowshadow"
+ }
+ return rawName, omitEmpty, allowShadow
+}
+
+func (s *Section) mapTo(val reflect.Value, isStrict bool) error {
if val.Kind() == reflect.Ptr {
val = val.Elem()
}
@@ -209,8 +238,8 @@ func (s *Section) mapTo(val reflect.Value) error {
continue
}
- opts := strings.SplitN(tag, ",", 2) // strip off possible omitempty
- fieldName := s.parseFieldName(tpField.Name, opts[0])
+ rawName, _, allowShadow := parseTagOptions(tag)
+ fieldName := s.parseFieldName(tpField.Name, rawName)
if len(fieldName) == 0 || !field.CanSet() {
continue
}
@@ -223,7 +252,7 @@ func (s *Section) mapTo(val reflect.Value) error {
if isAnonymous || isStruct {
if sec, err := s.f.GetSection(fieldName); err == nil {
- if err = sec.mapTo(field); err != nil {
+ if err = sec.mapTo(field, isStrict); err != nil {
return fmt.Errorf("error mapping field(%s): %v", fieldName, err)
}
continue
@@ -231,7 +260,8 @@ func (s *Section) mapTo(val reflect.Value) error {
}
if key, err := s.GetKey(fieldName); err == nil {
- if err = setWithProperType(tpField.Type, key, field, parseDelim(tpField.Tag.Get("delim"))); err != nil {
+ delim := parseDelim(tpField.Tag.Get("delim"))
+ if err = setWithProperType(tpField.Type, key, field, delim, allowShadow, isStrict); err != nil {
return fmt.Errorf("error mapping field(%s): %v", fieldName, err)
}
}
@@ -250,7 +280,22 @@ func (s *Section) MapTo(v interface{}) error {
return errors.New("cannot map to non-pointer struct")
}
- return s.mapTo(val)
+ return s.mapTo(val, false)
+}
+
+// MapTo maps section to given struct in strict mode,
+// which returns all possible error including value parsing error.
+func (s *Section) StrictMapTo(v interface{}) error {
+ typ := reflect.TypeOf(v)
+ val := reflect.ValueOf(v)
+ if typ.Kind() == reflect.Ptr {
+ typ = typ.Elem()
+ val = val.Elem()
+ } else {
+ return errors.New("cannot map to non-pointer struct")
+ }
+
+ return s.mapTo(val, true)
}
// MapTo maps file to given struct.
@@ -258,6 +303,12 @@ func (f *File) MapTo(v interface{}) error {
return f.Section("").MapTo(v)
}
+// MapTo 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)
+}
+
// MapTo 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...)
@@ -268,11 +319,28 @@ func MapToWithMapper(v interface{}, mapper NameMapper, source interface{}, other
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) error {
slice := field.Slice(0, field.Len())
@@ -340,10 +408,11 @@ func isEmptyValue(v reflect.Value) bool {
return v.Uint() == 0
case reflect.Float32, reflect.Float64:
return v.Float() == 0
- case reflectTime:
- return v.Interface().(time.Time).IsZero()
case reflect.Interface, reflect.Ptr:
return v.IsNil()
+ case reflectTime:
+ t, ok := v.Interface().(time.Time)
+ return ok && t.IsZero()
}
return false
}
@@ -381,6 +450,12 @@ func (s *Section) reflectFrom(val reflect.Value) error {
// 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("error reflecting field (%s): %v", fieldName, err)
}
@@ -392,6 +467,12 @@ func (s *Section) reflectFrom(val reflect.Value) error {
if err != nil {
key, _ = s.NewKey(fieldName, "")
}
+
+ // Add comment from comment tag
+ if len(key.Comment) == 0 {
+ key.Comment = tpField.Tag.Get("comment")
+ }
+
if err = reflectWithProperType(tpField.Type, key, field, parseDelim(tpField.Tag.Get("delim"))); err != nil {
return fmt.Errorf("error reflecting field (%s): %v", fieldName, err)
}
diff --git a/vendor/github.com/go-ldap/ldap/.travis.yml b/vendor/github.com/go-ldap/ldap/.travis.yml
index 3a5402596d0..9782c9bac8b 100644
--- a/vendor/github.com/go-ldap/ldap/.travis.yml
+++ b/vendor/github.com/go-ldap/ldap/.travis.yml
@@ -1,15 +1,31 @@
language: go
+env:
+ global:
+ - VET_VERSIONS="1.6 1.7 1.8 1.9 tip"
+ - LINT_VERSIONS="1.6 1.7 1.8 1.9 tip"
go:
- 1.2
- 1.3
- 1.4
- 1.5
+ - 1.6
+ - 1.7
+ - 1.8
+ - 1.9
- tip
+matrix:
+ fast_finish: true
+ allow_failures:
+ - go: tip
go_import_path: gopkg.in/ldap.v2
install:
- go get gopkg.in/asn1-ber.v1
- go get gopkg.in/ldap.v2
- go get code.google.com/p/go.tools/cmd/cover || go get golang.org/x/tools/cmd/cover
+ - go get github.com/golang/lint/golint || true
- go build -v ./...
script:
- - go test -v -cover ./...
+ - make test
+ - make fmt
+ - if [[ "$VET_VERSIONS" == *"$TRAVIS_GO_VERSION"* ]]; then make vet; fi
+ - if [[ "$LINT_VERSIONS" == *"$TRAVIS_GO_VERSION"* ]]; then make lint; fi
diff --git a/vendor/github.com/go-ldap/ldap/LICENSE b/vendor/github.com/go-ldap/ldap/LICENSE
index 74487567632..6c0ed4b3872 100644
--- a/vendor/github.com/go-ldap/ldap/LICENSE
+++ b/vendor/github.com/go-ldap/ldap/LICENSE
@@ -1,27 +1,22 @@
-Copyright (c) 2012 The Go Authors. All rights reserved.
+The MIT License (MIT)
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
+Copyright (c) 2011-2015 Michael Mitton (mmitton@gmail.com)
+Portions copyright (c) 2015-2016 go-ldap Authors
- * 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.
+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:
-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.
+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-ldap/ldap/Makefile b/vendor/github.com/go-ldap/ldap/Makefile
new file mode 100644
index 00000000000..a9d351c7640
--- /dev/null
+++ b/vendor/github.com/go-ldap/ldap/Makefile
@@ -0,0 +1,52 @@
+.PHONY: default install build test quicktest fmt vet lint
+
+GO_VERSION := $(shell go version | cut -d' ' -f3 | cut -d. -f2)
+
+# Only use the `-race` flag on newer versions of Go
+IS_OLD_GO := $(shell test $(GO_VERSION) -le 2 && echo true)
+ifeq ($(IS_OLD_GO),true)
+ RACE_FLAG :=
+else
+ RACE_FLAG := -race -cpu 1,2,4
+endif
+
+default: fmt vet lint build quicktest
+
+install:
+ go get -t -v ./...
+
+build:
+ go build -v ./...
+
+test:
+ go test -v $(RACE_FLAG) -cover ./...
+
+quicktest:
+ go test ./...
+
+# Capture output and force failure when there is non-empty output
+fmt:
+ @echo gofmt -l .
+ @OUTPUT=`gofmt -l . 2>&1`; \
+ if [ "$$OUTPUT" ]; then \
+ echo "gofmt must be run on the following files:"; \
+ echo "$$OUTPUT"; \
+ exit 1; \
+ fi
+
+# Only run on go1.5+
+vet:
+ go tool vet -atomic -bool -copylocks -nilfunc -printf -shadow -rangeloops -unreachable -unsafeptr -unusedresult .
+
+# https://github.com/golang/lint
+# go get github.com/golang/lint/golint
+# Capture output and force failure when there is non-empty output
+# Only run on go1.5+
+lint:
+ @echo golint ./...
+ @OUTPUT=`golint ./... 2>&1`; \
+ if [ "$$OUTPUT" ]; then \
+ echo "golint errors:"; \
+ echo "$$OUTPUT"; \
+ exit 1; \
+ fi
diff --git a/vendor/github.com/go-ldap/ldap/README.md b/vendor/github.com/go-ldap/ldap/README.md
index f49b4d6a1b3..a26ed2d82b3 100644
--- a/vendor/github.com/go-ldap/ldap/README.md
+++ b/vendor/github.com/go-ldap/ldap/README.md
@@ -13,41 +13,39 @@ Import the latest version with:
import "gopkg.in/ldap.v2"
-
## Required Libraries:
- gopkg.in/asn1-ber.v1
-## Working:
+## Features:
- - Connecting to LDAP server
+ - Connecting to LDAP server (non-TLS, TLS, STARTTLS)
- Binding to LDAP server
- Searching for entries
- - Compiling string filters to LDAP filters
+ - Filter Compile / Decompile
- Paging Search Results
- Modify Requests / Responses
- Add Requests / Responses
- Delete Requests / Responses
- - Better Unicode support
## Examples:
- search
- modify
-## Tests Implemented:
+## Contributing:
- - Filter Compile / Decompile
-
-## TODO:
-
- - [x] Add Requests / Responses
- - [x] Delete Requests / Responses
- - [x] Modify DN Requests / Responses
- - [ ] Compare Requests / Responses
- - [ ] Implement Tests / Benchmarks
+Bug reports and pull requests are welcome!
+Before submitting a pull request, please make sure tests and verification scripts pass:
+```
+make all
+```
+To set up a pre-push hook to run the tests and verify scripts before pushing:
+```
+ln -s ../../.githooks/pre-push .git/hooks/pre-push
+```
---
The Go gopher was designed by Renee French. (http://reneefrench.blogspot.com/)
diff --git a/vendor/github.com/go-ldap/ldap/add.go b/vendor/github.com/go-ldap/ldap/add.go
index 643ce5ffe4c..0e5f6cdba11 100644
--- a/vendor/github.com/go-ldap/ldap/add.go
+++ b/vendor/github.com/go-ldap/ldap/add.go
@@ -16,71 +16,80 @@ import (
"gopkg.in/asn1-ber.v1"
)
+// Attribute represents an LDAP attribute
type Attribute struct {
- attrType string
- attrVals []string
+ // Type is the name of the LDAP attribute
+ Type string
+ // Vals are the LDAP attribute values
+ Vals []string
}
func (a *Attribute) encode() *ber.Packet {
seq := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "Attribute")
- seq.AppendChild(ber.NewString(ber.ClassUniversal, ber.TypePrimitive, ber.TagOctetString, a.attrType, "Type"))
+ seq.AppendChild(ber.NewString(ber.ClassUniversal, ber.TypePrimitive, ber.TagOctetString, a.Type, "Type"))
set := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSet, nil, "AttributeValue")
- for _, value := range a.attrVals {
+ for _, value := range a.Vals {
set.AppendChild(ber.NewString(ber.ClassUniversal, ber.TypePrimitive, ber.TagOctetString, value, "Vals"))
}
seq.AppendChild(set)
return seq
}
+// AddRequest represents an LDAP AddRequest operation
type AddRequest struct {
- dn string
- attributes []Attribute
+ // DN identifies the entry being added
+ DN string
+ // Attributes list the attributes of the new entry
+ Attributes []Attribute
}
func (a AddRequest) encode() *ber.Packet {
request := ber.Encode(ber.ClassApplication, ber.TypeConstructed, ApplicationAddRequest, nil, "Add Request")
- request.AppendChild(ber.NewString(ber.ClassUniversal, ber.TypePrimitive, ber.TagOctetString, a.dn, "DN"))
+ request.AppendChild(ber.NewString(ber.ClassUniversal, ber.TypePrimitive, ber.TagOctetString, a.DN, "DN"))
attributes := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "Attributes")
- for _, attribute := range a.attributes {
+ for _, attribute := range a.Attributes {
attributes.AppendChild(attribute.encode())
}
request.AppendChild(attributes)
return request
}
+// Attribute adds an attribute with the given type and values
func (a *AddRequest) Attribute(attrType string, attrVals []string) {
- a.attributes = append(a.attributes, Attribute{attrType: attrType, attrVals: attrVals})
+ a.Attributes = append(a.Attributes, Attribute{Type: attrType, Vals: attrVals})
}
+// NewAddRequest returns an AddRequest for the given DN, with no attributes
func NewAddRequest(dn string) *AddRequest {
return &AddRequest{
- dn: dn,
+ DN: dn,
}
}
+// Add performs the given AddRequest
func (l *Conn) Add(addRequest *AddRequest) error {
- messageID := l.nextMessageID()
packet := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "LDAP Request")
- packet.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, messageID, "MessageID"))
+ packet.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, l.nextMessageID(), "MessageID"))
packet.AppendChild(addRequest.encode())
l.Debug.PrintPacket(packet)
- channel, err := l.sendMessage(packet)
+ msgCtx, err := l.sendMessage(packet)
if err != nil {
return err
}
- if channel == nil {
- return NewError(ErrorNetwork, errors.New("ldap: could not send message"))
- }
- defer l.finishMessage(messageID)
+ defer l.finishMessage(msgCtx)
- l.Debug.Printf("%d: waiting for response", messageID)
- packet = <-channel
- l.Debug.Printf("%d: got response %p", messageID, packet)
- if packet == nil {
- return NewError(ErrorNetwork, errors.New("ldap: could not retrieve message"))
+ l.Debug.Printf("%d: waiting for response", msgCtx.id)
+ packetResponse, ok := <-msgCtx.responses
+ if !ok {
+ return NewError(ErrorNetwork, errors.New("ldap: response channel closed"))
+ }
+ packet, err = packetResponse.ReadPacket()
+ l.Debug.Printf("%d: got response %p", msgCtx.id, packet)
+ if err != nil {
+ return err
}
if l.Debug {
@@ -99,6 +108,6 @@ func (l *Conn) Add(addRequest *AddRequest) error {
log.Printf("Unexpected Response: %d", packet.Children[1].Tag)
}
- l.Debug.Printf("%d: returning", messageID)
+ l.Debug.Printf("%d: returning", msgCtx.id)
return nil
}
diff --git a/vendor/github.com/go-ldap/ldap/atomic_value.go b/vendor/github.com/go-ldap/ldap/atomic_value.go
new file mode 100644
index 00000000000..bccf7573e0e
--- /dev/null
+++ b/vendor/github.com/go-ldap/ldap/atomic_value.go
@@ -0,0 +1,13 @@
+// +build go1.4
+
+package ldap
+
+import (
+ "sync/atomic"
+)
+
+// For compilers that support it, we just use the underlying sync/atomic.Value
+// type.
+type atomicValue struct {
+ atomic.Value
+}
diff --git a/vendor/github.com/go-ldap/ldap/atomic_value_go13.go b/vendor/github.com/go-ldap/ldap/atomic_value_go13.go
new file mode 100644
index 00000000000..04920bb2600
--- /dev/null
+++ b/vendor/github.com/go-ldap/ldap/atomic_value_go13.go
@@ -0,0 +1,28 @@
+// +build !go1.4
+
+package ldap
+
+import (
+ "sync"
+)
+
+// This is a helper type that emulates the use of the "sync/atomic.Value"
+// struct that's available in Go 1.4 and up.
+type atomicValue struct {
+ value interface{}
+ lock sync.RWMutex
+}
+
+func (av *atomicValue) Store(val interface{}) {
+ av.lock.Lock()
+ av.value = val
+ av.lock.Unlock()
+}
+
+func (av *atomicValue) Load() interface{} {
+ av.lock.RLock()
+ ret := av.value
+ av.lock.RUnlock()
+
+ return ret
+}
diff --git a/vendor/github.com/go-ldap/ldap/bind.go b/vendor/github.com/go-ldap/ldap/bind.go
index 4ad4b896c26..26b3cc7270d 100644
--- a/vendor/github.com/go-ldap/ldap/bind.go
+++ b/vendor/github.com/go-ldap/ldap/bind.go
@@ -10,16 +10,22 @@ import (
"gopkg.in/asn1-ber.v1"
)
+// SimpleBindRequest represents a username/password bind operation
type SimpleBindRequest struct {
+ // Username is the name of the Directory object that the client wishes to bind as
Username string
+ // Password is the credentials to bind with
Password string
+ // Controls are optional controls to send with the bind request
Controls []Control
}
+// SimpleBindResult contains the response from the server
type SimpleBindResult struct {
Controls []Control
}
+// NewSimpleBindRequest returns a bind request
func NewSimpleBindRequest(username string, password string, controls []Control) *SimpleBindRequest {
return &SimpleBindRequest{
Username: username,
@@ -39,11 +45,10 @@ func (bindRequest *SimpleBindRequest) encode() *ber.Packet {
return request
}
+// SimpleBind performs the simple bind operation defined in the given request
func (l *Conn) SimpleBind(simpleBindRequest *SimpleBindRequest) (*SimpleBindResult, error) {
- messageID := l.nextMessageID()
-
packet := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "LDAP Request")
- packet.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, messageID, "MessageID"))
+ packet.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, l.nextMessageID(), "MessageID"))
encodedBindRequest := simpleBindRequest.encode()
packet.AppendChild(encodedBindRequest)
@@ -51,18 +56,20 @@ func (l *Conn) SimpleBind(simpleBindRequest *SimpleBindRequest) (*SimpleBindResu
ber.PrintPacket(packet)
}
- channel, err := l.sendMessage(packet)
+ msgCtx, err := l.sendMessage(packet)
if err != nil {
return nil, err
}
- if channel == nil {
- return nil, NewError(ErrorNetwork, errors.New("ldap: could not send message"))
- }
- defer l.finishMessage(messageID)
+ defer l.finishMessage(msgCtx)
- packet = <-channel
- if packet == nil {
- return nil, NewError(ErrorNetwork, errors.New("ldap: could not retrieve response"))
+ packetResponse, ok := <-msgCtx.responses
+ if !ok {
+ return nil, NewError(ErrorNetwork, errors.New("ldap: response channel closed"))
+ }
+ packet, err = packetResponse.ReadPacket()
+ l.Debug.Printf("%d: got response %p", msgCtx.id, packet)
+ if err != nil {
+ return nil, err
}
if l.Debug {
@@ -90,11 +97,10 @@ func (l *Conn) SimpleBind(simpleBindRequest *SimpleBindRequest) (*SimpleBindResu
return result, nil
}
+// Bind performs a bind with the given username and password
func (l *Conn) Bind(username, password string) error {
- messageID := l.nextMessageID()
-
packet := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "LDAP Request")
- packet.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, messageID, "MessageID"))
+ packet.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, l.nextMessageID(), "MessageID"))
bindRequest := ber.Encode(ber.ClassApplication, ber.TypeConstructed, ApplicationBindRequest, nil, "Bind Request")
bindRequest.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, 3, "Version"))
bindRequest.AppendChild(ber.NewString(ber.ClassUniversal, ber.TypePrimitive, ber.TagOctetString, username, "User Name"))
@@ -105,18 +111,20 @@ func (l *Conn) Bind(username, password string) error {
ber.PrintPacket(packet)
}
- channel, err := l.sendMessage(packet)
+ msgCtx, err := l.sendMessage(packet)
if err != nil {
return err
}
- if channel == nil {
- return NewError(ErrorNetwork, errors.New("ldap: could not send message"))
- }
- defer l.finishMessage(messageID)
+ defer l.finishMessage(msgCtx)
- packet = <-channel
- if packet == nil {
- return NewError(ErrorNetwork, errors.New("ldap: could not retrieve response"))
+ packetResponse, ok := <-msgCtx.responses
+ if !ok {
+ return NewError(ErrorNetwork, errors.New("ldap: response channel closed"))
+ }
+ packet, err = packetResponse.ReadPacket()
+ l.Debug.Printf("%d: got response %p", msgCtx.id, packet)
+ if err != nil {
+ return err
}
if l.Debug {
diff --git a/vendor/github.com/go-ldap/ldap/client.go b/vendor/github.com/go-ldap/ldap/client.go
index d3401f9e61e..055b27b5fc4 100644
--- a/vendor/github.com/go-ldap/ldap/client.go
+++ b/vendor/github.com/go-ldap/ldap/client.go
@@ -1,12 +1,16 @@
package ldap
-import "crypto/tls"
+import (
+ "crypto/tls"
+ "time"
+)
// Client knows how to interact with an LDAP server
type Client interface {
Start()
StartTLS(config *tls.Config) error
Close()
+ SetTimeout(time.Duration)
Bind(username, password string) error
SimpleBind(simpleBindRequest *SimpleBindRequest) (*SimpleBindResult, error)
diff --git a/vendor/github.com/go-ldap/ldap/compare.go b/vendor/github.com/go-ldap/ldap/compare.go
index 802e9cc932a..cc6d2af5e5d 100644
--- a/vendor/github.com/go-ldap/ldap/compare.go
+++ b/vendor/github.com/go-ldap/ldap/compare.go
@@ -33,9 +33,8 @@ import (
// Compare checks to see if the attribute of the dn matches value. Returns true if it does otherwise
// false with any error that occurs if any.
func (l *Conn) Compare(dn, attribute, value string) (bool, error) {
- messageID := l.nextMessageID()
packet := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "LDAP Request")
- packet.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, messageID, "MessageID"))
+ packet.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, l.nextMessageID(), "MessageID"))
request := ber.Encode(ber.ClassApplication, ber.TypeConstructed, ApplicationCompareRequest, nil, "Compare Request")
request.AppendChild(ber.NewString(ber.ClassUniversal, ber.TypePrimitive, ber.TagOctetString, dn, "DN"))
@@ -48,20 +47,21 @@ func (l *Conn) Compare(dn, attribute, value string) (bool, error) {
l.Debug.PrintPacket(packet)
- channel, err := l.sendMessage(packet)
+ msgCtx, err := l.sendMessage(packet)
if err != nil {
return false, err
}
- if channel == nil {
- return false, NewError(ErrorNetwork, errors.New("ldap: could not send message"))
- }
- defer l.finishMessage(messageID)
+ defer l.finishMessage(msgCtx)
- l.Debug.Printf("%d: waiting for response", messageID)
- packet = <-channel
- l.Debug.Printf("%d: got response %p", messageID, packet)
- if packet == nil {
- return false, NewError(ErrorNetwork, errors.New("ldap: could not retrieve message"))
+ l.Debug.Printf("%d: waiting for response", msgCtx.id)
+ packetResponse, ok := <-msgCtx.responses
+ if !ok {
+ return false, NewError(ErrorNetwork, errors.New("ldap: response channel closed"))
+ }
+ packet, err = packetResponse.ReadPacket()
+ l.Debug.Printf("%d: got response %p", msgCtx.id, packet)
+ if err != nil {
+ return false, err
}
if l.Debug {
diff --git a/vendor/github.com/go-ldap/ldap/conn.go b/vendor/github.com/go-ldap/ldap/conn.go
index 2f16443f6e4..eb28eb4726a 100644
--- a/vendor/github.com/go-ldap/ldap/conn.go
+++ b/vendor/github.com/go-ldap/ldap/conn.go
@@ -11,23 +11,66 @@ import (
"log"
"net"
"sync"
+ "sync/atomic"
"time"
"gopkg.in/asn1-ber.v1"
)
const (
- MessageQuit = 0
- MessageRequest = 1
+ // MessageQuit causes the processMessages loop to exit
+ MessageQuit = 0
+ // MessageRequest sends a request to the server
+ MessageRequest = 1
+ // MessageResponse receives a response from the server
MessageResponse = 2
- MessageFinish = 3
+ // MessageFinish indicates the client considers a particular message ID to be finished
+ MessageFinish = 3
+ // MessageTimeout indicates the client-specified timeout for a particular message ID has been reached
+ MessageTimeout = 4
)
+// PacketResponse contains the packet or error encountered reading a response
+type PacketResponse struct {
+ // Packet is the packet read from the server
+ Packet *ber.Packet
+ // Error is an error encountered while reading
+ Error error
+}
+
+// ReadPacket returns the packet or an error
+func (pr *PacketResponse) ReadPacket() (*ber.Packet, error) {
+ if (pr == nil) || (pr.Packet == nil && pr.Error == nil) {
+ return nil, NewError(ErrorNetwork, errors.New("ldap: could not retrieve response"))
+ }
+ return pr.Packet, pr.Error
+}
+
+type messageContext struct {
+ id int64
+ // close(done) should only be called from finishMessage()
+ done chan struct{}
+ // close(responses) should only be called from processMessages(), and only sent to from sendResponse()
+ responses chan *PacketResponse
+}
+
+// sendResponse should only be called within the processMessages() loop which
+// is also responsible for closing the responses channel.
+func (msgCtx *messageContext) sendResponse(packet *PacketResponse) {
+ select {
+ case msgCtx.responses <- packet:
+ // Successfully sent packet to message handler.
+ case <-msgCtx.done:
+ // The request handler is done and will not receive more
+ // packets.
+ }
+}
+
type messagePacket struct {
Op int
MessageID int64
Packet *ber.Packet
- Channel chan *ber.Packet
+ Context *messageContext
}
type sendMessageFlags uint
@@ -40,18 +83,18 @@ const (
type Conn struct {
conn net.Conn
isTLS bool
- isClosing bool
+ closing uint32
+ closeErr atomicValue
isStartingTLS bool
Debug debugging
- chanConfirm chan bool
- chanResults map[int64]chan *ber.Packet
+ chanConfirm chan struct{}
+ messageContexts map[int64]*messageContext
chanMessage chan *messagePacket
chanMessageID chan int64
- wgSender sync.WaitGroup
wgClose sync.WaitGroup
- once sync.Once
outstandingRequests uint
messageMutex sync.Mutex
+ requestTimeout int64
}
var _ Client = &Conn{}
@@ -97,27 +140,39 @@ func DialTLS(network, addr string, config *tls.Config) (*Conn, error) {
// NewConn returns a new Conn using conn for network I/O.
func NewConn(conn net.Conn, isTLS bool) *Conn {
return &Conn{
- conn: conn,
- chanConfirm: make(chan bool),
- chanMessageID: make(chan int64),
- chanMessage: make(chan *messagePacket, 10),
- chanResults: map[int64]chan *ber.Packet{},
- isTLS: isTLS,
+ conn: conn,
+ chanConfirm: make(chan struct{}),
+ chanMessageID: make(chan int64),
+ chanMessage: make(chan *messagePacket, 10),
+ messageContexts: map[int64]*messageContext{},
+ requestTimeout: 0,
+ isTLS: isTLS,
}
}
+// Start initializes goroutines to read responses and process messages
func (l *Conn) Start() {
go l.reader()
go l.processMessages()
l.wgClose.Add(1)
}
+// isClosing returns whether or not we're currently closing.
+func (l *Conn) isClosing() bool {
+ return atomic.LoadUint32(&l.closing) == 1
+}
+
+// setClosing sets the closing value to true
+func (l *Conn) setClosing() bool {
+ return atomic.CompareAndSwapUint32(&l.closing, 0, 1)
+}
+
// Close closes the connection.
func (l *Conn) Close() {
- l.once.Do(func() {
- l.isClosing = true
- l.wgSender.Wait()
+ l.messageMutex.Lock()
+ defer l.messageMutex.Unlock()
+ if l.setClosing() {
l.Debug.Printf("Sending quit message and waiting for confirmation")
l.chanMessage <- &messagePacket{Op: MessageQuit}
<-l.chanConfirm
@@ -125,51 +180,59 @@ func (l *Conn) Close() {
l.Debug.Printf("Closing network connection")
if err := l.conn.Close(); err != nil {
- log.Print(err)
+ log.Println(err)
}
l.wgClose.Done()
- })
+ }
l.wgClose.Wait()
}
+// SetTimeout sets the time after a request is sent that a MessageTimeout triggers
+func (l *Conn) SetTimeout(timeout time.Duration) {
+ if timeout > 0 {
+ atomic.StoreInt64(&l.requestTimeout, int64(timeout))
+ }
+}
+
// Returns the next available messageID
func (l *Conn) nextMessageID() int64 {
- if l.chanMessageID != nil {
- if messageID, ok := <-l.chanMessageID; ok {
- return messageID
- }
+ if messageID, ok := <-l.chanMessageID; ok {
+ return messageID
}
return 0
}
// StartTLS sends the command to start a TLS session and then creates a new TLS Client
func (l *Conn) StartTLS(config *tls.Config) error {
- messageID := l.nextMessageID()
-
if l.isTLS {
return NewError(ErrorNetwork, errors.New("ldap: already encrypted"))
}
packet := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "LDAP Request")
- packet.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, messageID, "MessageID"))
+ packet.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, l.nextMessageID(), "MessageID"))
request := ber.Encode(ber.ClassApplication, ber.TypeConstructed, ApplicationExtendedRequest, nil, "Start TLS")
request.AppendChild(ber.NewString(ber.ClassContext, ber.TypePrimitive, 0, "1.3.6.1.4.1.1466.20037", "TLS Extended Command"))
packet.AppendChild(request)
l.Debug.PrintPacket(packet)
- channel, err := l.sendMessageWithFlags(packet, startTLS)
+ msgCtx, err := l.sendMessageWithFlags(packet, startTLS)
if err != nil {
return err
}
- if channel == nil {
- return NewError(ErrorNetwork, errors.New("ldap: could not send message"))
- }
+ defer l.finishMessage(msgCtx)
- l.Debug.Printf("%d: waiting for response", messageID)
- packet = <-channel
- l.Debug.Printf("%d: got response %p", messageID, packet)
- l.finishMessage(messageID)
+ l.Debug.Printf("%d: waiting for response", msgCtx.id)
+
+ packetResponse, ok := <-msgCtx.responses
+ if !ok {
+ return NewError(ErrorNetwork, errors.New("ldap: response channel closed"))
+ }
+ packet, err = packetResponse.ReadPacket()
+ l.Debug.Printf("%d: got response %p", msgCtx.id, packet)
+ if err != nil {
+ return err
+ }
if l.Debug {
if err := addLDAPDescriptions(packet); err != nil {
@@ -197,45 +260,51 @@ func (l *Conn) StartTLS(config *tls.Config) error {
return nil
}
-func (l *Conn) sendMessage(packet *ber.Packet) (chan *ber.Packet, error) {
+func (l *Conn) sendMessage(packet *ber.Packet) (*messageContext, error) {
return l.sendMessageWithFlags(packet, 0)
}
-func (l *Conn) sendMessageWithFlags(packet *ber.Packet, flags sendMessageFlags) (chan *ber.Packet, error) {
- if l.isClosing {
+func (l *Conn) sendMessageWithFlags(packet *ber.Packet, flags sendMessageFlags) (*messageContext, error) {
+ if l.isClosing() {
return nil, NewError(ErrorNetwork, errors.New("ldap: connection closed"))
}
l.messageMutex.Lock()
l.Debug.Printf("flags&startTLS = %d", flags&startTLS)
if l.isStartingTLS {
l.messageMutex.Unlock()
- return nil, NewError(ErrorNetwork, errors.New("ldap: connection is in startls phase."))
+ return nil, NewError(ErrorNetwork, errors.New("ldap: connection is in startls phase"))
}
if flags&startTLS != 0 {
if l.outstandingRequests != 0 {
l.messageMutex.Unlock()
return nil, NewError(ErrorNetwork, errors.New("ldap: cannot StartTLS with outstanding requests"))
- } else {
- l.isStartingTLS = true
}
+ l.isStartingTLS = true
}
l.outstandingRequests++
l.messageMutex.Unlock()
- out := make(chan *ber.Packet)
+ responses := make(chan *PacketResponse)
+ messageID := packet.Children[0].Value.(int64)
message := &messagePacket{
Op: MessageRequest,
- MessageID: packet.Children[0].Value.(int64),
+ MessageID: messageID,
Packet: packet,
- Channel: out,
+ Context: &messageContext{
+ id: messageID,
+ done: make(chan struct{}),
+ responses: responses,
+ },
}
l.sendProcessMessage(message)
- return out, nil
+ return message.Context, nil
}
-func (l *Conn) finishMessage(messageID int64) {
- if l.isClosing {
+func (l *Conn) finishMessage(msgCtx *messageContext) {
+ close(msgCtx.done)
+
+ if l.isClosing() {
return
}
@@ -248,18 +317,18 @@ func (l *Conn) finishMessage(messageID int64) {
message := &messagePacket{
Op: MessageFinish,
- MessageID: messageID,
+ MessageID: msgCtx.id,
}
l.sendProcessMessage(message)
}
func (l *Conn) sendProcessMessage(message *messagePacket) bool {
- if l.isClosing {
+ l.messageMutex.Lock()
+ defer l.messageMutex.Unlock()
+ if l.isClosing() {
return false
}
- l.wgSender.Add(1)
l.chanMessage <- message
- l.wgSender.Done()
return true
}
@@ -268,13 +337,17 @@ func (l *Conn) processMessages() {
if err := recover(); err != nil {
log.Printf("ldap: recovered panic in processMessages: %v", err)
}
- for messageID, channel := range l.chanResults {
+ for messageID, msgCtx := range l.messageContexts {
+ // If we are closing due to an error, inform anyone who
+ // is waiting about the error.
+ if l.isClosing() && l.closeErr.Load() != nil {
+ msgCtx.sendResponse(&PacketResponse{Error: l.closeErr.Load().(error)})
+ }
l.Debug.Printf("Closing channel for MessageID %d", messageID)
- close(channel)
- delete(l.chanResults, messageID)
+ close(msgCtx.responses)
+ delete(l.messageContexts, messageID)
}
close(l.chanMessageID)
- l.chanConfirm <- true
close(l.chanConfirm)
}()
@@ -283,40 +356,68 @@ func (l *Conn) processMessages() {
select {
case l.chanMessageID <- messageID:
messageID++
- case messagePacket, ok := <-l.chanMessage:
- if !ok {
- l.Debug.Printf("Shutting down - message channel is closed")
- return
- }
- switch messagePacket.Op {
+ case message := <-l.chanMessage:
+ switch message.Op {
case MessageQuit:
l.Debug.Printf("Shutting down - quit message received")
return
case MessageRequest:
// Add to message list and write to network
- l.Debug.Printf("Sending message %d", messagePacket.MessageID)
- l.chanResults[messagePacket.MessageID] = messagePacket.Channel
- // go routine
- buf := messagePacket.Packet.Bytes()
+ l.Debug.Printf("Sending message %d", message.MessageID)
+ buf := message.Packet.Bytes()
_, err := l.conn.Write(buf)
if err != nil {
l.Debug.Printf("Error Sending Message: %s", err.Error())
+ message.Context.sendResponse(&PacketResponse{Error: fmt.Errorf("unable to send request: %s", err)})
+ close(message.Context.responses)
break
}
+
+ // Only add to messageContexts if we were able to
+ // successfully write the message.
+ l.messageContexts[message.MessageID] = message.Context
+
+ // Add timeout if defined
+ requestTimeout := time.Duration(atomic.LoadInt64(&l.requestTimeout))
+ if requestTimeout > 0 {
+ go func() {
+ defer func() {
+ if err := recover(); err != nil {
+ log.Printf("ldap: recovered panic in RequestTimeout: %v", err)
+ }
+ }()
+ time.Sleep(requestTimeout)
+ timeoutMessage := &messagePacket{
+ Op: MessageTimeout,
+ MessageID: message.MessageID,
+ }
+ l.sendProcessMessage(timeoutMessage)
+ }()
+ }
case MessageResponse:
- l.Debug.Printf("Receiving message %d", messagePacket.MessageID)
- if chanResult, ok := l.chanResults[messagePacket.MessageID]; ok {
- chanResult <- messagePacket.Packet
+ l.Debug.Printf("Receiving message %d", message.MessageID)
+ if msgCtx, ok := l.messageContexts[message.MessageID]; ok {
+ msgCtx.sendResponse(&PacketResponse{message.Packet, nil})
} else {
- log.Printf("Received unexpected message %d", messagePacket.MessageID)
- ber.PrintPacket(messagePacket.Packet)
+ log.Printf("Received unexpected message %d, %v", message.MessageID, l.isClosing())
+ ber.PrintPacket(message.Packet)
+ }
+ case MessageTimeout:
+ // Handle the timeout by closing the channel
+ // All reads will return immediately
+ if msgCtx, ok := l.messageContexts[message.MessageID]; ok {
+ l.Debug.Printf("Receiving message timeout for %d", message.MessageID)
+ msgCtx.sendResponse(&PacketResponse{message.Packet, errors.New("ldap: connection timed out")})
+ delete(l.messageContexts, message.MessageID)
+ close(msgCtx.responses)
}
case MessageFinish:
- // Remove from message list
- l.Debug.Printf("Finished message %d", messagePacket.MessageID)
- close(l.chanResults[messagePacket.MessageID])
- delete(l.chanResults, messagePacket.MessageID)
+ l.Debug.Printf("Finished message %d", message.MessageID)
+ if msgCtx, ok := l.messageContexts[message.MessageID]; ok {
+ delete(l.messageContexts, message.MessageID)
+ close(msgCtx.responses)
+ }
}
}
}
@@ -341,7 +442,8 @@ func (l *Conn) reader() {
packet, err := ber.ReadPacket(l.conn)
if err != nil {
// A read error is expected here if we are closing the connection...
- if !l.isClosing {
+ if !l.isClosing() {
+ l.closeErr.Store(fmt.Errorf("unable to read LDAP response packet: %s", err))
l.Debug.Printf("reader error: %s", err.Error())
}
return
@@ -364,6 +466,5 @@ func (l *Conn) reader() {
if !l.sendProcessMessage(message) {
return
}
-
}
}
diff --git a/vendor/github.com/go-ldap/ldap/control.go b/vendor/github.com/go-ldap/ldap/control.go
index 4d82980933e..342f325ca61 100644
--- a/vendor/github.com/go-ldap/ldap/control.go
+++ b/vendor/github.com/go-ldap/ldap/control.go
@@ -12,35 +12,48 @@ import (
)
const (
- ControlTypePaging = "1.2.840.113556.1.4.319"
- ControlTypeBeheraPasswordPolicy = "1.3.6.1.4.1.42.2.27.8.5.1"
+ // ControlTypePaging - https://www.ietf.org/rfc/rfc2696.txt
+ ControlTypePaging = "1.2.840.113556.1.4.319"
+ // ControlTypeBeheraPasswordPolicy - https://tools.ietf.org/html/draft-behera-ldap-password-policy-10
+ ControlTypeBeheraPasswordPolicy = "1.3.6.1.4.1.42.2.27.8.5.1"
+ // ControlTypeVChuPasswordMustChange - https://tools.ietf.org/html/draft-vchu-ldap-pwd-policy-00
ControlTypeVChuPasswordMustChange = "2.16.840.1.113730.3.4.4"
- ControlTypeVChuPasswordWarning = "2.16.840.1.113730.3.4.5"
- ControlTypeManageDsaIT = "2.16.840.1.113730.3.4.2"
+ // ControlTypeVChuPasswordWarning - https://tools.ietf.org/html/draft-vchu-ldap-pwd-policy-00
+ ControlTypeVChuPasswordWarning = "2.16.840.1.113730.3.4.5"
+ // ControlTypeManageDsaIT - https://tools.ietf.org/html/rfc3296
+ ControlTypeManageDsaIT = "2.16.840.1.113730.3.4.2"
)
+// ControlTypeMap maps controls to text descriptions
var ControlTypeMap = map[string]string{
ControlTypePaging: "Paging",
ControlTypeBeheraPasswordPolicy: "Password Policy - Behera Draft",
ControlTypeManageDsaIT: "Manage DSA IT",
}
+// Control defines an interface controls provide to encode and describe themselves
type Control interface {
+ // GetControlType returns the OID
GetControlType() string
+ // Encode returns the ber packet representation
Encode() *ber.Packet
+ // String returns a human-readable description
String() string
}
+// ControlString implements the Control interface for simple controls
type ControlString struct {
ControlType string
Criticality bool
ControlValue string
}
+// GetControlType returns the OID
func (c *ControlString) GetControlType() string {
return c.ControlType
}
+// Encode returns the ber packet representation
func (c *ControlString) Encode() *ber.Packet {
packet := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "Control")
packet.AppendChild(ber.NewString(ber.ClassUniversal, ber.TypePrimitive, ber.TagOctetString, c.ControlType, "Control Type ("+ControlTypeMap[c.ControlType]+")"))
@@ -51,26 +64,32 @@ func (c *ControlString) Encode() *ber.Packet {
return packet
}
+// String returns a human-readable description
func (c *ControlString) String() string {
return fmt.Sprintf("Control Type: %s (%q) Criticality: %t Control Value: %s", ControlTypeMap[c.ControlType], c.ControlType, c.Criticality, c.ControlValue)
}
+// ControlPaging implements the paging control described in https://www.ietf.org/rfc/rfc2696.txt
type ControlPaging struct {
+ // PagingSize indicates the page size
PagingSize uint32
- Cookie []byte
+ // Cookie is an opaque value returned by the server to track a paging cursor
+ Cookie []byte
}
+// GetControlType returns the OID
func (c *ControlPaging) GetControlType() string {
return ControlTypePaging
}
+// Encode returns the ber packet representation
func (c *ControlPaging) Encode() *ber.Packet {
packet := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "Control")
packet.AppendChild(ber.NewString(ber.ClassUniversal, ber.TypePrimitive, ber.TagOctetString, ControlTypePaging, "Control Type ("+ControlTypeMap[ControlTypePaging]+")"))
p2 := ber.Encode(ber.ClassUniversal, ber.TypePrimitive, ber.TagOctetString, nil, "Control Value (Paging)")
seq := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "Search Control Value")
- seq.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, uint64(c.PagingSize), "Paging Size"))
+ seq.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, int64(c.PagingSize), "Paging Size"))
cookie := ber.Encode(ber.ClassUniversal, ber.TypePrimitive, ber.TagOctetString, nil, "Cookie")
cookie.Value = c.Cookie
cookie.Data.Write(c.Cookie)
@@ -81,6 +100,7 @@ func (c *ControlPaging) Encode() *ber.Packet {
return packet
}
+// String returns a human-readable description
func (c *ControlPaging) String() string {
return fmt.Sprintf(
"Control Type: %s (%q) Criticality: %t PagingSize: %d Cookie: %q",
@@ -91,21 +111,29 @@ func (c *ControlPaging) String() string {
c.Cookie)
}
+// SetCookie stores the given cookie in the paging control
func (c *ControlPaging) SetCookie(cookie []byte) {
c.Cookie = cookie
}
+// ControlBeheraPasswordPolicy implements the control described in https://tools.ietf.org/html/draft-behera-ldap-password-policy-10
type ControlBeheraPasswordPolicy struct {
- Expire int64
- Grace int64
- Error int8
+ // Expire contains the number of seconds before a password will expire
+ Expire int64
+ // Grace indicates the remaining number of times a user will be allowed to authenticate with an expired password
+ Grace int64
+ // Error indicates the error code
+ Error int8
+ // ErrorString is a human readable error
ErrorString string
}
+// GetControlType returns the OID
func (c *ControlBeheraPasswordPolicy) GetControlType() string {
return ControlTypeBeheraPasswordPolicy
}
+// Encode returns the ber packet representation
func (c *ControlBeheraPasswordPolicy) Encode() *ber.Packet {
packet := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "Control")
packet.AppendChild(ber.NewString(ber.ClassUniversal, ber.TypePrimitive, ber.TagOctetString, ControlTypeBeheraPasswordPolicy, "Control Type ("+ControlTypeMap[ControlTypeBeheraPasswordPolicy]+")"))
@@ -113,6 +141,7 @@ func (c *ControlBeheraPasswordPolicy) Encode() *ber.Packet {
return packet
}
+// String returns a human-readable description
func (c *ControlBeheraPasswordPolicy) String() string {
return fmt.Sprintf(
"Control Type: %s (%q) Criticality: %t Expire: %d Grace: %d Error: %d, ErrorString: %s",
@@ -125,39 +154,49 @@ func (c *ControlBeheraPasswordPolicy) String() string {
c.ErrorString)
}
+// ControlVChuPasswordMustChange implements the control described in https://tools.ietf.org/html/draft-vchu-ldap-pwd-policy-00
type ControlVChuPasswordMustChange struct {
+ // MustChange indicates if the password is required to be changed
MustChange bool
}
+// GetControlType returns the OID
func (c *ControlVChuPasswordMustChange) GetControlType() string {
return ControlTypeVChuPasswordMustChange
}
+// Encode returns the ber packet representation
func (c *ControlVChuPasswordMustChange) Encode() *ber.Packet {
return nil
}
+// String returns a human-readable description
func (c *ControlVChuPasswordMustChange) String() string {
return fmt.Sprintf(
- "Control Type: %s (%q) Criticality: %t MustChange: %b",
+ "Control Type: %s (%q) Criticality: %t MustChange: %v",
ControlTypeMap[ControlTypeVChuPasswordMustChange],
ControlTypeVChuPasswordMustChange,
false,
c.MustChange)
}
+// ControlVChuPasswordWarning implements the control described in https://tools.ietf.org/html/draft-vchu-ldap-pwd-policy-00
type ControlVChuPasswordWarning struct {
+ // Expire indicates the time in seconds until the password expires
Expire int64
}
+// GetControlType returns the OID
func (c *ControlVChuPasswordWarning) GetControlType() string {
return ControlTypeVChuPasswordWarning
}
+// Encode returns the ber packet representation
func (c *ControlVChuPasswordWarning) Encode() *ber.Packet {
return nil
}
+// String returns a human-readable description
func (c *ControlVChuPasswordWarning) String() string {
return fmt.Sprintf(
"Control Type: %s (%q) Criticality: %t Expire: %b",
@@ -167,14 +206,18 @@ func (c *ControlVChuPasswordWarning) String() string {
c.Expire)
}
+// ControlManageDsaIT implements the control described in https://tools.ietf.org/html/rfc3296
type ControlManageDsaIT struct {
+ // Criticality indicates if this control is required
Criticality bool
}
+// GetControlType returns the OID
func (c *ControlManageDsaIT) GetControlType() string {
return ControlTypeManageDsaIT
}
+// Encode returns the ber packet representation
func (c *ControlManageDsaIT) Encode() *ber.Packet {
//FIXME
packet := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "Control")
@@ -185,6 +228,7 @@ func (c *ControlManageDsaIT) Encode() *ber.Packet {
return packet
}
+// String returns a human-readable description
func (c *ControlManageDsaIT) String() string {
return fmt.Sprintf(
"Control Type: %s (%q) Criticality: %t",
@@ -193,10 +237,12 @@ func (c *ControlManageDsaIT) String() string {
c.Criticality)
}
+// NewControlManageDsaIT returns a ControlManageDsaIT control
func NewControlManageDsaIT(Criticality bool) *ControlManageDsaIT {
return &ControlManageDsaIT{Criticality: Criticality}
}
+// FindControl returns the first control of the given type in the list, or nil
func FindControl(controls []Control, controlType string) Control {
for _, c := range controls {
if c.GetControlType() == controlType {
@@ -206,20 +252,56 @@ func FindControl(controls []Control, controlType string) Control {
return nil
}
+// DecodeControl returns a control read from the given packet, or nil if no recognized control can be made
func DecodeControl(packet *ber.Packet) Control {
- ControlType := packet.Children[0].Value.(string)
- Criticality := false
+ var (
+ ControlType = ""
+ Criticality = false
+ value *ber.Packet
+ )
+
+ switch len(packet.Children) {
+ case 0:
+ // at least one child is required for control type
+ return nil
+
+ case 1:
+ // just type, no criticality or value
+ packet.Children[0].Description = "Control Type (" + ControlTypeMap[ControlType] + ")"
+ ControlType = packet.Children[0].Value.(string)
+
+ case 2:
+ packet.Children[0].Description = "Control Type (" + ControlTypeMap[ControlType] + ")"
+ ControlType = packet.Children[0].Value.(string)
+
+ // Children[1] could be criticality or value (both are optional)
+ // duck-type on whether this is a boolean
+ if _, ok := packet.Children[1].Value.(bool); ok {
+ packet.Children[1].Description = "Criticality"
+ Criticality = packet.Children[1].Value.(bool)
+ } else {
+ packet.Children[1].Description = "Control Value"
+ value = packet.Children[1]
+ }
+
+ case 3:
+ packet.Children[0].Description = "Control Type (" + ControlTypeMap[ControlType] + ")"
+ ControlType = packet.Children[0].Value.(string)
- packet.Children[0].Description = "Control Type (" + ControlTypeMap[ControlType] + ")"
- value := packet.Children[1]
- if len(packet.Children) == 3 {
- value = packet.Children[2]
packet.Children[1].Description = "Criticality"
Criticality = packet.Children[1].Value.(bool)
+
+ packet.Children[2].Description = "Control Value"
+ value = packet.Children[2]
+
+ default:
+ // more than 3 children is invalid
+ return nil
}
- value.Description = "Control Value"
switch ControlType {
+ case ControlTypeManageDsaIT:
+ return NewControlManageDsaIT(Criticality)
case ControlTypePaging:
value.Description += " (Paging)"
c := new(ControlPaging)
@@ -252,18 +334,18 @@ func DecodeControl(packet *ber.Packet) Control {
for _, child := range sequence.Children {
if child.Tag == 0 {
//Warning
- child := child.Children[0]
- packet := ber.DecodePacket(child.Data.Bytes())
+ warningPacket := child.Children[0]
+ packet := ber.DecodePacket(warningPacket.Data.Bytes())
val, ok := packet.Value.(int64)
if ok {
- if child.Tag == 0 {
+ if warningPacket.Tag == 0 {
//timeBeforeExpiration
c.Expire = val
- child.Value = c.Expire
- } else if child.Tag == 1 {
+ warningPacket.Value = c.Expire
+ } else if warningPacket.Tag == 1 {
//graceAuthNsRemaining
c.Grace = val
- child.Value = c.Grace
+ warningPacket.Value = c.Grace
}
}
} else if child.Tag == 1 {
@@ -294,15 +376,19 @@ func DecodeControl(packet *ber.Packet) Control {
c.Expire = expire
value.Value = c.Expire
+ return c
+ default:
+ c := new(ControlString)
+ c.ControlType = ControlType
+ c.Criticality = Criticality
+ if value != nil {
+ c.ControlValue = value.Value.(string)
+ }
return c
}
- c := new(ControlString)
- c.ControlType = ControlType
- c.Criticality = Criticality
- c.ControlValue = value.Value.(string)
- return c
}
+// NewControlString returns a generic control
func NewControlString(controlType string, criticality bool, controlValue string) *ControlString {
return &ControlString{
ControlType: controlType,
@@ -311,10 +397,12 @@ func NewControlString(controlType string, criticality bool, controlValue string)
}
}
+// NewControlPaging returns a paging control
func NewControlPaging(pagingSize uint32) *ControlPaging {
return &ControlPaging{PagingSize: pagingSize}
}
+// NewControlBeheraPasswordPolicy returns a ControlBeheraPasswordPolicy
func NewControlBeheraPasswordPolicy() *ControlBeheraPasswordPolicy {
return &ControlBeheraPasswordPolicy{
Expire: -1,
diff --git a/vendor/github.com/go-ldap/ldap/debug.go b/vendor/github.com/go-ldap/ldap/debug.go
index b8a7ecbff1f..7279fc25182 100644
--- a/vendor/github.com/go-ldap/ldap/debug.go
+++ b/vendor/github.com/go-ldap/ldap/debug.go
@@ -6,7 +6,7 @@ import (
"gopkg.in/asn1-ber.v1"
)
-// debbuging type
+// debugging type
// - has a Printf method to write the debug output
type debugging bool
diff --git a/vendor/github.com/go-ldap/ldap/del.go b/vendor/github.com/go-ldap/ldap/del.go
index 2f0eae1cd29..4fd63dc3f25 100644
--- a/vendor/github.com/go-ldap/ldap/del.go
+++ b/vendor/github.com/go-ldap/ldap/del.go
@@ -12,8 +12,11 @@ import (
"gopkg.in/asn1-ber.v1"
)
+// DelRequest implements an LDAP deletion request
type DelRequest struct {
- DN string
+ // DN is the name of the directory entry to delete
+ DN string
+ // Controls hold optional controls to send with the request
Controls []Control
}
@@ -23,6 +26,7 @@ func (d DelRequest) encode() *ber.Packet {
return request
}
+// NewDelRequest creates a delete request for the given DN and controls
func NewDelRequest(DN string,
Controls []Control) *DelRequest {
return &DelRequest{
@@ -31,10 +35,10 @@ func NewDelRequest(DN string,
}
}
+// Del executes the given delete request
func (l *Conn) Del(delRequest *DelRequest) error {
- messageID := l.nextMessageID()
packet := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "LDAP Request")
- packet.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, messageID, "MessageID"))
+ packet.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, l.nextMessageID(), "MessageID"))
packet.AppendChild(delRequest.encode())
if delRequest.Controls != nil {
packet.AppendChild(encodeControls(delRequest.Controls))
@@ -42,20 +46,21 @@ func (l *Conn) Del(delRequest *DelRequest) error {
l.Debug.PrintPacket(packet)
- channel, err := l.sendMessage(packet)
+ msgCtx, err := l.sendMessage(packet)
if err != nil {
return err
}
- if channel == nil {
- return NewError(ErrorNetwork, errors.New("ldap: could not send message"))
- }
- defer l.finishMessage(messageID)
+ defer l.finishMessage(msgCtx)
- l.Debug.Printf("%d: waiting for response", messageID)
- packet = <-channel
- l.Debug.Printf("%d: got response %p", messageID, packet)
- if packet == nil {
- return NewError(ErrorNetwork, errors.New("ldap: could not retrieve message"))
+ l.Debug.Printf("%d: waiting for response", msgCtx.id)
+ packetResponse, ok := <-msgCtx.responses
+ if !ok {
+ return NewError(ErrorNetwork, errors.New("ldap: response channel closed"))
+ }
+ packet, err = packetResponse.ReadPacket()
+ l.Debug.Printf("%d: got response %p", msgCtx.id, packet)
+ if err != nil {
+ return err
}
if l.Debug {
@@ -74,6 +79,6 @@ func (l *Conn) Del(delRequest *DelRequest) error {
log.Printf("Unexpected Response: %d", packet.Children[1].Tag)
}
- l.Debug.Printf("%d: returning", messageID)
+ l.Debug.Printf("%d: returning", msgCtx.id)
return nil
}
diff --git a/vendor/github.com/go-ldap/ldap/dn.go b/vendor/github.com/go-ldap/ldap/dn.go
index 5d83c5e9ab9..34e9023af93 100644
--- a/vendor/github.com/go-ldap/ldap/dn.go
+++ b/vendor/github.com/go-ldap/ldap/dn.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//
-// File contains DN parsing functionallity
+// File contains DN parsing functionality
//
// https://tools.ietf.org/html/rfc4514
//
@@ -52,22 +52,28 @@ import (
"fmt"
"strings"
- ber "gopkg.in/asn1-ber.v1"
+ "gopkg.in/asn1-ber.v1"
)
+// AttributeTypeAndValue represents an attributeTypeAndValue from https://tools.ietf.org/html/rfc4514
type AttributeTypeAndValue struct {
- Type string
+ // Type is the attribute type
+ Type string
+ // Value is the attribute value
Value string
}
+// RelativeDN represents a relativeDistinguishedName from https://tools.ietf.org/html/rfc4514
type RelativeDN struct {
Attributes []*AttributeTypeAndValue
}
+// DN represents a distinguishedName from https://tools.ietf.org/html/rfc4514
type DN struct {
RDNs []*RelativeDN
}
+// ParseDN returns a distinguishedName or an error
func ParseDN(str string) (*DN, error) {
dn := new(DN)
dn.RDNs = make([]*RelativeDN, 0)
@@ -77,9 +83,19 @@ func ParseDN(str string) (*DN, error) {
attribute := new(AttributeTypeAndValue)
escaping := false
+ unescapedTrailingSpaces := 0
+ stringFromBuffer := func() string {
+ s := buffer.String()
+ s = s[0 : len(s)-unescapedTrailingSpaces]
+ buffer.Reset()
+ unescapedTrailingSpaces = 0
+ return s
+ }
+
for i := 0; i < len(str); i++ {
char := str[i]
if escaping {
+ unescapedTrailingSpaces = 0
escaping = false
switch char {
case ' ', '"', '#', '+', ',', ';', '<', '=', '>', '\\':
@@ -94,19 +110,17 @@ func ParseDN(str string) (*DN, error) {
dst := []byte{0}
n, err := enchex.Decode([]byte(dst), []byte(str[i:i+2]))
if err != nil {
- return nil, errors.New(
- fmt.Sprintf("Failed to decode escaped character: %s", err))
+ return nil, fmt.Errorf("Failed to decode escaped character: %s", err)
} else if n != 1 {
- return nil, errors.New(
- fmt.Sprintf("Expected 1 byte when un-escaping, got %d", n))
+ return nil, fmt.Errorf("Expected 1 byte when un-escaping, got %d", n)
}
buffer.WriteByte(dst[0])
i++
} else if char == '\\' {
+ unescapedTrailingSpaces = 0
escaping = true
} else if char == '=' {
- attribute.Type = buffer.String()
- buffer.Reset()
+ attribute.Type = stringFromBuffer()
// Special case: If the first character in the value is # the
// following data is BER encoded so we can just fast forward
// and decode.
@@ -119,18 +133,20 @@ func ParseDN(str string) (*DN, error) {
} else {
data = str[i:]
}
- raw_ber, err := enchex.DecodeString(data)
+ rawBER, err := enchex.DecodeString(data)
if err != nil {
- return nil, errors.New(
- fmt.Sprintf("Failed to decode BER encoding: %s", err))
+ return nil, fmt.Errorf("Failed to decode BER encoding: %s", err)
}
- packet := ber.DecodePacket(raw_ber)
+ packet := ber.DecodePacket(rawBER)
buffer.WriteString(packet.Data.String())
i += len(data) - 1
}
} else if char == ',' || char == '+' {
// We're done with this RDN or value, push it
- attribute.Value = buffer.String()
+ if len(attribute.Type) == 0 {
+ return nil, errors.New("incomplete type, value pair")
+ }
+ attribute.Value = stringFromBuffer()
rdn.Attributes = append(rdn.Attributes, attribute)
attribute = new(AttributeTypeAndValue)
if char == ',' {
@@ -138,8 +154,17 @@ func ParseDN(str string) (*DN, error) {
rdn = new(RelativeDN)
rdn.Attributes = make([]*AttributeTypeAndValue, 0)
}
- buffer.Reset()
+ } else if char == ' ' && buffer.Len() == 0 {
+ // ignore unescaped leading spaces
+ continue
} else {
+ if char == ' ' {
+ // Track unescaped spaces in case they are trailing and we need to remove them
+ unescapedTrailingSpaces++
+ } else {
+ // Reset if we see a non-space char
+ unescapedTrailingSpaces = 0
+ }
buffer.WriteByte(char)
}
}
@@ -147,9 +172,76 @@ func ParseDN(str string) (*DN, error) {
if len(attribute.Type) == 0 {
return nil, errors.New("DN ended with incomplete type, value pair")
}
- attribute.Value = buffer.String()
+ attribute.Value = stringFromBuffer()
rdn.Attributes = append(rdn.Attributes, attribute)
dn.RDNs = append(dn.RDNs, rdn)
}
return dn, nil
}
+
+// Equal returns true if the DNs are equal as defined by rfc4517 4.2.15 (distinguishedNameMatch).
+// Returns true if they have the same number of relative distinguished names
+// and corresponding relative distinguished names (by position) are the same.
+func (d *DN) Equal(other *DN) bool {
+ if len(d.RDNs) != len(other.RDNs) {
+ return false
+ }
+ for i := range d.RDNs {
+ if !d.RDNs[i].Equal(other.RDNs[i]) {
+ return false
+ }
+ }
+ return true
+}
+
+// AncestorOf returns true if the other DN consists of at least one RDN followed by all the RDNs of the current DN.
+// "ou=widgets,o=acme.com" is an ancestor of "ou=sprockets,ou=widgets,o=acme.com"
+// "ou=widgets,o=acme.com" is not an ancestor of "ou=sprockets,ou=widgets,o=foo.com"
+// "ou=widgets,o=acme.com" is not an ancestor of "ou=widgets,o=acme.com"
+func (d *DN) AncestorOf(other *DN) bool {
+ if len(d.RDNs) >= len(other.RDNs) {
+ return false
+ }
+ // Take the last `len(d.RDNs)` RDNs from the other DN to compare against
+ otherRDNs := other.RDNs[len(other.RDNs)-len(d.RDNs):]
+ for i := range d.RDNs {
+ if !d.RDNs[i].Equal(otherRDNs[i]) {
+ return false
+ }
+ }
+ return true
+}
+
+// Equal returns true if the RelativeDNs are equal as defined by rfc4517 4.2.15 (distinguishedNameMatch).
+// Relative distinguished names are the same if and only if they have the same number of AttributeTypeAndValues
+// and each attribute of the first RDN is the same as the attribute of the second RDN with the same attribute type.
+// The order of attributes is not significant.
+// Case of attribute types is not significant.
+func (r *RelativeDN) Equal(other *RelativeDN) bool {
+ if len(r.Attributes) != len(other.Attributes) {
+ return false
+ }
+ return r.hasAllAttributes(other.Attributes) && other.hasAllAttributes(r.Attributes)
+}
+
+func (r *RelativeDN) hasAllAttributes(attrs []*AttributeTypeAndValue) bool {
+ for _, attr := range attrs {
+ found := false
+ for _, myattr := range r.Attributes {
+ if myattr.Equal(attr) {
+ found = true
+ break
+ }
+ }
+ if !found {
+ return false
+ }
+ }
+ return true
+}
+
+// Equal returns true if the AttributeTypeAndValue is equivalent to the specified AttributeTypeAndValue
+// Case of the attribute type is not significant
+func (a *AttributeTypeAndValue) Equal(other *AttributeTypeAndValue) bool {
+ return strings.EqualFold(a.Type, other.Type) && a.Value == other.Value
+}
diff --git a/vendor/github.com/go-ldap/ldap/dn_test.go b/vendor/github.com/go-ldap/ldap/dn_test.go
index 39817c42741..af5fc1468a5 100644
--- a/vendor/github.com/go-ldap/ldap/dn_test.go
+++ b/vendor/github.com/go-ldap/ldap/dn_test.go
@@ -31,6 +31,22 @@ func TestSuccessfulDNParsing(t *testing.T) {
&ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{&ldap.AttributeTypeAndValue{"DC", "net"}}}}},
"CN=Lu\\C4\\8Di\\C4\\87": ldap.DN{[]*ldap.RelativeDN{
&ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{&ldap.AttributeTypeAndValue{"CN", "Lučić"}}}}},
+ " CN = Lu\\C4\\8Di\\C4\\87 ": ldap.DN{[]*ldap.RelativeDN{
+ &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{&ldap.AttributeTypeAndValue{"CN", "Lučić"}}}}},
+ ` A = 1 , B = 2 `: ldap.DN{[]*ldap.RelativeDN{
+ &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{&ldap.AttributeTypeAndValue{"A", "1"}}},
+ &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{&ldap.AttributeTypeAndValue{"B", "2"}}}}},
+ ` A = 1 + B = 2 `: ldap.DN{[]*ldap.RelativeDN{
+ &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{
+ &ldap.AttributeTypeAndValue{"A", "1"},
+ &ldap.AttributeTypeAndValue{"B", "2"}}}}},
+ ` \ \ A\ \ = \ \ 1\ \ , \ \ B\ \ = \ \ 2\ \ `: ldap.DN{[]*ldap.RelativeDN{
+ &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{&ldap.AttributeTypeAndValue{" A ", " 1 "}}},
+ &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{&ldap.AttributeTypeAndValue{" B ", " 2 "}}}}},
+ ` \ \ A\ \ = \ \ 1\ \ + \ \ B\ \ = \ \ 2\ \ `: ldap.DN{[]*ldap.RelativeDN{
+ &ldap.RelativeDN{[]*ldap.AttributeTypeAndValue{
+ &ldap.AttributeTypeAndValue{" A ", " 1 "},
+ &ldap.AttributeTypeAndValue{" B ", " 2 "}}}}},
}
for test, answer := range testcases {
@@ -41,6 +57,13 @@ func TestSuccessfulDNParsing(t *testing.T) {
}
if !reflect.DeepEqual(dn, &answer) {
t.Errorf("Parsed DN %s is not equal to the expected structure", test)
+ t.Logf("Expected:")
+ for _, rdn := range answer.RDNs {
+ for _, attribs := range rdn.Attributes {
+ t.Logf("#%v\n", attribs)
+ }
+ }
+ t.Logf("Actual:")
for _, rdn := range dn.RDNs {
for _, attribs := range rdn.Attributes {
t.Logf("#%v\n", attribs)
@@ -52,11 +75,13 @@ func TestSuccessfulDNParsing(t *testing.T) {
func TestErrorDNParsing(t *testing.T) {
testcases := map[string]string{
- "*": "DN ended with incomplete type, value pair",
- "cn=Jim\\0Test": "Failed to decode escaped character: encoding/hex: invalid byte: U+0054 'T'",
- "cn=Jim\\0": "Got corrupted escaped character",
- "DC=example,=net": "DN ended with incomplete type, value pair",
- "1=#0402486": "Failed to decode BER encoding: encoding/hex: odd length hex string",
+ "*": "DN ended with incomplete type, value pair",
+ "cn=Jim\\0Test": "Failed to decode escaped character: encoding/hex: invalid byte: U+0054 'T'",
+ "cn=Jim\\0": "Got corrupted escaped character",
+ "DC=example,=net": "DN ended with incomplete type, value pair",
+ "1=#0402486": "Failed to decode BER encoding: encoding/hex: odd length hex string",
+ "test,DC=example,DC=com": "incomplete type, value pair",
+ "=test,DC=example,DC=com": "incomplete type, value pair",
}
for test, answer := range testcases {
@@ -68,3 +93,119 @@ func TestErrorDNParsing(t *testing.T) {
}
}
}
+
+func TestDNEqual(t *testing.T) {
+ testcases := []struct {
+ A string
+ B string
+ Equal bool
+ }{
+ // Exact match
+ {"", "", true},
+ {"o=A", "o=A", true},
+ {"o=A", "o=B", false},
+
+ {"o=A,o=B", "o=A,o=B", true},
+ {"o=A,o=B", "o=A,o=C", false},
+
+ {"o=A+o=B", "o=A+o=B", true},
+ {"o=A+o=B", "o=A+o=C", false},
+
+ // Case mismatch in type is ignored
+ {"o=A", "O=A", true},
+ {"o=A,o=B", "o=A,O=B", true},
+ {"o=A+o=B", "o=A+O=B", true},
+
+ // Case mismatch in value is significant
+ {"o=a", "O=A", false},
+ {"o=a,o=B", "o=A,O=B", false},
+ {"o=a+o=B", "o=A+O=B", false},
+
+ // Multi-valued RDN order mismatch is ignored
+ {"o=A+o=B", "O=B+o=A", true},
+ // Number of RDN attributes is significant
+ {"o=A+o=B", "O=B+o=A+O=B", false},
+
+ // Missing values are significant
+ {"o=A+o=B", "O=B+o=A+O=C", false}, // missing values matter
+ {"o=A+o=B+o=C", "O=B+o=A", false}, // missing values matter
+
+ // Whitespace tests
+ // Matching
+ {
+ "cn=John Doe, ou=People, dc=sun.com",
+ "cn=John Doe, ou=People, dc=sun.com",
+ true,
+ },
+ // Difference in leading/trailing chars is ignored
+ {
+ "cn=John Doe, ou=People, dc=sun.com",
+ "cn=John Doe,ou=People,dc=sun.com",
+ true,
+ },
+ // Difference in values is significant
+ {
+ "cn=John Doe, ou=People, dc=sun.com",
+ "cn=John Doe, ou=People, dc=sun.com",
+ false,
+ },
+ }
+
+ for i, tc := range testcases {
+ a, err := ldap.ParseDN(tc.A)
+ if err != nil {
+ t.Errorf("%d: %v", i, err)
+ continue
+ }
+ b, err := ldap.ParseDN(tc.B)
+ if err != nil {
+ t.Errorf("%d: %v", i, err)
+ continue
+ }
+ if expected, actual := tc.Equal, a.Equal(b); expected != actual {
+ t.Errorf("%d: when comparing '%s' and '%s' expected %v, got %v", i, tc.A, tc.B, expected, actual)
+ continue
+ }
+ if expected, actual := tc.Equal, b.Equal(a); expected != actual {
+ t.Errorf("%d: when comparing '%s' and '%s' expected %v, got %v", i, tc.A, tc.B, expected, actual)
+ continue
+ }
+ }
+}
+
+func TestDNAncestor(t *testing.T) {
+ testcases := []struct {
+ A string
+ B string
+ Ancestor bool
+ }{
+ // Exact match returns false
+ {"", "", false},
+ {"o=A", "o=A", false},
+ {"o=A,o=B", "o=A,o=B", false},
+ {"o=A+o=B", "o=A+o=B", false},
+
+ // Mismatch
+ {"ou=C,ou=B,o=A", "ou=E,ou=D,ou=B,o=A", false},
+
+ // Descendant
+ {"ou=C,ou=B,o=A", "ou=E,ou=C,ou=B,o=A", true},
+ }
+
+ for i, tc := range testcases {
+ a, err := ldap.ParseDN(tc.A)
+ if err != nil {
+ t.Errorf("%d: %v", i, err)
+ continue
+ }
+ b, err := ldap.ParseDN(tc.B)
+ if err != nil {
+ t.Errorf("%d: %v", i, err)
+ continue
+ }
+ if expected, actual := tc.Ancestor, a.AncestorOf(b); expected != actual {
+ t.Errorf("%d: when comparing '%s' and '%s' expected %v, got %v", i, tc.A, tc.B, expected, actual)
+ continue
+ }
+ }
+}
diff --git a/vendor/github.com/go-ldap/ldap/error.go b/vendor/github.com/go-ldap/ldap/error.go
index 2dbc30ac085..4cccb537fdd 100644
--- a/vendor/github.com/go-ldap/ldap/error.go
+++ b/vendor/github.com/go-ldap/ldap/error.go
@@ -56,6 +56,7 @@ const (
ErrorUnexpectedResponse = 205
)
+// LDAPResultCodeMap contains string descriptions for LDAP error codes
var LDAPResultCodeMap = map[uint8]string{
LDAPResultSuccess: "Success",
LDAPResultOperationsError: "Operations Error",
@@ -96,11 +97,23 @@ var LDAPResultCodeMap = map[uint8]string{
LDAPResultObjectClassModsProhibited: "Object Class Mods Prohibited",
LDAPResultAffectsMultipleDSAs: "Affects Multiple DSAs",
LDAPResultOther: "Other",
+
+ ErrorNetwork: "Network Error",
+ ErrorFilterCompile: "Filter Compile Error",
+ ErrorFilterDecompile: "Filter Decompile Error",
+ ErrorDebugging: "Debugging Error",
+ ErrorUnexpectedMessage: "Unexpected Message",
+ ErrorUnexpectedResponse: "Unexpected Response",
}
func getLDAPResultCode(packet *ber.Packet) (code uint8, description string) {
- if len(packet.Children) >= 2 {
+ if packet == nil {
+ return ErrorUnexpectedResponse, "Empty packet"
+ } else if len(packet.Children) >= 2 {
response := packet.Children[1]
+ if response == nil {
+ return ErrorUnexpectedResponse, "Empty response in packet"
+ }
if response.ClassType == ber.ClassApplication && response.TagType == ber.TypeConstructed && len(response.Children) >= 3 {
// Children[1].Children[2] is the diagnosticMessage which is guaranteed to exist as seen here: https://tools.ietf.org/html/rfc4511#section-4.1.9
return uint8(response.Children[0].Value.(int64)), response.Children[2].Value.(string)
@@ -110,8 +123,11 @@ func getLDAPResultCode(packet *ber.Packet) (code uint8, description string) {
return ErrorNetwork, "Invalid packet format"
}
+// Error holds LDAP error information
type Error struct {
- Err error
+ // Err is the underlying error
+ Err error
+ // ResultCode is the LDAP error code
ResultCode uint8
}
@@ -119,10 +135,12 @@ func (e *Error) Error() string {
return fmt.Sprintf("LDAP Result Code %d %q: %s", e.ResultCode, LDAPResultCodeMap[e.ResultCode], e.Err.Error())
}
+// NewError creates an LDAP error with the given code and underlying error
func NewError(resultCode uint8, err error) error {
return &Error{ResultCode: resultCode, Err: err}
}
+// IsErrorWithCode returns true if the given error is an LDAP error with the given result code
func IsErrorWithCode(err error, desiredResultCode uint8) bool {
if err == nil {
return false
diff --git a/vendor/github.com/go-ldap/ldap/example_test.go b/vendor/github.com/go-ldap/ldap/example_test.go
index b018a966489..650af0a43e3 100644
--- a/vendor/github.com/go-ldap/ldap/example_test.go
+++ b/vendor/github.com/go-ldap/ldap/example_test.go
@@ -9,7 +9,7 @@ import (
)
// ExampleConn_Bind demonstrates how to bind a connection to an ldap user
-// allowing access to restricted attrabutes that user has access to
+// allowing access to restricted attributes that user has access to
func ExampleConn_Bind() {
l, err := ldap.Dial("tcp", fmt.Sprintf("%s:%d", "ldap.example.com", 389))
if err != nil {
@@ -63,10 +63,10 @@ func ExampleConn_StartTLS() {
log.Fatal(err)
}
- // Opertations via l are now encrypted
+ // Operations via l are now encrypted
}
-// ExampleConn_Compare demonstrates how to comapre an attribute with a value
+// ExampleConn_Compare demonstrates how to compare an attribute with a value
func ExampleConn_Compare() {
l, err := ldap.Dial("tcp", fmt.Sprintf("%s:%d", "ldap.example.com", 389))
if err != nil {
@@ -193,7 +193,7 @@ func Example_userAuthentication() {
searchRequest := ldap.NewSearchRequest(
"dc=example,dc=com",
ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false,
- fmt.Sprintf("(&(objectClass=organizationalPerson)&(uid=%s))", username),
+ fmt.Sprintf("(&(objectClass=organizationalPerson)(uid=%s))", username),
[]string{"dn"},
nil,
)
@@ -215,7 +215,7 @@ func Example_userAuthentication() {
log.Fatal(err)
}
- // Rebind as the read only user for any futher queries
+ // Rebind as the read only user for any further queries
err = l.Bind(bindusername, bindpassword)
if err != nil {
log.Fatal(err)
@@ -240,7 +240,7 @@ func Example_beherappolicy() {
if ppolicyControl != nil {
ppolicy = ppolicyControl.(*ldap.ControlBeheraPasswordPolicy)
} else {
- log.Printf("ppolicyControl response not avaliable.\n")
+ log.Printf("ppolicyControl response not available.\n")
}
if err != nil {
errStr := "ERROR: Cannot bind: " + err.Error()
diff --git a/vendor/github.com/go-ldap/ldap/filter.go b/vendor/github.com/go-ldap/ldap/filter.go
index 63bcec1e3ae..3858a2865c0 100644
--- a/vendor/github.com/go-ldap/ldap/filter.go
+++ b/vendor/github.com/go-ldap/ldap/filter.go
@@ -15,6 +15,7 @@ import (
"gopkg.in/asn1-ber.v1"
)
+// Filter choices
const (
FilterAnd = 0
FilterOr = 1
@@ -28,6 +29,7 @@ const (
FilterExtensibleMatch = 9
)
+// FilterMap contains human readable descriptions of Filter choices
var FilterMap = map[uint64]string{
FilterAnd: "And",
FilterOr: "Or",
@@ -41,18 +43,21 @@ var FilterMap = map[uint64]string{
FilterExtensibleMatch: "Extensible Match",
}
+// SubstringFilter options
const (
FilterSubstringsInitial = 0
FilterSubstringsAny = 1
FilterSubstringsFinal = 2
)
+// FilterSubstringsMap contains human readable descriptions of SubstringFilter choices
var FilterSubstringsMap = map[uint64]string{
FilterSubstringsInitial: "Substrings Initial",
FilterSubstringsAny: "Substrings Any",
FilterSubstringsFinal: "Substrings Final",
}
+// MatchingRuleAssertion choices
const (
MatchingRuleAssertionMatchingRule = 1
MatchingRuleAssertionType = 2
@@ -60,6 +65,7 @@ const (
MatchingRuleAssertionDNAttributes = 4
)
+// MatchingRuleAssertionMap contains human readable descriptions of MatchingRuleAssertion choices
var MatchingRuleAssertionMap = map[uint64]string{
MatchingRuleAssertionMatchingRule: "Matching Rule Assertion Matching Rule",
MatchingRuleAssertionType: "Matching Rule Assertion Type",
@@ -67,6 +73,7 @@ var MatchingRuleAssertionMap = map[uint64]string{
MatchingRuleAssertionDNAttributes: "Matching Rule Assertion DN Attributes",
}
+// CompileFilter converts a string representation of a filter into a BER-encoded packet
func CompileFilter(filter string) (*ber.Packet, error) {
if len(filter) == 0 || filter[0] != '(' {
return nil, NewError(ErrorFilterCompile, errors.New("ldap: filter does not start with an '('"))
@@ -75,12 +82,16 @@ func CompileFilter(filter string) (*ber.Packet, error) {
if err != nil {
return nil, err
}
- if pos != len(filter) {
+ switch {
+ case pos > len(filter):
+ return nil, NewError(ErrorFilterCompile, errors.New("ldap: unexpected end of filter"))
+ case pos < len(filter):
return nil, NewError(ErrorFilterCompile, errors.New("ldap: finished compiling filter with extra at end: "+fmt.Sprint(filter[pos:])))
}
return packet, nil
}
+// DecompileFilter converts a packet representation of a filter into a string representation
func DecompileFilter(packet *ber.Packet) (ret string, err error) {
defer func() {
if r := recover(); r != nil {
@@ -239,11 +250,13 @@ func compileFilter(filter string, pos int) (*ber.Packet, int, error) {
packet.AppendChild(child)
return packet, newPos, err
default:
- READING_ATTR := 0
- READING_EXTENSIBLE_MATCHING_RULE := 1
- READING_CONDITION := 2
+ const (
+ stateReadingAttr = 0
+ stateReadingExtensibleMatchingRule = 1
+ stateReadingCondition = 2
+ )
- state := READING_ATTR
+ state := stateReadingAttr
attribute := ""
extensibleDNAttributes := false
@@ -261,56 +274,56 @@ func compileFilter(filter string, pos int) (*ber.Packet, int, error) {
}
switch state {
- case READING_ATTR:
+ case stateReadingAttr:
switch {
// Extensible rule, with only DN-matching
case currentRune == ':' && strings.HasPrefix(remainingFilter, ":dn:="):
packet = ber.Encode(ber.ClassContext, ber.TypeConstructed, FilterExtensibleMatch, nil, FilterMap[FilterExtensibleMatch])
extensibleDNAttributes = true
- state = READING_CONDITION
+ state = stateReadingCondition
newPos += 5
// Extensible rule, with DN-matching and a matching OID
case currentRune == ':' && strings.HasPrefix(remainingFilter, ":dn:"):
packet = ber.Encode(ber.ClassContext, ber.TypeConstructed, FilterExtensibleMatch, nil, FilterMap[FilterExtensibleMatch])
extensibleDNAttributes = true
- state = READING_EXTENSIBLE_MATCHING_RULE
+ state = stateReadingExtensibleMatchingRule
newPos += 4
// Extensible rule, with attr only
case currentRune == ':' && strings.HasPrefix(remainingFilter, ":="):
packet = ber.Encode(ber.ClassContext, ber.TypeConstructed, FilterExtensibleMatch, nil, FilterMap[FilterExtensibleMatch])
- state = READING_CONDITION
+ state = stateReadingCondition
newPos += 2
// Extensible rule, with no DN attribute matching
case currentRune == ':':
packet = ber.Encode(ber.ClassContext, ber.TypeConstructed, FilterExtensibleMatch, nil, FilterMap[FilterExtensibleMatch])
- state = READING_EXTENSIBLE_MATCHING_RULE
- newPos += 1
+ state = stateReadingExtensibleMatchingRule
+ newPos++
// Equality condition
case currentRune == '=':
packet = ber.Encode(ber.ClassContext, ber.TypeConstructed, FilterEqualityMatch, nil, FilterMap[FilterEqualityMatch])
- state = READING_CONDITION
- newPos += 1
+ state = stateReadingCondition
+ newPos++
// Greater-than or equal
case currentRune == '>' && strings.HasPrefix(remainingFilter, ">="):
packet = ber.Encode(ber.ClassContext, ber.TypeConstructed, FilterGreaterOrEqual, nil, FilterMap[FilterGreaterOrEqual])
- state = READING_CONDITION
+ state = stateReadingCondition
newPos += 2
// Less-than or equal
case currentRune == '<' && strings.HasPrefix(remainingFilter, "<="):
packet = ber.Encode(ber.ClassContext, ber.TypeConstructed, FilterLessOrEqual, nil, FilterMap[FilterLessOrEqual])
- state = READING_CONDITION
+ state = stateReadingCondition
newPos += 2
// Approx
case currentRune == '~' && strings.HasPrefix(remainingFilter, "~="):
packet = ber.Encode(ber.ClassContext, ber.TypeConstructed, FilterApproxMatch, nil, FilterMap[FilterApproxMatch])
- state = READING_CONDITION
+ state = stateReadingCondition
newPos += 2
// Still reading the attribute name
@@ -319,12 +332,12 @@ func compileFilter(filter string, pos int) (*ber.Packet, int, error) {
newPos += currentWidth
}
- case READING_EXTENSIBLE_MATCHING_RULE:
+ case stateReadingExtensibleMatchingRule:
switch {
// Matching rule OID is done
case currentRune == ':' && strings.HasPrefix(remainingFilter, ":="):
- state = READING_CONDITION
+ state = stateReadingCondition
newPos += 2
// Still reading the matching rule oid
@@ -333,7 +346,7 @@ func compileFilter(filter string, pos int) (*ber.Packet, int, error) {
newPos += currentWidth
}
- case READING_CONDITION:
+ case stateReadingCondition:
// append to the condition
condition += fmt.Sprintf("%c", currentRune)
newPos += currentWidth
@@ -369,9 +382,9 @@ func compileFilter(filter string, pos int) (*ber.Packet, int, error) {
}
// Add the value (only required child)
- encodedString, err := escapedStringToEncodedBytes(condition)
- if err != nil {
- return packet, newPos, err
+ encodedString, encodeErr := escapedStringToEncodedBytes(condition)
+ if encodeErr != nil {
+ return packet, newPos, encodeErr
}
packet.AppendChild(ber.NewString(ber.ClassContext, ber.TypePrimitive, MatchingRuleAssertionMatchValue, encodedString, MatchingRuleAssertionMap[MatchingRuleAssertionMatchValue]))
@@ -401,17 +414,17 @@ func compileFilter(filter string, pos int) (*ber.Packet, int, error) {
default:
tag = FilterSubstringsAny
}
- encodedString, err := escapedStringToEncodedBytes(part)
- if err != nil {
- return packet, newPos, err
+ encodedString, encodeErr := escapedStringToEncodedBytes(part)
+ if encodeErr != nil {
+ return packet, newPos, encodeErr
}
seq.AppendChild(ber.NewString(ber.ClassContext, ber.TypePrimitive, tag, encodedString, FilterSubstringsMap[uint64(tag)]))
}
packet.AppendChild(seq)
default:
- encodedString, err := escapedStringToEncodedBytes(condition)
- if err != nil {
- return packet, newPos, err
+ encodedString, encodeErr := escapedStringToEncodedBytes(condition)
+ if encodeErr != nil {
+ return packet, newPos, encodeErr
}
packet.AppendChild(ber.NewString(ber.ClassUniversal, ber.TypePrimitive, ber.TagOctetString, attribute, "Attribute"))
packet.AppendChild(ber.NewString(ber.ClassUniversal, ber.TypePrimitive, ber.TagOctetString, encodedString, "Condition"))
@@ -440,12 +453,12 @@ func escapedStringToEncodedBytes(escapedString string) (string, error) {
if i+2 > len(escapedString) {
return "", NewError(ErrorFilterCompile, errors.New("ldap: missing characters for escape in filter"))
}
- if escByte, decodeErr := hexpac.DecodeString(escapedString[i+1 : i+3]); decodeErr != nil {
+ escByte, decodeErr := hexpac.DecodeString(escapedString[i+1 : i+3])
+ if decodeErr != nil {
return "", NewError(ErrorFilterCompile, errors.New("ldap: invalid characters for escape in filter"))
- } else {
- buffer.WriteByte(escByte[0])
- i += 2 // +1 from end of loop, so 3 total for \xx.
}
+ buffer.WriteByte(escByte[0])
+ i += 2 // +1 from end of loop, so 3 total for \xx.
} else {
buffer.WriteRune(currentRune)
}
diff --git a/vendor/github.com/go-ldap/ldap/filter_test.go b/vendor/github.com/go-ldap/ldap/filter_test.go
index ae1b79b0c0d..2b019ac5dda 100644
--- a/vendor/github.com/go-ldap/ldap/filter_test.go
+++ b/vendor/github.com/go-ldap/ldap/filter_test.go
@@ -131,6 +131,12 @@ var testFilters = []compileTest{
expectedType: 0,
expectedErr: "unexpected end of filter",
},
+ compileTest{
+ filterStr: `((cn=)`,
+ expectedFilter: ``,
+ expectedType: 0,
+ expectedErr: "unexpected end of filter",
+ },
compileTest{
filterStr: `(&(objectclass=inetorgperson)(cn=中文))`,
expectedFilter: `(&(objectclass=inetorgperson)(cn=\e4\b8\ad\e6\96\87))`,
diff --git a/vendor/github.com/go-ldap/ldap/ldap.go b/vendor/github.com/go-ldap/ldap/ldap.go
index 1620aaea6ee..49692475697 100644
--- a/vendor/github.com/go-ldap/ldap/ldap.go
+++ b/vendor/github.com/go-ldap/ldap/ldap.go
@@ -9,7 +9,7 @@ import (
"io/ioutil"
"os"
- ber "gopkg.in/asn1-ber.v1"
+ "gopkg.in/asn1-ber.v1"
)
// LDAP Application Codes
@@ -36,6 +36,7 @@ const (
ApplicationExtendedResponse = 24
)
+// ApplicationMap contains human readable descriptions of LDAP Application Codes
var ApplicationMap = map[uint8]string{
ApplicationBindRequest: "Bind Request",
ApplicationBindResponse: "Bind Response",
@@ -72,6 +73,7 @@ const (
BeheraPasswordInHistory = 8
)
+// BeheraPasswordPolicyErrorMap contains human readable descriptions of Behera Password Policy error codes
var BeheraPasswordPolicyErrorMap = map[int8]string{
BeheraPasswordExpired: "Password expired",
BeheraAccountLocked: "Account locked",
@@ -151,16 +153,47 @@ func addLDAPDescriptions(packet *ber.Packet) (err error) {
func addControlDescriptions(packet *ber.Packet) {
packet.Description = "Controls"
for _, child := range packet.Children {
+ var value *ber.Packet
+ controlType := ""
child.Description = "Control"
- child.Children[0].Description = "Control Type (" + ControlTypeMap[child.Children[0].Value.(string)] + ")"
- value := child.Children[1]
- if len(child.Children) == 3 {
- child.Children[1].Description = "Criticality"
- value = child.Children[2]
- }
- value.Description = "Control Value"
+ switch len(child.Children) {
+ case 0:
+ // at least one child is required for control type
+ continue
- switch child.Children[0].Value.(string) {
+ case 1:
+ // just type, no criticality or value
+ controlType = child.Children[0].Value.(string)
+ child.Children[0].Description = "Control Type (" + ControlTypeMap[controlType] + ")"
+
+ case 2:
+ controlType = child.Children[0].Value.(string)
+ child.Children[0].Description = "Control Type (" + ControlTypeMap[controlType] + ")"
+ // Children[1] could be criticality or value (both are optional)
+ // duck-type on whether this is a boolean
+ if _, ok := child.Children[1].Value.(bool); ok {
+ child.Children[1].Description = "Criticality"
+ } else {
+ child.Children[1].Description = "Control Value"
+ value = child.Children[1]
+ }
+
+ case 3:
+ // criticality and value present
+ controlType = child.Children[0].Value.(string)
+ child.Children[0].Description = "Control Type (" + ControlTypeMap[controlType] + ")"
+ child.Children[1].Description = "Criticality"
+ child.Children[2].Description = "Control Value"
+ value = child.Children[2]
+
+ default:
+ // more than 3 children is invalid
+ continue
+ }
+ if value == nil {
+ continue
+ }
+ switch controlType {
case ControlTypePaging:
value.Description += " (Paging)"
if value.Value != nil {
@@ -186,18 +219,18 @@ func addControlDescriptions(packet *ber.Packet) {
for _, child := range sequence.Children {
if child.Tag == 0 {
//Warning
- child := child.Children[0]
- packet := ber.DecodePacket(child.Data.Bytes())
+ warningPacket := child.Children[0]
+ packet := ber.DecodePacket(warningPacket.Data.Bytes())
val, ok := packet.Value.(int64)
if ok {
- if child.Tag == 0 {
+ if warningPacket.Tag == 0 {
//timeBeforeExpiration
value.Description += " (TimeBeforeExpiration)"
- child.Value = val
- } else if child.Tag == 1 {
+ warningPacket.Value = val
+ } else if warningPacket.Tag == 1 {
//graceAuthNsRemaining
value.Description += " (GraceAuthNsRemaining)"
- child.Value = val
+ warningPacket.Value = val
}
}
} else if child.Tag == 1 {
@@ -237,6 +270,7 @@ func addDefaultLDAPResponseDescriptions(packet *ber.Packet) {
}
}
+// DebugBinaryFile reads and prints packets from the given filename
func DebugBinaryFile(fileName string) error {
file, err := ioutil.ReadFile(fileName)
if err != nil {
diff --git a/vendor/github.com/go-ldap/ldap/modify.go b/vendor/github.com/go-ldap/ldap/modify.go
index 4372a19dceb..e4ab6cefc7e 100644
--- a/vendor/github.com/go-ldap/ldap/modify.go
+++ b/vendor/github.com/go-ldap/ldap/modify.go
@@ -36,64 +36,76 @@ import (
"gopkg.in/asn1-ber.v1"
)
+// Change operation choices
const (
AddAttribute = 0
DeleteAttribute = 1
ReplaceAttribute = 2
)
+// PartialAttribute for a ModifyRequest as defined in https://tools.ietf.org/html/rfc4511
type PartialAttribute struct {
- attrType string
- attrVals []string
+ // Type is the type of the partial attribute
+ Type string
+ // Vals are the values of the partial attribute
+ Vals []string
}
func (p *PartialAttribute) encode() *ber.Packet {
seq := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "PartialAttribute")
- seq.AppendChild(ber.NewString(ber.ClassUniversal, ber.TypePrimitive, ber.TagOctetString, p.attrType, "Type"))
+ seq.AppendChild(ber.NewString(ber.ClassUniversal, ber.TypePrimitive, ber.TagOctetString, p.Type, "Type"))
set := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSet, nil, "AttributeValue")
- for _, value := range p.attrVals {
+ for _, value := range p.Vals {
set.AppendChild(ber.NewString(ber.ClassUniversal, ber.TypePrimitive, ber.TagOctetString, value, "Vals"))
}
seq.AppendChild(set)
return seq
}
+// ModifyRequest as defined in https://tools.ietf.org/html/rfc4511
type ModifyRequest struct {
- dn string
- addAttributes []PartialAttribute
- deleteAttributes []PartialAttribute
- replaceAttributes []PartialAttribute
+ // DN is the distinguishedName of the directory entry to modify
+ DN string
+ // AddAttributes contain the attributes to add
+ AddAttributes []PartialAttribute
+ // DeleteAttributes contain the attributes to delete
+ DeleteAttributes []PartialAttribute
+ // ReplaceAttributes contain the attributes to replace
+ ReplaceAttributes []PartialAttribute
}
+// Add inserts the given attribute to the list of attributes to add
func (m *ModifyRequest) Add(attrType string, attrVals []string) {
- m.addAttributes = append(m.addAttributes, PartialAttribute{attrType: attrType, attrVals: attrVals})
+ m.AddAttributes = append(m.AddAttributes, PartialAttribute{Type: attrType, Vals: attrVals})
}
+// Delete inserts the given attribute to the list of attributes to delete
func (m *ModifyRequest) Delete(attrType string, attrVals []string) {
- m.deleteAttributes = append(m.deleteAttributes, PartialAttribute{attrType: attrType, attrVals: attrVals})
+ m.DeleteAttributes = append(m.DeleteAttributes, PartialAttribute{Type: attrType, Vals: attrVals})
}
+// Replace inserts the given attribute to the list of attributes to replace
func (m *ModifyRequest) Replace(attrType string, attrVals []string) {
- m.replaceAttributes = append(m.replaceAttributes, PartialAttribute{attrType: attrType, attrVals: attrVals})
+ m.ReplaceAttributes = append(m.ReplaceAttributes, PartialAttribute{Type: attrType, Vals: attrVals})
}
func (m ModifyRequest) encode() *ber.Packet {
request := ber.Encode(ber.ClassApplication, ber.TypeConstructed, ApplicationModifyRequest, nil, "Modify Request")
- request.AppendChild(ber.NewString(ber.ClassUniversal, ber.TypePrimitive, ber.TagOctetString, m.dn, "DN"))
+ request.AppendChild(ber.NewString(ber.ClassUniversal, ber.TypePrimitive, ber.TagOctetString, m.DN, "DN"))
changes := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "Changes")
- for _, attribute := range m.addAttributes {
+ for _, attribute := range m.AddAttributes {
change := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "Change")
change.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagEnumerated, uint64(AddAttribute), "Operation"))
change.AppendChild(attribute.encode())
changes.AppendChild(change)
}
- for _, attribute := range m.deleteAttributes {
+ for _, attribute := range m.DeleteAttributes {
change := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "Change")
change.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagEnumerated, uint64(DeleteAttribute), "Operation"))
change.AppendChild(attribute.encode())
changes.AppendChild(change)
}
- for _, attribute := range m.replaceAttributes {
+ for _, attribute := range m.ReplaceAttributes {
change := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "Change")
change.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagEnumerated, uint64(ReplaceAttribute), "Operation"))
change.AppendChild(attribute.encode())
@@ -103,36 +115,38 @@ func (m ModifyRequest) encode() *ber.Packet {
return request
}
+// NewModifyRequest creates a modify request for the given DN
func NewModifyRequest(
dn string,
) *ModifyRequest {
return &ModifyRequest{
- dn: dn,
+ DN: dn,
}
}
+// Modify performs the ModifyRequest
func (l *Conn) Modify(modifyRequest *ModifyRequest) error {
- messageID := l.nextMessageID()
packet := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "LDAP Request")
- packet.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, messageID, "MessageID"))
+ packet.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, l.nextMessageID(), "MessageID"))
packet.AppendChild(modifyRequest.encode())
l.Debug.PrintPacket(packet)
- channel, err := l.sendMessage(packet)
+ msgCtx, err := l.sendMessage(packet)
if err != nil {
return err
}
- if channel == nil {
- return NewError(ErrorNetwork, errors.New("ldap: could not send message"))
- }
- defer l.finishMessage(messageID)
+ defer l.finishMessage(msgCtx)
- l.Debug.Printf("%d: waiting for response", messageID)
- packet = <-channel
- l.Debug.Printf("%d: got response %p", messageID, packet)
- if packet == nil {
- return NewError(ErrorNetwork, errors.New("ldap: could not retrieve message"))
+ l.Debug.Printf("%d: waiting for response", msgCtx.id)
+ packetResponse, ok := <-msgCtx.responses
+ if !ok {
+ return NewError(ErrorNetwork, errors.New("ldap: response channel closed"))
+ }
+ packet, err = packetResponse.ReadPacket()
+ l.Debug.Printf("%d: got response %p", msgCtx.id, packet)
+ if err != nil {
+ return err
}
if l.Debug {
@@ -151,6 +165,6 @@ func (l *Conn) Modify(modifyRequest *ModifyRequest) error {
log.Printf("Unexpected Response: %d", packet.Children[1].Tag)
}
- l.Debug.Printf("%d: returning", messageID)
+ l.Debug.Printf("%d: returning", msgCtx.id)
return nil
}
diff --git a/vendor/github.com/go-ldap/ldap/passwdmodify.go b/vendor/github.com/go-ldap/ldap/passwdmodify.go
index 508b11ed727..7d8246fd189 100644
--- a/vendor/github.com/go-ldap/ldap/passwdmodify.go
+++ b/vendor/github.com/go-ldap/ldap/passwdmodify.go
@@ -16,13 +16,21 @@ const (
passwordModifyOID = "1.3.6.1.4.1.4203.1.11.1"
)
+// PasswordModifyRequest implements the Password Modify Extended Operation as defined in https://www.ietf.org/rfc/rfc3062.txt
type PasswordModifyRequest struct {
+ // UserIdentity is an optional string representation of the user associated with the request.
+ // This string may or may not be an LDAPDN [RFC2253].
+ // If no UserIdentity field is present, the request acts up upon the password of the user currently associated with the LDAP session
UserIdentity string
- OldPassword string
- NewPassword string
+ // OldPassword, if present, contains the user's current password
+ OldPassword string
+ // NewPassword, if present, contains the desired password for this user
+ NewPassword string
}
+// PasswordModifyResult holds the server response to a PasswordModifyRequest
type PasswordModifyResult struct {
+ // GeneratedPassword holds a password generated by the server, if present
GeneratedPassword string
}
@@ -47,7 +55,7 @@ func (r *PasswordModifyRequest) encode() (*ber.Packet, error) {
return request, nil
}
-// Create a new PasswordModifyRequest
+// NewPasswordModifyRequest creates a new PasswordModifyRequest
//
// According to the RFC 3602:
// userIdentity is a string representing the user associated with the request.
@@ -72,11 +80,10 @@ func NewPasswordModifyRequest(userIdentity string, oldPassword string, newPasswo
}
}
+// PasswordModify performs the modification request
func (l *Conn) PasswordModify(passwordModifyRequest *PasswordModifyRequest) (*PasswordModifyResult, error) {
- messageID := l.nextMessageID()
-
packet := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "LDAP Request")
- packet.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, messageID, "MessageID"))
+ packet.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, l.nextMessageID(), "MessageID"))
encodedPasswordModifyRequest, err := passwordModifyRequest.encode()
if err != nil {
@@ -86,20 +93,24 @@ func (l *Conn) PasswordModify(passwordModifyRequest *PasswordModifyRequest) (*Pa
l.Debug.PrintPacket(packet)
- channel, err := l.sendMessage(packet)
+ msgCtx, err := l.sendMessage(packet)
if err != nil {
return nil, err
}
- if channel == nil {
- return nil, NewError(ErrorNetwork, errors.New("ldap: could not send message"))
- }
- defer l.finishMessage(messageID)
+ defer l.finishMessage(msgCtx)
result := &PasswordModifyResult{}
- l.Debug.Printf("%d: waiting for response", messageID)
- packet = <-channel
- l.Debug.Printf("%d: got response %p", messageID, packet)
+ l.Debug.Printf("%d: waiting for response", msgCtx.id)
+ packetResponse, ok := <-msgCtx.responses
+ if !ok {
+ return nil, NewError(ErrorNetwork, errors.New("ldap: response channel closed"))
+ }
+ packet, err = packetResponse.ReadPacket()
+ l.Debug.Printf("%d: got response %p", msgCtx.id, packet)
+ if err != nil {
+ return nil, err
+ }
if packet == nil {
return nil, NewError(ErrorNetwork, errors.New("ldap: could not retrieve message"))
@@ -124,10 +135,10 @@ func (l *Conn) PasswordModify(passwordModifyRequest *PasswordModifyRequest) (*Pa
extendedResponse := packet.Children[1]
for _, child := range extendedResponse.Children {
if child.Tag == 11 {
- passwordModifyReponseValue := ber.DecodePacket(child.Data.Bytes())
- if len(passwordModifyReponseValue.Children) == 1 {
- if passwordModifyReponseValue.Children[0].Tag == 0 {
- result.GeneratedPassword = ber.DecodeString(passwordModifyReponseValue.Children[0].Data.Bytes())
+ passwordModifyResponseValue := ber.DecodePacket(child.Data.Bytes())
+ if len(passwordModifyResponseValue.Children) == 1 {
+ if passwordModifyResponseValue.Children[0].Tag == 0 {
+ result.GeneratedPassword = ber.DecodeString(passwordModifyResponseValue.Children[0].Data.Bytes())
}
}
}
diff --git a/vendor/github.com/go-ldap/ldap/search.go b/vendor/github.com/go-ldap/ldap/search.go
index 23a2cf2b202..2a99894c94b 100644
--- a/vendor/github.com/go-ldap/ldap/search.go
+++ b/vendor/github.com/go-ldap/ldap/search.go
@@ -68,18 +68,21 @@ import (
"gopkg.in/asn1-ber.v1"
)
+// scope choices
const (
ScopeBaseObject = 0
ScopeSingleLevel = 1
ScopeWholeSubtree = 2
)
+// ScopeMap contains human readable descriptions of scope choices
var ScopeMap = map[int]string{
ScopeBaseObject: "Base Object",
ScopeSingleLevel: "Single Level",
ScopeWholeSubtree: "Whole Subtree",
}
+// derefAliases
const (
NeverDerefAliases = 0
DerefInSearching = 1
@@ -87,6 +90,7 @@ const (
DerefAlways = 3
)
+// DerefMap contains human readable descriptions of derefAliases choices
var DerefMap = map[int]string{
NeverDerefAliases: "NeverDerefAliases",
DerefInSearching: "DerefInSearching",
@@ -114,11 +118,15 @@ func NewEntry(dn string, attributes map[string][]string) *Entry {
}
}
+// Entry represents a single search result entry
type Entry struct {
- DN string
+ // DN is the distinguished name of the entry
+ DN string
+ // Attributes are the returned attributes for the entry
Attributes []*EntryAttribute
}
+// GetAttributeValues returns the values for the named attribute, or an empty list
func (e *Entry) GetAttributeValues(attribute string) []string {
for _, attr := range e.Attributes {
if attr.Name == attribute {
@@ -128,6 +136,7 @@ func (e *Entry) GetAttributeValues(attribute string) []string {
return []string{}
}
+// GetRawAttributeValues returns the byte values for the named attribute, or an empty list
func (e *Entry) GetRawAttributeValues(attribute string) [][]byte {
for _, attr := range e.Attributes {
if attr.Name == attribute {
@@ -137,6 +146,7 @@ func (e *Entry) GetRawAttributeValues(attribute string) [][]byte {
return [][]byte{}
}
+// GetAttributeValue returns the first value for the named attribute, or ""
func (e *Entry) GetAttributeValue(attribute string) string {
values := e.GetAttributeValues(attribute)
if len(values) == 0 {
@@ -145,6 +155,7 @@ func (e *Entry) GetAttributeValue(attribute string) string {
return values[0]
}
+// GetRawAttributeValue returns the first value for the named attribute, or an empty slice
func (e *Entry) GetRawAttributeValue(attribute string) []byte {
values := e.GetRawAttributeValues(attribute)
if len(values) == 0 {
@@ -153,6 +164,7 @@ func (e *Entry) GetRawAttributeValue(attribute string) []byte {
return values[0]
}
+// Print outputs a human-readable description
func (e *Entry) Print() {
fmt.Printf("DN: %s\n", e.DN)
for _, attr := range e.Attributes {
@@ -160,6 +172,7 @@ func (e *Entry) Print() {
}
}
+// PrettyPrint outputs a human-readable description indenting
func (e *Entry) PrettyPrint(indent int) {
fmt.Printf("%sDN: %s\n", strings.Repeat(" ", indent), e.DN)
for _, attr := range e.Attributes {
@@ -180,38 +193,51 @@ func NewEntryAttribute(name string, values []string) *EntryAttribute {
}
}
+// EntryAttribute holds a single attribute
type EntryAttribute struct {
- Name string
- Values []string
+ // Name is the name of the attribute
+ Name string
+ // Values contain the string values of the attribute
+ Values []string
+ // ByteValues contain the raw values of the attribute
ByteValues [][]byte
}
+// Print outputs a human-readable description
func (e *EntryAttribute) Print() {
fmt.Printf("%s: %s\n", e.Name, e.Values)
}
+// PrettyPrint outputs a human-readable description with indenting
func (e *EntryAttribute) PrettyPrint(indent int) {
fmt.Printf("%s%s: %s\n", strings.Repeat(" ", indent), e.Name, e.Values)
}
+// SearchResult holds the server's response to a search request
type SearchResult struct {
- Entries []*Entry
+ // Entries are the returned entries
+ Entries []*Entry
+ // Referrals are the returned referrals
Referrals []string
- Controls []Control
+ // Controls are the returned controls
+ Controls []Control
}
+// Print outputs a human-readable description
func (s *SearchResult) Print() {
for _, entry := range s.Entries {
entry.Print()
}
}
+// PrettyPrint outputs a human-readable description with indenting
func (s *SearchResult) PrettyPrint(indent int) {
for _, entry := range s.Entries {
entry.PrettyPrint(indent)
}
}
+// SearchRequest represents a search request to send to the server
type SearchRequest struct {
BaseDN string
Scope int
@@ -247,6 +273,7 @@ func (s *SearchRequest) encode() (*ber.Packet, error) {
return request, nil
}
+// NewSearchRequest creates a new search request
func NewSearchRequest(
BaseDN string,
Scope, DerefAliases, SizeLimit, TimeLimit int,
@@ -341,10 +368,10 @@ func (l *Conn) SearchWithPaging(searchRequest *SearchRequest, pagingSize uint32)
return searchResult, nil
}
+// Search performs the given search request
func (l *Conn) Search(searchRequest *SearchRequest) (*SearchResult, error) {
- messageID := l.nextMessageID()
packet := ber.Encode(ber.ClassUniversal, ber.TypeConstructed, ber.TagSequence, nil, "LDAP Request")
- packet.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, messageID, "MessageID"))
+ packet.AppendChild(ber.NewInteger(ber.ClassUniversal, ber.TypePrimitive, ber.TagInteger, l.nextMessageID(), "MessageID"))
// encode search request
encodedSearchRequest, err := searchRequest.encode()
if err != nil {
@@ -358,14 +385,11 @@ func (l *Conn) Search(searchRequest *SearchRequest) (*SearchResult, error) {
l.Debug.PrintPacket(packet)
- channel, err := l.sendMessage(packet)
+ msgCtx, err := l.sendMessage(packet)
if err != nil {
return nil, err
}
- if channel == nil {
- return nil, NewError(ErrorNetwork, errors.New("ldap: could not send message"))
- }
- defer l.finishMessage(messageID)
+ defer l.finishMessage(msgCtx)
result := &SearchResult{
Entries: make([]*Entry, 0),
@@ -374,11 +398,15 @@ func (l *Conn) Search(searchRequest *SearchRequest) (*SearchResult, error) {
foundSearchResultDone := false
for !foundSearchResultDone {
- l.Debug.Printf("%d: waiting for response", messageID)
- packet = <-channel
- l.Debug.Printf("%d: got response %p", messageID, packet)
- if packet == nil {
- return nil, NewError(ErrorNetwork, errors.New("ldap: could not retrieve message"))
+ l.Debug.Printf("%d: waiting for response", msgCtx.id)
+ packetResponse, ok := <-msgCtx.responses
+ if !ok {
+ return nil, NewError(ErrorNetwork, errors.New("ldap: response channel closed"))
+ }
+ packet, err = packetResponse.ReadPacket()
+ l.Debug.Printf("%d: got response %p", msgCtx.id, packet)
+ if err != nil {
+ return nil, err
}
if l.Debug {
@@ -417,6 +445,6 @@ func (l *Conn) Search(searchRequest *SearchRequest) (*SearchResult, error) {
result.Referrals = append(result.Referrals, packet.Children[1].Children[0].Value.(string))
}
}
- l.Debug.Printf("%d: returning", messageID)
+ l.Debug.Printf("%d: returning", msgCtx.id)
return result, nil
}
diff --git a/vendor/github.com/go-ldap/ldap/search_test.go b/vendor/github.com/go-ldap/ldap/search_test.go
index efb8147d1a5..5f77b22e9a2 100644
--- a/vendor/github.com/go-ldap/ldap/search_test.go
+++ b/vendor/github.com/go-ldap/ldap/search_test.go
@@ -15,7 +15,7 @@ func TestNewEntry(t *testing.T) {
"delta": {"value"},
"epsilon": {"value"},
}
- exectedEntry := NewEntry(dn, attributes)
+ executedEntry := NewEntry(dn, attributes)
iteration := 0
for {
@@ -23,8 +23,8 @@ func TestNewEntry(t *testing.T) {
break
}
testEntry := NewEntry(dn, attributes)
- if !reflect.DeepEqual(exectedEntry, testEntry) {
- t.Fatalf("consequent calls to NewEntry did not yield the same result:\n\texpected:\n\t%s\n\tgot:\n\t%s\n", exectedEntry, testEntry)
+ if !reflect.DeepEqual(executedEntry, testEntry) {
+ t.Fatalf("subsequent calls to NewEntry did not yield the same result:\n\texpected:\n\t%s\n\tgot:\n\t%s\n", executedEntry, testEntry)
}
iteration = iteration + 1
}
diff --git a/vendor/github.com/go-macaron/binding/.gitignore b/vendor/github.com/go-macaron/binding/.gitignore
new file mode 100644
index 00000000000..485dee64bcf
--- /dev/null
+++ b/vendor/github.com/go-macaron/binding/.gitignore
@@ -0,0 +1 @@
+.idea
diff --git a/vendor/github.com/go-macaron/binding/README.md b/vendor/github.com/go-macaron/binding/README.md
index a6748b57a1d..aeaa5719399 100644
--- a/vendor/github.com/go-macaron/binding/README.md
+++ b/vendor/github.com/go-macaron/binding/README.md
@@ -1,4 +1,4 @@
-# binding [](https://travis-ci.org/go-macaron/binding) [](http://gocover.io/github.com/go-macaron/binding)
+# binding [](https://travis-ci.org/go-macaron/binding) [](https://sourcegraph.com/github.com/go-macaron/binding?badge)
Middleware binding provides request data binding and validation for [Macaron](https://github.com/go-macaron/macaron).
diff --git a/vendor/github.com/go-macaron/binding/binding.go b/vendor/github.com/go-macaron/binding/binding.go
index dbd7beb45f6..5d178b7e1a8 100644
--- a/vendor/github.com/go-macaron/binding/binding.go
+++ b/vendor/github.com/go-macaron/binding/binding.go
@@ -22,6 +22,7 @@ import (
"io"
"mime/multipart"
"net/http"
+ "net/url"
"reflect"
"regexp"
"strconv"
@@ -32,7 +33,7 @@ import (
"gopkg.in/macaron.v1"
)
-const _VERSION = "0.3.2"
+const _VERSION = "0.6.0"
func Version() string {
return _VERSION
@@ -211,13 +212,35 @@ func Json(jsonStruct interface{}, ifacePtr ...interface{}) macaron.Handler {
}
}
+// RawValidate is same as Validate but does not require a HTTP context,
+// and can be used independently just for validation.
+// This function does not support Validator interface.
+func RawValidate(obj interface{}) Errors {
+ var errs Errors
+ v := reflect.ValueOf(obj)
+ k := v.Kind()
+ if k == reflect.Interface || k == reflect.Ptr {
+ v = v.Elem()
+ k = v.Kind()
+ }
+ if k == reflect.Slice || k == reflect.Array {
+ for i := 0; i < v.Len(); i++ {
+ e := v.Index(i).Interface()
+ errs = validateStruct(errs, e)
+ }
+ } else {
+ errs = validateStruct(errs, obj)
+ }
+ return errs
+}
+
// Validate is middleware to enforce required fields. If the struct
// passed in implements Validator, then the user-defined Validate method
// is executed, and its errors are mapped to the context. This middleware
// performs no error handling: it merely detects errors and maps them.
func Validate(obj interface{}) macaron.Handler {
return func(ctx *macaron.Context) {
- var errors Errors
+ var errs Errors
v := reflect.ValueOf(obj)
k := v.Kind()
if k == reflect.Interface || k == reflect.Ptr {
@@ -227,18 +250,18 @@ func Validate(obj interface{}) macaron.Handler {
if k == reflect.Slice || k == reflect.Array {
for i := 0; i < v.Len(); i++ {
e := v.Index(i).Interface()
- errors = validateStruct(errors, e)
+ errs = validateStruct(errs, e)
if validator, ok := e.(Validator); ok {
- errors = validator.Validate(ctx, errors)
+ errs = validator.Validate(ctx, errs)
}
}
} else {
- errors = validateStruct(errors, obj)
+ errs = validateStruct(errs, obj)
if validator, ok := obj.(Validator); ok {
- errors = validator.Validate(ctx, errors)
+ errs = validator.Validate(ctx, errs)
}
}
- ctx.Map(errors)
+ ctx.Map(errs)
}
}
@@ -246,9 +269,42 @@ var (
AlphaDashPattern = regexp.MustCompile("[^\\d\\w-_]")
AlphaDashDotPattern = regexp.MustCompile("[^\\d\\w-_\\.]")
EmailPattern = regexp.MustCompile("[\\w!#$%&'*+/=?^_`{|}~-]+(?:\\.[\\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\\w](?:[\\w-]*[\\w])?\\.)+[a-zA-Z0-9](?:[\\w-]*[\\w])?")
- URLPattern = regexp.MustCompile(`(http|https):\/\/(?:\\S+(?::\\S*)?@)?[\w\-_]+(\.[\w\-_]+)*([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?`)
)
+// Copied from github.com/asaskevich/govalidator.
+const _MAX_URL_RUNE_COUNT = 2083
+const _MIN_URL_RUNE_COUNT = 3
+
+var (
+ urlSchemaRx = `((ftp|tcp|udp|wss?|https?):\/\/)`
+ urlUsernameRx = `(\S+(:\S*)?@)`
+ urlIPRx = `([1-9]\d?|1\d\d|2[01]\d|22[0-3])(\.(1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.([0-9]\d?|1\d\d|2[0-4]\d|25[0-4]))`
+ ipRx = `(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))`
+ urlSubdomainRx = `((www\.)|([a-zA-Z0-9]([-\.][-\._a-zA-Z0-9]+)*))`
+ urlPortRx = `(:(\d{1,5}))`
+ urlPathRx = `((\/|\?|#)[^\s]*)`
+ URLPattern = regexp.MustCompile(`^` + urlSchemaRx + `?` + urlUsernameRx + `?` + `((` + urlIPRx + `|(\[` + ipRx + `\])|(([a-zA-Z0-9]([a-zA-Z0-9-_]+)?[a-zA-Z0-9]([-\.][a-zA-Z0-9]+)*)|(` + urlSubdomainRx + `?))?(([a-zA-Z\x{00a1}-\x{ffff}0-9]+-?-?)*[a-zA-Z\x{00a1}-\x{ffff}0-9]+)(?:\.([a-zA-Z\x{00a1}-\x{ffff}]{1,}))?))\.?` + urlPortRx + `?` + urlPathRx + `?$`)
+)
+
+// IsURL check if the string is an URL.
+func isURL(str string) bool {
+ if str == "" || utf8.RuneCountInString(str) >= _MAX_URL_RUNE_COUNT || len(str) <= _MIN_URL_RUNE_COUNT || strings.HasPrefix(str, ".") {
+ return false
+ }
+ u, err := url.Parse(str)
+ if err != nil {
+ return false
+ }
+ if strings.HasPrefix(u.Host, ".") {
+ return false
+ }
+ if u.Host == "" && (u.Path != "" && !strings.Contains(u.Path, ".")) {
+ return false
+ }
+ return URLPattern.MatchString(str)
+
+}
+
type (
// Rule represents a validation rule.
Rule struct {
@@ -257,18 +313,34 @@ type (
// IsValid applies validation rule to condition.
IsValid func(Errors, string, interface{}) (bool, Errors)
}
- // RuleMapper represents a validation rule mapper,
+
+ // ParamRule does same thing as Rule but passes rule itself to IsValid method.
+ ParamRule struct {
+ // IsMatch checks if rule matches.
+ IsMatch func(string) bool
+ // IsValid applies validation rule to condition.
+ IsValid func(Errors, string, string, interface{}) (bool, Errors)
+ }
+
+ // RuleMapper and ParamRuleMapper represent validation rule mappers,
// it allwos users to add custom validation rules.
- RuleMapper []*Rule
+ RuleMapper []*Rule
+ ParamRuleMapper []*ParamRule
)
var ruleMapper RuleMapper
+var paramRuleMapper ParamRuleMapper
// AddRule adds new validation rule.
func AddRule(r *Rule) {
ruleMapper = append(ruleMapper, r)
}
+// AddParamRule adds new validation rule.
+func AddParamRule(r *ParamRule) {
+ paramRuleMapper = append(paramRuleMapper, r)
+}
+
func in(fieldValue interface{}, arr string) bool {
val := fmt.Sprintf("%v", fieldValue)
vals := strings.Split(arr, ",")
@@ -356,6 +428,16 @@ VALIDATE_RULES:
break VALIDATE_RULES
}
case rule == "Required":
+ v := reflect.ValueOf(fieldValue)
+ if v.Kind() == reflect.Slice {
+ if v.Len() == 0 {
+ errors.Add([]string{field.Name}, ERR_REQUIRED, "Required")
+ break VALIDATE_RULES
+ }
+
+ continue
+ }
+
if reflect.DeepEqual(zero, fieldValue) {
errors.Add([]string{field.Name}, ERR_REQUIRED, "Required")
break VALIDATE_RULES
@@ -422,7 +504,7 @@ VALIDATE_RULES:
str := fmt.Sprintf("%v", fieldValue)
if len(str) == 0 {
continue
- } else if !URLPattern.MatchString(str) {
+ } else if !isURL(str) {
errors.Add([]string{field.Name}, ERR_URL, "Url")
break VALIDATE_RULES
}
@@ -456,7 +538,7 @@ VALIDATE_RULES:
}
}
default:
- // Apply custom validation rules.
+ // Apply custom validation rules
var isValid bool
for i := range ruleMapper {
if ruleMapper[i].IsMatch(rule) {
@@ -466,6 +548,14 @@ VALIDATE_RULES:
}
}
}
+ for i := range paramRuleMapper {
+ if paramRuleMapper[i].IsMatch(rule) {
+ isValid, errors = paramRuleMapper[i].IsValid(errors, rule, field.Name, fieldValue)
+ if !isValid {
+ break VALIDATE_RULES
+ }
+ }
+ }
}
}
return errors
diff --git a/vendor/github.com/go-macaron/session/.gitignore b/vendor/github.com/go-macaron/session/.gitignore
new file mode 100644
index 00000000000..9297dbcd7c4
--- /dev/null
+++ b/vendor/github.com/go-macaron/session/.gitignore
@@ -0,0 +1,2 @@
+ledis/tmp.db
+nodb/tmp.db
\ No newline at end of file
diff --git a/vendor/github.com/go-macaron/session/couchbase/couchbase.go b/vendor/github.com/go-macaron/session/couchbase/couchbase.go
deleted file mode 100644
index 1a77a42b5f3..00000000000
--- a/vendor/github.com/go-macaron/session/couchbase/couchbase.go
+++ /dev/null
@@ -1,223 +0,0 @@
-// Copyright 2013 Beego Authors
-// Copyright 2014 The Macaron 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 session
-
-import (
- "strings"
- "sync"
-
- "github.com/couchbaselabs/go-couchbase"
-
- "github.com/go-macaron/session"
-)
-
-// CouchbaseSessionStore represents a couchbase session store implementation.
-type CouchbaseSessionStore struct {
- b *couchbase.Bucket
- sid string
- lock sync.RWMutex
- data map[interface{}]interface{}
- maxlifetime int64
-}
-
-// Set sets value to given key in session.
-func (s *CouchbaseSessionStore) Set(key, val interface{}) error {
- s.lock.Lock()
- defer s.lock.Unlock()
-
- s.data[key] = val
- return nil
-}
-
-// Get gets value by given key in session.
-func (s *CouchbaseSessionStore) Get(key interface{}) interface{} {
- s.lock.RLock()
- defer s.lock.RUnlock()
-
- return s.data[key]
-}
-
-// Delete delete a key from session.
-func (s *CouchbaseSessionStore) Delete(key interface{}) error {
- s.lock.Lock()
- defer s.lock.Unlock()
-
- delete(s.data, key)
- return nil
-}
-
-// ID returns current session ID.
-func (s *CouchbaseSessionStore) ID() string {
- return s.sid
-}
-
-// Release releases resource and save data to provider.
-func (s *CouchbaseSessionStore) Release() error {
- defer s.b.Close()
-
- data, err := session.EncodeGob(s.data)
- if err != nil {
- return err
- }
-
- return s.b.Set(s.sid, int(s.maxlifetime), data)
-}
-
-// Flush deletes all session data.
-func (s *CouchbaseSessionStore) Flush() error {
- s.lock.Lock()
- defer s.lock.Unlock()
-
- s.data = make(map[interface{}]interface{})
- return nil
-}
-
-// CouchbaseProvider represents a couchbase session provider implementation.
-type CouchbaseProvider struct {
- maxlifetime int64
- connStr string
- pool string
- bucket string
- b *couchbase.Bucket
-}
-
-func (cp *CouchbaseProvider) getBucket() *couchbase.Bucket {
- c, err := couchbase.Connect(cp.connStr)
- if err != nil {
- return nil
- }
-
- pool, err := c.GetPool(cp.pool)
- if err != nil {
- return nil
- }
-
- bucket, err := pool.GetBucket(cp.bucket)
- if err != nil {
- return nil
- }
-
- return bucket
-}
-
-// Init initializes memory session provider.
-// connStr is couchbase server REST/JSON URL
-// e.g. http://host:port/, Pool, Bucket
-func (p *CouchbaseProvider) Init(maxlifetime int64, connStr string) error {
- p.maxlifetime = maxlifetime
- configs := strings.Split(connStr, ",")
- if len(configs) > 0 {
- p.connStr = configs[0]
- }
- if len(configs) > 1 {
- p.pool = configs[1]
- }
- if len(configs) > 2 {
- p.bucket = configs[2]
- }
-
- return nil
-}
-
-// Read returns raw session store by session ID.
-func (p *CouchbaseProvider) Read(sid string) (session.RawStore, error) {
- p.b = p.getBucket()
-
- var doc []byte
-
- err := p.b.Get(sid, &doc)
- var kv map[interface{}]interface{}
- if doc == nil {
- kv = make(map[interface{}]interface{})
- } else {
- kv, err = session.DecodeGob(doc)
- if err != nil {
- return nil, err
- }
- }
-
- cs := &CouchbaseSessionStore{b: p.b, sid: sid, data: kv, maxlifetime: p.maxlifetime}
- return cs, nil
-}
-
-// Exist returns true if session with given ID exists.
-func (p *CouchbaseProvider) Exist(sid string) bool {
- p.b = p.getBucket()
- defer p.b.Close()
-
- var doc []byte
-
- if err := p.b.Get(sid, &doc); err != nil || doc == nil {
- return false
- } else {
- return true
- }
-}
-
-// Destory deletes a session by session ID.
-func (p *CouchbaseProvider) Destory(sid string) error {
- p.b = p.getBucket()
- defer p.b.Close()
-
- p.b.Delete(sid)
- return nil
-}
-
-// Regenerate regenerates a session store from old session ID to new one.
-func (p *CouchbaseProvider) Regenerate(oldsid, sid string) (session.RawStore, error) {
- p.b = p.getBucket()
-
- var doc []byte
- if err := p.b.Get(oldsid, &doc); err != nil || doc == nil {
- p.b.Set(sid, int(p.maxlifetime), "")
- } else {
- err := p.b.Delete(oldsid)
- if err != nil {
- return nil, err
- }
- _, _ = p.b.Add(sid, int(p.maxlifetime), doc)
- }
-
- err := p.b.Get(sid, &doc)
- if err != nil {
- return nil, err
- }
- var kv map[interface{}]interface{}
- if doc == nil {
- kv = make(map[interface{}]interface{})
- } else {
- kv, err = session.DecodeGob(doc)
- if err != nil {
- return nil, err
- }
- }
-
- cs := &CouchbaseSessionStore{b: p.b, sid: sid, data: kv, maxlifetime: p.maxlifetime}
- return cs, nil
-}
-
-// Count counts and returns number of sessions.
-func (p *CouchbaseProvider) Count() int {
- // FIXME
- return 0
-}
-
-// GC calls GC to clean expired sessions.
-func (p *CouchbaseProvider) GC() {}
-
-func init() {
- session.Register("couchbase", &CouchbaseProvider{})
-}
diff --git a/vendor/github.com/go-macaron/session/ledis/ledis.go b/vendor/github.com/go-macaron/session/ledis/ledis.go
deleted file mode 100644
index 73e27f5f22a..00000000000
--- a/vendor/github.com/go-macaron/session/ledis/ledis.go
+++ /dev/null
@@ -1,222 +0,0 @@
-// Copyright 2013 Beego Authors
-// Copyright 2014 The Macaron 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 session
-
-import (
- "fmt"
- "strings"
- "sync"
-
- "github.com/Unknwon/com"
- "github.com/siddontang/ledisdb/config"
- "github.com/siddontang/ledisdb/ledis"
- "gopkg.in/ini.v1"
-
- "github.com/go-macaron/session"
-)
-
-// LedisStore represents a ledis session store implementation.
-type LedisStore struct {
- c *ledis.DB
- sid string
- expire int64
- lock sync.RWMutex
- data map[interface{}]interface{}
-}
-
-// NewLedisStore creates and returns a ledis session store.
-func NewLedisStore(c *ledis.DB, sid string, expire int64, kv map[interface{}]interface{}) *LedisStore {
- return &LedisStore{
- c: c,
- expire: expire,
- sid: sid,
- data: kv,
- }
-}
-
-// Set sets value to given key in session.
-func (s *LedisStore) Set(key, val interface{}) error {
- s.lock.Lock()
- defer s.lock.Unlock()
-
- s.data[key] = val
- return nil
-}
-
-// Get gets value by given key in session.
-func (s *LedisStore) Get(key interface{}) interface{} {
- s.lock.RLock()
- defer s.lock.RUnlock()
-
- return s.data[key]
-}
-
-// Delete delete a key from session.
-func (s *LedisStore) Delete(key interface{}) error {
- s.lock.Lock()
- defer s.lock.Unlock()
-
- delete(s.data, key)
- return nil
-}
-
-// ID returns current session ID.
-func (s *LedisStore) ID() string {
- return s.sid
-}
-
-// Release releases resource and save data to provider.
-func (s *LedisStore) Release() error {
- data, err := session.EncodeGob(s.data)
- if err != nil {
- return err
- }
-
- if err = s.c.Set([]byte(s.sid), data); err != nil {
- return err
- }
- _, err = s.c.Expire([]byte(s.sid), s.expire)
- return err
-}
-
-// Flush deletes all session data.
-func (s *LedisStore) Flush() error {
- s.lock.Lock()
- defer s.lock.Unlock()
-
- s.data = make(map[interface{}]interface{})
- return nil
-}
-
-// LedisProvider represents a ledis session provider implementation.
-type LedisProvider struct {
- c *ledis.DB
- expire int64
-}
-
-// Init initializes ledis session provider.
-// configs: data_dir=./app.db,db=0
-func (p *LedisProvider) Init(expire int64, configs string) error {
- p.expire = expire
-
- cfg, err := ini.Load([]byte(strings.Replace(configs, ",", "\n", -1)))
- if err != nil {
- return err
- }
-
- db := 0
- opt := new(config.Config)
- for k, v := range cfg.Section("").KeysHash() {
- switch k {
- case "data_dir":
- opt.DataDir = v
- case "db":
- db = com.StrTo(v).MustInt()
- default:
- return fmt.Errorf("session/ledis: unsupported option '%s'", k)
- }
- }
-
- l, err := ledis.Open(opt)
- if err != nil {
- return fmt.Errorf("session/ledis: error opening db: %v", err)
- }
- p.c, err = l.Select(db)
- return err
-}
-
-// Read returns raw session store by session ID.
-func (p *LedisProvider) Read(sid string) (session.RawStore, error) {
- if !p.Exist(sid) {
- if err := p.c.Set([]byte(sid), []byte("")); err != nil {
- return nil, err
- }
- }
-
- var kv map[interface{}]interface{}
- kvs, err := p.c.Get([]byte(sid))
- if err != nil {
- return nil, err
- }
- if len(kvs) == 0 {
- kv = make(map[interface{}]interface{})
- } else {
- kv, err = session.DecodeGob(kvs)
- if err != nil {
- return nil, err
- }
- }
-
- return NewLedisStore(p.c, sid, p.expire, kv), nil
-}
-
-// Exist returns true if session with given ID exists.
-func (p *LedisProvider) Exist(sid string) bool {
- count, err := p.c.Exists([]byte(sid))
- return err == nil && count > 0
-}
-
-// Destory deletes a session by session ID.
-func (p *LedisProvider) Destory(sid string) error {
- _, err := p.c.Del([]byte(sid))
- return err
-}
-
-// Regenerate regenerates a session store from old session ID to new one.
-func (p *LedisProvider) Regenerate(oldsid, sid string) (_ session.RawStore, err error) {
- if p.Exist(sid) {
- return nil, fmt.Errorf("new sid '%s' already exists", sid)
- }
-
- kvs := make([]byte, 0)
- if p.Exist(oldsid) {
- if kvs, err = p.c.Get([]byte(oldsid)); err != nil {
- return nil, err
- } else if _, err = p.c.Del([]byte(oldsid)); err != nil {
- return nil, err
- }
- }
- if err = p.c.SetEX([]byte(sid), p.expire, kvs); err != nil {
- return nil, err
- }
-
- var kv map[interface{}]interface{}
- if len(kvs) == 0 {
- kv = make(map[interface{}]interface{})
- } else {
- kv, err = session.DecodeGob([]byte(kvs))
- if err != nil {
- return nil, err
- }
- }
-
- return NewLedisStore(p.c, sid, p.expire, kv), nil
-}
-
-// Count counts and returns number of sessions.
-func (p *LedisProvider) Count() int {
- // FIXME: how come this library does not have DbSize() method?
- return -1
-}
-
-// GC calls GC to clean expired sessions.
-func (p *LedisProvider) GC() {
- // FIXME: wtf???
-}
-
-func init() {
- session.Register("ledis", &LedisProvider{})
-}
diff --git a/vendor/github.com/go-macaron/session/ledis/ledis.goconvey b/vendor/github.com/go-macaron/session/ledis/ledis.goconvey
deleted file mode 100644
index 8485e986e45..00000000000
--- a/vendor/github.com/go-macaron/session/ledis/ledis.goconvey
+++ /dev/null
@@ -1 +0,0 @@
-ignore
\ No newline at end of file
diff --git a/vendor/github.com/go-macaron/session/mysql/mysql.go b/vendor/github.com/go-macaron/session/mysql/mysql.go
index 0d96fb8ec18..a16db779c63 100644
--- a/vendor/github.com/go-macaron/session/mysql/mysql.go
+++ b/vendor/github.com/go-macaron/session/mysql/mysql.go
@@ -185,7 +185,7 @@ func (p *MysqlProvider) Count() (total int) {
// GC calls GC to clean expired sessions.
func (p *MysqlProvider) GC() {
- if _, err := p.c.Exec("DELETE FROM session WHERE UNIX_TIMESTAMP(NOW()) - expiry > ?", p.expire); err != nil {
+ if _, err := p.c.Exec("DELETE FROM session WHERE expiry + ? <= UNIX_TIMESTAMP(NOW())", p.expire); err != nil {
log.Printf("session/mysql: error garbage collecting: %v", err)
}
}
diff --git a/vendor/github.com/go-macaron/session/nodb/nodb.go b/vendor/github.com/go-macaron/session/nodb/nodb.go
deleted file mode 100644
index c02f323f322..00000000000
--- a/vendor/github.com/go-macaron/session/nodb/nodb.go
+++ /dev/null
@@ -1,203 +0,0 @@
-// Copyright 2015 The Macaron 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 session
-
-import (
- "fmt"
- "sync"
-
- "github.com/lunny/nodb"
- "github.com/lunny/nodb/config"
-
- "github.com/go-macaron/session"
-)
-
-// NodbStore represents a nodb session store implementation.
-type NodbStore struct {
- c *nodb.DB
- sid string
- expire int64
- lock sync.RWMutex
- data map[interface{}]interface{}
-}
-
-// NewNodbStore creates and returns a ledis session store.
-func NewNodbStore(c *nodb.DB, sid string, expire int64, kv map[interface{}]interface{}) *NodbStore {
- return &NodbStore{
- c: c,
- expire: expire,
- sid: sid,
- data: kv,
- }
-}
-
-// Set sets value to given key in session.
-func (s *NodbStore) Set(key, val interface{}) error {
- s.lock.Lock()
- defer s.lock.Unlock()
-
- s.data[key] = val
- return nil
-}
-
-// Get gets value by given key in session.
-func (s *NodbStore) Get(key interface{}) interface{} {
- s.lock.RLock()
- defer s.lock.RUnlock()
-
- return s.data[key]
-}
-
-// Delete delete a key from session.
-func (s *NodbStore) Delete(key interface{}) error {
- s.lock.Lock()
- defer s.lock.Unlock()
-
- delete(s.data, key)
- return nil
-}
-
-// ID returns current session ID.
-func (s *NodbStore) ID() string {
- return s.sid
-}
-
-// Release releases resource and save data to provider.
-func (s *NodbStore) Release() error {
- data, err := session.EncodeGob(s.data)
- if err != nil {
- return err
- }
-
- if err = s.c.Set([]byte(s.sid), data); err != nil {
- return err
- }
- _, err = s.c.Expire([]byte(s.sid), s.expire)
- return err
-}
-
-// Flush deletes all session data.
-func (s *NodbStore) Flush() error {
- s.lock.Lock()
- defer s.lock.Unlock()
-
- s.data = make(map[interface{}]interface{})
- return nil
-}
-
-// NodbProvider represents a ledis session provider implementation.
-type NodbProvider struct {
- c *nodb.DB
- expire int64
-}
-
-// Init initializes nodb session provider.
-func (p *NodbProvider) Init(expire int64, configs string) error {
- p.expire = expire
-
- cfg := new(config.Config)
- cfg.DataDir = configs
- dbs, err := nodb.Open(cfg)
- if err != nil {
- return fmt.Errorf("session/nodb: error opening db: %v", err)
- }
-
- p.c, err = dbs.Select(0)
- return err
-}
-
-// Read returns raw session store by session ID.
-func (p *NodbProvider) Read(sid string) (session.RawStore, error) {
- if !p.Exist(sid) {
- if err := p.c.Set([]byte(sid), []byte("")); err != nil {
- return nil, err
- }
- }
-
- var kv map[interface{}]interface{}
- kvs, err := p.c.Get([]byte(sid))
- if err != nil {
- return nil, err
- }
- if len(kvs) == 0 {
- kv = make(map[interface{}]interface{})
- } else {
- kv, err = session.DecodeGob(kvs)
- if err != nil {
- return nil, err
- }
- }
-
- return NewNodbStore(p.c, sid, p.expire, kv), nil
-}
-
-// Exist returns true if session with given ID exists.
-func (p *NodbProvider) Exist(sid string) bool {
- count, err := p.c.Exists([]byte(sid))
- return err == nil && count > 0
-}
-
-// Destory deletes a session by session ID.
-func (p *NodbProvider) Destory(sid string) error {
- _, err := p.c.Del([]byte(sid))
- return err
-}
-
-// Regenerate regenerates a session store from old session ID to new one.
-func (p *NodbProvider) Regenerate(oldsid, sid string) (_ session.RawStore, err error) {
- if p.Exist(sid) {
- return nil, fmt.Errorf("new sid '%s' already exists", sid)
- }
-
- kvs := make([]byte, 0)
- if p.Exist(oldsid) {
- if kvs, err = p.c.Get([]byte(oldsid)); err != nil {
- return nil, err
- } else if _, err = p.c.Del([]byte(oldsid)); err != nil {
- return nil, err
- }
- }
-
- if err = p.c.Set([]byte(sid), kvs); err != nil {
- return nil, err
- } else if _, err = p.c.Expire([]byte(sid), p.expire); err != nil {
- return nil, err
- }
-
- var kv map[interface{}]interface{}
- if len(kvs) == 0 {
- kv = make(map[interface{}]interface{})
- } else {
- kv, err = session.DecodeGob([]byte(kvs))
- if err != nil {
- return nil, err
- }
- }
-
- return NewNodbStore(p.c, sid, p.expire, kv), nil
-}
-
-// Count counts and returns number of sessions.
-func (p *NodbProvider) Count() int {
- // FIXME: how come this library does not have DbSize() method?
- return -1
-}
-
-// GC calls GC to clean expired sessions.
-func (p *NodbProvider) GC() {}
-
-func init() {
- session.Register("nodb", &NodbProvider{})
-}
diff --git a/vendor/github.com/go-macaron/session/nodb/nodb.goconvey b/vendor/github.com/go-macaron/session/nodb/nodb.goconvey
deleted file mode 100644
index 8485e986e45..00000000000
--- a/vendor/github.com/go-macaron/session/nodb/nodb.goconvey
+++ /dev/null
@@ -1 +0,0 @@
-ignore
\ No newline at end of file
diff --git a/vendor/github.com/go-sql-driver/mysql/.gitignore b/vendor/github.com/go-sql-driver/mysql/.gitignore
new file mode 100644
index 00000000000..ba8e0cb3aa3
--- /dev/null
+++ b/vendor/github.com/go-sql-driver/mysql/.gitignore
@@ -0,0 +1,8 @@
+.DS_Store
+.DS_Store?
+._*
+.Spotlight-V100
+.Trashes
+Icon?
+ehthumbs.db
+Thumbs.db
diff --git a/vendor/github.com/go-sql-driver/mysql/AUTHORS b/vendor/github.com/go-sql-driver/mysql/AUTHORS
index e47e5425cba..692c186fde5 100644
--- a/vendor/github.com/go-sql-driver/mysql/AUTHORS
+++ b/vendor/github.com/go-sql-driver/mysql/AUTHORS
@@ -18,14 +18,12 @@ Chris Moos
Daniel Nichter
Daniël van Eeden
DisposaBoy
-Egor Smolyakov
Frederick Mayle
Gustavo Kristic
Hanno Braun
Henri Yandell
Hirotaka Yamamoto
INADA Naoki
-Jacek Szwec
James Harr
Jian Zhen
Joshua Prunier
@@ -42,7 +40,6 @@ Michael Woolnough
Nicola Peduzzi
Olivier Mengué
Paul Bonser
-Peter Schultz
Runrioter Wung
Soroush Pour
Stan Putrya
diff --git a/vendor/github.com/go-sql-driver/mysql/README.md b/vendor/github.com/go-sql-driver/mysql/README.md
index a060e3cfd4b..a16012f8191 100644
--- a/vendor/github.com/go-sql-driver/mysql/README.md
+++ b/vendor/github.com/go-sql-driver/mysql/README.md
@@ -1,6 +1,6 @@
# Go-MySQL-Driver
-A MySQL-Driver for Go's [database/sql](https://golang.org/pkg/database/sql/) package
+A MySQL-Driver for Go's [database/sql](http://golang.org/pkg/database/sql) package

@@ -15,7 +15,6 @@ A MySQL-Driver for Go's [database/sql](https://golang.org/pkg/database/sql/) pac
* [Address](#address)
* [Parameters](#parameters)
* [Examples](#examples)
- * [Connection pool and timeouts](#connection-pool-and-timeouts)
* [LOAD DATA LOCAL INFILE support](#load-data-local-infile-support)
* [time.Time support](#timetime-support)
* [Unicode support](#unicode-support)
@@ -27,11 +26,11 @@ A MySQL-Driver for Go's [database/sql](https://golang.org/pkg/database/sql/) pac
## Features
* Lightweight and [fast](https://github.com/go-sql-driver/sql-benchmark "golang MySQL-Driver performance")
* Native Go implementation. No C-bindings, just pure Go
- * Connections over TCP/IPv4, TCP/IPv6, Unix domain sockets or [custom protocols](https://godoc.org/github.com/go-sql-driver/mysql#DialFunc)
+ * Connections over TCP/IPv4, TCP/IPv6, Unix domain sockets or [custom protocols](http://godoc.org/github.com/go-sql-driver/mysql#DialFunc)
* Automatic handling of broken connections
* Automatic Connection Pooling *(by database/sql package)*
* Supports queries larger than 16MB
- * Full [`sql.RawBytes`](https://golang.org/pkg/database/sql/#RawBytes) support.
+ * Full [`sql.RawBytes`](http://golang.org/pkg/database/sql/#RawBytes) support.
* Intelligent `LONG DATA` handling in prepared statements
* Secure `LOAD DATA LOCAL INFILE` support with file Whitelisting and `io.Reader` support
* Optional `time.Time` parsing
@@ -44,14 +43,14 @@ A MySQL-Driver for Go's [database/sql](https://golang.org/pkg/database/sql/) pac
---------------------------------------
## Installation
-Simple install the package to your [$GOPATH](https://github.com/golang/go/wiki/GOPATH "GOPATH") with the [go tool](https://golang.org/cmd/go/ "go command") from shell:
+Simple install the package to your [$GOPATH](http://code.google.com/p/go-wiki/wiki/GOPATH "GOPATH") with the [go tool](http://golang.org/cmd/go/ "go command") from shell:
```bash
$ go get github.com/go-sql-driver/mysql
```
-Make sure [Git is installed](https://git-scm.com/downloads) on your machine and in your system's `PATH`.
+Make sure [Git is installed](http://git-scm.com/downloads) on your machine and in your system's `PATH`.
## Usage
-_Go MySQL Driver_ is an implementation of Go's `database/sql/driver` interface. You only need to import the driver and can use the full [`database/sql`](https://golang.org/pkg/database/sql/) API then.
+_Go MySQL Driver_ is an implementation of Go's `database/sql/driver` interface. You only need to import the driver and can use the full [`database/sql`](http://golang.org/pkg/database/sql) API then.
Use `mysql` as `driverName` and a valid [DSN](#dsn-data-source-name) as `dataSourceName`:
```go
@@ -96,13 +95,13 @@ Alternatively, [Config.FormatDSN](https://godoc.org/github.com/go-sql-driver/mys
Passwords can consist of any character. Escaping is **not** necessary.
#### Protocol
-See [net.Dial](https://golang.org/pkg/net/#Dial) for more information which networks are available.
+See [net.Dial](http://golang.org/pkg/net/#Dial) for more information which networks are available.
In general you should use an Unix domain socket if available and TCP otherwise for best performance.
#### Address
For TCP and UDP networks, addresses have the form `host:port`.
If `host` is a literal IPv6 address, it must be enclosed in square brackets.
-The functions [net.JoinHostPort](https://golang.org/pkg/net/#JoinHostPort) and [net.SplitHostPort](https://golang.org/pkg/net/#SplitHostPort) manipulate addresses in this form.
+The functions [net.JoinHostPort](http://golang.org/pkg/net/#JoinHostPort) and [net.SplitHostPort](http://golang.org/pkg/net/#SplitHostPort) manipulate addresses in this form.
For Unix domain sockets the address is the absolute path to the MySQL-Server-socket, e.g. `/var/run/mysqld/mysqld.sock` or `/tmp/mysql.sock`.
@@ -221,11 +220,11 @@ Valid Values:
Default: UTC
```
-Sets the location for time.Time values (when using `parseTime=true`). *"Local"* sets the system's location. See [time.LoadLocation](https://golang.org/pkg/time/#LoadLocation) for details.
+Sets the location for time.Time values (when using `parseTime=true`). *"Local"* sets the system's location. See [time.LoadLocation](http://golang.org/pkg/time/#LoadLocation) for details.
Note that this sets the location for time.Time values but does not change MySQL's [time_zone setting](https://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html). For that see the [time_zone system variable](#system-variables), which can also be set as a DSN parameter.
-Please keep in mind, that param values must be [url.QueryEscape](https://golang.org/pkg/net/url/#QueryEscape)'ed. Alternatively you can manually replace the `/` with `%2F`. For example `US/Pacific` would be `loc=US%2FPacific`.
+Please keep in mind, that param values must be [url.QueryEscape](http://golang.org/pkg/net/url/#QueryEscape)'ed. Alternatively you can manually replace the `/` with `%2F`. For example `US/Pacific` would be `loc=US%2FPacific`.
##### `maxAllowedPacket`
```
@@ -261,11 +260,11 @@ Default: false
##### `readTimeout`
```
-Type: duration
+Type: decimal number
Default: 0
```
-I/O read timeout. The value must be a decimal number with a unit suffix (*"ms"*, *"s"*, *"m"*, *"h"*), such as *"30s"*, *"0.5m"* or *"1m30s"*.
+I/O read timeout. The value must be a decimal number with an unit suffix ( *"ms"*, *"s"*, *"m"*, *"h"* ), such as *"30s"*, *"0.5m"* or *"1m30s"*.
##### `strict`
@@ -284,11 +283,11 @@ By default MySQL also treats notes as warnings. Use [`sql_notes=false`](http://d
##### `timeout`
```
-Type: duration
+Type: decimal number
Default: OS default
```
-Timeout for establishing connections, aka dial timeout. The value must be a decimal number with a unit suffix (*"ms"*, *"s"*, *"m"*, *"h"*), such as *"30s"*, *"0.5m"* or *"1m30s"*.
+*Driver* side connection timeout. The value must be a decimal number with an unit suffix ( *"ms"*, *"s"*, *"m"*, *"h"* ), such as *"30s"*, *"0.5m"* or *"1m30s"*. To set a server side timeout, use the parameter [`wait_timeout`](http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_wait_timeout).
##### `tls`
@@ -298,16 +297,16 @@ Valid Values: true, false, skip-verify,
Default: false
```
-`tls=true` enables TLS / SSL encrypted connection to the server. Use `skip-verify` if you want to use a self-signed or invalid certificate (server side). Use a custom value registered with [`mysql.RegisterTLSConfig`](https://godoc.org/github.com/go-sql-driver/mysql#RegisterTLSConfig).
+`tls=true` enables TLS / SSL encrypted connection to the server. Use `skip-verify` if you want to use a self-signed or invalid certificate (server side). Use a custom value registered with [`mysql.RegisterTLSConfig`](http://godoc.org/github.com/go-sql-driver/mysql#RegisterTLSConfig).
##### `writeTimeout`
```
-Type: duration
+Type: decimal number
Default: 0
```
-I/O write timeout. The value must be a decimal number with a unit suffix (*"ms"*, *"s"*, *"m"*, *"h"*), such as *"30s"*, *"0.5m"* or *"1m30s"*.
+I/O write timeout. The value must be a decimal number with an unit suffix ( *"ms"*, *"s"*, *"m"*, *"h"* ), such as *"30s"*, *"0.5m"* or *"1m30s"*.
##### System Variables
@@ -381,11 +380,6 @@ No Database preselected:
user:password@/
```
-
-### Connection pool and timeouts
-The connection pool is managed by Go's database/sql package. For details on how to configure the size of the pool and how long connections stay in the pool see `*DB.SetMaxOpenConns`, `*DB.SetMaxIdleConns`, and `*DB.SetConnMaxLifetime` in the [database/sql documentation](https://golang.org/pkg/database/sql/). The read, write, and dial timeouts for each individual connection are configured with the DSN parameters [`readTimeout`](#readtimeout), [`writeTimeout`](#writetimeout), and [`timeout`](#timeout), respectively.
-
-
### `LOAD DATA LOCAL INFILE` support
For this feature you need direct access to the package. Therefore you must change the import path (no `_`):
```go
@@ -396,17 +390,17 @@ Files must be whitelisted by registering them with `mysql.RegisterLocalFile(file
To use a `io.Reader` a handler function must be registered with `mysql.RegisterReaderHandler(name, handler)` which returns a `io.Reader` or `io.ReadCloser`. The Reader is available with the filepath `Reader::` then. Choose different names for different handlers and `DeregisterReaderHandler` when you don't need it anymore.
-See the [godoc of Go-MySQL-Driver](https://godoc.org/github.com/go-sql-driver/mysql "golang mysql driver documentation") for details.
+See the [godoc of Go-MySQL-Driver](http://godoc.org/github.com/go-sql-driver/mysql "golang mysql driver documentation") for details.
### `time.Time` support
The default internal output type of MySQL `DATE` and `DATETIME` values is `[]byte` which allows you to scan the value into a `[]byte`, `string` or `sql.RawBytes` variable in your programm.
-However, many want to scan MySQL `DATE` and `DATETIME` values into `time.Time` variables, which is the logical opposite in Go to `DATE` and `DATETIME` in MySQL. You can do that by changing the internal output type from `[]byte` to `time.Time` with the DSN parameter `parseTime=true`. You can set the default [`time.Time` location](https://golang.org/pkg/time/#Location) with the `loc` DSN parameter.
+However, many want to scan MySQL `DATE` and `DATETIME` values into `time.Time` variables, which is the logical opposite in Go to `DATE` and `DATETIME` in MySQL. You can do that by changing the internal output type from `[]byte` to `time.Time` with the DSN parameter `parseTime=true`. You can set the default [`time.Time` location](http://golang.org/pkg/time/#Location) with the `loc` DSN parameter.
**Caution:** As of Go 1.1, this makes `time.Time` the only variable type you can scan `DATE` and `DATETIME` values into. This breaks for example [`sql.RawBytes` support](https://github.com/go-sql-driver/mysql/wiki/Examples#rawbytes).
-Alternatively you can use the [`NullTime`](https://godoc.org/github.com/go-sql-driver/mysql#NullTime) type as the scan destination, which works with both `time.Time` and `string` / `[]byte`.
+Alternatively you can use the [`NullTime`](http://godoc.org/github.com/go-sql-driver/mysql#NullTime) type as the scan destination, which works with both `time.Time` and `string` / `[]byte`.
### Unicode support
@@ -441,7 +435,7 @@ That means:
* When distributing, you **must publish** the source code of any **changed files** licensed under the MPL 2.0 under a) the MPL 2.0 itself or b) a compatible license (e.g. GPL 3.0 or Apache License 2.0)
* You **needn't publish** the source code of your library as long as the files licensed under the MPL 2.0 are **unchanged**
-Please read the [MPL 2.0 FAQ](https://www.mozilla.org/en-US/MPL/2.0/FAQ/) if you have further questions regarding the license.
+Please read the [MPL 2.0 FAQ](http://www.mozilla.org/MPL/2.0/FAQ.html) if you have further questions regarding the license.
You can read the full terms here: [LICENSE](https://raw.github.com/go-sql-driver/mysql/master/LICENSE)
diff --git a/vendor/github.com/go-sql-driver/mysql/connection.go b/vendor/github.com/go-sql-driver/mysql/connection.go
index 08e5fadeb25..d82c728f3b8 100644
--- a/vendor/github.com/go-sql-driver/mysql/connection.go
+++ b/vendor/github.com/go-sql-driver/mysql/connection.go
@@ -10,7 +10,6 @@ package mysql
import (
"database/sql/driver"
- "io"
"net"
"strconv"
"strings"
@@ -290,29 +289,22 @@ func (mc *mysqlConn) Exec(query string, args []driver.Value) (driver.Result, err
// Internal function to execute commands
func (mc *mysqlConn) exec(query string) error {
// Send command
- if err := mc.writeCommandPacketStr(comQuery, query); err != nil {
+ err := mc.writeCommandPacketStr(comQuery, query)
+ if err != nil {
return err
}
// Read Result
resLen, err := mc.readResultSetHeaderPacket()
- if err != nil {
- return err
- }
-
- if resLen > 0 {
- // columns
- if err := mc.readUntilEOF(); err != nil {
+ if err == nil && resLen > 0 {
+ if err = mc.readUntilEOF(); err != nil {
return err
}
- // rows
- if err := mc.readUntilEOF(); err != nil {
- return err
- }
+ err = mc.readUntilEOF()
}
- return mc.discardResults()
+ return err
}
func (mc *mysqlConn) Query(query string, args []driver.Value) (driver.Rows, error) {
@@ -343,17 +335,11 @@ func (mc *mysqlConn) Query(query string, args []driver.Value) (driver.Rows, erro
rows.mc = mc
if resLen == 0 {
- rows.rs.done = true
-
- switch err := rows.NextResultSet(); err {
- case nil, io.EOF:
- return rows, nil
- default:
- return nil, err
- }
+ // no columns, no more data
+ return emptyRows{}, nil
}
// Columns
- rows.rs.columns, err = mc.readColumns(resLen)
+ rows.columns, err = mc.readColumns(resLen)
return rows, err
}
}
@@ -373,7 +359,7 @@ func (mc *mysqlConn) getSystemVar(name string) ([]byte, error) {
if err == nil {
rows := new(textRows)
rows.mc = mc
- rows.rs.columns = []mysqlField{{fieldType: fieldTypeVarChar}}
+ rows.columns = []mysqlField{{fieldType: fieldTypeVarChar}}
if resLen > 0 {
// Columns
diff --git a/vendor/github.com/go-sql-driver/mysql/packets.go b/vendor/github.com/go-sql-driver/mysql/packets.go
index 41b4d3d5509..aafe9793eac 100644
--- a/vendor/github.com/go-sql-driver/mysql/packets.go
+++ b/vendor/github.com/go-sql-driver/mysql/packets.go
@@ -584,8 +584,8 @@ func (mc *mysqlConn) handleOkPacket(data []byte) error {
// server_status [2 bytes]
mc.status = readStatus(data[1+n+m : 1+n+m+2])
- if mc.status&statusMoreResultsExists != 0 {
- return nil
+ if err := mc.discardResults(); err != nil {
+ return err
}
// warning count [2 bytes]
@@ -698,10 +698,6 @@ func (mc *mysqlConn) readColumns(count int) ([]mysqlField, error) {
func (rows *textRows) readRow(dest []driver.Value) error {
mc := rows.mc
- if rows.rs.done {
- return io.EOF
- }
-
data, err := mc.readPacket()
if err != nil {
return err
@@ -711,11 +707,15 @@ func (rows *textRows) readRow(dest []driver.Value) error {
if data[0] == iEOF && len(data) == 5 {
// server_status [2 bytes]
rows.mc.status = readStatus(data[3:])
- rows.rs.done = true
- if !rows.HasNextResultSet() {
- rows.mc = nil
+ err = rows.mc.discardResults()
+ if err == nil {
+ err = io.EOF
+ } else {
+ // connection unusable
+ rows.mc.Close()
}
- return io.EOF
+ rows.mc = nil
+ return err
}
if data[0] == iERR {
rows.mc = nil
@@ -736,7 +736,7 @@ func (rows *textRows) readRow(dest []driver.Value) error {
if !mc.parseTime {
continue
} else {
- switch rows.rs.columns[i].fieldType {
+ switch rows.columns[i].fieldType {
case fieldTypeTimestamp, fieldTypeDateTime,
fieldTypeDate, fieldTypeNewDate:
dest[i], err = parseDateTime(
@@ -1097,6 +1097,8 @@ func (mc *mysqlConn) discardResults() error {
if err := mc.readUntilEOF(); err != nil {
return err
}
+ } else {
+ mc.status &^= statusMoreResultsExists
}
}
return nil
@@ -1114,11 +1116,15 @@ func (rows *binaryRows) readRow(dest []driver.Value) error {
// EOF Packet
if data[0] == iEOF && len(data) == 5 {
rows.mc.status = readStatus(data[3:])
- rows.rs.done = true
- if !rows.HasNextResultSet() {
- rows.mc = nil
+ err = rows.mc.discardResults()
+ if err == nil {
+ err = io.EOF
+ } else {
+ // connection unusable
+ rows.mc.Close()
}
- return io.EOF
+ rows.mc = nil
+ return err
}
rows.mc = nil
@@ -1139,14 +1145,14 @@ func (rows *binaryRows) readRow(dest []driver.Value) error {
}
// Convert to byte-coded string
- switch rows.rs.columns[i].fieldType {
+ switch rows.columns[i].fieldType {
case fieldTypeNULL:
dest[i] = nil
continue
// Numeric Types
case fieldTypeTiny:
- if rows.rs.columns[i].flags&flagUnsigned != 0 {
+ if rows.columns[i].flags&flagUnsigned != 0 {
dest[i] = int64(data[pos])
} else {
dest[i] = int64(int8(data[pos]))
@@ -1155,7 +1161,7 @@ func (rows *binaryRows) readRow(dest []driver.Value) error {
continue
case fieldTypeShort, fieldTypeYear:
- if rows.rs.columns[i].flags&flagUnsigned != 0 {
+ if rows.columns[i].flags&flagUnsigned != 0 {
dest[i] = int64(binary.LittleEndian.Uint16(data[pos : pos+2]))
} else {
dest[i] = int64(int16(binary.LittleEndian.Uint16(data[pos : pos+2])))
@@ -1164,7 +1170,7 @@ func (rows *binaryRows) readRow(dest []driver.Value) error {
continue
case fieldTypeInt24, fieldTypeLong:
- if rows.rs.columns[i].flags&flagUnsigned != 0 {
+ if rows.columns[i].flags&flagUnsigned != 0 {
dest[i] = int64(binary.LittleEndian.Uint32(data[pos : pos+4]))
} else {
dest[i] = int64(int32(binary.LittleEndian.Uint32(data[pos : pos+4])))
@@ -1173,7 +1179,7 @@ func (rows *binaryRows) readRow(dest []driver.Value) error {
continue
case fieldTypeLongLong:
- if rows.rs.columns[i].flags&flagUnsigned != 0 {
+ if rows.columns[i].flags&flagUnsigned != 0 {
val := binary.LittleEndian.Uint64(data[pos : pos+8])
if val > math.MaxInt64 {
dest[i] = uint64ToString(val)
@@ -1227,10 +1233,10 @@ func (rows *binaryRows) readRow(dest []driver.Value) error {
case isNull:
dest[i] = nil
continue
- case rows.rs.columns[i].fieldType == fieldTypeTime:
+ case rows.columns[i].fieldType == fieldTypeTime:
// database/sql does not support an equivalent to TIME, return a string
var dstlen uint8
- switch decimals := rows.rs.columns[i].decimals; decimals {
+ switch decimals := rows.columns[i].decimals; decimals {
case 0x00, 0x1f:
dstlen = 8
case 1, 2, 3, 4, 5, 6:
@@ -1238,7 +1244,7 @@ func (rows *binaryRows) readRow(dest []driver.Value) error {
default:
return fmt.Errorf(
"protocol error, illegal decimals value %d",
- rows.rs.columns[i].decimals,
+ rows.columns[i].decimals,
)
}
dest[i], err = formatBinaryDateTime(data[pos:pos+int(num)], dstlen, true)
@@ -1246,10 +1252,10 @@ func (rows *binaryRows) readRow(dest []driver.Value) error {
dest[i], err = parseBinaryDateTime(num, data[pos:], rows.mc.cfg.Loc)
default:
var dstlen uint8
- if rows.rs.columns[i].fieldType == fieldTypeDate {
+ if rows.columns[i].fieldType == fieldTypeDate {
dstlen = 10
} else {
- switch decimals := rows.rs.columns[i].decimals; decimals {
+ switch decimals := rows.columns[i].decimals; decimals {
case 0x00, 0x1f:
dstlen = 19
case 1, 2, 3, 4, 5, 6:
@@ -1257,7 +1263,7 @@ func (rows *binaryRows) readRow(dest []driver.Value) error {
default:
return fmt.Errorf(
"protocol error, illegal decimals value %d",
- rows.rs.columns[i].decimals,
+ rows.columns[i].decimals,
)
}
}
@@ -1273,7 +1279,7 @@ func (rows *binaryRows) readRow(dest []driver.Value) error {
// Please report if this happens!
default:
- return fmt.Errorf("unknown field type %d", rows.rs.columns[i].fieldType)
+ return fmt.Errorf("unknown field type %d", rows.columns[i].fieldType)
}
}
diff --git a/vendor/github.com/go-sql-driver/mysql/row_columntypes.go b/vendor/github.com/go-sql-driver/mysql/row_columntypes.go
deleted file mode 100644
index 1dbfe472e7b..00000000000
--- a/vendor/github.com/go-sql-driver/mysql/row_columntypes.go
+++ /dev/null
@@ -1,78 +0,0 @@
-package mysql
-
-const (
- // In case we get something unexpected
- FieldTypeUnknown = "UNKNOWN"
-
- // Human-readable names for each distinct type byte
- FieldTypeNameDecimal = "DECIMAL"
- FieldTypeNameTiny = "TINY"
- FieldTypeNameShort = "SHORT"
- FieldTypeNameLong = "LONG"
- FieldTypeNameFloat = "FLOAT"
- FieldTypeNameDouble = "DOUBLE"
- FieldTypeNameNULL = "NULL"
- FieldTypeNameTimestamp = "TIMESTAMP"
- FieldTypeNameLongLong = "LONGLONG"
- FieldTypeNameInt24 = "INT24"
- FieldTypeNameDate = "DATE"
- FieldTypeNameTime = "TIME"
- FieldTypeNameDateTime = "DATETIME"
- FieldTypeNameYear = "YEAR"
- FieldTypeNameNewDate = "NEWDATE"
- FieldTypeNameVarChar = "VARCHAR"
- FieldTypeNameBit = "BIT"
- FieldTypeNameJSON = "JSON"
- FieldTypeNameNewDecimal = "NEWDECIMAL"
- FieldTypeNameEnum = "ENUM"
- FieldTypeNameSet = "SET"
- FieldTypeNameTinyBLOB = "TINYBLOB"
- FieldTypeNameMediumBLOB = "MEDIUMBLOB"
- FieldTypeNameLongBLOB = "LONGBLOB"
- FieldTypeNameBLOB = "BLOB"
- FieldTypeNameVarString = "VARSTRING"
- FieldTypeNameString = "STRING"
- FieldTypeNameGeometry = "GEOMETRY"
-)
-
-// mapping from each type identifier to human readable string
-var mysqlTypeMap = map[byte]string{
- fieldTypeDecimal: FieldTypeNameDecimal,
- fieldTypeTiny: FieldTypeNameTiny,
- fieldTypeShort: FieldTypeNameShort,
- fieldTypeLong: FieldTypeNameLong,
- fieldTypeFloat: FieldTypeNameFloat,
- fieldTypeDouble: FieldTypeNameDouble,
- fieldTypeNULL: FieldTypeNameNULL,
- fieldTypeTimestamp: FieldTypeNameTimestamp,
- fieldTypeLongLong: FieldTypeNameLongLong,
- fieldTypeInt24: FieldTypeNameInt24,
- fieldTypeDate: FieldTypeNameDate,
- fieldTypeTime: FieldTypeNameTime,
- fieldTypeDateTime: FieldTypeNameDateTime,
- fieldTypeYear: FieldTypeNameYear,
- fieldTypeNewDate: FieldTypeNameNewDate,
- fieldTypeVarChar: FieldTypeNameVarChar,
- fieldTypeBit: FieldTypeNameBit,
- fieldTypeJSON: FieldTypeNameJSON,
- fieldTypeNewDecimal: FieldTypeNameNewDecimal,
- fieldTypeEnum: FieldTypeNameEnum,
- fieldTypeSet: FieldTypeNameSet,
- fieldTypeTinyBLOB: FieldTypeNameTinyBLOB,
- fieldTypeMediumBLOB: FieldTypeNameMediumBLOB,
- fieldTypeLongBLOB: FieldTypeNameLongBLOB,
- fieldTypeBLOB: FieldTypeNameBLOB,
- fieldTypeVarString: FieldTypeNameVarString,
- fieldTypeString: FieldTypeNameString,
- fieldTypeGeometry: FieldTypeNameGeometry,
-}
-
-// Make Rows implement the optional RowsColumnTypeDatabaseTypeName interface.
-// See https://github.com/golang/go/commit/2a85578b0ecd424e95b29d810b7a414a299fd6a7
-// - (go 1.8 required for this to have any effect)
-func (rows *mysqlRows) ColumnTypeDatabaseTypeName(index int) string {
- if typeName, ok := mysqlTypeMap[rows.rs.columns[index].fieldType]; ok {
- return typeName
- }
- return FieldTypeUnknown
-}
diff --git a/vendor/github.com/go-sql-driver/mysql/rows.go b/vendor/github.com/go-sql-driver/mysql/rows.go
index 900f548ae5f..c08255eeec8 100644
--- a/vendor/github.com/go-sql-driver/mysql/rows.go
+++ b/vendor/github.com/go-sql-driver/mysql/rows.go
@@ -21,49 +21,40 @@ type mysqlField struct {
decimals byte
}
-type resultSet struct {
- columns []mysqlField
- done bool
-}
-
type mysqlRows struct {
- mc *mysqlConn
- rs resultSet
+ mc *mysqlConn
+ columns []mysqlField
}
type binaryRows struct {
mysqlRows
- // stmtCols is a pointer to the statement's cached columns for different
- // result sets.
- stmtCols *[][]mysqlField
- // i is a number of the current result set. It is used to fetch proper
- // columns from stmtCols.
- i int
}
type textRows struct {
mysqlRows
}
+type emptyRows struct{}
+
func (rows *mysqlRows) Columns() []string {
- columns := make([]string, len(rows.rs.columns))
+ columns := make([]string, len(rows.columns))
if rows.mc != nil && rows.mc.cfg.ColumnsWithAlias {
for i := range columns {
- if tableName := rows.rs.columns[i].tableName; len(tableName) > 0 {
- columns[i] = tableName + "." + rows.rs.columns[i].name
+ if tableName := rows.columns[i].tableName; len(tableName) > 0 {
+ columns[i] = tableName + "." + rows.columns[i].name
} else {
- columns[i] = rows.rs.columns[i].name
+ columns[i] = rows.columns[i].name
}
}
} else {
for i := range columns {
- columns[i] = rows.rs.columns[i].name
+ columns[i] = rows.columns[i].name
}
}
return columns
}
-func (rows *mysqlRows) Close() (err error) {
+func (rows *mysqlRows) Close() error {
mc := rows.mc
if mc == nil {
return nil
@@ -73,9 +64,7 @@ func (rows *mysqlRows) Close() (err error) {
}
// Remove unread packets from stream
- if !rows.rs.done {
- err = mc.readUntilEOF()
- }
+ err := mc.readUntilEOF()
if err == nil {
if err = mc.discardResults(); err != nil {
return err
@@ -86,73 +75,6 @@ func (rows *mysqlRows) Close() (err error) {
return err
}
-func (rows *mysqlRows) HasNextResultSet() (b bool) {
- if rows.mc == nil {
- return false
- }
- return rows.mc.status&statusMoreResultsExists != 0
-}
-
-func (rows *mysqlRows) nextResultSet() (int, error) {
- if rows.mc == nil {
- return 0, io.EOF
- }
- if rows.mc.netConn == nil {
- return 0, ErrInvalidConn
- }
-
- // Remove unread packets from stream
- if !rows.rs.done {
- if err := rows.mc.readUntilEOF(); err != nil {
- return 0, err
- }
- rows.rs.done = true
- }
-
- if !rows.HasNextResultSet() {
- rows.mc = nil
- return 0, io.EOF
- }
- rows.rs = resultSet{}
- return rows.mc.readResultSetHeaderPacket()
-}
-
-func (rows *mysqlRows) nextNotEmptyResultSet() (int, error) {
- for {
- resLen, err := rows.nextResultSet()
- if err != nil {
- return 0, err
- }
-
- if resLen > 0 {
- return resLen, nil
- }
-
- rows.rs.done = true
- }
-}
-
-func (rows *binaryRows) NextResultSet() (err error) {
- resLen, err := rows.nextNotEmptyResultSet()
- if err != nil {
- return err
- }
-
- // get columns, if not cached, read them and cache them.
- if rows.i >= len(*rows.stmtCols) {
- rows.rs.columns, err = rows.mc.readColumns(resLen)
- *rows.stmtCols = append(*rows.stmtCols, rows.rs.columns)
- } else {
- rows.rs.columns = (*rows.stmtCols)[rows.i]
- if err := rows.mc.readUntilEOF(); err != nil {
- return err
- }
- }
-
- rows.i++
- return nil
-}
-
func (rows *binaryRows) Next(dest []driver.Value) error {
if mc := rows.mc; mc != nil {
if mc.netConn == nil {
@@ -165,16 +87,6 @@ func (rows *binaryRows) Next(dest []driver.Value) error {
return io.EOF
}
-func (rows *textRows) NextResultSet() (err error) {
- resLen, err := rows.nextNotEmptyResultSet()
- if err != nil {
- return err
- }
-
- rows.rs.columns, err = rows.mc.readColumns(resLen)
- return err
-}
-
func (rows *textRows) Next(dest []driver.Value) error {
if mc := rows.mc; mc != nil {
if mc.netConn == nil {
@@ -186,3 +98,15 @@ func (rows *textRows) Next(dest []driver.Value) error {
}
return io.EOF
}
+
+func (rows emptyRows) Columns() []string {
+ return nil
+}
+
+func (rows emptyRows) Close() error {
+ return nil
+}
+
+func (rows emptyRows) Next(dest []driver.Value) error {
+ return io.EOF
+}
diff --git a/vendor/github.com/go-sql-driver/mysql/statement.go b/vendor/github.com/go-sql-driver/mysql/statement.go
index b8877167476..7f9b0458574 100644
--- a/vendor/github.com/go-sql-driver/mysql/statement.go
+++ b/vendor/github.com/go-sql-driver/mysql/statement.go
@@ -11,7 +11,6 @@ package mysql
import (
"database/sql/driver"
"fmt"
- "io"
"reflect"
"strconv"
)
@@ -20,7 +19,7 @@ type mysqlStmt struct {
mc *mysqlConn
id uint32
paramCount int
- columns [][]mysqlField // cached from the first query
+ columns []mysqlField // cached from the first query
}
func (stmt *mysqlStmt) Close() error {
@@ -63,30 +62,26 @@ func (stmt *mysqlStmt) Exec(args []driver.Value) (driver.Result, error) {
// Read Result
resLen, err := mc.readResultSetHeaderPacket()
- if err != nil {
- return nil, err
- }
+ if err == nil {
+ if resLen > 0 {
+ // Columns
+ err = mc.readUntilEOF()
+ if err != nil {
+ return nil, err
+ }
- if resLen > 0 {
- // Columns
- if err = mc.readUntilEOF(); err != nil {
- return nil, err
+ // Rows
+ err = mc.readUntilEOF()
}
-
- // Rows
- if err := mc.readUntilEOF(); err != nil {
- return nil, err
+ if err == nil {
+ return &mysqlResult{
+ affectedRows: int64(mc.affectedRows),
+ insertId: int64(mc.insertId),
+ }, nil
}
}
- if err := mc.discardResults(); err != nil {
- return nil, err
- }
-
- return &mysqlResult{
- affectedRows: int64(mc.affectedRows),
- insertId: int64(mc.insertId),
- }, nil
+ return nil, err
}
func (stmt *mysqlStmt) Query(args []driver.Value) (driver.Rows, error) {
@@ -109,29 +104,18 @@ func (stmt *mysqlStmt) Query(args []driver.Value) (driver.Rows, error) {
}
rows := new(binaryRows)
- rows.stmtCols = &stmt.columns
if resLen > 0 {
rows.mc = mc
- rows.i++
// Columns
// If not cached, read them and cache them
- if len(stmt.columns) == 0 {
- rows.rs.columns, err = mc.readColumns(resLen)
- stmt.columns = append(stmt.columns, rows.rs.columns)
+ if stmt.columns == nil {
+ rows.columns, err = mc.readColumns(resLen)
+ stmt.columns = rows.columns
} else {
- rows.rs.columns = stmt.columns[0]
+ rows.columns = stmt.columns
err = mc.readUntilEOF()
}
- } else {
- rows.rs.done = true
-
- switch err := rows.NextResultSet(); err {
- case nil, io.EOF:
- return rows, nil
- default:
- return nil, err
- }
}
return rows, err
diff --git a/vendor/github.com/go-xorm/builder/builder_select.go b/vendor/github.com/go-xorm/builder/builder_select.go
index 05f116e0052..3a3967cccc7 100644
--- a/vendor/github.com/go-xorm/builder/builder_select.go
+++ b/vendor/github.com/go-xorm/builder/builder_select.go
@@ -45,6 +45,10 @@ func (b *Builder) selectWriteTo(w Writer) error {
}
}
+ if !b.cond.IsValid() {
+ return nil
+ }
+
if _, err := fmt.Fprint(w, " WHERE "); err != nil {
return err
}
diff --git a/vendor/github.com/go-xorm/builder/cond_and.go b/vendor/github.com/go-xorm/builder/cond_and.go
index 9c30e9c2e51..e30bd186cdf 100644
--- a/vendor/github.com/go-xorm/builder/cond_and.go
+++ b/vendor/github.com/go-xorm/builder/cond_and.go
@@ -25,7 +25,9 @@ func And(conds ...Cond) Cond {
func (and condAnd) WriteTo(w Writer) error {
for i, cond := range and {
_, isOr := cond.(condOr)
- if isOr {
+ _, isExpr := cond.(expr)
+ wrap := isOr || isExpr
+ if wrap {
fmt.Fprint(w, "(")
}
@@ -34,7 +36,7 @@ func (and condAnd) WriteTo(w Writer) error {
return err
}
- if isOr {
+ if wrap {
fmt.Fprint(w, ")")
}
diff --git a/vendor/github.com/go-xorm/builder/cond_in.go b/vendor/github.com/go-xorm/builder/cond_in.go
index 71093e4b491..f6366d35c2b 100644
--- a/vendor/github.com/go-xorm/builder/cond_in.go
+++ b/vendor/github.com/go-xorm/builder/cond_in.go
@@ -23,10 +23,8 @@ func In(col string, values ...interface{}) Cond {
}
func (condIn condIn) handleBlank(w Writer) error {
- if _, err := fmt.Fprintf(w, "%s IN ()", condIn.col); err != nil {
- return err
- }
- return nil
+ _, err := fmt.Fprint(w, "0=1")
+ return err
}
func (condIn condIn) WriteTo(w Writer) error {
diff --git a/vendor/github.com/go-xorm/builder/cond_notin.go b/vendor/github.com/go-xorm/builder/cond_notin.go
index 9be44cb2afe..dc3ac49a358 100644
--- a/vendor/github.com/go-xorm/builder/cond_notin.go
+++ b/vendor/github.com/go-xorm/builder/cond_notin.go
@@ -20,10 +20,8 @@ func NotIn(col string, values ...interface{}) Cond {
}
func (condNotIn condNotIn) handleBlank(w Writer) error {
- if _, err := fmt.Fprintf(w, "%s NOT IN ()", condNotIn.col); err != nil {
- return err
- }
- return nil
+ _, err := fmt.Fprint(w, "0=0")
+ return err
}
func (condNotIn condNotIn) WriteTo(w Writer) error {
diff --git a/vendor/github.com/go-xorm/core/.gitignore b/vendor/github.com/go-xorm/core/.gitignore
new file mode 100644
index 00000000000..98e6ef67fad
--- /dev/null
+++ b/vendor/github.com/go-xorm/core/.gitignore
@@ -0,0 +1 @@
+*.db
diff --git a/vendor/github.com/go-xorm/xorm/.gitignore b/vendor/github.com/go-xorm/xorm/.gitignore
new file mode 100644
index 00000000000..b698bc6fffb
--- /dev/null
+++ b/vendor/github.com/go-xorm/xorm/.gitignore
@@ -0,0 +1,30 @@
+# Compiled Object files, Static and Dynamic libs (Shared Objects)
+*.o
+*.a
+*.so
+*.db
+
+# 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
+
+*.log
+.vendor
+temp_test.go
+.vscode
+xorm.test
+*.sqlite3
diff --git a/vendor/github.com/go-xorm/xorm/.gitmodules b/vendor/github.com/go-xorm/xorm/.gitmodules
new file mode 100644
index 00000000000..75d2c8eaf73
--- /dev/null
+++ b/vendor/github.com/go-xorm/xorm/.gitmodules
@@ -0,0 +1,6 @@
+[submodule "docs/manual-en-US"]
+ path = docs/manual-en-US
+ url = https://github.com/go-xorm/manual-en-US.git
+[submodule "docs/manual-zh-CN"]
+ path = docs/manual-zh-CN
+ url = https://github.com/go-xorm/manual-zh-CN.git
diff --git a/vendor/github.com/go-xorm/xorm/.gopmfile b/vendor/github.com/go-xorm/xorm/.gopmfile
new file mode 100644
index 00000000000..ecd6e20e16c
--- /dev/null
+++ b/vendor/github.com/go-xorm/xorm/.gopmfile
@@ -0,0 +1,2 @@
+[target]
+path = github.com/go-xorm/xorm
\ No newline at end of file
diff --git a/vendor/github.com/go-xorm/xorm/docs/README.md b/vendor/github.com/go-xorm/xorm/docs/README.md
deleted file mode 100644
index 6befd969b7d..00000000000
--- a/vendor/github.com/go-xorm/xorm/docs/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# Xorm Manuals
-
-Please visit [xorm.io/docs](http://xorm.io/docs)
-
-# Contributing
-
-If you have any suggestion about docs, please pull request.
\ No newline at end of file
diff --git a/vendor/github.com/go-xorm/xorm/docs/images/cache_design.graffle b/vendor/github.com/go-xorm/xorm/docs/images/cache_design.graffle
deleted file mode 100644
index 5b7c487b7dd..00000000000
--- a/vendor/github.com/go-xorm/xorm/docs/images/cache_design.graffle
+++ /dev/null
@@ -1,2295 +0,0 @@
-
-
-
-
- ActiveLayerIndex
- 0
- ApplicationVersion
-
- com.omnigroup.OmniGrafflePro
- 139.16.0.171715
-
- AutoAdjust
-
- BackgroundGraphic
-
- Bounds
- {{0, 0}, {771, 554.18930041152259}}
- Class
- SolidGraphic
- ID
- 2
- Style
-
- fill
-
- Color
-
- b
- 0.989303
- g
- 0.907286
- r
- 0.795377
-
- FillType
- 2
- GradientAngle
- 78
- GradientColor
-
- b
- 1
- g
- 0.854588
- r
- 0.623912
-
- MiddleColor
-
- b
- 1
- g
- 0.856844
- r
- 0.43695
-
- TrippleBlend
- YES
-
- shadow
-
- Draws
- NO
-
- stroke
-
- Draws
- NO
-
-
-
- BaseZoom
- 0
- CanvasOrigin
- {0, 0}
- CanvasSize
- {771, 554.18930041152259}
- ColumnAlign
- 1
- ColumnSpacing
- 36
- CreationDate
- 2013-09-29 07:57:57 +0000
- Creator
- Lunny Xiao
- DisplayScale
- 1.000 cm = 1.000 cm
- FileType
- flat
- GraphDocumentVersion
- 8
- GraphicsList
-
-
- Bounds
- {{409.89504441572683, 415.64570506990464}, {104.42639923095703, 79.447883605957031}}
- Class
- ShapedGraphic
- FontInfo
-
- Color
-
- b
- 0.8
- g
- 0.8
- r
- 0.8
-
- Font
- Verdana
- Size
- 18
-
- ID
- 30
- Shape
- Rectangle
- Style
-
- fill
-
- Color
-
- b
- 0.6
- g
- 0.6
- r
- 0.6
-
- FillType
- 2
- GradientAngle
- 90
- GradientColor
-
- b
- 0.4
- g
- 0.4
- r
- 0.4
-
-
- shadow
-
- Beneath
- YES
- Color
-
- a
- 0.15
- b
- 0
- g
- 0
- r
- 0
-
- Fuzziness
- 0.0
- ShadowVector
- {2, 2}
-
- stroke
-
- Color
-
- b
- 0.590997
- g
- 0.18677
- r
- 0.567819
-
- Draws
- NO
- Width
- 2
-
-
- Text
-
- Text
- {\rtf1\ansi\ansicpg936\cocoartf1187\cocoasubrtf390
-\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 Verdana;}
-{\colortbl;\red255\green255\blue255;\red204\green204\blue204;}
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
-
-\f0\fs36 \cf2 .\
-.\
-.\
-}
- VerticalPad
- 0
-
- TextRelativeArea
- {{0.10000000000000001, 0.14999999999999999}, {0.80000000000000004, 0.69999999999999996}}
-
-
- Bounds
- {{276.44083898205287, 413.07252538018992}, {112.36092376708984, 79.447883605957031}}
- Class
- ShapedGraphic
- FontInfo
-
- Color
-
- archive
-
- YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVy
- WCR2ZXJzaW9uVCR0b3BYJG9iamVjdHNfEA9O
- U0tleWVkQXJjaGl2ZXISAAGGoNEICVRyb290
- gAGlCwwVGR5VJG51bGzUDQ4PEBESExRfEBJO
- U0N1c3RvbUNvbG9yU3BhY2VXTlNXaGl0ZVxO
- U0NvbG9yU3BhY2VWJGNsYXNzgAJCMAAQA4AE
- 0hYQFxhUTlNJRBACgAPSGhscD1gkY2xhc3Nl
- c1okY2xhc3NuYW1log8dWE5TT2JqZWN00hob
- HyCiIB1XTlNDb2xvcggRGyQpMkRJTFFTWV9o
- fYWSmZueoKKnrK6wtb7JzNXa3QAAAAAAAAEB
- AAAAAAAAACEAAAAAAAAAAAAAAAAAAADl
-
- b
- 0
- g
- 0
- r
- 0
-
- Font
- Verdana
- Size
- 18
-
- ID
- 29
- Shape
- Rectangle
- Style
-
- fill
-
- Color
-
- b
- 0.776486
- g
- 0.588495
- r
- 0.670497
-
- FillType
- 2
- GradientAngle
- 90
- GradientColor
-
- b
- 0.618021
- g
- 0.412924
- r
- 0.50312
-
-
- shadow
-
- Beneath
- YES
- Color
-
- a
- 0.15
- b
- 0
- g
- 0
- r
- 0
-
- Fuzziness
- 0.0
- ShadowVector
- {2, 2}
-
- stroke
-
- Color
-
- b
- 0.590997
- g
- 0.18677
- r
- 0.567819
-
- Draws
- NO
- Width
- 2
-
-
- Text
-
- Text
- {\rtf1\ansi\ansicpg936\cocoartf1187\cocoasubrtf390
-\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 Verdana;}
-{\colortbl;\red255\green255\blue255;}
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
-
-\f0\fs36 \cf0 .\
-.\
-.}
- VerticalPad
- 0
-
- TextRelativeArea
- {{0.10000000000000001, 0.14999999999999999}, {0.80000000000000004, 0.69999999999999996}}
-
-
- Bounds
- {{409.89504441572689, 337.17180246145824}, {104.42639923095703, 51}}
- Class
- ShapedGraphic
- FontInfo
-
- Color
-
- b
- 0.8
- g
- 0.8
- r
- 0.8
-
- Font
- Verdana
- Size
- 18
-
- ID
- 28
- Shape
- Rectangle
- Style
-
- fill
-
- Color
-
- b
- 0.6
- g
- 0.6
- r
- 0.6
-
- FillType
- 2
- GradientAngle
- 90
- GradientColor
-
- b
- 0.4
- g
- 0.4
- r
- 0.4
-
-
- shadow
-
- Beneath
- YES
- Color
-
- a
- 0.15
- b
- 0
- g
- 0
- r
- 0
-
- Fuzziness
- 0.0
- ShadowVector
- {2, 2}
-
- stroke
-
- Color
-
- b
- 0.590997
- g
- 0.18677
- r
- 0.567819
-
- Draws
- NO
- Width
- 2
-
-
- Text
-
- Text
- {\rtf1\ansi\ansicpg936\cocoartf1187\cocoasubrtf390
-\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 Verdana;}
-{\colortbl;\red255\green255\blue255;\red204\green204\blue204;}
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
-
-\f0\fs36 \cf2 user-2:User\{\}}
- VerticalPad
- 0
-
- TextRelativeArea
- {{0.10000000000000001, 0.14999999999999999}, {0.80000000000000004, 0.69999999999999996}}
-
-
- Bounds
- {{274.32251833907753, 322.94787397618234}, {112.36092376708984, 79.447883605957031}}
- Class
- ShapedGraphic
- FontInfo
-
- Color
-
- archive
-
- YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVy
- WCR2ZXJzaW9uVCR0b3BYJG9iamVjdHNfEA9O
- U0tleWVkQXJjaGl2ZXISAAGGoNEICVRyb290
- gAGlCwwVGR5VJG51bGzUDQ4PEBESExRfEBJO
- U0N1c3RvbUNvbG9yU3BhY2VXTlNXaGl0ZVxO
- U0NvbG9yU3BhY2VWJGNsYXNzgAJCMAAQA4AE
- 0hYQFxhUTlNJRBACgAPSGhscD1gkY2xhc3Nl
- c1okY2xhc3NuYW1log8dWE5TT2JqZWN00hob
- HyCiIB1XTlNDb2xvcggRGyQpMkRJTFFTWV9o
- fYWSmZueoKKnrK6wtb7JzNXa3QAAAAAAAAEB
- AAAAAAAAACEAAAAAAAAAAAAAAAAAAADl
-
- b
- 0
- g
- 0
- r
- 0
-
- Font
- Verdana
- Size
- 18
-
- ID
- 27
- Shape
- Rectangle
- Style
-
- fill
-
- Color
-
- b
- 0.776486
- g
- 0.588495
- r
- 0.670497
-
- FillType
- 2
- GradientAngle
- 90
- GradientColor
-
- b
- 0.618021
- g
- 0.412924
- r
- 0.50312
-
-
- shadow
-
- Beneath
- YES
- Color
-
- a
- 0.15
- b
- 0
- g
- 0
- r
- 0
-
- Fuzziness
- 0.0
- ShadowVector
- {2, 2}
-
- stroke
-
- Color
-
- b
- 0.590997
- g
- 0.18677
- r
- 0.567819
-
- Draws
- NO
- Width
- 2
-
-
- Text
-
- Text
- {\rtf1\ansi\ansicpg936\cocoartf1187\cocoasubrtf390
-\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 Verdana;}
-{\colortbl;\red255\green255\blue255;}
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
-
-\f0\fs36 \cf0 select id from tb3:[2,5]}
- VerticalPad
- 0
-
- TextRelativeArea
- {{0.10000000000000001, 0.14999999999999999}, {0.80000000000000004, 0.69999999999999996}}
-
-
- Bounds
- {{406.08888702072045, 256.42244420026987}, {104.42639923095703, 51}}
- Class
- ShapedGraphic
- FontInfo
-
- Color
-
- b
- 0.8
- g
- 0.8
- r
- 0.8
-
- Font
- Verdana
- Size
- 18
-
- ID
- 25
- Shape
- Rectangle
- Style
-
- fill
-
- Color
-
- b
- 0.6
- g
- 0.6
- r
- 0.6
-
- FillType
- 2
- GradientAngle
- 90
- GradientColor
-
- b
- 0.4
- g
- 0.4
- r
- 0.4
-
-
- shadow
-
- Beneath
- YES
- Color
-
- a
- 0.15
- b
- 0
- g
- 0
- r
- 0
-
- Fuzziness
- 0.0
- ShadowVector
- {2, 2}
-
- stroke
-
- Color
-
- b
- 0.590997
- g
- 0.18677
- r
- 0.567819
-
- Draws
- NO
- Width
- 2
-
-
- Text
-
- Text
- {\rtf1\ansi\ansicpg936\cocoartf1187\cocoasubrtf390
-\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 Verdana;}
-{\colortbl;\red255\green255\blue255;\red204\green204\blue204;}
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
-
-\f0\fs36 \cf2 user-2:User\{\}}
- VerticalPad
- 0
-
- TextRelativeArea
- {{0.10000000000000001, 0.14999999999999999}, {0.80000000000000004, 0.69999999999999996}}
-
-
- Bounds
- {{406.08888302813585, 187.47137690331695}, {104.42639923095703, 51}}
- Class
- ShapedGraphic
- FontInfo
-
- Color
-
- b
- 0.8
- g
- 0.8
- r
- 0.8
-
- Font
- Verdana
- Size
- 18
-
- ID
- 24
- Shape
- Rectangle
- Style
-
- fill
-
- Color
-
- b
- 0.6
- g
- 0.6
- r
- 0.6
-
- FillType
- 2
- GradientAngle
- 90
- GradientColor
-
- b
- 0.4
- g
- 0.4
- r
- 0.4
-
-
- shadow
-
- Beneath
- YES
- Color
-
- a
- 0.15
- b
- 0
- g
- 0
- r
- 0
-
- Fuzziness
- 0.0
- ShadowVector
- {2, 2}
-
- stroke
-
- Color
-
- b
- 0.590997
- g
- 0.18677
- r
- 0.567819
-
- Draws
- NO
- Width
- 2
-
-
- Text
-
- Text
- {\rtf1\ansi\ansicpg936\cocoartf1187\cocoasubrtf390
-\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 Verdana;}
-{\colortbl;\red255\green255\blue255;\red204\green204\blue204;}
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
-
-\f0\fs36 \cf2 table-1:Table\{\}}
- VerticalPad
- 0
-
- TextRelativeArea
- {{0.10000000000000001, 0.14999999999999999}, {0.80000000000000004, 0.69999999999999996}}
-
-
- Bounds
- {{406.08887903555114, 118.52029512620169}, {104.42639923095703, 51}}
- Class
- ShapedGraphic
- FontInfo
-
- Color
-
- b
- 0.8
- g
- 0.8
- r
- 0.8
-
- Font
- Verdana
- Size
- 18
-
- ID
- 23
- Shape
- Rectangle
- Style
-
- fill
-
- Color
-
- b
- 0.6
- g
- 0.6
- r
- 0.6
-
- FillType
- 2
- GradientAngle
- 90
- GradientColor
-
- b
- 0.4
- g
- 0.4
- r
- 0.4
-
-
- shadow
-
- Beneath
- YES
- Color
-
- a
- 0.15
- b
- 0
- g
- 0
- r
- 0
-
- Fuzziness
- 0.0
- ShadowVector
- {2, 2}
-
- stroke
-
- Color
-
- b
- 0.590997
- g
- 0.18677
- r
- 0.567819
-
- Draws
- NO
- Width
- 2
-
-
- Text
-
- Text
- {\rtf1\ansi\ansicpg936\cocoartf1187\cocoasubrtf390
-\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 Verdana;}
-{\colortbl;\red255\green255\blue255;\red204\green204\blue204;}
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
-
-\f0\fs36 \cf2 user-1:User\{\}}
- VerticalPad
- 0
-
- TextRelativeArea
- {{0.10000000000000001, 0.14999999999999999}, {0.80000000000000004, 0.69999999999999996}}
-
-
- Bounds
- {{556.54055354053583, 325.93280718390133}, {124.41892177446698, 51}}
- Class
- ShapedGraphic
- FontInfo
-
- Color
-
- archive
-
- YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVy
- WCR2ZXJzaW9uVCR0b3BYJG9iamVjdHNfEA9O
- U0tleWVkQXJjaGl2ZXISAAGGoNEICVRyb290
- gAGlCwwVGR5VJG51bGzUDQ4PEBESExRfEBJO
- U0N1c3RvbUNvbG9yU3BhY2VXTlNXaGl0ZVxO
- U0NvbG9yU3BhY2VWJGNsYXNzgAJCMAAQA4AE
- 0hYQFxhUTlNJRBACgAPSGhscD1gkY2xhc3Nl
- c1okY2xhc3NuYW1log8dWE5TT2JqZWN00hob
- HyCiIB1XTlNDb2xvcggRGyQpMkRJTFFTWV9o
- fYWSmZueoKKnrK6wtb7JzNXa3QAAAAAAAAEB
- AAAAAAAAACEAAAAAAAAAAAAAAAAAAADl
-
- b
- 0
- g
- 0
- r
- 0
-
- Font
- Verdana
- Size
- 18
-
- ID
- 22
- Shape
- Rectangle
- Style
-
- fill
-
- Color
-
- b
- 0.793851
- g
- 0.625208
- r
- 0.562982
-
- FillType
- 2
- GradientAngle
- 90
- GradientColor
-
- b
- 0.639673
- g
- 0.450584
- r
- 0.381079
-
-
- shadow
-
- Beneath
- YES
- Color
-
- a
- 0.15
- b
- 0
- g
- 0
- r
- 0
-
- Fuzziness
- 0.0
- ShadowVector
- {2, 2}
-
- stroke
-
- Color
-
- b
- 0.511421
- g
- 0.637255
- r
- 0.120867
-
- Draws
- NO
- Width
- 2
-
-
- Text
-
- Text
- {\rtf1\ansi\ansicpg936\cocoartf1187\cocoasubrtf390
-\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 Verdana;}
-{\colortbl;\red255\green255\blue255;}
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
-
-\f0\fs36 \cf0 Del(k, v)}
- VerticalPad
- 0
-
- TextRelativeArea
- {{0.10000000000000001, 0.14999999999999999}, {0.80000000000000004, 0.69999999999999996}}
-
-
- Bounds
- {{556.54055354053583, 240.81081643580876}, {124.41892177446698, 51}}
- Class
- ShapedGraphic
- FontInfo
-
- Color
-
- archive
-
- YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVy
- WCR2ZXJzaW9uVCR0b3BYJG9iamVjdHNfEA9O
- U0tleWVkQXJjaGl2ZXISAAGGoNEICVRyb290
- gAGlCwwVGR5VJG51bGzUDQ4PEBESExRfEBJO
- U0N1c3RvbUNvbG9yU3BhY2VXTlNXaGl0ZVxO
- U0NvbG9yU3BhY2VWJGNsYXNzgAJCMAAQA4AE
- 0hYQFxhUTlNJRBACgAPSGhscD1gkY2xhc3Nl
- c1okY2xhc3NuYW1log8dWE5TT2JqZWN00hob
- HyCiIB1XTlNDb2xvcggRGyQpMkRJTFFTWV9o
- fYWSmZueoKKnrK6wtb7JzNXa3QAAAAAAAAEB
- AAAAAAAAACEAAAAAAAAAAAAAAAAAAADl
-
- b
- 0
- g
- 0
- r
- 0
-
- Font
- Verdana
- Size
- 18
-
- ID
- 21
- Shape
- Rectangle
- Style
-
- fill
-
- Color
-
- b
- 0.793851
- g
- 0.625208
- r
- 0.562982
-
- FillType
- 2
- GradientAngle
- 90
- GradientColor
-
- b
- 0.639673
- g
- 0.450584
- r
- 0.381079
-
-
- shadow
-
- Beneath
- YES
- Color
-
- a
- 0.15
- b
- 0
- g
- 0
- r
- 0
-
- Fuzziness
- 0.0
- ShadowVector
- {2, 2}
-
- stroke
-
- Color
-
- b
- 0.511421
- g
- 0.637255
- r
- 0.120867
-
- Draws
- NO
- Width
- 2
-
-
- Text
-
- Text
- {\rtf1\ansi\ansicpg936\cocoartf1187\cocoasubrtf390
-\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 Verdana;}
-{\colortbl;\red255\green255\blue255;}
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
-
-\f0\fs36 \cf0 Put(k, v)}
- VerticalPad
- 0
-
- TextRelativeArea
- {{0.10000000000000001, 0.14999999999999999}, {0.80000000000000004, 0.69999999999999996}}
-
-
- Bounds
- {{556.54054526129187, 150.52220626433376}, {124.41893005371094, 51}}
- Class
- ShapedGraphic
- FontInfo
-
- Color
-
- archive
-
- YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVy
- WCR2ZXJzaW9uVCR0b3BYJG9iamVjdHNfEA9O
- U0tleWVkQXJjaGl2ZXISAAGGoNEICVRyb290
- gAGlCwwVGR5VJG51bGzUDQ4PEBESExRfEBJO
- U0N1c3RvbUNvbG9yU3BhY2VXTlNXaGl0ZVxO
- U0NvbG9yU3BhY2VWJGNsYXNzgAJCMAAQA4AE
- 0hYQFxhUTlNJRBACgAPSGhscD1gkY2xhc3Nl
- c1okY2xhc3NuYW1log8dWE5TT2JqZWN00hob
- HyCiIB1XTlNDb2xvcggRGyQpMkRJTFFTWV9o
- fYWSmZueoKKnrK6wtb7JzNXa3QAAAAAAAAEB
- AAAAAAAAACEAAAAAAAAAAAAAAAAAAADl
-
- b
- 0
- g
- 0
- r
- 0
-
- Font
- Verdana
- Size
- 18
-
- ID
- 20
- Shape
- Rectangle
- Style
-
- fill
-
- Color
-
- b
- 0.793851
- g
- 0.625208
- r
- 0.562982
-
- FillType
- 2
- GradientAngle
- 90
- GradientColor
-
- b
- 0.639673
- g
- 0.450584
- r
- 0.381079
-
-
- shadow
-
- Beneath
- YES
- Color
-
- a
- 0.15
- b
- 0
- g
- 0
- r
- 0
-
- Fuzziness
- 0.0
- ShadowVector
- {2, 2}
-
- stroke
-
- Color
-
- b
- 0.511421
- g
- 0.637255
- r
- 0.120867
-
- Draws
- NO
- Width
- 2
-
-
- Text
-
- Text
- {\rtf1\ansi\ansicpg936\cocoartf1187\cocoasubrtf390
-\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 Verdana;}
-{\colortbl;\red255\green255\blue255;}
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
-
-\f0\fs36 \cf0 Get(k, v)}
- VerticalPad
- 0
-
- TextRelativeArea
- {{0.10000000000000001, 0.14999999999999999}, {0.80000000000000004, 0.69999999999999996}}
-
-
- Bounds
- {{276.44083898205287, 214.72973288487913}, {112.36092376708984, 79.447883605957031}}
- Class
- ShapedGraphic
- FontInfo
-
- Color
-
- archive
-
- YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVy
- WCR2ZXJzaW9uVCR0b3BYJG9iamVjdHNfEA9O
- U0tleWVkQXJjaGl2ZXISAAGGoNEICVRyb290
- gAGlCwwVGR5VJG51bGzUDQ4PEBESExRfEBJO
- U0N1c3RvbUNvbG9yU3BhY2VXTlNXaGl0ZVxO
- U0NvbG9yU3BhY2VWJGNsYXNzgAJCMAAQA4AE
- 0hYQFxhUTlNJRBACgAPSGhscD1gkY2xhc3Nl
- c1okY2xhc3NuYW1log8dWE5TT2JqZWN00hob
- HyCiIB1XTlNDb2xvcggRGyQpMkRJTFFTWV9o
- fYWSmZueoKKnrK6wtb7JzNXa3QAAAAAAAAEB
- AAAAAAAAACEAAAAAAAAAAAAAAAAAAADl
-
- b
- 0
- g
- 0
- r
- 0
-
- Font
- Verdana
- Size
- 18
-
- ID
- 19
- Shape
- Rectangle
- Style
-
- fill
-
- Color
-
- b
- 0.776486
- g
- 0.588495
- r
- 0.670497
-
- FillType
- 2
- GradientAngle
- 90
- GradientColor
-
- b
- 0.618021
- g
- 0.412924
- r
- 0.50312
-
-
- shadow
-
- Beneath
- YES
- Color
-
- a
- 0.15
- b
- 0
- g
- 0
- r
- 0
-
- Fuzziness
- 0.0
- ShadowVector
- {2, 2}
-
- stroke
-
- Color
-
- b
- 0.590997
- g
- 0.18677
- r
- 0.567819
-
- Draws
- NO
- Width
- 2
-
-
- Text
-
- Text
- {\rtf1\ansi\ansicpg936\cocoartf1187\cocoasubrtf390
-\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 Verdana;}
-{\colortbl;\red255\green255\blue255;}
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
-
-\f0\fs36 \cf0 select id from tb2:[2,5]}
- VerticalPad
- 0
-
- TextRelativeArea
- {{0.10000000000000001, 0.14999999999999999}, {0.80000000000000004, 0.69999999999999996}}
-
-
- Bounds
- {{274.32251963877655, 117.18245433711769}, {112.36092376708984, 68.777008056640625}}
- Class
- ShapedGraphic
- FontInfo
-
- Color
-
- archive
-
- YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVy
- WCR2ZXJzaW9uVCR0b3BYJG9iamVjdHNfEA9O
- U0tleWVkQXJjaGl2ZXISAAGGoNEICVRyb290
- gAGlCwwVGR5VJG51bGzUDQ4PEBESExRfEBJO
- U0N1c3RvbUNvbG9yU3BhY2VXTlNXaGl0ZVxO
- U0NvbG9yU3BhY2VWJGNsYXNzgAJCMAAQA4AE
- 0hYQFxhUTlNJRBACgAPSGhscD1gkY2xhc3Nl
- c1okY2xhc3NuYW1log8dWE5TT2JqZWN00hob
- HyCiIB1XTlNDb2xvcggRGyQpMkRJTFFTWV9o
- fYWSmZueoKKnrK6wtb7JzNXa3QAAAAAAAAEB
- AAAAAAAAACEAAAAAAAAAAAAAAAAAAADl
-
- b
- 0
- g
- 0
- r
- 0
-
- Font
- Verdana
- Size
- 18
-
- ID
- 18
- Shape
- Rectangle
- Style
-
- fill
-
- Color
-
- b
- 0.776486
- g
- 0.588495
- r
- 0.670497
-
- FillType
- 2
- GradientAngle
- 90
- GradientColor
-
- b
- 0.618021
- g
- 0.412924
- r
- 0.50312
-
-
- shadow
-
- Beneath
- YES
- Color
-
- a
- 0.15
- b
- 0
- g
- 0
- r
- 0
-
- Fuzziness
- 0.0
- ShadowVector
- {2, 2}
-
- stroke
-
- Color
-
- b
- 0.590997
- g
- 0.18677
- r
- 0.567819
-
- Draws
- NO
- Width
- 2
-
-
- Text
-
- Text
- {\rtf1\ansi\ansicpg936\cocoartf1187\cocoasubrtf390
-\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 Verdana;}
-{\colortbl;\red255\green255\blue255;}
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
-
-\f0\fs36 \cf0 select id from tb1:[1,2,3]}
- VerticalPad
- 0
-
- TextRelativeArea
- {{0.10000000000000001, 0.14999999999999999}, {0.80000000000000004, 0.69999999999999996}}
-
-
- Bounds
- {{103.00000194954862, 30.108108889738791}, {80, 51}}
- Class
- ShapedGraphic
- FontInfo
-
- Color
-
- archive
-
- YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVy
- WCR2ZXJzaW9uVCR0b3BYJG9iamVjdHNfEA9O
- U0tleWVkQXJjaGl2ZXISAAGGoNEICVRyb290
- gAGlCwwVGR5VJG51bGzUDQ4PEBESExRfEBJO
- U0N1c3RvbUNvbG9yU3BhY2VXTlNXaGl0ZVxO
- U0NvbG9yU3BhY2VWJGNsYXNzgAJCMAAQA4AE
- 0hYQFxhUTlNJRBACgAPSGhscD1gkY2xhc3Nl
- c1okY2xhc3NuYW1log8dWE5TT2JqZWN00hob
- HyCiIB1XTlNDb2xvcggRGyQpMkRJTFFTWV9o
- fYWSmZueoKKnrK6wtb7JzNXa3QAAAAAAAAEB
- AAAAAAAAACEAAAAAAAAAAAAAAAAAAADl
-
- b
- 0
- g
- 0
- r
- 0
-
- Font
- Verdana
- Size
- 18
-
- ID
- 14
- Shape
- Rectangle
- Style
-
- fill
-
- Color
-
- b
- 0.776486
- g
- 0.588495
- r
- 0.670497
-
- FillType
- 2
- GradientAngle
- 90
- GradientColor
-
- b
- 0.618021
- g
- 0.412924
- r
- 0.50312
-
-
- shadow
-
- Beneath
- YES
- Color
-
- a
- 0.15
- b
- 0
- g
- 0
- r
- 0
-
- Fuzziness
- 0.0
- ShadowVector
- {2, 2}
-
- stroke
-
- Color
-
- b
- 0.590997
- g
- 0.18677
- r
- 0.567819
-
- Draws
- NO
- Width
- 2
-
-
- Text
-
- Text
- {\rtf1\ansi\ansicpg936\cocoartf1187\cocoasubrtf390
-\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset134 STHeitiSC-Light;}
-{\colortbl;\red255\green255\blue255;}
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
-
-\f0\fs36 \cf0 SQL}
- VerticalPad
- 0
-
- TextRelativeArea
- {{0.10000000000000001, 0.14999999999999999}, {0.80000000000000004, 0.69999999999999996}}
-
-
- Bounds
- {{532.04631600645348, 25.096524339927051}, {166.93052673339844, 79.447883605957031}}
- Class
- ShapedGraphic
- FontInfo
-
- Color
-
- archive
-
- YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVy
- WCR2ZXJzaW9uVCR0b3BYJG9iamVjdHNfEA9O
- U0tleWVkQXJjaGl2ZXISAAGGoNEICVRyb290
- gAGlCwwVGR5VJG51bGzUDQ4PEBESExRfEBJO
- U0N1c3RvbUNvbG9yU3BhY2VXTlNXaGl0ZVxO
- U0NvbG9yU3BhY2VWJGNsYXNzgAJCMAAQA4AE
- 0hYQFxhUTlNJRBACgAPSGhscD1gkY2xhc3Nl
- c1okY2xhc3NuYW1log8dWE5TT2JqZWN00hob
- HyCiIB1XTlNDb2xvcggRGyQpMkRJTFFTWV9o
- fYWSmZueoKKnrK6wtb7JzNXa3QAAAAAAAAEB
- AAAAAAAAACEAAAAAAAAAAAAAAAAAAADl
-
- b
- 0
- g
- 0
- r
- 0
-
- Font
- Verdana
- Size
- 18
-
- ID
- 13
- Shape
- Rectangle
- Style
-
- fill
-
- Color
-
- b
- 0.793851
- g
- 0.625208
- r
- 0.562982
-
- FillType
- 2
- GradientAngle
- 90
- GradientColor
-
- b
- 0.639673
- g
- 0.450584
- r
- 0.381079
-
-
- shadow
-
- Beneath
- YES
- Color
-
- a
- 0.15
- b
- 0
- g
- 0
- r
- 0
-
- Fuzziness
- 0.0
- ShadowVector
- {2, 2}
-
- stroke
-
- Color
-
- b
- 0.511421
- g
- 0.637255
- r
- 0.120867
-
- Draws
- NO
- Width
- 2
-
-
- Text
-
- Text
- {\rtf1\ansi\ansicpg936\cocoartf1187\cocoasubrtf390
-\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 Verdana;\f1\fnil\fcharset134 STHeitiSC-Light;}
-{\colortbl;\red255\green255\blue255;}
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
-
-\f0\fs36 \cf0 Cache\
-
-\f1 Store}
- VerticalPad
- 0
-
- TextRelativeArea
- {{0.10000000000000001, 0.14999999999999999}, {0.80000000000000004, 0.69999999999999996}}
-
-
- Bounds
- {{298.9845516069733, 37.412179328792348}, {173.03089904785156, 51}}
- Class
- ShapedGraphic
- FontInfo
-
- Color
-
- b
- 0.8
- g
- 0.8
- r
- 0.8
-
- Font
- Verdana
- Size
- 18
-
- ID
- 17
- Shape
- Rectangle
- Style
-
- fill
-
- Color
-
- b
- 0.6
- g
- 0.6
- r
- 0.6
-
- FillType
- 2
- GradientAngle
- 90
- GradientColor
-
- b
- 0.4
- g
- 0.4
- r
- 0.4
-
-
- shadow
-
- Beneath
- YES
- Color
-
- a
- 0.15
- b
- 0
- g
- 0
- r
- 0
-
- Fuzziness
- 0.0
- ShadowVector
- {2, 2}
-
- stroke
-
- Color
-
- b
- 0.590997
- g
- 0.18677
- r
- 0.567819
-
- Draws
- NO
- Width
- 2
-
-
- Text
-
- Text
- {\rtf1\ansi\ansicpg936\cocoartf1187\cocoasubrtf390
-\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 Verdana;}
-{\colortbl;\red255\green255\blue255;\red204\green204\blue204;}
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
-
-\f0\fs36 \cf2 LRUCacher}
- VerticalPad
- 0
-
- TextRelativeArea
- {{0.10000000000000001, 0.14999999999999999}, {0.80000000000000004, 0.69999999999999996}}
-
-
- Bounds
- {{99.822519035537013, 333.12161552787364}, {88, 51}}
- Class
- ShapedGraphic
- FontInfo
-
- Color
-
- archive
-
- YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVy
- WCR2ZXJzaW9uVCR0b3BYJG9iamVjdHNfEA9O
- U0tleWVkQXJjaGl2ZXISAAGGoNEICVRyb290
- gAGlCwwVGR5VJG51bGzUDQ4PEBESExRfEBJO
- U0N1c3RvbUNvbG9yU3BhY2VXTlNXaGl0ZVxO
- U0NvbG9yU3BhY2VWJGNsYXNzgAJCMAAQA4AE
- 0hYQFxhUTlNJRBACgAPSGhscD1gkY2xhc3Nl
- c1okY2xhc3NuYW1log8dWE5TT2JqZWN00hob
- HyCiIB1XTlNDb2xvcggRGyQpMkRJTFFTWV9o
- fYWSmZueoKKnrK6wtb7JzNXa3QAAAAAAAAEB
- AAAAAAAAACEAAAAAAAAAAAAAAAAAAADl
-
- b
- 0
- g
- 0
- r
- 0
-
- Font
- Verdana
- NSKern
- 0.0
- Size
- 15
-
- ID
- 12
- Magnets
-
- {1, 0}
- {-1, 0}
-
- Shape
- Rectangle
- Style
-
- fill
-
- Color
-
- b
- 0.806569
- g
- 0.806569
- r
- 0.806569
-
- FillType
- 2
- GradientAngle
- 90
- GradientColor
-
- w
- 0.653285
-
-
- shadow
-
- Beneath
- YES
- Color
-
- a
- 0.15
- b
- 0
- g
- 0
- r
- 0
-
- Fuzziness
- 0.0
- ShadowVector
- {2, 2}
-
- stroke
-
- Color
-
- b
- 0.2
- g
- 0.2
- r
- 0.2
-
- Draws
- NO
-
-
- Text
-
- Text
- {\rtf1\ansi\ansicpg936\cocoartf1187\cocoasubrtf390
-\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 Verdana;}
-{\colortbl;\red255\green255\blue255;}
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc
-
-\f0\fs30 \cf0 \expnd0\expndtw0\kerning0
-Delet\
-SQL}
- VerticalPad
- 0
-
- TextRelativeArea
- {{0.10000000000000001, 0.14999999999999999}, {0.80000000000000004, 0.69999999999999996}}
-
-
- Bounds
- {{97.118322659032714, 226.09466078541047}, {88, 51}}
- Class
- ShapedGraphic
- FontInfo
-
- Color
-
- b
- 0
- g
- 0
- r
- 0.501961
-
- Font
- Verdana
- NSKern
- 0.0
- Size
- 15
-
- ID
- 15
- Magnets
-
- {1, 0}
- {-1, 0}
-
- Shape
- Rectangle
- Style
-
- fill
-
- Color
-
- b
- 0
- g
- 0.389485
- r
- 1
-
- FillType
- 3
- GradientCenter
- {-0.34285700000000002, -0.114286}
- GradientColor
-
- b
- 0
- g
- 0.495748
- r
- 1
-
- MiddleColor
-
- b
- 0
- g
- 0.887657
- r
- 1
-
- MiddleFraction
- 0.6269841194152832
- TrippleBlend
- YES
-
- shadow
-
- Beneath
- YES
- Color
-
- a
- 0.15
- b
- 0
- g
- 0
- r
- 0
-
- Fuzziness
- 0.0
- ShadowVector
- {2, 2}
-
- stroke
-
- Color
-
- b
- 0.2
- g
- 0.2
- r
- 0.2
-
- Draws
- NO
-
-
- Text
-
- Text
- {\rtf1\ansi\ansicpg936\cocoartf1187\cocoasubrtf390
-\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset0 Verdana;}
-{\colortbl;\red255\green255\blue255;\red128\green0\blue0;}
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc
-
-\f0\fs30 \cf2 \expnd0\expndtw0\kerning0
-Update\
-SQL}
- VerticalPad
- 0
-
- TextRelativeArea
- {{0.10000000000000001, 0.14999999999999999}, {0.80000000000000004, 0.69999999999999996}}
-
-
- Bounds
- {{103, 123.08108395608006}, {80, 51}}
- Class
- ShapedGraphic
- FontInfo
-
- Color
-
- b
- 0.821332
- g
- 0.672602
- r
- 0.928374
-
- Font
- Verdana
- Size
- 18
-
- ID
- 16
- Shape
- Rectangle
- Style
-
- fill
-
- Color
-
- b
- 0.436973
- g
- 0.155566
- r
- 0.758999
-
- FillType
- 2
- GradientAngle
- 90
- GradientColor
-
- b
- 0.25098
- g
- 0
- r
- 0.501961
-
-
- shadow
-
- Beneath
- YES
- Color
-
- a
- 0.15
- b
- 0
- g
- 0
- r
- 0
-
- Fuzziness
- 0.0
- ShadowVector
- {2, 2}
-
- stroke
-
- Color
-
- b
- 0.511421
- g
- 0.637255
- r
- 0.120867
-
- Draws
- NO
- Width
- 2
-
-
- Text
-
- Text
- {\rtf1\ansi\ansicpg936\cocoartf1187\cocoasubrtf390
-\cocoascreenfonts1{\fonttbl\f0\fnil\fcharset134 STHeitiSC-Light;\f1\fnil\fcharset0 Verdana;}
-{\colortbl;\red255\green255\blue255;\red237\green172\blue209;}
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
-
-\f0\fs36 \cf2 select
-\f1
-\f0 SQL}
- VerticalPad
- 0
-
- TextRelativeArea
- {{0.10000000000000001, 0.14999999999999999}, {0.80000000000000004, 0.69999999999999996}}
-
-
- GridInfo
-
- GuidesLocked
- NO
- GuidesVisible
- YES
- HPages
- 2
- ImageCounter
- 3
- KeepToScale
-
- Layers
-
-
- Lock
- NO
- Name
- 图层 1
- Print
- YES
- View
- YES
-
-
- LayoutInfo
-
- Animate
- NO
- AutoLayout
- 2
- circoMinDist
- 18
- circoSeparation
- 0.0
- layoutEngine
- neato
- neatoLineLength
- 0.92083334922790527
- neatoSeparation
- 0.0
- twopiSeparation
- 0.0
-
- LinksVisible
- NO
- MagnetsVisible
- NO
- MasterSheets
-
- ModificationDate
- 2013-09-29 08:24:57 +0000
- Modifier
- Lunny Xiao
- NotesVisible
- NO
- Orientation
- 2
- OriginVisible
- NO
- OutlineStyle
- Brainstorming/Clouds
- PageBreaks
- NO
- PrintInfo
-
- NSBottomMargin
-
- float
- 41
-
- NSHorizonalPagination
-
- coded
- BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG
-
- NSLeftMargin
-
- float
- 18
-
- NSPaperSize
-
- size
- {595, 842}
-
- NSPrintReverseOrientation
-
- int
- 0
-
- NSRightMargin
-
- float
- 18
-
- NSTopMargin
-
- float
- 18
-
-
- PrintOnePage
-
- ReadOnly
- NO
- RowAlign
- 1
- RowSpacing
- 36
- SheetTitle
- 版面 1
- SmartAlignmentGuidesActive
- YES
- SmartDistanceGuidesActive
- YES
- UniqueID
- 1
- UseEntirePage
-
- VPages
- 1
- WindowInfo
-
- CurrentSheet
- 0
- ExpandedCanvases
-
- FitInWindow
-
- Frame
- {{138, 197}, {869, 617}}
- ListView
-
- OutlineWidth
- 142
- RightSidebar
-
- Sidebar
-
- SidebarWidth
- 138
- VisibleRegion
- {{1.0591603214876664, 1.0591603214876664}, {770.00955372153339, 553.94084813804955}}
- Zoom
- 0.94414412975311279
- ZoomValues
-
-
- 版面 1
- 0.0
- 1
-
-
-
-
-
diff --git a/vendor/github.com/go-xorm/xorm/docs/images/cache_design.png b/vendor/github.com/go-xorm/xorm/docs/images/cache_design.png
deleted file mode 100644
index 78796b56833..00000000000
Binary files a/vendor/github.com/go-xorm/xorm/docs/images/cache_design.png and /dev/null differ
diff --git a/vendor/github.com/go-xorm/xorm/examples/cache.go b/vendor/github.com/go-xorm/xorm/examples/cache.go
deleted file mode 100644
index a86dfd2d1b9..00000000000
--- a/vendor/github.com/go-xorm/xorm/examples/cache.go
+++ /dev/null
@@ -1,110 +0,0 @@
-package main
-
-import (
- "fmt"
- "os"
-
- "github.com/go-xorm/xorm"
- _ "github.com/mattn/go-sqlite3"
-)
-
-type User struct {
- Id int64
- Name string
-}
-
-func main() {
- f := "cache.db"
- os.Remove(f)
-
- Orm, err := xorm.NewEngine("sqlite3", f)
- if err != nil {
- fmt.Println(err)
- return
- }
- Orm.ShowSQL = true
- cacher := xorm.NewLRUCacher(xorm.NewMemoryStore(), 1000)
- Orm.SetDefaultCacher(cacher)
-
- err = Orm.CreateTables(&User{})
- if err != nil {
- fmt.Println(err)
- return
- }
-
- _, err = Orm.Insert(&User{Name: "xlw"})
- if err != nil {
- fmt.Println(err)
- return
- }
-
- users := make([]User, 0)
- err = Orm.Find(&users)
- if err != nil {
- fmt.Println(err)
- return
- }
-
- fmt.Println("users:", users)
-
- users2 := make([]User, 0)
-
- err = Orm.Find(&users2)
- if err != nil {
- fmt.Println(err)
- return
- }
-
- fmt.Println("users2:", users2)
-
- users3 := make([]User, 0)
-
- err = Orm.Find(&users3)
- if err != nil {
- fmt.Println(err)
- return
- }
-
- fmt.Println("users3:", users3)
-
- user4 := new(User)
- has, err := Orm.Id(1).Get(user4)
- if err != nil {
- fmt.Println(err)
- return
- }
-
- fmt.Println("user4:", has, user4)
-
- user4.Name = "xiaolunwen"
- _, err = Orm.Id(1).Update(user4)
- if err != nil {
- fmt.Println(err)
- return
- }
- fmt.Println("user4:", user4)
-
- user5 := new(User)
- has, err = Orm.Id(1).Get(user5)
- if err != nil {
- fmt.Println(err)
- return
- }
- fmt.Println("user5:", has, user5)
-
- _, err = Orm.Id(1).Delete(new(User))
- if err != nil {
- fmt.Println(err)
- return
- }
-
- for {
- user6 := new(User)
- has, err = Orm.Id(1).Get(user6)
- if err != nil {
- fmt.Println(err)
- return
- }
- fmt.Println("user6:", has, user6)
- }
-}
diff --git a/vendor/github.com/go-xorm/xorm/examples/cachegoroutine.go b/vendor/github.com/go-xorm/xorm/examples/cachegoroutine.go
deleted file mode 100644
index 0e50f5adfa7..00000000000
--- a/vendor/github.com/go-xorm/xorm/examples/cachegoroutine.go
+++ /dev/null
@@ -1,107 +0,0 @@
-package main
-
-import (
- "fmt"
- "os"
- "time"
-
- _ "github.com/go-sql-driver/mysql"
- "github.com/go-xorm/xorm"
- _ "github.com/mattn/go-sqlite3"
-)
-
-type User struct {
- Id int64
- Name string
-}
-
-func sqliteEngine() (*xorm.Engine, error) {
- os.Remove("./test.db")
- return xorm.NewEngine("sqlite3", "./goroutine.db")
-}
-
-func mysqlEngine() (*xorm.Engine, error) {
- return xorm.NewEngine("mysql", "root:@/test?charset=utf8")
-}
-
-var u *User = &User{}
-
-func test(engine *xorm.Engine) {
- err := engine.CreateTables(u)
- if err != nil {
- fmt.Println(err)
- return
- }
-
- size := 500
- queue := make(chan int, size)
-
- for i := 0; i < size; i++ {
- go func(x int) {
- //x := i
- err := engine.Ping()
- if err != nil {
- fmt.Println(err)
- } else {
- for j := 0; j < 10; j++ {
- if x+j < 2 {
- _, err = engine.Get(u)
- } else if x+j < 4 {
- users := make([]User, 0)
- err = engine.Find(&users)
- } else if x+j < 8 {
- _, err = engine.Count(u)
- } else if x+j < 16 {
- _, err = engine.Insert(&User{Name: "xlw"})
- } else if x+j < 32 {
- //_, err = engine.Id(1).Delete(u)
- _, err = engine.Delete(u)
- }
- if err != nil {
- fmt.Println(err)
- queue <- x
- return
- }
- }
- fmt.Printf("%v success!\n", x)
- }
- queue <- x
- }(i)
- }
-
- for i := 0; i < size; i++ {
- <-queue
- }
-
- //conns := atomic.LoadInt32(&xorm.ConnectionNum)
- //fmt.Println("connection number:", conns)
- fmt.Println("end")
-}
-
-func main() {
- fmt.Println("-----start sqlite go routines-----")
- engine, err := sqliteEngine()
- if err != nil {
- fmt.Println(err)
- return
- }
- engine.ShowSQL = true
- cacher := xorm.NewLRUCacher2(xorm.NewMemoryStore(), time.Hour, 1000)
- engine.SetDefaultCacher(cacher)
- fmt.Println(engine)
- test(engine)
- fmt.Println("test end")
- engine.Close()
-
- fmt.Println("-----start mysql go routines-----")
- engine, err = mysqlEngine()
- engine.ShowSQL = true
- cacher = xorm.NewLRUCacher2(xorm.NewMemoryStore(), time.Hour, 1000)
- engine.SetDefaultCacher(cacher)
- if err != nil {
- fmt.Println(err)
- return
- }
- defer engine.Close()
- test(engine)
-}
diff --git a/vendor/github.com/go-xorm/xorm/examples/conversion.go b/vendor/github.com/go-xorm/xorm/examples/conversion.go
deleted file mode 100644
index 1a74dea8cd4..00000000000
--- a/vendor/github.com/go-xorm/xorm/examples/conversion.go
+++ /dev/null
@@ -1,77 +0,0 @@
-package main
-
-import (
- "errors"
- "fmt"
- "os"
-
- "github.com/go-xorm/xorm"
- _ "github.com/mattn/go-sqlite3"
-)
-
-type Status struct {
- Name string
- Color string
-}
-
-var (
- Registed Status = Status{"Registed", "white"}
- Approved Status = Status{"Approved", "green"}
- Removed Status = Status{"Removed", "red"}
- Statuses map[string]Status = map[string]Status{
- Registed.Name: Registed,
- Approved.Name: Approved,
- Removed.Name: Removed,
- }
-)
-
-func (s *Status) FromDB(bytes []byte) error {
- if r, ok := Statuses[string(bytes)]; ok {
- *s = r
- return nil
- } else {
- return errors.New("no this data")
- }
-}
-
-func (s *Status) ToDB() ([]byte, error) {
- return []byte(s.Name), nil
-}
-
-type User struct {
- Id int64
- Name string
- Status Status `xorm:"varchar(40)"`
-}
-
-func main() {
- f := "conversion.db"
- os.Remove(f)
-
- Orm, err := xorm.NewEngine("sqlite3", f)
- if err != nil {
- fmt.Println(err)
- return
- }
- Orm.ShowSQL = true
- err = Orm.CreateTables(&User{})
- if err != nil {
- fmt.Println(err)
- return
- }
-
- _, err = Orm.Insert(&User{1, "xlw", Registed})
- if err != nil {
- fmt.Println(err)
- return
- }
-
- users := make([]User, 0)
- err = Orm.Find(&users)
- if err != nil {
- fmt.Println(err)
- return
- }
-
- fmt.Println(users)
-}
diff --git a/vendor/github.com/go-xorm/xorm/examples/derive.go b/vendor/github.com/go-xorm/xorm/examples/derive.go
deleted file mode 100644
index 2a340060efb..00000000000
--- a/vendor/github.com/go-xorm/xorm/examples/derive.go
+++ /dev/null
@@ -1,67 +0,0 @@
-package main
-
-import (
- "fmt"
- "os"
-
- "github.com/go-xorm/xorm"
- _ "github.com/mattn/go-sqlite3"
-)
-
-type User struct {
- Id int64
- Name string
-}
-
-type LoginInfo struct {
- Id int64
- IP string
- UserId int64
-}
-
-type LoginInfo1 struct {
- LoginInfo `xorm:"extends"`
- UserName string
-}
-
-func main() {
- f := "derive.db"
- os.Remove(f)
-
- Orm, err := xorm.NewEngine("sqlite3", f)
- if err != nil {
- fmt.Println(err)
- return
- }
- defer Orm.Close()
- Orm.ShowSQL = true
- err = Orm.CreateTables(&User{}, &LoginInfo{})
- if err != nil {
- fmt.Println(err)
- return
- }
-
- _, err = Orm.Insert(&User{1, "xlw"}, &LoginInfo{1, "127.0.0.1", 1})
- if err != nil {
- fmt.Println(err)
- return
- }
-
- info := LoginInfo{}
- _, err = Orm.Id(1).Get(&info)
- if err != nil {
- fmt.Println(err)
- return
- }
- fmt.Println(info)
-
- infos := make([]LoginInfo1, 0)
- err = Orm.Sql(`select *, (select name from user where id = login_info.user_id) as user_name from
- login_info limit 10`).Find(&infos)
- if err != nil {
- fmt.Println(err)
- return
- }
-
- fmt.Println(infos)
-}
diff --git a/vendor/github.com/go-xorm/xorm/examples/goroutine.go b/vendor/github.com/go-xorm/xorm/examples/goroutine.go
deleted file mode 100644
index f99c9fbe472..00000000000
--- a/vendor/github.com/go-xorm/xorm/examples/goroutine.go
+++ /dev/null
@@ -1,107 +0,0 @@
-package main
-
-import (
- "fmt"
- "os"
- "runtime"
-
- _ "github.com/go-sql-driver/mysql"
- "github.com/go-xorm/xorm"
- _ "github.com/mattn/go-sqlite3"
-)
-
-type User struct {
- Id int64
- Name string
-}
-
-func sqliteEngine() (*xorm.Engine, error) {
- os.Remove("./test.db")
- return xorm.NewEngine("sqlite3", "./goroutine.db")
-}
-
-func mysqlEngine() (*xorm.Engine, error) {
- return xorm.NewEngine("mysql", "root:@/test?charset=utf8")
-}
-
-var u *User = &User{}
-
-func test(engine *xorm.Engine) {
- err := engine.CreateTables(u)
- if err != nil {
- fmt.Println(err)
- return
- }
-
- size := 100
- queue := make(chan int, size)
-
- for i := 0; i < size; i++ {
- go func(x int) {
- //x := i
- err := engine.Ping()
- if err != nil {
- fmt.Println(err)
- } else {
- /*err = engine.(u)
- if err != nil {
- fmt.Println("Map user failed")
- } else {*/
- for j := 0; j < 10; j++ {
- if x+j < 2 {
- _, err = engine.Get(u)
- } else if x+j < 4 {
- users := make([]User, 0)
- err = engine.Find(&users)
- } else if x+j < 8 {
- _, err = engine.Count(u)
- } else if x+j < 16 {
- _, err = engine.Insert(&User{Name: "xlw"})
- } else if x+j < 32 {
- _, err = engine.Id(1).Delete(u)
- }
- if err != nil {
- fmt.Println(err)
- queue <- x
- return
- }
- }
- fmt.Printf("%v success!\n", x)
- //}
- }
- queue <- x
- }(i)
- }
-
- for i := 0; i < size; i++ {
- <-queue
- }
-
- //conns := atomic.LoadInt32(&xorm.ConnectionNum)
- //fmt.Println("connection number:", conns)
- fmt.Println("end")
-}
-
-func main() {
- runtime.GOMAXPROCS(2)
- fmt.Println("-----start sqlite go routines-----")
- engine, err := sqliteEngine()
- if err != nil {
- fmt.Println(err)
- return
- }
- engine.ShowSQL = true
- fmt.Println(engine)
- test(engine)
- fmt.Println("test end")
- engine.Close()
-
- fmt.Println("-----start mysql go routines-----")
- engine, err = mysqlEngine()
- if err != nil {
- fmt.Println(err)
- return
- }
- defer engine.Close()
- test(engine)
-}
diff --git a/vendor/github.com/go-xorm/xorm/examples/maxconnect.go b/vendor/github.com/go-xorm/xorm/examples/maxconnect.go
deleted file mode 100644
index 5f239d1e529..00000000000
--- a/vendor/github.com/go-xorm/xorm/examples/maxconnect.go
+++ /dev/null
@@ -1,107 +0,0 @@
-package main
-
-import (
- "fmt"
- "os"
- "runtime"
-
- _ "github.com/go-sql-driver/mysql"
- "github.com/go-xorm/xorm"
- _ "github.com/mattn/go-sqlite3"
-)
-
-type User struct {
- Id int64
- Name string
-}
-
-func sqliteEngine() (*xorm.Engine, error) {
- os.Remove("./test.db")
- return xorm.NewEngine("sqlite3", "./goroutine.db")
-}
-
-func mysqlEngine() (*xorm.Engine, error) {
- return xorm.NewEngine("mysql", "root:@/test?charset=utf8")
-}
-
-var u *User = &User{}
-
-func test(engine *xorm.Engine) {
- err := engine.CreateTables(u)
- if err != nil {
- fmt.Println(err)
- return
- }
-
- engine.ShowSQL = true
- engine.SetMaxOpenConns(5)
-
- size := 1000
- queue := make(chan int, size)
-
- for i := 0; i < size; i++ {
- go func(x int) {
- //x := i
- err := engine.Ping()
- if err != nil {
- fmt.Println(err)
- } else {
- /*err = engine.Map(u)
- if err != nil {
- fmt.Println("Map user failed")
- } else {*/
- for j := 0; j < 10; j++ {
- if x+j < 2 {
- _, err = engine.Get(u)
- } else if x+j < 4 {
- users := make([]User, 0)
- err = engine.Find(&users)
- } else if x+j < 8 {
- _, err = engine.Count(u)
- } else if x+j < 16 {
- _, err = engine.Insert(&User{Name: "xlw"})
- } else if x+j < 32 {
- _, err = engine.Id(1).Delete(u)
- }
- if err != nil {
- fmt.Println(err)
- queue <- x
- return
- }
- }
- fmt.Printf("%v success!\n", x)
- //}
- }
- queue <- x
- }(i)
- }
-
- for i := 0; i < size; i++ {
- <-queue
- }
-
- fmt.Println("end")
-}
-
-func main() {
- runtime.GOMAXPROCS(2)
- fmt.Println("create engine")
- engine, err := sqliteEngine()
- if err != nil {
- fmt.Println(err)
- return
- }
- engine.ShowSQL = true
- fmt.Println(engine)
- test(engine)
- fmt.Println("------------------------")
- engine.Close()
-
- engine, err = mysqlEngine()
- if err != nil {
- fmt.Println(err)
- return
- }
- defer engine.Close()
- test(engine)
-}
diff --git a/vendor/github.com/go-xorm/xorm/examples/singlemapping.go b/vendor/github.com/go-xorm/xorm/examples/singlemapping.go
deleted file mode 100644
index f2d675b801e..00000000000
--- a/vendor/github.com/go-xorm/xorm/examples/singlemapping.go
+++ /dev/null
@@ -1,55 +0,0 @@
-package main
-
-import (
- "fmt"
- "os"
-
- "github.com/go-xorm/xorm"
- _ "github.com/mattn/go-sqlite3"
-)
-
-type User struct {
- Id int64
- Name string
-}
-
-type LoginInfo struct {
- Id int64
- IP string
- UserId int64
- // timestamp should be updated by database, so only allow get from db
- TimeStamp string `xorm:"<-"`
- // assume
- Nonuse int `xorm:"->"`
-}
-
-func main() {
- f := "singleMapping.db"
- os.Remove(f)
-
- Orm, err := xorm.NewEngine("sqlite3", f)
- if err != nil {
- fmt.Println(err)
- return
- }
- Orm.ShowSQL = true
- err = Orm.CreateTables(&User{}, &LoginInfo{})
- if err != nil {
- fmt.Println(err)
- return
- }
-
- _, err = Orm.Insert(&User{1, "xlw"}, &LoginInfo{1, "127.0.0.1", 1, "", 23})
- if err != nil {
- fmt.Println(err)
- return
- }
-
- info := LoginInfo{}
- _, err = Orm.Id(1).Get(&info)
- if err != nil {
- fmt.Println(err)
- return
- }
- fmt.Println(info)
-}
diff --git a/vendor/github.com/go-xorm/xorm/examples/sync.go b/vendor/github.com/go-xorm/xorm/examples/sync.go
deleted file mode 100644
index d108e4558cf..00000000000
--- a/vendor/github.com/go-xorm/xorm/examples/sync.go
+++ /dev/null
@@ -1,104 +0,0 @@
-package main
-
-import (
- "fmt"
-
- _ "github.com/go-sql-driver/mysql"
- "github.com/go-xorm/xorm"
- _ "github.com/lib/pq"
- _ "github.com/mattn/go-sqlite3"
-)
-
-type SyncUser2 struct {
- Id int64
- Name string `xorm:"unique"`
- Age int `xorm:"index"`
- Title string
- Address string
- Genre string
- Area string
- Date int
-}
-
-type SyncLoginInfo2 struct {
- Id int64
- IP string `xorm:"index"`
- UserId int64
- AddedCol int
- // timestamp should be updated by database, so only allow get from db
- TimeStamp string
- // assume
- Nonuse int `xorm:"unique"`
- Newa string `xorm:"index"`
-}
-
-func sync(engine *xorm.Engine) error {
- return engine.Sync(&SyncLoginInfo2{}, &SyncUser2{})
-}
-
-func sqliteEngine() (*xorm.Engine, error) {
- f := "sync.db"
- //os.Remove(f)
-
- return xorm.NewEngine("sqlite3", f)
-}
-
-func mysqlEngine() (*xorm.Engine, error) {
- return xorm.NewEngine("mysql", "root:@/test?charset=utf8")
-}
-
-func postgresEngine() (*xorm.Engine, error) {
- return xorm.NewEngine("postgres", "dbname=xorm_test sslmode=disable")
-}
-
-type engineFunc func() (*xorm.Engine, error)
-
-func main() {
- //engines := []engineFunc{sqliteEngine, mysqlEngine, postgresEngine}
- //engines := []engineFunc{sqliteEngine}
- //engines := []engineFunc{mysqlEngine}
- engines := []engineFunc{postgresEngine}
- for _, enginefunc := range engines {
- Orm, err := enginefunc()
- fmt.Println("--------", Orm.DriverName, "----------")
- if err != nil {
- fmt.Println(err)
- return
- }
- Orm.ShowSQL = true
- err = sync(Orm)
- if err != nil {
- fmt.Println(err)
- }
-
- _, err = Orm.Where("id > 0").Delete(&SyncUser2{})
- if err != nil {
- fmt.Println(err)
- }
-
- user := &SyncUser2{
- Name: "testsdf",
- Age: 15,
- Title: "newsfds",
- Address: "fasfdsafdsaf",
- Genre: "fsafd",
- Area: "fafdsafd",
- Date: 1000,
- }
- _, err = Orm.Insert(user)
- if err != nil {
- fmt.Println(err)
- return
- }
-
- isexist, err := Orm.IsTableExist("sync_user2")
- if err != nil {
- fmt.Println(err)
- return
- }
- if !isexist {
- fmt.Println("sync_user2 is not exist")
- return
- }
- }
-}
diff --git a/vendor/github.com/go-xorm/xorm/examples/tables.go b/vendor/github.com/go-xorm/xorm/examples/tables.go
deleted file mode 100644
index 97c842be36d..00000000000
--- a/vendor/github.com/go-xorm/xorm/examples/tables.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package main
-
-import (
- "fmt"
- "os"
-
- "github.com/go-xorm/xorm"
- _ "github.com/mattn/go-sqlite3"
-)
-
-func main() {
- if len(os.Args) < 2 {
- fmt.Println("need db path")
- return
- }
-
- orm, err := xorm.NewEngine("sqlite3", os.Args[1])
- if err != nil {
- fmt.Println(err)
- return
- }
- defer orm.Close()
- orm.ShowSQL = true
-
- tables, err := orm.DBMetas()
- if err != nil {
- fmt.Println(err)
- return
- }
-
- for _, table := range tables {
- fmt.Println(table.Name)
- }
-}
diff --git a/vendor/github.com/golang/protobuf/.gitignore b/vendor/github.com/golang/protobuf/.gitignore
new file mode 100644
index 00000000000..8f5b596b147
--- /dev/null
+++ b/vendor/github.com/golang/protobuf/.gitignore
@@ -0,0 +1,16 @@
+.DS_Store
+*.[568ao]
+*.ao
+*.so
+*.pyc
+._*
+.nfs.*
+[568a].out
+*~
+*.orig
+core
+_obj
+_test
+_testmain.go
+protoc-gen-go/testdata/multi/*.pb.go
+_conformance/_conformance
diff --git a/vendor/github.com/golang/protobuf/AUTHORS b/vendor/github.com/golang/protobuf/AUTHORS
new file mode 100644
index 00000000000..15167cd746c
--- /dev/null
+++ b/vendor/github.com/golang/protobuf/AUTHORS
@@ -0,0 +1,3 @@
+# This source code refers to The Go Authors for copyright purposes.
+# The master list of authors is in the main Go distribution,
+# visible at http://tip.golang.org/AUTHORS.
diff --git a/vendor/github.com/golang/protobuf/CONTRIBUTORS b/vendor/github.com/golang/protobuf/CONTRIBUTORS
new file mode 100644
index 00000000000..1c4577e9680
--- /dev/null
+++ b/vendor/github.com/golang/protobuf/CONTRIBUTORS
@@ -0,0 +1,3 @@
+# This source code was written by the Go contributors.
+# The master list of contributors is in the main Go distribution,
+# visible at http://tip.golang.org/CONTRIBUTORS.
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/Makefile b/vendor/github.com/golang/protobuf/Make.protobuf
similarity index 80%
rename from vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/Makefile
rename to vendor/github.com/golang/protobuf/Make.protobuf
index f706871a6fa..15071de1011 100644
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/Makefile
+++ b/vendor/github.com/golang/protobuf/Make.protobuf
@@ -29,9 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# Not stored here, but descriptor.proto is in https://github.com/google/protobuf/
-# at src/google/protobuf/descriptor.proto
-regenerate:
- @echo WARNING! THIS RULE IS PROBABLY NOT RIGHT FOR YOUR INSTALLATION
- cp $(HOME)/src/protobuf/include/google/protobuf/descriptor.proto .
- protoc --go_out=../../../../.. -I$(HOME)/src/protobuf/include $(HOME)/src/protobuf/include/google/protobuf/descriptor.proto
+# Includable Makefile to add a rule for generating .pb.go files from .proto files
+# (Google protocol buffer descriptions).
+# Typical use if myproto.proto is a file in package mypackage in this directory:
+#
+# include $(GOROOT)/src/pkg/github.com/golang/protobuf/Make.protobuf
+
+%.pb.go: %.proto
+ protoc --go_out=. $<
+
diff --git a/vendor/github.com/golang/protobuf/Makefile b/vendor/github.com/golang/protobuf/Makefile
new file mode 100644
index 00000000000..a1421d8b731
--- /dev/null
+++ b/vendor/github.com/golang/protobuf/Makefile
@@ -0,0 +1,55 @@
+# Go support for Protocol Buffers - Google's data interchange format
+#
+# Copyright 2010 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.
+
+
+all: install
+
+install:
+ go install ./proto ./jsonpb ./ptypes
+ go install ./protoc-gen-go
+
+test:
+ go test ./proto ./jsonpb ./ptypes
+ make -C protoc-gen-go/testdata test
+
+clean:
+ go clean ./...
+
+nuke:
+ go clean -i ./...
+
+regenerate:
+ make -C protoc-gen-go/descriptor regenerate
+ make -C protoc-gen-go/plugin regenerate
+ make -C protoc-gen-go/testdata regenerate
+ make -C proto/testdata regenerate
+ make -C jsonpb/jsonpb_test_proto regenerate
+ make -C _conformance regenerate
diff --git a/vendor/github.com/golang/protobuf/README.md b/vendor/github.com/golang/protobuf/README.md
new file mode 100644
index 00000000000..9c4c815c023
--- /dev/null
+++ b/vendor/github.com/golang/protobuf/README.md
@@ -0,0 +1,244 @@
+# Go support for Protocol Buffers
+
+[](https://travis-ci.org/golang/protobuf)
+[](https://godoc.org/github.com/golang/protobuf)
+
+Google's data interchange format.
+Copyright 2010 The Go Authors.
+https://github.com/golang/protobuf
+
+This package and the code it generates requires at least Go 1.4.
+
+This software implements Go bindings for protocol buffers. For
+information about protocol buffers themselves, see
+ https://developers.google.com/protocol-buffers/
+
+## Installation ##
+
+To use this software, you must:
+- Install the standard C++ implementation of protocol buffers from
+ https://developers.google.com/protocol-buffers/
+- Of course, install the Go compiler and tools from
+ https://golang.org/
+ See
+ https://golang.org/doc/install
+ for details or, if you are using gccgo, follow the instructions at
+ https://golang.org/doc/install/gccgo
+- Grab the code from the repository and install the proto package.
+ The simplest way is to run `go get -u github.com/golang/protobuf/protoc-gen-go`.
+ The compiler plugin, protoc-gen-go, will be installed in $GOBIN,
+ defaulting to $GOPATH/bin. It must be in your $PATH for the protocol
+ compiler, protoc, to find it.
+
+This software has two parts: a 'protocol compiler plugin' that
+generates Go source files that, once compiled, can access and manage
+protocol buffers; and a library that implements run-time support for
+encoding (marshaling), decoding (unmarshaling), and accessing protocol
+buffers.
+
+There is support for gRPC in Go using protocol buffers.
+See the note at the bottom of this file for details.
+
+There are no insertion points in the plugin.
+
+
+## Using protocol buffers with Go ##
+
+Once the software is installed, there are two steps to using it.
+First you must compile the protocol buffer definitions and then import
+them, with the support library, into your program.
+
+To compile the protocol buffer definition, run protoc with the --go_out
+parameter set to the directory you want to output the Go code to.
+
+ protoc --go_out=. *.proto
+
+The generated files will be suffixed .pb.go. See the Test code below
+for an example using such a file.
+
+
+The package comment for the proto library contains text describing
+the interface provided in Go for protocol buffers. Here is an edited
+version.
+
+==========
+
+The proto package converts data structures to and from the
+wire format of protocol buffers. It works in concert with the
+Go source code generated for .proto files by the protocol compiler.
+
+A summary of the properties of the protocol buffer interface
+for a protocol buffer variable v:
+
+ - Names are turned from camel_case to CamelCase for export.
+ - There are no methods on v to set fields; just treat
+ them as structure fields.
+ - There are getters that return a field's value if set,
+ and return the field's default value if unset.
+ The getters work even if the receiver is a nil message.
+ - The zero value for a struct is its correct initialization state.
+ All desired fields must be set before marshaling.
+ - A Reset() method will restore a protobuf struct to its zero state.
+ - Non-repeated fields are pointers to the values; nil means unset.
+ That is, optional or required field int32 f becomes F *int32.
+ - Repeated fields are slices.
+ - Helper functions are available to aid the setting of fields.
+ Helpers for getting values are superseded by the
+ GetFoo methods and their use is deprecated.
+ msg.Foo = proto.String("hello") // set field
+ - Constants are defined to hold the default values of all fields that
+ have them. They have the form Default_StructName_FieldName.
+ Because the getter methods handle defaulted values,
+ direct use of these constants should be rare.
+ - Enums are given type names and maps from names to values.
+ Enum values are prefixed with the enum's type name. Enum types have
+ a String method, and a Enum method to assist in message construction.
+ - Nested groups and enums have type names prefixed with the name of
+ the surrounding message type.
+ - Extensions are given descriptor names that start with E_,
+ followed by an underscore-delimited list of the nested messages
+ that contain it (if any) followed by the CamelCased name of the
+ extension field itself. HasExtension, ClearExtension, GetExtension
+ and SetExtension are functions for manipulating extensions.
+ - Oneof field sets are given a single field in their message,
+ with distinguished wrapper types for each possible field value.
+ - Marshal and Unmarshal are functions to encode and decode the wire format.
+
+When the .proto file specifies `syntax="proto3"`, there are some differences:
+
+ - Non-repeated fields of non-message type are values instead of pointers.
+ - Enum types do not get an Enum method.
+
+Consider file test.proto, containing
+
+```proto
+ syntax = "proto2";
+ package example;
+
+ enum FOO { X = 17; };
+
+ message Test {
+ required string label = 1;
+ optional int32 type = 2 [default=77];
+ repeated int64 reps = 3;
+ optional group OptionalGroup = 4 {
+ required string RequiredField = 5;
+ }
+ }
+```
+
+To create and play with a Test object from the example package,
+
+```go
+ package main
+
+ import (
+ "log"
+
+ "github.com/golang/protobuf/proto"
+ "path/to/example"
+ )
+
+ func main() {
+ test := &example.Test {
+ Label: proto.String("hello"),
+ Type: proto.Int32(17),
+ Reps: []int64{1, 2, 3},
+ Optionalgroup: &example.Test_OptionalGroup {
+ RequiredField: proto.String("good bye"),
+ },
+ }
+ data, err := proto.Marshal(test)
+ if err != nil {
+ log.Fatal("marshaling error: ", err)
+ }
+ newTest := &example.Test{}
+ err = proto.Unmarshal(data, newTest)
+ if err != nil {
+ log.Fatal("unmarshaling error: ", err)
+ }
+ // Now test and newTest contain the same data.
+ if test.GetLabel() != newTest.GetLabel() {
+ log.Fatalf("data mismatch %q != %q", test.GetLabel(), newTest.GetLabel())
+ }
+ // etc.
+ }
+```
+
+## Parameters ##
+
+To pass extra parameters to the plugin, use a comma-separated
+parameter list separated from the output directory by a colon:
+
+
+ protoc --go_out=plugins=grpc,import_path=mypackage:. *.proto
+
+
+- `import_prefix=xxx` - a prefix that is added onto the beginning of
+ all imports. Useful for things like generating protos in a
+ subdirectory, or regenerating vendored protobufs in-place.
+- `import_path=foo/bar` - used as the package if no input files
+ declare `go_package`. If it contains slashes, everything up to the
+ rightmost slash is ignored.
+- `plugins=plugin1+plugin2` - specifies the list of sub-plugins to
+ load. The only plugin in this repo is `grpc`.
+- `Mfoo/bar.proto=quux/shme` - declares that foo/bar.proto is
+ associated with Go package quux/shme. This is subject to the
+ import_prefix parameter.
+
+## gRPC Support ##
+
+If a proto file specifies RPC services, protoc-gen-go can be instructed to
+generate code compatible with gRPC (http://www.grpc.io/). To do this, pass
+the `plugins` parameter to protoc-gen-go; the usual way is to insert it into
+the --go_out argument to protoc:
+
+ protoc --go_out=plugins=grpc:. *.proto
+
+## Compatibility ##
+
+The library and the generated code are expected to be stable over time.
+However, we reserve the right to make breaking changes without notice for the
+following reasons:
+
+- Security. A security issue in the specification or implementation may come to
+ light whose resolution requires breaking compatibility. We reserve the right
+ to address such security issues.
+- Unspecified behavior. There are some aspects of the Protocol Buffers
+ specification that are undefined. Programs that depend on such unspecified
+ behavior may break in future releases.
+- Specification errors or changes. If it becomes necessary to address an
+ inconsistency, incompleteness, or change in the Protocol Buffers
+ specification, resolving the issue could affect the meaning or legality of
+ existing programs. We reserve the right to address such issues, including
+ updating the implementations.
+- Bugs. If the library has a bug that violates the specification, a program
+ that depends on the buggy behavior may break if the bug is fixed. We reserve
+ the right to fix such bugs.
+- Adding methods or fields to generated structs. These may conflict with field
+ names that already exist in a schema, causing applications to break. When the
+ code generator encounters a field in the schema that would collide with a
+ generated field or method name, the code generator will append an underscore
+ to the generated field or method name.
+- Adding, removing, or changing methods or fields in generated structs that
+ start with `XXX`. These parts of the generated code are exported out of
+ necessity, but should not be considered part of the public API.
+- Adding, removing, or changing unexported symbols in generated code.
+
+Any breaking changes outside of these will be announced 6 months in advance to
+protobuf@googlegroups.com.
+
+You should, whenever possible, use generated code created by the `protoc-gen-go`
+tool built at the same commit as the `proto` package. The `proto` package
+declares package-level constants in the form `ProtoPackageIsVersionX`.
+Application code and generated code may depend on one of these constants to
+ensure that compilation will fail if the available version of the proto library
+is too old. Whenever we make a change to the generated code that requires newer
+library support, in the same commit we will increment the version number of the
+generated code and declare a new package-level constant whose name incorporates
+the latest version number. Removing a compatibility constant is considered a
+breaking change and would be subject to the announcement policy stated above.
+
+The `protoc-gen-go/generator` package exposes a plugin interface,
+which is used by the gRPC code generation. This interface is not
+supported and is subject to incompatible changes without notice.
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go
deleted file mode 100644
index c6a91bcab9c..00000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go
+++ /dev/null
@@ -1,2215 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: google/protobuf/descriptor.proto
-
-/*
-Package descriptor is a generated protocol buffer package.
-
-It is generated from these files:
- google/protobuf/descriptor.proto
-
-It has these top-level messages:
- FileDescriptorSet
- FileDescriptorProto
- DescriptorProto
- ExtensionRangeOptions
- FieldDescriptorProto
- OneofDescriptorProto
- EnumDescriptorProto
- EnumValueDescriptorProto
- ServiceDescriptorProto
- MethodDescriptorProto
- FileOptions
- MessageOptions
- FieldOptions
- OneofOptions
- EnumOptions
- EnumValueOptions
- ServiceOptions
- MethodOptions
- UninterpretedOption
- SourceCodeInfo
- GeneratedCodeInfo
-*/
-package descriptor
-
-import proto "github.com/golang/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
-
-type FieldDescriptorProto_Type int32
-
-const (
- // 0 is reserved for errors.
- // Order is weird for historical reasons.
- FieldDescriptorProto_TYPE_DOUBLE FieldDescriptorProto_Type = 1
- FieldDescriptorProto_TYPE_FLOAT FieldDescriptorProto_Type = 2
- // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
- // negative values are likely.
- FieldDescriptorProto_TYPE_INT64 FieldDescriptorProto_Type = 3
- FieldDescriptorProto_TYPE_UINT64 FieldDescriptorProto_Type = 4
- // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
- // negative values are likely.
- FieldDescriptorProto_TYPE_INT32 FieldDescriptorProto_Type = 5
- FieldDescriptorProto_TYPE_FIXED64 FieldDescriptorProto_Type = 6
- FieldDescriptorProto_TYPE_FIXED32 FieldDescriptorProto_Type = 7
- FieldDescriptorProto_TYPE_BOOL FieldDescriptorProto_Type = 8
- FieldDescriptorProto_TYPE_STRING FieldDescriptorProto_Type = 9
- // Tag-delimited aggregate.
- // Group type is deprecated and not supported in proto3. However, Proto3
- // implementations should still be able to parse the group wire format and
- // treat group fields as unknown fields.
- FieldDescriptorProto_TYPE_GROUP FieldDescriptorProto_Type = 10
- FieldDescriptorProto_TYPE_MESSAGE FieldDescriptorProto_Type = 11
- // New in version 2.
- FieldDescriptorProto_TYPE_BYTES FieldDescriptorProto_Type = 12
- FieldDescriptorProto_TYPE_UINT32 FieldDescriptorProto_Type = 13
- FieldDescriptorProto_TYPE_ENUM FieldDescriptorProto_Type = 14
- FieldDescriptorProto_TYPE_SFIXED32 FieldDescriptorProto_Type = 15
- FieldDescriptorProto_TYPE_SFIXED64 FieldDescriptorProto_Type = 16
- FieldDescriptorProto_TYPE_SINT32 FieldDescriptorProto_Type = 17
- FieldDescriptorProto_TYPE_SINT64 FieldDescriptorProto_Type = 18
-)
-
-var FieldDescriptorProto_Type_name = map[int32]string{
- 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 FieldDescriptorProto_Type_value = map[string]int32{
- "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 (x FieldDescriptorProto_Type) Enum() *FieldDescriptorProto_Type {
- p := new(FieldDescriptorProto_Type)
- *p = x
- return p
-}
-func (x FieldDescriptorProto_Type) String() string {
- return proto.EnumName(FieldDescriptorProto_Type_name, int32(x))
-}
-func (x *FieldDescriptorProto_Type) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Type_value, data, "FieldDescriptorProto_Type")
- if err != nil {
- return err
- }
- *x = FieldDescriptorProto_Type(value)
- return nil
-}
-func (FieldDescriptorProto_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{4, 0} }
-
-type FieldDescriptorProto_Label int32
-
-const (
- // 0 is reserved for errors
- FieldDescriptorProto_LABEL_OPTIONAL FieldDescriptorProto_Label = 1
- FieldDescriptorProto_LABEL_REQUIRED FieldDescriptorProto_Label = 2
- FieldDescriptorProto_LABEL_REPEATED FieldDescriptorProto_Label = 3
-)
-
-var FieldDescriptorProto_Label_name = map[int32]string{
- 1: "LABEL_OPTIONAL",
- 2: "LABEL_REQUIRED",
- 3: "LABEL_REPEATED",
-}
-var FieldDescriptorProto_Label_value = map[string]int32{
- "LABEL_OPTIONAL": 1,
- "LABEL_REQUIRED": 2,
- "LABEL_REPEATED": 3,
-}
-
-func (x FieldDescriptorProto_Label) Enum() *FieldDescriptorProto_Label {
- p := new(FieldDescriptorProto_Label)
- *p = x
- return p
-}
-func (x FieldDescriptorProto_Label) String() string {
- return proto.EnumName(FieldDescriptorProto_Label_name, int32(x))
-}
-func (x *FieldDescriptorProto_Label) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Label_value, data, "FieldDescriptorProto_Label")
- if err != nil {
- return err
- }
- *x = FieldDescriptorProto_Label(value)
- return nil
-}
-func (FieldDescriptorProto_Label) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor0, []int{4, 1}
-}
-
-// Generated classes can be optimized for speed or code size.
-type FileOptions_OptimizeMode int32
-
-const (
- FileOptions_SPEED FileOptions_OptimizeMode = 1
- // etc.
- FileOptions_CODE_SIZE FileOptions_OptimizeMode = 2
- FileOptions_LITE_RUNTIME FileOptions_OptimizeMode = 3
-)
-
-var FileOptions_OptimizeMode_name = map[int32]string{
- 1: "SPEED",
- 2: "CODE_SIZE",
- 3: "LITE_RUNTIME",
-}
-var FileOptions_OptimizeMode_value = map[string]int32{
- "SPEED": 1,
- "CODE_SIZE": 2,
- "LITE_RUNTIME": 3,
-}
-
-func (x FileOptions_OptimizeMode) Enum() *FileOptions_OptimizeMode {
- p := new(FileOptions_OptimizeMode)
- *p = x
- return p
-}
-func (x FileOptions_OptimizeMode) String() string {
- return proto.EnumName(FileOptions_OptimizeMode_name, int32(x))
-}
-func (x *FileOptions_OptimizeMode) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(FileOptions_OptimizeMode_value, data, "FileOptions_OptimizeMode")
- if err != nil {
- return err
- }
- *x = FileOptions_OptimizeMode(value)
- return nil
-}
-func (FileOptions_OptimizeMode) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{10, 0} }
-
-type FieldOptions_CType int32
-
-const (
- // Default mode.
- FieldOptions_STRING FieldOptions_CType = 0
- FieldOptions_CORD FieldOptions_CType = 1
- FieldOptions_STRING_PIECE FieldOptions_CType = 2
-)
-
-var FieldOptions_CType_name = map[int32]string{
- 0: "STRING",
- 1: "CORD",
- 2: "STRING_PIECE",
-}
-var FieldOptions_CType_value = map[string]int32{
- "STRING": 0,
- "CORD": 1,
- "STRING_PIECE": 2,
-}
-
-func (x FieldOptions_CType) Enum() *FieldOptions_CType {
- p := new(FieldOptions_CType)
- *p = x
- return p
-}
-func (x FieldOptions_CType) String() string {
- return proto.EnumName(FieldOptions_CType_name, int32(x))
-}
-func (x *FieldOptions_CType) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(FieldOptions_CType_value, data, "FieldOptions_CType")
- if err != nil {
- return err
- }
- *x = FieldOptions_CType(value)
- return nil
-}
-func (FieldOptions_CType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{12, 0} }
-
-type FieldOptions_JSType int32
-
-const (
- // Use the default type.
- FieldOptions_JS_NORMAL FieldOptions_JSType = 0
- // Use JavaScript strings.
- FieldOptions_JS_STRING FieldOptions_JSType = 1
- // Use JavaScript numbers.
- FieldOptions_JS_NUMBER FieldOptions_JSType = 2
-)
-
-var FieldOptions_JSType_name = map[int32]string{
- 0: "JS_NORMAL",
- 1: "JS_STRING",
- 2: "JS_NUMBER",
-}
-var FieldOptions_JSType_value = map[string]int32{
- "JS_NORMAL": 0,
- "JS_STRING": 1,
- "JS_NUMBER": 2,
-}
-
-func (x FieldOptions_JSType) Enum() *FieldOptions_JSType {
- p := new(FieldOptions_JSType)
- *p = x
- return p
-}
-func (x FieldOptions_JSType) String() string {
- return proto.EnumName(FieldOptions_JSType_name, int32(x))
-}
-func (x *FieldOptions_JSType) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(FieldOptions_JSType_value, data, "FieldOptions_JSType")
- if err != nil {
- return err
- }
- *x = FieldOptions_JSType(value)
- return nil
-}
-func (FieldOptions_JSType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{12, 1} }
-
-// Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
-// or neither? HTTP based RPC implementation may choose GET verb for safe
-// methods, and PUT verb for idempotent methods instead of the default POST.
-type MethodOptions_IdempotencyLevel int32
-
-const (
- MethodOptions_IDEMPOTENCY_UNKNOWN MethodOptions_IdempotencyLevel = 0
- MethodOptions_NO_SIDE_EFFECTS MethodOptions_IdempotencyLevel = 1
- MethodOptions_IDEMPOTENT MethodOptions_IdempotencyLevel = 2
-)
-
-var MethodOptions_IdempotencyLevel_name = map[int32]string{
- 0: "IDEMPOTENCY_UNKNOWN",
- 1: "NO_SIDE_EFFECTS",
- 2: "IDEMPOTENT",
-}
-var MethodOptions_IdempotencyLevel_value = map[string]int32{
- "IDEMPOTENCY_UNKNOWN": 0,
- "NO_SIDE_EFFECTS": 1,
- "IDEMPOTENT": 2,
-}
-
-func (x MethodOptions_IdempotencyLevel) Enum() *MethodOptions_IdempotencyLevel {
- p := new(MethodOptions_IdempotencyLevel)
- *p = x
- return p
-}
-func (x MethodOptions_IdempotencyLevel) String() string {
- return proto.EnumName(MethodOptions_IdempotencyLevel_name, int32(x))
-}
-func (x *MethodOptions_IdempotencyLevel) UnmarshalJSON(data []byte) error {
- value, err := proto.UnmarshalJSONEnum(MethodOptions_IdempotencyLevel_value, data, "MethodOptions_IdempotencyLevel")
- if err != nil {
- return err
- }
- *x = MethodOptions_IdempotencyLevel(value)
- return nil
-}
-func (MethodOptions_IdempotencyLevel) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor0, []int{17, 0}
-}
-
-// The protocol compiler can output a FileDescriptorSet containing the .proto
-// files it parses.
-type FileDescriptorSet struct {
- File []*FileDescriptorProto `protobuf:"bytes,1,rep,name=file" json:"file,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *FileDescriptorSet) Reset() { *m = FileDescriptorSet{} }
-func (m *FileDescriptorSet) String() string { return proto.CompactTextString(m) }
-func (*FileDescriptorSet) ProtoMessage() {}
-func (*FileDescriptorSet) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
-
-func (m *FileDescriptorSet) GetFile() []*FileDescriptorProto {
- if m != nil {
- return m.File
- }
- return nil
-}
-
-// Describes a complete .proto file.
-type FileDescriptorProto struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- Package *string `protobuf:"bytes,2,opt,name=package" json:"package,omitempty"`
- // Names of files imported by this file.
- Dependency []string `protobuf:"bytes,3,rep,name=dependency" json:"dependency,omitempty"`
- // Indexes of the public imported files in the dependency list above.
- PublicDependency []int32 `protobuf:"varint,10,rep,name=public_dependency,json=publicDependency" json:"public_dependency,omitempty"`
- // Indexes of the weak imported files in the dependency list.
- // For Google-internal migration only. Do not use.
- WeakDependency []int32 `protobuf:"varint,11,rep,name=weak_dependency,json=weakDependency" json:"weak_dependency,omitempty"`
- // All top-level definitions in this file.
- MessageType []*DescriptorProto `protobuf:"bytes,4,rep,name=message_type,json=messageType" json:"message_type,omitempty"`
- EnumType []*EnumDescriptorProto `protobuf:"bytes,5,rep,name=enum_type,json=enumType" json:"enum_type,omitempty"`
- Service []*ServiceDescriptorProto `protobuf:"bytes,6,rep,name=service" json:"service,omitempty"`
- Extension []*FieldDescriptorProto `protobuf:"bytes,7,rep,name=extension" json:"extension,omitempty"`
- Options *FileOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"`
- // This field contains optional information about the original source code.
- // You may safely remove this entire field without harming runtime
- // functionality of the descriptors -- the information is needed only by
- // development tools.
- SourceCodeInfo *SourceCodeInfo `protobuf:"bytes,9,opt,name=source_code_info,json=sourceCodeInfo" json:"source_code_info,omitempty"`
- // The syntax of the proto file.
- // The supported values are "proto2" and "proto3".
- Syntax *string `protobuf:"bytes,12,opt,name=syntax" json:"syntax,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *FileDescriptorProto) Reset() { *m = FileDescriptorProto{} }
-func (m *FileDescriptorProto) String() string { return proto.CompactTextString(m) }
-func (*FileDescriptorProto) ProtoMessage() {}
-func (*FileDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
-
-func (m *FileDescriptorProto) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-func (m *FileDescriptorProto) GetPackage() string {
- if m != nil && m.Package != nil {
- return *m.Package
- }
- return ""
-}
-
-func (m *FileDescriptorProto) GetDependency() []string {
- if m != nil {
- return m.Dependency
- }
- return nil
-}
-
-func (m *FileDescriptorProto) GetPublicDependency() []int32 {
- if m != nil {
- return m.PublicDependency
- }
- return nil
-}
-
-func (m *FileDescriptorProto) GetWeakDependency() []int32 {
- if m != nil {
- return m.WeakDependency
- }
- return nil
-}
-
-func (m *FileDescriptorProto) GetMessageType() []*DescriptorProto {
- if m != nil {
- return m.MessageType
- }
- return nil
-}
-
-func (m *FileDescriptorProto) GetEnumType() []*EnumDescriptorProto {
- if m != nil {
- return m.EnumType
- }
- return nil
-}
-
-func (m *FileDescriptorProto) GetService() []*ServiceDescriptorProto {
- if m != nil {
- return m.Service
- }
- return nil
-}
-
-func (m *FileDescriptorProto) GetExtension() []*FieldDescriptorProto {
- if m != nil {
- return m.Extension
- }
- return nil
-}
-
-func (m *FileDescriptorProto) GetOptions() *FileOptions {
- if m != nil {
- return m.Options
- }
- return nil
-}
-
-func (m *FileDescriptorProto) GetSourceCodeInfo() *SourceCodeInfo {
- if m != nil {
- return m.SourceCodeInfo
- }
- return nil
-}
-
-func (m *FileDescriptorProto) GetSyntax() string {
- if m != nil && m.Syntax != nil {
- return *m.Syntax
- }
- return ""
-}
-
-// Describes a message type.
-type DescriptorProto struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- Field []*FieldDescriptorProto `protobuf:"bytes,2,rep,name=field" json:"field,omitempty"`
- Extension []*FieldDescriptorProto `protobuf:"bytes,6,rep,name=extension" json:"extension,omitempty"`
- NestedType []*DescriptorProto `protobuf:"bytes,3,rep,name=nested_type,json=nestedType" json:"nested_type,omitempty"`
- EnumType []*EnumDescriptorProto `protobuf:"bytes,4,rep,name=enum_type,json=enumType" json:"enum_type,omitempty"`
- ExtensionRange []*DescriptorProto_ExtensionRange `protobuf:"bytes,5,rep,name=extension_range,json=extensionRange" json:"extension_range,omitempty"`
- OneofDecl []*OneofDescriptorProto `protobuf:"bytes,8,rep,name=oneof_decl,json=oneofDecl" json:"oneof_decl,omitempty"`
- Options *MessageOptions `protobuf:"bytes,7,opt,name=options" json:"options,omitempty"`
- ReservedRange []*DescriptorProto_ReservedRange `protobuf:"bytes,9,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"`
- // Reserved field names, which may not be used by fields in the same message.
- // A given name may only be reserved once.
- ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *DescriptorProto) Reset() { *m = DescriptorProto{} }
-func (m *DescriptorProto) String() string { return proto.CompactTextString(m) }
-func (*DescriptorProto) ProtoMessage() {}
-func (*DescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
-
-func (m *DescriptorProto) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-func (m *DescriptorProto) GetField() []*FieldDescriptorProto {
- if m != nil {
- return m.Field
- }
- return nil
-}
-
-func (m *DescriptorProto) GetExtension() []*FieldDescriptorProto {
- if m != nil {
- return m.Extension
- }
- return nil
-}
-
-func (m *DescriptorProto) GetNestedType() []*DescriptorProto {
- if m != nil {
- return m.NestedType
- }
- return nil
-}
-
-func (m *DescriptorProto) GetEnumType() []*EnumDescriptorProto {
- if m != nil {
- return m.EnumType
- }
- return nil
-}
-
-func (m *DescriptorProto) GetExtensionRange() []*DescriptorProto_ExtensionRange {
- if m != nil {
- return m.ExtensionRange
- }
- return nil
-}
-
-func (m *DescriptorProto) GetOneofDecl() []*OneofDescriptorProto {
- if m != nil {
- return m.OneofDecl
- }
- return nil
-}
-
-func (m *DescriptorProto) GetOptions() *MessageOptions {
- if m != nil {
- return m.Options
- }
- return nil
-}
-
-func (m *DescriptorProto) GetReservedRange() []*DescriptorProto_ReservedRange {
- if m != nil {
- return m.ReservedRange
- }
- return nil
-}
-
-func (m *DescriptorProto) GetReservedName() []string {
- if m != nil {
- return m.ReservedName
- }
- return nil
-}
-
-type DescriptorProto_ExtensionRange struct {
- Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"`
- End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"`
- Options *ExtensionRangeOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *DescriptorProto_ExtensionRange) Reset() { *m = DescriptorProto_ExtensionRange{} }
-func (m *DescriptorProto_ExtensionRange) String() string { return proto.CompactTextString(m) }
-func (*DescriptorProto_ExtensionRange) ProtoMessage() {}
-func (*DescriptorProto_ExtensionRange) Descriptor() ([]byte, []int) {
- return fileDescriptor0, []int{2, 0}
-}
-
-func (m *DescriptorProto_ExtensionRange) GetStart() int32 {
- if m != nil && m.Start != nil {
- return *m.Start
- }
- return 0
-}
-
-func (m *DescriptorProto_ExtensionRange) GetEnd() int32 {
- if m != nil && m.End != nil {
- return *m.End
- }
- return 0
-}
-
-func (m *DescriptorProto_ExtensionRange) GetOptions() *ExtensionRangeOptions {
- if m != nil {
- return m.Options
- }
- return nil
-}
-
-// Range of reserved tag numbers. Reserved tag numbers may not be used by
-// fields or extension ranges in the same message. Reserved ranges may
-// not overlap.
-type DescriptorProto_ReservedRange struct {
- Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"`
- End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *DescriptorProto_ReservedRange) Reset() { *m = DescriptorProto_ReservedRange{} }
-func (m *DescriptorProto_ReservedRange) String() string { return proto.CompactTextString(m) }
-func (*DescriptorProto_ReservedRange) ProtoMessage() {}
-func (*DescriptorProto_ReservedRange) Descriptor() ([]byte, []int) {
- return fileDescriptor0, []int{2, 1}
-}
-
-func (m *DescriptorProto_ReservedRange) GetStart() int32 {
- if m != nil && m.Start != nil {
- return *m.Start
- }
- return 0
-}
-
-func (m *DescriptorProto_ReservedRange) GetEnd() int32 {
- if m != nil && m.End != nil {
- return *m.End
- }
- return 0
-}
-
-type ExtensionRangeOptions struct {
- // The parser stores options it doesn't recognize here. See above.
- UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *ExtensionRangeOptions) Reset() { *m = ExtensionRangeOptions{} }
-func (m *ExtensionRangeOptions) String() string { return proto.CompactTextString(m) }
-func (*ExtensionRangeOptions) ProtoMessage() {}
-func (*ExtensionRangeOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
-
-var extRange_ExtensionRangeOptions = []proto.ExtensionRange{
- {1000, 536870911},
-}
-
-func (*ExtensionRangeOptions) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_ExtensionRangeOptions
-}
-
-func (m *ExtensionRangeOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
- }
- return nil
-}
-
-// Describes a field within a message.
-type FieldDescriptorProto struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- Number *int32 `protobuf:"varint,3,opt,name=number" json:"number,omitempty"`
- Label *FieldDescriptorProto_Label `protobuf:"varint,4,opt,name=label,enum=google.protobuf.FieldDescriptorProto_Label" json:"label,omitempty"`
- // If type_name is set, this need not be set. If both this and type_name
- // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
- Type *FieldDescriptorProto_Type `protobuf:"varint,5,opt,name=type,enum=google.protobuf.FieldDescriptorProto_Type" json:"type,omitempty"`
- // For message and enum types, this is the name of the type. If the name
- // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
- // rules are used to find the type (i.e. first the nested types within this
- // message are searched, then within the parent, on up to the root
- // namespace).
- TypeName *string `protobuf:"bytes,6,opt,name=type_name,json=typeName" json:"type_name,omitempty"`
- // For extensions, this is the name of the type being extended. It is
- // resolved in the same manner as type_name.
- Extendee *string `protobuf:"bytes,2,opt,name=extendee" json:"extendee,omitempty"`
- // For numeric types, contains the original text representation of the value.
- // For booleans, "true" or "false".
- // For strings, contains the default text contents (not escaped in any way).
- // For bytes, contains the C escaped value. All bytes >= 128 are escaped.
- // TODO(kenton): Base-64 encode?
- DefaultValue *string `protobuf:"bytes,7,opt,name=default_value,json=defaultValue" json:"default_value,omitempty"`
- // If set, gives the index of a oneof in the containing type's oneof_decl
- // list. This field is a member of that oneof.
- OneofIndex *int32 `protobuf:"varint,9,opt,name=oneof_index,json=oneofIndex" json:"oneof_index,omitempty"`
- // JSON name of this field. The value is set by protocol compiler. If the
- // user has set a "json_name" option on this field, that option's value
- // will be used. Otherwise, it's deduced from the field's name by converting
- // it to camelCase.
- JsonName *string `protobuf:"bytes,10,opt,name=json_name,json=jsonName" json:"json_name,omitempty"`
- Options *FieldOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *FieldDescriptorProto) Reset() { *m = FieldDescriptorProto{} }
-func (m *FieldDescriptorProto) String() string { return proto.CompactTextString(m) }
-func (*FieldDescriptorProto) ProtoMessage() {}
-func (*FieldDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
-
-func (m *FieldDescriptorProto) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-func (m *FieldDescriptorProto) GetNumber() int32 {
- if m != nil && m.Number != nil {
- return *m.Number
- }
- return 0
-}
-
-func (m *FieldDescriptorProto) GetLabel() FieldDescriptorProto_Label {
- if m != nil && m.Label != nil {
- return *m.Label
- }
- return FieldDescriptorProto_LABEL_OPTIONAL
-}
-
-func (m *FieldDescriptorProto) GetType() FieldDescriptorProto_Type {
- if m != nil && m.Type != nil {
- return *m.Type
- }
- return FieldDescriptorProto_TYPE_DOUBLE
-}
-
-func (m *FieldDescriptorProto) GetTypeName() string {
- if m != nil && m.TypeName != nil {
- return *m.TypeName
- }
- return ""
-}
-
-func (m *FieldDescriptorProto) GetExtendee() string {
- if m != nil && m.Extendee != nil {
- return *m.Extendee
- }
- return ""
-}
-
-func (m *FieldDescriptorProto) GetDefaultValue() string {
- if m != nil && m.DefaultValue != nil {
- return *m.DefaultValue
- }
- return ""
-}
-
-func (m *FieldDescriptorProto) GetOneofIndex() int32 {
- if m != nil && m.OneofIndex != nil {
- return *m.OneofIndex
- }
- return 0
-}
-
-func (m *FieldDescriptorProto) GetJsonName() string {
- if m != nil && m.JsonName != nil {
- return *m.JsonName
- }
- return ""
-}
-
-func (m *FieldDescriptorProto) GetOptions() *FieldOptions {
- if m != nil {
- return m.Options
- }
- return nil
-}
-
-// Describes a oneof.
-type OneofDescriptorProto struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- Options *OneofOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *OneofDescriptorProto) Reset() { *m = OneofDescriptorProto{} }
-func (m *OneofDescriptorProto) String() string { return proto.CompactTextString(m) }
-func (*OneofDescriptorProto) ProtoMessage() {}
-func (*OneofDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
-
-func (m *OneofDescriptorProto) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-func (m *OneofDescriptorProto) GetOptions() *OneofOptions {
- if m != nil {
- return m.Options
- }
- return nil
-}
-
-// Describes an enum type.
-type EnumDescriptorProto struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- Value []*EnumValueDescriptorProto `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"`
- Options *EnumOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *EnumDescriptorProto) Reset() { *m = EnumDescriptorProto{} }
-func (m *EnumDescriptorProto) String() string { return proto.CompactTextString(m) }
-func (*EnumDescriptorProto) ProtoMessage() {}
-func (*EnumDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
-
-func (m *EnumDescriptorProto) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-func (m *EnumDescriptorProto) GetValue() []*EnumValueDescriptorProto {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-func (m *EnumDescriptorProto) GetOptions() *EnumOptions {
- if m != nil {
- return m.Options
- }
- return nil
-}
-
-// Describes a value within an enum.
-type EnumValueDescriptorProto struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- Number *int32 `protobuf:"varint,2,opt,name=number" json:"number,omitempty"`
- Options *EnumValueOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *EnumValueDescriptorProto) Reset() { *m = EnumValueDescriptorProto{} }
-func (m *EnumValueDescriptorProto) String() string { return proto.CompactTextString(m) }
-func (*EnumValueDescriptorProto) ProtoMessage() {}
-func (*EnumValueDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
-
-func (m *EnumValueDescriptorProto) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-func (m *EnumValueDescriptorProto) GetNumber() int32 {
- if m != nil && m.Number != nil {
- return *m.Number
- }
- return 0
-}
-
-func (m *EnumValueDescriptorProto) GetOptions() *EnumValueOptions {
- if m != nil {
- return m.Options
- }
- return nil
-}
-
-// Describes a service.
-type ServiceDescriptorProto struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- Method []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method" json:"method,omitempty"`
- Options *ServiceOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *ServiceDescriptorProto) Reset() { *m = ServiceDescriptorProto{} }
-func (m *ServiceDescriptorProto) String() string { return proto.CompactTextString(m) }
-func (*ServiceDescriptorProto) ProtoMessage() {}
-func (*ServiceDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
-
-func (m *ServiceDescriptorProto) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-func (m *ServiceDescriptorProto) GetMethod() []*MethodDescriptorProto {
- if m != nil {
- return m.Method
- }
- return nil
-}
-
-func (m *ServiceDescriptorProto) GetOptions() *ServiceOptions {
- if m != nil {
- return m.Options
- }
- return nil
-}
-
-// Describes a method of a service.
-type MethodDescriptorProto struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- // Input and output type names. These are resolved in the same way as
- // FieldDescriptorProto.type_name, but must refer to a message type.
- InputType *string `protobuf:"bytes,2,opt,name=input_type,json=inputType" json:"input_type,omitempty"`
- OutputType *string `protobuf:"bytes,3,opt,name=output_type,json=outputType" json:"output_type,omitempty"`
- Options *MethodOptions `protobuf:"bytes,4,opt,name=options" json:"options,omitempty"`
- // Identifies if client streams multiple client messages
- ClientStreaming *bool `protobuf:"varint,5,opt,name=client_streaming,json=clientStreaming,def=0" json:"client_streaming,omitempty"`
- // Identifies if server streams multiple server messages
- ServerStreaming *bool `protobuf:"varint,6,opt,name=server_streaming,json=serverStreaming,def=0" json:"server_streaming,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *MethodDescriptorProto) Reset() { *m = MethodDescriptorProto{} }
-func (m *MethodDescriptorProto) String() string { return proto.CompactTextString(m) }
-func (*MethodDescriptorProto) ProtoMessage() {}
-func (*MethodDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
-
-const Default_MethodDescriptorProto_ClientStreaming bool = false
-const Default_MethodDescriptorProto_ServerStreaming bool = false
-
-func (m *MethodDescriptorProto) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
- }
- return ""
-}
-
-func (m *MethodDescriptorProto) GetInputType() string {
- if m != nil && m.InputType != nil {
- return *m.InputType
- }
- return ""
-}
-
-func (m *MethodDescriptorProto) GetOutputType() string {
- if m != nil && m.OutputType != nil {
- return *m.OutputType
- }
- return ""
-}
-
-func (m *MethodDescriptorProto) GetOptions() *MethodOptions {
- if m != nil {
- return m.Options
- }
- return nil
-}
-
-func (m *MethodDescriptorProto) GetClientStreaming() bool {
- if m != nil && m.ClientStreaming != nil {
- return *m.ClientStreaming
- }
- return Default_MethodDescriptorProto_ClientStreaming
-}
-
-func (m *MethodDescriptorProto) GetServerStreaming() bool {
- if m != nil && m.ServerStreaming != nil {
- return *m.ServerStreaming
- }
- return Default_MethodDescriptorProto_ServerStreaming
-}
-
-type FileOptions struct {
- // Sets the Java package where classes generated from this .proto will be
- // placed. By default, the proto package is used, but this is often
- // inappropriate because proto packages do not normally start with backwards
- // domain names.
- JavaPackage *string `protobuf:"bytes,1,opt,name=java_package,json=javaPackage" json:"java_package,omitempty"`
- // If set, all the classes from the .proto file are wrapped in a single
- // outer class with the given name. This applies to both Proto1
- // (equivalent to the old "--one_java_file" option) and Proto2 (where
- // a .proto always translates to a single class, but you may want to
- // explicitly choose the class name).
- JavaOuterClassname *string `protobuf:"bytes,8,opt,name=java_outer_classname,json=javaOuterClassname" json:"java_outer_classname,omitempty"`
- // If set true, then the Java code generator will generate a separate .java
- // file for each top-level message, enum, and service defined in the .proto
- // file. Thus, these types will *not* be nested inside the outer class
- // named by java_outer_classname. However, the outer class will still be
- // generated to contain the file's getDescriptor() method as well as any
- // top-level extensions defined in the file.
- JavaMultipleFiles *bool `protobuf:"varint,10,opt,name=java_multiple_files,json=javaMultipleFiles,def=0" json:"java_multiple_files,omitempty"`
- // This option does nothing.
- JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash" json:"java_generate_equals_and_hash,omitempty"`
- // If set true, then the Java2 code generator will generate code that
- // throws an exception whenever an attempt is made to assign a non-UTF-8
- // byte sequence to a string field.
- // Message reflection will do the same.
- // However, an extension field still accepts non-UTF-8 byte sequences.
- // This option has no effect on when used with the lite runtime.
- JavaStringCheckUtf8 *bool `protobuf:"varint,27,opt,name=java_string_check_utf8,json=javaStringCheckUtf8,def=0" json:"java_string_check_utf8,omitempty"`
- OptimizeFor *FileOptions_OptimizeMode `protobuf:"varint,9,opt,name=optimize_for,json=optimizeFor,enum=google.protobuf.FileOptions_OptimizeMode,def=1" json:"optimize_for,omitempty"`
- // Sets the Go package where structs generated from this .proto will be
- // placed. If omitted, the Go package will be derived from the following:
- // - The basename of the package import path, if provided.
- // - Otherwise, the package statement in the .proto file, if present.
- // - Otherwise, the basename of the .proto file, without extension.
- GoPackage *string `protobuf:"bytes,11,opt,name=go_package,json=goPackage" json:"go_package,omitempty"`
- // Should generic services be generated in each language? "Generic" services
- // are not specific to any particular RPC system. They are generated by the
- // main code generators in each language (without additional plugins).
- // Generic services were the only kind of service generation supported by
- // early versions of google.protobuf.
- //
- // Generic services are now considered deprecated in favor of using plugins
- // that generate code specific to your particular RPC system. Therefore,
- // these default to false. Old code which depends on generic services should
- // explicitly set them to true.
- CcGenericServices *bool `protobuf:"varint,16,opt,name=cc_generic_services,json=ccGenericServices,def=0" json:"cc_generic_services,omitempty"`
- JavaGenericServices *bool `protobuf:"varint,17,opt,name=java_generic_services,json=javaGenericServices,def=0" json:"java_generic_services,omitempty"`
- PyGenericServices *bool `protobuf:"varint,18,opt,name=py_generic_services,json=pyGenericServices,def=0" json:"py_generic_services,omitempty"`
- PhpGenericServices *bool `protobuf:"varint,42,opt,name=php_generic_services,json=phpGenericServices,def=0" json:"php_generic_services,omitempty"`
- // Is this file deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for everything in the file, or it will be completely ignored; in the very
- // least, this is a formalization for deprecating files.
- Deprecated *bool `protobuf:"varint,23,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
- // Enables the use of arenas for the proto messages in this file. This applies
- // only to generated classes for C++.
- CcEnableArenas *bool `protobuf:"varint,31,opt,name=cc_enable_arenas,json=ccEnableArenas,def=0" json:"cc_enable_arenas,omitempty"`
- // Sets the objective c class prefix which is prepended to all objective c
- // generated classes from this .proto. There is no default.
- ObjcClassPrefix *string `protobuf:"bytes,36,opt,name=objc_class_prefix,json=objcClassPrefix" json:"objc_class_prefix,omitempty"`
- // Namespace for generated classes; defaults to the package.
- CsharpNamespace *string `protobuf:"bytes,37,opt,name=csharp_namespace,json=csharpNamespace" json:"csharp_namespace,omitempty"`
- // By default Swift generators will take the proto package and CamelCase it
- // replacing '.' with underscore and use that to prefix the types/symbols
- // defined. When this options is provided, they will use this value instead
- // to prefix the types/symbols defined.
- SwiftPrefix *string `protobuf:"bytes,39,opt,name=swift_prefix,json=swiftPrefix" json:"swift_prefix,omitempty"`
- // Sets the php class prefix which is prepended to all php generated classes
- // from this .proto. Default is empty.
- PhpClassPrefix *string `protobuf:"bytes,40,opt,name=php_class_prefix,json=phpClassPrefix" json:"php_class_prefix,omitempty"`
- // Use this option to change the namespace of php generated classes. Default
- // is empty. When this option is empty, the package name will be used for
- // determining the namespace.
- PhpNamespace *string `protobuf:"bytes,41,opt,name=php_namespace,json=phpNamespace" json:"php_namespace,omitempty"`
- // The parser stores options it doesn't recognize here. See above.
- UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *FileOptions) Reset() { *m = FileOptions{} }
-func (m *FileOptions) String() string { return proto.CompactTextString(m) }
-func (*FileOptions) ProtoMessage() {}
-func (*FileOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
-
-var extRange_FileOptions = []proto.ExtensionRange{
- {1000, 536870911},
-}
-
-func (*FileOptions) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_FileOptions
-}
-
-const Default_FileOptions_JavaMultipleFiles bool = false
-const Default_FileOptions_JavaStringCheckUtf8 bool = false
-const Default_FileOptions_OptimizeFor FileOptions_OptimizeMode = FileOptions_SPEED
-const Default_FileOptions_CcGenericServices bool = false
-const Default_FileOptions_JavaGenericServices bool = false
-const Default_FileOptions_PyGenericServices bool = false
-const Default_FileOptions_PhpGenericServices bool = false
-const Default_FileOptions_Deprecated bool = false
-const Default_FileOptions_CcEnableArenas bool = false
-
-func (m *FileOptions) GetJavaPackage() string {
- if m != nil && m.JavaPackage != nil {
- return *m.JavaPackage
- }
- return ""
-}
-
-func (m *FileOptions) GetJavaOuterClassname() string {
- if m != nil && m.JavaOuterClassname != nil {
- return *m.JavaOuterClassname
- }
- return ""
-}
-
-func (m *FileOptions) GetJavaMultipleFiles() bool {
- if m != nil && m.JavaMultipleFiles != nil {
- return *m.JavaMultipleFiles
- }
- return Default_FileOptions_JavaMultipleFiles
-}
-
-func (m *FileOptions) GetJavaGenerateEqualsAndHash() bool {
- if m != nil && m.JavaGenerateEqualsAndHash != nil {
- return *m.JavaGenerateEqualsAndHash
- }
- return false
-}
-
-func (m *FileOptions) GetJavaStringCheckUtf8() bool {
- if m != nil && m.JavaStringCheckUtf8 != nil {
- return *m.JavaStringCheckUtf8
- }
- return Default_FileOptions_JavaStringCheckUtf8
-}
-
-func (m *FileOptions) GetOptimizeFor() FileOptions_OptimizeMode {
- if m != nil && m.OptimizeFor != nil {
- return *m.OptimizeFor
- }
- return Default_FileOptions_OptimizeFor
-}
-
-func (m *FileOptions) GetGoPackage() string {
- if m != nil && m.GoPackage != nil {
- return *m.GoPackage
- }
- return ""
-}
-
-func (m *FileOptions) GetCcGenericServices() bool {
- if m != nil && m.CcGenericServices != nil {
- return *m.CcGenericServices
- }
- return Default_FileOptions_CcGenericServices
-}
-
-func (m *FileOptions) GetJavaGenericServices() bool {
- if m != nil && m.JavaGenericServices != nil {
- return *m.JavaGenericServices
- }
- return Default_FileOptions_JavaGenericServices
-}
-
-func (m *FileOptions) GetPyGenericServices() bool {
- if m != nil && m.PyGenericServices != nil {
- return *m.PyGenericServices
- }
- return Default_FileOptions_PyGenericServices
-}
-
-func (m *FileOptions) GetPhpGenericServices() bool {
- if m != nil && m.PhpGenericServices != nil {
- return *m.PhpGenericServices
- }
- return Default_FileOptions_PhpGenericServices
-}
-
-func (m *FileOptions) GetDeprecated() bool {
- if m != nil && m.Deprecated != nil {
- return *m.Deprecated
- }
- return Default_FileOptions_Deprecated
-}
-
-func (m *FileOptions) GetCcEnableArenas() bool {
- if m != nil && m.CcEnableArenas != nil {
- return *m.CcEnableArenas
- }
- return Default_FileOptions_CcEnableArenas
-}
-
-func (m *FileOptions) GetObjcClassPrefix() string {
- if m != nil && m.ObjcClassPrefix != nil {
- return *m.ObjcClassPrefix
- }
- return ""
-}
-
-func (m *FileOptions) GetCsharpNamespace() string {
- if m != nil && m.CsharpNamespace != nil {
- return *m.CsharpNamespace
- }
- return ""
-}
-
-func (m *FileOptions) GetSwiftPrefix() string {
- if m != nil && m.SwiftPrefix != nil {
- return *m.SwiftPrefix
- }
- return ""
-}
-
-func (m *FileOptions) GetPhpClassPrefix() string {
- if m != nil && m.PhpClassPrefix != nil {
- return *m.PhpClassPrefix
- }
- return ""
-}
-
-func (m *FileOptions) GetPhpNamespace() string {
- if m != nil && m.PhpNamespace != nil {
- return *m.PhpNamespace
- }
- return ""
-}
-
-func (m *FileOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
- }
- return nil
-}
-
-type MessageOptions struct {
- // Set true to use the old proto1 MessageSet wire format for extensions.
- // This is provided for backwards-compatibility with the MessageSet wire
- // format. You should not use this for any other reason: It's less
- // efficient, has fewer features, and is more complicated.
- //
- // The message must be defined exactly as follows:
- // message Foo {
- // option message_set_wire_format = true;
- // extensions 4 to max;
- // }
- // Note that the message cannot have any defined fields; MessageSets only
- // have extensions.
- //
- // All extensions of your type must be singular messages; e.g. they cannot
- // be int32s, enums, or repeated messages.
- //
- // Because this is an option, the above two restrictions are not enforced by
- // the protocol compiler.
- MessageSetWireFormat *bool `protobuf:"varint,1,opt,name=message_set_wire_format,json=messageSetWireFormat,def=0" json:"message_set_wire_format,omitempty"`
- // Disables the generation of the standard "descriptor()" accessor, which can
- // conflict with a field of the same name. This is meant to make migration
- // from proto1 easier; new code should avoid fields named "descriptor".
- NoStandardDescriptorAccessor *bool `protobuf:"varint,2,opt,name=no_standard_descriptor_accessor,json=noStandardDescriptorAccessor,def=0" json:"no_standard_descriptor_accessor,omitempty"`
- // Is this message deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the message, or it will be completely ignored; in the very least,
- // this is a formalization for deprecating messages.
- Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
- // Whether the message is an automatically generated map entry type for the
- // maps field.
- //
- // For maps fields:
- // map map_field = 1;
- // The parsed descriptor looks like:
- // message MapFieldEntry {
- // option map_entry = true;
- // optional KeyType key = 1;
- // optional ValueType value = 2;
- // }
- // repeated MapFieldEntry map_field = 1;
- //
- // Implementations may choose not to generate the map_entry=true message, but
- // use a native map in the target language to hold the keys and values.
- // The reflection APIs in such implementions still need to work as
- // if the field is a repeated message field.
- //
- // NOTE: Do not set the option in .proto files. Always use the maps syntax
- // instead. The option should only be implicitly set by the proto compiler
- // parser.
- MapEntry *bool `protobuf:"varint,7,opt,name=map_entry,json=mapEntry" json:"map_entry,omitempty"`
- // The parser stores options it doesn't recognize here. See above.
- UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *MessageOptions) Reset() { *m = MessageOptions{} }
-func (m *MessageOptions) String() string { return proto.CompactTextString(m) }
-func (*MessageOptions) ProtoMessage() {}
-func (*MessageOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
-
-var extRange_MessageOptions = []proto.ExtensionRange{
- {1000, 536870911},
-}
-
-func (*MessageOptions) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_MessageOptions
-}
-
-const Default_MessageOptions_MessageSetWireFormat bool = false
-const Default_MessageOptions_NoStandardDescriptorAccessor bool = false
-const Default_MessageOptions_Deprecated bool = false
-
-func (m *MessageOptions) GetMessageSetWireFormat() bool {
- if m != nil && m.MessageSetWireFormat != nil {
- return *m.MessageSetWireFormat
- }
- return Default_MessageOptions_MessageSetWireFormat
-}
-
-func (m *MessageOptions) GetNoStandardDescriptorAccessor() bool {
- if m != nil && m.NoStandardDescriptorAccessor != nil {
- return *m.NoStandardDescriptorAccessor
- }
- return Default_MessageOptions_NoStandardDescriptorAccessor
-}
-
-func (m *MessageOptions) GetDeprecated() bool {
- if m != nil && m.Deprecated != nil {
- return *m.Deprecated
- }
- return Default_MessageOptions_Deprecated
-}
-
-func (m *MessageOptions) GetMapEntry() bool {
- if m != nil && m.MapEntry != nil {
- return *m.MapEntry
- }
- return false
-}
-
-func (m *MessageOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
- }
- return nil
-}
-
-type FieldOptions struct {
- // The ctype option instructs the C++ code generator to use a different
- // representation of the field than it normally would. See the specific
- // options below. This option is not yet implemented in the open source
- // release -- sorry, we'll try to include it in a future version!
- Ctype *FieldOptions_CType `protobuf:"varint,1,opt,name=ctype,enum=google.protobuf.FieldOptions_CType,def=0" json:"ctype,omitempty"`
- // The packed option can be enabled for repeated primitive fields to enable
- // a more efficient representation on the wire. Rather than repeatedly
- // writing the tag and type for each element, the entire array is encoded as
- // a single length-delimited blob. In proto3, only explicit setting it to
- // false will avoid using packed encoding.
- Packed *bool `protobuf:"varint,2,opt,name=packed" json:"packed,omitempty"`
- // The jstype option determines the JavaScript type used for values of the
- // field. The option is permitted only for 64 bit integral and fixed types
- // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
- // is represented as JavaScript string, which avoids loss of precision that
- // can happen when a large value is converted to a floating point JavaScript.
- // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
- // use the JavaScript "number" type. The behavior of the default option
- // JS_NORMAL is implementation dependent.
- //
- // This option is an enum to permit additional types to be added, e.g.
- // goog.math.Integer.
- Jstype *FieldOptions_JSType `protobuf:"varint,6,opt,name=jstype,enum=google.protobuf.FieldOptions_JSType,def=0" json:"jstype,omitempty"`
- // Should this field be parsed lazily? Lazy applies only to message-type
- // fields. It means that when the outer message is initially parsed, the
- // inner message's contents will not be parsed but instead stored in encoded
- // form. The inner message will actually be parsed when it is first accessed.
- //
- // This is only a hint. Implementations are free to choose whether to use
- // eager or lazy parsing regardless of the value of this option. However,
- // setting this option true suggests that the protocol author believes that
- // using lazy parsing on this field is worth the additional bookkeeping
- // overhead typically needed to implement it.
- //
- // This option does not affect the public interface of any generated code;
- // all method signatures remain the same. Furthermore, thread-safety of the
- // interface is not affected by this option; const methods remain safe to
- // call from multiple threads concurrently, while non-const methods continue
- // to require exclusive access.
- //
- //
- // Note that implementations may choose not to check required fields within
- // a lazy sub-message. That is, calling IsInitialized() on the outer message
- // may return true even if the inner message has missing required fields.
- // This is necessary because otherwise the inner message would have to be
- // parsed in order to perform the check, defeating the purpose of lazy
- // parsing. An implementation which chooses not to check required fields
- // must be consistent about it. That is, for any particular sub-message, the
- // implementation must either *always* check its required fields, or *never*
- // check its required fields, regardless of whether or not the message has
- // been parsed.
- Lazy *bool `protobuf:"varint,5,opt,name=lazy,def=0" json:"lazy,omitempty"`
- // Is this field deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for accessors, or it will be completely ignored; in the very least, this
- // is a formalization for deprecating fields.
- Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
- // For Google-internal migration only. Do not use.
- Weak *bool `protobuf:"varint,10,opt,name=weak,def=0" json:"weak,omitempty"`
- // The parser stores options it doesn't recognize here. See above.
- UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *FieldOptions) Reset() { *m = FieldOptions{} }
-func (m *FieldOptions) String() string { return proto.CompactTextString(m) }
-func (*FieldOptions) ProtoMessage() {}
-func (*FieldOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }
-
-var extRange_FieldOptions = []proto.ExtensionRange{
- {1000, 536870911},
-}
-
-func (*FieldOptions) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_FieldOptions
-}
-
-const Default_FieldOptions_Ctype FieldOptions_CType = FieldOptions_STRING
-const Default_FieldOptions_Jstype FieldOptions_JSType = FieldOptions_JS_NORMAL
-const Default_FieldOptions_Lazy bool = false
-const Default_FieldOptions_Deprecated bool = false
-const Default_FieldOptions_Weak bool = false
-
-func (m *FieldOptions) GetCtype() FieldOptions_CType {
- if m != nil && m.Ctype != nil {
- return *m.Ctype
- }
- return Default_FieldOptions_Ctype
-}
-
-func (m *FieldOptions) GetPacked() bool {
- if m != nil && m.Packed != nil {
- return *m.Packed
- }
- return false
-}
-
-func (m *FieldOptions) GetJstype() FieldOptions_JSType {
- if m != nil && m.Jstype != nil {
- return *m.Jstype
- }
- return Default_FieldOptions_Jstype
-}
-
-func (m *FieldOptions) GetLazy() bool {
- if m != nil && m.Lazy != nil {
- return *m.Lazy
- }
- return Default_FieldOptions_Lazy
-}
-
-func (m *FieldOptions) GetDeprecated() bool {
- if m != nil && m.Deprecated != nil {
- return *m.Deprecated
- }
- return Default_FieldOptions_Deprecated
-}
-
-func (m *FieldOptions) GetWeak() bool {
- if m != nil && m.Weak != nil {
- return *m.Weak
- }
- return Default_FieldOptions_Weak
-}
-
-func (m *FieldOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
- }
- return nil
-}
-
-type OneofOptions struct {
- // The parser stores options it doesn't recognize here. See above.
- UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *OneofOptions) Reset() { *m = OneofOptions{} }
-func (m *OneofOptions) String() string { return proto.CompactTextString(m) }
-func (*OneofOptions) ProtoMessage() {}
-func (*OneofOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }
-
-var extRange_OneofOptions = []proto.ExtensionRange{
- {1000, 536870911},
-}
-
-func (*OneofOptions) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_OneofOptions
-}
-
-func (m *OneofOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
- }
- return nil
-}
-
-type EnumOptions struct {
- // Set this option to true to allow mapping different tag names to the same
- // value.
- AllowAlias *bool `protobuf:"varint,2,opt,name=allow_alias,json=allowAlias" json:"allow_alias,omitempty"`
- // Is this enum deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the enum, or it will be completely ignored; in the very least, this
- // is a formalization for deprecating enums.
- Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
- // The parser stores options it doesn't recognize here. See above.
- UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *EnumOptions) Reset() { *m = EnumOptions{} }
-func (m *EnumOptions) String() string { return proto.CompactTextString(m) }
-func (*EnumOptions) ProtoMessage() {}
-func (*EnumOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} }
-
-var extRange_EnumOptions = []proto.ExtensionRange{
- {1000, 536870911},
-}
-
-func (*EnumOptions) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_EnumOptions
-}
-
-const Default_EnumOptions_Deprecated bool = false
-
-func (m *EnumOptions) GetAllowAlias() bool {
- if m != nil && m.AllowAlias != nil {
- return *m.AllowAlias
- }
- return false
-}
-
-func (m *EnumOptions) GetDeprecated() bool {
- if m != nil && m.Deprecated != nil {
- return *m.Deprecated
- }
- return Default_EnumOptions_Deprecated
-}
-
-func (m *EnumOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
- }
- return nil
-}
-
-type EnumValueOptions struct {
- // Is this enum value deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the enum value, or it will be completely ignored; in the very least,
- // this is a formalization for deprecating enum values.
- Deprecated *bool `protobuf:"varint,1,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
- // The parser stores options it doesn't recognize here. See above.
- UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *EnumValueOptions) Reset() { *m = EnumValueOptions{} }
-func (m *EnumValueOptions) String() string { return proto.CompactTextString(m) }
-func (*EnumValueOptions) ProtoMessage() {}
-func (*EnumValueOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} }
-
-var extRange_EnumValueOptions = []proto.ExtensionRange{
- {1000, 536870911},
-}
-
-func (*EnumValueOptions) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_EnumValueOptions
-}
-
-const Default_EnumValueOptions_Deprecated bool = false
-
-func (m *EnumValueOptions) GetDeprecated() bool {
- if m != nil && m.Deprecated != nil {
- return *m.Deprecated
- }
- return Default_EnumValueOptions_Deprecated
-}
-
-func (m *EnumValueOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
- }
- return nil
-}
-
-type ServiceOptions struct {
- // Is this service deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the service, or it will be completely ignored; in the very least,
- // this is a formalization for deprecating services.
- Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
- // The parser stores options it doesn't recognize here. See above.
- UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *ServiceOptions) Reset() { *m = ServiceOptions{} }
-func (m *ServiceOptions) String() string { return proto.CompactTextString(m) }
-func (*ServiceOptions) ProtoMessage() {}
-func (*ServiceOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} }
-
-var extRange_ServiceOptions = []proto.ExtensionRange{
- {1000, 536870911},
-}
-
-func (*ServiceOptions) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_ServiceOptions
-}
-
-const Default_ServiceOptions_Deprecated bool = false
-
-func (m *ServiceOptions) GetDeprecated() bool {
- if m != nil && m.Deprecated != nil {
- return *m.Deprecated
- }
- return Default_ServiceOptions_Deprecated
-}
-
-func (m *ServiceOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
- }
- return nil
-}
-
-type MethodOptions struct {
- // Is this method deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the method, or it will be completely ignored; in the very least,
- // this is a formalization for deprecating methods.
- Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
- IdempotencyLevel *MethodOptions_IdempotencyLevel `protobuf:"varint,34,opt,name=idempotency_level,json=idempotencyLevel,enum=google.protobuf.MethodOptions_IdempotencyLevel,def=0" json:"idempotency_level,omitempty"`
- // The parser stores options it doesn't recognize here. See above.
- UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
- proto.XXX_InternalExtensions `json:"-"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *MethodOptions) Reset() { *m = MethodOptions{} }
-func (m *MethodOptions) String() string { return proto.CompactTextString(m) }
-func (*MethodOptions) ProtoMessage() {}
-func (*MethodOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} }
-
-var extRange_MethodOptions = []proto.ExtensionRange{
- {1000, 536870911},
-}
-
-func (*MethodOptions) ExtensionRangeArray() []proto.ExtensionRange {
- return extRange_MethodOptions
-}
-
-const Default_MethodOptions_Deprecated bool = false
-const Default_MethodOptions_IdempotencyLevel MethodOptions_IdempotencyLevel = MethodOptions_IDEMPOTENCY_UNKNOWN
-
-func (m *MethodOptions) GetDeprecated() bool {
- if m != nil && m.Deprecated != nil {
- return *m.Deprecated
- }
- return Default_MethodOptions_Deprecated
-}
-
-func (m *MethodOptions) GetIdempotencyLevel() MethodOptions_IdempotencyLevel {
- if m != nil && m.IdempotencyLevel != nil {
- return *m.IdempotencyLevel
- }
- return Default_MethodOptions_IdempotencyLevel
-}
-
-func (m *MethodOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
- }
- return nil
-}
-
-// A message representing a option the parser does not recognize. This only
-// appears in options protos created by the compiler::Parser class.
-// DescriptorPool resolves these when building Descriptor objects. Therefore,
-// options protos in descriptor objects (e.g. returned by Descriptor::options(),
-// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
-// in them.
-type UninterpretedOption struct {
- Name []*UninterpretedOption_NamePart `protobuf:"bytes,2,rep,name=name" json:"name,omitempty"`
- // The value of the uninterpreted option, in whatever type the tokenizer
- // identified it as during parsing. Exactly one of these should be set.
- IdentifierValue *string `protobuf:"bytes,3,opt,name=identifier_value,json=identifierValue" json:"identifier_value,omitempty"`
- PositiveIntValue *uint64 `protobuf:"varint,4,opt,name=positive_int_value,json=positiveIntValue" json:"positive_int_value,omitempty"`
- NegativeIntValue *int64 `protobuf:"varint,5,opt,name=negative_int_value,json=negativeIntValue" json:"negative_int_value,omitempty"`
- DoubleValue *float64 `protobuf:"fixed64,6,opt,name=double_value,json=doubleValue" json:"double_value,omitempty"`
- StringValue []byte `protobuf:"bytes,7,opt,name=string_value,json=stringValue" json:"string_value,omitempty"`
- AggregateValue *string `protobuf:"bytes,8,opt,name=aggregate_value,json=aggregateValue" json:"aggregate_value,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *UninterpretedOption) Reset() { *m = UninterpretedOption{} }
-func (m *UninterpretedOption) String() string { return proto.CompactTextString(m) }
-func (*UninterpretedOption) ProtoMessage() {}
-func (*UninterpretedOption) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} }
-
-func (m *UninterpretedOption) GetName() []*UninterpretedOption_NamePart {
- if m != nil {
- return m.Name
- }
- return nil
-}
-
-func (m *UninterpretedOption) GetIdentifierValue() string {
- if m != nil && m.IdentifierValue != nil {
- return *m.IdentifierValue
- }
- return ""
-}
-
-func (m *UninterpretedOption) GetPositiveIntValue() uint64 {
- if m != nil && m.PositiveIntValue != nil {
- return *m.PositiveIntValue
- }
- return 0
-}
-
-func (m *UninterpretedOption) GetNegativeIntValue() int64 {
- if m != nil && m.NegativeIntValue != nil {
- return *m.NegativeIntValue
- }
- return 0
-}
-
-func (m *UninterpretedOption) GetDoubleValue() float64 {
- if m != nil && m.DoubleValue != nil {
- return *m.DoubleValue
- }
- return 0
-}
-
-func (m *UninterpretedOption) GetStringValue() []byte {
- if m != nil {
- return m.StringValue
- }
- return nil
-}
-
-func (m *UninterpretedOption) GetAggregateValue() string {
- if m != nil && m.AggregateValue != nil {
- return *m.AggregateValue
- }
- return ""
-}
-
-// The name of the uninterpreted option. Each string represents a segment in
-// a dot-separated name. is_extension is true iff a segment represents an
-// extension (denoted with parentheses in options specs in .proto files).
-// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
-// "foo.(bar.baz).qux".
-type UninterpretedOption_NamePart struct {
- NamePart *string `protobuf:"bytes,1,req,name=name_part,json=namePart" json:"name_part,omitempty"`
- IsExtension *bool `protobuf:"varint,2,req,name=is_extension,json=isExtension" json:"is_extension,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *UninterpretedOption_NamePart) Reset() { *m = UninterpretedOption_NamePart{} }
-func (m *UninterpretedOption_NamePart) String() string { return proto.CompactTextString(m) }
-func (*UninterpretedOption_NamePart) ProtoMessage() {}
-func (*UninterpretedOption_NamePart) Descriptor() ([]byte, []int) {
- return fileDescriptor0, []int{18, 0}
-}
-
-func (m *UninterpretedOption_NamePart) GetNamePart() string {
- if m != nil && m.NamePart != nil {
- return *m.NamePart
- }
- return ""
-}
-
-func (m *UninterpretedOption_NamePart) GetIsExtension() bool {
- if m != nil && m.IsExtension != nil {
- return *m.IsExtension
- }
- return false
-}
-
-// Encapsulates information about the original source file from which a
-// FileDescriptorProto was generated.
-type SourceCodeInfo struct {
- // A Location identifies a piece of source code in a .proto file which
- // corresponds to a particular definition. This information is intended
- // to be useful to IDEs, code indexers, documentation generators, and similar
- // tools.
- //
- // For example, say we have a file like:
- // message Foo {
- // optional string foo = 1;
- // }
- // Let's look at just the field definition:
- // optional string foo = 1;
- // ^ ^^ ^^ ^ ^^^
- // a bc de f ghi
- // We have the following locations:
- // span path represents
- // [a,i) [ 4, 0, 2, 0 ] The whole field definition.
- // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
- // [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
- // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
- // [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
- //
- // Notes:
- // - A location may refer to a repeated field itself (i.e. not to any
- // particular index within it). This is used whenever a set of elements are
- // logically enclosed in a single code segment. For example, an entire
- // extend block (possibly containing multiple extension definitions) will
- // have an outer location whose path refers to the "extensions" repeated
- // field without an index.
- // - Multiple locations may have the same path. This happens when a single
- // logical declaration is spread out across multiple places. The most
- // obvious example is the "extend" block again -- there may be multiple
- // extend blocks in the same scope, each of which will have the same path.
- // - A location's span is not always a subset of its parent's span. For
- // example, the "extendee" of an extension declaration appears at the
- // beginning of the "extend" block and is shared by all extensions within
- // the block.
- // - Just because a location's span is a subset of some other location's span
- // does not mean that it is a descendent. For example, a "group" defines
- // both a type and a field in a single declaration. Thus, the locations
- // corresponding to the type and field and their components will overlap.
- // - Code which tries to interpret locations should probably be designed to
- // ignore those that it doesn't understand, as more types of locations could
- // be recorded in the future.
- Location []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *SourceCodeInfo) Reset() { *m = SourceCodeInfo{} }
-func (m *SourceCodeInfo) String() string { return proto.CompactTextString(m) }
-func (*SourceCodeInfo) ProtoMessage() {}
-func (*SourceCodeInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} }
-
-func (m *SourceCodeInfo) GetLocation() []*SourceCodeInfo_Location {
- if m != nil {
- return m.Location
- }
- return nil
-}
-
-type SourceCodeInfo_Location struct {
- // Identifies which part of the FileDescriptorProto was defined at this
- // location.
- //
- // Each element is a field number or an index. They form a path from
- // the root FileDescriptorProto to the place where the definition. For
- // example, this path:
- // [ 4, 3, 2, 7, 1 ]
- // refers to:
- // file.message_type(3) // 4, 3
- // .field(7) // 2, 7
- // .name() // 1
- // This is because FileDescriptorProto.message_type has field number 4:
- // repeated DescriptorProto message_type = 4;
- // and DescriptorProto.field has field number 2:
- // repeated FieldDescriptorProto field = 2;
- // and FieldDescriptorProto.name has field number 1:
- // optional string name = 1;
- //
- // Thus, the above path gives the location of a field name. If we removed
- // the last element:
- // [ 4, 3, 2, 7 ]
- // this path refers to the whole field declaration (from the beginning
- // of the label to the terminating semicolon).
- Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"`
- // Always has exactly three or four elements: start line, start column,
- // end line (optional, otherwise assumed same as start line), end column.
- // These are packed into a single field for efficiency. Note that line
- // and column numbers are zero-based -- typically you will want to add
- // 1 to each before displaying to a user.
- Span []int32 `protobuf:"varint,2,rep,packed,name=span" json:"span,omitempty"`
- // If this SourceCodeInfo represents a complete declaration, these are any
- // comments appearing before and after the declaration which appear to be
- // attached to the declaration.
- //
- // A series of line comments appearing on consecutive lines, with no other
- // tokens appearing on those lines, will be treated as a single comment.
- //
- // leading_detached_comments will keep paragraphs of comments that appear
- // before (but not connected to) the current element. Each paragraph,
- // separated by empty lines, will be one comment element in the repeated
- // field.
- //
- // Only the comment content is provided; comment markers (e.g. //) are
- // stripped out. For block comments, leading whitespace and an asterisk
- // will be stripped from the beginning of each line other than the first.
- // Newlines are included in the output.
- //
- // Examples:
- //
- // optional int32 foo = 1; // Comment attached to foo.
- // // Comment attached to bar.
- // optional int32 bar = 2;
- //
- // optional string baz = 3;
- // // Comment attached to baz.
- // // Another line attached to baz.
- //
- // // Comment attached to qux.
- // //
- // // Another line attached to qux.
- // optional double qux = 4;
- //
- // // Detached comment for corge. This is not leading or trailing comments
- // // to qux or corge because there are blank lines separating it from
- // // both.
- //
- // // Detached comment for corge paragraph 2.
- //
- // optional string corge = 5;
- // /* Block comment attached
- // * to corge. Leading asterisks
- // * will be removed. */
- // /* Block comment attached to
- // * grault. */
- // optional int32 grault = 6;
- //
- // // ignored detached comments.
- LeadingComments *string `protobuf:"bytes,3,opt,name=leading_comments,json=leadingComments" json:"leading_comments,omitempty"`
- TrailingComments *string `protobuf:"bytes,4,opt,name=trailing_comments,json=trailingComments" json:"trailing_comments,omitempty"`
- LeadingDetachedComments []string `protobuf:"bytes,6,rep,name=leading_detached_comments,json=leadingDetachedComments" json:"leading_detached_comments,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *SourceCodeInfo_Location) Reset() { *m = SourceCodeInfo_Location{} }
-func (m *SourceCodeInfo_Location) String() string { return proto.CompactTextString(m) }
-func (*SourceCodeInfo_Location) ProtoMessage() {}
-func (*SourceCodeInfo_Location) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19, 0} }
-
-func (m *SourceCodeInfo_Location) GetPath() []int32 {
- if m != nil {
- return m.Path
- }
- return nil
-}
-
-func (m *SourceCodeInfo_Location) GetSpan() []int32 {
- if m != nil {
- return m.Span
- }
- return nil
-}
-
-func (m *SourceCodeInfo_Location) GetLeadingComments() string {
- if m != nil && m.LeadingComments != nil {
- return *m.LeadingComments
- }
- return ""
-}
-
-func (m *SourceCodeInfo_Location) GetTrailingComments() string {
- if m != nil && m.TrailingComments != nil {
- return *m.TrailingComments
- }
- return ""
-}
-
-func (m *SourceCodeInfo_Location) GetLeadingDetachedComments() []string {
- if m != nil {
- return m.LeadingDetachedComments
- }
- return nil
-}
-
-// Describes the relationship between generated code and its original source
-// file. A GeneratedCodeInfo message is associated with only one generated
-// source file, but may contain references to different source .proto files.
-type GeneratedCodeInfo struct {
- // An Annotation connects some span of text in generated code to an element
- // of its generating .proto file.
- Annotation []*GeneratedCodeInfo_Annotation `protobuf:"bytes,1,rep,name=annotation" json:"annotation,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GeneratedCodeInfo) Reset() { *m = GeneratedCodeInfo{} }
-func (m *GeneratedCodeInfo) String() string { return proto.CompactTextString(m) }
-func (*GeneratedCodeInfo) ProtoMessage() {}
-func (*GeneratedCodeInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} }
-
-func (m *GeneratedCodeInfo) GetAnnotation() []*GeneratedCodeInfo_Annotation {
- if m != nil {
- return m.Annotation
- }
- return nil
-}
-
-type GeneratedCodeInfo_Annotation struct {
- // Identifies the element in the original source .proto file. This field
- // is formatted the same as SourceCodeInfo.Location.path.
- Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"`
- // Identifies the filesystem path to the original source .proto.
- SourceFile *string `protobuf:"bytes,2,opt,name=source_file,json=sourceFile" json:"source_file,omitempty"`
- // Identifies the starting offset in bytes in the generated code
- // that relates to the identified object.
- Begin *int32 `protobuf:"varint,3,opt,name=begin" json:"begin,omitempty"`
- // Identifies the ending offset in bytes in the generated code that
- // relates to the identified offset. The end offset should be one past
- // the last relevant byte (so the length of the text = end - begin).
- End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"`
- XXX_unrecognized []byte `json:"-"`
-}
-
-func (m *GeneratedCodeInfo_Annotation) Reset() { *m = GeneratedCodeInfo_Annotation{} }
-func (m *GeneratedCodeInfo_Annotation) String() string { return proto.CompactTextString(m) }
-func (*GeneratedCodeInfo_Annotation) ProtoMessage() {}
-func (*GeneratedCodeInfo_Annotation) Descriptor() ([]byte, []int) {
- return fileDescriptor0, []int{20, 0}
-}
-
-func (m *GeneratedCodeInfo_Annotation) GetPath() []int32 {
- if m != nil {
- return m.Path
- }
- return nil
-}
-
-func (m *GeneratedCodeInfo_Annotation) GetSourceFile() string {
- if m != nil && m.SourceFile != nil {
- return *m.SourceFile
- }
- return ""
-}
-
-func (m *GeneratedCodeInfo_Annotation) GetBegin() int32 {
- if m != nil && m.Begin != nil {
- return *m.Begin
- }
- return 0
-}
-
-func (m *GeneratedCodeInfo_Annotation) GetEnd() int32 {
- if m != nil && m.End != nil {
- return *m.End
- }
- return 0
-}
-
-func init() {
- proto.RegisterType((*FileDescriptorSet)(nil), "google.protobuf.FileDescriptorSet")
- proto.RegisterType((*FileDescriptorProto)(nil), "google.protobuf.FileDescriptorProto")
- proto.RegisterType((*DescriptorProto)(nil), "google.protobuf.DescriptorProto")
- proto.RegisterType((*DescriptorProto_ExtensionRange)(nil), "google.protobuf.DescriptorProto.ExtensionRange")
- proto.RegisterType((*DescriptorProto_ReservedRange)(nil), "google.protobuf.DescriptorProto.ReservedRange")
- proto.RegisterType((*ExtensionRangeOptions)(nil), "google.protobuf.ExtensionRangeOptions")
- proto.RegisterType((*FieldDescriptorProto)(nil), "google.protobuf.FieldDescriptorProto")
- proto.RegisterType((*OneofDescriptorProto)(nil), "google.protobuf.OneofDescriptorProto")
- proto.RegisterType((*EnumDescriptorProto)(nil), "google.protobuf.EnumDescriptorProto")
- proto.RegisterType((*EnumValueDescriptorProto)(nil), "google.protobuf.EnumValueDescriptorProto")
- proto.RegisterType((*ServiceDescriptorProto)(nil), "google.protobuf.ServiceDescriptorProto")
- proto.RegisterType((*MethodDescriptorProto)(nil), "google.protobuf.MethodDescriptorProto")
- proto.RegisterType((*FileOptions)(nil), "google.protobuf.FileOptions")
- proto.RegisterType((*MessageOptions)(nil), "google.protobuf.MessageOptions")
- proto.RegisterType((*FieldOptions)(nil), "google.protobuf.FieldOptions")
- proto.RegisterType((*OneofOptions)(nil), "google.protobuf.OneofOptions")
- proto.RegisterType((*EnumOptions)(nil), "google.protobuf.EnumOptions")
- proto.RegisterType((*EnumValueOptions)(nil), "google.protobuf.EnumValueOptions")
- proto.RegisterType((*ServiceOptions)(nil), "google.protobuf.ServiceOptions")
- proto.RegisterType((*MethodOptions)(nil), "google.protobuf.MethodOptions")
- proto.RegisterType((*UninterpretedOption)(nil), "google.protobuf.UninterpretedOption")
- proto.RegisterType((*UninterpretedOption_NamePart)(nil), "google.protobuf.UninterpretedOption.NamePart")
- proto.RegisterType((*SourceCodeInfo)(nil), "google.protobuf.SourceCodeInfo")
- proto.RegisterType((*SourceCodeInfo_Location)(nil), "google.protobuf.SourceCodeInfo.Location")
- proto.RegisterType((*GeneratedCodeInfo)(nil), "google.protobuf.GeneratedCodeInfo")
- proto.RegisterType((*GeneratedCodeInfo_Annotation)(nil), "google.protobuf.GeneratedCodeInfo.Annotation")
- proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Type", FieldDescriptorProto_Type_name, FieldDescriptorProto_Type_value)
- proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Label", FieldDescriptorProto_Label_name, FieldDescriptorProto_Label_value)
- proto.RegisterEnum("google.protobuf.FileOptions_OptimizeMode", FileOptions_OptimizeMode_name, FileOptions_OptimizeMode_value)
- proto.RegisterEnum("google.protobuf.FieldOptions_CType", FieldOptions_CType_name, FieldOptions_CType_value)
- proto.RegisterEnum("google.protobuf.FieldOptions_JSType", FieldOptions_JSType_name, FieldOptions_JSType_value)
- proto.RegisterEnum("google.protobuf.MethodOptions_IdempotencyLevel", MethodOptions_IdempotencyLevel_name, MethodOptions_IdempotencyLevel_value)
-}
-
-func init() { proto.RegisterFile("google/protobuf/descriptor.proto", fileDescriptor0) }
-
-var fileDescriptor0 = []byte{
- // 2519 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xdd, 0x6e, 0x1b, 0xc7,
- 0x15, 0x0e, 0x7f, 0x45, 0x1e, 0x52, 0xd4, 0x68, 0xa4, 0xd8, 0x6b, 0xe5, 0xc7, 0x32, 0xf3, 0x63,
- 0xd9, 0x69, 0xa8, 0x40, 0xb1, 0x1d, 0x47, 0x29, 0xd2, 0x52, 0xe4, 0x5a, 0xa1, 0x4a, 0x91, 0xec,
- 0x92, 0x6a, 0x7e, 0x6e, 0x16, 0xa3, 0xdd, 0x21, 0xb9, 0xf6, 0x72, 0x77, 0xb3, 0xbb, 0xb4, 0xad,
- 0xa0, 0x17, 0x06, 0x7a, 0x55, 0xa0, 0x0f, 0x50, 0x14, 0x45, 0x2f, 0x72, 0x13, 0xa0, 0x0f, 0x50,
- 0x20, 0x77, 0x7d, 0x82, 0x02, 0x79, 0x83, 0xa2, 0x28, 0xd0, 0x3e, 0x46, 0x31, 0x33, 0xbb, 0xcb,
- 0x5d, 0xfe, 0xc4, 0x6a, 0x80, 0x38, 0x57, 0xe4, 0x7c, 0xe7, 0x3b, 0x67, 0xce, 0x9c, 0x39, 0x33,
- 0x73, 0x66, 0x16, 0x76, 0x47, 0xb6, 0x3d, 0x32, 0xe9, 0xbe, 0xe3, 0xda, 0xbe, 0x7d, 0x3e, 0x1d,
- 0xee, 0xeb, 0xd4, 0xd3, 0x5c, 0xc3, 0xf1, 0x6d, 0xb7, 0xc6, 0x31, 0xbc, 0x21, 0x18, 0xb5, 0x90,
- 0x51, 0x3d, 0x85, 0xcd, 0x07, 0x86, 0x49, 0x9b, 0x11, 0xb1, 0x4f, 0x7d, 0x7c, 0x1f, 0xb2, 0x43,
- 0xc3, 0xa4, 0x52, 0x6a, 0x37, 0xb3, 0x57, 0x3a, 0x78, 0xb3, 0x36, 0xa7, 0x54, 0x4b, 0x6a, 0xf4,
- 0x18, 0xac, 0x70, 0x8d, 0xea, 0xbf, 0xb3, 0xb0, 0xb5, 0x44, 0x8a, 0x31, 0x64, 0x2d, 0x32, 0x61,
- 0x16, 0x53, 0x7b, 0x45, 0x85, 0xff, 0xc7, 0x12, 0xac, 0x39, 0x44, 0x7b, 0x44, 0x46, 0x54, 0x4a,
- 0x73, 0x38, 0x6c, 0xe2, 0xd7, 0x01, 0x74, 0xea, 0x50, 0x4b, 0xa7, 0x96, 0x76, 0x21, 0x65, 0x76,
- 0x33, 0x7b, 0x45, 0x25, 0x86, 0xe0, 0x77, 0x60, 0xd3, 0x99, 0x9e, 0x9b, 0x86, 0xa6, 0xc6, 0x68,
- 0xb0, 0x9b, 0xd9, 0xcb, 0x29, 0x48, 0x08, 0x9a, 0x33, 0xf2, 0x4d, 0xd8, 0x78, 0x42, 0xc9, 0xa3,
- 0x38, 0xb5, 0xc4, 0xa9, 0x15, 0x06, 0xc7, 0x88, 0x0d, 0x28, 0x4f, 0xa8, 0xe7, 0x91, 0x11, 0x55,
- 0xfd, 0x0b, 0x87, 0x4a, 0x59, 0x3e, 0xfa, 0xdd, 0x85, 0xd1, 0xcf, 0x8f, 0xbc, 0x14, 0x68, 0x0d,
- 0x2e, 0x1c, 0x8a, 0xeb, 0x50, 0xa4, 0xd6, 0x74, 0x22, 0x2c, 0xe4, 0x56, 0xc4, 0x4f, 0xb6, 0xa6,
- 0x93, 0x79, 0x2b, 0x05, 0xa6, 0x16, 0x98, 0x58, 0xf3, 0xa8, 0xfb, 0xd8, 0xd0, 0xa8, 0x94, 0xe7,
- 0x06, 0x6e, 0x2e, 0x18, 0xe8, 0x0b, 0xf9, 0xbc, 0x8d, 0x50, 0x0f, 0x37, 0xa0, 0x48, 0x9f, 0xfa,
- 0xd4, 0xf2, 0x0c, 0xdb, 0x92, 0xd6, 0xb8, 0x91, 0xb7, 0x96, 0xcc, 0x22, 0x35, 0xf5, 0x79, 0x13,
- 0x33, 0x3d, 0x7c, 0x0f, 0xd6, 0x6c, 0xc7, 0x37, 0x6c, 0xcb, 0x93, 0x0a, 0xbb, 0xa9, 0xbd, 0xd2,
- 0xc1, 0xab, 0x4b, 0x13, 0xa1, 0x2b, 0x38, 0x4a, 0x48, 0xc6, 0x2d, 0x40, 0x9e, 0x3d, 0x75, 0x35,
- 0xaa, 0x6a, 0xb6, 0x4e, 0x55, 0xc3, 0x1a, 0xda, 0x52, 0x91, 0x1b, 0xb8, 0xbe, 0x38, 0x10, 0x4e,
- 0x6c, 0xd8, 0x3a, 0x6d, 0x59, 0x43, 0x5b, 0xa9, 0x78, 0x89, 0x36, 0xbe, 0x02, 0x79, 0xef, 0xc2,
- 0xf2, 0xc9, 0x53, 0xa9, 0xcc, 0x33, 0x24, 0x68, 0x55, 0xbf, 0xcd, 0xc3, 0xc6, 0x65, 0x52, 0xec,
- 0x23, 0xc8, 0x0d, 0xd9, 0x28, 0xa5, 0xf4, 0xff, 0x13, 0x03, 0xa1, 0x93, 0x0c, 0x62, 0xfe, 0x07,
- 0x06, 0xb1, 0x0e, 0x25, 0x8b, 0x7a, 0x3e, 0xd5, 0x45, 0x46, 0x64, 0x2e, 0x99, 0x53, 0x20, 0x94,
- 0x16, 0x53, 0x2a, 0xfb, 0x83, 0x52, 0xea, 0x33, 0xd8, 0x88, 0x5c, 0x52, 0x5d, 0x62, 0x8d, 0xc2,
- 0xdc, 0xdc, 0x7f, 0x9e, 0x27, 0x35, 0x39, 0xd4, 0x53, 0x98, 0x9a, 0x52, 0xa1, 0x89, 0x36, 0x6e,
- 0x02, 0xd8, 0x16, 0xb5, 0x87, 0xaa, 0x4e, 0x35, 0x53, 0x2a, 0xac, 0x88, 0x52, 0x97, 0x51, 0x16,
- 0xa2, 0x64, 0x0b, 0x54, 0x33, 0xf1, 0x87, 0xb3, 0x54, 0x5b, 0x5b, 0x91, 0x29, 0xa7, 0x62, 0x91,
- 0x2d, 0x64, 0xdb, 0x19, 0x54, 0x5c, 0xca, 0xf2, 0x9e, 0xea, 0xc1, 0xc8, 0x8a, 0xdc, 0x89, 0xda,
- 0x73, 0x47, 0xa6, 0x04, 0x6a, 0x62, 0x60, 0xeb, 0x6e, 0xbc, 0x89, 0xdf, 0x80, 0x08, 0x50, 0x79,
- 0x5a, 0x01, 0xdf, 0x85, 0xca, 0x21, 0xd8, 0x21, 0x13, 0xba, 0xf3, 0x15, 0x54, 0x92, 0xe1, 0xc1,
- 0xdb, 0x90, 0xf3, 0x7c, 0xe2, 0xfa, 0x3c, 0x0b, 0x73, 0x8a, 0x68, 0x60, 0x04, 0x19, 0x6a, 0xe9,
- 0x7c, 0x97, 0xcb, 0x29, 0xec, 0x2f, 0xfe, 0xe5, 0x6c, 0xc0, 0x19, 0x3e, 0xe0, 0xb7, 0x17, 0x67,
- 0x34, 0x61, 0x79, 0x7e, 0xdc, 0x3b, 0x1f, 0xc0, 0x7a, 0x62, 0x00, 0x97, 0xed, 0xba, 0xfa, 0x5b,
- 0x78, 0x79, 0xa9, 0x69, 0xfc, 0x19, 0x6c, 0x4f, 0x2d, 0xc3, 0xf2, 0xa9, 0xeb, 0xb8, 0x94, 0x65,
- 0xac, 0xe8, 0x4a, 0xfa, 0xcf, 0xda, 0x8a, 0x9c, 0x3b, 0x8b, 0xb3, 0x85, 0x15, 0x65, 0x6b, 0xba,
- 0x08, 0xde, 0x2e, 0x16, 0xfe, 0xbb, 0x86, 0x9e, 0x3d, 0x7b, 0xf6, 0x2c, 0x5d, 0xfd, 0x63, 0x1e,
- 0xb6, 0x97, 0xad, 0x99, 0xa5, 0xcb, 0xf7, 0x0a, 0xe4, 0xad, 0xe9, 0xe4, 0x9c, 0xba, 0x3c, 0x48,
- 0x39, 0x25, 0x68, 0xe1, 0x3a, 0xe4, 0x4c, 0x72, 0x4e, 0x4d, 0x29, 0xbb, 0x9b, 0xda, 0xab, 0x1c,
- 0xbc, 0x73, 0xa9, 0x55, 0x59, 0x6b, 0x33, 0x15, 0x45, 0x68, 0xe2, 0x8f, 0x21, 0x1b, 0x6c, 0xd1,
- 0xcc, 0xc2, 0xed, 0xcb, 0x59, 0x60, 0x6b, 0x49, 0xe1, 0x7a, 0xf8, 0x15, 0x28, 0xb2, 0x5f, 0x91,
- 0x1b, 0x79, 0xee, 0x73, 0x81, 0x01, 0x2c, 0x2f, 0xf0, 0x0e, 0x14, 0xf8, 0x32, 0xd1, 0x69, 0x78,
- 0xb4, 0x45, 0x6d, 0x96, 0x58, 0x3a, 0x1d, 0x92, 0xa9, 0xe9, 0xab, 0x8f, 0x89, 0x39, 0xa5, 0x3c,
- 0xe1, 0x8b, 0x4a, 0x39, 0x00, 0x7f, 0xc3, 0x30, 0x7c, 0x1d, 0x4a, 0x62, 0x55, 0x19, 0x96, 0x4e,
- 0x9f, 0xf2, 0xdd, 0x33, 0xa7, 0x88, 0x85, 0xd6, 0x62, 0x08, 0xeb, 0xfe, 0xa1, 0x67, 0x5b, 0x61,
- 0x6a, 0xf2, 0x2e, 0x18, 0xc0, 0xbb, 0xff, 0x60, 0x7e, 0xe3, 0x7e, 0x6d, 0xf9, 0xf0, 0xe6, 0x73,
- 0xaa, 0xfa, 0xb7, 0x34, 0x64, 0xf9, 0x7e, 0xb1, 0x01, 0xa5, 0xc1, 0xe7, 0x3d, 0x59, 0x6d, 0x76,
- 0xcf, 0x8e, 0xda, 0x32, 0x4a, 0xe1, 0x0a, 0x00, 0x07, 0x1e, 0xb4, 0xbb, 0xf5, 0x01, 0x4a, 0x47,
- 0xed, 0x56, 0x67, 0x70, 0xef, 0x0e, 0xca, 0x44, 0x0a, 0x67, 0x02, 0xc8, 0xc6, 0x09, 0xef, 0x1f,
- 0xa0, 0x1c, 0x46, 0x50, 0x16, 0x06, 0x5a, 0x9f, 0xc9, 0xcd, 0x7b, 0x77, 0x50, 0x3e, 0x89, 0xbc,
- 0x7f, 0x80, 0xd6, 0xf0, 0x3a, 0x14, 0x39, 0x72, 0xd4, 0xed, 0xb6, 0x51, 0x21, 0xb2, 0xd9, 0x1f,
- 0x28, 0xad, 0xce, 0x31, 0x2a, 0x46, 0x36, 0x8f, 0x95, 0xee, 0x59, 0x0f, 0x41, 0x64, 0xe1, 0x54,
- 0xee, 0xf7, 0xeb, 0xc7, 0x32, 0x2a, 0x45, 0x8c, 0xa3, 0xcf, 0x07, 0x72, 0x1f, 0x95, 0x13, 0x6e,
- 0xbd, 0x7f, 0x80, 0xd6, 0xa3, 0x2e, 0xe4, 0xce, 0xd9, 0x29, 0xaa, 0xe0, 0x4d, 0x58, 0x17, 0x5d,
- 0x84, 0x4e, 0x6c, 0xcc, 0x41, 0xf7, 0xee, 0x20, 0x34, 0x73, 0x44, 0x58, 0xd9, 0x4c, 0x00, 0xf7,
- 0xee, 0x20, 0x5c, 0x6d, 0x40, 0x8e, 0x67, 0x17, 0xc6, 0x50, 0x69, 0xd7, 0x8f, 0xe4, 0xb6, 0xda,
- 0xed, 0x0d, 0x5a, 0xdd, 0x4e, 0xbd, 0x8d, 0x52, 0x33, 0x4c, 0x91, 0x7f, 0x7d, 0xd6, 0x52, 0xe4,
- 0x26, 0x4a, 0xc7, 0xb1, 0x9e, 0x5c, 0x1f, 0xc8, 0x4d, 0x94, 0xa9, 0x6a, 0xb0, 0xbd, 0x6c, 0x9f,
- 0x5c, 0xba, 0x32, 0x62, 0x53, 0x9c, 0x5e, 0x31, 0xc5, 0xdc, 0xd6, 0xc2, 0x14, 0x7f, 0x9d, 0x82,
- 0xad, 0x25, 0x67, 0xc5, 0xd2, 0x4e, 0x7e, 0x01, 0x39, 0x91, 0xa2, 0xe2, 0xf4, 0xbc, 0xb5, 0xf4,
- 0xd0, 0xe1, 0x09, 0xbb, 0x70, 0x82, 0x72, 0xbd, 0x78, 0x05, 0x91, 0x59, 0x51, 0x41, 0x30, 0x13,
- 0x0b, 0x4e, 0xfe, 0x2e, 0x05, 0xd2, 0x2a, 0xdb, 0xcf, 0xd9, 0x28, 0xd2, 0x89, 0x8d, 0xe2, 0xa3,
- 0x79, 0x07, 0x6e, 0xac, 0x1e, 0xc3, 0x82, 0x17, 0xdf, 0xa4, 0xe0, 0xca, 0xf2, 0x42, 0x6b, 0xa9,
- 0x0f, 0x1f, 0x43, 0x7e, 0x42, 0xfd, 0xb1, 0x1d, 0x16, 0x1b, 0x6f, 0x2f, 0x39, 0xc2, 0x98, 0x78,
- 0x3e, 0x56, 0x81, 0x56, 0xfc, 0x0c, 0xcc, 0xac, 0xaa, 0x96, 0x84, 0x37, 0x0b, 0x9e, 0xfe, 0x3e,
- 0x0d, 0x2f, 0x2f, 0x35, 0xbe, 0xd4, 0xd1, 0xd7, 0x00, 0x0c, 0xcb, 0x99, 0xfa, 0xa2, 0xa0, 0x10,
- 0xfb, 0x53, 0x91, 0x23, 0x7c, 0xed, 0xb3, 0xbd, 0x67, 0xea, 0x47, 0xf2, 0x0c, 0x97, 0x83, 0x80,
- 0x38, 0xe1, 0xfe, 0xcc, 0xd1, 0x2c, 0x77, 0xf4, 0xf5, 0x15, 0x23, 0x5d, 0x38, 0xab, 0xdf, 0x03,
- 0xa4, 0x99, 0x06, 0xb5, 0x7c, 0xd5, 0xf3, 0x5d, 0x4a, 0x26, 0x86, 0x35, 0xe2, 0x1b, 0x70, 0xe1,
- 0x30, 0x37, 0x24, 0xa6, 0x47, 0x95, 0x0d, 0x21, 0xee, 0x87, 0x52, 0xa6, 0xc1, 0xcf, 0x38, 0x37,
- 0xa6, 0x91, 0x4f, 0x68, 0x08, 0x71, 0xa4, 0x51, 0xfd, 0xb6, 0x00, 0xa5, 0x58, 0x59, 0x8a, 0x6f,
- 0x40, 0xf9, 0x21, 0x79, 0x4c, 0xd4, 0xf0, 0xaa, 0x21, 0x22, 0x51, 0x62, 0x58, 0x2f, 0xb8, 0x6e,
- 0xbc, 0x07, 0xdb, 0x9c, 0x62, 0x4f, 0x7d, 0xea, 0xaa, 0x9a, 0x49, 0x3c, 0x8f, 0x07, 0xad, 0xc0,
- 0xa9, 0x98, 0xc9, 0xba, 0x4c, 0xd4, 0x08, 0x25, 0xf8, 0x2e, 0x6c, 0x71, 0x8d, 0xc9, 0xd4, 0xf4,
- 0x0d, 0xc7, 0xa4, 0x2a, 0xbb, 0xfc, 0x78, 0x7c, 0x23, 0x8e, 0x3c, 0xdb, 0x64, 0x8c, 0xd3, 0x80,
- 0xc0, 0x3c, 0xf2, 0x70, 0x13, 0x5e, 0xe3, 0x6a, 0x23, 0x6a, 0x51, 0x97, 0xf8, 0x54, 0xa5, 0x5f,
- 0x4e, 0x89, 0xe9, 0xa9, 0xc4, 0xd2, 0xd5, 0x31, 0xf1, 0xc6, 0xd2, 0x36, 0x33, 0x70, 0x94, 0x96,
- 0x52, 0xca, 0x35, 0x46, 0x3c, 0x0e, 0x78, 0x32, 0xa7, 0xd5, 0x2d, 0xfd, 0x13, 0xe2, 0x8d, 0xf1,
- 0x21, 0x5c, 0xe1, 0x56, 0x3c, 0xdf, 0x35, 0xac, 0x91, 0xaa, 0x8d, 0xa9, 0xf6, 0x48, 0x9d, 0xfa,
- 0xc3, 0xfb, 0xd2, 0x2b, 0xf1, 0xfe, 0xb9, 0x87, 0x7d, 0xce, 0x69, 0x30, 0xca, 0x99, 0x3f, 0xbc,
- 0x8f, 0xfb, 0x50, 0x66, 0x93, 0x31, 0x31, 0xbe, 0xa2, 0xea, 0xd0, 0x76, 0xf9, 0xc9, 0x52, 0x59,
- 0xb2, 0xb2, 0x63, 0x11, 0xac, 0x75, 0x03, 0x85, 0x53, 0x5b, 0xa7, 0x87, 0xb9, 0x7e, 0x4f, 0x96,
- 0x9b, 0x4a, 0x29, 0xb4, 0xf2, 0xc0, 0x76, 0x59, 0x42, 0x8d, 0xec, 0x28, 0xc0, 0x25, 0x91, 0x50,
- 0x23, 0x3b, 0x0c, 0xef, 0x5d, 0xd8, 0xd2, 0x34, 0x31, 0x66, 0x43, 0x53, 0x83, 0x2b, 0x8a, 0x27,
- 0xa1, 0x44, 0xb0, 0x34, 0xed, 0x58, 0x10, 0x82, 0x1c, 0xf7, 0xf0, 0x87, 0xf0, 0xf2, 0x2c, 0x58,
- 0x71, 0xc5, 0xcd, 0x85, 0x51, 0xce, 0xab, 0xde, 0x85, 0x2d, 0xe7, 0x62, 0x51, 0x11, 0x27, 0x7a,
- 0x74, 0x2e, 0xe6, 0xd5, 0x3e, 0x80, 0x6d, 0x67, 0xec, 0x2c, 0xea, 0xdd, 0x8e, 0xeb, 0x61, 0x67,
- 0xec, 0xcc, 0x2b, 0xbe, 0xc5, 0xef, 0xab, 0x2e, 0xd5, 0x88, 0x4f, 0x75, 0xe9, 0x6a, 0x9c, 0x1e,
- 0x13, 0xe0, 0x7d, 0x40, 0x9a, 0xa6, 0x52, 0x8b, 0x9c, 0x9b, 0x54, 0x25, 0x2e, 0xb5, 0x88, 0x27,
- 0x5d, 0x8f, 0x93, 0x2b, 0x9a, 0x26, 0x73, 0x69, 0x9d, 0x0b, 0xf1, 0x6d, 0xd8, 0xb4, 0xcf, 0x1f,
- 0x6a, 0x22, 0x25, 0x55, 0xc7, 0xa5, 0x43, 0xe3, 0xa9, 0xf4, 0x26, 0x8f, 0xef, 0x06, 0x13, 0xf0,
- 0x84, 0xec, 0x71, 0x18, 0xdf, 0x02, 0xa4, 0x79, 0x63, 0xe2, 0x3a, 0xbc, 0x26, 0xf0, 0x1c, 0xa2,
- 0x51, 0xe9, 0x2d, 0x41, 0x15, 0x78, 0x27, 0x84, 0xd9, 0x92, 0xf0, 0x9e, 0x18, 0x43, 0x3f, 0xb4,
- 0x78, 0x53, 0x2c, 0x09, 0x8e, 0x05, 0xd6, 0xf6, 0x00, 0xb1, 0x50, 0x24, 0x3a, 0xde, 0xe3, 0xb4,
- 0x8a, 0x33, 0x76, 0xe2, 0xfd, 0xbe, 0x01, 0xeb, 0x8c, 0x39, 0xeb, 0xf4, 0x96, 0xa8, 0x67, 0x9c,
- 0x71, 0xac, 0xc7, 0x1f, 0xad, 0xb4, 0xac, 0x1e, 0x42, 0x39, 0x9e, 0x9f, 0xb8, 0x08, 0x22, 0x43,
- 0x51, 0x8a, 0x9d, 0xf5, 0x8d, 0x6e, 0x93, 0x9d, 0xd2, 0x5f, 0xc8, 0x28, 0xcd, 0xaa, 0x85, 0x76,
- 0x6b, 0x20, 0xab, 0xca, 0x59, 0x67, 0xd0, 0x3a, 0x95, 0x51, 0x26, 0x56, 0x96, 0x9e, 0x64, 0x0b,
- 0x6f, 0xa3, 0x9b, 0xd5, 0xef, 0xd2, 0x50, 0x49, 0xde, 0x33, 0xf0, 0xcf, 0xe1, 0x6a, 0xf8, 0x28,
- 0xe0, 0x51, 0x5f, 0x7d, 0x62, 0xb8, 0x7c, 0xe1, 0x4c, 0x88, 0xa8, 0xb3, 0xa3, 0xa9, 0xdb, 0x0e,
- 0x58, 0x7d, 0xea, 0x7f, 0x6a, 0xb8, 0x6c, 0x59, 0x4c, 0x88, 0x8f, 0xdb, 0x70, 0xdd, 0xb2, 0x55,
- 0xcf, 0x27, 0x96, 0x4e, 0x5c, 0x5d, 0x9d, 0x3d, 0xc7, 0xa8, 0x44, 0xd3, 0xa8, 0xe7, 0xd9, 0xe2,
- 0xc0, 0x8a, 0xac, 0xbc, 0x6a, 0xd9, 0xfd, 0x80, 0x3c, 0xdb, 0xc9, 0xeb, 0x01, 0x75, 0x2e, 0xcd,
- 0x32, 0xab, 0xd2, 0xec, 0x15, 0x28, 0x4e, 0x88, 0xa3, 0x52, 0xcb, 0x77, 0x2f, 0x78, 0x75, 0x59,
- 0x50, 0x0a, 0x13, 0xe2, 0xc8, 0xac, 0xfd, 0x42, 0x8a, 0xfc, 0x93, 0x6c, 0xa1, 0x80, 0x8a, 0x27,
- 0xd9, 0x42, 0x11, 0x41, 0xf5, 0x5f, 0x19, 0x28, 0xc7, 0xab, 0x4d, 0x56, 0xbc, 0x6b, 0xfc, 0x64,
- 0x49, 0xf1, 0xbd, 0xe7, 0x8d, 0xef, 0xad, 0x4d, 0x6b, 0x0d, 0x76, 0xe4, 0x1c, 0xe6, 0x45, 0x0d,
- 0xa8, 0x08, 0x4d, 0x76, 0xdc, 0xb3, 0xdd, 0x86, 0x8a, 0x7b, 0x4d, 0x41, 0x09, 0x5a, 0xf8, 0x18,
- 0xf2, 0x0f, 0x3d, 0x6e, 0x3b, 0xcf, 0x6d, 0xbf, 0xf9, 0xfd, 0xb6, 0x4f, 0xfa, 0xdc, 0x78, 0xf1,
- 0xa4, 0xaf, 0x76, 0xba, 0xca, 0x69, 0xbd, 0xad, 0x04, 0xea, 0xf8, 0x1a, 0x64, 0x4d, 0xf2, 0xd5,
- 0x45, 0xf2, 0x70, 0xe2, 0xd0, 0x65, 0x27, 0xe1, 0x1a, 0x64, 0x9f, 0x50, 0xf2, 0x28, 0x79, 0x24,
- 0x70, 0xe8, 0x47, 0x5c, 0x0c, 0xfb, 0x90, 0xe3, 0xf1, 0xc2, 0x00, 0x41, 0xc4, 0xd0, 0x4b, 0xb8,
- 0x00, 0xd9, 0x46, 0x57, 0x61, 0x0b, 0x02, 0x41, 0x59, 0xa0, 0x6a, 0xaf, 0x25, 0x37, 0x64, 0x94,
- 0xae, 0xde, 0x85, 0xbc, 0x08, 0x02, 0x5b, 0x2c, 0x51, 0x18, 0xd0, 0x4b, 0x41, 0x33, 0xb0, 0x91,
- 0x0a, 0xa5, 0x67, 0xa7, 0x47, 0xb2, 0x82, 0xd2, 0xc9, 0xa9, 0xce, 0xa2, 0x5c, 0xd5, 0x83, 0x72,
- 0xbc, 0xdc, 0x7c, 0x31, 0x57, 0xc9, 0xbf, 0xa7, 0xa0, 0x14, 0x2b, 0x1f, 0x59, 0xe1, 0x42, 0x4c,
- 0xd3, 0x7e, 0xa2, 0x12, 0xd3, 0x20, 0x5e, 0x90, 0x1a, 0xc0, 0xa1, 0x3a, 0x43, 0x2e, 0x3b, 0x75,
- 0x2f, 0x68, 0x89, 0xe4, 0x50, 0xbe, 0xfa, 0x97, 0x14, 0xa0, 0xf9, 0x02, 0x74, 0xce, 0xcd, 0xd4,
- 0x4f, 0xe9, 0x66, 0xf5, 0xcf, 0x29, 0xa8, 0x24, 0xab, 0xce, 0x39, 0xf7, 0x6e, 0xfc, 0xa4, 0xee,
- 0xfd, 0x33, 0x0d, 0xeb, 0x89, 0x5a, 0xf3, 0xb2, 0xde, 0x7d, 0x09, 0x9b, 0x86, 0x4e, 0x27, 0x8e,
- 0xed, 0x53, 0x4b, 0xbb, 0x50, 0x4d, 0xfa, 0x98, 0x9a, 0x52, 0x95, 0x6f, 0x1a, 0xfb, 0xdf, 0x5f,
- 0xcd, 0xd6, 0x5a, 0x33, 0xbd, 0x36, 0x53, 0x3b, 0xdc, 0x6a, 0x35, 0xe5, 0xd3, 0x5e, 0x77, 0x20,
- 0x77, 0x1a, 0x9f, 0xab, 0x67, 0x9d, 0x5f, 0x75, 0xba, 0x9f, 0x76, 0x14, 0x64, 0xcc, 0xd1, 0x7e,
- 0xc4, 0x65, 0xdf, 0x03, 0x34, 0xef, 0x14, 0xbe, 0x0a, 0xcb, 0xdc, 0x42, 0x2f, 0xe1, 0x2d, 0xd8,
- 0xe8, 0x74, 0xd5, 0x7e, 0xab, 0x29, 0xab, 0xf2, 0x83, 0x07, 0x72, 0x63, 0xd0, 0x17, 0xd7, 0xfb,
- 0x88, 0x3d, 0x48, 0x2c, 0xf0, 0xea, 0x9f, 0x32, 0xb0, 0xb5, 0xc4, 0x13, 0x5c, 0x0f, 0x6e, 0x16,
- 0xe2, 0xb2, 0xf3, 0xee, 0x65, 0xbc, 0xaf, 0xb1, 0x82, 0xa0, 0x47, 0x5c, 0x3f, 0xb8, 0x88, 0xdc,
- 0x02, 0x16, 0x25, 0xcb, 0x37, 0x86, 0x06, 0x75, 0x83, 0xd7, 0x10, 0x71, 0xdd, 0xd8, 0x98, 0xe1,
- 0xe2, 0x41, 0xe4, 0x67, 0x80, 0x1d, 0xdb, 0x33, 0x7c, 0xe3, 0x31, 0x55, 0x0d, 0x2b, 0x7c, 0x3a,
- 0x61, 0xd7, 0x8f, 0xac, 0x82, 0x42, 0x49, 0xcb, 0xf2, 0x23, 0xb6, 0x45, 0x47, 0x64, 0x8e, 0xcd,
- 0x36, 0xf3, 0x8c, 0x82, 0x42, 0x49, 0xc4, 0xbe, 0x01, 0x65, 0xdd, 0x9e, 0xb2, 0x9a, 0x4c, 0xf0,
- 0xd8, 0xd9, 0x91, 0x52, 0x4a, 0x02, 0x8b, 0x28, 0x41, 0xb5, 0x3d, 0x7b, 0xb3, 0x29, 0x2b, 0x25,
- 0x81, 0x09, 0xca, 0x4d, 0xd8, 0x20, 0xa3, 0x91, 0xcb, 0x8c, 0x87, 0x86, 0xc4, 0xfd, 0xa1, 0x12,
- 0xc1, 0x9c, 0xb8, 0x73, 0x02, 0x85, 0x30, 0x0e, 0xec, 0xa8, 0x66, 0x91, 0x50, 0x1d, 0xf1, 0x6e,
- 0x97, 0xde, 0x2b, 0x2a, 0x05, 0x2b, 0x14, 0xde, 0x80, 0xb2, 0xe1, 0xa9, 0xb3, 0x27, 0xe8, 0xf4,
- 0x6e, 0x7a, 0xaf, 0xa0, 0x94, 0x0c, 0x2f, 0x7a, 0xbe, 0xab, 0x7e, 0x93, 0x86, 0x4a, 0xf2, 0x09,
- 0x1d, 0x37, 0xa1, 0x60, 0xda, 0x1a, 0xe1, 0xa9, 0x25, 0xbe, 0xdf, 0xec, 0x3d, 0xe7, 0xd5, 0xbd,
- 0xd6, 0x0e, 0xf8, 0x4a, 0xa4, 0xb9, 0xf3, 0x8f, 0x14, 0x14, 0x42, 0x18, 0x5f, 0x81, 0xac, 0x43,
- 0xfc, 0x31, 0x37, 0x97, 0x3b, 0x4a, 0xa3, 0x94, 0xc2, 0xdb, 0x0c, 0xf7, 0x1c, 0x62, 0xf1, 0x14,
- 0x08, 0x70, 0xd6, 0x66, 0xf3, 0x6a, 0x52, 0xa2, 0xf3, 0xcb, 0x89, 0x3d, 0x99, 0x50, 0xcb, 0xf7,
- 0xc2, 0x79, 0x0d, 0xf0, 0x46, 0x00, 0xe3, 0x77, 0x60, 0xd3, 0x77, 0x89, 0x61, 0x26, 0xb8, 0x59,
- 0xce, 0x45, 0xa1, 0x20, 0x22, 0x1f, 0xc2, 0xb5, 0xd0, 0xae, 0x4e, 0x7d, 0xa2, 0x8d, 0xa9, 0x3e,
- 0x53, 0xca, 0xf3, 0xf7, 0xd9, 0xab, 0x01, 0xa1, 0x19, 0xc8, 0x43, 0xdd, 0xea, 0x77, 0x29, 0xd8,
- 0x0c, 0xaf, 0x53, 0x7a, 0x14, 0xac, 0x53, 0x00, 0x62, 0x59, 0xb6, 0x1f, 0x0f, 0xd7, 0x62, 0x2a,
- 0x2f, 0xe8, 0xd5, 0xea, 0x91, 0x92, 0x12, 0x33, 0xb0, 0x33, 0x01, 0x98, 0x49, 0x56, 0x86, 0xed,
- 0x3a, 0x94, 0x82, 0xef, 0x23, 0xfc, 0x23, 0x9b, 0xb8, 0x80, 0x83, 0x80, 0xd8, 0xbd, 0x0b, 0x6f,
- 0x43, 0xee, 0x9c, 0x8e, 0x0c, 0x2b, 0x78, 0xf5, 0x14, 0x8d, 0xf0, 0x25, 0x37, 0x1b, 0xbd, 0xe4,
- 0x1e, 0xfd, 0x21, 0x05, 0x5b, 0x9a, 0x3d, 0x99, 0xf7, 0xf7, 0x08, 0xcd, 0xbd, 0x02, 0x78, 0x9f,
- 0xa4, 0xbe, 0xf8, 0x78, 0x64, 0xf8, 0xe3, 0xe9, 0x79, 0x4d, 0xb3, 0x27, 0xfb, 0x23, 0xdb, 0x24,
- 0xd6, 0x68, 0xf6, 0x95, 0x90, 0xff, 0xd1, 0xde, 0x1d, 0x51, 0xeb, 0xdd, 0x91, 0x1d, 0xfb, 0x66,
- 0xf8, 0xd1, 0xec, 0xef, 0xd7, 0xe9, 0xcc, 0x71, 0xef, 0xe8, 0xaf, 0xe9, 0x9d, 0x63, 0xd1, 0x57,
- 0x2f, 0x8c, 0x8d, 0x42, 0x87, 0x26, 0xd5, 0xd8, 0x78, 0xff, 0x17, 0x00, 0x00, 0xff, 0xff, 0x0c,
- 0xab, 0xb6, 0x37, 0x7e, 0x1c, 0x00, 0x00,
-}
diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.proto b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.proto
deleted file mode 100644
index 4d4fb378f50..00000000000
--- a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.proto
+++ /dev/null
@@ -1,849 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// Author: kenton@google.com (Kenton Varda)
-// Based on original Protocol Buffers design by
-// Sanjay Ghemawat, Jeff Dean, and others.
-//
-// The messages in this file describe the definitions found in .proto files.
-// A valid .proto file can be translated directly to a FileDescriptorProto
-// without any other information (e.g. without reading its imports).
-
-
-syntax = "proto2";
-
-package google.protobuf;
-option go_package = "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor";
-option java_package = "com.google.protobuf";
-option java_outer_classname = "DescriptorProtos";
-option csharp_namespace = "Google.Protobuf.Reflection";
-option objc_class_prefix = "GPB";
-
-// descriptor.proto must be optimized for speed because reflection-based
-// algorithms don't work during bootstrapping.
-option optimize_for = SPEED;
-
-// The protocol compiler can output a FileDescriptorSet containing the .proto
-// files it parses.
-message FileDescriptorSet {
- repeated FileDescriptorProto file = 1;
-}
-
-// Describes a complete .proto file.
-message FileDescriptorProto {
- optional string name = 1; // file name, relative to root of source tree
- optional string package = 2; // e.g. "foo", "foo.bar", etc.
-
- // Names of files imported by this file.
- repeated string dependency = 3;
- // Indexes of the public imported files in the dependency list above.
- repeated int32 public_dependency = 10;
- // Indexes of the weak imported files in the dependency list.
- // For Google-internal migration only. Do not use.
- repeated int32 weak_dependency = 11;
-
- // All top-level definitions in this file.
- repeated DescriptorProto message_type = 4;
- repeated EnumDescriptorProto enum_type = 5;
- repeated ServiceDescriptorProto service = 6;
- repeated FieldDescriptorProto extension = 7;
-
- optional FileOptions options = 8;
-
- // This field contains optional information about the original source code.
- // You may safely remove this entire field without harming runtime
- // functionality of the descriptors -- the information is needed only by
- // development tools.
- optional SourceCodeInfo source_code_info = 9;
-
- // The syntax of the proto file.
- // The supported values are "proto2" and "proto3".
- optional string syntax = 12;
-}
-
-// Describes a message type.
-message DescriptorProto {
- optional string name = 1;
-
- repeated FieldDescriptorProto field = 2;
- repeated FieldDescriptorProto extension = 6;
-
- repeated DescriptorProto nested_type = 3;
- repeated EnumDescriptorProto enum_type = 4;
-
- message ExtensionRange {
- optional int32 start = 1;
- optional int32 end = 2;
-
- optional ExtensionRangeOptions options = 3;
- }
- repeated ExtensionRange extension_range = 5;
-
- repeated OneofDescriptorProto oneof_decl = 8;
-
- optional MessageOptions options = 7;
-
- // Range of reserved tag numbers. Reserved tag numbers may not be used by
- // fields or extension ranges in the same message. Reserved ranges may
- // not overlap.
- message ReservedRange {
- optional int32 start = 1; // Inclusive.
- optional int32 end = 2; // Exclusive.
- }
- repeated ReservedRange reserved_range = 9;
- // Reserved field names, which may not be used by fields in the same message.
- // A given name may only be reserved once.
- repeated string reserved_name = 10;
-}
-
-message ExtensionRangeOptions {
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-}
-
-// Describes a field within a message.
-message FieldDescriptorProto {
- enum Type {
- // 0 is reserved for errors.
- // Order is weird for historical reasons.
- TYPE_DOUBLE = 1;
- TYPE_FLOAT = 2;
- // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
- // negative values are likely.
- TYPE_INT64 = 3;
- TYPE_UINT64 = 4;
- // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
- // negative values are likely.
- TYPE_INT32 = 5;
- TYPE_FIXED64 = 6;
- TYPE_FIXED32 = 7;
- TYPE_BOOL = 8;
- TYPE_STRING = 9;
- // Tag-delimited aggregate.
- // Group type is deprecated and not supported in proto3. However, Proto3
- // implementations should still be able to parse the group wire format and
- // treat group fields as unknown fields.
- TYPE_GROUP = 10;
- TYPE_MESSAGE = 11; // Length-delimited aggregate.
-
- // New in version 2.
- TYPE_BYTES = 12;
- TYPE_UINT32 = 13;
- TYPE_ENUM = 14;
- TYPE_SFIXED32 = 15;
- TYPE_SFIXED64 = 16;
- TYPE_SINT32 = 17; // Uses ZigZag encoding.
- TYPE_SINT64 = 18; // Uses ZigZag encoding.
- };
-
- enum Label {
- // 0 is reserved for errors
- LABEL_OPTIONAL = 1;
- LABEL_REQUIRED = 2;
- LABEL_REPEATED = 3;
- };
-
- optional string name = 1;
- optional int32 number = 3;
- optional Label label = 4;
-
- // If type_name is set, this need not be set. If both this and type_name
- // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
- optional Type type = 5;
-
- // For message and enum types, this is the name of the type. If the name
- // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
- // rules are used to find the type (i.e. first the nested types within this
- // message are searched, then within the parent, on up to the root
- // namespace).
- optional string type_name = 6;
-
- // For extensions, this is the name of the type being extended. It is
- // resolved in the same manner as type_name.
- optional string extendee = 2;
-
- // For numeric types, contains the original text representation of the value.
- // For booleans, "true" or "false".
- // For strings, contains the default text contents (not escaped in any way).
- // For bytes, contains the C escaped value. All bytes >= 128 are escaped.
- // TODO(kenton): Base-64 encode?
- optional string default_value = 7;
-
- // If set, gives the index of a oneof in the containing type's oneof_decl
- // list. This field is a member of that oneof.
- optional int32 oneof_index = 9;
-
- // JSON name of this field. The value is set by protocol compiler. If the
- // user has set a "json_name" option on this field, that option's value
- // will be used. Otherwise, it's deduced from the field's name by converting
- // it to camelCase.
- optional string json_name = 10;
-
- optional FieldOptions options = 8;
-}
-
-// Describes a oneof.
-message OneofDescriptorProto {
- optional string name = 1;
- optional OneofOptions options = 2;
-}
-
-// Describes an enum type.
-message EnumDescriptorProto {
- optional string name = 1;
-
- repeated EnumValueDescriptorProto value = 2;
-
- optional EnumOptions options = 3;
-}
-
-// Describes a value within an enum.
-message EnumValueDescriptorProto {
- optional string name = 1;
- optional int32 number = 2;
-
- optional EnumValueOptions options = 3;
-}
-
-// Describes a service.
-message ServiceDescriptorProto {
- optional string name = 1;
- repeated MethodDescriptorProto method = 2;
-
- optional ServiceOptions options = 3;
-}
-
-// Describes a method of a service.
-message MethodDescriptorProto {
- optional string name = 1;
-
- // Input and output type names. These are resolved in the same way as
- // FieldDescriptorProto.type_name, but must refer to a message type.
- optional string input_type = 2;
- optional string output_type = 3;
-
- optional MethodOptions options = 4;
-
- // Identifies if client streams multiple client messages
- optional bool client_streaming = 5 [default=false];
- // Identifies if server streams multiple server messages
- optional bool server_streaming = 6 [default=false];
-}
-
-
-// ===================================================================
-// Options
-
-// Each of the definitions above may have "options" attached. These are
-// just annotations which may cause code to be generated slightly differently
-// or may contain hints for code that manipulates protocol messages.
-//
-// Clients may define custom options as extensions of the *Options messages.
-// These extensions may not yet be known at parsing time, so the parser cannot
-// store the values in them. Instead it stores them in a field in the *Options
-// message called uninterpreted_option. This field must have the same name
-// across all *Options messages. We then use this field to populate the
-// extensions when we build a descriptor, at which point all protos have been
-// parsed and so all extensions are known.
-//
-// Extension numbers for custom options may be chosen as follows:
-// * For options which will only be used within a single application or
-// organization, or for experimental options, use field numbers 50000
-// through 99999. It is up to you to ensure that you do not use the
-// same number for multiple options.
-// * For options which will be published and used publicly by multiple
-// independent entities, e-mail protobuf-global-extension-registry@google.com
-// to reserve extension numbers. Simply provide your project name (e.g.
-// Objective-C plugin) and your project website (if available) -- there's no
-// need to explain how you intend to use them. Usually you only need one
-// extension number. You can declare multiple options with only one extension
-// number by putting them in a sub-message. See the Custom Options section of
-// the docs for examples:
-// https://developers.google.com/protocol-buffers/docs/proto#options
-// If this turns out to be popular, a web service will be set up
-// to automatically assign option numbers.
-
-
-message FileOptions {
-
- // Sets the Java package where classes generated from this .proto will be
- // placed. By default, the proto package is used, but this is often
- // inappropriate because proto packages do not normally start with backwards
- // domain names.
- optional string java_package = 1;
-
-
- // If set, all the classes from the .proto file are wrapped in a single
- // outer class with the given name. This applies to both Proto1
- // (equivalent to the old "--one_java_file" option) and Proto2 (where
- // a .proto always translates to a single class, but you may want to
- // explicitly choose the class name).
- optional string java_outer_classname = 8;
-
- // If set true, then the Java code generator will generate a separate .java
- // file for each top-level message, enum, and service defined in the .proto
- // file. Thus, these types will *not* be nested inside the outer class
- // named by java_outer_classname. However, the outer class will still be
- // generated to contain the file's getDescriptor() method as well as any
- // top-level extensions defined in the file.
- optional bool java_multiple_files = 10 [default=false];
-
- // This option does nothing.
- optional bool java_generate_equals_and_hash = 20 [deprecated=true];
-
- // If set true, then the Java2 code generator will generate code that
- // throws an exception whenever an attempt is made to assign a non-UTF-8
- // byte sequence to a string field.
- // Message reflection will do the same.
- // However, an extension field still accepts non-UTF-8 byte sequences.
- // This option has no effect on when used with the lite runtime.
- optional bool java_string_check_utf8 = 27 [default=false];
-
-
- // Generated classes can be optimized for speed or code size.
- enum OptimizeMode {
- SPEED = 1; // Generate complete code for parsing, serialization,
- // etc.
- CODE_SIZE = 2; // Use ReflectionOps to implement these methods.
- LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime.
- }
- optional OptimizeMode optimize_for = 9 [default=SPEED];
-
- // Sets the Go package where structs generated from this .proto will be
- // placed. If omitted, the Go package will be derived from the following:
- // - The basename of the package import path, if provided.
- // - Otherwise, the package statement in the .proto file, if present.
- // - Otherwise, the basename of the .proto file, without extension.
- optional string go_package = 11;
-
-
-
- // Should generic services be generated in each language? "Generic" services
- // are not specific to any particular RPC system. They are generated by the
- // main code generators in each language (without additional plugins).
- // Generic services were the only kind of service generation supported by
- // early versions of google.protobuf.
- //
- // Generic services are now considered deprecated in favor of using plugins
- // that generate code specific to your particular RPC system. Therefore,
- // these default to false. Old code which depends on generic services should
- // explicitly set them to true.
- optional bool cc_generic_services = 16 [default=false];
- optional bool java_generic_services = 17 [default=false];
- optional bool py_generic_services = 18 [default=false];
- optional bool php_generic_services = 42 [default=false];
-
- // Is this file deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for everything in the file, or it will be completely ignored; in the very
- // least, this is a formalization for deprecating files.
- optional bool deprecated = 23 [default=false];
-
- // Enables the use of arenas for the proto messages in this file. This applies
- // only to generated classes for C++.
- optional bool cc_enable_arenas = 31 [default=false];
-
-
- // Sets the objective c class prefix which is prepended to all objective c
- // generated classes from this .proto. There is no default.
- optional string objc_class_prefix = 36;
-
- // Namespace for generated classes; defaults to the package.
- optional string csharp_namespace = 37;
-
- // By default Swift generators will take the proto package and CamelCase it
- // replacing '.' with underscore and use that to prefix the types/symbols
- // defined. When this options is provided, they will use this value instead
- // to prefix the types/symbols defined.
- optional string swift_prefix = 39;
-
- // Sets the php class prefix which is prepended to all php generated classes
- // from this .proto. Default is empty.
- optional string php_class_prefix = 40;
-
- // Use this option to change the namespace of php generated classes. Default
- // is empty. When this option is empty, the package name will be used for
- // determining the namespace.
- optional string php_namespace = 41;
-
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-
- reserved 38;
-}
-
-message MessageOptions {
- // Set true to use the old proto1 MessageSet wire format for extensions.
- // This is provided for backwards-compatibility with the MessageSet wire
- // format. You should not use this for any other reason: It's less
- // efficient, has fewer features, and is more complicated.
- //
- // The message must be defined exactly as follows:
- // message Foo {
- // option message_set_wire_format = true;
- // extensions 4 to max;
- // }
- // Note that the message cannot have any defined fields; MessageSets only
- // have extensions.
- //
- // All extensions of your type must be singular messages; e.g. they cannot
- // be int32s, enums, or repeated messages.
- //
- // Because this is an option, the above two restrictions are not enforced by
- // the protocol compiler.
- optional bool message_set_wire_format = 1 [default=false];
-
- // Disables the generation of the standard "descriptor()" accessor, which can
- // conflict with a field of the same name. This is meant to make migration
- // from proto1 easier; new code should avoid fields named "descriptor".
- optional bool no_standard_descriptor_accessor = 2 [default=false];
-
- // Is this message deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the message, or it will be completely ignored; in the very least,
- // this is a formalization for deprecating messages.
- optional bool deprecated = 3 [default=false];
-
- // Whether the message is an automatically generated map entry type for the
- // maps field.
- //
- // For maps fields:
- // map map_field = 1;
- // The parsed descriptor looks like:
- // message MapFieldEntry {
- // option map_entry = true;
- // optional KeyType key = 1;
- // optional ValueType value = 2;
- // }
- // repeated MapFieldEntry map_field = 1;
- //
- // Implementations may choose not to generate the map_entry=true message, but
- // use a native map in the target language to hold the keys and values.
- // The reflection APIs in such implementions still need to work as
- // if the field is a repeated message field.
- //
- // NOTE: Do not set the option in .proto files. Always use the maps syntax
- // instead. The option should only be implicitly set by the proto compiler
- // parser.
- optional bool map_entry = 7;
-
- reserved 8; // javalite_serializable
- reserved 9; // javanano_as_lite
-
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-}
-
-message FieldOptions {
- // The ctype option instructs the C++ code generator to use a different
- // representation of the field than it normally would. See the specific
- // options below. This option is not yet implemented in the open source
- // release -- sorry, we'll try to include it in a future version!
- optional CType ctype = 1 [default = STRING];
- enum CType {
- // Default mode.
- STRING = 0;
-
- CORD = 1;
-
- STRING_PIECE = 2;
- }
- // The packed option can be enabled for repeated primitive fields to enable
- // a more efficient representation on the wire. Rather than repeatedly
- // writing the tag and type for each element, the entire array is encoded as
- // a single length-delimited blob. In proto3, only explicit setting it to
- // false will avoid using packed encoding.
- optional bool packed = 2;
-
- // The jstype option determines the JavaScript type used for values of the
- // field. The option is permitted only for 64 bit integral and fixed types
- // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
- // is represented as JavaScript string, which avoids loss of precision that
- // can happen when a large value is converted to a floating point JavaScript.
- // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
- // use the JavaScript "number" type. The behavior of the default option
- // JS_NORMAL is implementation dependent.
- //
- // This option is an enum to permit additional types to be added, e.g.
- // goog.math.Integer.
- optional JSType jstype = 6 [default = JS_NORMAL];
- enum JSType {
- // Use the default type.
- JS_NORMAL = 0;
-
- // Use JavaScript strings.
- JS_STRING = 1;
-
- // Use JavaScript numbers.
- JS_NUMBER = 2;
- }
-
- // Should this field be parsed lazily? Lazy applies only to message-type
- // fields. It means that when the outer message is initially parsed, the
- // inner message's contents will not be parsed but instead stored in encoded
- // form. The inner message will actually be parsed when it is first accessed.
- //
- // This is only a hint. Implementations are free to choose whether to use
- // eager or lazy parsing regardless of the value of this option. However,
- // setting this option true suggests that the protocol author believes that
- // using lazy parsing on this field is worth the additional bookkeeping
- // overhead typically needed to implement it.
- //
- // This option does not affect the public interface of any generated code;
- // all method signatures remain the same. Furthermore, thread-safety of the
- // interface is not affected by this option; const methods remain safe to
- // call from multiple threads concurrently, while non-const methods continue
- // to require exclusive access.
- //
- //
- // Note that implementations may choose not to check required fields within
- // a lazy sub-message. That is, calling IsInitialized() on the outer message
- // may return true even if the inner message has missing required fields.
- // This is necessary because otherwise the inner message would have to be
- // parsed in order to perform the check, defeating the purpose of lazy
- // parsing. An implementation which chooses not to check required fields
- // must be consistent about it. That is, for any particular sub-message, the
- // implementation must either *always* check its required fields, or *never*
- // check its required fields, regardless of whether or not the message has
- // been parsed.
- optional bool lazy = 5 [default=false];
-
- // Is this field deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for accessors, or it will be completely ignored; in the very least, this
- // is a formalization for deprecating fields.
- optional bool deprecated = 3 [default=false];
-
- // For Google-internal migration only. Do not use.
- optional bool weak = 10 [default=false];
-
-
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-
- reserved 4; // removed jtype
-}
-
-message OneofOptions {
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-}
-
-message EnumOptions {
-
- // Set this option to true to allow mapping different tag names to the same
- // value.
- optional bool allow_alias = 2;
-
- // Is this enum deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the enum, or it will be completely ignored; in the very least, this
- // is a formalization for deprecating enums.
- optional bool deprecated = 3 [default=false];
-
- reserved 5; // javanano_as_lite
-
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-}
-
-message EnumValueOptions {
- // Is this enum value deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the enum value, or it will be completely ignored; in the very least,
- // this is a formalization for deprecating enum values.
- optional bool deprecated = 1 [default=false];
-
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-}
-
-message ServiceOptions {
-
- // Note: Field numbers 1 through 32 are reserved for Google's internal RPC
- // framework. We apologize for hoarding these numbers to ourselves, but
- // we were already using them long before we decided to release Protocol
- // Buffers.
-
- // Is this service deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the service, or it will be completely ignored; in the very least,
- // this is a formalization for deprecating services.
- optional bool deprecated = 33 [default=false];
-
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-}
-
-message MethodOptions {
-
- // Note: Field numbers 1 through 32 are reserved for Google's internal RPC
- // framework. We apologize for hoarding these numbers to ourselves, but
- // we were already using them long before we decided to release Protocol
- // Buffers.
-
- // Is this method deprecated?
- // Depending on the target platform, this can emit Deprecated annotations
- // for the method, or it will be completely ignored; in the very least,
- // this is a formalization for deprecating methods.
- optional bool deprecated = 33 [default=false];
-
- // Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
- // or neither? HTTP based RPC implementation may choose GET verb for safe
- // methods, and PUT verb for idempotent methods instead of the default POST.
- enum IdempotencyLevel {
- IDEMPOTENCY_UNKNOWN = 0;
- NO_SIDE_EFFECTS = 1; // implies idempotent
- IDEMPOTENT = 2; // idempotent, but may have side effects
- }
- optional IdempotencyLevel idempotency_level =
- 34 [default=IDEMPOTENCY_UNKNOWN];
-
- // The parser stores options it doesn't recognize here. See above.
- repeated UninterpretedOption uninterpreted_option = 999;
-
- // Clients can define custom options in extensions of this message. See above.
- extensions 1000 to max;
-}
-
-
-// A message representing a option the parser does not recognize. This only
-// appears in options protos created by the compiler::Parser class.
-// DescriptorPool resolves these when building Descriptor objects. Therefore,
-// options protos in descriptor objects (e.g. returned by Descriptor::options(),
-// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
-// in them.
-message UninterpretedOption {
- // The name of the uninterpreted option. Each string represents a segment in
- // a dot-separated name. is_extension is true iff a segment represents an
- // extension (denoted with parentheses in options specs in .proto files).
- // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
- // "foo.(bar.baz).qux".
- message NamePart {
- required string name_part = 1;
- required bool is_extension = 2;
- }
- repeated NamePart name = 2;
-
- // The value of the uninterpreted option, in whatever type the tokenizer
- // identified it as during parsing. Exactly one of these should be set.
- optional string identifier_value = 3;
- optional uint64 positive_int_value = 4;
- optional int64 negative_int_value = 5;
- optional double double_value = 6;
- optional bytes string_value = 7;
- optional string aggregate_value = 8;
-}
-
-// ===================================================================
-// Optional source code info
-
-// Encapsulates information about the original source file from which a
-// FileDescriptorProto was generated.
-message SourceCodeInfo {
- // A Location identifies a piece of source code in a .proto file which
- // corresponds to a particular definition. This information is intended
- // to be useful to IDEs, code indexers, documentation generators, and similar
- // tools.
- //
- // For example, say we have a file like:
- // message Foo {
- // optional string foo = 1;
- // }
- // Let's look at just the field definition:
- // optional string foo = 1;
- // ^ ^^ ^^ ^ ^^^
- // a bc de f ghi
- // We have the following locations:
- // span path represents
- // [a,i) [ 4, 0, 2, 0 ] The whole field definition.
- // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
- // [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
- // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
- // [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
- //
- // Notes:
- // - A location may refer to a repeated field itself (i.e. not to any
- // particular index within it). This is used whenever a set of elements are
- // logically enclosed in a single code segment. For example, an entire
- // extend block (possibly containing multiple extension definitions) will
- // have an outer location whose path refers to the "extensions" repeated
- // field without an index.
- // - Multiple locations may have the same path. This happens when a single
- // logical declaration is spread out across multiple places. The most
- // obvious example is the "extend" block again -- there may be multiple
- // extend blocks in the same scope, each of which will have the same path.
- // - A location's span is not always a subset of its parent's span. For
- // example, the "extendee" of an extension declaration appears at the
- // beginning of the "extend" block and is shared by all extensions within
- // the block.
- // - Just because a location's span is a subset of some other location's span
- // does not mean that it is a descendent. For example, a "group" defines
- // both a type and a field in a single declaration. Thus, the locations
- // corresponding to the type and field and their components will overlap.
- // - Code which tries to interpret locations should probably be designed to
- // ignore those that it doesn't understand, as more types of locations could
- // be recorded in the future.
- repeated Location location = 1;
- message Location {
- // Identifies which part of the FileDescriptorProto was defined at this
- // location.
- //
- // Each element is a field number or an index. They form a path from
- // the root FileDescriptorProto to the place where the definition. For
- // example, this path:
- // [ 4, 3, 2, 7, 1 ]
- // refers to:
- // file.message_type(3) // 4, 3
- // .field(7) // 2, 7
- // .name() // 1
- // This is because FileDescriptorProto.message_type has field number 4:
- // repeated DescriptorProto message_type = 4;
- // and DescriptorProto.field has field number 2:
- // repeated FieldDescriptorProto field = 2;
- // and FieldDescriptorProto.name has field number 1:
- // optional string name = 1;
- //
- // Thus, the above path gives the location of a field name. If we removed
- // the last element:
- // [ 4, 3, 2, 7 ]
- // this path refers to the whole field declaration (from the beginning
- // of the label to the terminating semicolon).
- repeated int32 path = 1 [packed=true];
-
- // Always has exactly three or four elements: start line, start column,
- // end line (optional, otherwise assumed same as start line), end column.
- // These are packed into a single field for efficiency. Note that line
- // and column numbers are zero-based -- typically you will want to add
- // 1 to each before displaying to a user.
- repeated int32 span = 2 [packed=true];
-
- // If this SourceCodeInfo represents a complete declaration, these are any
- // comments appearing before and after the declaration which appear to be
- // attached to the declaration.
- //
- // A series of line comments appearing on consecutive lines, with no other
- // tokens appearing on those lines, will be treated as a single comment.
- //
- // leading_detached_comments will keep paragraphs of comments that appear
- // before (but not connected to) the current element. Each paragraph,
- // separated by empty lines, will be one comment element in the repeated
- // field.
- //
- // Only the comment content is provided; comment markers (e.g. //) are
- // stripped out. For block comments, leading whitespace and an asterisk
- // will be stripped from the beginning of each line other than the first.
- // Newlines are included in the output.
- //
- // Examples:
- //
- // optional int32 foo = 1; // Comment attached to foo.
- // // Comment attached to bar.
- // optional int32 bar = 2;
- //
- // optional string baz = 3;
- // // Comment attached to baz.
- // // Another line attached to baz.
- //
- // // Comment attached to qux.
- // //
- // // Another line attached to qux.
- // optional double qux = 4;
- //
- // // Detached comment for corge. This is not leading or trailing comments
- // // to qux or corge because there are blank lines separating it from
- // // both.
- //
- // // Detached comment for corge paragraph 2.
- //
- // optional string corge = 5;
- // /* Block comment attached
- // * to corge. Leading asterisks
- // * will be removed. */
- // /* Block comment attached to
- // * grault. */
- // optional int32 grault = 6;
- //
- // // ignored detached comments.
- optional string leading_comments = 3;
- optional string trailing_comments = 4;
- repeated string leading_detached_comments = 6;
- }
-}
-
-// Describes the relationship between generated code and its original source
-// file. A GeneratedCodeInfo message is associated with only one generated
-// source file, but may contain references to different source .proto files.
-message GeneratedCodeInfo {
- // An Annotation connects some span of text in generated code to an element
- // of its generating .proto file.
- repeated Annotation annotation = 1;
- message Annotation {
- // Identifies the element in the original source .proto file. This field
- // is formatted the same as SourceCodeInfo.Location.path.
- repeated int32 path = 1 [packed=true];
-
- // Identifies the filesystem path to the original source .proto.
- optional string source_file = 2;
-
- // Identifies the starting offset in bytes in the generated code
- // that relates to the identified object.
- optional int32 begin = 3;
-
- // Identifies the ending offset in bytes in the generated code that
- // relates to the identified offset. The end offset should be one past
- // the last relevant byte (so the length of the text = end - begin).
- optional int32 end = 4;
- }
-}
diff --git a/vendor/github.com/gopherjs/gopherjs/.gitignore b/vendor/github.com/gopherjs/gopherjs/.gitignore
new file mode 100644
index 00000000000..e0870976009
--- /dev/null
+++ b/vendor/github.com/gopherjs/gopherjs/.gitignore
@@ -0,0 +1,2 @@
+/node-syscall/build
+/node_modules
diff --git a/vendor/github.com/gopherjs/gopherjs/LICENSE b/vendor/github.com/gopherjs/gopherjs/LICENSE
new file mode 100644
index 00000000000..d496fef1092
--- /dev/null
+++ b/vendor/github.com/gopherjs/gopherjs/LICENSE
@@ -0,0 +1,24 @@
+Copyright (c) 2013 Richard Musiol. 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
+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/gopherjs/gopherjs/README.md b/vendor/github.com/gopherjs/gopherjs/README.md
new file mode 100644
index 00000000000..b10362e83e6
--- /dev/null
+++ b/vendor/github.com/gopherjs/gopherjs/README.md
@@ -0,0 +1,140 @@
+GopherJS - A compiler from Go to JavaScript
+-------------------------------------------
+
+[](https://sourcegraph.com/github.com/gopherjs/gopherjs?badge)
+[](https://circleci.com/gh/gopherjs/gopherjs)
+
+GopherJS compiles Go code ([golang.org](https://golang.org/)) to pure JavaScript code. Its main purpose is to give you the opportunity to write front-end code in Go which will still run in all browsers.
+
+### Playground
+Give GopherJS a try on the [GopherJS Playground](http://gopherjs.github.io/playground/).
+
+### What is supported?
+Nearly everything, including Goroutines ([compatibility table](https://github.com/gopherjs/gopherjs/blob/master/doc/packages.md)). Performance is quite good in most cases, see [HTML5 game engine benchmark](https://ajhager.github.io/engi/demos/botmark.html). Cgo is not supported. Using a vendored copy of GopherJS is currently not supported, see [#415](https://github.com/gopherjs/gopherjs/issues/415).
+
+### Installation and Usage
+Get or update GopherJS and dependencies with:
+
+```
+go get -u github.com/gopherjs/gopherjs
+```
+
+Now you can use `gopherjs build [package]`, `gopherjs build [files]` or `gopherjs install [package]` which behave similar to the `go` tool. For `main` packages, these commands create a `.js` file and `.js.map` source map in the current directory or in `$GOPATH/bin`. The generated JavaScript file can be used as usual in a website. Use `gopherjs help [command]` to get a list of possible command line flags, e.g. for minification and automatically watching for changes.
+
+*Note: GopherJS will try to write compiled object files of the core packages to your $GOROOT/pkg directory. If that fails, it will fall back to $GOPATH/pkg.*
+
+#### gopherjs run, gopherjs test
+
+If you want to use `gopherjs run` or `gopherjs test` to run the generated code locally, install Node.js 4.x (or newer), and the `source-map-support` module:
+
+```
+npm install --global source-map-support
+```
+
+For system calls (file system access, etc.), see [this page](https://github.com/gopherjs/gopherjs/blob/master/doc/syscalls.md).
+
+#### gopherjs serve
+
+`gopherjs serve` is a useful command you can use during development. It will start an HTTP server serving on ":8080" by default, then dynamically compile your Go packages with GopherJS and serve them.
+
+For example, navigating to `http://localhost:8080/example.com/user/project/` should compile and run the Go package `example.com/user/project`. The generated JavaScript output will be served at `http://localhost:8080/example.com/user/project/project.js` (the .js file name will be equal to the base directory name). If the directory contains `index.html` it will be served, otherwise a minimal `index.html` that includes `` will be provided, causing the JavaScript to be executed. All other static files will be served too.
+
+Refreshing in the browser will rebuild the served files if needed. Compilation errors will be displayed in terminal, and in browser console. Additionally, it will serve $GOROOT and $GOPATH for sourcemaps.
+
+If you include an argument, it will be the root from which everything is served. For example, if you run `gopherjs serve github.com/user/project` then the generated JavaScript for the package github.com/user/project/mypkg will be served at http://localhost:8080/mypkg/mypkg.js.
+
+### Performance Tips
+
+- Use the `-m` command line flag to generate minified code.
+- Apply gzip compression (https://en.wikipedia.org/wiki/HTTP_compression).
+- Use `int` instead of `(u)int8/16/32/64`.
+- Use `float64` instead of `float32`.
+
+### Community
+- [#gopherjs Channel on Gophers Slack](https://gophers.slack.com/messages/gopherjs/) (invites to Gophers Slack are available [here](http://blog.gopheracademy.com/gophers-slack-community/#how-can-i-be-invited-to-join:2facdc921b2310f18cb851c36fa92369))
+- [Bindings to JavaScript APIs and libraries](https://github.com/gopherjs/gopherjs/wiki/bindings)
+- [GopherJS Blog](https://medium.com/gopherjs)
+- [GopherJS on Twitter](https://twitter.com/GopherJS)
+
+### Getting started
+
+#### Interacting with the DOM
+The package `github.com/gopherjs/gopherjs/js` (see [documentation](https://godoc.org/github.com/gopherjs/gopherjs/js)) provides functions for interacting with native JavaScript APIs. For example the line
+
+```js
+document.write("Hello world!");
+```
+
+would look like this in Go:
+
+```go
+js.Global.Get("document").Call("write", "Hello world!")
+```
+
+You may also want use the [DOM bindings](http://dominik.honnef.co/go/js/dom), the [jQuery bindings](https://github.com/gopherjs/jquery) (see [TodoMVC Example](https://github.com/gopherjs/todomvc)) or the [AngularJS bindings](https://github.com/wvell/go-angularjs). Those are some of the [bindings to JavaScript APIs and libraries](https://github.com/gopherjs/gopherjs/wiki/bindings) by community members.
+
+#### Providing library functions for use in other JavaScript code
+Set a global variable to a map that contains the functions:
+
+```go
+package main
+
+import "github.com/gopherjs/gopherjs/js"
+
+func main() {
+ js.Global.Set("pet", map[string]interface{}{
+ "New": New,
+ })
+}
+
+type Pet struct {
+ name string
+}
+
+func New(name string) *js.Object {
+ return js.MakeWrapper(&Pet{name})
+}
+
+func (p *Pet) Name() string {
+ return p.name
+}
+
+func (p *Pet) SetName(name string) {
+ p.name = name
+}
+```
+
+For more details see [Jason Stone's blog post](http://legacytotheedge.blogspot.de/2014/03/gopherjs-go-to-javascript-transpiler.html) about GopherJS.
+
+### Architecture
+
+#### General
+GopherJS emulates a 32-bit environment. This means that `int`, `uint` and `uintptr` have a precision of 32 bits. However, the explicit 64-bit integer types `int64` and `uint64` are supported. The `GOARCH` value of GopherJS is "js". You may use it as a build constraint: `// +build js`.
+
+#### Application Lifecycle
+
+The `main` function is executed as usual after all `init` functions have run. JavaScript callbacks can also invoke Go functions, even after the `main` function has exited. Therefore the end of the `main` function should not be regarded as the end of the application and does not end the execution of other goroutines.
+
+In the browser, calling `os.Exit` (e.g. indirectly by `log.Fatal`) also does not terminate the execution of the program. For convenience, it calls `runtime.Goexit` to immediately terminate the calling goroutine.
+
+#### Goroutines
+Goroutines are fully supported by GopherJS. The only restriction is that you need to start a new goroutine if you want to use blocking code called from external JavaScript:
+
+```go
+js.Global.Get("myButton").Call("addEventListener", "click", func() {
+ go func() {
+ [...]
+ someBlockingFunction()
+ [...]
+ }()
+})
+```
+
+How it works:
+
+JavaScript has no concept of concurrency (except web workers, but those are too strictly separated to be used for goroutines). Because of that, instructions in JavaScript are never blocking. A blocking call would effectively freeze the responsiveness of your web page, so calls with callback arguments are used instead.
+
+GopherJS does some heavy lifting to work around this restriction: Whenever an instruction is blocking (e.g. communicating with a channel that isn't ready), the whole stack will unwind (= all functions return) and the goroutine will be put to sleep. Then another goroutine which is ready to resume gets picked and its stack with all local variables will be restored.
+
+### GopherJS Development
+If you're looking to make changes to the GopherJS compiler, see [Developer Guidelines](https://github.com/gopherjs/gopherjs/wiki/Developer-Guidelines) for additional developer information.
diff --git a/vendor/github.com/gopherjs/gopherjs/js/js.go b/vendor/github.com/gopherjs/gopherjs/js/js.go
new file mode 100644
index 00000000000..3fbf1d88c60
--- /dev/null
+++ b/vendor/github.com/gopherjs/gopherjs/js/js.go
@@ -0,0 +1,168 @@
+// Package js provides functions for interacting with native JavaScript APIs. Calls to these functions are treated specially by GopherJS and translated directly to their corresponding JavaScript syntax.
+//
+// Use MakeWrapper to expose methods to JavaScript. When passing values directly, the following type conversions are performed:
+//
+// | Go type | JavaScript type | Conversions back to interface{} |
+// | --------------------- | --------------------- | ------------------------------- |
+// | bool | Boolean | bool |
+// | integers and floats | Number | float64 |
+// | string | String | string |
+// | []int8 | Int8Array | []int8 |
+// | []int16 | Int16Array | []int16 |
+// | []int32, []int | Int32Array | []int |
+// | []uint8 | Uint8Array | []uint8 |
+// | []uint16 | Uint16Array | []uint16 |
+// | []uint32, []uint | Uint32Array | []uint |
+// | []float32 | Float32Array | []float32 |
+// | []float64 | Float64Array | []float64 |
+// | all other slices | Array | []interface{} |
+// | arrays | see slice type | see slice type |
+// | functions | Function | func(...interface{}) *js.Object |
+// | time.Time | Date | time.Time |
+// | - | instanceof Node | *js.Object |
+// | maps, structs | instanceof Object | map[string]interface{} |
+//
+// Additionally, for a struct containing a *js.Object field, only the content of the field will be passed to JavaScript and vice versa.
+package js
+
+// Object is a container for a native JavaScript object. Calls to its methods are treated specially by GopherJS and translated directly to their JavaScript syntax. A nil pointer to Object is equal to JavaScript's "null". Object can not be used as a map key.
+type Object struct{ object *Object }
+
+// Get returns the object's property with the given key.
+func (o *Object) Get(key string) *Object { return o.object.Get(key) }
+
+// Set assigns the value to the object's property with the given key.
+func (o *Object) Set(key string, value interface{}) { o.object.Set(key, value) }
+
+// Delete removes the object's property with the given key.
+func (o *Object) Delete(key string) { o.object.Delete(key) }
+
+// Length returns the object's "length" property, converted to int.
+func (o *Object) Length() int { return o.object.Length() }
+
+// Index returns the i'th element of an array.
+func (o *Object) Index(i int) *Object { return o.object.Index(i) }
+
+// SetIndex sets the i'th element of an array.
+func (o *Object) SetIndex(i int, value interface{}) { o.object.SetIndex(i, value) }
+
+// Call calls the object's method with the given name.
+func (o *Object) Call(name string, args ...interface{}) *Object { return o.object.Call(name, args...) }
+
+// Invoke calls the object itself. This will fail if it is not a function.
+func (o *Object) Invoke(args ...interface{}) *Object { return o.object.Invoke(args...) }
+
+// New creates a new instance of this type object. This will fail if it not a function (constructor).
+func (o *Object) New(args ...interface{}) *Object { return o.object.New(args...) }
+
+// Bool returns the object converted to bool according to JavaScript type conversions.
+func (o *Object) Bool() bool { return o.object.Bool() }
+
+// String returns the object converted to string according to JavaScript type conversions.
+func (o *Object) String() string { return o.object.String() }
+
+// Int returns the object converted to int according to JavaScript type conversions (parseInt).
+func (o *Object) Int() int { return o.object.Int() }
+
+// Int64 returns the object converted to int64 according to JavaScript type conversions (parseInt).
+func (o *Object) Int64() int64 { return o.object.Int64() }
+
+// Uint64 returns the object converted to uint64 according to JavaScript type conversions (parseInt).
+func (o *Object) Uint64() uint64 { return o.object.Uint64() }
+
+// Float returns the object converted to float64 according to JavaScript type conversions (parseFloat).
+func (o *Object) Float() float64 { return o.object.Float() }
+
+// Interface returns the object converted to interface{}. See table in package comment for details.
+func (o *Object) Interface() interface{} { return o.object.Interface() }
+
+// Unsafe returns the object as an uintptr, which can be converted via unsafe.Pointer. Not intended for public use.
+func (o *Object) Unsafe() uintptr { return o.object.Unsafe() }
+
+// Error encapsulates JavaScript errors. Those are turned into a Go panic and may be recovered, giving an *Error that holds the JavaScript error object.
+type Error struct {
+ *Object
+}
+
+// Error returns the message of the encapsulated JavaScript error object.
+func (err *Error) Error() string {
+ return "JavaScript error: " + err.Get("message").String()
+}
+
+// Stack returns the stack property of the encapsulated JavaScript error object.
+func (err *Error) Stack() string {
+ return err.Get("stack").String()
+}
+
+// Global gives JavaScript's global object ("window" for browsers and "GLOBAL" for Node.js).
+var Global *Object
+
+// Module gives the value of the "module" variable set by Node.js. Hint: Set a module export with 'js.Module.Get("exports").Set("exportName", ...)'.
+var Module *Object
+
+// Undefined gives the JavaScript value "undefined".
+var Undefined *Object
+
+// Debugger gets compiled to JavaScript's "debugger;" statement.
+func Debugger() {}
+
+// InternalObject returns the internal JavaScript object that represents i. Not intended for public use.
+func InternalObject(i interface{}) *Object {
+ return nil
+}
+
+// MakeFunc wraps a function and gives access to the values of JavaScript's "this" and "arguments" keywords.
+func MakeFunc(fn func(this *Object, arguments []*Object) interface{}) *Object {
+ return Global.Call("$makeFunc", InternalObject(fn))
+}
+
+// Keys returns the keys of the given JavaScript object.
+func Keys(o *Object) []string {
+ if o == nil || o == Undefined {
+ return nil
+ }
+ a := Global.Get("Object").Call("keys", o)
+ s := make([]string, a.Length())
+ for i := 0; i < a.Length(); i++ {
+ s[i] = a.Index(i).String()
+ }
+ return s
+}
+
+// MakeWrapper creates a JavaScript object which has wrappers for the exported methods of i. Use explicit getter and setter methods to expose struct fields to JavaScript.
+func MakeWrapper(i interface{}) *Object {
+ v := InternalObject(i)
+ o := Global.Get("Object").New()
+ o.Set("__internal_object__", v)
+ methods := v.Get("constructor").Get("methods")
+ for i := 0; i < methods.Length(); i++ {
+ m := methods.Index(i)
+ if m.Get("pkg").String() != "" { // not exported
+ continue
+ }
+ o.Set(m.Get("name").String(), func(args ...*Object) *Object {
+ return Global.Call("$externalizeFunction", v.Get(m.Get("prop").String()), m.Get("typ"), true).Call("apply", v, args)
+ })
+ }
+ return o
+}
+
+// NewArrayBuffer creates a JavaScript ArrayBuffer from a byte slice.
+func NewArrayBuffer(b []byte) *Object {
+ slice := InternalObject(b)
+ offset := slice.Get("$offset").Int()
+ length := slice.Get("$length").Int()
+ return slice.Get("$array").Get("buffer").Call("slice", offset, offset+length)
+}
+
+// M is a simple map type. It is intended as a shorthand for JavaScript objects (before conversion).
+type M map[string]interface{}
+
+// S is a simple slice type. It is intended as a shorthand for JavaScript arrays (before conversion).
+type S []interface{}
+
+func init() {
+ // avoid dead code elimination
+ e := Error{}
+ _ = e
+}
diff --git a/vendor/github.com/gopherjs/gopherjs/tool.go b/vendor/github.com/gopherjs/gopherjs/tool.go
new file mode 100644
index 00000000000..38f9cad5089
--- /dev/null
+++ b/vendor/github.com/gopherjs/gopherjs/tool.go
@@ -0,0 +1,941 @@
+package main
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "go/ast"
+ "go/build"
+ "go/doc"
+ "go/parser"
+ "go/scanner"
+ "go/token"
+ "go/types"
+ "io"
+ "io/ioutil"
+ "net"
+ "net/http"
+ "os"
+ "os/exec"
+ "path"
+ "path/filepath"
+ "runtime"
+ "sort"
+ "strconv"
+ "strings"
+ "syscall"
+ "text/template"
+ "time"
+ "unicode"
+ "unicode/utf8"
+
+ gbuild "github.com/gopherjs/gopherjs/build"
+ "github.com/gopherjs/gopherjs/compiler"
+ "github.com/gopherjs/gopherjs/internal/sysutil"
+ "github.com/kisielk/gotool"
+ "github.com/neelance/sourcemap"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+ "golang.org/x/crypto/ssh/terminal"
+)
+
+var currentDirectory string
+
+func init() {
+ var err error
+ currentDirectory, err = os.Getwd()
+ if err != nil {
+ fmt.Fprintln(os.Stderr, err)
+ os.Exit(1)
+ }
+ currentDirectory, err = filepath.EvalSymlinks(currentDirectory)
+ if err != nil {
+ fmt.Fprintln(os.Stderr, err)
+ os.Exit(1)
+ }
+ gopaths := filepath.SplitList(build.Default.GOPATH)
+ if len(gopaths) == 0 {
+ fmt.Fprintf(os.Stderr, "$GOPATH not set. For more details see: go help gopath\n")
+ os.Exit(1)
+ }
+}
+
+func main() {
+ var (
+ options = &gbuild.Options{CreateMapFile: true}
+ pkgObj string
+ tags string
+ )
+
+ flagVerbose := pflag.NewFlagSet("", 0)
+ flagVerbose.BoolVarP(&options.Verbose, "verbose", "v", false, "print the names of packages as they are compiled")
+ flagQuiet := pflag.NewFlagSet("", 0)
+ flagQuiet.BoolVarP(&options.Quiet, "quiet", "q", false, "suppress non-fatal warnings")
+
+ compilerFlags := pflag.NewFlagSet("", 0)
+ compilerFlags.BoolVarP(&options.Minify, "minify", "m", false, "minify generated code")
+ compilerFlags.BoolVar(&options.Color, "color", terminal.IsTerminal(int(os.Stderr.Fd())) && os.Getenv("TERM") != "dumb", "colored output")
+ compilerFlags.StringVar(&tags, "tags", "", "a list of build tags to consider satisfied during the build")
+ compilerFlags.BoolVar(&options.MapToLocalDisk, "localmap", false, "use local paths for sourcemap")
+
+ flagWatch := pflag.NewFlagSet("", 0)
+ flagWatch.BoolVarP(&options.Watch, "watch", "w", false, "watch for changes to the source files")
+
+ cmdBuild := &cobra.Command{
+ Use: "build [packages]",
+ Short: "compile packages and dependencies",
+ }
+ cmdBuild.Flags().StringVarP(&pkgObj, "output", "o", "", "output file")
+ cmdBuild.Flags().AddFlagSet(flagVerbose)
+ cmdBuild.Flags().AddFlagSet(flagQuiet)
+ cmdBuild.Flags().AddFlagSet(compilerFlags)
+ cmdBuild.Flags().AddFlagSet(flagWatch)
+ cmdBuild.Run = func(cmd *cobra.Command, args []string) {
+ options.BuildTags = strings.Fields(tags)
+ for {
+ s := gbuild.NewSession(options)
+
+ err := func() error {
+ // Handle "gopherjs build [files]" ad-hoc package mode.
+ if len(args) > 0 && (strings.HasSuffix(args[0], ".go") || strings.HasSuffix(args[0], ".inc.js")) {
+ for _, arg := range args {
+ if !strings.HasSuffix(arg, ".go") && !strings.HasSuffix(arg, ".inc.js") {
+ return fmt.Errorf("named files must be .go or .inc.js files")
+ }
+ }
+ if pkgObj == "" {
+ basename := filepath.Base(args[0])
+ pkgObj = basename[:len(basename)-3] + ".js"
+ }
+ names := make([]string, len(args))
+ for i, name := range args {
+ name = filepath.ToSlash(name)
+ names[i] = name
+ if s.Watcher != nil {
+ s.Watcher.Add(name)
+ }
+ }
+ err := s.BuildFiles(args, pkgObj, currentDirectory)
+ return err
+ }
+
+ // Expand import path patterns.
+ patternContext := gbuild.NewBuildContext("", options.BuildTags)
+ pkgs := (&gotool.Context{BuildContext: *patternContext}).ImportPaths(args)
+
+ for _, pkgPath := range pkgs {
+ if s.Watcher != nil {
+ pkg, err := gbuild.NewBuildContext(s.InstallSuffix(), options.BuildTags).Import(pkgPath, "", build.FindOnly)
+ if err != nil {
+ return err
+ }
+ s.Watcher.Add(pkg.Dir)
+ }
+ pkg, err := gbuild.Import(pkgPath, 0, s.InstallSuffix(), options.BuildTags)
+ if err != nil {
+ return err
+ }
+ archive, err := s.BuildPackage(pkg)
+ if err != nil {
+ return err
+ }
+ if len(pkgs) == 1 { // Only consider writing output if single package specified.
+ if pkgObj == "" {
+ pkgObj = filepath.Base(pkg.Dir) + ".js"
+ }
+ if pkg.IsCommand() && !pkg.UpToDate {
+ if err := s.WriteCommandPackage(archive, pkgObj); err != nil {
+ return err
+ }
+ }
+ }
+ }
+ return nil
+ }()
+ exitCode := handleError(err, options, nil)
+
+ if s.Watcher == nil {
+ os.Exit(exitCode)
+ }
+ s.WaitForChange()
+ }
+ }
+
+ cmdInstall := &cobra.Command{
+ Use: "install [packages]",
+ Short: "compile and install packages and dependencies",
+ }
+ cmdInstall.Flags().AddFlagSet(flagVerbose)
+ cmdInstall.Flags().AddFlagSet(flagQuiet)
+ cmdInstall.Flags().AddFlagSet(compilerFlags)
+ cmdInstall.Flags().AddFlagSet(flagWatch)
+ cmdInstall.Run = func(cmd *cobra.Command, args []string) {
+ options.BuildTags = strings.Fields(tags)
+ for {
+ s := gbuild.NewSession(options)
+
+ err := func() error {
+ // Expand import path patterns.
+ patternContext := gbuild.NewBuildContext("", options.BuildTags)
+ pkgs := (&gotool.Context{BuildContext: *patternContext}).ImportPaths(args)
+
+ if cmd.Name() == "get" {
+ goGet := exec.Command("go", append([]string{"get", "-d", "-tags=js"}, pkgs...)...)
+ goGet.Stdout = os.Stdout
+ goGet.Stderr = os.Stderr
+ if err := goGet.Run(); err != nil {
+ return err
+ }
+ }
+ for _, pkgPath := range pkgs {
+ pkg, err := gbuild.Import(pkgPath, 0, s.InstallSuffix(), options.BuildTags)
+ if s.Watcher != nil && pkg != nil { // add watch even on error
+ s.Watcher.Add(pkg.Dir)
+ }
+ if err != nil {
+ return err
+ }
+
+ archive, err := s.BuildPackage(pkg)
+ if err != nil {
+ return err
+ }
+
+ if pkg.IsCommand() && !pkg.UpToDate {
+ if err := s.WriteCommandPackage(archive, pkg.PkgObj); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ }()
+ exitCode := handleError(err, options, nil)
+
+ if s.Watcher == nil {
+ os.Exit(exitCode)
+ }
+ s.WaitForChange()
+ }
+ }
+
+ cmdDoc := &cobra.Command{
+ Use: "doc [arguments]",
+ Short: "display documentation for the requested, package, method or symbol",
+ }
+ cmdDoc.Run = func(cmd *cobra.Command, args []string) {
+ goDoc := exec.Command("go", append([]string{"doc"}, args...)...)
+ goDoc.Stdout = os.Stdout
+ goDoc.Stderr = os.Stderr
+ goDoc.Env = append(os.Environ(), "GOARCH=js")
+ err := goDoc.Run()
+ exitCode := handleError(err, options, nil)
+ os.Exit(exitCode)
+ }
+
+ cmdGet := &cobra.Command{
+ Use: "get [packages]",
+ Short: "download and install packages and dependencies",
+ }
+ cmdGet.Flags().AddFlagSet(flagVerbose)
+ cmdGet.Flags().AddFlagSet(flagQuiet)
+ cmdGet.Flags().AddFlagSet(compilerFlags)
+ cmdGet.Run = cmdInstall.Run
+
+ cmdRun := &cobra.Command{
+ Use: "run [gofiles...] [arguments...]",
+ Short: "compile and run Go program",
+ }
+ cmdRun.Flags().AddFlagSet(flagVerbose)
+ cmdRun.Flags().AddFlagSet(flagQuiet)
+ cmdRun.Flags().AddFlagSet(compilerFlags)
+ cmdRun.Run = func(cmd *cobra.Command, args []string) {
+ err := func() error {
+ lastSourceArg := 0
+ for {
+ if lastSourceArg == len(args) || !(strings.HasSuffix(args[lastSourceArg], ".go") || strings.HasSuffix(args[lastSourceArg], ".inc.js")) {
+ break
+ }
+ lastSourceArg++
+ }
+ if lastSourceArg == 0 {
+ return fmt.Errorf("gopherjs run: no go files listed")
+ }
+
+ tempfile, err := ioutil.TempFile(currentDirectory, filepath.Base(args[0])+".")
+ if err != nil && strings.HasPrefix(currentDirectory, runtime.GOROOT()) {
+ tempfile, err = ioutil.TempFile("", filepath.Base(args[0])+".")
+ }
+ if err != nil {
+ return err
+ }
+ defer func() {
+ tempfile.Close()
+ os.Remove(tempfile.Name())
+ os.Remove(tempfile.Name() + ".map")
+ }()
+ s := gbuild.NewSession(options)
+ if err := s.BuildFiles(args[:lastSourceArg], tempfile.Name(), currentDirectory); err != nil {
+ return err
+ }
+ if err := runNode(tempfile.Name(), args[lastSourceArg:], "", options.Quiet); err != nil {
+ return err
+ }
+ return nil
+ }()
+ exitCode := handleError(err, options, nil)
+
+ os.Exit(exitCode)
+ }
+
+ cmdTest := &cobra.Command{
+ Use: "test [packages]",
+ Short: "test packages",
+ }
+ bench := cmdTest.Flags().String("bench", "", "Run benchmarks matching the regular expression. By default, no benchmarks run. To run all benchmarks, use '--bench=.'.")
+ benchtime := cmdTest.Flags().String("benchtime", "", "Run enough iterations of each benchmark to take t, specified as a time.Duration (for example, -benchtime 1h30s). The default is 1 second (1s).")
+ count := cmdTest.Flags().String("count", "", "Run each test and benchmark n times (default 1). Examples are always run once.")
+ run := cmdTest.Flags().String("run", "", "Run only those tests and examples matching the regular expression.")
+ short := cmdTest.Flags().Bool("short", false, "Tell long-running tests to shorten their run time.")
+ verbose := cmdTest.Flags().BoolP("verbose", "v", false, "Log all tests as they are run. Also print all text from Log and Logf calls even if the test succeeds.")
+ compileOnly := cmdTest.Flags().BoolP("compileonly", "c", false, "Compile the test binary to pkg.test.js but do not run it (where pkg is the last element of the package's import path). The file name can be changed with the -o flag.")
+ outputFilename := cmdTest.Flags().StringP("output", "o", "", "Compile the test binary to the named file. The test still runs (unless -c is specified).")
+ cmdTest.Flags().AddFlagSet(compilerFlags)
+ cmdTest.Run = func(cmd *cobra.Command, args []string) {
+ options.BuildTags = strings.Fields(tags)
+ err := func() error {
+ // Expand import path patterns.
+ patternContext := gbuild.NewBuildContext("", options.BuildTags)
+ args = (&gotool.Context{BuildContext: *patternContext}).ImportPaths(args)
+
+ pkgs := make([]*gbuild.PackageData, len(args))
+ for i, pkgPath := range args {
+ var err error
+ pkgs[i], err = gbuild.Import(pkgPath, 0, "", options.BuildTags)
+ if err != nil {
+ return err
+ }
+ }
+
+ var exitErr error
+ for _, pkg := range pkgs {
+ if len(pkg.TestGoFiles) == 0 && len(pkg.XTestGoFiles) == 0 {
+ fmt.Printf("? \t%s\t[no test files]\n", pkg.ImportPath)
+ continue
+ }
+ s := gbuild.NewSession(options)
+
+ tests := &testFuncs{Package: pkg.Package}
+ collectTests := func(testPkg *gbuild.PackageData, testPkgName string, needVar *bool) error {
+ if testPkgName == "_test" {
+ for _, file := range pkg.TestGoFiles {
+ if err := tests.load(filepath.Join(pkg.Package.Dir, file), testPkgName, &tests.ImportTest, &tests.NeedTest); err != nil {
+ return err
+ }
+ }
+ } else {
+ for _, file := range pkg.XTestGoFiles {
+ if err := tests.load(filepath.Join(pkg.Package.Dir, file), "_xtest", &tests.ImportXtest, &tests.NeedXtest); err != nil {
+ return err
+ }
+ }
+ }
+ _, err := s.BuildPackage(testPkg)
+ return err
+ }
+
+ if err := collectTests(&gbuild.PackageData{
+ Package: &build.Package{
+ ImportPath: pkg.ImportPath,
+ Dir: pkg.Dir,
+ GoFiles: append(pkg.GoFiles, pkg.TestGoFiles...),
+ Imports: append(pkg.Imports, pkg.TestImports...),
+ },
+ IsTest: true,
+ JSFiles: pkg.JSFiles,
+ }, "_test", &tests.NeedTest); err != nil {
+ return err
+ }
+
+ if err := collectTests(&gbuild.PackageData{
+ Package: &build.Package{
+ ImportPath: pkg.ImportPath + "_test",
+ Dir: pkg.Dir,
+ GoFiles: pkg.XTestGoFiles,
+ Imports: pkg.XTestImports,
+ },
+ IsTest: true,
+ }, "_xtest", &tests.NeedXtest); err != nil {
+ return err
+ }
+
+ buf := new(bytes.Buffer)
+ if err := testmainTmpl.Execute(buf, tests); err != nil {
+ return err
+ }
+
+ fset := token.NewFileSet()
+ mainFile, err := parser.ParseFile(fset, "_testmain.go", buf, 0)
+ if err != nil {
+ return err
+ }
+
+ importContext := &compiler.ImportContext{
+ Packages: s.Types,
+ Import: func(path string) (*compiler.Archive, error) {
+ if path == pkg.ImportPath || path == pkg.ImportPath+"_test" {
+ return s.Archives[path], nil
+ }
+ return s.BuildImportPath(path)
+ },
+ }
+ mainPkgArchive, err := compiler.Compile("main", []*ast.File{mainFile}, fset, importContext, options.Minify)
+ if err != nil {
+ return err
+ }
+
+ if *compileOnly && *outputFilename == "" {
+ *outputFilename = pkg.Package.Name + "_test.js"
+ }
+
+ var outfile *os.File
+ if *outputFilename != "" {
+ outfile, err = os.Create(*outputFilename)
+ if err != nil {
+ return err
+ }
+ } else {
+ outfile, err = ioutil.TempFile(currentDirectory, "test.")
+ if err != nil {
+ return err
+ }
+ }
+ defer func() {
+ outfile.Close()
+ if *outputFilename == "" {
+ os.Remove(outfile.Name())
+ os.Remove(outfile.Name() + ".map")
+ }
+ }()
+
+ if err := s.WriteCommandPackage(mainPkgArchive, outfile.Name()); err != nil {
+ return err
+ }
+
+ if *compileOnly {
+ continue
+ }
+
+ var args []string
+ if *bench != "" {
+ args = append(args, "-test.bench", *bench)
+ }
+ if *benchtime != "" {
+ args = append(args, "-test.benchtime", *benchtime)
+ }
+ if *count != "" {
+ args = append(args, "-test.count", *count)
+ }
+ if *run != "" {
+ args = append(args, "-test.run", *run)
+ }
+ if *short {
+ args = append(args, "-test.short")
+ }
+ if *verbose {
+ args = append(args, "-test.v")
+ }
+ status := "ok "
+ start := time.Now()
+ if err := runNode(outfile.Name(), args, pkg.Dir, options.Quiet); err != nil {
+ if _, ok := err.(*exec.ExitError); !ok {
+ return err
+ }
+ exitErr = err
+ status = "FAIL"
+ }
+ fmt.Printf("%s\t%s\t%.3fs\n", status, pkg.ImportPath, time.Since(start).Seconds())
+ }
+ return exitErr
+ }()
+ exitCode := handleError(err, options, nil)
+
+ os.Exit(exitCode)
+ }
+
+ cmdServe := &cobra.Command{
+ Use: "serve [root]",
+ Short: "compile on-the-fly and serve",
+ }
+ cmdServe.Flags().AddFlagSet(flagVerbose)
+ cmdServe.Flags().AddFlagSet(flagQuiet)
+ cmdServe.Flags().AddFlagSet(compilerFlags)
+ var addr string
+ cmdServe.Flags().StringVarP(&addr, "http", "", ":8080", "HTTP bind address to serve")
+ cmdServe.Run = func(cmd *cobra.Command, args []string) {
+ options.BuildTags = strings.Fields(tags)
+ dirs := append(filepath.SplitList(build.Default.GOPATH), build.Default.GOROOT)
+ var root string
+
+ if len(args) > 1 {
+ cmdServe.HelpFunc()(cmd, args)
+ os.Exit(1)
+ }
+
+ if len(args) == 1 {
+ root = args[0]
+ }
+
+ sourceFiles := http.FileServer(serveCommandFileSystem{
+ serveRoot: root,
+ options: options,
+ dirs: dirs,
+ sourceMaps: make(map[string][]byte),
+ })
+
+ ln, err := net.Listen("tcp", addr)
+ if err != nil {
+ fmt.Fprintln(os.Stderr, err)
+ os.Exit(1)
+ }
+ if tcpAddr := ln.Addr().(*net.TCPAddr); tcpAddr.IP.Equal(net.IPv4zero) || tcpAddr.IP.Equal(net.IPv6zero) { // Any available addresses.
+ fmt.Printf("serving at http://localhost:%d and on port %d of any available addresses\n", tcpAddr.Port, tcpAddr.Port)
+ } else { // Specific address.
+ fmt.Printf("serving at http://%s\n", tcpAddr)
+ }
+ fmt.Fprintln(os.Stderr, http.Serve(tcpKeepAliveListener{ln.(*net.TCPListener)}, sourceFiles))
+ }
+
+ cmdVersion := &cobra.Command{
+ Use: "version",
+ Short: "print GopherJS compiler version",
+ }
+ cmdVersion.Run = func(cmd *cobra.Command, args []string) {
+ if len(args) > 0 {
+ cmdServe.HelpFunc()(cmd, args)
+ os.Exit(1)
+ }
+
+ fmt.Printf("GopherJS %s\n", compiler.Version)
+ }
+
+ rootCmd := &cobra.Command{
+ Use: "gopherjs",
+ Long: "GopherJS is a tool for compiling Go source code to JavaScript.",
+ }
+ rootCmd.AddCommand(cmdBuild, cmdGet, cmdInstall, cmdRun, cmdTest, cmdServe, cmdVersion, cmdDoc)
+ err := rootCmd.Execute()
+ if err != nil {
+ os.Exit(2)
+ }
+}
+
+// tcpKeepAliveListener sets TCP keep-alive timeouts on accepted
+// connections. It's used by ListenAndServe and ListenAndServeTLS so
+// dead TCP connections (e.g. closing laptop mid-download) eventually
+// go away.
+type tcpKeepAliveListener struct {
+ *net.TCPListener
+}
+
+func (ln tcpKeepAliveListener) Accept() (c net.Conn, err error) {
+ tc, err := ln.AcceptTCP()
+ if err != nil {
+ return
+ }
+ tc.SetKeepAlive(true)
+ tc.SetKeepAlivePeriod(3 * time.Minute)
+ return tc, nil
+}
+
+type serveCommandFileSystem struct {
+ serveRoot string
+ options *gbuild.Options
+ dirs []string
+ sourceMaps map[string][]byte
+}
+
+func (fs serveCommandFileSystem) Open(requestName string) (http.File, error) {
+ name := path.Join(fs.serveRoot, requestName[1:]) // requestName[0] == '/'
+
+ dir, file := path.Split(name)
+ base := path.Base(dir) // base is parent folder name, which becomes the output file name.
+
+ isPkg := file == base+".js"
+ isMap := file == base+".js.map"
+ isIndex := file == "index.html"
+
+ if isPkg || isMap || isIndex {
+ // If we're going to be serving our special files, make sure there's a Go command in this folder.
+ s := gbuild.NewSession(fs.options)
+ pkg, err := gbuild.Import(path.Dir(name), 0, s.InstallSuffix(), fs.options.BuildTags)
+ if err != nil || pkg.Name != "main" {
+ isPkg = false
+ isMap = false
+ isIndex = false
+ }
+
+ switch {
+ case isPkg:
+ buf := new(bytes.Buffer)
+ browserErrors := new(bytes.Buffer)
+ err := func() error {
+ archive, err := s.BuildPackage(pkg)
+ if err != nil {
+ return err
+ }
+
+ sourceMapFilter := &compiler.SourceMapFilter{Writer: buf}
+ m := &sourcemap.Map{File: base + ".js"}
+ sourceMapFilter.MappingCallback = gbuild.NewMappingCallback(m, fs.options.GOROOT, fs.options.GOPATH, fs.options.MapToLocalDisk)
+
+ deps, err := compiler.ImportDependencies(archive, s.BuildImportPath)
+ if err != nil {
+ return err
+ }
+ if err := compiler.WriteProgramCode(deps, sourceMapFilter); err != nil {
+ return err
+ }
+
+ mapBuf := new(bytes.Buffer)
+ m.WriteTo(mapBuf)
+ buf.WriteString("//# sourceMappingURL=" + base + ".js.map\n")
+ fs.sourceMaps[name+".map"] = mapBuf.Bytes()
+
+ return nil
+ }()
+ handleError(err, fs.options, browserErrors)
+ if err != nil {
+ buf = browserErrors
+ }
+ return newFakeFile(base+".js", buf.Bytes()), nil
+
+ case isMap:
+ if content, ok := fs.sourceMaps[name]; ok {
+ return newFakeFile(base+".js.map", content), nil
+ }
+ }
+ }
+
+ for _, d := range fs.dirs {
+ dir := http.Dir(filepath.Join(d, "src"))
+
+ f, err := dir.Open(name)
+ if err == nil {
+ return f, nil
+ }
+
+ // source maps are served outside of serveRoot
+ f, err = dir.Open(requestName)
+ if err == nil {
+ return f, nil
+ }
+ }
+
+ if isIndex {
+ // If there was no index.html file in any dirs, supply our own.
+ return newFakeFile("index.html", []byte(``)), nil
+ }
+
+ return nil, os.ErrNotExist
+}
+
+type fakeFile struct {
+ name string
+ size int
+ io.ReadSeeker
+}
+
+func newFakeFile(name string, content []byte) *fakeFile {
+ return &fakeFile{name: name, size: len(content), ReadSeeker: bytes.NewReader(content)}
+}
+
+func (f *fakeFile) Close() error {
+ return nil
+}
+
+func (f *fakeFile) Readdir(count int) ([]os.FileInfo, error) {
+ return nil, os.ErrInvalid
+}
+
+func (f *fakeFile) Stat() (os.FileInfo, error) {
+ return f, nil
+}
+
+func (f *fakeFile) Name() string {
+ return f.name
+}
+
+func (f *fakeFile) Size() int64 {
+ return int64(f.size)
+}
+
+func (f *fakeFile) Mode() os.FileMode {
+ return 0
+}
+
+func (f *fakeFile) ModTime() time.Time {
+ return time.Time{}
+}
+
+func (f *fakeFile) IsDir() bool {
+ return false
+}
+
+func (f *fakeFile) Sys() interface{} {
+ return nil
+}
+
+// handleError handles err and returns an appropriate exit code.
+// If browserErrors is non-nil, errors are written for presentation in browser.
+func handleError(err error, options *gbuild.Options, browserErrors *bytes.Buffer) int {
+ switch err := err.(type) {
+ case nil:
+ return 0
+ case compiler.ErrorList:
+ for _, entry := range err {
+ printError(entry, options, browserErrors)
+ }
+ return 1
+ case *exec.ExitError:
+ return err.Sys().(syscall.WaitStatus).ExitStatus()
+ default:
+ printError(err, options, browserErrors)
+ return 1
+ }
+}
+
+// printError prints err to Stderr with options. If browserErrors is non-nil, errors are also written for presentation in browser.
+func printError(err error, options *gbuild.Options, browserErrors *bytes.Buffer) {
+ e := sprintError(err)
+ options.PrintError("%s\n", e)
+ if browserErrors != nil {
+ fmt.Fprintln(browserErrors, `console.error("`+template.JSEscapeString(e)+`");`)
+ }
+}
+
+// sprintError returns an annotated error string without trailing newline.
+func sprintError(err error) string {
+ makeRel := func(name string) string {
+ if relname, err := filepath.Rel(currentDirectory, name); err == nil {
+ return relname
+ }
+ return name
+ }
+
+ switch e := err.(type) {
+ case *scanner.Error:
+ return fmt.Sprintf("%s:%d:%d: %s", makeRel(e.Pos.Filename), e.Pos.Line, e.Pos.Column, e.Msg)
+ case types.Error:
+ pos := e.Fset.Position(e.Pos)
+ return fmt.Sprintf("%s:%d:%d: %s", makeRel(pos.Filename), pos.Line, pos.Column, e.Msg)
+ default:
+ return fmt.Sprintf("%s", e)
+ }
+}
+
+func runNode(script string, args []string, dir string, quiet bool) error {
+ var allArgs []string
+ if b, _ := strconv.ParseBool(os.Getenv("SOURCE_MAP_SUPPORT")); os.Getenv("SOURCE_MAP_SUPPORT") == "" || b {
+ allArgs = []string{"--require", "source-map-support/register"}
+ if err := exec.Command("node", "--require", "source-map-support/register", "--eval", "").Run(); err != nil {
+ if !quiet {
+ fmt.Fprintln(os.Stderr, "gopherjs: Source maps disabled. Install source-map-support module for nice stack traces. See https://github.com/gopherjs/gopherjs#gopherjs-run-gopherjs-test.")
+ }
+ allArgs = []string{}
+ }
+ }
+
+ if runtime.GOOS != "windows" {
+ // We've seen issues with stack space limits causing
+ // recursion-heavy standard library tests to fail (e.g., see
+ // https://github.com/gopherjs/gopherjs/pull/669#issuecomment-319319483).
+ //
+ // There are two separate limits in non-Windows environments:
+ //
+ // - OS process limit
+ // - Node.js (V8) limit
+ //
+ // GopherJS fetches the current OS process limit, and sets the
+ // Node.js limit to the same value. So both limits are kept in sync
+ // and can be controlled by setting OS process limit. E.g.:
+ //
+ // ulimit -s 10000 && gopherjs test
+ //
+ cur, err := sysutil.RlimitStack()
+ if err != nil {
+ return fmt.Errorf("failed to get stack size limit: %v", err)
+ }
+ allArgs = append(allArgs, fmt.Sprintf("--stack_size=%v", cur/1000)) // Convert from bytes to KB.
+ }
+
+ allArgs = append(allArgs, script)
+ allArgs = append(allArgs, args...)
+
+ node := exec.Command("node", allArgs...)
+ node.Dir = dir
+ node.Stdin = os.Stdin
+ node.Stdout = os.Stdout
+ node.Stderr = os.Stderr
+ err := node.Run()
+ if _, ok := err.(*exec.ExitError); err != nil && !ok {
+ err = fmt.Errorf("could not run Node.js: %s", err.Error())
+ }
+ return err
+}
+
+type testFuncs struct {
+ Tests []testFunc
+ Benchmarks []testFunc
+ Examples []testFunc
+ TestMain *testFunc
+ Package *build.Package
+ ImportTest bool
+ NeedTest bool
+ ImportXtest bool
+ NeedXtest bool
+}
+
+type testFunc struct {
+ Package string // imported package name (_test or _xtest)
+ Name string // function name
+ Output string // output, for examples
+ Unordered bool // output is allowed to be unordered.
+}
+
+var testFileSet = token.NewFileSet()
+
+func (t *testFuncs) load(filename, pkg string, doImport, seen *bool) error {
+ f, err := parser.ParseFile(testFileSet, filename, nil, parser.ParseComments)
+ if err != nil {
+ return err
+ }
+ for _, d := range f.Decls {
+ n, ok := d.(*ast.FuncDecl)
+ if !ok {
+ continue
+ }
+ if n.Recv != nil {
+ continue
+ }
+ name := n.Name.String()
+ switch {
+ case isTestMain(n):
+ if t.TestMain != nil {
+ return errors.New("multiple definitions of TestMain")
+ }
+ t.TestMain = &testFunc{pkg, name, "", false}
+ *doImport, *seen = true, true
+ case isTest(name, "Test"):
+ t.Tests = append(t.Tests, testFunc{pkg, name, "", false})
+ *doImport, *seen = true, true
+ case isTest(name, "Benchmark"):
+ t.Benchmarks = append(t.Benchmarks, testFunc{pkg, name, "", false})
+ *doImport, *seen = true, true
+ }
+ }
+ ex := doc.Examples(f)
+ sort.Sort(byOrder(ex))
+ for _, e := range ex {
+ *doImport = true // import test file whether executed or not
+ if e.Output == "" && !e.EmptyOutput {
+ // Don't run examples with no output.
+ continue
+ }
+ t.Examples = append(t.Examples, testFunc{pkg, "Example" + e.Name, e.Output, e.Unordered})
+ *seen = true
+ }
+
+ return nil
+}
+
+type byOrder []*doc.Example
+
+func (x byOrder) Len() int { return len(x) }
+func (x byOrder) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
+func (x byOrder) Less(i, j int) bool { return x[i].Order < x[j].Order }
+
+// isTestMain tells whether fn is a TestMain(m *testing.M) function.
+func isTestMain(fn *ast.FuncDecl) bool {
+ if fn.Name.String() != "TestMain" ||
+ fn.Type.Results != nil && len(fn.Type.Results.List) > 0 ||
+ fn.Type.Params == nil ||
+ len(fn.Type.Params.List) != 1 ||
+ len(fn.Type.Params.List[0].Names) > 1 {
+ return false
+ }
+ ptr, ok := fn.Type.Params.List[0].Type.(*ast.StarExpr)
+ if !ok {
+ return false
+ }
+ // We can't easily check that the type is *testing.M
+ // because we don't know how testing has been imported,
+ // but at least check that it's *M or *something.M.
+ if name, ok := ptr.X.(*ast.Ident); ok && name.Name == "M" {
+ return true
+ }
+ if sel, ok := ptr.X.(*ast.SelectorExpr); ok && sel.Sel.Name == "M" {
+ return true
+ }
+ return false
+}
+
+// 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
+ }
+ rune, _ := utf8.DecodeRuneInString(name[len(prefix):])
+ return !unicode.IsLower(rune)
+}
+
+var testmainTmpl = template.Must(template.New("main").Parse(`
+package main
+
+import (
+{{if not .TestMain}}
+ "os"
+{{end}}
+ "testing"
+ "testing/internal/testdeps"
+
+{{if .ImportTest}}
+ {{if .NeedTest}}_test{{else}}_{{end}} {{.Package.ImportPath | printf "%q"}}
+{{end}}
+{{if .ImportXtest}}
+ {{if .NeedXtest}}_xtest{{else}}_{{end}} {{.Package.ImportPath | printf "%s_test" | printf "%q"}}
+{{end}}
+)
+
+var tests = []testing.InternalTest{
+{{range .Tests}}
+ {"{{.Name}}", {{.Package}}.{{.Name}}},
+{{end}}
+}
+
+var benchmarks = []testing.InternalBenchmark{
+{{range .Benchmarks}}
+ {"{{.Name}}", {{.Package}}.{{.Name}}},
+{{end}}
+}
+
+var examples = []testing.InternalExample{
+{{range .Examples}}
+ {"{{.Name}}", {{.Package}}.{{.Name}}, {{.Output | printf "%q"}}, {{.Unordered}}},
+{{end}}
+}
+
+func main() {
+ m := testing.MainStart(testdeps.TestDeps{}, tests, benchmarks, examples)
+{{with .TestMain}}
+ {{.Package}}.{{.Name}}(m)
+{{else}}
+ os.Exit(m.Run())
+{{end}}
+}
+
+`))
diff --git a/vendor/github.com/gorilla/websocket/.gitignore b/vendor/github.com/gorilla/websocket/.gitignore
new file mode 100644
index 00000000000..ac710204fa1
--- /dev/null
+++ b/vendor/github.com/gorilla/websocket/.gitignore
@@ -0,0 +1,25 @@
+# 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
\ No newline at end of file
diff --git a/vendor/github.com/gorilla/websocket/client.go b/vendor/github.com/gorilla/websocket/client.go
index 78d932877b5..43a87c753bf 100644
--- a/vendor/github.com/gorilla/websocket/client.go
+++ b/vendor/github.com/gorilla/websocket/client.go
@@ -66,8 +66,9 @@ type Dialer struct {
// HandshakeTimeout specifies the duration for the handshake to complete.
HandshakeTimeout time.Duration
- // Input and output buffer sizes. If the buffer size is zero, then a
- // default value of 4096 is used.
+ // ReadBufferSize and WriteBufferSize specify I/O buffer sizes. 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
// Subprotocols specifies the client's requested subprotocols.
@@ -368,7 +369,7 @@ func (d *Dialer) Dial(urlStr string, requestHeader http.Header) (*Conn, *http.Re
return nil, resp, ErrBadHandshake
}
- for _, ext := range parseExtensions(req.Header) {
+ for _, ext := range parseExtensions(resp.Header) {
if ext[""] != "permessage-deflate" {
continue
}
@@ -389,32 +390,3 @@ func (d *Dialer) Dial(urlStr string, requestHeader http.Header) (*Conn, *http.Re
netConn = nil // to avoid close in defer.
return conn, resp, nil
}
-
-// cloneTLSConfig clones all public fields except the fields
-// SessionTicketsDisabled and SessionTicketKey. This avoids copying the
-// sync.Mutex in the sync.Once and makes it safe to call cloneTLSConfig on a
-// config in active use.
-func cloneTLSConfig(cfg *tls.Config) *tls.Config {
- if cfg == nil {
- return &tls.Config{}
- }
- return &tls.Config{
- Rand: cfg.Rand,
- Time: cfg.Time,
- Certificates: cfg.Certificates,
- NameToCertificate: cfg.NameToCertificate,
- GetCertificate: cfg.GetCertificate,
- RootCAs: cfg.RootCAs,
- NextProtos: cfg.NextProtos,
- ServerName: cfg.ServerName,
- ClientAuth: cfg.ClientAuth,
- ClientCAs: cfg.ClientCAs,
- InsecureSkipVerify: cfg.InsecureSkipVerify,
- CipherSuites: cfg.CipherSuites,
- PreferServerCipherSuites: cfg.PreferServerCipherSuites,
- ClientSessionCache: cfg.ClientSessionCache,
- MinVersion: cfg.MinVersion,
- MaxVersion: cfg.MaxVersion,
- CurvePreferences: cfg.CurvePreferences,
- }
-}
diff --git a/vendor/github.com/gorilla/websocket/client_clone.go b/vendor/github.com/gorilla/websocket/client_clone.go
new file mode 100644
index 00000000000..4f0d943723a
--- /dev/null
+++ b/vendor/github.com/gorilla/websocket/client_clone.go
@@ -0,0 +1,16 @@
+// 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.
+
+// +build go1.8
+
+package websocket
+
+import "crypto/tls"
+
+func cloneTLSConfig(cfg *tls.Config) *tls.Config {
+ if cfg == nil {
+ return &tls.Config{}
+ }
+ return cfg.Clone()
+}
diff --git a/vendor/github.com/gorilla/websocket/client_clone_legacy.go b/vendor/github.com/gorilla/websocket/client_clone_legacy.go
new file mode 100644
index 00000000000..babb007fb41
--- /dev/null
+++ b/vendor/github.com/gorilla/websocket/client_clone_legacy.go
@@ -0,0 +1,38 @@
+// 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.
+
+// +build !go1.8
+
+package websocket
+
+import "crypto/tls"
+
+// cloneTLSConfig clones all public fields except the fields
+// SessionTicketsDisabled and SessionTicketKey. This avoids copying the
+// sync.Mutex in the sync.Once and makes it safe to call cloneTLSConfig on a
+// config in active use.
+func cloneTLSConfig(cfg *tls.Config) *tls.Config {
+ if cfg == nil {
+ return &tls.Config{}
+ }
+ return &tls.Config{
+ Rand: cfg.Rand,
+ Time: cfg.Time,
+ Certificates: cfg.Certificates,
+ NameToCertificate: cfg.NameToCertificate,
+ GetCertificate: cfg.GetCertificate,
+ RootCAs: cfg.RootCAs,
+ NextProtos: cfg.NextProtos,
+ ServerName: cfg.ServerName,
+ ClientAuth: cfg.ClientAuth,
+ ClientCAs: cfg.ClientCAs,
+ InsecureSkipVerify: cfg.InsecureSkipVerify,
+ CipherSuites: cfg.CipherSuites,
+ PreferServerCipherSuites: cfg.PreferServerCipherSuites,
+ ClientSessionCache: cfg.ClientSessionCache,
+ MinVersion: cfg.MinVersion,
+ MaxVersion: cfg.MaxVersion,
+ CurvePreferences: cfg.CurvePreferences,
+ }
+}
diff --git a/vendor/github.com/gorilla/websocket/compression.go b/vendor/github.com/gorilla/websocket/compression.go
index 72c166b2a75..813ffb1e843 100644
--- a/vendor/github.com/gorilla/websocket/compression.go
+++ b/vendor/github.com/gorilla/websocket/compression.go
@@ -12,31 +12,45 @@ import (
"sync"
)
-var (
- flateWriterPool = sync.Pool{}
+const (
+ minCompressionLevel = -2 // flate.HuffmanOnly not defined in Go < 1.6
+ maxCompressionLevel = flate.BestCompression
+ defaultCompressionLevel = 1
)
-func decompressNoContextTakeover(r io.Reader) io.Reader {
+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"
- return flate.NewReader(io.MultiReader(r, strings.NewReader(tail)))
+
+ fr, _ := flateReaderPool.Get().(io.ReadCloser)
+ fr.(flate.Resetter).Reset(io.MultiReader(r, strings.NewReader(tail)), nil)
+ return &flateReadWrapper{fr}
}
-func compressNoContextTakeover(w io.WriteCloser) (io.WriteCloser, error) {
+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}
- i := flateWriterPool.Get()
- var fw *flate.Writer
- var err error
- if i == nil {
- fw, err = flate.NewWriter(tw, 3)
+ fw, _ := p.Get().(*flate.Writer)
+ if fw == nil {
+ fw, _ = flate.NewWriter(tw, level)
} else {
- fw = i.(*flate.Writer)
fw.Reset(tw)
}
- return &flateWrapper{fw: fw, tw: tw}, err
+ return &flateWriteWrapper{fw: fw, tw: tw, p: p}
}
// truncWriter is an io.Writer that writes all but the last four bytes of the
@@ -75,24 +89,25 @@ func (w *truncWriter) Write(p []byte) (int, error) {
return n + nn, err
}
-type flateWrapper struct {
+type flateWriteWrapper struct {
fw *flate.Writer
tw *truncWriter
+ p *sync.Pool
}
-func (w *flateWrapper) Write(p []byte) (int, error) {
+func (w *flateWriteWrapper) Write(p []byte) (int, error) {
if w.fw == nil {
return 0, errWriteClosed
}
return w.fw.Write(p)
}
-func (w *flateWrapper) Close() error {
+func (w *flateWriteWrapper) Close() error {
if w.fw == nil {
return errWriteClosed
}
err1 := w.fw.Flush()
- flateWriterPool.Put(w.fw)
+ 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")
@@ -103,3 +118,31 @@ func (w *flateWrapper) Close() error {
}
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
index ce7f0a6159f..97e1dbacb12 100644
--- a/vendor/github.com/gorilla/websocket/conn.go
+++ b/vendor/github.com/gorilla/websocket/conn.go
@@ -10,6 +10,7 @@ import (
"errors"
"io"
"io/ioutil"
+ "math/rand"
"net"
"strconv"
"sync"
@@ -180,6 +181,11 @@ var (
errInvalidControlFrame = errors.New("websocket: invalid control frame")
)
+func newMaskKey() [4]byte {
+ n := rand.Uint32()
+ return [4]byte{byte(n), byte(n >> 8), byte(n >> 16), byte(n >> 24)}
+}
+
func hideTempErr(err error) error {
if e, ok := err.(net.Error); ok && e.Temporary() {
err = &netError{msg: e.Error(), timeout: e.Timeout()}
@@ -235,9 +241,11 @@ type Conn struct {
writeErr error
enableWriteCompression bool
- newCompressionWriter func(io.WriteCloser) (io.WriteCloser, error)
+ 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
readRemaining int64 // bytes remaining in current frame.
@@ -253,31 +261,76 @@ type Conn struct {
messageReader *messageReader // the current low-level reader
readDecompress bool // whether last read frame had RSV1 set
- newDecompressionReader func(io.Reader) io.Reader
+ newDecompressionReader func(io.Reader) io.ReadCloser
}
func newConn(conn net.Conn, isServer bool, readBufferSize, writeBufferSize int) *Conn {
+ return newConnBRW(conn, isServer, readBufferSize, writeBufferSize, nil)
+}
+
+type writeHook struct {
+ p []byte
+}
+
+func (wh *writeHook) Write(p []byte) (int, error) {
+ wh.p = p
+ return len(p), nil
+}
+
+func newConnBRW(conn net.Conn, isServer bool, readBufferSize, writeBufferSize int, brw *bufio.ReadWriter) *Conn {
mu := make(chan bool, 1)
mu <- true
- if readBufferSize == 0 {
- readBufferSize = defaultReadBufferSize
+ var br *bufio.Reader
+ if readBufferSize == 0 && brw != nil && brw.Reader != nil {
+ // Reuse the supplied bufio.Reader if the buffer has a useful size.
+ // This code assumes that peek on a reader returns
+ // bufio.Reader.buf[:0].
+ brw.Reader.Reset(conn)
+ if p, err := brw.Reader.Peek(0); err == nil && cap(p) >= 256 {
+ br = brw.Reader
+ }
}
- if readBufferSize < maxControlFramePayloadSize {
- readBufferSize = maxControlFramePayloadSize
+ if br == nil {
+ if readBufferSize == 0 {
+ readBufferSize = defaultReadBufferSize
+ }
+ if readBufferSize < maxControlFramePayloadSize {
+ readBufferSize = maxControlFramePayloadSize
+ }
+ br = bufio.NewReaderSize(conn, readBufferSize)
}
- if writeBufferSize == 0 {
- writeBufferSize = defaultWriteBufferSize
+
+ var writeBuf []byte
+ if writeBufferSize == 0 && brw != nil && brw.Writer != nil {
+ // Use the bufio.Writer's buffer if the buffer has a useful size. This
+ // code assumes that bufio.Writer.buf[:1] is passed to the
+ // bufio.Writer's underlying writer.
+ var wh writeHook
+ brw.Writer.Reset(&wh)
+ brw.Writer.WriteByte(0)
+ brw.Flush()
+ if cap(wh.p) >= maxFrameHeaderSize+256 {
+ writeBuf = wh.p[:cap(wh.p)]
+ }
+ }
+
+ if writeBuf == nil {
+ if writeBufferSize == 0 {
+ writeBufferSize = defaultWriteBufferSize
+ }
+ writeBuf = make([]byte, writeBufferSize+maxFrameHeaderSize)
}
c := &Conn{
isServer: isServer,
- br: bufio.NewReaderSize(conn, readBufferSize),
+ br: br,
conn: conn,
mu: mu,
readFinal: true,
- writeBuf: make([]byte, writeBufferSize+maxFrameHeaderSize),
+ writeBuf: writeBuf,
enableWriteCompression: true,
+ compressionLevel: defaultCompressionLevel,
}
c.SetCloseHandler(nil)
c.SetPingHandler(nil)
@@ -443,11 +496,7 @@ func (c *Conn) NextWriter(messageType int) (io.WriteCloser, error) {
}
c.writer = mw
if c.newCompressionWriter != nil && c.enableWriteCompression && isData(messageType) {
- w, err := c.newCompressionWriter(c.writer)
- if err != nil {
- c.writer = nil
- return nil, err
- }
+ w := c.newCompressionWriter(c.writer, c.compressionLevel)
mw.compress = true
c.writer = w
}
@@ -654,12 +703,33 @@ func (w *messageWriter) Close() error {
return 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.
if err := c.prepWrite(messageType); err != nil {
@@ -855,6 +925,11 @@ func (c *Conn) handleProtocolError(message string) error {
// 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
@@ -867,11 +942,11 @@ func (c *Conn) NextReader() (messageType int, r io.Reader, err error) {
}
if frameType == TextMessage || frameType == BinaryMessage {
c.messageReader = &messageReader{c}
- var r io.Reader = c.messageReader
+ c.reader = c.messageReader
if c.readDecompress {
- r = c.newDecompressionReader(r)
+ c.reader = c.newDecompressionReader(c.reader)
}
- return frameType, r, nil
+ return frameType, c.reader, nil
}
}
@@ -933,6 +1008,10 @@ func (r *messageReader) Read(b []byte) (int, error) {
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) {
@@ -969,6 +1048,15 @@ func (c *Conn) CloseHandler() func(code int, text string) error {
// 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 frame
// back to the peer.
+//
+// The application must read the connection to process close messages as
+// described in the section on Control Frames above.
+//
+// The connection read methods return a CloseError when a close frame 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 frame 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 {
@@ -991,6 +1079,9 @@ func (c *Conn) PingHandler() func(appData string) error {
// SetPingHandler sets the handler for ping messages received from the peer.
// The appData argument to h is the PING frame application data. The default
// ping handler sends a pong to the peer.
+//
+// The application must read the connection to process ping messages as
+// described in the section on Control Frames above.
func (c *Conn) SetPingHandler(h func(appData string) error) {
if h == nil {
h = func(message string) error {
@@ -1014,6 +1105,9 @@ func (c *Conn) PongHandler() func(appData string) error {
// SetPongHandler sets the handler for pong messages received from the peer.
// The appData argument to h is the PONG frame application data. The default
// pong handler does nothing.
+//
+// The application must read the connection to process ping messages as
+// described in the section on Control Frames above.
func (c *Conn) SetPongHandler(h func(appData string) error) {
if h == nil {
h = func(string) error { return nil }
@@ -1034,6 +1128,18 @@ 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.
func FormatCloseMessage(closeCode int, text string) []byte {
buf := make([]byte, 2+len(text))
diff --git a/vendor/github.com/gorilla/websocket/doc.go b/vendor/github.com/gorilla/websocket/doc.go
index 610acf71289..e291a952c1e 100644
--- a/vendor/github.com/gorilla/websocket/doc.go
+++ b/vendor/github.com/gorilla/websocket/doc.go
@@ -118,9 +118,10 @@
//
// Applications are responsible for ensuring that no more than one goroutine
// calls the write methods (NextWriter, SetWriteDeadline, WriteMessage,
-// WriteJSON) concurrently and that no more than one goroutine calls the read
-// methods (NextReader, SetReadDeadline, ReadMessage, ReadJSON, SetPongHandler,
-// SetPingHandler) concurrently.
+// 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.
@@ -150,19 +151,25 @@
// application's responsibility to check the Origin header before calling
// Upgrade.
//
-// Compression [Experimental]
+// 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. 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.
+// 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(true)
+// conn.EnableWriteCompression(false)
//
// Currently this package does not support compression with "context takeover".
// This means that messages must be compressed and decompressed in isolation,
diff --git a/vendor/github.com/gorilla/websocket/mask.go b/vendor/github.com/gorilla/websocket/mask.go
index 6758a2cb7a4..6a88bbc7434 100644
--- a/vendor/github.com/gorilla/websocket/mask.go
+++ b/vendor/github.com/gorilla/websocket/mask.go
@@ -2,20 +2,14 @@
// this source code is governed by a BSD-style license that can be found in the
// LICENSE file.
+// +build !appengine
+
package websocket
-import (
- "math/rand"
- "unsafe"
-)
+import "unsafe"
const wordSize = int(unsafe.Sizeof(uintptr(0)))
-func newMaskKey() [4]byte {
- n := rand.Uint32()
- return [4]byte{byte(n), byte(n >> 8), byte(n >> 16), byte(n >> 24)}
-}
-
func maskBytes(key [4]byte, pos int, b []byte) int {
// Mask one byte at a time for small buffers.
diff --git a/vendor/github.com/gorilla/websocket/mask_safe.go b/vendor/github.com/gorilla/websocket/mask_safe.go
new file mode 100644
index 00000000000..2aac060e52e
--- /dev/null
+++ b/vendor/github.com/gorilla/websocket/mask_safe.go
@@ -0,0 +1,15 @@
+// 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.
+
+// +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
new file mode 100644
index 00000000000..1efffbd1ebe
--- /dev/null
+++ b/vendor/github.com/gorilla/websocket/prepared.go
@@ -0,0 +1,103 @@
+// 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
+ err error
+ 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 bool, 1)
+ mu <- true
+ 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/server.go b/vendor/github.com/gorilla/websocket/server.go
index aaedebdbe10..3495e0f1abc 100644
--- a/vendor/github.com/gorilla/websocket/server.go
+++ b/vendor/github.com/gorilla/websocket/server.go
@@ -28,8 +28,9 @@ type Upgrader struct {
HandshakeTimeout time.Duration
// ReadBufferSize and WriteBufferSize specify I/O buffer sizes. If a buffer
- // size is zero, then a default value of 4096 is used. The I/O buffer sizes
- // do not limit the size of the messages that can be sent or received.
+ // 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
// Subprotocols specifies the server's supported protocols in order of
@@ -104,23 +105,23 @@ func (u *Upgrader) selectSubprotocol(r *http.Request, responseHeader http.Header
// response.
func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeader http.Header) (*Conn, error) {
if r.Method != "GET" {
- return u.returnError(w, r, http.StatusMethodNotAllowed, "websocket: method not GET")
+ return u.returnError(w, r, http.StatusMethodNotAllowed, "websocket: not a websocket handshake: request method is not GET")
}
if _, ok := responseHeader["Sec-Websocket-Extensions"]; ok {
- return u.returnError(w, r, http.StatusInternalServerError, "websocket: application specific Sec-Websocket-Extensions headers are unsupported")
- }
-
- if !tokenListContainsValue(r.Header, "Sec-Websocket-Version", "13") {
- return u.returnError(w, r, http.StatusBadRequest, "websocket: version != 13")
+ return u.returnError(w, r, http.StatusInternalServerError, "websocket: application specific 'Sec-Websocket-Extensions' headers are unsupported")
}
if !tokenListContainsValue(r.Header, "Connection", "upgrade") {
- return u.returnError(w, r, http.StatusBadRequest, "websocket: could not find connection header with token 'upgrade'")
+ return u.returnError(w, r, http.StatusBadRequest, "websocket: not a websocket handshake: 'upgrade' token not found in 'Connection' header")
}
if !tokenListContainsValue(r.Header, "Upgrade", "websocket") {
- return u.returnError(w, r, http.StatusBadRequest, "websocket: could not find upgrade header with token 'websocket'")
+ return u.returnError(w, r, http.StatusBadRequest, "websocket: not a websocket handshake: 'websocket' token not found in 'Upgrade' header")
+ }
+
+ 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")
}
checkOrigin := u.CheckOrigin
@@ -128,12 +129,12 @@ func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeade
checkOrigin = checkSameOrigin
}
if !checkOrigin(r) {
- return u.returnError(w, r, http.StatusForbidden, "websocket: origin not allowed")
+ return u.returnError(w, r, http.StatusForbidden, "websocket: 'Origin' header value not allowed")
}
challengeKey := r.Header.Get("Sec-Websocket-Key")
if challengeKey == "" {
- return u.returnError(w, r, http.StatusBadRequest, "websocket: key missing or blank")
+ return u.returnError(w, r, http.StatusBadRequest, "websocket: not a websocket handshake: `Sec-Websocket-Key' header is missing or blank")
}
subprotocol := u.selectSubprotocol(r, responseHeader)
@@ -152,7 +153,6 @@ func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeade
var (
netConn net.Conn
- br *bufio.Reader
err error
)
@@ -160,19 +160,18 @@ func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeade
if !ok {
return u.returnError(w, r, http.StatusInternalServerError, "websocket: response does not implement http.Hijacker")
}
- var rw *bufio.ReadWriter
- netConn, rw, err = h.Hijack()
+ var brw *bufio.ReadWriter
+ netConn, brw, err = h.Hijack()
if err != nil {
return u.returnError(w, r, http.StatusInternalServerError, err.Error())
}
- br = rw.Reader
- if br.Buffered() > 0 {
+ if brw.Reader.Buffered() > 0 {
netConn.Close()
return nil, errors.New("websocket: client sent data before handshake is complete")
}
- c := newConn(netConn, true, u.ReadBufferSize, u.WriteBufferSize)
+ c := newConnBRW(netConn, true, u.ReadBufferSize, u.WriteBufferSize, brw)
c.subprotocol = subprotocol
if compress {
diff --git a/vendor/github.com/gosimple/slug/.gitignore b/vendor/github.com/gosimple/slug/.gitignore
index 02a8da53752..25d190e2bc7 100644
--- a/vendor/github.com/gosimple/slug/.gitignore
+++ b/vendor/github.com/gosimple/slug/.gitignore
@@ -1,2 +1,2 @@
-_*
-cover*.out
+_*
+cover*.out
diff --git a/vendor/github.com/gosimple/slug/LICENSE b/vendor/github.com/gosimple/slug/LICENSE
new file mode 100644
index 00000000000..a612ad9813b
--- /dev/null
+++ b/vendor/github.com/gosimple/slug/LICENSE
@@ -0,0 +1,373 @@
+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/gosimple/slug/README.md b/vendor/github.com/gosimple/slug/README.md
index a2649bdb170..b1f16b281dc 100644
--- a/vendor/github.com/gosimple/slug/README.md
+++ b/vendor/github.com/gosimple/slug/README.md
@@ -1,54 +1,54 @@
-slug
-====
-
-Package `slug` generate slug from unicode string, URL-friendly slugify with
-multiple languages support.
-
-[](https://godoc.org/github.com/gosimple/slug)
-[](https://drone.io/github.com/gosimple/slug/latest)
-
-[Documentation online](http://godoc.org/github.com/gosimple/slug)
-
-## Example
-
- package main
-
- import(
- "github.com/gosimple/slug"
- "fmt"
- )
-
- func main () {
- text := slug.Make("Hellö Wörld хелло ворлд")
- fmt.Println(text) // Will print hello-world-khello-vorld
-
- someText := slug.Make("影師")
- fmt.Println(someText) // Will print: ying-shi
-
- enText := slug.MakeLang("This & that", "en")
- fmt.Println(enText) // Will print 'this-and-that'
-
- deText := slug.MakeLang("Diese & Dass", "de")
- fmt.Println(deText) // Will print 'diese-und-dass'
-
- slug.CustomSub = map[string]string{
- "water": "sand",
- }
- textSub := slug.Make("water is hot")
- fmt.Println(textSub) // Will print 'sand-is-hot'
- }
-
-### Requests or bugs?
-
-
-## Installation
-
- go get -u github.com/gosimple/slug
-
-## License
-
-The source files are distributed under the
-[Mozilla Public License, version 2.0](http://mozilla.org/MPL/2.0/),
-unless otherwise noted.
-Please read the [FAQ](http://www.mozilla.org/MPL/2.0/FAQ.html)
-if you have further questions regarding the license.
+slug
+====
+
+Package `slug` generate slug from unicode string, URL-friendly slugify with
+multiple languages support.
+
+[](https://godoc.org/github.com/gosimple/slug)
+[](https://drone.io/github.com/gosimple/slug/latest)
+
+[Documentation online](http://godoc.org/github.com/gosimple/slug)
+
+## Example
+
+ package main
+
+ import(
+ "github.com/gosimple/slug"
+ "fmt"
+ )
+
+ func main () {
+ text := slug.Make("Hellö Wörld хелло ворлд")
+ fmt.Println(text) // Will print: "hello-world-khello-vorld"
+
+ someText := slug.Make("影師")
+ fmt.Println(someText) // Will print: "ying-shi"
+
+ enText := slug.MakeLang("This & that", "en")
+ fmt.Println(enText) // Will print: "this-and-that"
+
+ deText := slug.MakeLang("Diese & Dass", "de")
+ fmt.Println(deText) // Will print: "diese-und-dass"
+
+ slug.CustomSub = map[string]string{
+ "water": "sand",
+ }
+ textSub := slug.Make("water is hot")
+ fmt.Println(textSub) // Will print: "sand-is-hot"
+ }
+
+### Requests or bugs?
+
+
+## Installation
+
+ go get -u github.com/gosimple/slug
+
+## License
+
+The source files are distributed under the
+[Mozilla Public License, version 2.0](http://mozilla.org/MPL/2.0/),
+unless otherwise noted.
+Please read the [FAQ](http://www.mozilla.org/MPL/2.0/FAQ.html)
+if you have further questions regarding the license.
diff --git a/vendor/github.com/gosimple/slug/default_substitution.go b/vendor/github.com/gosimple/slug/default_substitution.go
deleted file mode 100644
index 847c85d1fc8..00000000000
--- a/vendor/github.com/gosimple/slug/default_substitution.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2013 by Dobrosław Żybort. All rights reserved.
-// 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/.
-
-package slug
-
-var defaultSub = map[rune]string{
- '"': "",
- '\'': "",
- '’': "",
- '‒': "-", // figure dash
- '–': "-", // en dash
- '—': "-", // em dash
- '―': "-", // horizontal bar
-}
diff --git a/vendor/github.com/gosimple/slug/languages_substitution.go b/vendor/github.com/gosimple/slug/languages_substitution.go
index 49ebb48dbf4..ba8ad01815e 100644
--- a/vendor/github.com/gosimple/slug/languages_substitution.go
+++ b/vendor/github.com/gosimple/slug/languages_substitution.go
@@ -5,6 +5,25 @@
package slug
+func init() {
+ // Merge language subs with the default one
+ for _, sub := range []*map[rune]string{&deSub, &enSub, &plSub, &esSub} {
+ for key, value := range defaultSub {
+ (*sub)[key] = value
+ }
+ }
+}
+
+var defaultSub = map[rune]string{
+ '"': "",
+ '\'': "",
+ '’': "",
+ '‒': "-", // figure dash
+ '–': "-", // en dash
+ '—': "-", // em dash
+ '―': "-", // horizontal bar
+}
+
var deSub = map[rune]string{
'&': "und",
'@': "an",
@@ -24,3 +43,15 @@ var esSub = map[rune]string{
'&': "y",
'@': "en",
}
+
+var grSub = map[rune]string{
+ '&': "kai",
+ 'η': "i",
+ 'ή': "i",
+ 'Η': "i",
+ 'ι': "i",
+ 'ί': "i",
+ 'Ι': "i",
+ 'χ': "x",
+ 'Χ': "x",
+}
diff --git a/vendor/github.com/gosimple/slug/slug.go b/vendor/github.com/gosimple/slug/slug.go
index b2c7d62514e..bd3ec51aa23 100644
--- a/vendor/github.com/gosimple/slug/slug.go
+++ b/vendor/github.com/gosimple/slug/slug.go
@@ -6,24 +6,30 @@
package slug
import (
+ "bytes"
"regexp"
+ "sort"
"strings"
"github.com/rainycape/unidecode"
)
var (
- // Custom substitution map
+ // CustomSub stores custom substitution map
CustomSub map[string]string
- // Custom rune substitution map
+ // CustomRuneSub stores custom rune substitution map
CustomRuneSub map[rune]string
- // Maximum slug length. It's smart so it will cat slug after full word.
+ // MaxLength stores maximum slug length.
+ // It's smart so it will cat slug after full word.
// By default slugs aren't shortened.
// If MaxLength is smaller than length of the first word, then returned
// slug will contain only substring from the first word truncated
// after MaxLength.
MaxLength int
+
+ regexpNonAuthorizedChars = regexp.MustCompile("[^a-z0-9-_]")
+ regexpMultipleDashes = regexp.MustCompile("-+")
)
//=============================================================================
@@ -54,20 +60,20 @@ func MakeLang(s string, lang string) (slug string) {
slug = SubstituteRune(slug, plSub)
case "es":
slug = SubstituteRune(slug, esSub)
+ case "gr":
+ slug = SubstituteRune(slug, grSub)
default: // fallback to "en" if lang not found
slug = SubstituteRune(slug, enSub)
}
- slug = SubstituteRune(slug, defaultSub)
-
// Process all non ASCII symbols
slug = unidecode.Unidecode(slug)
slug = strings.ToLower(slug)
// Process all remaining symbols
- slug = regexp.MustCompile("[^a-z0-9-_]").ReplaceAllString(slug, "-")
- slug = regexp.MustCompile("-+").ReplaceAllString(slug, "-")
+ slug = regexpNonAuthorizedChars.ReplaceAllString(slug, "-")
+ slug = regexpMultipleDashes.ReplaceAllString(slug, "-")
slug = strings.Trim(slug, "-")
if MaxLength > 0 {
@@ -78,26 +84,34 @@ func MakeLang(s string, lang string) (slug string) {
}
// Substitute returns string with superseded all substrings from
-// provided substitution map.
+// provided substitution map. Substitution map will be applied in alphabetic
+// order. Many passes, on one substitution another one could apply.
func Substitute(s string, sub map[string]string) (buf string) {
buf = s
- for key, val := range sub {
- buf = strings.Replace(s, key, val, -1)
+ var keys []string
+ for k := range sub {
+ keys = append(keys, k)
+ }
+ sort.Strings(keys)
+
+ for _, key := range keys {
+ buf = strings.Replace(buf, key, sub[key], -1)
}
return
}
// SubstituteRune substitutes string chars with provided rune
-// substitution map.
-func SubstituteRune(s string, sub map[rune]string) (buf string) {
+// substitution map. One pass.
+func SubstituteRune(s string, sub map[rune]string) string {
+ var buf bytes.Buffer
for _, c := range s {
if d, ok := sub[c]; ok {
- buf += d
+ buf.WriteString(d)
} else {
- buf += string(c)
+ buf.WriteRune(c)
}
}
- return
+ return buf.String()
}
func smartTruncate(text string) string {
@@ -121,3 +135,23 @@ func smartTruncate(text string) string {
}
return strings.Trim(truncated, "-")
}
+
+// IsSlug returns True if provided text does not contain white characters,
+// punctuation, all letters are lower case and only from ASCII range.
+// It could contain `-` and `_` but not at the beginning or end of the text.
+// It should be in range of the MaxLength var if specified.
+// All output from slug.Make(text) should pass this test.
+func IsSlug(text string) bool {
+ if text == "" ||
+ (MaxLength > 0 && len(text) > MaxLength) ||
+ text[0] == '-' || text[0] == '_' ||
+ text[len(text)-1] == '-' || text[len(text)-1] == '_' {
+ return false
+ }
+ for _, c := range text {
+ if (c < 'a' || c > 'z') && c != '-' && c != '_' && (c < '0' || c > '9') {
+ return false
+ }
+ }
+ return true
+}
diff --git a/vendor/github.com/gosimple/slug/slug_test.go b/vendor/github.com/gosimple/slug/slug_test.go
index b996c3686b8..e5570d74fb4 100644
--- a/vendor/github.com/gosimple/slug/slug_test.go
+++ b/vendor/github.com/gosimple/slug/slug_test.go
@@ -69,6 +69,7 @@ func TestSlugMakeLang(t *testing.T) {
{"de", "This & that", "this-und-that"},
{"pl", "This & that", "this-i-that"},
{"es", "This & that", "this-y-that"},
+ {"gr", "This & that", "this-kai-that"},
{"test", "This & that", "this-and-that"}, // unknown lang, fallback to "en"
}
@@ -90,8 +91,9 @@ func TestSlugMakeUserSubstituteLang(t *testing.T) {
want string
}{
{map[string]string{"'": " "}, "en", "That's great", "that-s-great"},
- {map[string]string{"&": "or"}, "en", "This & that", "this-or-that"}, // by default "&" => "and"
- {map[string]string{"&": "or"}, "de", "This & that", "this-or-that"}, // by default "&" => "und"
+ {map[string]string{"&": "or"}, "en", "This & that", "this-or-that"}, // by default "&" => "and"
+ {map[string]string{"&": "or"}, "de", "This & that", "this-or-that"}, // by default "&" => "und"
+ {map[string]string{"&": "or", "@": "the"}, "de", "@ This & that", "the-this-or-that"}, // by default "&" => "und", "@" => "an"
}
for index, smust := range testCases {
@@ -116,6 +118,8 @@ func TestSlugMakeSubstituteOrderLang(t *testing.T) {
want string
}{
{map[rune]string{'o': "left"}, map[string]string{"o": "right"}, "o o", "left-left"},
+ {map[rune]string{'o': "left", 'a': "r"}, map[string]string{"o": "right"}, "o a o", "left-r-left"},
+ {map[rune]string{'o': "left"}, map[string]string{"o": "right", "a": "r"}, "a o a o", "r-left-r-left"},
{map[rune]string{'&': "down"}, map[string]string{"&": "up"}, "&", "down"},
}
@@ -140,6 +144,8 @@ func TestSubstituteLang(t *testing.T) {
want string
}{
{map[string]string{"o": "no"}, "o o o", "no no no"},
+ {map[string]string{"o": "no", "a": "or"}, "o a o", "no nor no"},
+ {map[string]string{"a": "or", "o": "no"}, "o a o", "no nor no"},
{map[string]string{"'": " "}, "That's great", "That s great"},
}
@@ -160,6 +166,8 @@ func TestSubstituteRuneLang(t *testing.T) {
want string
}{
{map[rune]string{'o': "no"}, "o o o", "no no no"},
+ {map[rune]string{'o': "no", 'a': "or"}, "o a o", "no or no"},
+ {map[rune]string{'a': "or", 'o': "no"}, "o a o", "no or no"},
{map[rune]string{'\'': " "}, "That's great", "That s great"},
}
@@ -198,6 +206,48 @@ func TestSlugMakeSmartTruncate(t *testing.T) {
}
}
+func TestIsSlug(t *testing.T) {
+ MaxLength = 0
+ type args struct {
+ text string
+ }
+ tests := []struct {
+ name string
+ args args
+ want bool
+ }{
+ {"some", args{"some"}, true},
+ {"with -", args{"some-more"}, true},
+ {"with _", args{"some_more"}, true},
+ {"with numbers", args{"number-2"}, true},
+ {"empty string", args{""}, false},
+ {"upper case", args{"Some-more"}, false},
+ {"space", args{"some more"}, false},
+ {"starts with '-'", args{"-some"}, false},
+ {"ends with '-'", args{"some-"}, false},
+ {"starts with '_'", args{"_some"}, false},
+ {"ends with '_'", args{"some_"}, false},
+ {"outside ASCII", args{"Dobrosław Żybort"}, false},
+ {"outside ASCII –", args{"2000–2013"}, false},
+ {"smile ☺", args{"smile ☺"}, false},
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ if got := IsSlug(tt.args.text); got != tt.want {
+ t.Errorf("IsSlug() = %v, want %v", got, tt.want)
+ }
+ })
+ }
+
+ t.Run("MaxLength", func(t *testing.T) {
+ MaxLength = 4
+ if got := IsSlug("012345"); got != false {
+ t.Errorf("IsSlug() = %v, want %v", got, false)
+ }
+ MaxLength = 0
+ })
+}
+
func BenchmarkMakeShortAscii(b *testing.B) {
b.ReportAllocs()
for n := 0; n < b.N; n++ {
@@ -335,3 +385,37 @@ func BenchmarkSmartTruncateLong(b *testing.B) {
smartTruncate(longStr)
}
}
+
+func BenchmarkIsSlugShort(b *testing.B) {
+ shortStr := "hello-world"
+
+ b.ReportAllocs()
+ b.ResetTimer()
+ for n := 0; n < b.N; n++ {
+ IsSlug(shortStr)
+ }
+}
+
+func BenchmarkIsSlugLong(b *testing.B) {
+ longStr := "lorem-ipsum-dolor-sit-amet-consectetur-adipiscing-elit-morbi-" +
+ "pulvinar-sodales-ultrices-nulla-facilisi-sed-at-vestibulum-erat-ut-" +
+ "sit-amet-urna-posuere-sagittis-eros-ac-varius-nisi-morbi-ullamcorper-" +
+ "odio-at-nunc-pulvinar-mattis-vestibulum-rutrum-ante-eu-dictum-mattis,-" +
+ "elit-risus-finibus-nunc-consectetur-facilisis-eros-leo-ut-sapien-sed-" +
+ "pulvinar-volutpat-mi-cras-semper-mi-ac-eros-accumsan-at-feugiat-massa-" +
+ "elementum-morbi-eget-dolor-sit-amet-purus-condimentum-egestas-non-ut-" +
+ "sapien-duis-feugiat-magna-vitae-nisi-lobortis-quis-finibus-sem-" +
+ "sollicitudin-pellentesque-eleifend-blandit-ipsum-ut-porta-arcu-" +
+ "ultricies-et-fusce-vel-ipsum-porta-placerat-diam-ac-consectetur-" +
+ "magna-nulla-in-porta-sem-suspendisse-commodo-felis-in-molestie-" +
+ "ultricies-arcu-ipsum-aliquet-turpis-elementum-dapibus-ipsum-lorem-a-" +
+ "nisl-etiam-varius-imperdiet-placerat-aliquam-euismod-lacus-arcu-" +
+ "ultrices-hendrerit-est-pellentesque-vel-aliquam-sit-amet-laoreet-leo-" +
+ "integer-eros-libero-mollis-sed-posuere"
+
+ b.ReportAllocs()
+ b.ResetTimer()
+ for n := 0; n < b.N; n++ {
+ IsSlug(longStr)
+ }
+}
diff --git a/vendor/github.com/grafana/grafana_plugin_model/.gitignore b/vendor/github.com/grafana/grafana_plugin_model/.gitignore
new file mode 100644
index 00000000000..a1338d68517
--- /dev/null
+++ b/vendor/github.com/grafana/grafana_plugin_model/.gitignore
@@ -0,0 +1,14 @@
+# 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/grafana/grafana_plugin_model/Gopkg.lock b/vendor/github.com/grafana/grafana_plugin_model/Gopkg.lock
new file mode 100644
index 00000000000..fee5fb34d63
--- /dev/null
+++ b/vendor/github.com/grafana/grafana_plugin_model/Gopkg.lock
@@ -0,0 +1,62 @@
+# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
+
+
+[[projects]]
+ branch = "master"
+ name = "github.com/golang/protobuf"
+ packages = ["proto","ptypes","ptypes/any","ptypes/duration","ptypes/timestamp"]
+ revision = "1e59b77b52bf8e4b449a57e6f79f21226d571845"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/hashicorp/go-hclog"
+ packages = ["."]
+ revision = "ca137eb4b4389c9bc6f1a6d887f056bf16c00510"
+
+[[projects]]
+ name = "github.com/hashicorp/go-plugin"
+ packages = ["."]
+ revision = "3e6d191694b5a3a2b99755f31b47fa209e4bcd09"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/hashicorp/yamux"
+ packages = ["."]
+ revision = "683f49123a33db61abfb241b7ac5e4af4dc54d55"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/mitchellh/go-testing-interface"
+ packages = ["."]
+ revision = "a61a99592b77c9ba629d254a693acffaeb4b7e28"
+
+[[projects]]
+ branch = "master"
+ name = "golang.org/x/net"
+ packages = ["context","http2","http2/hpack","idna","internal/timeseries","lex/httplex","trace"]
+ revision = "5ccada7d0a7ba9aeb5d3aca8d3501b4c2a509fec"
+
+[[projects]]
+ branch = "master"
+ name = "golang.org/x/text"
+ packages = ["collate","collate/build","internal/colltab","internal/gen","internal/tag","internal/triegen","internal/ucd","language","secure/bidirule","transform","unicode/bidi","unicode/cldr","unicode/norm","unicode/rangetable"]
+ revision = "e19ae1496984b1c655b8044a65c0300a3c878dd3"
+
+[[projects]]
+ branch = "master"
+ name = "google.golang.org/genproto"
+ packages = ["googleapis/rpc/status"]
+ revision = "a8101f21cf983e773d0c1133ebc5424792003214"
+
+[[projects]]
+ name = "google.golang.org/grpc"
+ packages = [".","balancer","balancer/base","balancer/roundrobin","codes","connectivity","credentials","encoding","grpclb/grpc_lb_v1/messages","grpclog","health","health/grpc_health_v1","internal","keepalive","metadata","naming","peer","resolver","resolver/dns","resolver/passthrough","stats","status","tap","transport"]
+ revision = "7cea4cc846bcf00cbb27595b07da5de875ef7de9"
+ version = "v1.9.1"
+
+[solve-meta]
+ analyzer-name = "dep"
+ analyzer-version = 1
+ inputs-digest = "e779369e64c163fd0c1182f5eaca3a9ac0bb899fbf00abb1d921d2ac3a5c4320"
+ solver-name = "gps-cdcl"
+ solver-version = 1
diff --git a/vendor/github.com/grafana/grafana_plugin_model/Gopkg.toml b/vendor/github.com/grafana/grafana_plugin_model/Gopkg.toml
new file mode 100644
index 00000000000..bf85536f303
--- /dev/null
+++ b/vendor/github.com/grafana/grafana_plugin_model/Gopkg.toml
@@ -0,0 +1,38 @@
+
+# Gopkg.toml example
+#
+# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
+# 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"
+
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/golang/protobuf"
+
+[[constraint]]
+ name = "github.com/hashicorp/go-plugin"
+ revision = "3e6d191694b5a3a2b99755f31b47fa209e4bcd09"
+
+[[constraint]]
+ branch = "master"
+ name = "golang.org/x/net"
+
+[[constraint]]
+ name = "google.golang.org/grpc"
+ version = "1.9.1"
diff --git a/vendor/github.com/grafana/grafana_plugin_model/Makefile b/vendor/github.com/grafana/grafana_plugin_model/Makefile
new file mode 100644
index 00000000000..95bb4fe5f1a
--- /dev/null
+++ b/vendor/github.com/grafana/grafana_plugin_model/Makefile
@@ -0,0 +1,7 @@
+all: clean golang
+
+clean:
+ rm -rf go/datasource/*.pb.go
+
+golang:
+ protoc -I . datasource.proto --go_out=plugins=grpc:go/datasource/.
\ No newline at end of file
diff --git a/vendor/github.com/grafana/grafana_plugin_model/README.md b/vendor/github.com/grafana/grafana_plugin_model/README.md
new file mode 100644
index 00000000000..dffff7e3f47
--- /dev/null
+++ b/vendor/github.com/grafana/grafana_plugin_model/README.md
@@ -0,0 +1,5 @@
+# Models for Grafana backend plugins
+
+# Building
+
+`make`
\ No newline at end of file
diff --git a/vendor/github.com/grafana/grafana_plugin_model/datasource.proto b/vendor/github.com/grafana/grafana_plugin_model/datasource.proto
new file mode 100644
index 00000000000..d95f8c8e590
--- /dev/null
+++ b/vendor/github.com/grafana/grafana_plugin_model/datasource.proto
@@ -0,0 +1,98 @@
+syntax = "proto3";
+option go_package = "datasource";
+
+package models;
+
+message DatasourceRequest {
+ TimeRange timeRange = 1;
+ DatasourceInfo datasource = 2;
+ repeated Query queries = 3;
+}
+
+message Query {
+ string refId = 1;
+ int64 maxDataPoints = 2;
+ int64 intervalMs = 3;
+ string modelJson = 4;
+}
+
+message TimeRange {
+ string fromRaw = 1;
+ string toRaw = 2;
+ int64 fromEpochMs = 3;
+ int64 toEpochMs = 4;
+}
+
+message DatasourceResponse {
+ repeated QueryResult results = 1;
+}
+
+message QueryResult {
+ string error = 1;
+ string refId = 2;
+ string metaJson = 3;
+ repeated TimeSeries series = 4;
+ repeated Table tables = 5;
+}
+
+message Table {
+ repeated TableColumn columns = 1;
+ repeated TableRow rows = 2;
+}
+
+message TableColumn {
+ string name = 1;
+}
+
+message TableRow {
+ repeated RowValue values = 1;
+}
+
+message RowValue {
+ enum Kind {
+ // Field type null.
+ TYPE_NULL = 0;
+ // Field type double.
+ TYPE_DOUBLE = 1;
+ // Field type int64.
+ TYPE_INT64 = 2;
+ // Field type bool.
+ TYPE_BOOL = 3;
+ // Field type string.
+ TYPE_STRING = 4;
+ // Field type bytes.
+ TYPE_BYTES = 5;
+ };
+
+ Kind kind = 1;
+ double doubleValue = 2;
+ int64 int64Value = 3;
+ bool boolValue = 4;
+ string stringValue = 5;
+ bytes bytesValue = 6;
+}
+
+message DatasourceInfo {
+ int64 id = 1;
+ int64 orgId = 2;
+ string name = 3;
+ string type = 4;
+ string url = 5;
+ string jsonData = 6;
+ map decryptedSecureJsonData = 7;
+}
+
+message TimeSeries {
+ string name = 1;
+ map tags = 2;
+ repeated Point points = 3;
+}
+
+message Point {
+ int64 timestamp = 1;
+ double value = 2;
+}
+
+service DatasourcePlugin {
+ rpc Query(DatasourceRequest) returns (DatasourceResponse);
+}
diff --git a/vendor/github.com/hashicorp/go-hclog/int.go b/vendor/github.com/hashicorp/go-hclog/int.go
index c8609c35757..20adcfbb93b 100644
--- a/vendor/github.com/hashicorp/go-hclog/int.go
+++ b/vendor/github.com/hashicorp/go-hclog/int.go
@@ -40,8 +40,13 @@ func New(opts *LoggerOptions) Logger {
level = DefaultLevel
}
+ mtx := opts.Mutex
+ if mtx == nil {
+ mtx = new(sync.Mutex)
+ }
+
return &intLogger{
- m: new(sync.Mutex),
+ m: mtx,
json: opts.JSONFormat,
caller: opts.IncludeLocation,
name: opts.Name,
@@ -369,6 +374,8 @@ func (z *intLogger) Named(name string) Logger {
if nz.name != "" {
nz.name = nz.name + "." + name
+ } else {
+ nz.name = name
}
return &nz
diff --git a/vendor/github.com/hashicorp/go-hclog/log.go b/vendor/github.com/hashicorp/go-hclog/log.go
index 1b36f811269..dbc4198a5a4 100644
--- a/vendor/github.com/hashicorp/go-hclog/log.go
+++ b/vendor/github.com/hashicorp/go-hclog/log.go
@@ -5,6 +5,7 @@ import (
"log"
"os"
"strings"
+ "sync"
)
var (
@@ -130,6 +131,9 @@ type LoggerOptions struct {
// Where to write the logs to. Defaults to os.Stdout if nil
Output io.Writer
+ // An optional mutex pointer in case Output is shared
+ Mutex *sync.Mutex
+
// Control if the output should be in JSON.
JSONFormat bool
diff --git a/vendor/github.com/hashicorp/go-plugin/.gitignore b/vendor/github.com/hashicorp/go-plugin/.gitignore
new file mode 100644
index 00000000000..e43b0f98895
--- /dev/null
+++ b/vendor/github.com/hashicorp/go-plugin/.gitignore
@@ -0,0 +1 @@
+.DS_Store
diff --git a/vendor/github.com/hashicorp/go-version/.travis.yml b/vendor/github.com/hashicorp/go-version/.travis.yml
index 9f30eecd73f..3f45b1e8d57 100644
--- a/vendor/github.com/hashicorp/go-version/.travis.yml
+++ b/vendor/github.com/hashicorp/go-version/.travis.yml
@@ -6,6 +6,7 @@ go:
- 1.2
- 1.3
- 1.4
+ - 1.9
script:
- go test
diff --git a/vendor/github.com/hashicorp/go-version/README.md b/vendor/github.com/hashicorp/go-version/README.md
index 1d50070f131..6f3a15ce772 100644
--- a/vendor/github.com/hashicorp/go-version/README.md
+++ b/vendor/github.com/hashicorp/go-version/README.md
@@ -1,5 +1,5 @@
# Versioning Library for Go
-[](https://travis-ci.org/hashicorp/go-version)
+[](https://travis-ci.org/hashicorp/go-version)
go-version is a library for parsing versions and version constraints,
and verifying versions against a set of constraints. go-version
diff --git a/vendor/github.com/hashicorp/go-version/constraint.go b/vendor/github.com/hashicorp/go-version/constraint.go
index 091cfab389f..8c73df0602b 100644
--- a/vendor/github.com/hashicorp/go-version/constraint.go
+++ b/vendor/github.com/hashicorp/go-version/constraint.go
@@ -37,7 +37,7 @@ func init() {
}
ops := make([]string, 0, len(constraintOperators))
- for k, _ := range constraintOperators {
+ for k := range constraintOperators {
ops = append(ops, regexp.QuoteMeta(k))
}
@@ -142,15 +142,37 @@ func constraintLessThanEqual(v, c *Version) bool {
}
func constraintPessimistic(v, c *Version) bool {
+ // 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
index d0e0b0c8ff7..bee527eb258 100644
--- a/vendor/github.com/hashicorp/go-version/version.go
+++ b/vendor/github.com/hashicorp/go-version/version.go
@@ -14,16 +14,16 @@ var versionRegexp *regexp.Regexp
// The raw regular expression string used for testing the validity
// of a version.
-const VersionRegexpRaw string = `([0-9]+(\.[0-9]+){0,2})` +
- `(-([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?` +
- `(\+([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?` +
+const VersionRegexpRaw string = `v?([0-9]+(\.[0-9]+)*?)` +
+ `(-?([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 []int
+ segments []int64
si int
}
@@ -38,20 +38,23 @@ func NewVersion(v string) (*Version, error) {
if matches == nil {
return nil, fmt.Errorf("Malformed version: %s", v)
}
-
segmentsStr := strings.Split(matches[1], ".")
- segments := make([]int, len(segmentsStr), 3)
+ segments := make([]int64, len(segmentsStr))
si := 0
for i, str := range segmentsStr {
- val, err := strconv.ParseInt(str, 10, 32)
+ val, err := strconv.ParseInt(str, 10, 64)
if err != nil {
return nil, fmt.Errorf(
"Error parsing version: %s", err)
}
- segments[i] = int(val)
- si += 1
+ segments[i] = int64(val)
+ si++
}
+
+ // 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)
}
@@ -86,8 +89,8 @@ func (v *Version) Compare(other *Version) int {
return 0
}
- segmentsSelf := v.Segments()
- segmentsOther := other.Segments()
+ segmentsSelf := v.Segments64()
+ segmentsOther := other.Segments64()
// If the segments are the same, we must compare on prerelease info
if reflect.DeepEqual(segmentsSelf, segmentsOther) {
@@ -106,21 +109,56 @@ func (v *Version) Compare(other *Version) int {
return comparePrereleases(preSelf, preOther)
}
+ // 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
- for i := 0; i < len(segmentsSelf); i++ {
+ // 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
- } else {
- return 1
}
+ // Otherwis, rhs was > lhs, they're not equal
+ return 1
}
- panic("should not be reached")
+ // if we got this far, they're equal
+ return 0
+}
+
+func allZero(segs []int64) bool {
+ for _, s := range segs {
+ if s != 0 {
+ return false
+ }
+ }
+ return true
}
func comparePart(preSelf string, preOther string) int {
@@ -128,24 +166,42 @@ func comparePart(preSelf string, preOther string) int {
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 == "" {
- _, notIsNumeric := strconv.ParseInt(preOther, 10, 64)
- if notIsNumeric == nil {
+ if otherNumeric {
return -1
}
return 1
}
if preOther == "" {
- _, notIsNumeric := strconv.ParseInt(preSelf, 10, 64)
- if notIsNumeric == nil {
+ if selfNumeric {
return 1
}
return -1
}
- if preSelf > preOther {
+ 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
}
@@ -226,12 +282,25 @@ func (v *Version) Prerelease() string {
return v.pre
}
-// Segments returns the numeric segments of the version as a slice.
+// 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 {
return v.segments
}
@@ -239,7 +308,13 @@ func (v *Version) Segments() []int {
// and metadata information.
func (v *Version) String() string {
var buf bytes.Buffer
- fmt.Fprintf(&buf, "%d.%d.%d", v.segments[0], v.segments[1], v.segments[2])
+ 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)
}
diff --git a/vendor/github.com/hashicorp/yamux/.gitignore b/vendor/github.com/hashicorp/yamux/.gitignore
new file mode 100644
index 00000000000..836562412fe
--- /dev/null
+++ b/vendor/github.com/hashicorp/yamux/.gitignore
@@ -0,0 +1,23 @@
+# 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
diff --git a/vendor/github.com/hashicorp/yamux/session.go b/vendor/github.com/hashicorp/yamux/session.go
index e17981839f4..3f5f4ff2daf 100644
--- a/vendor/github.com/hashicorp/yamux/session.go
+++ b/vendor/github.com/hashicorp/yamux/session.go
@@ -123,6 +123,12 @@ func (s *Session) IsClosed() bool {
}
}
+// CloseChan returns a read-only channel which is closed as
+// soon as the session is closed.
+func (s *Session) CloseChan() <-chan struct{} {
+ return s.shutdownCh
+}
+
// NumStreams returns the number of currently open streams
func (s *Session) NumStreams() int {
s.streamLock.Lock()
diff --git a/vendor/github.com/hashicorp/yamux/stream.go b/vendor/github.com/hashicorp/yamux/stream.go
index d216e281ca1..d135ff0fadd 100644
--- a/vendor/github.com/hashicorp/yamux/stream.go
+++ b/vendor/github.com/hashicorp/yamux/stream.go
@@ -47,8 +47,8 @@ type Stream struct {
recvNotifyCh chan struct{}
sendNotifyCh chan struct{}
- readDeadline time.Time
- writeDeadline time.Time
+ readDeadline atomic.Value // time.Time
+ writeDeadline atomic.Value // time.Time
}
// newStream is used to construct a new stream within
@@ -67,6 +67,8 @@ func newStream(session *Session, id uint32, state streamState) *Stream {
recvNotifyCh: make(chan struct{}, 1),
sendNotifyCh: make(chan struct{}, 1),
}
+ s.readDeadline.Store(time.Time{})
+ s.writeDeadline.Store(time.Time{})
return s
}
@@ -122,8 +124,9 @@ START:
WAIT:
var timeout <-chan time.Time
var timer *time.Timer
- if !s.readDeadline.IsZero() {
- delay := s.readDeadline.Sub(time.Now())
+ readDeadline := s.readDeadline.Load().(time.Time)
+ if !readDeadline.IsZero() {
+ delay := readDeadline.Sub(time.Now())
timer = time.NewTimer(delay)
timeout = timer.C
}
@@ -188,7 +191,7 @@ START:
// Send the header
s.sendHdr.encode(typeData, flags, s.id, max)
- if err := s.session.waitForSendErr(s.sendHdr, body, s.sendErr); err != nil {
+ if err = s.session.waitForSendErr(s.sendHdr, body, s.sendErr); err != nil {
return 0, err
}
@@ -200,8 +203,9 @@ START:
WAIT:
var timeout <-chan time.Time
- if !s.writeDeadline.IsZero() {
- delay := s.writeDeadline.Sub(time.Now())
+ writeDeadline := s.writeDeadline.Load().(time.Time)
+ if !writeDeadline.IsZero() {
+ delay := writeDeadline.Sub(time.Now())
timeout = time.After(delay)
}
select {
@@ -435,13 +439,13 @@ func (s *Stream) SetDeadline(t time.Time) error {
// SetReadDeadline sets the deadline for future Read calls.
func (s *Stream) SetReadDeadline(t time.Time) error {
- s.readDeadline = t
+ s.readDeadline.Store(t)
return nil
}
// SetWriteDeadline sets the deadline for future Write calls
func (s *Stream) SetWriteDeadline(t time.Time) error {
- s.writeDeadline = t
+ s.writeDeadline.Store(t)
return nil
}
diff --git a/vendor/github.com/inconshreveable/log15/.mailmap b/vendor/github.com/inconshreveable/log15/.mailmap
new file mode 100644
index 00000000000..6db63a4f46d
--- /dev/null
+++ b/vendor/github.com/inconshreveable/log15/.mailmap
@@ -0,0 +1,26 @@
+Aaron L
+Alan Shreve
+Andy Walker
+Andy Watson
+Chris Hines Chris Hines
+Ciaran Downey
+Dmitry Chestnykh
+Evan Shaw
+Gonzalo Serrano
+Jeremy
+Jonathan Rudenberg
+Kevin Burke
+Marc Abramowitz
+Nathan Baulch
+NotZippy
+Péter Szilágyi
+Robert Egorov
+Robert Starbuck
+Robert Zaremba
+Spencer Nelson
+Tomasz Grodzki
+Trevor Gattis
+Vincent Vanackere
+Will McGovern
+Carl Veazey
+Kang Seong-Min
diff --git a/vendor/github.com/inconshreveable/log15/term/terminal_appengine.go b/vendor/github.com/inconshreveable/log15/term/terminal_appengine.go
deleted file mode 100644
index c1b5d2a3b1a..00000000000
--- a/vendor/github.com/inconshreveable/log15/term/terminal_appengine.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Based on ssh/terminal:
-// 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.
-
-// +build appengine
-
-package term
-
-// IsTty always returns false on AppEngine.
-func IsTty(fd uintptr) bool {
- return false
-}
diff --git a/vendor/github.com/inconshreveable/log15/term/terminal_darwin.go b/vendor/github.com/inconshreveable/log15/term/terminal_darwin.go
deleted file mode 100644
index d8f351b1b1a..00000000000
--- a/vendor/github.com/inconshreveable/log15/term/terminal_darwin.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Based on ssh/terminal:
-// 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.
-// +build !appengine
-
-package term
-
-import "syscall"
-
-const ioctlReadTermios = syscall.TIOCGETA
-
-type Termios syscall.Termios
diff --git a/vendor/github.com/inconshreveable/log15/term/terminal_freebsd.go b/vendor/github.com/inconshreveable/log15/term/terminal_freebsd.go
deleted file mode 100644
index cfaceab337a..00000000000
--- a/vendor/github.com/inconshreveable/log15/term/terminal_freebsd.go
+++ /dev/null
@@ -1,18 +0,0 @@
-package term
-
-import (
- "syscall"
-)
-
-const ioctlReadTermios = syscall.TIOCGETA
-
-// Go 1.2 doesn't include Termios for FreeBSD. This should be added in 1.3 and this could be merged with terminal_darwin.
-type Termios struct {
- Iflag uint32
- Oflag uint32
- Cflag uint32
- Lflag uint32
- Cc [20]uint8
- Ispeed uint32
- Ospeed uint32
-}
diff --git a/vendor/github.com/inconshreveable/log15/term/terminal_linux.go b/vendor/github.com/inconshreveable/log15/term/terminal_linux.go
deleted file mode 100644
index 5290468d698..00000000000
--- a/vendor/github.com/inconshreveable/log15/term/terminal_linux.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Based on ssh/terminal:
-// 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.
-
-// +build !appengine
-
-package term
-
-import "syscall"
-
-const ioctlReadTermios = syscall.TCGETS
-
-type Termios syscall.Termios
diff --git a/vendor/github.com/inconshreveable/log15/term/terminal_netbsd.go b/vendor/github.com/inconshreveable/log15/term/terminal_netbsd.go
deleted file mode 100644
index f9bb9e1c23b..00000000000
--- a/vendor/github.com/inconshreveable/log15/term/terminal_netbsd.go
+++ /dev/null
@@ -1,7 +0,0 @@
-package term
-
-import "syscall"
-
-const ioctlReadTermios = syscall.TIOCGETA
-
-type Termios syscall.Termios
diff --git a/vendor/github.com/inconshreveable/log15/term/terminal_notwindows.go b/vendor/github.com/inconshreveable/log15/term/terminal_notwindows.go
deleted file mode 100644
index c9af534f62f..00000000000
--- a/vendor/github.com/inconshreveable/log15/term/terminal_notwindows.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// Based on ssh/terminal:
-// 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.
-
-// +build linux,!appengine darwin freebsd openbsd netbsd
-
-package term
-
-import (
- "syscall"
- "unsafe"
-)
-
-// IsTty returns true if the given file descriptor is a terminal.
-func IsTty(fd uintptr) bool {
- var termios Termios
- _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
- return err == 0
-}
diff --git a/vendor/github.com/inconshreveable/log15/term/terminal_openbsd.go b/vendor/github.com/inconshreveable/log15/term/terminal_openbsd.go
deleted file mode 100644
index f9bb9e1c23b..00000000000
--- a/vendor/github.com/inconshreveable/log15/term/terminal_openbsd.go
+++ /dev/null
@@ -1,7 +0,0 @@
-package term
-
-import "syscall"
-
-const ioctlReadTermios = syscall.TIOCGETA
-
-type Termios syscall.Termios
diff --git a/vendor/github.com/inconshreveable/log15/term/terminal_solaris.go b/vendor/github.com/inconshreveable/log15/term/terminal_solaris.go
deleted file mode 100644
index 033c163246e..00000000000
--- a/vendor/github.com/inconshreveable/log15/term/terminal_solaris.go
+++ /dev/null
@@ -1,9 +0,0 @@
-package term
-
-import "golang.org/x/sys/unix"
-
-// IsTty returns true if the given file descriptor is a terminal.
-func IsTty(fd uintptr) bool {
- _, err := unix.IoctlGetTermios(int(fd), unix.TCGETA)
- return err == nil
-}
diff --git a/vendor/github.com/inconshreveable/log15/term/terminal_windows.go b/vendor/github.com/inconshreveable/log15/term/terminal_windows.go
deleted file mode 100644
index df3c30c1589..00000000000
--- a/vendor/github.com/inconshreveable/log15/term/terminal_windows.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// Based on ssh/terminal:
-// 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.
-
-// +build windows
-
-package term
-
-import (
- "syscall"
- "unsafe"
-)
-
-var kernel32 = syscall.NewLazyDLL("kernel32.dll")
-
-var (
- procGetConsoleMode = kernel32.NewProc("GetConsoleMode")
-)
-
-// IsTty returns true if the given file descriptor is a terminal.
-func IsTty(fd uintptr) bool {
- var st uint32
- r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, fd, uintptr(unsafe.Pointer(&st)), 0)
- return r != 0 && e == 0
-}
diff --git a/vendor/github.com/jmespath/go-jmespath/Makefile b/vendor/github.com/jmespath/go-jmespath/Makefile
index ad17bf0012e..a828d2848f0 100644
--- a/vendor/github.com/jmespath/go-jmespath/Makefile
+++ b/vendor/github.com/jmespath/go-jmespath/Makefile
@@ -35,7 +35,7 @@ buildfuzz:
go-fuzz-build github.com/jmespath/go-jmespath/fuzz
fuzz: buildfuzz
- go-fuzz -bin=./jmespath-fuzz.zip -workdir=fuzz/corpus
+ go-fuzz -bin=./jmespath-fuzz.zip -workdir=fuzz/testdata
bench:
go test -bench . -cpuprofile cpu.out
diff --git a/vendor/github.com/jmespath/go-jmespath/api.go b/vendor/github.com/jmespath/go-jmespath/api.go
index 67df3fc1c87..9cfa988bc5b 100644
--- a/vendor/github.com/jmespath/go-jmespath/api.go
+++ b/vendor/github.com/jmespath/go-jmespath/api.go
@@ -1,5 +1,42 @@
package jmespath
+import "strconv"
+
+// JmesPath is the epresentation of a compiled JMES path query. A JmesPath is
+// safe for concurrent use by multiple goroutines.
+type JMESPath struct {
+ ast ASTNode
+ intr *treeInterpreter
+}
+
+// Compile parses a JMESPath expression and returns, if successful, a JMESPath
+// object that can be used to match against data.
+func Compile(expression string) (*JMESPath, error) {
+ parser := NewParser()
+ ast, err := parser.Parse(expression)
+ if err != nil {
+ return nil, err
+ }
+ jmespath := &JMESPath{ast: ast, intr: newInterpreter()}
+ return jmespath, nil
+}
+
+// MustCompile is like Compile but panics if the expression cannot be parsed.
+// It simplifies safe initialization of global variables holding compiled
+// JMESPaths.
+func MustCompile(expression string) *JMESPath {
+ jmespath, err := Compile(expression)
+ if err != nil {
+ panic(`jmespath: Compile(` + strconv.Quote(expression) + `): ` + err.Error())
+ }
+ return jmespath
+}
+
+// Search evaluates a JMESPath expression against input data and returns the result.
+func (jp *JMESPath) Search(data interface{}) (interface{}, error) {
+ return jp.intr.Execute(jp.ast, data)
+}
+
// Search evaluates a JMESPath expression against input data and returns the result.
func Search(expression string, data interface{}) (interface{}, error) {
intr := newInterpreter()
diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/basic.json b/vendor/github.com/jmespath/go-jmespath/compliance/basic.json
deleted file mode 100644
index d550e969547..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/compliance/basic.json
+++ /dev/null
@@ -1,96 +0,0 @@
-[{
- "given":
- {"foo": {"bar": {"baz": "correct"}}},
- "cases": [
- {
- "expression": "foo",
- "result": {"bar": {"baz": "correct"}}
- },
- {
- "expression": "foo.bar",
- "result": {"baz": "correct"}
- },
- {
- "expression": "foo.bar.baz",
- "result": "correct"
- },
- {
- "expression": "foo\n.\nbar\n.baz",
- "result": "correct"
- },
- {
- "expression": "foo.bar.baz.bad",
- "result": null
- },
- {
- "expression": "foo.bar.bad",
- "result": null
- },
- {
- "expression": "foo.bad",
- "result": null
- },
- {
- "expression": "bad",
- "result": null
- },
- {
- "expression": "bad.morebad.morebad",
- "result": null
- }
- ]
-},
-{
- "given":
- {"foo": {"bar": ["one", "two", "three"]}},
- "cases": [
- {
- "expression": "foo",
- "result": {"bar": ["one", "two", "three"]}
- },
- {
- "expression": "foo.bar",
- "result": ["one", "two", "three"]
- }
- ]
-},
-{
- "given": ["one", "two", "three"],
- "cases": [
- {
- "expression": "one",
- "result": null
- },
- {
- "expression": "two",
- "result": null
- },
- {
- "expression": "three",
- "result": null
- },
- {
- "expression": "one.two",
- "result": null
- }
- ]
-},
-{
- "given":
- {"foo": {"1": ["one", "two", "three"], "-1": "bar"}},
- "cases": [
- {
- "expression": "foo.\"1\"",
- "result": ["one", "two", "three"]
- },
- {
- "expression": "foo.\"1\"[0]",
- "result": "one"
- },
- {
- "expression": "foo.\"-1\"",
- "result": "bar"
- }
- ]
-}
-]
diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/boolean.json b/vendor/github.com/jmespath/go-jmespath/compliance/boolean.json
deleted file mode 100644
index e3fa196b14f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/compliance/boolean.json
+++ /dev/null
@@ -1,257 +0,0 @@
-[
- {
- "given": {
- "outer": {
- "foo": "foo",
- "bar": "bar",
- "baz": "baz"
- }
- },
- "cases": [
- {
- "expression": "outer.foo || outer.bar",
- "result": "foo"
- },
- {
- "expression": "outer.foo||outer.bar",
- "result": "foo"
- },
- {
- "expression": "outer.bar || outer.baz",
- "result": "bar"
- },
- {
- "expression": "outer.bar||outer.baz",
- "result": "bar"
- },
- {
- "expression": "outer.bad || outer.foo",
- "result": "foo"
- },
- {
- "expression": "outer.bad||outer.foo",
- "result": "foo"
- },
- {
- "expression": "outer.foo || outer.bad",
- "result": "foo"
- },
- {
- "expression": "outer.foo||outer.bad",
- "result": "foo"
- },
- {
- "expression": "outer.bad || outer.alsobad",
- "result": null
- },
- {
- "expression": "outer.bad||outer.alsobad",
- "result": null
- }
- ]
- },
- {
- "given": {
- "outer": {
- "foo": "foo",
- "bool": false,
- "empty_list": [],
- "empty_string": ""
- }
- },
- "cases": [
- {
- "expression": "outer.empty_string || outer.foo",
- "result": "foo"
- },
- {
- "expression": "outer.nokey || outer.bool || outer.empty_list || outer.empty_string || outer.foo",
- "result": "foo"
- }
- ]
- },
- {
- "given": {
- "True": true,
- "False": false,
- "Number": 5,
- "EmptyList": [],
- "Zero": 0
- },
- "cases": [
- {
- "expression": "True && False",
- "result": false
- },
- {
- "expression": "False && True",
- "result": false
- },
- {
- "expression": "True && True",
- "result": true
- },
- {
- "expression": "False && False",
- "result": false
- },
- {
- "expression": "True && Number",
- "result": 5
- },
- {
- "expression": "Number && True",
- "result": true
- },
- {
- "expression": "Number && False",
- "result": false
- },
- {
- "expression": "Number && EmptyList",
- "result": []
- },
- {
- "expression": "Number && True",
- "result": true
- },
- {
- "expression": "EmptyList && True",
- "result": []
- },
- {
- "expression": "EmptyList && False",
- "result": []
- },
- {
- "expression": "True || False",
- "result": true
- },
- {
- "expression": "True || True",
- "result": true
- },
- {
- "expression": "False || True",
- "result": true
- },
- {
- "expression": "False || False",
- "result": false
- },
- {
- "expression": "Number || EmptyList",
- "result": 5
- },
- {
- "expression": "Number || True",
- "result": 5
- },
- {
- "expression": "Number || True && False",
- "result": 5
- },
- {
- "expression": "(Number || True) && False",
- "result": false
- },
- {
- "expression": "Number || (True && False)",
- "result": 5
- },
- {
- "expression": "!True",
- "result": false
- },
- {
- "expression": "!False",
- "result": true
- },
- {
- "expression": "!Number",
- "result": false
- },
- {
- "expression": "!EmptyList",
- "result": true
- },
- {
- "expression": "True && !False",
- "result": true
- },
- {
- "expression": "True && !EmptyList",
- "result": true
- },
- {
- "expression": "!False && !EmptyList",
- "result": true
- },
- {
- "expression": "!(True && False)",
- "result": true
- },
- {
- "expression": "!Zero",
- "result": false
- },
- {
- "expression": "!!Zero",
- "result": true
- }
- ]
- },
- {
- "given": {
- "one": 1,
- "two": 2,
- "three": 3
- },
- "cases": [
- {
- "expression": "one < two",
- "result": true
- },
- {
- "expression": "one <= two",
- "result": true
- },
- {
- "expression": "one == one",
- "result": true
- },
- {
- "expression": "one == two",
- "result": false
- },
- {
- "expression": "one > two",
- "result": false
- },
- {
- "expression": "one >= two",
- "result": false
- },
- {
- "expression": "one != two",
- "result": true
- },
- {
- "expression": "one < two && three > one",
- "result": true
- },
- {
- "expression": "one < two || three > one",
- "result": true
- },
- {
- "expression": "one < two || three < one",
- "result": true
- },
- {
- "expression": "two < one || three < one",
- "result": false
- }
- ]
- }
-]
diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/current.json b/vendor/github.com/jmespath/go-jmespath/compliance/current.json
deleted file mode 100644
index 0c26248d079..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/compliance/current.json
+++ /dev/null
@@ -1,25 +0,0 @@
-[
- {
- "given": {
- "foo": [{"name": "a"}, {"name": "b"}],
- "bar": {"baz": "qux"}
- },
- "cases": [
- {
- "expression": "@",
- "result": {
- "foo": [{"name": "a"}, {"name": "b"}],
- "bar": {"baz": "qux"}
- }
- },
- {
- "expression": "@.bar",
- "result": {"baz": "qux"}
- },
- {
- "expression": "@.foo[0]",
- "result": {"name": "a"}
- }
- ]
- }
-]
diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/escape.json b/vendor/github.com/jmespath/go-jmespath/compliance/escape.json
deleted file mode 100644
index 4a62d951a65..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/compliance/escape.json
+++ /dev/null
@@ -1,46 +0,0 @@
-[{
- "given": {
- "foo.bar": "dot",
- "foo bar": "space",
- "foo\nbar": "newline",
- "foo\"bar": "doublequote",
- "c:\\\\windows\\path": "windows",
- "/unix/path": "unix",
- "\"\"\"": "threequotes",
- "bar": {"baz": "qux"}
- },
- "cases": [
- {
- "expression": "\"foo.bar\"",
- "result": "dot"
- },
- {
- "expression": "\"foo bar\"",
- "result": "space"
- },
- {
- "expression": "\"foo\\nbar\"",
- "result": "newline"
- },
- {
- "expression": "\"foo\\\"bar\"",
- "result": "doublequote"
- },
- {
- "expression": "\"c:\\\\\\\\windows\\\\path\"",
- "result": "windows"
- },
- {
- "expression": "\"/unix/path\"",
- "result": "unix"
- },
- {
- "expression": "\"\\\"\\\"\\\"\"",
- "result": "threequotes"
- },
- {
- "expression": "\"bar\".\"baz\"",
- "result": "qux"
- }
- ]
-}]
diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/filters.json b/vendor/github.com/jmespath/go-jmespath/compliance/filters.json
deleted file mode 100644
index 5b9f52b1159..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/compliance/filters.json
+++ /dev/null
@@ -1,468 +0,0 @@
-[
- {
- "given": {"foo": [{"name": "a"}, {"name": "b"}]},
- "cases": [
- {
- "comment": "Matching a literal",
- "expression": "foo[?name == 'a']",
- "result": [{"name": "a"}]
- }
- ]
- },
- {
- "given": {"foo": [0, 1], "bar": [2, 3]},
- "cases": [
- {
- "comment": "Matching a literal",
- "expression": "*[?[0] == `0`]",
- "result": [[], []]
- }
- ]
- },
- {
- "given": {"foo": [{"first": "foo", "last": "bar"},
- {"first": "foo", "last": "foo"},
- {"first": "foo", "last": "baz"}]},
- "cases": [
- {
- "comment": "Matching an expression",
- "expression": "foo[?first == last]",
- "result": [{"first": "foo", "last": "foo"}]
- },
- {
- "comment": "Verify projection created from filter",
- "expression": "foo[?first == last].first",
- "result": ["foo"]
- }
- ]
- },
- {
- "given": {"foo": [{"age": 20},
- {"age": 25},
- {"age": 30}]},
- "cases": [
- {
- "comment": "Greater than with a number",
- "expression": "foo[?age > `25`]",
- "result": [{"age": 30}]
- },
- {
- "expression": "foo[?age >= `25`]",
- "result": [{"age": 25}, {"age": 30}]
- },
- {
- "comment": "Greater than with a number",
- "expression": "foo[?age > `30`]",
- "result": []
- },
- {
- "comment": "Greater than with a number",
- "expression": "foo[?age < `25`]",
- "result": [{"age": 20}]
- },
- {
- "comment": "Greater than with a number",
- "expression": "foo[?age <= `25`]",
- "result": [{"age": 20}, {"age": 25}]
- },
- {
- "comment": "Greater than with a number",
- "expression": "foo[?age < `20`]",
- "result": []
- },
- {
- "expression": "foo[?age == `20`]",
- "result": [{"age": 20}]
- },
- {
- "expression": "foo[?age != `20`]",
- "result": [{"age": 25}, {"age": 30}]
- }
- ]
- },
- {
- "given": {"foo": [{"top": {"name": "a"}},
- {"top": {"name": "b"}}]},
- "cases": [
- {
- "comment": "Filter with subexpression",
- "expression": "foo[?top.name == 'a']",
- "result": [{"top": {"name": "a"}}]
- }
- ]
- },
- {
- "given": {"foo": [{"top": {"first": "foo", "last": "bar"}},
- {"top": {"first": "foo", "last": "foo"}},
- {"top": {"first": "foo", "last": "baz"}}]},
- "cases": [
- {
- "comment": "Matching an expression",
- "expression": "foo[?top.first == top.last]",
- "result": [{"top": {"first": "foo", "last": "foo"}}]
- },
- {
- "comment": "Matching a JSON array",
- "expression": "foo[?top == `{\"first\": \"foo\", \"last\": \"bar\"}`]",
- "result": [{"top": {"first": "foo", "last": "bar"}}]
- }
- ]
- },
- {
- "given": {"foo": [
- {"key": true},
- {"key": false},
- {"key": 0},
- {"key": 1},
- {"key": [0]},
- {"key": {"bar": [0]}},
- {"key": null},
- {"key": [1]},
- {"key": {"a":2}}
- ]},
- "cases": [
- {
- "expression": "foo[?key == `true`]",
- "result": [{"key": true}]
- },
- {
- "expression": "foo[?key == `false`]",
- "result": [{"key": false}]
- },
- {
- "expression": "foo[?key == `0`]",
- "result": [{"key": 0}]
- },
- {
- "expression": "foo[?key == `1`]",
- "result": [{"key": 1}]
- },
- {
- "expression": "foo[?key == `[0]`]",
- "result": [{"key": [0]}]
- },
- {
- "expression": "foo[?key == `{\"bar\": [0]}`]",
- "result": [{"key": {"bar": [0]}}]
- },
- {
- "expression": "foo[?key == `null`]",
- "result": [{"key": null}]
- },
- {
- "expression": "foo[?key == `[1]`]",
- "result": [{"key": [1]}]
- },
- {
- "expression": "foo[?key == `{\"a\":2}`]",
- "result": [{"key": {"a":2}}]
- },
- {
- "expression": "foo[?`true` == key]",
- "result": [{"key": true}]
- },
- {
- "expression": "foo[?`false` == key]",
- "result": [{"key": false}]
- },
- {
- "expression": "foo[?`0` == key]",
- "result": [{"key": 0}]
- },
- {
- "expression": "foo[?`1` == key]",
- "result": [{"key": 1}]
- },
- {
- "expression": "foo[?`[0]` == key]",
- "result": [{"key": [0]}]
- },
- {
- "expression": "foo[?`{\"bar\": [0]}` == key]",
- "result": [{"key": {"bar": [0]}}]
- },
- {
- "expression": "foo[?`null` == key]",
- "result": [{"key": null}]
- },
- {
- "expression": "foo[?`[1]` == key]",
- "result": [{"key": [1]}]
- },
- {
- "expression": "foo[?`{\"a\":2}` == key]",
- "result": [{"key": {"a":2}}]
- },
- {
- "expression": "foo[?key != `true`]",
- "result": [{"key": false}, {"key": 0}, {"key": 1}, {"key": [0]},
- {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}]
- },
- {
- "expression": "foo[?key != `false`]",
- "result": [{"key": true}, {"key": 0}, {"key": 1}, {"key": [0]},
- {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}]
- },
- {
- "expression": "foo[?key != `0`]",
- "result": [{"key": true}, {"key": false}, {"key": 1}, {"key": [0]},
- {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}]
- },
- {
- "expression": "foo[?key != `1`]",
- "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": [0]},
- {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}]
- },
- {
- "expression": "foo[?key != `null`]",
- "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]},
- {"key": {"bar": [0]}}, {"key": [1]}, {"key": {"a":2}}]
- },
- {
- "expression": "foo[?key != `[1]`]",
- "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]},
- {"key": {"bar": [0]}}, {"key": null}, {"key": {"a":2}}]
- },
- {
- "expression": "foo[?key != `{\"a\":2}`]",
- "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]},
- {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}]
- },
- {
- "expression": "foo[?`true` != key]",
- "result": [{"key": false}, {"key": 0}, {"key": 1}, {"key": [0]},
- {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}]
- },
- {
- "expression": "foo[?`false` != key]",
- "result": [{"key": true}, {"key": 0}, {"key": 1}, {"key": [0]},
- {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}]
- },
- {
- "expression": "foo[?`0` != key]",
- "result": [{"key": true}, {"key": false}, {"key": 1}, {"key": [0]},
- {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}]
- },
- {
- "expression": "foo[?`1` != key]",
- "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": [0]},
- {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}, {"key": {"a":2}}]
- },
- {
- "expression": "foo[?`null` != key]",
- "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]},
- {"key": {"bar": [0]}}, {"key": [1]}, {"key": {"a":2}}]
- },
- {
- "expression": "foo[?`[1]` != key]",
- "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]},
- {"key": {"bar": [0]}}, {"key": null}, {"key": {"a":2}}]
- },
- {
- "expression": "foo[?`{\"a\":2}` != key]",
- "result": [{"key": true}, {"key": false}, {"key": 0}, {"key": 1}, {"key": [0]},
- {"key": {"bar": [0]}}, {"key": null}, {"key": [1]}]
- }
- ]
- },
- {
- "given": {"reservations": [
- {"instances": [
- {"foo": 1, "bar": 2}, {"foo": 1, "bar": 3},
- {"foo": 1, "bar": 2}, {"foo": 2, "bar": 1}]}]},
- "cases": [
- {
- "expression": "reservations[].instances[?bar==`1`]",
- "result": [[{"foo": 2, "bar": 1}]]
- },
- {
- "expression": "reservations[*].instances[?bar==`1`]",
- "result": [[{"foo": 2, "bar": 1}]]
- },
- {
- "expression": "reservations[].instances[?bar==`1`][]",
- "result": [{"foo": 2, "bar": 1}]
- }
- ]
- },
- {
- "given": {
- "baz": "other",
- "foo": [
- {"bar": 1}, {"bar": 2}, {"bar": 3}, {"bar": 4}, {"bar": 1, "baz": 2}
- ]
- },
- "cases": [
- {
- "expression": "foo[?bar==`1`].bar[0]",
- "result": []
- }
- ]
- },
- {
- "given": {
- "foo": [
- {"a": 1, "b": {"c": "x"}},
- {"a": 1, "b": {"c": "y"}},
- {"a": 1, "b": {"c": "z"}},
- {"a": 2, "b": {"c": "z"}},
- {"a": 1, "baz": 2}
- ]
- },
- "cases": [
- {
- "expression": "foo[?a==`1`].b.c",
- "result": ["x", "y", "z"]
- }
- ]
- },
- {
- "given": {"foo": [{"name": "a"}, {"name": "b"}, {"name": "c"}]},
- "cases": [
- {
- "comment": "Filter with or expression",
- "expression": "foo[?name == 'a' || name == 'b']",
- "result": [{"name": "a"}, {"name": "b"}]
- },
- {
- "expression": "foo[?name == 'a' || name == 'e']",
- "result": [{"name": "a"}]
- },
- {
- "expression": "foo[?name == 'a' || name == 'b' || name == 'c']",
- "result": [{"name": "a"}, {"name": "b"}, {"name": "c"}]
- }
- ]
- },
- {
- "given": {"foo": [{"a": 1, "b": 2}, {"a": 1, "b": 3}]},
- "cases": [
- {
- "comment": "Filter with and expression",
- "expression": "foo[?a == `1` && b == `2`]",
- "result": [{"a": 1, "b": 2}]
- },
- {
- "expression": "foo[?a == `1` && b == `4`]",
- "result": []
- }
- ]
- },
- {
- "given": {"foo": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}]},
- "cases": [
- {
- "comment": "Filter with Or and And expressions",
- "expression": "foo[?c == `3` || a == `1` && b == `4`]",
- "result": [{"a": 1, "b": 2, "c": 3}]
- },
- {
- "expression": "foo[?b == `2` || a == `3` && b == `4`]",
- "result": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}]
- },
- {
- "expression": "foo[?a == `3` && b == `4` || b == `2`]",
- "result": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}]
- },
- {
- "expression": "foo[?(a == `3` && b == `4`) || b == `2`]",
- "result": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}]
- },
- {
- "expression": "foo[?((a == `3` && b == `4`)) || b == `2`]",
- "result": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}]
- },
- {
- "expression": "foo[?a == `3` && (b == `4` || b == `2`)]",
- "result": [{"a": 3, "b": 4}]
- },
- {
- "expression": "foo[?a == `3` && ((b == `4` || b == `2`))]",
- "result": [{"a": 3, "b": 4}]
- }
- ]
- },
- {
- "given": {"foo": [{"a": 1, "b": 2, "c": 3}, {"a": 3, "b": 4}]},
- "cases": [
- {
- "comment": "Verify precedence of or/and expressions",
- "expression": "foo[?a == `1` || b ==`2` && c == `5`]",
- "result": [{"a": 1, "b": 2, "c": 3}]
- },
- {
- "comment": "Parentheses can alter precedence",
- "expression": "foo[?(a == `1` || b ==`2`) && c == `5`]",
- "result": []
- },
- {
- "comment": "Not expressions combined with and/or",
- "expression": "foo[?!(a == `1` || b ==`2`)]",
- "result": [{"a": 3, "b": 4}]
- }
- ]
- },
- {
- "given": {
- "foo": [
- {"key": true},
- {"key": false},
- {"key": []},
- {"key": {}},
- {"key": [0]},
- {"key": {"a": "b"}},
- {"key": 0},
- {"key": 1},
- {"key": null},
- {"notkey": true}
- ]
- },
- "cases": [
- {
- "comment": "Unary filter expression",
- "expression": "foo[?key]",
- "result": [
- {"key": true}, {"key": [0]}, {"key": {"a": "b"}},
- {"key": 0}, {"key": 1}
- ]
- },
- {
- "comment": "Unary not filter expression",
- "expression": "foo[?!key]",
- "result": [
- {"key": false}, {"key": []}, {"key": {}},
- {"key": null}, {"notkey": true}
- ]
- },
- {
- "comment": "Equality with null RHS",
- "expression": "foo[?key == `null`]",
- "result": [
- {"key": null}, {"notkey": true}
- ]
- }
- ]
- },
- {
- "given": {
- "foo": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
- },
- "cases": [
- {
- "comment": "Using @ in a filter expression",
- "expression": "foo[?@ < `5`]",
- "result": [0, 1, 2, 3, 4]
- },
- {
- "comment": "Using @ in a filter expression",
- "expression": "foo[?`5` > @]",
- "result": [0, 1, 2, 3, 4]
- },
- {
- "comment": "Using @ in a filter expression",
- "expression": "foo[?@ == @]",
- "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
- }
- ]
- }
-]
diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/functions.json b/vendor/github.com/jmespath/go-jmespath/compliance/functions.json
deleted file mode 100644
index 8b8db363a2b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/compliance/functions.json
+++ /dev/null
@@ -1,825 +0,0 @@
-[{
- "given":
- {
- "foo": -1,
- "zero": 0,
- "numbers": [-1, 3, 4, 5],
- "array": [-1, 3, 4, 5, "a", "100"],
- "strings": ["a", "b", "c"],
- "decimals": [1.01, 1.2, -1.5],
- "str": "Str",
- "false": false,
- "empty_list": [],
- "empty_hash": {},
- "objects": {"foo": "bar", "bar": "baz"},
- "null_key": null
- },
- "cases": [
- {
- "expression": "abs(foo)",
- "result": 1
- },
- {
- "expression": "abs(foo)",
- "result": 1
- },
- {
- "expression": "abs(str)",
- "error": "invalid-type"
- },
- {
- "expression": "abs(array[1])",
- "result": 3
- },
- {
- "expression": "abs(array[1])",
- "result": 3
- },
- {
- "expression": "abs(`false`)",
- "error": "invalid-type"
- },
- {
- "expression": "abs(`-24`)",
- "result": 24
- },
- {
- "expression": "abs(`-24`)",
- "result": 24
- },
- {
- "expression": "abs(`1`, `2`)",
- "error": "invalid-arity"
- },
- {
- "expression": "abs()",
- "error": "invalid-arity"
- },
- {
- "expression": "unknown_function(`1`, `2`)",
- "error": "unknown-function"
- },
- {
- "expression": "avg(numbers)",
- "result": 2.75
- },
- {
- "expression": "avg(array)",
- "error": "invalid-type"
- },
- {
- "expression": "avg('abc')",
- "error": "invalid-type"
- },
- {
- "expression": "avg(foo)",
- "error": "invalid-type"
- },
- {
- "expression": "avg(@)",
- "error": "invalid-type"
- },
- {
- "expression": "avg(strings)",
- "error": "invalid-type"
- },
- {
- "expression": "ceil(`1.2`)",
- "result": 2
- },
- {
- "expression": "ceil(decimals[0])",
- "result": 2
- },
- {
- "expression": "ceil(decimals[1])",
- "result": 2
- },
- {
- "expression": "ceil(decimals[2])",
- "result": -1
- },
- {
- "expression": "ceil('string')",
- "error": "invalid-type"
- },
- {
- "expression": "contains('abc', 'a')",
- "result": true
- },
- {
- "expression": "contains('abc', 'd')",
- "result": false
- },
- {
- "expression": "contains(`false`, 'd')",
- "error": "invalid-type"
- },
- {
- "expression": "contains(strings, 'a')",
- "result": true
- },
- {
- "expression": "contains(decimals, `1.2`)",
- "result": true
- },
- {
- "expression": "contains(decimals, `false`)",
- "result": false
- },
- {
- "expression": "ends_with(str, 'r')",
- "result": true
- },
- {
- "expression": "ends_with(str, 'tr')",
- "result": true
- },
- {
- "expression": "ends_with(str, 'Str')",
- "result": true
- },
- {
- "expression": "ends_with(str, 'SStr')",
- "result": false
- },
- {
- "expression": "ends_with(str, 'foo')",
- "result": false
- },
- {
- "expression": "ends_with(str, `0`)",
- "error": "invalid-type"
- },
- {
- "expression": "floor(`1.2`)",
- "result": 1
- },
- {
- "expression": "floor('string')",
- "error": "invalid-type"
- },
- {
- "expression": "floor(decimals[0])",
- "result": 1
- },
- {
- "expression": "floor(foo)",
- "result": -1
- },
- {
- "expression": "floor(str)",
- "error": "invalid-type"
- },
- {
- "expression": "length('abc')",
- "result": 3
- },
- {
- "expression": "length('✓foo')",
- "result": 4
- },
- {
- "expression": "length('')",
- "result": 0
- },
- {
- "expression": "length(@)",
- "result": 12
- },
- {
- "expression": "length(strings[0])",
- "result": 1
- },
- {
- "expression": "length(str)",
- "result": 3
- },
- {
- "expression": "length(array)",
- "result": 6
- },
- {
- "expression": "length(objects)",
- "result": 2
- },
- {
- "expression": "length(`false`)",
- "error": "invalid-type"
- },
- {
- "expression": "length(foo)",
- "error": "invalid-type"
- },
- {
- "expression": "length(strings[0])",
- "result": 1
- },
- {
- "expression": "max(numbers)",
- "result": 5
- },
- {
- "expression": "max(decimals)",
- "result": 1.2
- },
- {
- "expression": "max(strings)",
- "result": "c"
- },
- {
- "expression": "max(abc)",
- "error": "invalid-type"
- },
- {
- "expression": "max(array)",
- "error": "invalid-type"
- },
- {
- "expression": "max(decimals)",
- "result": 1.2
- },
- {
- "expression": "max(empty_list)",
- "result": null
- },
- {
- "expression": "merge(`{}`)",
- "result": {}
- },
- {
- "expression": "merge(`{}`, `{}`)",
- "result": {}
- },
- {
- "expression": "merge(`{\"a\": 1}`, `{\"b\": 2}`)",
- "result": {"a": 1, "b": 2}
- },
- {
- "expression": "merge(`{\"a\": 1}`, `{\"a\": 2}`)",
- "result": {"a": 2}
- },
- {
- "expression": "merge(`{\"a\": 1, \"b\": 2}`, `{\"a\": 2, \"c\": 3}`, `{\"d\": 4}`)",
- "result": {"a": 2, "b": 2, "c": 3, "d": 4}
- },
- {
- "expression": "min(numbers)",
- "result": -1
- },
- {
- "expression": "min(decimals)",
- "result": -1.5
- },
- {
- "expression": "min(abc)",
- "error": "invalid-type"
- },
- {
- "expression": "min(array)",
- "error": "invalid-type"
- },
- {
- "expression": "min(empty_list)",
- "result": null
- },
- {
- "expression": "min(decimals)",
- "result": -1.5
- },
- {
- "expression": "min(strings)",
- "result": "a"
- },
- {
- "expression": "type('abc')",
- "result": "string"
- },
- {
- "expression": "type(`1.0`)",
- "result": "number"
- },
- {
- "expression": "type(`2`)",
- "result": "number"
- },
- {
- "expression": "type(`true`)",
- "result": "boolean"
- },
- {
- "expression": "type(`false`)",
- "result": "boolean"
- },
- {
- "expression": "type(`null`)",
- "result": "null"
- },
- {
- "expression": "type(`[0]`)",
- "result": "array"
- },
- {
- "expression": "type(`{\"a\": \"b\"}`)",
- "result": "object"
- },
- {
- "expression": "type(@)",
- "result": "object"
- },
- {
- "expression": "sort(keys(objects))",
- "result": ["bar", "foo"]
- },
- {
- "expression": "keys(foo)",
- "error": "invalid-type"
- },
- {
- "expression": "keys(strings)",
- "error": "invalid-type"
- },
- {
- "expression": "keys(`false`)",
- "error": "invalid-type"
- },
- {
- "expression": "sort(values(objects))",
- "result": ["bar", "baz"]
- },
- {
- "expression": "keys(empty_hash)",
- "result": []
- },
- {
- "expression": "values(foo)",
- "error": "invalid-type"
- },
- {
- "expression": "join(', ', strings)",
- "result": "a, b, c"
- },
- {
- "expression": "join(', ', strings)",
- "result": "a, b, c"
- },
- {
- "expression": "join(',', `[\"a\", \"b\"]`)",
- "result": "a,b"
- },
- {
- "expression": "join(',', `[\"a\", 0]`)",
- "error": "invalid-type"
- },
- {
- "expression": "join(', ', str)",
- "error": "invalid-type"
- },
- {
- "expression": "join('|', strings)",
- "result": "a|b|c"
- },
- {
- "expression": "join(`2`, strings)",
- "error": "invalid-type"
- },
- {
- "expression": "join('|', decimals)",
- "error": "invalid-type"
- },
- {
- "expression": "join('|', decimals[].to_string(@))",
- "result": "1.01|1.2|-1.5"
- },
- {
- "expression": "join('|', empty_list)",
- "result": ""
- },
- {
- "expression": "reverse(numbers)",
- "result": [5, 4, 3, -1]
- },
- {
- "expression": "reverse(array)",
- "result": ["100", "a", 5, 4, 3, -1]
- },
- {
- "expression": "reverse(`[]`)",
- "result": []
- },
- {
- "expression": "reverse('')",
- "result": ""
- },
- {
- "expression": "reverse('hello world')",
- "result": "dlrow olleh"
- },
- {
- "expression": "starts_with(str, 'S')",
- "result": true
- },
- {
- "expression": "starts_with(str, 'St')",
- "result": true
- },
- {
- "expression": "starts_with(str, 'Str')",
- "result": true
- },
- {
- "expression": "starts_with(str, 'String')",
- "result": false
- },
- {
- "expression": "starts_with(str, `0`)",
- "error": "invalid-type"
- },
- {
- "expression": "sum(numbers)",
- "result": 11
- },
- {
- "expression": "sum(decimals)",
- "result": 0.71
- },
- {
- "expression": "sum(array)",
- "error": "invalid-type"
- },
- {
- "expression": "sum(array[].to_number(@))",
- "result": 111
- },
- {
- "expression": "sum(`[]`)",
- "result": 0
- },
- {
- "expression": "to_array('foo')",
- "result": ["foo"]
- },
- {
- "expression": "to_array(`0`)",
- "result": [0]
- },
- {
- "expression": "to_array(objects)",
- "result": [{"foo": "bar", "bar": "baz"}]
- },
- {
- "expression": "to_array(`[1, 2, 3]`)",
- "result": [1, 2, 3]
- },
- {
- "expression": "to_array(false)",
- "result": [false]
- },
- {
- "expression": "to_string('foo')",
- "result": "foo"
- },
- {
- "expression": "to_string(`1.2`)",
- "result": "1.2"
- },
- {
- "expression": "to_string(`[0, 1]`)",
- "result": "[0,1]"
- },
- {
- "expression": "to_number('1.0')",
- "result": 1.0
- },
- {
- "expression": "to_number('1.1')",
- "result": 1.1
- },
- {
- "expression": "to_number('4')",
- "result": 4
- },
- {
- "expression": "to_number('notanumber')",
- "result": null
- },
- {
- "expression": "to_number(`false`)",
- "result": null
- },
- {
- "expression": "to_number(`null`)",
- "result": null
- },
- {
- "expression": "to_number(`[0]`)",
- "result": null
- },
- {
- "expression": "to_number(`{\"foo\": 0}`)",
- "result": null
- },
- {
- "expression": "\"to_string\"(`1.0`)",
- "error": "syntax"
- },
- {
- "expression": "sort(numbers)",
- "result": [-1, 3, 4, 5]
- },
- {
- "expression": "sort(strings)",
- "result": ["a", "b", "c"]
- },
- {
- "expression": "sort(decimals)",
- "result": [-1.5, 1.01, 1.2]
- },
- {
- "expression": "sort(array)",
- "error": "invalid-type"
- },
- {
- "expression": "sort(abc)",
- "error": "invalid-type"
- },
- {
- "expression": "sort(empty_list)",
- "result": []
- },
- {
- "expression": "sort(@)",
- "error": "invalid-type"
- },
- {
- "expression": "not_null(unknown_key, str)",
- "result": "Str"
- },
- {
- "expression": "not_null(unknown_key, foo.bar, empty_list, str)",
- "result": []
- },
- {
- "expression": "not_null(unknown_key, null_key, empty_list, str)",
- "result": []
- },
- {
- "expression": "not_null(all, expressions, are_null)",
- "result": null
- },
- {
- "expression": "not_null()",
- "error": "invalid-arity"
- },
- {
- "description": "function projection on single arg function",
- "expression": "numbers[].to_string(@)",
- "result": ["-1", "3", "4", "5"]
- },
- {
- "description": "function projection on single arg function",
- "expression": "array[].to_number(@)",
- "result": [-1, 3, 4, 5, 100]
- }
- ]
-}, {
- "given":
- {
- "foo": [
- {"b": "b", "a": "a"},
- {"c": "c", "b": "b"},
- {"d": "d", "c": "c"},
- {"e": "e", "d": "d"},
- {"f": "f", "e": "e"}
- ]
- },
- "cases": [
- {
- "description": "function projection on variadic function",
- "expression": "foo[].not_null(f, e, d, c, b, a)",
- "result": ["b", "c", "d", "e", "f"]
- }
- ]
-}, {
- "given":
- {
- "people": [
- {"age": 20, "age_str": "20", "bool": true, "name": "a", "extra": "foo"},
- {"age": 40, "age_str": "40", "bool": false, "name": "b", "extra": "bar"},
- {"age": 30, "age_str": "30", "bool": true, "name": "c"},
- {"age": 50, "age_str": "50", "bool": false, "name": "d"},
- {"age": 10, "age_str": "10", "bool": true, "name": 3}
- ]
- },
- "cases": [
- {
- "description": "sort by field expression",
- "expression": "sort_by(people, &age)",
- "result": [
- {"age": 10, "age_str": "10", "bool": true, "name": 3},
- {"age": 20, "age_str": "20", "bool": true, "name": "a", "extra": "foo"},
- {"age": 30, "age_str": "30", "bool": true, "name": "c"},
- {"age": 40, "age_str": "40", "bool": false, "name": "b", "extra": "bar"},
- {"age": 50, "age_str": "50", "bool": false, "name": "d"}
- ]
- },
- {
- "expression": "sort_by(people, &age_str)",
- "result": [
- {"age": 10, "age_str": "10", "bool": true, "name": 3},
- {"age": 20, "age_str": "20", "bool": true, "name": "a", "extra": "foo"},
- {"age": 30, "age_str": "30", "bool": true, "name": "c"},
- {"age": 40, "age_str": "40", "bool": false, "name": "b", "extra": "bar"},
- {"age": 50, "age_str": "50", "bool": false, "name": "d"}
- ]
- },
- {
- "description": "sort by function expression",
- "expression": "sort_by(people, &to_number(age_str))",
- "result": [
- {"age": 10, "age_str": "10", "bool": true, "name": 3},
- {"age": 20, "age_str": "20", "bool": true, "name": "a", "extra": "foo"},
- {"age": 30, "age_str": "30", "bool": true, "name": "c"},
- {"age": 40, "age_str": "40", "bool": false, "name": "b", "extra": "bar"},
- {"age": 50, "age_str": "50", "bool": false, "name": "d"}
- ]
- },
- {
- "description": "function projection on sort_by function",
- "expression": "sort_by(people, &age)[].name",
- "result": [3, "a", "c", "b", "d"]
- },
- {
- "expression": "sort_by(people, &extra)",
- "error": "invalid-type"
- },
- {
- "expression": "sort_by(people, &bool)",
- "error": "invalid-type"
- },
- {
- "expression": "sort_by(people, &name)",
- "error": "invalid-type"
- },
- {
- "expression": "sort_by(people, name)",
- "error": "invalid-type"
- },
- {
- "expression": "sort_by(people, &age)[].extra",
- "result": ["foo", "bar"]
- },
- {
- "expression": "sort_by(`[]`, &age)",
- "result": []
- },
- {
- "expression": "max_by(people, &age)",
- "result": {"age": 50, "age_str": "50", "bool": false, "name": "d"}
- },
- {
- "expression": "max_by(people, &age_str)",
- "result": {"age": 50, "age_str": "50", "bool": false, "name": "d"}
- },
- {
- "expression": "max_by(people, &bool)",
- "error": "invalid-type"
- },
- {
- "expression": "max_by(people, &extra)",
- "error": "invalid-type"
- },
- {
- "expression": "max_by(people, &to_number(age_str))",
- "result": {"age": 50, "age_str": "50", "bool": false, "name": "d"}
- },
- {
- "expression": "min_by(people, &age)",
- "result": {"age": 10, "age_str": "10", "bool": true, "name": 3}
- },
- {
- "expression": "min_by(people, &age_str)",
- "result": {"age": 10, "age_str": "10", "bool": true, "name": 3}
- },
- {
- "expression": "min_by(people, &bool)",
- "error": "invalid-type"
- },
- {
- "expression": "min_by(people, &extra)",
- "error": "invalid-type"
- },
- {
- "expression": "min_by(people, &to_number(age_str))",
- "result": {"age": 10, "age_str": "10", "bool": true, "name": 3}
- }
- ]
-}, {
- "given":
- {
- "people": [
- {"age": 10, "order": "1"},
- {"age": 10, "order": "2"},
- {"age": 10, "order": "3"},
- {"age": 10, "order": "4"},
- {"age": 10, "order": "5"},
- {"age": 10, "order": "6"},
- {"age": 10, "order": "7"},
- {"age": 10, "order": "8"},
- {"age": 10, "order": "9"},
- {"age": 10, "order": "10"},
- {"age": 10, "order": "11"}
- ]
- },
- "cases": [
- {
- "description": "stable sort order",
- "expression": "sort_by(people, &age)",
- "result": [
- {"age": 10, "order": "1"},
- {"age": 10, "order": "2"},
- {"age": 10, "order": "3"},
- {"age": 10, "order": "4"},
- {"age": 10, "order": "5"},
- {"age": 10, "order": "6"},
- {"age": 10, "order": "7"},
- {"age": 10, "order": "8"},
- {"age": 10, "order": "9"},
- {"age": 10, "order": "10"},
- {"age": 10, "order": "11"}
- ]
- }
- ]
-}, {
- "given":
- {
- "people": [
- {"a": 10, "b": 1, "c": "z"},
- {"a": 10, "b": 2, "c": null},
- {"a": 10, "b": 3},
- {"a": 10, "b": 4, "c": "z"},
- {"a": 10, "b": 5, "c": null},
- {"a": 10, "b": 6},
- {"a": 10, "b": 7, "c": "z"},
- {"a": 10, "b": 8, "c": null},
- {"a": 10, "b": 9}
- ],
- "empty": []
- },
- "cases": [
- {
- "expression": "map(&a, people)",
- "result": [10, 10, 10, 10, 10, 10, 10, 10, 10]
- },
- {
- "expression": "map(&c, people)",
- "result": ["z", null, null, "z", null, null, "z", null, null]
- },
- {
- "expression": "map(&a, badkey)",
- "error": "invalid-type"
- },
- {
- "expression": "map(&foo, empty)",
- "result": []
- }
- ]
-}, {
- "given": {
- "array": [
- {
- "foo": {"bar": "yes1"}
- },
- {
- "foo": {"bar": "yes2"}
- },
- {
- "foo1": {"bar": "no"}
- }
- ]},
- "cases": [
- {
- "expression": "map(&foo.bar, array)",
- "result": ["yes1", "yes2", null]
- },
- {
- "expression": "map(&foo1.bar, array)",
- "result": [null, null, "no"]
- },
- {
- "expression": "map(&foo.bar.baz, array)",
- "result": [null, null, null]
- }
- ]
-}, {
- "given": {
- "array": [[1, 2, 3, [4]], [5, 6, 7, [8, 9]]]
- },
- "cases": [
- {
- "expression": "map(&[], array)",
- "result": [[1, 2, 3, 4], [5, 6, 7, 8, 9]]
- }
- ]
-}
-]
diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/identifiers.json b/vendor/github.com/jmespath/go-jmespath/compliance/identifiers.json
deleted file mode 100644
index 7998a41ac9d..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/compliance/identifiers.json
+++ /dev/null
@@ -1,1377 +0,0 @@
-[
- {
- "given": {
- "__L": true
- },
- "cases": [
- {
- "expression": "__L",
- "result": true
- }
- ]
- },
- {
- "given": {
- "!\r": true
- },
- "cases": [
- {
- "expression": "\"!\\r\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "Y_1623": true
- },
- "cases": [
- {
- "expression": "Y_1623",
- "result": true
- }
- ]
- },
- {
- "given": {
- "x": true
- },
- "cases": [
- {
- "expression": "x",
- "result": true
- }
- ]
- },
- {
- "given": {
- "\tF\uCebb": true
- },
- "cases": [
- {
- "expression": "\"\\tF\\uCebb\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- " \t": true
- },
- "cases": [
- {
- "expression": "\" \\t\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- " ": true
- },
- "cases": [
- {
- "expression": "\" \"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "v2": true
- },
- "cases": [
- {
- "expression": "v2",
- "result": true
- }
- ]
- },
- {
- "given": {
- "\t": true
- },
- "cases": [
- {
- "expression": "\"\\t\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "_X": true
- },
- "cases": [
- {
- "expression": "_X",
- "result": true
- }
- ]
- },
- {
- "given": {
- "\t4\ud9da\udd15": true
- },
- "cases": [
- {
- "expression": "\"\\t4\\ud9da\\udd15\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "v24_W": true
- },
- "cases": [
- {
- "expression": "v24_W",
- "result": true
- }
- ]
- },
- {
- "given": {
- "H": true
- },
- "cases": [
- {
- "expression": "\"H\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "\f": true
- },
- "cases": [
- {
- "expression": "\"\\f\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "E4": true
- },
- "cases": [
- {
- "expression": "\"E4\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "!": true
- },
- "cases": [
- {
- "expression": "\"!\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "tM": true
- },
- "cases": [
- {
- "expression": "tM",
- "result": true
- }
- ]
- },
- {
- "given": {
- " [": true
- },
- "cases": [
- {
- "expression": "\" [\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "R!": true
- },
- "cases": [
- {
- "expression": "\"R!\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "_6W": true
- },
- "cases": [
- {
- "expression": "_6W",
- "result": true
- }
- ]
- },
- {
- "given": {
- "\uaBA1\r": true
- },
- "cases": [
- {
- "expression": "\"\\uaBA1\\r\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "tL7": true
- },
- "cases": [
- {
- "expression": "tL7",
- "result": true
- }
- ]
- },
- {
- "given": {
- "<": true
- },
- "cases": [
- {
- "expression": "\">\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "hvu": true
- },
- "cases": [
- {
- "expression": "hvu",
- "result": true
- }
- ]
- },
- {
- "given": {
- "; !": true
- },
- "cases": [
- {
- "expression": "\"; !\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "hU": true
- },
- "cases": [
- {
- "expression": "hU",
- "result": true
- }
- ]
- },
- {
- "given": {
- "!I\n\/": true
- },
- "cases": [
- {
- "expression": "\"!I\\n\\/\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "\uEEbF": true
- },
- "cases": [
- {
- "expression": "\"\\uEEbF\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "U)\t": true
- },
- "cases": [
- {
- "expression": "\"U)\\t\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "fa0_9": true
- },
- "cases": [
- {
- "expression": "fa0_9",
- "result": true
- }
- ]
- },
- {
- "given": {
- "/": true
- },
- "cases": [
- {
- "expression": "\"/\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "Gy": true
- },
- "cases": [
- {
- "expression": "Gy",
- "result": true
- }
- ]
- },
- {
- "given": {
- "\b": true
- },
- "cases": [
- {
- "expression": "\"\\b\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "<": true
- },
- "cases": [
- {
- "expression": "\"<\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "\t": true
- },
- "cases": [
- {
- "expression": "\"\\t\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "\t&\\\r": true
- },
- "cases": [
- {
- "expression": "\"\\t&\\\\\\r\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "#": true
- },
- "cases": [
- {
- "expression": "\"#\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "B__": true
- },
- "cases": [
- {
- "expression": "B__",
- "result": true
- }
- ]
- },
- {
- "given": {
- "\nS \n": true
- },
- "cases": [
- {
- "expression": "\"\\nS \\n\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "Bp": true
- },
- "cases": [
- {
- "expression": "Bp",
- "result": true
- }
- ]
- },
- {
- "given": {
- ",\t;": true
- },
- "cases": [
- {
- "expression": "\",\\t;\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "B_q": true
- },
- "cases": [
- {
- "expression": "B_q",
- "result": true
- }
- ]
- },
- {
- "given": {
- "\/+\t\n\b!Z": true
- },
- "cases": [
- {
- "expression": "\"\\/+\\t\\n\\b!Z\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "\udadd\udfc7\\ueFAc": true
- },
- "cases": [
- {
- "expression": "\"\udadd\udfc7\\\\ueFAc\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- ":\f": true
- },
- "cases": [
- {
- "expression": "\":\\f\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "\/": true
- },
- "cases": [
- {
- "expression": "\"\\/\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "_BW_6Hg_Gl": true
- },
- "cases": [
- {
- "expression": "_BW_6Hg_Gl",
- "result": true
- }
- ]
- },
- {
- "given": {
- "\udbcf\udc02": true
- },
- "cases": [
- {
- "expression": "\"\udbcf\udc02\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "zs1DC": true
- },
- "cases": [
- {
- "expression": "zs1DC",
- "result": true
- }
- ]
- },
- {
- "given": {
- "__434": true
- },
- "cases": [
- {
- "expression": "__434",
- "result": true
- }
- ]
- },
- {
- "given": {
- "\udb94\udd41": true
- },
- "cases": [
- {
- "expression": "\"\udb94\udd41\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "Z_5": true
- },
- "cases": [
- {
- "expression": "Z_5",
- "result": true
- }
- ]
- },
- {
- "given": {
- "z_M_": true
- },
- "cases": [
- {
- "expression": "z_M_",
- "result": true
- }
- ]
- },
- {
- "given": {
- "YU_2": true
- },
- "cases": [
- {
- "expression": "YU_2",
- "result": true
- }
- ]
- },
- {
- "given": {
- "_0": true
- },
- "cases": [
- {
- "expression": "_0",
- "result": true
- }
- ]
- },
- {
- "given": {
- "\b+": true
- },
- "cases": [
- {
- "expression": "\"\\b+\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "\"": true
- },
- "cases": [
- {
- "expression": "\"\\\"\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "D7": true
- },
- "cases": [
- {
- "expression": "D7",
- "result": true
- }
- ]
- },
- {
- "given": {
- "_62L": true
- },
- "cases": [
- {
- "expression": "_62L",
- "result": true
- }
- ]
- },
- {
- "given": {
- "\tK\t": true
- },
- "cases": [
- {
- "expression": "\"\\tK\\t\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "\n\\\f": true
- },
- "cases": [
- {
- "expression": "\"\\n\\\\\\f\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "I_": true
- },
- "cases": [
- {
- "expression": "I_",
- "result": true
- }
- ]
- },
- {
- "given": {
- "W_a0_": true
- },
- "cases": [
- {
- "expression": "W_a0_",
- "result": true
- }
- ]
- },
- {
- "given": {
- "BQ": true
- },
- "cases": [
- {
- "expression": "BQ",
- "result": true
- }
- ]
- },
- {
- "given": {
- "\tX$\uABBb": true
- },
- "cases": [
- {
- "expression": "\"\\tX$\\uABBb\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "Z9": true
- },
- "cases": [
- {
- "expression": "Z9",
- "result": true
- }
- ]
- },
- {
- "given": {
- "\b%\"\uda38\udd0f": true
- },
- "cases": [
- {
- "expression": "\"\\b%\\\"\uda38\udd0f\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "_F": true
- },
- "cases": [
- {
- "expression": "_F",
- "result": true
- }
- ]
- },
- {
- "given": {
- "!,": true
- },
- "cases": [
- {
- "expression": "\"!,\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "\"!": true
- },
- "cases": [
- {
- "expression": "\"\\\"!\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "Hh": true
- },
- "cases": [
- {
- "expression": "Hh",
- "result": true
- }
- ]
- },
- {
- "given": {
- "&": true
- },
- "cases": [
- {
- "expression": "\"&\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "9\r\\R": true
- },
- "cases": [
- {
- "expression": "\"9\\r\\\\R\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "M_k": true
- },
- "cases": [
- {
- "expression": "M_k",
- "result": true
- }
- ]
- },
- {
- "given": {
- "!\b\n\udb06\ude52\"\"": true
- },
- "cases": [
- {
- "expression": "\"!\\b\\n\udb06\ude52\\\"\\\"\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "6": true
- },
- "cases": [
- {
- "expression": "\"6\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "_7": true
- },
- "cases": [
- {
- "expression": "_7",
- "result": true
- }
- ]
- },
- {
- "given": {
- "0": true
- },
- "cases": [
- {
- "expression": "\"0\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "\\8\\": true
- },
- "cases": [
- {
- "expression": "\"\\\\8\\\\\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "b7eo": true
- },
- "cases": [
- {
- "expression": "b7eo",
- "result": true
- }
- ]
- },
- {
- "given": {
- "xIUo9": true
- },
- "cases": [
- {
- "expression": "xIUo9",
- "result": true
- }
- ]
- },
- {
- "given": {
- "5": true
- },
- "cases": [
- {
- "expression": "\"5\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "?": true
- },
- "cases": [
- {
- "expression": "\"?\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "sU": true
- },
- "cases": [
- {
- "expression": "sU",
- "result": true
- }
- ]
- },
- {
- "given": {
- "VH2&H\\\/": true
- },
- "cases": [
- {
- "expression": "\"VH2&H\\\\\\/\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "_C": true
- },
- "cases": [
- {
- "expression": "_C",
- "result": true
- }
- ]
- },
- {
- "given": {
- "_": true
- },
- "cases": [
- {
- "expression": "_",
- "result": true
- }
- ]
- },
- {
- "given": {
- "<\t": true
- },
- "cases": [
- {
- "expression": "\"<\\t\"",
- "result": true
- }
- ]
- },
- {
- "given": {
- "\uD834\uDD1E": true
- },
- "cases": [
- {
- "expression": "\"\\uD834\\uDD1E\"",
- "result": true
- }
- ]
- }
-]
diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/indices.json b/vendor/github.com/jmespath/go-jmespath/compliance/indices.json
deleted file mode 100644
index aa03b35dd7f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/compliance/indices.json
+++ /dev/null
@@ -1,346 +0,0 @@
-[{
- "given":
- {"foo": {"bar": ["zero", "one", "two"]}},
- "cases": [
- {
- "expression": "foo.bar[0]",
- "result": "zero"
- },
- {
- "expression": "foo.bar[1]",
- "result": "one"
- },
- {
- "expression": "foo.bar[2]",
- "result": "two"
- },
- {
- "expression": "foo.bar[3]",
- "result": null
- },
- {
- "expression": "foo.bar[-1]",
- "result": "two"
- },
- {
- "expression": "foo.bar[-2]",
- "result": "one"
- },
- {
- "expression": "foo.bar[-3]",
- "result": "zero"
- },
- {
- "expression": "foo.bar[-4]",
- "result": null
- }
- ]
-},
-{
- "given":
- {"foo": [{"bar": "one"}, {"bar": "two"}, {"bar": "three"}, {"notbar": "four"}]},
- "cases": [
- {
- "expression": "foo.bar",
- "result": null
- },
- {
- "expression": "foo[0].bar",
- "result": "one"
- },
- {
- "expression": "foo[1].bar",
- "result": "two"
- },
- {
- "expression": "foo[2].bar",
- "result": "three"
- },
- {
- "expression": "foo[3].notbar",
- "result": "four"
- },
- {
- "expression": "foo[3].bar",
- "result": null
- },
- {
- "expression": "foo[0]",
- "result": {"bar": "one"}
- },
- {
- "expression": "foo[1]",
- "result": {"bar": "two"}
- },
- {
- "expression": "foo[2]",
- "result": {"bar": "three"}
- },
- {
- "expression": "foo[3]",
- "result": {"notbar": "four"}
- },
- {
- "expression": "foo[4]",
- "result": null
- }
- ]
-},
-{
- "given": [
- "one", "two", "three"
- ],
- "cases": [
- {
- "expression": "[0]",
- "result": "one"
- },
- {
- "expression": "[1]",
- "result": "two"
- },
- {
- "expression": "[2]",
- "result": "three"
- },
- {
- "expression": "[-1]",
- "result": "three"
- },
- {
- "expression": "[-2]",
- "result": "two"
- },
- {
- "expression": "[-3]",
- "result": "one"
- }
- ]
-},
-{
- "given": {"reservations": [
- {"instances": [{"foo": 1}, {"foo": 2}]}
- ]},
- "cases": [
- {
- "expression": "reservations[].instances[].foo",
- "result": [1, 2]
- },
- {
- "expression": "reservations[].instances[].bar",
- "result": []
- },
- {
- "expression": "reservations[].notinstances[].foo",
- "result": []
- },
- {
- "expression": "reservations[].notinstances[].foo",
- "result": []
- }
- ]
-},
-{
- "given": {"reservations": [{
- "instances": [
- {"foo": [{"bar": 1}, {"bar": 2}, {"notbar": 3}, {"bar": 4}]},
- {"foo": [{"bar": 5}, {"bar": 6}, {"notbar": [7]}, {"bar": 8}]},
- {"foo": "bar"},
- {"notfoo": [{"bar": 20}, {"bar": 21}, {"notbar": [7]}, {"bar": 22}]},
- {"bar": [{"baz": [1]}, {"baz": [2]}, {"baz": [3]}, {"baz": [4]}]},
- {"baz": [{"baz": [1, 2]}, {"baz": []}, {"baz": []}, {"baz": [3, 4]}]},
- {"qux": [{"baz": []}, {"baz": [1, 2, 3]}, {"baz": [4]}, {"baz": []}]}
- ],
- "otherkey": {"foo": [{"bar": 1}, {"bar": 2}, {"notbar": 3}, {"bar": 4}]}
- }, {
- "instances": [
- {"a": [{"bar": 1}, {"bar": 2}, {"notbar": 3}, {"bar": 4}]},
- {"b": [{"bar": 5}, {"bar": 6}, {"notbar": [7]}, {"bar": 8}]},
- {"c": "bar"},
- {"notfoo": [{"bar": 23}, {"bar": 24}, {"notbar": [7]}, {"bar": 25}]},
- {"qux": [{"baz": []}, {"baz": [1, 2, 3]}, {"baz": [4]}, {"baz": []}]}
- ],
- "otherkey": {"foo": [{"bar": 1}, {"bar": 2}, {"notbar": 3}, {"bar": 4}]}
- }
- ]},
- "cases": [
- {
- "expression": "reservations[].instances[].foo[].bar",
- "result": [1, 2, 4, 5, 6, 8]
- },
- {
- "expression": "reservations[].instances[].foo[].baz",
- "result": []
- },
- {
- "expression": "reservations[].instances[].notfoo[].bar",
- "result": [20, 21, 22, 23, 24, 25]
- },
- {
- "expression": "reservations[].instances[].notfoo[].notbar",
- "result": [[7], [7]]
- },
- {
- "expression": "reservations[].notinstances[].foo",
- "result": []
- },
- {
- "expression": "reservations[].instances[].foo[].notbar",
- "result": [3, [7]]
- },
- {
- "expression": "reservations[].instances[].bar[].baz",
- "result": [[1], [2], [3], [4]]
- },
- {
- "expression": "reservations[].instances[].baz[].baz",
- "result": [[1, 2], [], [], [3, 4]]
- },
- {
- "expression": "reservations[].instances[].qux[].baz",
- "result": [[], [1, 2, 3], [4], [], [], [1, 2, 3], [4], []]
- },
- {
- "expression": "reservations[].instances[].qux[].baz[]",
- "result": [1, 2, 3, 4, 1, 2, 3, 4]
- }
- ]
-},
-{
- "given": {
- "foo": [
- [["one", "two"], ["three", "four"]],
- [["five", "six"], ["seven", "eight"]],
- [["nine"], ["ten"]]
- ]
- },
- "cases": [
- {
- "expression": "foo[]",
- "result": [["one", "two"], ["three", "four"], ["five", "six"],
- ["seven", "eight"], ["nine"], ["ten"]]
- },
- {
- "expression": "foo[][0]",
- "result": ["one", "three", "five", "seven", "nine", "ten"]
- },
- {
- "expression": "foo[][1]",
- "result": ["two", "four", "six", "eight"]
- },
- {
- "expression": "foo[][0][0]",
- "result": []
- },
- {
- "expression": "foo[][2][2]",
- "result": []
- },
- {
- "expression": "foo[][0][0][100]",
- "result": []
- }
- ]
-},
-{
- "given": {
- "foo": [{
- "bar": [
- {
- "qux": 2,
- "baz": 1
- },
- {
- "qux": 4,
- "baz": 3
- }
- ]
- },
- {
- "bar": [
- {
- "qux": 6,
- "baz": 5
- },
- {
- "qux": 8,
- "baz": 7
- }
- ]
- }
- ]
- },
- "cases": [
- {
- "expression": "foo",
- "result": [{"bar": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}]},
- {"bar": [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]}]
- },
- {
- "expression": "foo[]",
- "result": [{"bar": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}]},
- {"bar": [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]}]
- },
- {
- "expression": "foo[].bar",
- "result": [[{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}],
- [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]]
- },
- {
- "expression": "foo[].bar[]",
- "result": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3},
- {"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]
- },
- {
- "expression": "foo[].bar[].baz",
- "result": [1, 3, 5, 7]
- }
- ]
-},
-{
- "given": {
- "string": "string",
- "hash": {"foo": "bar", "bar": "baz"},
- "number": 23,
- "nullvalue": null
- },
- "cases": [
- {
- "expression": "string[]",
- "result": null
- },
- {
- "expression": "hash[]",
- "result": null
- },
- {
- "expression": "number[]",
- "result": null
- },
- {
- "expression": "nullvalue[]",
- "result": null
- },
- {
- "expression": "string[].foo",
- "result": null
- },
- {
- "expression": "hash[].foo",
- "result": null
- },
- {
- "expression": "number[].foo",
- "result": null
- },
- {
- "expression": "nullvalue[].foo",
- "result": null
- },
- {
- "expression": "nullvalue[].foo[].bar",
- "result": null
- }
- ]
-}
-]
diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/literal.json b/vendor/github.com/jmespath/go-jmespath/compliance/literal.json
deleted file mode 100644
index c6706b97196..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/compliance/literal.json
+++ /dev/null
@@ -1,185 +0,0 @@
-[
- {
- "given": {
- "foo": [{"name": "a"}, {"name": "b"}],
- "bar": {"baz": "qux"}
- },
- "cases": [
- {
- "expression": "`\"foo\"`",
- "result": "foo"
- },
- {
- "comment": "Interpret escaped unicode.",
- "expression": "`\"\\u03a6\"`",
- "result": "Φ"
- },
- {
- "expression": "`\"✓\"`",
- "result": "✓"
- },
- {
- "expression": "`[1, 2, 3]`",
- "result": [1, 2, 3]
- },
- {
- "expression": "`{\"a\": \"b\"}`",
- "result": {"a": "b"}
- },
- {
- "expression": "`true`",
- "result": true
- },
- {
- "expression": "`false`",
- "result": false
- },
- {
- "expression": "`null`",
- "result": null
- },
- {
- "expression": "`0`",
- "result": 0
- },
- {
- "expression": "`1`",
- "result": 1
- },
- {
- "expression": "`2`",
- "result": 2
- },
- {
- "expression": "`3`",
- "result": 3
- },
- {
- "expression": "`4`",
- "result": 4
- },
- {
- "expression": "`5`",
- "result": 5
- },
- {
- "expression": "`6`",
- "result": 6
- },
- {
- "expression": "`7`",
- "result": 7
- },
- {
- "expression": "`8`",
- "result": 8
- },
- {
- "expression": "`9`",
- "result": 9
- },
- {
- "comment": "Escaping a backtick in quotes",
- "expression": "`\"foo\\`bar\"`",
- "result": "foo`bar"
- },
- {
- "comment": "Double quote in literal",
- "expression": "`\"foo\\\"bar\"`",
- "result": "foo\"bar"
- },
- {
- "expression": "`\"1\\`\"`",
- "result": "1`"
- },
- {
- "comment": "Multiple literal expressions with escapes",
- "expression": "`\"\\\\\"`.{a:`\"b\"`}",
- "result": {"a": "b"}
- },
- {
- "comment": "literal . identifier",
- "expression": "`{\"a\": \"b\"}`.a",
- "result": "b"
- },
- {
- "comment": "literal . identifier . identifier",
- "expression": "`{\"a\": {\"b\": \"c\"}}`.a.b",
- "result": "c"
- },
- {
- "comment": "literal . identifier bracket-expr",
- "expression": "`[0, 1, 2]`[1]",
- "result": 1
- }
- ]
- },
- {
- "comment": "Literals",
- "given": {"type": "object"},
- "cases": [
- {
- "comment": "Literal with leading whitespace",
- "expression": "` {\"foo\": true}`",
- "result": {"foo": true}
- },
- {
- "comment": "Literal with trailing whitespace",
- "expression": "`{\"foo\": true} `",
- "result": {"foo": true}
- },
- {
- "comment": "Literal on RHS of subexpr not allowed",
- "expression": "foo.`\"bar\"`",
- "error": "syntax"
- }
- ]
- },
- {
- "comment": "Raw String Literals",
- "given": {},
- "cases": [
- {
- "expression": "'foo'",
- "result": "foo"
- },
- {
- "expression": "' foo '",
- "result": " foo "
- },
- {
- "expression": "'0'",
- "result": "0"
- },
- {
- "expression": "'newline\n'",
- "result": "newline\n"
- },
- {
- "expression": "'\n'",
- "result": "\n"
- },
- {
- "expression": "'✓'",
- "result": "✓"
- },
- {
- "expression": "'𝄞'",
- "result": "𝄞"
- },
- {
- "expression": "' [foo] '",
- "result": " [foo] "
- },
- {
- "expression": "'[foo]'",
- "result": "[foo]"
- },
- {
- "comment": "Do not interpret escaped unicode.",
- "expression": "'\\u03a6'",
- "result": "\\u03a6"
- }
- ]
- }
-]
diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/multiselect.json b/vendor/github.com/jmespath/go-jmespath/compliance/multiselect.json
deleted file mode 100644
index 8f2a481ed7c..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/compliance/multiselect.json
+++ /dev/null
@@ -1,393 +0,0 @@
-[{
- "given": {
- "foo": {
- "bar": "bar",
- "baz": "baz",
- "qux": "qux",
- "nested": {
- "one": {
- "a": "first",
- "b": "second",
- "c": "third"
- },
- "two": {
- "a": "first",
- "b": "second",
- "c": "third"
- },
- "three": {
- "a": "first",
- "b": "second",
- "c": {"inner": "third"}
- }
- }
- },
- "bar": 1,
- "baz": 2,
- "qux\"": 3
- },
- "cases": [
- {
- "expression": "foo.{bar: bar}",
- "result": {"bar": "bar"}
- },
- {
- "expression": "foo.{\"bar\": bar}",
- "result": {"bar": "bar"}
- },
- {
- "expression": "foo.{\"foo.bar\": bar}",
- "result": {"foo.bar": "bar"}
- },
- {
- "expression": "foo.{bar: bar, baz: baz}",
- "result": {"bar": "bar", "baz": "baz"}
- },
- {
- "expression": "foo.{\"bar\": bar, \"baz\": baz}",
- "result": {"bar": "bar", "baz": "baz"}
- },
- {
- "expression": "{\"baz\": baz, \"qux\\\"\": \"qux\\\"\"}",
- "result": {"baz": 2, "qux\"": 3}
- },
- {
- "expression": "foo.{bar:bar,baz:baz}",
- "result": {"bar": "bar", "baz": "baz"}
- },
- {
- "expression": "foo.{bar: bar,qux: qux}",
- "result": {"bar": "bar", "qux": "qux"}
- },
- {
- "expression": "foo.{bar: bar, noexist: noexist}",
- "result": {"bar": "bar", "noexist": null}
- },
- {
- "expression": "foo.{noexist: noexist, alsonoexist: alsonoexist}",
- "result": {"noexist": null, "alsonoexist": null}
- },
- {
- "expression": "foo.badkey.{nokey: nokey, alsonokey: alsonokey}",
- "result": null
- },
- {
- "expression": "foo.nested.*.{a: a,b: b}",
- "result": [{"a": "first", "b": "second"},
- {"a": "first", "b": "second"},
- {"a": "first", "b": "second"}]
- },
- {
- "expression": "foo.nested.three.{a: a, cinner: c.inner}",
- "result": {"a": "first", "cinner": "third"}
- },
- {
- "expression": "foo.nested.three.{a: a, c: c.inner.bad.key}",
- "result": {"a": "first", "c": null}
- },
- {
- "expression": "foo.{a: nested.one.a, b: nested.two.b}",
- "result": {"a": "first", "b": "second"}
- },
- {
- "expression": "{bar: bar, baz: baz}",
- "result": {"bar": 1, "baz": 2}
- },
- {
- "expression": "{bar: bar}",
- "result": {"bar": 1}
- },
- {
- "expression": "{otherkey: bar}",
- "result": {"otherkey": 1}
- },
- {
- "expression": "{no: no, exist: exist}",
- "result": {"no": null, "exist": null}
- },
- {
- "expression": "foo.[bar]",
- "result": ["bar"]
- },
- {
- "expression": "foo.[bar,baz]",
- "result": ["bar", "baz"]
- },
- {
- "expression": "foo.[bar,qux]",
- "result": ["bar", "qux"]
- },
- {
- "expression": "foo.[bar,noexist]",
- "result": ["bar", null]
- },
- {
- "expression": "foo.[noexist,alsonoexist]",
- "result": [null, null]
- }
- ]
-}, {
- "given": {
- "foo": {"bar": 1, "baz": [2, 3, 4]}
- },
- "cases": [
- {
- "expression": "foo.{bar:bar,baz:baz}",
- "result": {"bar": 1, "baz": [2, 3, 4]}
- },
- {
- "expression": "foo.[bar,baz[0]]",
- "result": [1, 2]
- },
- {
- "expression": "foo.[bar,baz[1]]",
- "result": [1, 3]
- },
- {
- "expression": "foo.[bar,baz[2]]",
- "result": [1, 4]
- },
- {
- "expression": "foo.[bar,baz[3]]",
- "result": [1, null]
- },
- {
- "expression": "foo.[bar[0],baz[3]]",
- "result": [null, null]
- }
- ]
-}, {
- "given": {
- "foo": {"bar": 1, "baz": 2}
- },
- "cases": [
- {
- "expression": "foo.{bar: bar, baz: baz}",
- "result": {"bar": 1, "baz": 2}
- },
- {
- "expression": "foo.[bar,baz]",
- "result": [1, 2]
- }
- ]
-}, {
- "given": {
- "foo": {
- "bar": {"baz": [{"common": "first", "one": 1},
- {"common": "second", "two": 2}]},
- "ignoreme": 1,
- "includeme": true
- }
- },
- "cases": [
- {
- "expression": "foo.{bar: bar.baz[1],includeme: includeme}",
- "result": {"bar": {"common": "second", "two": 2}, "includeme": true}
- },
- {
- "expression": "foo.{\"bar.baz.two\": bar.baz[1].two, includeme: includeme}",
- "result": {"bar.baz.two": 2, "includeme": true}
- },
- {
- "expression": "foo.[includeme, bar.baz[*].common]",
- "result": [true, ["first", "second"]]
- },
- {
- "expression": "foo.[includeme, bar.baz[*].none]",
- "result": [true, []]
- },
- {
- "expression": "foo.[includeme, bar.baz[].common]",
- "result": [true, ["first", "second"]]
- }
- ]
-}, {
- "given": {
- "reservations": [{
- "instances": [
- {"id": "id1",
- "name": "first"},
- {"id": "id2",
- "name": "second"}
- ]}, {
- "instances": [
- {"id": "id3",
- "name": "third"},
- {"id": "id4",
- "name": "fourth"}
- ]}
- ]},
- "cases": [
- {
- "expression": "reservations[*].instances[*].{id: id, name: name}",
- "result": [[{"id": "id1", "name": "first"}, {"id": "id2", "name": "second"}],
- [{"id": "id3", "name": "third"}, {"id": "id4", "name": "fourth"}]]
- },
- {
- "expression": "reservations[].instances[].{id: id, name: name}",
- "result": [{"id": "id1", "name": "first"},
- {"id": "id2", "name": "second"},
- {"id": "id3", "name": "third"},
- {"id": "id4", "name": "fourth"}]
- },
- {
- "expression": "reservations[].instances[].[id, name]",
- "result": [["id1", "first"],
- ["id2", "second"],
- ["id3", "third"],
- ["id4", "fourth"]]
- }
- ]
-},
-{
- "given": {
- "foo": [{
- "bar": [
- {
- "qux": 2,
- "baz": 1
- },
- {
- "qux": 4,
- "baz": 3
- }
- ]
- },
- {
- "bar": [
- {
- "qux": 6,
- "baz": 5
- },
- {
- "qux": 8,
- "baz": 7
- }
- ]
- }
- ]
- },
- "cases": [
- {
- "expression": "foo",
- "result": [{"bar": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}]},
- {"bar": [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]}]
- },
- {
- "expression": "foo[]",
- "result": [{"bar": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}]},
- {"bar": [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]}]
- },
- {
- "expression": "foo[].bar",
- "result": [[{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3}],
- [{"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]]
- },
- {
- "expression": "foo[].bar[]",
- "result": [{"qux": 2, "baz": 1}, {"qux": 4, "baz": 3},
- {"qux": 6, "baz": 5}, {"qux": 8, "baz": 7}]
- },
- {
- "expression": "foo[].bar[].[baz, qux]",
- "result": [[1, 2], [3, 4], [5, 6], [7, 8]]
- },
- {
- "expression": "foo[].bar[].[baz]",
- "result": [[1], [3], [5], [7]]
- },
- {
- "expression": "foo[].bar[].[baz, qux][]",
- "result": [1, 2, 3, 4, 5, 6, 7, 8]
- }
- ]
-},
-{
- "given": {
- "foo": {
- "baz": [
- {
- "bar": "abc"
- }, {
- "bar": "def"
- }
- ],
- "qux": ["zero"]
- }
- },
- "cases": [
- {
- "expression": "foo.[baz[*].bar, qux[0]]",
- "result": [["abc", "def"], "zero"]
- }
- ]
-},
-{
- "given": {
- "foo": {
- "baz": [
- {
- "bar": "a",
- "bam": "b",
- "boo": "c"
- }, {
- "bar": "d",
- "bam": "e",
- "boo": "f"
- }
- ],
- "qux": ["zero"]
- }
- },
- "cases": [
- {
- "expression": "foo.[baz[*].[bar, boo], qux[0]]",
- "result": [[["a", "c" ], ["d", "f" ]], "zero"]
- }
- ]
-},
-{
- "given": {
- "foo": {
- "baz": [
- {
- "bar": "a",
- "bam": "b",
- "boo": "c"
- }, {
- "bar": "d",
- "bam": "e",
- "boo": "f"
- }
- ],
- "qux": ["zero"]
- }
- },
- "cases": [
- {
- "expression": "foo.[baz[*].not_there || baz[*].bar, qux[0]]",
- "result": [["a", "d"], "zero"]
- }
- ]
-},
-{
- "given": {"type": "object"},
- "cases": [
- {
- "comment": "Nested multiselect",
- "expression": "[[*],*]",
- "result": [null, ["object"]]
- }
- ]
-},
-{
- "given": [],
- "cases": [
- {
- "comment": "Nested multiselect",
- "expression": "[[*]]",
- "result": [[]]
- }
- ]
-}
-]
diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/ormatch.json b/vendor/github.com/jmespath/go-jmespath/compliance/ormatch.json
deleted file mode 100644
index 2127cf441ba..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/compliance/ormatch.json
+++ /dev/null
@@ -1,59 +0,0 @@
-[{
- "given":
- {"outer": {"foo": "foo", "bar": "bar", "baz": "baz"}},
- "cases": [
- {
- "expression": "outer.foo || outer.bar",
- "result": "foo"
- },
- {
- "expression": "outer.foo||outer.bar",
- "result": "foo"
- },
- {
- "expression": "outer.bar || outer.baz",
- "result": "bar"
- },
- {
- "expression": "outer.bar||outer.baz",
- "result": "bar"
- },
- {
- "expression": "outer.bad || outer.foo",
- "result": "foo"
- },
- {
- "expression": "outer.bad||outer.foo",
- "result": "foo"
- },
- {
- "expression": "outer.foo || outer.bad",
- "result": "foo"
- },
- {
- "expression": "outer.foo||outer.bad",
- "result": "foo"
- },
- {
- "expression": "outer.bad || outer.alsobad",
- "result": null
- },
- {
- "expression": "outer.bad||outer.alsobad",
- "result": null
- }
- ]
-}, {
- "given":
- {"outer": {"foo": "foo", "bool": false, "empty_list": [], "empty_string": ""}},
- "cases": [
- {
- "expression": "outer.empty_string || outer.foo",
- "result": "foo"
- },
- {
- "expression": "outer.nokey || outer.bool || outer.empty_list || outer.empty_string || outer.foo",
- "result": "foo"
- }
- ]
-}]
diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/pipe.json b/vendor/github.com/jmespath/go-jmespath/compliance/pipe.json
deleted file mode 100644
index b10c0a496d6..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/compliance/pipe.json
+++ /dev/null
@@ -1,131 +0,0 @@
-[{
- "given": {
- "foo": {
- "bar": {
- "baz": "subkey"
- },
- "other": {
- "baz": "subkey"
- },
- "other2": {
- "baz": "subkey"
- },
- "other3": {
- "notbaz": ["a", "b", "c"]
- },
- "other4": {
- "notbaz": ["a", "b", "c"]
- }
- }
- },
- "cases": [
- {
- "expression": "foo.*.baz | [0]",
- "result": "subkey"
- },
- {
- "expression": "foo.*.baz | [1]",
- "result": "subkey"
- },
- {
- "expression": "foo.*.baz | [2]",
- "result": "subkey"
- },
- {
- "expression": "foo.bar.* | [0]",
- "result": "subkey"
- },
- {
- "expression": "foo.*.notbaz | [*]",
- "result": [["a", "b", "c"], ["a", "b", "c"]]
- },
- {
- "expression": "{\"a\": foo.bar, \"b\": foo.other} | *.baz",
- "result": ["subkey", "subkey"]
- }
- ]
-}, {
- "given": {
- "foo": {
- "bar": {
- "baz": "one"
- },
- "other": {
- "baz": "two"
- },
- "other2": {
- "baz": "three"
- },
- "other3": {
- "notbaz": ["a", "b", "c"]
- },
- "other4": {
- "notbaz": ["d", "e", "f"]
- }
- }
- },
- "cases": [
- {
- "expression": "foo | bar",
- "result": {"baz": "one"}
- },
- {
- "expression": "foo | bar | baz",
- "result": "one"
- },
- {
- "expression": "foo|bar| baz",
- "result": "one"
- },
- {
- "expression": "not_there | [0]",
- "result": null
- },
- {
- "expression": "not_there | [0]",
- "result": null
- },
- {
- "expression": "[foo.bar, foo.other] | [0]",
- "result": {"baz": "one"}
- },
- {
- "expression": "{\"a\": foo.bar, \"b\": foo.other} | a",
- "result": {"baz": "one"}
- },
- {
- "expression": "{\"a\": foo.bar, \"b\": foo.other} | b",
- "result": {"baz": "two"}
- },
- {
- "expression": "foo.bam || foo.bar | baz",
- "result": "one"
- },
- {
- "expression": "foo | not_there || bar",
- "result": {"baz": "one"}
- }
- ]
-}, {
- "given": {
- "foo": [{
- "bar": [{
- "baz": "one"
- }, {
- "baz": "two"
- }]
- }, {
- "bar": [{
- "baz": "three"
- }, {
- "baz": "four"
- }]
- }]
- },
- "cases": [
- {
- "expression": "foo[*].bar[*] | [0][0]",
- "result": {"baz": "one"}
- }
- ]
-}]
diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/slice.json b/vendor/github.com/jmespath/go-jmespath/compliance/slice.json
deleted file mode 100644
index 359477278c8..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/compliance/slice.json
+++ /dev/null
@@ -1,187 +0,0 @@
-[{
- "given": {
- "foo": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
- "bar": {
- "baz": 1
- }
- },
- "cases": [
- {
- "expression": "bar[0:10]",
- "result": null
- },
- {
- "expression": "foo[0:10:1]",
- "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
- },
- {
- "expression": "foo[0:10]",
- "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
- },
- {
- "expression": "foo[0:10:]",
- "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
- },
- {
- "expression": "foo[0::1]",
- "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
- },
- {
- "expression": "foo[0::]",
- "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
- },
- {
- "expression": "foo[0:]",
- "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
- },
- {
- "expression": "foo[:10:1]",
- "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
- },
- {
- "expression": "foo[::1]",
- "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
- },
- {
- "expression": "foo[:10:]",
- "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
- },
- {
- "expression": "foo[::]",
- "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
- },
- {
- "expression": "foo[:]",
- "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
- },
- {
- "expression": "foo[1:9]",
- "result": [1, 2, 3, 4, 5, 6, 7, 8]
- },
- {
- "expression": "foo[0:10:2]",
- "result": [0, 2, 4, 6, 8]
- },
- {
- "expression": "foo[5:]",
- "result": [5, 6, 7, 8, 9]
- },
- {
- "expression": "foo[5::2]",
- "result": [5, 7, 9]
- },
- {
- "expression": "foo[::2]",
- "result": [0, 2, 4, 6, 8]
- },
- {
- "expression": "foo[::-1]",
- "result": [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
- },
- {
- "expression": "foo[1::2]",
- "result": [1, 3, 5, 7, 9]
- },
- {
- "expression": "foo[10:0:-1]",
- "result": [9, 8, 7, 6, 5, 4, 3, 2, 1]
- },
- {
- "expression": "foo[10:5:-1]",
- "result": [9, 8, 7, 6]
- },
- {
- "expression": "foo[8:2:-2]",
- "result": [8, 6, 4]
- },
- {
- "expression": "foo[0:20]",
- "result": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
- },
- {
- "expression": "foo[10:-20:-1]",
- "result": [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
- },
- {
- "expression": "foo[10:-20]",
- "result": []
- },
- {
- "expression": "foo[-4:-1]",
- "result": [6, 7, 8]
- },
- {
- "expression": "foo[:-5:-1]",
- "result": [9, 8, 7, 6]
- },
- {
- "expression": "foo[8:2:0]",
- "error": "invalid-value"
- },
- {
- "expression": "foo[8:2:0:1]",
- "error": "syntax"
- },
- {
- "expression": "foo[8:2&]",
- "error": "syntax"
- },
- {
- "expression": "foo[2:a:3]",
- "error": "syntax"
- }
- ]
-}, {
- "given": {
- "foo": [{"a": 1}, {"a": 2}, {"a": 3}],
- "bar": [{"a": {"b": 1}}, {"a": {"b": 2}},
- {"a": {"b": 3}}],
- "baz": 50
- },
- "cases": [
- {
- "expression": "foo[:2].a",
- "result": [1, 2]
- },
- {
- "expression": "foo[:2].b",
- "result": []
- },
- {
- "expression": "foo[:2].a.b",
- "result": []
- },
- {
- "expression": "bar[::-1].a.b",
- "result": [3, 2, 1]
- },
- {
- "expression": "bar[:2].a.b",
- "result": [1, 2]
- },
- {
- "expression": "baz[:2].a",
- "result": null
- }
- ]
-}, {
- "given": [{"a": 1}, {"a": 2}, {"a": 3}],
- "cases": [
- {
- "expression": "[:]",
- "result": [{"a": 1}, {"a": 2}, {"a": 3}]
- },
- {
- "expression": "[:2].a",
- "result": [1, 2]
- },
- {
- "expression": "[::-1].a",
- "result": [3, 2, 1]
- },
- {
- "expression": "[:2].b",
- "result": []
- }
- ]
-}]
diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/syntax.json b/vendor/github.com/jmespath/go-jmespath/compliance/syntax.json
deleted file mode 100644
index 003c2945887..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/compliance/syntax.json
+++ /dev/null
@@ -1,616 +0,0 @@
-[{
- "comment": "Dot syntax",
- "given": {"type": "object"},
- "cases": [
- {
- "expression": "foo.bar",
- "result": null
- },
- {
- "expression": "foo.1",
- "error": "syntax"
- },
- {
- "expression": "foo.-11",
- "error": "syntax"
- },
- {
- "expression": "foo",
- "result": null
- },
- {
- "expression": "foo.",
- "error": "syntax"
- },
- {
- "expression": "foo.",
- "error": "syntax"
- },
- {
- "expression": ".foo",
- "error": "syntax"
- },
- {
- "expression": "foo..bar",
- "error": "syntax"
- },
- {
- "expression": "foo.bar.",
- "error": "syntax"
- },
- {
- "expression": "foo[.]",
- "error": "syntax"
- }
- ]
-},
- {
- "comment": "Simple token errors",
- "given": {"type": "object"},
- "cases": [
- {
- "expression": ".",
- "error": "syntax"
- },
- {
- "expression": ":",
- "error": "syntax"
- },
- {
- "expression": ",",
- "error": "syntax"
- },
- {
- "expression": "]",
- "error": "syntax"
- },
- {
- "expression": "[",
- "error": "syntax"
- },
- {
- "expression": "}",
- "error": "syntax"
- },
- {
- "expression": "{",
- "error": "syntax"
- },
- {
- "expression": ")",
- "error": "syntax"
- },
- {
- "expression": "(",
- "error": "syntax"
- },
- {
- "expression": "((&",
- "error": "syntax"
- },
- {
- "expression": "a[",
- "error": "syntax"
- },
- {
- "expression": "a]",
- "error": "syntax"
- },
- {
- "expression": "a][",
- "error": "syntax"
- },
- {
- "expression": "!",
- "error": "syntax"
- }
- ]
- },
- {
- "comment": "Boolean syntax errors",
- "given": {"type": "object"},
- "cases": [
- {
- "expression": "![!(!",
- "error": "syntax"
- }
- ]
- },
- {
- "comment": "Wildcard syntax",
- "given": {"type": "object"},
- "cases": [
- {
- "expression": "*",
- "result": ["object"]
- },
- {
- "expression": "*.*",
- "result": []
- },
- {
- "expression": "*.foo",
- "result": []
- },
- {
- "expression": "*[0]",
- "result": []
- },
- {
- "expression": ".*",
- "error": "syntax"
- },
- {
- "expression": "*foo",
- "error": "syntax"
- },
- {
- "expression": "*0",
- "error": "syntax"
- },
- {
- "expression": "foo[*]bar",
- "error": "syntax"
- },
- {
- "expression": "foo[*]*",
- "error": "syntax"
- }
- ]
- },
- {
- "comment": "Flatten syntax",
- "given": {"type": "object"},
- "cases": [
- {
- "expression": "[]",
- "result": null
- }
- ]
- },
- {
- "comment": "Simple bracket syntax",
- "given": {"type": "object"},
- "cases": [
- {
- "expression": "[0]",
- "result": null
- },
- {
- "expression": "[*]",
- "result": null
- },
- {
- "expression": "*.[0]",
- "error": "syntax"
- },
- {
- "expression": "*.[\"0\"]",
- "result": [[null]]
- },
- {
- "expression": "[*].bar",
- "result": null
- },
- {
- "expression": "[*][0]",
- "result": null
- },
- {
- "expression": "foo[#]",
- "error": "syntax"
- }
- ]
- },
- {
- "comment": "Multi-select list syntax",
- "given": {"type": "object"},
- "cases": [
- {
- "expression": "foo[0]",
- "result": null
- },
- {
- "comment": "Valid multi-select of a list",
- "expression": "foo[0, 1]",
- "error": "syntax"
- },
- {
- "expression": "foo.[0]",
- "error": "syntax"
- },
- {
- "expression": "foo.[*]",
- "result": null
- },
- {
- "comment": "Multi-select of a list with trailing comma",
- "expression": "foo[0, ]",
- "error": "syntax"
- },
- {
- "comment": "Multi-select of a list with trailing comma and no close",
- "expression": "foo[0,",
- "error": "syntax"
- },
- {
- "comment": "Multi-select of a list with trailing comma and no close",
- "expression": "foo.[a",
- "error": "syntax"
- },
- {
- "comment": "Multi-select of a list with extra comma",
- "expression": "foo[0,, 1]",
- "error": "syntax"
- },
- {
- "comment": "Multi-select of a list using an identifier index",
- "expression": "foo[abc]",
- "error": "syntax"
- },
- {
- "comment": "Multi-select of a list using identifier indices",
- "expression": "foo[abc, def]",
- "error": "syntax"
- },
- {
- "comment": "Multi-select of a list using an identifier index",
- "expression": "foo[abc, 1]",
- "error": "syntax"
- },
- {
- "comment": "Multi-select of a list using an identifier index with trailing comma",
- "expression": "foo[abc, ]",
- "error": "syntax"
- },
- {
- "comment": "Valid multi-select of a hash using an identifier index",
- "expression": "foo.[abc]",
- "result": null
- },
- {
- "comment": "Valid multi-select of a hash",
- "expression": "foo.[abc, def]",
- "result": null
- },
- {
- "comment": "Multi-select of a hash using a numeric index",
- "expression": "foo.[abc, 1]",
- "error": "syntax"
- },
- {
- "comment": "Multi-select of a hash with a trailing comma",
- "expression": "foo.[abc, ]",
- "error": "syntax"
- },
- {
- "comment": "Multi-select of a hash with extra commas",
- "expression": "foo.[abc,, def]",
- "error": "syntax"
- },
- {
- "comment": "Multi-select of a hash using number indices",
- "expression": "foo.[0, 1]",
- "error": "syntax"
- }
- ]
- },
- {
- "comment": "Multi-select hash syntax",
- "given": {"type": "object"},
- "cases": [
- {
- "comment": "No key or value",
- "expression": "a{}",
- "error": "syntax"
- },
- {
- "comment": "No closing token",
- "expression": "a{",
- "error": "syntax"
- },
- {
- "comment": "Not a key value pair",
- "expression": "a{foo}",
- "error": "syntax"
- },
- {
- "comment": "Missing value and closing character",
- "expression": "a{foo:",
- "error": "syntax"
- },
- {
- "comment": "Missing closing character",
- "expression": "a{foo: 0",
- "error": "syntax"
- },
- {
- "comment": "Missing value",
- "expression": "a{foo:}",
- "error": "syntax"
- },
- {
- "comment": "Trailing comma and no closing character",
- "expression": "a{foo: 0, ",
- "error": "syntax"
- },
- {
- "comment": "Missing value with trailing comma",
- "expression": "a{foo: ,}",
- "error": "syntax"
- },
- {
- "comment": "Accessing Array using an identifier",
- "expression": "a{foo: bar}",
- "error": "syntax"
- },
- {
- "expression": "a{foo: 0}",
- "error": "syntax"
- },
- {
- "comment": "Missing key-value pair",
- "expression": "a.{}",
- "error": "syntax"
- },
- {
- "comment": "Not a key-value pair",
- "expression": "a.{foo}",
- "error": "syntax"
- },
- {
- "comment": "Missing value",
- "expression": "a.{foo:}",
- "error": "syntax"
- },
- {
- "comment": "Missing value with trailing comma",
- "expression": "a.{foo: ,}",
- "error": "syntax"
- },
- {
- "comment": "Valid multi-select hash extraction",
- "expression": "a.{foo: bar}",
- "result": null
- },
- {
- "comment": "Valid multi-select hash extraction",
- "expression": "a.{foo: bar, baz: bam}",
- "result": null
- },
- {
- "comment": "Trailing comma",
- "expression": "a.{foo: bar, }",
- "error": "syntax"
- },
- {
- "comment": "Missing key in second key-value pair",
- "expression": "a.{foo: bar, baz}",
- "error": "syntax"
- },
- {
- "comment": "Missing value in second key-value pair",
- "expression": "a.{foo: bar, baz:}",
- "error": "syntax"
- },
- {
- "comment": "Trailing comma",
- "expression": "a.{foo: bar, baz: bam, }",
- "error": "syntax"
- },
- {
- "comment": "Nested multi select",
- "expression": "{\"\\\\\":{\" \":*}}",
- "result": {"\\": {" ": ["object"]}}
- }
- ]
- },
- {
- "comment": "Or expressions",
- "given": {"type": "object"},
- "cases": [
- {
- "expression": "foo || bar",
- "result": null
- },
- {
- "expression": "foo ||",
- "error": "syntax"
- },
- {
- "expression": "foo.|| bar",
- "error": "syntax"
- },
- {
- "expression": " || foo",
- "error": "syntax"
- },
- {
- "expression": "foo || || foo",
- "error": "syntax"
- },
- {
- "expression": "foo.[a || b]",
- "result": null
- },
- {
- "expression": "foo.[a ||]",
- "error": "syntax"
- },
- {
- "expression": "\"foo",
- "error": "syntax"
- }
- ]
- },
- {
- "comment": "Filter expressions",
- "given": {"type": "object"},
- "cases": [
- {
- "expression": "foo[?bar==`\"baz\"`]",
- "result": null
- },
- {
- "expression": "foo[? bar == `\"baz\"` ]",
- "result": null
- },
- {
- "expression": "foo[ ?bar==`\"baz\"`]",
- "error": "syntax"
- },
- {
- "expression": "foo[?bar==]",
- "error": "syntax"
- },
- {
- "expression": "foo[?==]",
- "error": "syntax"
- },
- {
- "expression": "foo[?==bar]",
- "error": "syntax"
- },
- {
- "expression": "foo[?bar==baz?]",
- "error": "syntax"
- },
- {
- "expression": "foo[?a.b.c==d.e.f]",
- "result": null
- },
- {
- "expression": "foo[?bar==`[0, 1, 2]`]",
- "result": null
- },
- {
- "expression": "foo[?bar==`[\"a\", \"b\", \"c\"]`]",
- "result": null
- },
- {
- "comment": "Literal char not escaped",
- "expression": "foo[?bar==`[\"foo`bar\"]`]",
- "error": "syntax"
- },
- {
- "comment": "Literal char escaped",
- "expression": "foo[?bar==`[\"foo\\`bar\"]`]",
- "result": null
- },
- {
- "comment": "Unknown comparator",
- "expression": "foo[?bar<>baz]",
- "error": "syntax"
- },
- {
- "comment": "Unknown comparator",
- "expression": "foo[?bar^baz]",
- "error": "syntax"
- },
- {
- "expression": "foo[bar==baz]",
- "error": "syntax"
- },
- {
- "comment": "Quoted identifier in filter expression no spaces",
- "expression": "[?\"\\\\\">`\"foo\"`]",
- "result": null
- },
- {
- "comment": "Quoted identifier in filter expression with spaces",
- "expression": "[?\"\\\\\" > `\"foo\"`]",
- "result": null
- }
- ]
- },
- {
- "comment": "Filter expression errors",
- "given": {"type": "object"},
- "cases": [
- {
- "expression": "bar.`\"anything\"`",
- "error": "syntax"
- },
- {
- "expression": "bar.baz.noexists.`\"literal\"`",
- "error": "syntax"
- },
- {
- "comment": "Literal wildcard projection",
- "expression": "foo[*].`\"literal\"`",
- "error": "syntax"
- },
- {
- "expression": "foo[*].name.`\"literal\"`",
- "error": "syntax"
- },
- {
- "expression": "foo[].name.`\"literal\"`",
- "error": "syntax"
- },
- {
- "expression": "foo[].name.`\"literal\"`.`\"subliteral\"`",
- "error": "syntax"
- },
- {
- "comment": "Projecting a literal onto an empty list",
- "expression": "foo[*].name.noexist.`\"literal\"`",
- "error": "syntax"
- },
- {
- "expression": "foo[].name.noexist.`\"literal\"`",
- "error": "syntax"
- },
- {
- "expression": "twolen[*].`\"foo\"`",
- "error": "syntax"
- },
- {
- "comment": "Two level projection of a literal",
- "expression": "twolen[*].threelen[*].`\"bar\"`",
- "error": "syntax"
- },
- {
- "comment": "Two level flattened projection of a literal",
- "expression": "twolen[].threelen[].`\"bar\"`",
- "error": "syntax"
- }
- ]
- },
- {
- "comment": "Identifiers",
- "given": {"type": "object"},
- "cases": [
- {
- "expression": "foo",
- "result": null
- },
- {
- "expression": "\"foo\"",
- "result": null
- },
- {
- "expression": "\"\\\\\"",
- "result": null
- }
- ]
- },
- {
- "comment": "Combined syntax",
- "given": [],
- "cases": [
- {
- "expression": "*||*|*|*",
- "result": null
- },
- {
- "expression": "*[]||[*]",
- "result": []
- },
- {
- "expression": "[*.*]",
- "result": [null]
- }
- ]
- }
-]
diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/unicode.json b/vendor/github.com/jmespath/go-jmespath/compliance/unicode.json
deleted file mode 100644
index 6b07b0b6dae..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/compliance/unicode.json
+++ /dev/null
@@ -1,38 +0,0 @@
-[
- {
- "given": {"foo": [{"✓": "✓"}, {"✓": "✗"}]},
- "cases": [
- {
- "expression": "foo[].\"✓\"",
- "result": ["✓", "✗"]
- }
- ]
- },
- {
- "given": {"☯": true},
- "cases": [
- {
- "expression": "\"☯\"",
- "result": true
- }
- ]
- },
- {
- "given": {"♪♫•*¨*•.¸¸❤¸¸.•*¨*•♫♪": true},
- "cases": [
- {
- "expression": "\"♪♫•*¨*•.¸¸❤¸¸.•*¨*•♫♪\"",
- "result": true
- }
- ]
- },
- {
- "given": {"☃": true},
- "cases": [
- {
- "expression": "\"☃\"",
- "result": true
- }
- ]
- }
-]
diff --git a/vendor/github.com/jmespath/go-jmespath/compliance/wildcard.json b/vendor/github.com/jmespath/go-jmespath/compliance/wildcard.json
deleted file mode 100644
index 3bcec302815..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/compliance/wildcard.json
+++ /dev/null
@@ -1,460 +0,0 @@
-[{
- "given": {
- "foo": {
- "bar": {
- "baz": "val"
- },
- "other": {
- "baz": "val"
- },
- "other2": {
- "baz": "val"
- },
- "other3": {
- "notbaz": ["a", "b", "c"]
- },
- "other4": {
- "notbaz": ["a", "b", "c"]
- },
- "other5": {
- "other": {
- "a": 1,
- "b": 1,
- "c": 1
- }
- }
- }
- },
- "cases": [
- {
- "expression": "foo.*.baz",
- "result": ["val", "val", "val"]
- },
- {
- "expression": "foo.bar.*",
- "result": ["val"]
- },
- {
- "expression": "foo.*.notbaz",
- "result": [["a", "b", "c"], ["a", "b", "c"]]
- },
- {
- "expression": "foo.*.notbaz[0]",
- "result": ["a", "a"]
- },
- {
- "expression": "foo.*.notbaz[-1]",
- "result": ["c", "c"]
- }
- ]
-}, {
- "given": {
- "foo": {
- "first-1": {
- "second-1": "val"
- },
- "first-2": {
- "second-1": "val"
- },
- "first-3": {
- "second-1": "val"
- }
- }
- },
- "cases": [
- {
- "expression": "foo.*",
- "result": [{"second-1": "val"}, {"second-1": "val"},
- {"second-1": "val"}]
- },
- {
- "expression": "foo.*.*",
- "result": [["val"], ["val"], ["val"]]
- },
- {
- "expression": "foo.*.*.*",
- "result": [[], [], []]
- },
- {
- "expression": "foo.*.*.*.*",
- "result": [[], [], []]
- }
- ]
-}, {
- "given": {
- "foo": {
- "bar": "one"
- },
- "other": {
- "bar": "one"
- },
- "nomatch": {
- "notbar": "three"
- }
- },
- "cases": [
- {
- "expression": "*.bar",
- "result": ["one", "one"]
- }
- ]
-}, {
- "given": {
- "top1": {
- "sub1": {"foo": "one"}
- },
- "top2": {
- "sub1": {"foo": "one"}
- }
- },
- "cases": [
- {
- "expression": "*",
- "result": [{"sub1": {"foo": "one"}},
- {"sub1": {"foo": "one"}}]
- },
- {
- "expression": "*.sub1",
- "result": [{"foo": "one"},
- {"foo": "one"}]
- },
- {
- "expression": "*.*",
- "result": [[{"foo": "one"}],
- [{"foo": "one"}]]
- },
- {
- "expression": "*.*.foo[]",
- "result": ["one", "one"]
- },
- {
- "expression": "*.sub1.foo",
- "result": ["one", "one"]
- }
- ]
-},
-{
- "given":
- {"foo": [{"bar": "one"}, {"bar": "two"}, {"bar": "three"}, {"notbar": "four"}]},
- "cases": [
- {
- "expression": "foo[*].bar",
- "result": ["one", "two", "three"]
- },
- {
- "expression": "foo[*].notbar",
- "result": ["four"]
- }
- ]
-},
-{
- "given":
- [{"bar": "one"}, {"bar": "two"}, {"bar": "three"}, {"notbar": "four"}],
- "cases": [
- {
- "expression": "[*]",
- "result": [{"bar": "one"}, {"bar": "two"}, {"bar": "three"}, {"notbar": "four"}]
- },
- {
- "expression": "[*].bar",
- "result": ["one", "two", "three"]
- },
- {
- "expression": "[*].notbar",
- "result": ["four"]
- }
- ]
-},
-{
- "given": {
- "foo": {
- "bar": [
- {"baz": ["one", "two", "three"]},
- {"baz": ["four", "five", "six"]},
- {"baz": ["seven", "eight", "nine"]}
- ]
- }
- },
- "cases": [
- {
- "expression": "foo.bar[*].baz",
- "result": [["one", "two", "three"], ["four", "five", "six"], ["seven", "eight", "nine"]]
- },
- {
- "expression": "foo.bar[*].baz[0]",
- "result": ["one", "four", "seven"]
- },
- {
- "expression": "foo.bar[*].baz[1]",
- "result": ["two", "five", "eight"]
- },
- {
- "expression": "foo.bar[*].baz[2]",
- "result": ["three", "six", "nine"]
- },
- {
- "expression": "foo.bar[*].baz[3]",
- "result": []
- }
- ]
-},
-{
- "given": {
- "foo": {
- "bar": [["one", "two"], ["three", "four"]]
- }
- },
- "cases": [
- {
- "expression": "foo.bar[*]",
- "result": [["one", "two"], ["three", "four"]]
- },
- {
- "expression": "foo.bar[0]",
- "result": ["one", "two"]
- },
- {
- "expression": "foo.bar[0][0]",
- "result": "one"
- },
- {
- "expression": "foo.bar[0][0][0]",
- "result": null
- },
- {
- "expression": "foo.bar[0][0][0][0]",
- "result": null
- },
- {
- "expression": "foo[0][0]",
- "result": null
- }
- ]
-},
-{
- "given": {
- "foo": [
- {"bar": [{"kind": "basic"}, {"kind": "intermediate"}]},
- {"bar": [{"kind": "advanced"}, {"kind": "expert"}]},
- {"bar": "string"}
- ]
-
- },
- "cases": [
- {
- "expression": "foo[*].bar[*].kind",
- "result": [["basic", "intermediate"], ["advanced", "expert"]]
- },
- {
- "expression": "foo[*].bar[0].kind",
- "result": ["basic", "advanced"]
- }
- ]
-},
-{
- "given": {
- "foo": [
- {"bar": {"kind": "basic"}},
- {"bar": {"kind": "intermediate"}},
- {"bar": {"kind": "advanced"}},
- {"bar": {"kind": "expert"}},
- {"bar": "string"}
- ]
- },
- "cases": [
- {
- "expression": "foo[*].bar.kind",
- "result": ["basic", "intermediate", "advanced", "expert"]
- }
- ]
-},
-{
- "given": {
- "foo": [{"bar": ["one", "two"]}, {"bar": ["three", "four"]}, {"bar": ["five"]}]
- },
- "cases": [
- {
- "expression": "foo[*].bar[0]",
- "result": ["one", "three", "five"]
- },
- {
- "expression": "foo[*].bar[1]",
- "result": ["two", "four"]
- },
- {
- "expression": "foo[*].bar[2]",
- "result": []
- }
- ]
-},
-{
- "given": {
- "foo": [{"bar": []}, {"bar": []}, {"bar": []}]
- },
- "cases": [
- {
- "expression": "foo[*].bar[0]",
- "result": []
- }
- ]
-},
-{
- "given": {
- "foo": [["one", "two"], ["three", "four"], ["five"]]
- },
- "cases": [
- {
- "expression": "foo[*][0]",
- "result": ["one", "three", "five"]
- },
- {
- "expression": "foo[*][1]",
- "result": ["two", "four"]
- }
- ]
-},
-{
- "given": {
- "foo": [
- [
- ["one", "two"], ["three", "four"]
- ], [
- ["five", "six"], ["seven", "eight"]
- ], [
- ["nine"], ["ten"]
- ]
- ]
- },
- "cases": [
- {
- "expression": "foo[*][0]",
- "result": [["one", "two"], ["five", "six"], ["nine"]]
- },
- {
- "expression": "foo[*][1]",
- "result": [["three", "four"], ["seven", "eight"], ["ten"]]
- },
- {
- "expression": "foo[*][0][0]",
- "result": ["one", "five", "nine"]
- },
- {
- "expression": "foo[*][1][0]",
- "result": ["three", "seven", "ten"]
- },
- {
- "expression": "foo[*][0][1]",
- "result": ["two", "six"]
- },
- {
- "expression": "foo[*][1][1]",
- "result": ["four", "eight"]
- },
- {
- "expression": "foo[*][2]",
- "result": []
- },
- {
- "expression": "foo[*][2][2]",
- "result": []
- },
- {
- "expression": "bar[*]",
- "result": null
- },
- {
- "expression": "bar[*].baz[*]",
- "result": null
- }
- ]
-},
-{
- "given": {
- "string": "string",
- "hash": {"foo": "bar", "bar": "baz"},
- "number": 23,
- "nullvalue": null
- },
- "cases": [
- {
- "expression": "string[*]",
- "result": null
- },
- {
- "expression": "hash[*]",
- "result": null
- },
- {
- "expression": "number[*]",
- "result": null
- },
- {
- "expression": "nullvalue[*]",
- "result": null
- },
- {
- "expression": "string[*].foo",
- "result": null
- },
- {
- "expression": "hash[*].foo",
- "result": null
- },
- {
- "expression": "number[*].foo",
- "result": null
- },
- {
- "expression": "nullvalue[*].foo",
- "result": null
- },
- {
- "expression": "nullvalue[*].foo[*].bar",
- "result": null
- }
- ]
-},
-{
- "given": {
- "string": "string",
- "hash": {"foo": "val", "bar": "val"},
- "number": 23,
- "array": [1, 2, 3],
- "nullvalue": null
- },
- "cases": [
- {
- "expression": "string.*",
- "result": null
- },
- {
- "expression": "hash.*",
- "result": ["val", "val"]
- },
- {
- "expression": "number.*",
- "result": null
- },
- {
- "expression": "array.*",
- "result": null
- },
- {
- "expression": "nullvalue.*",
- "result": null
- }
- ]
-},
-{
- "given": {
- "a": [0, 1, 2],
- "b": [0, 1, 2]
- },
- "cases": [
- {
- "expression": "*[0]",
- "result": [0, 0]
- }
- ]
-}
-]
diff --git a/vendor/github.com/jmespath/go-jmespath/functions.go b/vendor/github.com/jmespath/go-jmespath/functions.go
index 8a3f2ef0dce..9b7cd89b4bc 100644
--- a/vendor/github.com/jmespath/go-jmespath/functions.go
+++ b/vendor/github.com/jmespath/go-jmespath/functions.go
@@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"math"
+ "reflect"
"sort"
"strconv"
"strings"
@@ -124,197 +125,197 @@ type functionCaller struct {
func newFunctionCaller() *functionCaller {
caller := &functionCaller{}
caller.functionTable = map[string]functionEntry{
- "length": functionEntry{
+ "length": {
name: "length",
arguments: []argSpec{
- argSpec{types: []jpType{jpString, jpArray, jpObject}},
+ {types: []jpType{jpString, jpArray, jpObject}},
},
handler: jpfLength,
},
- "starts_with": functionEntry{
+ "starts_with": {
name: "starts_with",
arguments: []argSpec{
- argSpec{types: []jpType{jpString}},
- argSpec{types: []jpType{jpString}},
+ {types: []jpType{jpString}},
+ {types: []jpType{jpString}},
},
handler: jpfStartsWith,
},
- "abs": functionEntry{
+ "abs": {
name: "abs",
arguments: []argSpec{
- argSpec{types: []jpType{jpNumber}},
+ {types: []jpType{jpNumber}},
},
handler: jpfAbs,
},
- "avg": functionEntry{
+ "avg": {
name: "avg",
arguments: []argSpec{
- argSpec{types: []jpType{jpArrayNumber}},
+ {types: []jpType{jpArrayNumber}},
},
handler: jpfAvg,
},
- "ceil": functionEntry{
+ "ceil": {
name: "ceil",
arguments: []argSpec{
- argSpec{types: []jpType{jpNumber}},
+ {types: []jpType{jpNumber}},
},
handler: jpfCeil,
},
- "contains": functionEntry{
+ "contains": {
name: "contains",
arguments: []argSpec{
- argSpec{types: []jpType{jpArray, jpString}},
- argSpec{types: []jpType{jpAny}},
+ {types: []jpType{jpArray, jpString}},
+ {types: []jpType{jpAny}},
},
handler: jpfContains,
},
- "ends_with": functionEntry{
+ "ends_with": {
name: "ends_with",
arguments: []argSpec{
- argSpec{types: []jpType{jpString}},
- argSpec{types: []jpType{jpString}},
+ {types: []jpType{jpString}},
+ {types: []jpType{jpString}},
},
handler: jpfEndsWith,
},
- "floor": functionEntry{
+ "floor": {
name: "floor",
arguments: []argSpec{
- argSpec{types: []jpType{jpNumber}},
+ {types: []jpType{jpNumber}},
},
handler: jpfFloor,
},
- "map": functionEntry{
+ "map": {
name: "amp",
arguments: []argSpec{
- argSpec{types: []jpType{jpExpref}},
- argSpec{types: []jpType{jpArray}},
+ {types: []jpType{jpExpref}},
+ {types: []jpType{jpArray}},
},
handler: jpfMap,
hasExpRef: true,
},
- "max": functionEntry{
+ "max": {
name: "max",
arguments: []argSpec{
- argSpec{types: []jpType{jpArrayNumber, jpArrayString}},
+ {types: []jpType{jpArrayNumber, jpArrayString}},
},
handler: jpfMax,
},
- "merge": functionEntry{
+ "merge": {
name: "merge",
arguments: []argSpec{
- argSpec{types: []jpType{jpObject}, variadic: true},
+ {types: []jpType{jpObject}, variadic: true},
},
handler: jpfMerge,
},
- "max_by": functionEntry{
+ "max_by": {
name: "max_by",
arguments: []argSpec{
- argSpec{types: []jpType{jpArray}},
- argSpec{types: []jpType{jpExpref}},
+ {types: []jpType{jpArray}},
+ {types: []jpType{jpExpref}},
},
handler: jpfMaxBy,
hasExpRef: true,
},
- "sum": functionEntry{
+ "sum": {
name: "sum",
arguments: []argSpec{
- argSpec{types: []jpType{jpArrayNumber}},
+ {types: []jpType{jpArrayNumber}},
},
handler: jpfSum,
},
- "min": functionEntry{
+ "min": {
name: "min",
arguments: []argSpec{
- argSpec{types: []jpType{jpArrayNumber, jpArrayString}},
+ {types: []jpType{jpArrayNumber, jpArrayString}},
},
handler: jpfMin,
},
- "min_by": functionEntry{
+ "min_by": {
name: "min_by",
arguments: []argSpec{
- argSpec{types: []jpType{jpArray}},
- argSpec{types: []jpType{jpExpref}},
+ {types: []jpType{jpArray}},
+ {types: []jpType{jpExpref}},
},
handler: jpfMinBy,
hasExpRef: true,
},
- "type": functionEntry{
+ "type": {
name: "type",
arguments: []argSpec{
- argSpec{types: []jpType{jpAny}},
+ {types: []jpType{jpAny}},
},
handler: jpfType,
},
- "keys": functionEntry{
+ "keys": {
name: "keys",
arguments: []argSpec{
- argSpec{types: []jpType{jpObject}},
+ {types: []jpType{jpObject}},
},
handler: jpfKeys,
},
- "values": functionEntry{
+ "values": {
name: "values",
arguments: []argSpec{
- argSpec{types: []jpType{jpObject}},
+ {types: []jpType{jpObject}},
},
handler: jpfValues,
},
- "sort": functionEntry{
+ "sort": {
name: "sort",
arguments: []argSpec{
- argSpec{types: []jpType{jpArrayString, jpArrayNumber}},
+ {types: []jpType{jpArrayString, jpArrayNumber}},
},
handler: jpfSort,
},
- "sort_by": functionEntry{
+ "sort_by": {
name: "sort_by",
arguments: []argSpec{
- argSpec{types: []jpType{jpArray}},
- argSpec{types: []jpType{jpExpref}},
+ {types: []jpType{jpArray}},
+ {types: []jpType{jpExpref}},
},
handler: jpfSortBy,
hasExpRef: true,
},
- "join": functionEntry{
+ "join": {
name: "join",
arguments: []argSpec{
- argSpec{types: []jpType{jpString}},
- argSpec{types: []jpType{jpArrayString}},
+ {types: []jpType{jpString}},
+ {types: []jpType{jpArrayString}},
},
handler: jpfJoin,
},
- "reverse": functionEntry{
+ "reverse": {
name: "reverse",
arguments: []argSpec{
- argSpec{types: []jpType{jpArray, jpString}},
+ {types: []jpType{jpArray, jpString}},
},
handler: jpfReverse,
},
- "to_array": functionEntry{
+ "to_array": {
name: "to_array",
arguments: []argSpec{
- argSpec{types: []jpType{jpAny}},
+ {types: []jpType{jpAny}},
},
handler: jpfToArray,
},
- "to_string": functionEntry{
+ "to_string": {
name: "to_string",
arguments: []argSpec{
- argSpec{types: []jpType{jpAny}},
+ {types: []jpType{jpAny}},
},
handler: jpfToString,
},
- "to_number": functionEntry{
+ "to_number": {
name: "to_number",
arguments: []argSpec{
- argSpec{types: []jpType{jpAny}},
+ {types: []jpType{jpAny}},
},
handler: jpfToNumber,
},
- "not_null": functionEntry{
+ "not_null": {
name: "not_null",
arguments: []argSpec{
- argSpec{types: []jpType{jpAny}, variadic: true},
+ {types: []jpType{jpAny}, variadic: true},
},
handler: jpfNotNull,
},
@@ -357,7 +358,7 @@ func (a *argSpec) typeCheck(arg interface{}) error {
return nil
}
case jpArray:
- if _, ok := arg.([]interface{}); ok {
+ if isSliceType(arg) {
return nil
}
case jpObject:
@@ -409,8 +410,9 @@ func jpfLength(arguments []interface{}) (interface{}, error) {
arg := arguments[0]
if c, ok := arg.(string); ok {
return float64(utf8.RuneCountInString(c)), nil
- } else if c, ok := arg.([]interface{}); ok {
- return float64(len(c)), nil
+ } else if isSliceType(arg) {
+ v := reflect.ValueOf(arg)
+ return float64(v.Len()), nil
} else if c, ok := arg.(map[string]interface{}); ok {
return float64(len(c)), nil
}
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-1 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-1
deleted file mode 100644
index 19102815663..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-1
+++ /dev/null
@@ -1 +0,0 @@
-foo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-10 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-10
deleted file mode 100644
index 4d5f9756e55..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-10
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-100 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-100
deleted file mode 100644
index bc4f6a3f49c..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-100
+++ /dev/null
@@ -1 +0,0 @@
-ends_with(str, 'SStr')
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-101 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-101
deleted file mode 100644
index 81bf07a7a1b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-101
+++ /dev/null
@@ -1 +0,0 @@
-ends_with(str, 'foo')
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-102 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-102
deleted file mode 100644
index 3225de91399..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-102
+++ /dev/null
@@ -1 +0,0 @@
-floor(`1.2`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-103 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-103
deleted file mode 100644
index 8cac9595822..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-103
+++ /dev/null
@@ -1 +0,0 @@
-floor(decimals[0])
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-104 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-104
deleted file mode 100644
index bd76f47e216..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-104
+++ /dev/null
@@ -1 +0,0 @@
-floor(foo)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-105 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-105
deleted file mode 100644
index c719add3deb..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-105
+++ /dev/null
@@ -1 +0,0 @@
-length('abc')
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-106 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-106
deleted file mode 100644
index ff12f04f148..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-106
+++ /dev/null
@@ -1 +0,0 @@
-length('')
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-107 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-107
deleted file mode 100644
index 0eccba1d3a0..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-107
+++ /dev/null
@@ -1 +0,0 @@
-length(@)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-108 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-108
deleted file mode 100644
index ab14b0fa8e6..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-108
+++ /dev/null
@@ -1 +0,0 @@
-length(strings[0])
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-109 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-109
deleted file mode 100644
index f1514bb7438..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-109
+++ /dev/null
@@ -1 +0,0 @@
-length(str)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-110 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-110
deleted file mode 100644
index 09276059a23..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-110
+++ /dev/null
@@ -1 +0,0 @@
-length(array)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-112 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-112
deleted file mode 100644
index ab14b0fa8e6..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-112
+++ /dev/null
@@ -1 +0,0 @@
-length(strings[0])
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-115 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-115
deleted file mode 100644
index bfb41ae9875..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-115
+++ /dev/null
@@ -1 +0,0 @@
-max(strings)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-118 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-118
deleted file mode 100644
index 915ec172ae7..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-118
+++ /dev/null
@@ -1 +0,0 @@
-merge(`{}`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-119 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-119
deleted file mode 100644
index 5b74e9b593f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-119
+++ /dev/null
@@ -1 +0,0 @@
-merge(`{}`, `{}`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-12 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-12
deleted file mode 100644
index 64c5e5885a4..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-12
+++ /dev/null
@@ -1 +0,0 @@
-two
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-120 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-120
deleted file mode 100644
index f34dcd8fade..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-120
+++ /dev/null
@@ -1 +0,0 @@
-merge(`{"a": 1}`, `{"b": 2}`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-121 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-121
deleted file mode 100644
index e335dc96fea..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-121
+++ /dev/null
@@ -1 +0,0 @@
-merge(`{"a": 1}`, `{"a": 2}`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-122 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-122
deleted file mode 100644
index aac28fffeb3..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-122
+++ /dev/null
@@ -1 +0,0 @@
-merge(`{"a": 1, "b": 2}`, `{"a": 2, "c": 3}`, `{"d": 4}`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-123 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-123
deleted file mode 100644
index 1c6fd67198e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-123
+++ /dev/null
@@ -1 +0,0 @@
-min(numbers)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-126 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-126
deleted file mode 100644
index 93e68db7759..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-126
+++ /dev/null
@@ -1 +0,0 @@
-min(decimals)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-128 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-128
deleted file mode 100644
index 554601ea427..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-128
+++ /dev/null
@@ -1 +0,0 @@
-type('abc')
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-129 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-129
deleted file mode 100644
index 1ab2d9834f8..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-129
+++ /dev/null
@@ -1 +0,0 @@
-type(`1.0`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-13 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-13
deleted file mode 100644
index 1d19714ffbc..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-13
+++ /dev/null
@@ -1 +0,0 @@
-three
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-130 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-130
deleted file mode 100644
index 3cee2f56f15..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-130
+++ /dev/null
@@ -1 +0,0 @@
-type(`2`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-131 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-131
deleted file mode 100644
index 4821f9aefcf..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-131
+++ /dev/null
@@ -1 +0,0 @@
-type(`true`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-132 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-132
deleted file mode 100644
index 40b6913a6c0..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-132
+++ /dev/null
@@ -1 +0,0 @@
-type(`false`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-133 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-133
deleted file mode 100644
index c711252be28..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-133
+++ /dev/null
@@ -1 +0,0 @@
-type(`null`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-134 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-134
deleted file mode 100644
index ec5d07e95cc..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-134
+++ /dev/null
@@ -1 +0,0 @@
-type(`[0]`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-135 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-135
deleted file mode 100644
index 2080401e1ea..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-135
+++ /dev/null
@@ -1 +0,0 @@
-type(`{"a": "b"}`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-136 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-136
deleted file mode 100644
index c5ee2ba5cb8..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-136
+++ /dev/null
@@ -1 +0,0 @@
-type(@)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-137 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-137
deleted file mode 100644
index 1814ca17b87..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-137
+++ /dev/null
@@ -1 +0,0 @@
-keys(objects)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-138 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-138
deleted file mode 100644
index e03cdb0d640..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-138
+++ /dev/null
@@ -1 +0,0 @@
-values(objects)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-139 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-139
deleted file mode 100644
index 7fea8d2ce5c..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-139
+++ /dev/null
@@ -1 +0,0 @@
-keys(empty_hash)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-14 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-14
deleted file mode 100644
index a17c92f5974..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-14
+++ /dev/null
@@ -1 +0,0 @@
-one.two
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-140 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-140
deleted file mode 100644
index 4f1d882a406..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-140
+++ /dev/null
@@ -1 +0,0 @@
-join(', ', strings)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-141 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-141
deleted file mode 100644
index 4f1d882a406..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-141
+++ /dev/null
@@ -1 +0,0 @@
-join(', ', strings)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-142 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-142
deleted file mode 100644
index 19ec1fe0900..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-142
+++ /dev/null
@@ -1 +0,0 @@
-join(',', `["a", "b"]`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-143 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-143
deleted file mode 100644
index 761c68a6b59..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-143
+++ /dev/null
@@ -1 +0,0 @@
-join('|', strings)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-144 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-144
deleted file mode 100644
index a0dd68eaa90..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-144
+++ /dev/null
@@ -1 +0,0 @@
-join('|', decimals[].to_string(@))
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-145 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-145
deleted file mode 100644
index a4190b2ba25..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-145
+++ /dev/null
@@ -1 +0,0 @@
-join('|', empty_list)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-146 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-146
deleted file mode 100644
index f5033c30223..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-146
+++ /dev/null
@@ -1 +0,0 @@
-reverse(numbers)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-147 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-147
deleted file mode 100644
index 822f054d50c..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-147
+++ /dev/null
@@ -1 +0,0 @@
-reverse(array)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-148 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-148
deleted file mode 100644
index a584adcc0c5..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-148
+++ /dev/null
@@ -1 +0,0 @@
-reverse(`[]`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-149 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-149
deleted file mode 100644
index fb4cc5dc482..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-149
+++ /dev/null
@@ -1 +0,0 @@
-reverse('')
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-15 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-15
deleted file mode 100644
index 693f9549627..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-15
+++ /dev/null
@@ -1 +0,0 @@
-foo."1"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-150 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-150
deleted file mode 100644
index aa260fabc17..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-150
+++ /dev/null
@@ -1 +0,0 @@
-reverse('hello world')
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-151 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-151
deleted file mode 100644
index d8c58826afd..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-151
+++ /dev/null
@@ -1 +0,0 @@
-starts_with(str, 'S')
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-152 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-152
deleted file mode 100644
index 32e16b7bb00..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-152
+++ /dev/null
@@ -1 +0,0 @@
-starts_with(str, 'St')
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-153 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-153
deleted file mode 100644
index 5f575ae7fc4..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-153
+++ /dev/null
@@ -1 +0,0 @@
-starts_with(str, 'Str')
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-155 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-155
deleted file mode 100644
index f31551c62fd..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-155
+++ /dev/null
@@ -1 +0,0 @@
-sum(numbers)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-156 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-156
deleted file mode 100644
index 18b90446cc9..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-156
+++ /dev/null
@@ -1 +0,0 @@
-sum(decimals)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-157 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-157
deleted file mode 100644
index def4d0bc19c..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-157
+++ /dev/null
@@ -1 +0,0 @@
-sum(array[].to_number(@))
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-158 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-158
deleted file mode 100644
index 48e4a7707c7..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-158
+++ /dev/null
@@ -1 +0,0 @@
-sum(`[]`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-159 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-159
deleted file mode 100644
index 9fb939a0b1b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-159
+++ /dev/null
@@ -1 +0,0 @@
-to_array('foo')
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-16 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-16
deleted file mode 100644
index 86155ed7546..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-16
+++ /dev/null
@@ -1 +0,0 @@
-foo."1"[0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-160 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-160
deleted file mode 100644
index 74ba7cc67db..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-160
+++ /dev/null
@@ -1 +0,0 @@
-to_array(`0`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-161 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-161
deleted file mode 100644
index 57f8b983f08..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-161
+++ /dev/null
@@ -1 +0,0 @@
-to_array(objects)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-162 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-162
deleted file mode 100644
index d17c7345faf..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-162
+++ /dev/null
@@ -1 +0,0 @@
-to_array(`[1, 2, 3]`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-163 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-163
deleted file mode 100644
index 15f70f78399..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-163
+++ /dev/null
@@ -1 +0,0 @@
-to_array(false)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-164 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-164
deleted file mode 100644
index 9b227529b40..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-164
+++ /dev/null
@@ -1 +0,0 @@
-to_string('foo')
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-165 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-165
deleted file mode 100644
index 489a42935a6..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-165
+++ /dev/null
@@ -1 +0,0 @@
-to_string(`1.2`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-166 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-166
deleted file mode 100644
index d17106a00f5..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-166
+++ /dev/null
@@ -1 +0,0 @@
-to_string(`[0, 1]`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-167 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-167
deleted file mode 100644
index 4f4ae9e6890..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-167
+++ /dev/null
@@ -1 +0,0 @@
-to_number('1.0')
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-168 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-168
deleted file mode 100644
index ce932e2e6ac..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-168
+++ /dev/null
@@ -1 +0,0 @@
-to_number('1.1')
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-169 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-169
deleted file mode 100644
index e246fa4dbcb..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-169
+++ /dev/null
@@ -1 +0,0 @@
-to_number('4')
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-17 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-17
deleted file mode 100644
index de0b4c39d99..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-17
+++ /dev/null
@@ -1 +0,0 @@
-foo."-1"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-170 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-170
deleted file mode 100644
index f8c264747e9..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-170
+++ /dev/null
@@ -1 +0,0 @@
-to_number('notanumber')
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-171 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-171
deleted file mode 100644
index 7d423b1cd19..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-171
+++ /dev/null
@@ -1 +0,0 @@
-to_number(`false`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-172 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-172
deleted file mode 100644
index 503716b687c..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-172
+++ /dev/null
@@ -1 +0,0 @@
-to_number(`null`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-173 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-173
deleted file mode 100644
index 7f61dfa157b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-173
+++ /dev/null
@@ -1 +0,0 @@
-to_number(`[0]`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-174 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-174
deleted file mode 100644
index ee72a8c01ac..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-174
+++ /dev/null
@@ -1 +0,0 @@
-to_number(`{"foo": 0}`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-175 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-175
deleted file mode 100644
index 8d8f1f75906..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-175
+++ /dev/null
@@ -1 +0,0 @@
-sort(numbers)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-178 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-178
deleted file mode 100644
index 8cb54ba47b3..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-178
+++ /dev/null
@@ -1 +0,0 @@
-sort(empty_list)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-179 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-179
deleted file mode 100644
index cf2c9b1db2e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-179
+++ /dev/null
@@ -1 +0,0 @@
-not_null(unknown_key, str)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-18 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-18
deleted file mode 100644
index b516b2c489f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-18
+++ /dev/null
@@ -1 +0,0 @@
-@
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-180 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-180
deleted file mode 100644
index e047d486682..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-180
+++ /dev/null
@@ -1 +0,0 @@
-not_null(unknown_key, foo.bar, empty_list, str)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-181 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-181
deleted file mode 100644
index c4cc87b9c12..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-181
+++ /dev/null
@@ -1 +0,0 @@
-not_null(unknown_key, null_key, empty_list, str)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-182 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-182
deleted file mode 100644
index 2c7fa0a9c1e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-182
+++ /dev/null
@@ -1 +0,0 @@
-not_null(all, expressions, are_null)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-183 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-183
deleted file mode 100644
index eb096e61cdd..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-183
+++ /dev/null
@@ -1 +0,0 @@
-numbers[].to_string(@)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-184 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-184
deleted file mode 100644
index 4958abaec45..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-184
+++ /dev/null
@@ -1 +0,0 @@
-array[].to_number(@)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-185 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-185
deleted file mode 100644
index 1027084724d..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-185
+++ /dev/null
@@ -1 +0,0 @@
-foo[].not_null(f, e, d, c, b, a)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-186 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-186
deleted file mode 100644
index 83cb9161282..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-186
+++ /dev/null
@@ -1 +0,0 @@
-sort_by(people, &age)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-187 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-187
deleted file mode 100644
index a494d6c4bf1..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-187
+++ /dev/null
@@ -1 +0,0 @@
-sort_by(people, &to_number(age_str))
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-188 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-188
deleted file mode 100644
index 2294fc54d12..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-188
+++ /dev/null
@@ -1 +0,0 @@
-sort_by(people, &age)[].name
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-189 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-189
deleted file mode 100644
index bb8c2b46d1f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-189
+++ /dev/null
@@ -1 +0,0 @@
-sort_by(people, &age)[].extra
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-19 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-19
deleted file mode 100644
index e3ed49ac653..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-19
+++ /dev/null
@@ -1 +0,0 @@
-@.bar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-190 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-190
deleted file mode 100644
index 3ab0290340a..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-190
+++ /dev/null
@@ -1 +0,0 @@
-sort_by(`[]`, &age)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-191 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-191
deleted file mode 100644
index 97db56f7b67..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-191
+++ /dev/null
@@ -1 +0,0 @@
-max_by(people, &age)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-192 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-192
deleted file mode 100644
index a7e648de963..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-192
+++ /dev/null
@@ -1 +0,0 @@
-max_by(people, &age_str)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-193 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-193
deleted file mode 100644
index be4348d0c1e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-193
+++ /dev/null
@@ -1 +0,0 @@
-max_by(people, &to_number(age_str))
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-194 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-194
deleted file mode 100644
index a707283d499..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-194
+++ /dev/null
@@ -1 +0,0 @@
-min_by(people, &age)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-195 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-195
deleted file mode 100644
index 2cd6618d84b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-195
+++ /dev/null
@@ -1 +0,0 @@
-min_by(people, &age_str)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-196 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-196
deleted file mode 100644
index 833e6837382..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-196
+++ /dev/null
@@ -1 +0,0 @@
-min_by(people, &to_number(age_str))
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-198 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-198
deleted file mode 100644
index 706dbda89a8..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-198
+++ /dev/null
@@ -1 +0,0 @@
-__L
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-199 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-199
deleted file mode 100644
index ca593ca93c1..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-199
+++ /dev/null
@@ -1 +0,0 @@
-"!\r"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-2 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-2
deleted file mode 100644
index 4d5f9756e55..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-2
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-20 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-20
deleted file mode 100644
index f300ab91782..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-20
+++ /dev/null
@@ -1 +0,0 @@
-@.foo[0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-200 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-200
deleted file mode 100644
index 9c93843541d..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-200
+++ /dev/null
@@ -1 +0,0 @@
-Y_1623
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-201 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-201
deleted file mode 100644
index c1b0730e013..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-201
+++ /dev/null
@@ -1 +0,0 @@
-x
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-202 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-202
deleted file mode 100644
index 1552ec63a6f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-202
+++ /dev/null
@@ -1 +0,0 @@
-"\tF\uCebb"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-203 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-203
deleted file mode 100644
index 047041273f0..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-203
+++ /dev/null
@@ -1 +0,0 @@
-" \t"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-204 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-204
deleted file mode 100644
index efd782cc325..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-204
+++ /dev/null
@@ -1 +0,0 @@
-" "
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-205 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-205
deleted file mode 100644
index 8494ac27064..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-205
+++ /dev/null
@@ -1 +0,0 @@
-v2
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-206 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-206
deleted file mode 100644
index c61f7f7ebd8..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-206
+++ /dev/null
@@ -1 +0,0 @@
-"\t"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-207 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-207
deleted file mode 100644
index f6055f1898f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-207
+++ /dev/null
@@ -1 +0,0 @@
-_X
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-208 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-208
deleted file mode 100644
index 4f58e0e7bd2..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-208
+++ /dev/null
@@ -1 +0,0 @@
-"\t4\ud9da\udd15"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-209 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-209
deleted file mode 100644
index f536bfbf687..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-209
+++ /dev/null
@@ -1 +0,0 @@
-v24_W
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-21 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-21
deleted file mode 100644
index ef47ff2c056..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-21
+++ /dev/null
@@ -1 +0,0 @@
-"foo.bar"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-210 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-210
deleted file mode 100644
index 69759281cb4..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-210
+++ /dev/null
@@ -1 +0,0 @@
-"H"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-211 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-211
deleted file mode 100644
index c3e8b5927fb..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-211
+++ /dev/null
@@ -1 +0,0 @@
-"\f"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-212 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-212
deleted file mode 100644
index 24ecc222cbf..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-212
+++ /dev/null
@@ -1 +0,0 @@
-"E4"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-213 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-213
deleted file mode 100644
index 5693009d2e4..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-213
+++ /dev/null
@@ -1 +0,0 @@
-"!"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-214 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-214
deleted file mode 100644
index 62dd220e719..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-214
+++ /dev/null
@@ -1 +0,0 @@
-tM
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-215 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-215
deleted file mode 100644
index 3c1e81f55ae..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-215
+++ /dev/null
@@ -1 +0,0 @@
-" ["
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-216 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-216
deleted file mode 100644
index 493daa673c4..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-216
+++ /dev/null
@@ -1 +0,0 @@
-"R!"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-217 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-217
deleted file mode 100644
index 116b50ab38b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-217
+++ /dev/null
@@ -1 +0,0 @@
-_6W
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-218 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-218
deleted file mode 100644
index 0073fac4520..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-218
+++ /dev/null
@@ -1 +0,0 @@
-"\uaBA1\r"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-219 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-219
deleted file mode 100644
index 00d8fa37eeb..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-219
+++ /dev/null
@@ -1 +0,0 @@
-tL7
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-22 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-22
deleted file mode 100644
index 661ebcfa337..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-22
+++ /dev/null
@@ -1 +0,0 @@
-"foo bar"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-220 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-220
deleted file mode 100644
index c14f16e0264..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-220
+++ /dev/null
@@ -1 +0,0 @@
-"<"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-257 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-257
deleted file mode 100644
index 8a2443e6e90..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-257
+++ /dev/null
@@ -1 +0,0 @@
-hvu
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-258 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-258
deleted file mode 100644
index c9ddacbb61f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-258
+++ /dev/null
@@ -1 +0,0 @@
-"; !"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-259 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-259
deleted file mode 100644
index d0209c6df0a..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-259
+++ /dev/null
@@ -1 +0,0 @@
-hU
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-26 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-26
deleted file mode 100644
index 82649bd24ee..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-26
+++ /dev/null
@@ -1 +0,0 @@
-"/unix/path"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-260 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-260
deleted file mode 100644
index c07242aa44b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-260
+++ /dev/null
@@ -1 +0,0 @@
-"!I\n\/"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-261 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-261
deleted file mode 100644
index 7aae4effc7c..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-261
+++ /dev/null
@@ -1 +0,0 @@
-"\uEEbF"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-262 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-262
deleted file mode 100644
index c1574f35ffa..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-262
+++ /dev/null
@@ -1 +0,0 @@
-"U)\t"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-263 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-263
deleted file mode 100644
index 5197e3a2bf5..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-263
+++ /dev/null
@@ -1 +0,0 @@
-fa0_9
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-264 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-264
deleted file mode 100644
index 320558b0053..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-264
+++ /dev/null
@@ -1 +0,0 @@
-"/"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-265 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-265
deleted file mode 100644
index 4a2cb086527..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-265
+++ /dev/null
@@ -1 +0,0 @@
-Gy
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-266 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-266
deleted file mode 100644
index 9524c83813c..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-266
+++ /dev/null
@@ -1 +0,0 @@
-"\b"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-267 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-267
deleted file mode 100644
index 066b8d98b78..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-267
+++ /dev/null
@@ -1 +0,0 @@
-"<"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-268 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-268
deleted file mode 100644
index c61f7f7ebd8..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-268
+++ /dev/null
@@ -1 +0,0 @@
-"\t"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-269 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-269
deleted file mode 100644
index a582f62d282..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-269
+++ /dev/null
@@ -1 +0,0 @@
-"\t&\\\r"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-27 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-27
deleted file mode 100644
index a1d50731c78..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-27
+++ /dev/null
@@ -1 +0,0 @@
-"\"\"\""
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-270 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-270
deleted file mode 100644
index e3c5eedeb59..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-270
+++ /dev/null
@@ -1 +0,0 @@
-"#"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-271 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-271
deleted file mode 100644
index e75309a5241..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-271
+++ /dev/null
@@ -1 +0,0 @@
-B__
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-272 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-272
deleted file mode 100644
index 027177272c5..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-272
+++ /dev/null
@@ -1 +0,0 @@
-"\nS \n"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-273 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-273
deleted file mode 100644
index 99432276ec4..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-273
+++ /dev/null
@@ -1 +0,0 @@
-Bp
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-274 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-274
deleted file mode 100644
index d4f8a788b80..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-274
+++ /dev/null
@@ -1 +0,0 @@
-",\t;"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-275 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-275
deleted file mode 100644
index 56c384f7530..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-275
+++ /dev/null
@@ -1 +0,0 @@
-B_q
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-276 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-276
deleted file mode 100644
index f093d2aa3bc..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-276
+++ /dev/null
@@ -1 +0,0 @@
-"\/+\t\n\b!Z"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-277 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-277
deleted file mode 100644
index 11e1229d9e3..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-277
+++ /dev/null
@@ -1 +0,0 @@
-"\\ueFAc"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-278 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-278
deleted file mode 100644
index 90dbfcfcd35..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-278
+++ /dev/null
@@ -1 +0,0 @@
-":\f"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-279 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-279
deleted file mode 100644
index b06b8302524..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-279
+++ /dev/null
@@ -1 +0,0 @@
-"\/"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-28 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-28
deleted file mode 100644
index 5f55d73af66..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-28
+++ /dev/null
@@ -1 +0,0 @@
-"bar"."baz"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-280 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-280
deleted file mode 100644
index 0e4bf7c113b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-280
+++ /dev/null
@@ -1 +0,0 @@
-_BW_6Hg_Gl
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-281 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-281
deleted file mode 100644
index 81bb45f8059..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-281
+++ /dev/null
@@ -1 +0,0 @@
-""
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-282 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-282
deleted file mode 100644
index d0b4de14642..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-282
+++ /dev/null
@@ -1 +0,0 @@
-zs1DC
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-283 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-283
deleted file mode 100644
index 68797580caa..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-283
+++ /dev/null
@@ -1 +0,0 @@
-__434
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-284 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-284
deleted file mode 100644
index e61be91c4af..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-284
+++ /dev/null
@@ -1 +0,0 @@
-""
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-285 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-285
deleted file mode 100644
index 026cb9cbb51..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-285
+++ /dev/null
@@ -1 +0,0 @@
-Z_5
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-286 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-286
deleted file mode 100644
index ca9587d06c0..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-286
+++ /dev/null
@@ -1 +0,0 @@
-z_M_
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-287 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-287
deleted file mode 100644
index 67f6d9c42a3..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-287
+++ /dev/null
@@ -1 +0,0 @@
-YU_2
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-288 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-288
deleted file mode 100644
index 927ab653a73..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-288
+++ /dev/null
@@ -1 +0,0 @@
-_0
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-289 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-289
deleted file mode 100644
index 39307ab938e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-289
+++ /dev/null
@@ -1 +0,0 @@
-"\b+"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-29 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-29
deleted file mode 100644
index 8b0c5b41bd9..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-29
+++ /dev/null
@@ -1 +0,0 @@
-foo[?name == 'a']
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-290 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-290
deleted file mode 100644
index a3ec2ed7a12..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-290
+++ /dev/null
@@ -1 +0,0 @@
-"\""
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-291 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-291
deleted file mode 100644
index 26bf7e122de..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-291
+++ /dev/null
@@ -1 +0,0 @@
-D7
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-292 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-292
deleted file mode 100644
index d595c9f43a9..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-292
+++ /dev/null
@@ -1 +0,0 @@
-_62L
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-293 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-293
deleted file mode 100644
index f6869694967..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-293
+++ /dev/null
@@ -1 +0,0 @@
-"\tK\t"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-294 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-294
deleted file mode 100644
index f3a9b7edb50..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-294
+++ /dev/null
@@ -1 +0,0 @@
-"\n\\\f"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-295 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-295
deleted file mode 100644
index 455f00ffc29..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-295
+++ /dev/null
@@ -1 +0,0 @@
-I_
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-296 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-296
deleted file mode 100644
index ccd5968f9c1..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-296
+++ /dev/null
@@ -1 +0,0 @@
-W_a0_
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-297 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-297
deleted file mode 100644
index ee55c16fc81..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-297
+++ /dev/null
@@ -1 +0,0 @@
-BQ
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-298 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-298
deleted file mode 100644
index 0d1a169a67a..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-298
+++ /dev/null
@@ -1 +0,0 @@
-"\tX$\uABBb"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-299 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-299
deleted file mode 100644
index 0573cfd73fd..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-299
+++ /dev/null
@@ -1 +0,0 @@
-Z9
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-3 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-3
deleted file mode 100644
index f0fcbd8eaf4..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-3
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar.baz
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-30 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-30
deleted file mode 100644
index 4f8e6a17aab..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-30
+++ /dev/null
@@ -1 +0,0 @@
-*[?[0] == `0`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-300 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-300
deleted file mode 100644
index a0db02bebf1..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-300
+++ /dev/null
@@ -1 +0,0 @@
-"\b%\""
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-301 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-301
deleted file mode 100644
index 56032f7a248..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-301
+++ /dev/null
@@ -1 +0,0 @@
-_F
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-302 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-302
deleted file mode 100644
index 4a8a3cff369..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-302
+++ /dev/null
@@ -1 +0,0 @@
-"!,"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-303 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-303
deleted file mode 100644
index 7c1efac0004..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-303
+++ /dev/null
@@ -1 +0,0 @@
-"\"!"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-304 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-304
deleted file mode 100644
index a0f489d532f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-304
+++ /dev/null
@@ -1 +0,0 @@
-Hh
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-305 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-305
deleted file mode 100644
index c64e8d5ac8b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-305
+++ /dev/null
@@ -1 +0,0 @@
-"&"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-306 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-306
deleted file mode 100644
index 0567e992f14..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-306
+++ /dev/null
@@ -1 +0,0 @@
-"9\r\\R"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-307 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-307
deleted file mode 100644
index ce8245c5b97..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-307
+++ /dev/null
@@ -1 +0,0 @@
-M_k
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-308 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-308
deleted file mode 100644
index 8f16a5ac048..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-308
+++ /dev/null
@@ -1 +0,0 @@
-"!\b\n\"\""
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-309 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-309
deleted file mode 100644
index 504ff5ae39f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-309
+++ /dev/null
@@ -1 +0,0 @@
-"6"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-31 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-31
deleted file mode 100644
index 07fb57234b8..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-31
+++ /dev/null
@@ -1 +0,0 @@
-foo[?first == last]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-310 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-310
deleted file mode 100644
index 533dd8e5460..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-310
+++ /dev/null
@@ -1 +0,0 @@
-_7
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-311 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-311
deleted file mode 100644
index 1e4a3a34155..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-311
+++ /dev/null
@@ -1 +0,0 @@
-"0"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-312 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-312
deleted file mode 100644
index 37961f6ca42..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-312
+++ /dev/null
@@ -1 +0,0 @@
-"\\8\\"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-313 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-313
deleted file mode 100644
index 23480cff14c..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-313
+++ /dev/null
@@ -1 +0,0 @@
-b7eo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-314 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-314
deleted file mode 100644
index e609f81a3b8..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-314
+++ /dev/null
@@ -1 +0,0 @@
-xIUo9
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-315 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-315
deleted file mode 100644
index d89a25f0b97..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-315
+++ /dev/null
@@ -1 +0,0 @@
-"5"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-316 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-316
deleted file mode 100644
index 5adcf5e7dc5..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-316
+++ /dev/null
@@ -1 +0,0 @@
-"?"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-317 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-317
deleted file mode 100644
index ace4a897d33..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-317
+++ /dev/null
@@ -1 +0,0 @@
-sU
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-318 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-318
deleted file mode 100644
index feffb7061b3..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-318
+++ /dev/null
@@ -1 +0,0 @@
-"VH2&H\\\/"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-319 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-319
deleted file mode 100644
index 8223f1e51e3..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-319
+++ /dev/null
@@ -1 +0,0 @@
-_C
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-32 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-32
deleted file mode 100644
index 7e85c4bdfe9..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-32
+++ /dev/null
@@ -1 +0,0 @@
-foo[?first == last].first
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-320 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-320
deleted file mode 100644
index c9cdc63b070..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-320
+++ /dev/null
@@ -1 +0,0 @@
-_
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-321 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-321
deleted file mode 100644
index c82f7982ee0..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-321
+++ /dev/null
@@ -1 +0,0 @@
-"<\t"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-322 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-322
deleted file mode 100644
index dae65c51554..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-322
+++ /dev/null
@@ -1 +0,0 @@
-"\uD834\uDD1E"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-323 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-323
deleted file mode 100644
index b6b3695438a..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-323
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar[0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-324 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-324
deleted file mode 100644
index bf06e678c15..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-324
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar[1]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-325 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-325
deleted file mode 100644
index 5d48e0205ce..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-325
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar[2]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-326 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-326
deleted file mode 100644
index de3af7230f9..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-326
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar[3]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-327 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-327
deleted file mode 100644
index a1c33350841..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-327
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar[-1]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-328 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-328
deleted file mode 100644
index ad0fef91cfa..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-328
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar[-2]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-329 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-329
deleted file mode 100644
index 3e83c6f7306..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-329
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar[-3]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-33 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-33
deleted file mode 100644
index 72fc0a53e79..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-33
+++ /dev/null
@@ -1 +0,0 @@
-foo[?age > `25`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-330 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-330
deleted file mode 100644
index 433a737d65e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-330
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar[-4]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-331 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-331
deleted file mode 100644
index 4d5f9756e55..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-331
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-332 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-332
deleted file mode 100644
index 5e0d9b71772..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-332
+++ /dev/null
@@ -1 +0,0 @@
-foo[0].bar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-333 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-333
deleted file mode 100644
index 3cd7e9460fe..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-333
+++ /dev/null
@@ -1 +0,0 @@
-foo[1].bar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-334 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-334
deleted file mode 100644
index 74cb1765558..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-334
+++ /dev/null
@@ -1 +0,0 @@
-foo[2].bar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-335 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-335
deleted file mode 100644
index 3cf2007f70d..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-335
+++ /dev/null
@@ -1 +0,0 @@
-foo[3].notbar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-336 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-336
deleted file mode 100644
index 9674d880375..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-336
+++ /dev/null
@@ -1 +0,0 @@
-foo[3].bar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-337 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-337
deleted file mode 100644
index 9b0b2f8189b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-337
+++ /dev/null
@@ -1 +0,0 @@
-foo[0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-338 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-338
deleted file mode 100644
index 83c639a185b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-338
+++ /dev/null
@@ -1 +0,0 @@
-foo[1]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-339 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-339
deleted file mode 100644
index 3b76c9f64a4..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-339
+++ /dev/null
@@ -1 +0,0 @@
-foo[2]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-34 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-34
deleted file mode 100644
index 9a2b0184edf..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-34
+++ /dev/null
@@ -1 +0,0 @@
-foo[?age >= `25`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-340 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-340
deleted file mode 100644
index ff99e045d2e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-340
+++ /dev/null
@@ -1 +0,0 @@
-foo[3]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-341 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-341
deleted file mode 100644
index 040ecb240c8..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-341
+++ /dev/null
@@ -1 +0,0 @@
-foo[4]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-342 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-342
deleted file mode 100644
index 6e7ea636eec..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-342
+++ /dev/null
@@ -1 +0,0 @@
-[0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-343 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-343
deleted file mode 100644
index bace2a0be17..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-343
+++ /dev/null
@@ -1 +0,0 @@
-[1]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-344 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-344
deleted file mode 100644
index 5d50c80c068..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-344
+++ /dev/null
@@ -1 +0,0 @@
-[2]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-345 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-345
deleted file mode 100644
index 99d21a2a0f0..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-345
+++ /dev/null
@@ -1 +0,0 @@
-[-1]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-346 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-346
deleted file mode 100644
index 133a9c6272f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-346
+++ /dev/null
@@ -1 +0,0 @@
-[-2]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-347 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-347
deleted file mode 100644
index b7f78c5dc51..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-347
+++ /dev/null
@@ -1 +0,0 @@
-[-3]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-348 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-348
deleted file mode 100644
index bd9de815f45..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-348
+++ /dev/null
@@ -1 +0,0 @@
-reservations[].instances[].foo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-349 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-349
deleted file mode 100644
index 55e6257352f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-349
+++ /dev/null
@@ -1 +0,0 @@
-reservations[].instances[].bar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-35 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-35
deleted file mode 100644
index fa83f1da3b7..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-35
+++ /dev/null
@@ -1 +0,0 @@
-foo[?age > `30`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-350 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-350
deleted file mode 100644
index 1661747c04d..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-350
+++ /dev/null
@@ -1 +0,0 @@
-reservations[].notinstances[].foo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-351 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-351
deleted file mode 100644
index 1661747c04d..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-351
+++ /dev/null
@@ -1 +0,0 @@
-reservations[].notinstances[].foo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-352 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-352
deleted file mode 100644
index 3debc70f895..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-352
+++ /dev/null
@@ -1 +0,0 @@
-reservations[].instances[].foo[].bar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-353 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-353
deleted file mode 100644
index 75af2fda069..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-353
+++ /dev/null
@@ -1 +0,0 @@
-reservations[].instances[].foo[].baz
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-354 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-354
deleted file mode 100644
index 4a70cd8a03c..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-354
+++ /dev/null
@@ -1 +0,0 @@
-reservations[].instances[].notfoo[].bar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-355 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-355
deleted file mode 100644
index 987985b002f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-355
+++ /dev/null
@@ -1 +0,0 @@
-reservations[].instances[].notfoo[].notbar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-356 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-356
deleted file mode 100644
index 1661747c04d..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-356
+++ /dev/null
@@ -1 +0,0 @@
-reservations[].notinstances[].foo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-357 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-357
deleted file mode 100644
index 634f937e555..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-357
+++ /dev/null
@@ -1 +0,0 @@
-reservations[].instances[].foo[].notbar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-358 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-358
deleted file mode 100644
index 09cb7b8bb1b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-358
+++ /dev/null
@@ -1 +0,0 @@
-reservations[].instances[].bar[].baz
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-359 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-359
deleted file mode 100644
index f5d9ac5b763..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-359
+++ /dev/null
@@ -1 +0,0 @@
-reservations[].instances[].baz[].baz
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-36 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-36
deleted file mode 100644
index 463a2a542db..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-36
+++ /dev/null
@@ -1 +0,0 @@
-foo[?age < `25`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-360 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-360
deleted file mode 100644
index d1016d6e75b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-360
+++ /dev/null
@@ -1 +0,0 @@
-reservations[].instances[].qux[].baz
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-361 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-361
deleted file mode 100644
index ef54cf52d67..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-361
+++ /dev/null
@@ -1 +0,0 @@
-reservations[].instances[].qux[].baz[]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-362 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-362
deleted file mode 100644
index bea506ff235..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-362
+++ /dev/null
@@ -1 +0,0 @@
-foo[]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-363 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-363
deleted file mode 100644
index 20dd081e0e4..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-363
+++ /dev/null
@@ -1 +0,0 @@
-foo[][0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-364 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-364
deleted file mode 100644
index 4803734b09e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-364
+++ /dev/null
@@ -1 +0,0 @@
-foo[][1]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-365 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-365
deleted file mode 100644
index 1be56598534..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-365
+++ /dev/null
@@ -1 +0,0 @@
-foo[][0][0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-366 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-366
deleted file mode 100644
index d2cf6da59fe..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-366
+++ /dev/null
@@ -1 +0,0 @@
-foo[][2][2]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-367 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-367
deleted file mode 100644
index c609ca64b16..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-367
+++ /dev/null
@@ -1 +0,0 @@
-foo[][0][0][100]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-368 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-368
deleted file mode 100644
index 19102815663..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-368
+++ /dev/null
@@ -1 +0,0 @@
-foo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-369 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-369
deleted file mode 100644
index bea506ff235..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-369
+++ /dev/null
@@ -1 +0,0 @@
-foo[]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-37 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-37
deleted file mode 100644
index 10ed5d3f61f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-37
+++ /dev/null
@@ -1 +0,0 @@
-foo[?age <= `25`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-370 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-370
deleted file mode 100644
index 13f2c4a0b4f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-370
+++ /dev/null
@@ -1 +0,0 @@
-foo[].bar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-371 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-371
deleted file mode 100644
index edf3d92775d..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-371
+++ /dev/null
@@ -1 +0,0 @@
-foo[].bar[]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-372 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-372
deleted file mode 100644
index 2a3b993af24..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-372
+++ /dev/null
@@ -1 +0,0 @@
-foo[].bar[].baz
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-373 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-373
deleted file mode 100644
index d5ca878a13b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-373
+++ /dev/null
@@ -1 +0,0 @@
-string[]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-374 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-374
deleted file mode 100644
index fcd255f5d0c..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-374
+++ /dev/null
@@ -1 +0,0 @@
-hash[]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-375 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-375
deleted file mode 100644
index 2d53bd7cdcd..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-375
+++ /dev/null
@@ -1 +0,0 @@
-number[]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-376 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-376
deleted file mode 100644
index cb10d2497e1..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-376
+++ /dev/null
@@ -1 +0,0 @@
-nullvalue[]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-377 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-377
deleted file mode 100644
index f6c79ca84ff..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-377
+++ /dev/null
@@ -1 +0,0 @@
-string[].foo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-378 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-378
deleted file mode 100644
index 09bf36e8a90..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-378
+++ /dev/null
@@ -1 +0,0 @@
-hash[].foo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-379 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-379
deleted file mode 100644
index 4c357818919..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-379
+++ /dev/null
@@ -1 +0,0 @@
-number[].foo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-38 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-38
deleted file mode 100644
index 16a4c36acbd..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-38
+++ /dev/null
@@ -1 +0,0 @@
-foo[?age < `20`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-380 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-380
deleted file mode 100644
index 2dd8ae21855..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-380
+++ /dev/null
@@ -1 +0,0 @@
-nullvalue[].foo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-381 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-381
deleted file mode 100644
index dfed8160389..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-381
+++ /dev/null
@@ -1 +0,0 @@
-nullvalue[].foo[].bar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-382 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-382
deleted file mode 100644
index d7628e646e1..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-382
+++ /dev/null
@@ -1 +0,0 @@
-`"foo"`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-383 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-383
deleted file mode 100644
index 49c5269b12e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-383
+++ /dev/null
@@ -1 +0,0 @@
-`"\u03a6"`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-384 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-384
deleted file mode 100644
index d5db721d012..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-384
+++ /dev/null
@@ -1 +0,0 @@
-`"✓"`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-385 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-385
deleted file mode 100644
index a2b6e4ec85d..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-385
+++ /dev/null
@@ -1 +0,0 @@
-`[1, 2, 3]`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-386 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-386
deleted file mode 100644
index f5801bdd680..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-386
+++ /dev/null
@@ -1 +0,0 @@
-`{"a": "b"}`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-387 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-387
deleted file mode 100644
index f87db59a8b7..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-387
+++ /dev/null
@@ -1 +0,0 @@
-`true`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-388 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-388
deleted file mode 100644
index 3b20d905f33..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-388
+++ /dev/null
@@ -1 +0,0 @@
-`false`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-389 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-389
deleted file mode 100644
index 70bcd29a7a8..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-389
+++ /dev/null
@@ -1 +0,0 @@
-`null`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-39 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-39
deleted file mode 100644
index 351054d3e61..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-39
+++ /dev/null
@@ -1 +0,0 @@
-foo[?age == `20`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-390 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-390
deleted file mode 100644
index 0918d41559b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-390
+++ /dev/null
@@ -1 +0,0 @@
-`0`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-391 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-391
deleted file mode 100644
index ef70c4c11e7..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-391
+++ /dev/null
@@ -1 +0,0 @@
-`1`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-392 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-392
deleted file mode 100644
index b39a922f403..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-392
+++ /dev/null
@@ -1 +0,0 @@
-`2`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-393 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-393
deleted file mode 100644
index 7e65687dbfc..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-393
+++ /dev/null
@@ -1 +0,0 @@
-`3`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-394 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-394
deleted file mode 100644
index 770d1ece705..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-394
+++ /dev/null
@@ -1 +0,0 @@
-`4`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-395 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-395
deleted file mode 100644
index a8b81985c76..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-395
+++ /dev/null
@@ -1 +0,0 @@
-`5`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-396 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-396
deleted file mode 100644
index 7f0861065e7..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-396
+++ /dev/null
@@ -1 +0,0 @@
-`6`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-397 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-397
deleted file mode 100644
index 495114d919e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-397
+++ /dev/null
@@ -1 +0,0 @@
-`7`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-398 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-398
deleted file mode 100644
index 94f355c46ca..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-398
+++ /dev/null
@@ -1 +0,0 @@
-`8`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-399 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-399
deleted file mode 100644
index 600d2aa3f49..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-399
+++ /dev/null
@@ -1 +0,0 @@
-`9`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-4 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-4
deleted file mode 100644
index 31485223580..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-4
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar.baz.bad
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-40 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-40
deleted file mode 100644
index 99d9258a625..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-40
+++ /dev/null
@@ -1 +0,0 @@
-foo[?age != `20`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-400 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-400
deleted file mode 100644
index 637015b5fde..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-400
+++ /dev/null
@@ -1 +0,0 @@
-`"foo\`bar"`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-401 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-401
deleted file mode 100644
index 6fa7557b8d8..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-401
+++ /dev/null
@@ -1 +0,0 @@
-`"foo\"bar"`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-402 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-402
deleted file mode 100644
index 5aabeec3419..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-402
+++ /dev/null
@@ -1 +0,0 @@
-`"1\`"`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-403 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-403
deleted file mode 100644
index 8302ea1984d..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-403
+++ /dev/null
@@ -1 +0,0 @@
-`"\\"`.{a:`"b"`}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-404 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-404
deleted file mode 100644
index d88d014a96c..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-404
+++ /dev/null
@@ -1 +0,0 @@
-`{"a": "b"}`.a
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-405 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-405
deleted file mode 100644
index 47152dddb73..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-405
+++ /dev/null
@@ -1 +0,0 @@
-`{"a": {"b": "c"}}`.a.b
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-406 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-406
deleted file mode 100644
index 895d4293878..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-406
+++ /dev/null
@@ -1 +0,0 @@
-`[0, 1, 2]`[1]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-407 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-407
deleted file mode 100644
index 42500a368cc..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-407
+++ /dev/null
@@ -1 +0,0 @@
-` {"foo": true}`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-408 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-408
deleted file mode 100644
index 08b944dad4a..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-408
+++ /dev/null
@@ -1 +0,0 @@
-`{"foo": true} `
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-409 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-409
deleted file mode 100644
index 6de163f80bc..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-409
+++ /dev/null
@@ -1 +0,0 @@
-'foo'
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-41 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-41
deleted file mode 100644
index 5bc357d9fa6..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-41
+++ /dev/null
@@ -1 +0,0 @@
-foo[?top.name == 'a']
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-410 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-410
deleted file mode 100644
index b84bbdb29fb..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-410
+++ /dev/null
@@ -1 +0,0 @@
-' foo '
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-411 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-411
deleted file mode 100644
index bf6a07ace3d..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-411
+++ /dev/null
@@ -1 +0,0 @@
-'0'
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-412 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-412
deleted file mode 100644
index c742f5b0c97..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-412
+++ /dev/null
@@ -1,2 +0,0 @@
-'newline
-'
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-413 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-413
deleted file mode 100644
index 04e9b3ade60..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-413
+++ /dev/null
@@ -1,2 +0,0 @@
-'
-'
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-414 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-414
deleted file mode 100644
index ebdaf120d7b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-414
+++ /dev/null
@@ -1 +0,0 @@
-'✓'
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-415 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-415
deleted file mode 100644
index d0ba5d7facb..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-415
+++ /dev/null
@@ -1 +0,0 @@
-'𝄞'
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-416 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-416
deleted file mode 100644
index 19c2e2ef41c..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-416
+++ /dev/null
@@ -1 +0,0 @@
-' [foo] '
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-417 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-417
deleted file mode 100644
index 5faa483b197..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-417
+++ /dev/null
@@ -1 +0,0 @@
-'[foo]'
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-418 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-418
deleted file mode 100644
index e3c05c163a3..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-418
+++ /dev/null
@@ -1 +0,0 @@
-'\u03a6'
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-419 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-419
deleted file mode 100644
index 7c13861ac72..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-419
+++ /dev/null
@@ -1 +0,0 @@
-foo.{bar: bar}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-42 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-42
deleted file mode 100644
index d037a0a4ddf..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-42
+++ /dev/null
@@ -1 +0,0 @@
-foo[?top.first == top.last]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-420 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-420
deleted file mode 100644
index f795c255219..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-420
+++ /dev/null
@@ -1 +0,0 @@
-foo.{"bar": bar}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-421 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-421
deleted file mode 100644
index 772c45639cc..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-421
+++ /dev/null
@@ -1 +0,0 @@
-foo.{"foo.bar": bar}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-422 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-422
deleted file mode 100644
index 8808e92bf31..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-422
+++ /dev/null
@@ -1 +0,0 @@
-foo.{bar: bar, baz: baz}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-423 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-423
deleted file mode 100644
index 3f13757a10c..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-423
+++ /dev/null
@@ -1 +0,0 @@
-foo.{"bar": bar, "baz": baz}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-424 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-424
deleted file mode 100644
index 23cd8903e73..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-424
+++ /dev/null
@@ -1 +0,0 @@
-{"baz": baz, "qux\"": "qux\""}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-425 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-425
deleted file mode 100644
index fabb6da4fe8..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-425
+++ /dev/null
@@ -1 +0,0 @@
-foo.{bar:bar,baz:baz}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-426 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-426
deleted file mode 100644
index 4c3f615b1cd..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-426
+++ /dev/null
@@ -1 +0,0 @@
-foo.{bar: bar,qux: qux}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-427 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-427
deleted file mode 100644
index 8bc46535ac5..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-427
+++ /dev/null
@@ -1 +0,0 @@
-foo.{bar: bar, noexist: noexist}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-428 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-428
deleted file mode 100644
index 2024b6f118d..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-428
+++ /dev/null
@@ -1 +0,0 @@
-foo.{noexist: noexist, alsonoexist: alsonoexist}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-429 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-429
deleted file mode 100644
index b52191d10a4..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-429
+++ /dev/null
@@ -1 +0,0 @@
-foo.badkey.{nokey: nokey, alsonokey: alsonokey}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-43 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-43
deleted file mode 100644
index 8534a5cae9f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-43
+++ /dev/null
@@ -1 +0,0 @@
-foo[?top == `{"first": "foo", "last": "bar"}`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-430 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-430
deleted file mode 100644
index 5cd310b6d24..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-430
+++ /dev/null
@@ -1 +0,0 @@
-foo.nested.*.{a: a,b: b}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-431 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-431
deleted file mode 100644
index 0b24ef53526..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-431
+++ /dev/null
@@ -1 +0,0 @@
-foo.nested.three.{a: a, cinner: c.inner}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-432 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-432
deleted file mode 100644
index 473c1c351b4..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-432
+++ /dev/null
@@ -1 +0,0 @@
-foo.nested.three.{a: a, c: c.inner.bad.key}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-433 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-433
deleted file mode 100644
index 44ba735ab10..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-433
+++ /dev/null
@@ -1 +0,0 @@
-foo.{a: nested.one.a, b: nested.two.b}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-434 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-434
deleted file mode 100644
index f5f89b12b5c..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-434
+++ /dev/null
@@ -1 +0,0 @@
-{bar: bar, baz: baz}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-435 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-435
deleted file mode 100644
index 697764cb306..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-435
+++ /dev/null
@@ -1 +0,0 @@
-{bar: bar}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-436 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-436
deleted file mode 100644
index 20447fb1054..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-436
+++ /dev/null
@@ -1 +0,0 @@
-{otherkey: bar}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-437 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-437
deleted file mode 100644
index 310b9b1dd27..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-437
+++ /dev/null
@@ -1 +0,0 @@
-{no: no, exist: exist}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-438 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-438
deleted file mode 100644
index c79b2e24068..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-438
+++ /dev/null
@@ -1 +0,0 @@
-foo.[bar]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-439 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-439
deleted file mode 100644
index ab498ef654c..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-439
+++ /dev/null
@@ -1 +0,0 @@
-foo.[bar,baz]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-44 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-44
deleted file mode 100644
index 71307c40947..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-44
+++ /dev/null
@@ -1 +0,0 @@
-foo[?key == `true`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-440 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-440
deleted file mode 100644
index 4b8f39a468e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-440
+++ /dev/null
@@ -1 +0,0 @@
-foo.[bar,qux]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-441 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-441
deleted file mode 100644
index b8f9020f8e7..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-441
+++ /dev/null
@@ -1 +0,0 @@
-foo.[bar,noexist]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-442 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-442
deleted file mode 100644
index b7c7b3f6556..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-442
+++ /dev/null
@@ -1 +0,0 @@
-foo.[noexist,alsonoexist]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-443 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-443
deleted file mode 100644
index fabb6da4fe8..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-443
+++ /dev/null
@@ -1 +0,0 @@
-foo.{bar:bar,baz:baz}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-444 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-444
deleted file mode 100644
index c15c39f82c1..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-444
+++ /dev/null
@@ -1 +0,0 @@
-foo.[bar,baz[0]]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-445 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-445
deleted file mode 100644
index 9cebd89844f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-445
+++ /dev/null
@@ -1 +0,0 @@
-foo.[bar,baz[1]]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-446 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-446
deleted file mode 100644
index c5bbfbf848f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-446
+++ /dev/null
@@ -1 +0,0 @@
-foo.[bar,baz[2]]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-447 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-447
deleted file mode 100644
index d81cb2b9041..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-447
+++ /dev/null
@@ -1 +0,0 @@
-foo.[bar,baz[3]]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-448 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-448
deleted file mode 100644
index 3a65aa7d6f1..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-448
+++ /dev/null
@@ -1 +0,0 @@
-foo.[bar[0],baz[3]]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-449 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-449
deleted file mode 100644
index 8808e92bf31..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-449
+++ /dev/null
@@ -1 +0,0 @@
-foo.{bar: bar, baz: baz}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-45 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-45
deleted file mode 100644
index e142b22a25f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-45
+++ /dev/null
@@ -1 +0,0 @@
-foo[?key == `false`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-450 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-450
deleted file mode 100644
index ab498ef654c..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-450
+++ /dev/null
@@ -1 +0,0 @@
-foo.[bar,baz]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-451 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-451
deleted file mode 100644
index 8e3d22dc53f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-451
+++ /dev/null
@@ -1 +0,0 @@
-foo.{bar: bar.baz[1],includeme: includeme}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-452 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-452
deleted file mode 100644
index 398c7f8b06e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-452
+++ /dev/null
@@ -1 +0,0 @@
-foo.{"bar.baz.two": bar.baz[1].two, includeme: includeme}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-453 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-453
deleted file mode 100644
index a1764448785..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-453
+++ /dev/null
@@ -1 +0,0 @@
-foo.[includeme, bar.baz[*].common]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-454 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-454
deleted file mode 100644
index da5225ddccb..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-454
+++ /dev/null
@@ -1 +0,0 @@
-foo.[includeme, bar.baz[*].none]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-455 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-455
deleted file mode 100644
index a8870b22bcc..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-455
+++ /dev/null
@@ -1 +0,0 @@
-foo.[includeme, bar.baz[].common]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-456 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-456
deleted file mode 100644
index 420b1a57c45..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-456
+++ /dev/null
@@ -1 +0,0 @@
-reservations[*].instances[*].{id: id, name: name}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-457 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-457
deleted file mode 100644
index 0761ee16dc0..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-457
+++ /dev/null
@@ -1 +0,0 @@
-reservations[].instances[].{id: id, name: name}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-458 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-458
deleted file mode 100644
index aa1191a48cd..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-458
+++ /dev/null
@@ -1 +0,0 @@
-reservations[].instances[].[id, name]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-459 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-459
deleted file mode 100644
index 19102815663..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-459
+++ /dev/null
@@ -1 +0,0 @@
-foo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-46 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-46
deleted file mode 100644
index 9a24a464eed..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-46
+++ /dev/null
@@ -1 +0,0 @@
-foo[?key == `0`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-460 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-460
deleted file mode 100644
index bea506ff235..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-460
+++ /dev/null
@@ -1 +0,0 @@
-foo[]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-461 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-461
deleted file mode 100644
index 13f2c4a0b4f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-461
+++ /dev/null
@@ -1 +0,0 @@
-foo[].bar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-462 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-462
deleted file mode 100644
index edf3d92775d..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-462
+++ /dev/null
@@ -1 +0,0 @@
-foo[].bar[]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-463 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-463
deleted file mode 100644
index d965466e91c..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-463
+++ /dev/null
@@ -1 +0,0 @@
-foo[].bar[].[baz, qux]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-464 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-464
deleted file mode 100644
index f1822a1742b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-464
+++ /dev/null
@@ -1 +0,0 @@
-foo[].bar[].[baz]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-465 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-465
deleted file mode 100644
index c6f77b80c33..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-465
+++ /dev/null
@@ -1 +0,0 @@
-foo[].bar[].[baz, qux][]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-466 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-466
deleted file mode 100644
index db56262a4ea..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-466
+++ /dev/null
@@ -1 +0,0 @@
-foo.[baz[*].bar, qux[0]]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-467 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-467
deleted file mode 100644
index b901067d271..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-467
+++ /dev/null
@@ -1 +0,0 @@
-foo.[baz[*].[bar, boo], qux[0]]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-468 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-468
deleted file mode 100644
index 738479fa69b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-468
+++ /dev/null
@@ -1 +0,0 @@
-foo.[baz[*].not_there || baz[*].bar, qux[0]]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-469 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-469
deleted file mode 100644
index 6926996a7b6..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-469
+++ /dev/null
@@ -1 +0,0 @@
-[[*],*]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-47 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-47
deleted file mode 100644
index 6d33cc72c4e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-47
+++ /dev/null
@@ -1 +0,0 @@
-foo[?key == `1`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-470 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-470
deleted file mode 100644
index 736be0a31f2..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-470
+++ /dev/null
@@ -1 +0,0 @@
-[[*]]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-471 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-471
deleted file mode 100644
index 29e1fb20a55..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-471
+++ /dev/null
@@ -1 +0,0 @@
-outer.foo || outer.bar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-472 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-472
deleted file mode 100644
index c0070ba783a..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-472
+++ /dev/null
@@ -1 +0,0 @@
-outer.foo||outer.bar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-473 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-473
deleted file mode 100644
index 661b0bec5e3..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-473
+++ /dev/null
@@ -1 +0,0 @@
-outer.bar || outer.baz
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-474 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-474
deleted file mode 100644
index 296d5aeee16..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-474
+++ /dev/null
@@ -1 +0,0 @@
-outer.bar||outer.baz
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-475 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-475
deleted file mode 100644
index ca140f8aa33..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-475
+++ /dev/null
@@ -1 +0,0 @@
-outer.bad || outer.foo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-476 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-476
deleted file mode 100644
index 15d30924274..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-476
+++ /dev/null
@@ -1 +0,0 @@
-outer.bad||outer.foo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-477 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-477
deleted file mode 100644
index 56148d957b7..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-477
+++ /dev/null
@@ -1 +0,0 @@
-outer.foo || outer.bad
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-478 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-478
deleted file mode 100644
index 6d3cf6d9069..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-478
+++ /dev/null
@@ -1 +0,0 @@
-outer.foo||outer.bad
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-479 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-479
deleted file mode 100644
index 100fa8339d5..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-479
+++ /dev/null
@@ -1 +0,0 @@
-outer.bad || outer.alsobad
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-48 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-48
deleted file mode 100644
index de56fc042cb..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-48
+++ /dev/null
@@ -1 +0,0 @@
-foo[?key == `[0]`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-480 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-480
deleted file mode 100644
index 64490352bf0..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-480
+++ /dev/null
@@ -1 +0,0 @@
-outer.bad||outer.alsobad
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-481 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-481
deleted file mode 100644
index af901bde17e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-481
+++ /dev/null
@@ -1 +0,0 @@
-outer.empty_string || outer.foo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-482 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-482
deleted file mode 100644
index 36b63e462c4..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-482
+++ /dev/null
@@ -1 +0,0 @@
-outer.nokey || outer.bool || outer.empty_list || outer.empty_string || outer.foo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-483 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-483
deleted file mode 100644
index aba584f99ed..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-483
+++ /dev/null
@@ -1 +0,0 @@
-foo.*.baz | [0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-484 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-484
deleted file mode 100644
index 4234ac01922..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-484
+++ /dev/null
@@ -1 +0,0 @@
-foo.*.baz | [1]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-485 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-485
deleted file mode 100644
index 12330d9902c..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-485
+++ /dev/null
@@ -1 +0,0 @@
-foo.*.baz | [2]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-486 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-486
deleted file mode 100644
index 1b2d93e1952..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-486
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar.* | [0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-487 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-487
deleted file mode 100644
index c371fc6457a..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-487
+++ /dev/null
@@ -1 +0,0 @@
-foo.*.notbaz | [*]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-488 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-488
deleted file mode 100644
index 3c835642eb2..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-488
+++ /dev/null
@@ -1 +0,0 @@
-foo | bar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-489 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-489
deleted file mode 100644
index decaa0421d6..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-489
+++ /dev/null
@@ -1 +0,0 @@
-foo | bar | baz
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-49 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-49
deleted file mode 100644
index 49d9c63a390..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-49
+++ /dev/null
@@ -1 +0,0 @@
-foo[?key == `{"bar": [0]}`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-490 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-490
deleted file mode 100644
index b91068037b1..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-490
+++ /dev/null
@@ -1 +0,0 @@
-foo|bar| baz
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-491 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-491
deleted file mode 100644
index 11df74d8b46..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-491
+++ /dev/null
@@ -1 +0,0 @@
-not_there | [0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-492 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-492
deleted file mode 100644
index 11df74d8b46..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-492
+++ /dev/null
@@ -1 +0,0 @@
-not_there | [0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-493 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-493
deleted file mode 100644
index 37da9fc0b71..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-493
+++ /dev/null
@@ -1 +0,0 @@
-[foo.bar, foo.other] | [0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-494 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-494
deleted file mode 100644
index 1f4fc943d70..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-494
+++ /dev/null
@@ -1 +0,0 @@
-{"a": foo.bar, "b": foo.other} | a
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-495 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-495
deleted file mode 100644
index 67c7ea9cfe4..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-495
+++ /dev/null
@@ -1 +0,0 @@
-{"a": foo.bar, "b": foo.other} | b
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-496 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-496
deleted file mode 100644
index d87f9bba4cd..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-496
+++ /dev/null
@@ -1 +0,0 @@
-{"a": foo.bar, "b": foo.other} | *.baz
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-497 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-497
deleted file mode 100644
index ebf8e271140..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-497
+++ /dev/null
@@ -1 +0,0 @@
-foo.bam || foo.bar | baz
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-498 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-498
deleted file mode 100644
index f32bc6db510..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-498
+++ /dev/null
@@ -1 +0,0 @@
-foo | not_there || bar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-499 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-499
deleted file mode 100644
index d04459d9090..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-499
+++ /dev/null
@@ -1 +0,0 @@
-foo[*].bar[*] | [0][0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-5 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-5
deleted file mode 100644
index b537264a1d5..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-5
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar.bad
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-50 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-50
deleted file mode 100644
index c17c1df1706..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-50
+++ /dev/null
@@ -1 +0,0 @@
-foo[?key == `null`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-500 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-500
deleted file mode 100644
index 3eb869f435b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-500
+++ /dev/null
@@ -1 +0,0 @@
-bar[0:10]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-501 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-501
deleted file mode 100644
index aa5d6be52c7..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-501
+++ /dev/null
@@ -1 +0,0 @@
-foo[0:10:1]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-502 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-502
deleted file mode 100644
index 1a4d1682da0..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-502
+++ /dev/null
@@ -1 +0,0 @@
-foo[0:10]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-503 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-503
deleted file mode 100644
index 5925a578b52..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-503
+++ /dev/null
@@ -1 +0,0 @@
-foo[0:10:]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-504 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-504
deleted file mode 100644
index 081e93abd98..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-504
+++ /dev/null
@@ -1 +0,0 @@
-foo[0::1]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-505 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-505
deleted file mode 100644
index 92270014959..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-505
+++ /dev/null
@@ -1 +0,0 @@
-foo[0::]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-506 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-506
deleted file mode 100644
index fd2294d6646..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-506
+++ /dev/null
@@ -1 +0,0 @@
-foo[0:]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-507 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-507
deleted file mode 100644
index c6b551d5eae..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-507
+++ /dev/null
@@ -1 +0,0 @@
-foo[:10:1]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-508 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-508
deleted file mode 100644
index 503f58da6e3..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-508
+++ /dev/null
@@ -1 +0,0 @@
-foo[::1]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-509 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-509
deleted file mode 100644
index f78bb770caa..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-509
+++ /dev/null
@@ -1 +0,0 @@
-foo[:10:]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-51 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-51
deleted file mode 100644
index 589a214f453..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-51
+++ /dev/null
@@ -1 +0,0 @@
-foo[?key == `[1]`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-510 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-510
deleted file mode 100644
index eb9d2ba881e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-510
+++ /dev/null
@@ -1 +0,0 @@
-foo[::]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-511 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-511
deleted file mode 100644
index 1921a3d9865..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-511
+++ /dev/null
@@ -1 +0,0 @@
-foo[:]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-512 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-512
deleted file mode 100644
index a87afcb1b32..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-512
+++ /dev/null
@@ -1 +0,0 @@
-foo[1:9]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-513 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-513
deleted file mode 100644
index dbf51d8cde4..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-513
+++ /dev/null
@@ -1 +0,0 @@
-foo[0:10:2]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-514 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-514
deleted file mode 100644
index f7288763a71..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-514
+++ /dev/null
@@ -1 +0,0 @@
-foo[5:]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-515 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-515
deleted file mode 100644
index 64395761df6..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-515
+++ /dev/null
@@ -1 +0,0 @@
-foo[5::2]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-516 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-516
deleted file mode 100644
index 706bb14dd7e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-516
+++ /dev/null
@@ -1 +0,0 @@
-foo[::2]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-517 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-517
deleted file mode 100644
index 8fcfaee95c6..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-517
+++ /dev/null
@@ -1 +0,0 @@
-foo[::-1]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-518 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-518
deleted file mode 100644
index f6a00bf9bbc..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-518
+++ /dev/null
@@ -1 +0,0 @@
-foo[1::2]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-519 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-519
deleted file mode 100644
index ea068ee06fb..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-519
+++ /dev/null
@@ -1 +0,0 @@
-foo[10:0:-1]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-52 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-52
deleted file mode 100644
index 214917ac068..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-52
+++ /dev/null
@@ -1 +0,0 @@
-foo[?key == `{"a":2}`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-520 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-520
deleted file mode 100644
index 1fe14258edc..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-520
+++ /dev/null
@@ -1 +0,0 @@
-foo[10:5:-1]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-521 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-521
deleted file mode 100644
index 4ba0e130228..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-521
+++ /dev/null
@@ -1 +0,0 @@
-foo[8:2:-2]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-522 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-522
deleted file mode 100644
index 25db439ff7d..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-522
+++ /dev/null
@@ -1 +0,0 @@
-foo[0:20]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-523 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-523
deleted file mode 100644
index 8a965920af5..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-523
+++ /dev/null
@@ -1 +0,0 @@
-foo[10:-20:-1]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-524 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-524
deleted file mode 100644
index b1e5ba3734f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-524
+++ /dev/null
@@ -1 +0,0 @@
-foo[10:-20]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-525 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-525
deleted file mode 100644
index 06253112e4e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-525
+++ /dev/null
@@ -1 +0,0 @@
-foo[-4:-1]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-526 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-526
deleted file mode 100644
index 1e14a6a4c5e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-526
+++ /dev/null
@@ -1 +0,0 @@
-foo[:-5:-1]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-527 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-527
deleted file mode 100644
index aef5c2747d2..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-527
+++ /dev/null
@@ -1 +0,0 @@
-foo[:2].a
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-528 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-528
deleted file mode 100644
index 93c95fcf689..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-528
+++ /dev/null
@@ -1 +0,0 @@
-foo[:2].b
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-529 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-529
deleted file mode 100644
index 7e0733e595e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-529
+++ /dev/null
@@ -1 +0,0 @@
-foo[:2].a.b
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-53 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-53
deleted file mode 100644
index 4c002ed80d6..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-53
+++ /dev/null
@@ -1 +0,0 @@
-foo[?`true` == key]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-530 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-530
deleted file mode 100644
index 2438b25762d..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-530
+++ /dev/null
@@ -1 +0,0 @@
-bar[::-1].a.b
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-531 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-531
deleted file mode 100644
index 549994b6bc4..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-531
+++ /dev/null
@@ -1 +0,0 @@
-bar[:2].a.b
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-532 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-532
deleted file mode 100644
index ab98292b452..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-532
+++ /dev/null
@@ -1 +0,0 @@
-baz[:2].a
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-533 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-533
deleted file mode 100644
index 65fca968764..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-533
+++ /dev/null
@@ -1 +0,0 @@
-[:]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-534 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-534
deleted file mode 100644
index 18c5daf7bea..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-534
+++ /dev/null
@@ -1 +0,0 @@
-[:2].a
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-535 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-535
deleted file mode 100644
index 1bb84f7d4bd..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-535
+++ /dev/null
@@ -1 +0,0 @@
-[::-1].a
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-536 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-536
deleted file mode 100644
index 7a0416f0566..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-536
+++ /dev/null
@@ -1 +0,0 @@
-[:2].b
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-537 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-537
deleted file mode 100644
index 4d5f9756e55..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-537
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-538 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-538
deleted file mode 100644
index 19102815663..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-538
+++ /dev/null
@@ -1 +0,0 @@
-foo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-539 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-539
deleted file mode 100644
index f59ec20aabf..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-539
+++ /dev/null
@@ -1 +0,0 @@
-*
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-54 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-54
deleted file mode 100644
index 23d27073e97..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-54
+++ /dev/null
@@ -1 +0,0 @@
-foo[?`false` == key]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-540 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-540
deleted file mode 100644
index dee5695746e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-540
+++ /dev/null
@@ -1 +0,0 @@
-*.*
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-541 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-541
deleted file mode 100644
index 1a16f7418d2..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-541
+++ /dev/null
@@ -1 +0,0 @@
-*.foo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-542 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-542
deleted file mode 100644
index 7e8066d39f5..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-542
+++ /dev/null
@@ -1 +0,0 @@
-*[0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-543 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-543
deleted file mode 100644
index 0637a088a01..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-543
+++ /dev/null
@@ -1 +0,0 @@
-[]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-544 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-544
deleted file mode 100644
index 6e7ea636eec..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-544
+++ /dev/null
@@ -1 +0,0 @@
-[0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-545 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-545
deleted file mode 100644
index 5a5194647ad..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-545
+++ /dev/null
@@ -1 +0,0 @@
-[*]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-546 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-546
deleted file mode 100644
index 416127425c2..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-546
+++ /dev/null
@@ -1 +0,0 @@
-*.["0"]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-547 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-547
deleted file mode 100644
index cd9fb6ba778..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-547
+++ /dev/null
@@ -1 +0,0 @@
-[*].bar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-548 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-548
deleted file mode 100644
index 9f3ada48077..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-548
+++ /dev/null
@@ -1 +0,0 @@
-[*][0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-549 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-549
deleted file mode 100644
index 9b0b2f8189b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-549
+++ /dev/null
@@ -1 +0,0 @@
-foo[0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-55 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-55
deleted file mode 100644
index 6d840ee568f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-55
+++ /dev/null
@@ -1 +0,0 @@
-foo[?`0` == key]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-550 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-550
deleted file mode 100644
index b23413b92af..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-550
+++ /dev/null
@@ -1 +0,0 @@
-foo.[*]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-551 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-551
deleted file mode 100644
index 08ab2e1c420..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-551
+++ /dev/null
@@ -1 +0,0 @@
-foo.[abc]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-552 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-552
deleted file mode 100644
index 78b05a5c64e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-552
+++ /dev/null
@@ -1 +0,0 @@
-foo.[abc, def]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-553 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-553
deleted file mode 100644
index 1e7b886e79e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-553
+++ /dev/null
@@ -1 +0,0 @@
-a.{foo: bar}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-554 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-554
deleted file mode 100644
index 91b4c9896e1..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-554
+++ /dev/null
@@ -1 +0,0 @@
-a.{foo: bar, baz: bam}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-555 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-555
deleted file mode 100644
index 8301ef981ef..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-555
+++ /dev/null
@@ -1 +0,0 @@
-{"\\":{" ":*}}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-556 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-556
deleted file mode 100644
index 8f75cc91334..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-556
+++ /dev/null
@@ -1 +0,0 @@
-foo || bar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-557 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-557
deleted file mode 100644
index e5f122c5691..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-557
+++ /dev/null
@@ -1 +0,0 @@
-foo.[a || b]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-558 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-558
deleted file mode 100644
index 39d1914328b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-558
+++ /dev/null
@@ -1 +0,0 @@
-foo[?bar==`"baz"`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-559 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-559
deleted file mode 100644
index d08bbe2501e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-559
+++ /dev/null
@@ -1 +0,0 @@
-foo[? bar == `"baz"` ]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-56 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-56
deleted file mode 100644
index addaf204c5b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-56
+++ /dev/null
@@ -1 +0,0 @@
-foo[?`1` == key]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-560 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-560
deleted file mode 100644
index a77f355812c..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-560
+++ /dev/null
@@ -1 +0,0 @@
-foo[?a.b.c==d.e.f]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-561 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-561
deleted file mode 100644
index c9697aa4870..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-561
+++ /dev/null
@@ -1 +0,0 @@
-foo[?bar==`[0, 1, 2]`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-562 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-562
deleted file mode 100644
index fd7064a0868..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-562
+++ /dev/null
@@ -1 +0,0 @@
-foo[?bar==`["a", "b", "c"]`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-563 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-563
deleted file mode 100644
index 61e5e1b8f71..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-563
+++ /dev/null
@@ -1 +0,0 @@
-foo[?bar==`["foo\`bar"]`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-564 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-564
deleted file mode 100644
index bc9d8af1d92..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-564
+++ /dev/null
@@ -1 +0,0 @@
-[?"\\">`"foo"`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-565 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-565
deleted file mode 100644
index 2dd54dc3904..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-565
+++ /dev/null
@@ -1 +0,0 @@
-[?"\\" > `"foo"`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-566 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-566
deleted file mode 100644
index 19102815663..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-566
+++ /dev/null
@@ -1 +0,0 @@
-foo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-567 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-567
deleted file mode 100644
index 7e9668e7834..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-567
+++ /dev/null
@@ -1 +0,0 @@
-"foo"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-568 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-568
deleted file mode 100644
index d58ac16bf03..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-568
+++ /dev/null
@@ -1 +0,0 @@
-"\\"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-569 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-569
deleted file mode 100644
index 33ac9fba6ff..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-569
+++ /dev/null
@@ -1 +0,0 @@
-*||*|*|*
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-57 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-57
deleted file mode 100644
index acf2435c7cb..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-57
+++ /dev/null
@@ -1 +0,0 @@
-foo[?`[0]` == key]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-570 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-570
deleted file mode 100644
index 99e19638ce4..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-570
+++ /dev/null
@@ -1 +0,0 @@
-*[]||[*]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-571 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-571
deleted file mode 100644
index be0845011c3..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-571
+++ /dev/null
@@ -1 +0,0 @@
-[*.*]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-572 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-572
deleted file mode 100644
index a84b51e1cda..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-572
+++ /dev/null
@@ -1 +0,0 @@
-foo[]."✓"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-573 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-573
deleted file mode 100644
index c2de55815f0..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-573
+++ /dev/null
@@ -1 +0,0 @@
-"☯"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-574 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-574
deleted file mode 100644
index dc2dda0bb68..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-574
+++ /dev/null
@@ -1 +0,0 @@
-"♪♫•*¨*•.¸¸❤¸¸.•*¨*•♫♪"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-575 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-575
deleted file mode 100644
index a2d3d5f6ae0..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-575
+++ /dev/null
@@ -1 +0,0 @@
-"☃"
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-576 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-576
deleted file mode 100644
index 0971c37eaf7..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-576
+++ /dev/null
@@ -1 +0,0 @@
-foo.*.baz
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-577 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-577
deleted file mode 100644
index 0e39dfd695d..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-577
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar.*
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-578 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-578
deleted file mode 100644
index 89c1ce22dc7..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-578
+++ /dev/null
@@ -1 +0,0 @@
-foo.*.notbaz
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-579 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-579
deleted file mode 100644
index 5199b9f95d4..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-579
+++ /dev/null
@@ -1 +0,0 @@
-foo.*.notbaz[0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-58 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-58
deleted file mode 100644
index 99fe382c6c6..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-58
+++ /dev/null
@@ -1 +0,0 @@
-foo[?`{"bar": [0]}` == key]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-580 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-580
deleted file mode 100644
index 5bb6d4ae783..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-580
+++ /dev/null
@@ -1 +0,0 @@
-foo.*.notbaz[-1]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-581 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-581
deleted file mode 100644
index edac73189d7..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-581
+++ /dev/null
@@ -1 +0,0 @@
-foo.*
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-582 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-582
deleted file mode 100644
index 458d0a6ddd0..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-582
+++ /dev/null
@@ -1 +0,0 @@
-foo.*.*
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-583 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-583
deleted file mode 100644
index f757fd53459..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-583
+++ /dev/null
@@ -1 +0,0 @@
-foo.*.*.*
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-584 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-584
deleted file mode 100644
index 670049d96f7..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-584
+++ /dev/null
@@ -1 +0,0 @@
-foo.*.*.*.*
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-585 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-585
deleted file mode 100644
index 3c88caafe88..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-585
+++ /dev/null
@@ -1 +0,0 @@
-*.bar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-586 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-586
deleted file mode 100644
index f59ec20aabf..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-586
+++ /dev/null
@@ -1 +0,0 @@
-*
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-587 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-587
deleted file mode 100644
index 0852fcc7895..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-587
+++ /dev/null
@@ -1 +0,0 @@
-*.sub1
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-588 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-588
deleted file mode 100644
index dee5695746e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-588
+++ /dev/null
@@ -1 +0,0 @@
-*.*
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-589 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-589
deleted file mode 100644
index 66781bba40a..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-589
+++ /dev/null
@@ -1 +0,0 @@
-*.*.foo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-59 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-59
deleted file mode 100644
index 4aad20ae69e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-59
+++ /dev/null
@@ -1 +0,0 @@
-foo[?`null` == key]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-590 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-590
deleted file mode 100644
index 0db15d97e44..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-590
+++ /dev/null
@@ -1 +0,0 @@
-*.sub1.foo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-591 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-591
deleted file mode 100644
index b24be9d7d1c..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-591
+++ /dev/null
@@ -1 +0,0 @@
-foo[*].bar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-592 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-592
deleted file mode 100644
index e6efe133fcd..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-592
+++ /dev/null
@@ -1 +0,0 @@
-foo[*].notbar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-593 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-593
deleted file mode 100644
index 5a5194647ad..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-593
+++ /dev/null
@@ -1 +0,0 @@
-[*]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-594 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-594
deleted file mode 100644
index cd9fb6ba778..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-594
+++ /dev/null
@@ -1 +0,0 @@
-[*].bar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-595 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-595
deleted file mode 100644
index cbf1a5d596a..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-595
+++ /dev/null
@@ -1 +0,0 @@
-[*].notbar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-596 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-596
deleted file mode 100644
index 8bd13b7eb49..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-596
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar[*].baz
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-597 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-597
deleted file mode 100644
index 7239f3e887e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-597
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar[*].baz[0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-598 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-598
deleted file mode 100644
index f5e431d9e3f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-598
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar[*].baz[1]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-599 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-599
deleted file mode 100644
index d0c25953968..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-599
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar[*].baz[2]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-6 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-6
deleted file mode 100644
index b9749b74897..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-6
+++ /dev/null
@@ -1 +0,0 @@
-foo.bad
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-60 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-60
deleted file mode 100644
index dac67509bb4..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-60
+++ /dev/null
@@ -1 +0,0 @@
-foo[?`[1]` == key]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-600 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-600
deleted file mode 100644
index a6388271e41..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-600
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar[*].baz[3]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-601 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-601
deleted file mode 100644
index 2a66ffe93b8..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-601
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar[*]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-602 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-602
deleted file mode 100644
index b6b3695438a..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-602
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar[0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-603 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-603
deleted file mode 100644
index 7e57f9e74ce..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-603
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar[0][0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-604 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-604
deleted file mode 100644
index c5f8bef0bee..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-604
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar[0][0][0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-605 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-605
deleted file mode 100644
index 3decf08030f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-605
+++ /dev/null
@@ -1 +0,0 @@
-foo.bar[0][0][0][0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-606 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-606
deleted file mode 100644
index 655e2959bea..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-606
+++ /dev/null
@@ -1 +0,0 @@
-foo[0][0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-607 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-607
deleted file mode 100644
index 2aa159718c8..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-607
+++ /dev/null
@@ -1 +0,0 @@
-foo[*].bar[*].kind
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-608 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-608
deleted file mode 100644
index 556b380bab1..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-608
+++ /dev/null
@@ -1 +0,0 @@
-foo[*].bar[0].kind
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-609 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-609
deleted file mode 100644
index 0de3229b83e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-609
+++ /dev/null
@@ -1 +0,0 @@
-foo[*].bar.kind
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-61 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-61
deleted file mode 100644
index 130ed3b379e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-61
+++ /dev/null
@@ -1 +0,0 @@
-foo[?`{"a":2}` == key]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-610 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-610
deleted file mode 100644
index 3b511f13351..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-610
+++ /dev/null
@@ -1 +0,0 @@
-foo[*].bar[0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-611 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-611
deleted file mode 100644
index c8dfa16e6bc..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-611
+++ /dev/null
@@ -1 +0,0 @@
-foo[*].bar[1]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-612 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-612
deleted file mode 100644
index 69f04ee23ff..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-612
+++ /dev/null
@@ -1 +0,0 @@
-foo[*].bar[2]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-613 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-613
deleted file mode 100644
index 3b511f13351..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-613
+++ /dev/null
@@ -1 +0,0 @@
-foo[*].bar[0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-614 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-614
deleted file mode 100644
index 03e0c0cb93b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-614
+++ /dev/null
@@ -1 +0,0 @@
-foo[*][0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-615 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-615
deleted file mode 100644
index ac1c8966821..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-615
+++ /dev/null
@@ -1 +0,0 @@
-foo[*][1]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-616 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-616
deleted file mode 100644
index 03e0c0cb93b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-616
+++ /dev/null
@@ -1 +0,0 @@
-foo[*][0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-617 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-617
deleted file mode 100644
index ac1c8966821..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-617
+++ /dev/null
@@ -1 +0,0 @@
-foo[*][1]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-618 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-618
deleted file mode 100644
index 6494cf1c6a0..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-618
+++ /dev/null
@@ -1 +0,0 @@
-foo[*][0][0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-619 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-619
deleted file mode 100644
index 1406be5721f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-619
+++ /dev/null
@@ -1 +0,0 @@
-foo[*][1][0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-62 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-62
deleted file mode 100644
index 3d15fcc1697..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-62
+++ /dev/null
@@ -1 +0,0 @@
-foo[?key != `true`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-620 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-620
deleted file mode 100644
index 72b5aa281a9..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-620
+++ /dev/null
@@ -1 +0,0 @@
-foo[*][0][1]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-621 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-621
deleted file mode 100644
index 02a26491ae4..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-621
+++ /dev/null
@@ -1 +0,0 @@
-foo[*][1][1]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-622 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-622
deleted file mode 100644
index cb08037e209..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-622
+++ /dev/null
@@ -1 +0,0 @@
-foo[*][2]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-623 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-623
deleted file mode 100644
index 91d695995a4..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-623
+++ /dev/null
@@ -1 +0,0 @@
-foo[*][2][2]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-624 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-624
deleted file mode 100644
index f40f261ad17..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-624
+++ /dev/null
@@ -1 +0,0 @@
-bar[*]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-625 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-625
deleted file mode 100644
index 03904b1dece..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-625
+++ /dev/null
@@ -1 +0,0 @@
-bar[*].baz[*]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-626 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-626
deleted file mode 100644
index fd7c21c340c..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-626
+++ /dev/null
@@ -1 +0,0 @@
-string[*]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-627 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-627
deleted file mode 100644
index d7ca4719a99..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-627
+++ /dev/null
@@ -1 +0,0 @@
-hash[*]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-628 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-628
deleted file mode 100644
index b3ddffe3cfe..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-628
+++ /dev/null
@@ -1 +0,0 @@
-number[*]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-629 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-629
deleted file mode 100644
index c03cd39ebf5..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-629
+++ /dev/null
@@ -1 +0,0 @@
-nullvalue[*]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-63 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-63
deleted file mode 100644
index 08731af6908..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-63
+++ /dev/null
@@ -1 +0,0 @@
-foo[?key != `false`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-630 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-630
deleted file mode 100644
index b3c40cd533f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-630
+++ /dev/null
@@ -1 +0,0 @@
-string[*].foo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-631 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-631
deleted file mode 100644
index c5930d543f3..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-631
+++ /dev/null
@@ -1 +0,0 @@
-hash[*].foo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-632 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-632
deleted file mode 100644
index cc0b1a4896a..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-632
+++ /dev/null
@@ -1 +0,0 @@
-number[*].foo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-633 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-633
deleted file mode 100644
index d677b965852..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-633
+++ /dev/null
@@ -1 +0,0 @@
-nullvalue[*].foo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-634 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-634
deleted file mode 100644
index c1166640155..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-634
+++ /dev/null
@@ -1 +0,0 @@
-nullvalue[*].foo[*].bar
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-635 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-635
deleted file mode 100644
index e3399771088..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-635
+++ /dev/null
@@ -1 +0,0 @@
-string.*
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-636 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-636
deleted file mode 100644
index 76f53453a8a..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-636
+++ /dev/null
@@ -1 +0,0 @@
-hash.*
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-637 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-637
deleted file mode 100644
index dd485072f26..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-637
+++ /dev/null
@@ -1 +0,0 @@
-number.*
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-638 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-638
deleted file mode 100644
index 16000c003cd..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-638
+++ /dev/null
@@ -1 +0,0 @@
-array.*
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-639 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-639
deleted file mode 100644
index 1d0d03ed3b5..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-639
+++ /dev/null
@@ -1 +0,0 @@
-nullvalue.*
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-64 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-64
deleted file mode 100644
index b67aebe98ad..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-64
+++ /dev/null
@@ -1 +0,0 @@
-foo[?key != `0`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-640 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-640
deleted file mode 100644
index 7e8066d39f5..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-640
+++ /dev/null
@@ -1 +0,0 @@
-*[0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-641 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-641
deleted file mode 100644
index 41ebe5ba9d7..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-641
+++ /dev/null
@@ -1 +0,0 @@
-`foo`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-642 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-642
deleted file mode 100644
index fe0397993c5..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-642
+++ /dev/null
@@ -1 +0,0 @@
-`foo\"quote`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-643 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-643
deleted file mode 100644
index 1a27fd80c3c..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-643
+++ /dev/null
@@ -1 +0,0 @@
-`✓`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-644 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-644
deleted file mode 100644
index 559a13456be..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-644
+++ /dev/null
@@ -1 +0,0 @@
-`foo\"bar`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-645 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-645
deleted file mode 100644
index e31621b438e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-645
+++ /dev/null
@@ -1 +0,0 @@
-`1\``
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-646 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-646
deleted file mode 100644
index 6bf7a10362a..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-646
+++ /dev/null
@@ -1 +0,0 @@
-`\\`.{a:`b`}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-647 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-647
deleted file mode 100644
index 41ebe5ba9d7..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-647
+++ /dev/null
@@ -1 +0,0 @@
-`foo`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-648 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-648
deleted file mode 100644
index 28b9bcbbb52..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-648
+++ /dev/null
@@ -1 +0,0 @@
-` foo`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-649 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-649
deleted file mode 100644
index 41ebe5ba9d7..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-649
+++ /dev/null
@@ -1 +0,0 @@
-`foo`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-65 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-65
deleted file mode 100644
index d3ac793bb6b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-65
+++ /dev/null
@@ -1 +0,0 @@
-foo[?key != `1`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-650 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-650
deleted file mode 100644
index fe0397993c5..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-650
+++ /dev/null
@@ -1 +0,0 @@
-`foo\"quote`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-651 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-651
deleted file mode 100644
index 1a27fd80c3c..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-651
+++ /dev/null
@@ -1 +0,0 @@
-`✓`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-652 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-652
deleted file mode 100644
index 559a13456be..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-652
+++ /dev/null
@@ -1 +0,0 @@
-`foo\"bar`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-653 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-653
deleted file mode 100644
index e31621b438e..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-653
+++ /dev/null
@@ -1 +0,0 @@
-`1\``
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-654 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-654
deleted file mode 100644
index 6bf7a10362a..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-654
+++ /dev/null
@@ -1 +0,0 @@
-`\\`.{a:`b`}
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-655 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-655
deleted file mode 100644
index 41ebe5ba9d7..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-655
+++ /dev/null
@@ -1 +0,0 @@
-`foo`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-656 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-656
deleted file mode 100644
index 28b9bcbbb52..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-656
+++ /dev/null
@@ -1 +0,0 @@
-` foo`
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-66 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-66
deleted file mode 100644
index 065295bc17a..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-66
+++ /dev/null
@@ -1 +0,0 @@
-foo[?key != `null`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-67 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-67
deleted file mode 100644
index 43d164927d4..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-67
+++ /dev/null
@@ -1 +0,0 @@
-foo[?key != `[1]`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-68 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-68
deleted file mode 100644
index 6b884fa866f..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-68
+++ /dev/null
@@ -1 +0,0 @@
-foo[?key != `{"a":2}`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-69 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-69
deleted file mode 100644
index d85c779d0a3..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-69
+++ /dev/null
@@ -1 +0,0 @@
-foo[?`true` != key]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-7 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-7
deleted file mode 100644
index 44d6628cdc6..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-7
+++ /dev/null
@@ -1 +0,0 @@
-bad
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-70 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-70
deleted file mode 100644
index 3e6dcf3045a..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-70
+++ /dev/null
@@ -1 +0,0 @@
-foo[?`false` != key]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-71 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-71
deleted file mode 100644
index bdb820b30b3..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-71
+++ /dev/null
@@ -1 +0,0 @@
-foo[?`0` != key]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-72 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-72
deleted file mode 100644
index 3f3048a004c..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-72
+++ /dev/null
@@ -1 +0,0 @@
-foo[?`1` != key]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-73 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-73
deleted file mode 100644
index dacc2572451..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-73
+++ /dev/null
@@ -1 +0,0 @@
-foo[?`null` != key]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-74 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-74
deleted file mode 100644
index 32ebae8800b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-74
+++ /dev/null
@@ -1 +0,0 @@
-foo[?`[1]` != key]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-75 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-75
deleted file mode 100644
index dcd023e0fbc..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-75
+++ /dev/null
@@ -1 +0,0 @@
-foo[?`{"a":2}` != key]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-76 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-76
deleted file mode 100644
index e08cc13cbe3..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-76
+++ /dev/null
@@ -1 +0,0 @@
-reservations[].instances[?bar==`1`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-77 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-77
deleted file mode 100644
index 1ec43f45fce..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-77
+++ /dev/null
@@ -1 +0,0 @@
-reservations[*].instances[?bar==`1`]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-78 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-78
deleted file mode 100644
index 30387116349..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-78
+++ /dev/null
@@ -1 +0,0 @@
-reservations[].instances[?bar==`1`][]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-79 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-79
deleted file mode 100644
index e3875746b35..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-79
+++ /dev/null
@@ -1 +0,0 @@
-foo[?bar==`1`].bar[0]
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-8 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-8
deleted file mode 100644
index da7bc1ccfd0..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-8
+++ /dev/null
@@ -1 +0,0 @@
-bad.morebad.morebad
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-80 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-80
deleted file mode 100644
index 5c3d683565d..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-80
+++ /dev/null
@@ -1 +0,0 @@
-foo[?a==`1`].b.c
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-81 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-81
deleted file mode 100644
index 6232808f0ae..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-81
+++ /dev/null
@@ -1 +0,0 @@
-abs(foo)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-82 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-82
deleted file mode 100644
index 6232808f0ae..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-82
+++ /dev/null
@@ -1 +0,0 @@
-abs(foo)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-83 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-83
deleted file mode 100644
index 29497f4ff54..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-83
+++ /dev/null
@@ -1 +0,0 @@
-abs(array[1])
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-84 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-84
deleted file mode 100644
index 29497f4ff54..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-84
+++ /dev/null
@@ -1 +0,0 @@
-abs(array[1])
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-85 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-85
deleted file mode 100644
index 346696563f8..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-85
+++ /dev/null
@@ -1 +0,0 @@
-abs(`-24`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-86 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-86
deleted file mode 100644
index 346696563f8..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-86
+++ /dev/null
@@ -1 +0,0 @@
-abs(`-24`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-87 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-87
deleted file mode 100644
index c6268f8473b..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-87
+++ /dev/null
@@ -1 +0,0 @@
-avg(numbers)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-88 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-88
deleted file mode 100644
index 7ce703695ee..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-88
+++ /dev/null
@@ -1 +0,0 @@
-ceil(`1.2`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-89 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-89
deleted file mode 100644
index 0561bc26d9a..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-89
+++ /dev/null
@@ -1 +0,0 @@
-ceil(decimals[0])
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-9 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-9
deleted file mode 100644
index 19102815663..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-9
+++ /dev/null
@@ -1 +0,0 @@
-foo
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-90 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-90
deleted file mode 100644
index c78c1fc3002..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-90
+++ /dev/null
@@ -1 +0,0 @@
-ceil(decimals[1])
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-91 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-91
deleted file mode 100644
index ebcb4bbdbb9..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-91
+++ /dev/null
@@ -1 +0,0 @@
-ceil(decimals[2])
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-92 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-92
deleted file mode 100644
index 6edbf1afe4a..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-92
+++ /dev/null
@@ -1 +0,0 @@
-contains('abc', 'a')
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-93 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-93
deleted file mode 100644
index d2b2f070dab..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-93
+++ /dev/null
@@ -1 +0,0 @@
-contains('abc', 'd')
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-94 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-94
deleted file mode 100644
index 3535da2eca6..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-94
+++ /dev/null
@@ -1 +0,0 @@
-contains(strings, 'a')
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-95 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-95
deleted file mode 100644
index ba839fe60d1..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-95
+++ /dev/null
@@ -1 +0,0 @@
-contains(decimals, `1.2`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-96 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-96
deleted file mode 100644
index f4358186979..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-96
+++ /dev/null
@@ -1 +0,0 @@
-contains(decimals, `false`)
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-97 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-97
deleted file mode 100644
index adb65fc01f0..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-97
+++ /dev/null
@@ -1 +0,0 @@
-ends_with(str, 'r')
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-98 b/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-98
deleted file mode 100644
index 93d6901bead..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/corpus/expr-98
+++ /dev/null
@@ -1 +0,0 @@
-ends_with(str, 'tr')
\ No newline at end of file
diff --git a/vendor/github.com/jmespath/go-jmespath/fuzz/jmespath.go b/vendor/github.com/jmespath/go-jmespath/fuzz/jmespath.go
deleted file mode 100644
index c7df08782a1..00000000000
--- a/vendor/github.com/jmespath/go-jmespath/fuzz/jmespath.go
+++ /dev/null
@@ -1,13 +0,0 @@
-package jmespath
-
-import "github.com/jmespath/go-jmespath"
-
-// Fuzz will fuzz test the JMESPath parser.
-func Fuzz(data []byte) int {
- p := jmespath.NewParser()
- _, err := p.Parse(string(data))
- if err != nil {
- return 1
- }
- return 0
-}
diff --git a/vendor/github.com/jmespath/go-jmespath/interpreter_test.go b/vendor/github.com/jmespath/go-jmespath/interpreter_test.go
index 5b529c4f313..11c6d0aa01c 100644
--- a/vendor/github.com/jmespath/go-jmespath/interpreter_test.go
+++ b/vendor/github.com/jmespath/go-jmespath/interpreter_test.go
@@ -69,7 +69,7 @@ func TestCanSupportUserDefinedStructsRef(t *testing.T) {
func TestCanSupportStructWithSliceAll(t *testing.T) {
assert := assert.New(t)
- data := sliceType{A: "foo", B: []scalars{scalars{"f1", "b1"}, scalars{"correct", "b2"}}}
+ data := sliceType{A: "foo", B: []scalars{{"f1", "b1"}, {"correct", "b2"}}}
result, err := Search("B[].Foo", data)
assert.Nil(err)
assert.Equal([]interface{}{"f1", "correct"}, result)
@@ -77,7 +77,7 @@ func TestCanSupportStructWithSliceAll(t *testing.T) {
func TestCanSupportStructWithSlicingExpression(t *testing.T) {
assert := assert.New(t)
- data := sliceType{A: "foo", B: []scalars{scalars{"f1", "b1"}, scalars{"correct", "b2"}}}
+ data := sliceType{A: "foo", B: []scalars{{"f1", "b1"}, {"correct", "b2"}}}
result, err := Search("B[:].Foo", data)
assert.Nil(err)
assert.Equal([]interface{}{"f1", "correct"}, result)
@@ -85,7 +85,7 @@ func TestCanSupportStructWithSlicingExpression(t *testing.T) {
func TestCanSupportStructWithFilterProjection(t *testing.T) {
assert := assert.New(t)
- data := sliceType{A: "foo", B: []scalars{scalars{"f1", "b1"}, scalars{"correct", "b2"}}}
+ data := sliceType{A: "foo", B: []scalars{{"f1", "b1"}, {"correct", "b2"}}}
result, err := Search("B[? `true` ].Foo", data)
assert.Nil(err)
assert.Equal([]interface{}{"f1", "correct"}, result)
@@ -93,7 +93,7 @@ func TestCanSupportStructWithFilterProjection(t *testing.T) {
func TestCanSupportStructWithSlice(t *testing.T) {
assert := assert.New(t)
- data := sliceType{A: "foo", B: []scalars{scalars{"f1", "b1"}, scalars{"correct", "b2"}}}
+ data := sliceType{A: "foo", B: []scalars{{"f1", "b1"}, {"correct", "b2"}}}
result, err := Search("B[-1].Foo", data)
assert.Nil(err)
assert.Equal("correct", result)
@@ -109,7 +109,7 @@ func TestCanSupportStructWithOrExpressions(t *testing.T) {
func TestCanSupportStructWithSlicePointer(t *testing.T) {
assert := assert.New(t)
- data := sliceType{A: "foo", C: []*scalars{&scalars{"f1", "b1"}, &scalars{"correct", "b2"}}}
+ data := sliceType{A: "foo", C: []*scalars{{"f1", "b1"}, {"correct", "b2"}}}
result, err := Search("C[-1].Foo", data)
assert.Nil(err)
assert.Equal("correct", result)
@@ -128,7 +128,7 @@ func TestWillAutomaticallyCapitalizeFieldNames(t *testing.T) {
func TestCanSupportStructWithSliceLowerCased(t *testing.T) {
assert := assert.New(t)
- data := sliceType{A: "foo", B: []scalars{scalars{"f1", "b1"}, scalars{"correct", "b2"}}}
+ data := sliceType{A: "foo", B: []scalars{{"f1", "b1"}, {"correct", "b2"}}}
result, err := Search("b[-1].foo", data)
assert.Nil(err)
assert.Equal("correct", result)
@@ -173,6 +173,14 @@ func TestCanSupportProjectionsWithStructs(t *testing.T) {
assert.Equal([]interface{}{"first", "second", "third"}, result)
}
+func TestCanSupportSliceOfStructsWithFunctions(t *testing.T) {
+ assert := assert.New(t)
+ data := []scalars{scalars{"a1", "b1"}, scalars{"a2", "b2"}}
+ result, err := Search("length(@)", data)
+ assert.Nil(err)
+ assert.Equal(result.(float64), 2.0)
+}
+
func BenchmarkInterpretSingleFieldStruct(b *testing.B) {
intr := newInterpreter()
parser := NewParser()
diff --git a/vendor/github.com/jmespath/go-jmespath/lexer_test.go b/vendor/github.com/jmespath/go-jmespath/lexer_test.go
index 7a9a9ee24bf..d13a042da46 100644
--- a/vendor/github.com/jmespath/go-jmespath/lexer_test.go
+++ b/vendor/github.com/jmespath/go-jmespath/lexer_test.go
@@ -11,63 +11,63 @@ var lexingTests = []struct {
expression string
expected []token
}{
- {"*", []token{token{tStar, "*", 0, 1}}},
- {".", []token{token{tDot, ".", 0, 1}}},
- {"[?", []token{token{tFilter, "[?", 0, 2}}},
- {"[]", []token{token{tFlatten, "[]", 0, 2}}},
- {"(", []token{token{tLparen, "(", 0, 1}}},
- {")", []token{token{tRparen, ")", 0, 1}}},
- {"[", []token{token{tLbracket, "[", 0, 1}}},
- {"]", []token{token{tRbracket, "]", 0, 1}}},
- {"{", []token{token{tLbrace, "{", 0, 1}}},
- {"}", []token{token{tRbrace, "}", 0, 1}}},
- {"||", []token{token{tOr, "||", 0, 2}}},
- {"|", []token{token{tPipe, "|", 0, 1}}},
- {"29", []token{token{tNumber, "29", 0, 2}}},
- {"2", []token{token{tNumber, "2", 0, 1}}},
- {"0", []token{token{tNumber, "0", 0, 1}}},
- {"-20", []token{token{tNumber, "-20", 0, 3}}},
- {"foo", []token{token{tUnquotedIdentifier, "foo", 0, 3}}},
- {`"bar"`, []token{token{tQuotedIdentifier, "bar", 0, 3}}},
+ {"*", []token{{tStar, "*", 0, 1}}},
+ {".", []token{{tDot, ".", 0, 1}}},
+ {"[?", []token{{tFilter, "[?", 0, 2}}},
+ {"[]", []token{{tFlatten, "[]", 0, 2}}},
+ {"(", []token{{tLparen, "(", 0, 1}}},
+ {")", []token{{tRparen, ")", 0, 1}}},
+ {"[", []token{{tLbracket, "[", 0, 1}}},
+ {"]", []token{{tRbracket, "]", 0, 1}}},
+ {"{", []token{{tLbrace, "{", 0, 1}}},
+ {"}", []token{{tRbrace, "}", 0, 1}}},
+ {"||", []token{{tOr, "||", 0, 2}}},
+ {"|", []token{{tPipe, "|", 0, 1}}},
+ {"29", []token{{tNumber, "29", 0, 2}}},
+ {"2", []token{{tNumber, "2", 0, 1}}},
+ {"0", []token{{tNumber, "0", 0, 1}}},
+ {"-20", []token{{tNumber, "-20", 0, 3}}},
+ {"foo", []token{{tUnquotedIdentifier, "foo", 0, 3}}},
+ {`"bar"`, []token{{tQuotedIdentifier, "bar", 0, 3}}},
// Escaping the delimiter
- {`"bar\"baz"`, []token{token{tQuotedIdentifier, `bar"baz`, 0, 7}}},
- {",", []token{token{tComma, ",", 0, 1}}},
- {":", []token{token{tColon, ":", 0, 1}}},
- {"<", []token{token{tLT, "<", 0, 1}}},
- {"<=", []token{token{tLTE, "<=", 0, 2}}},
- {">", []token{token{tGT, ">", 0, 1}}},
- {">=", []token{token{tGTE, ">=", 0, 2}}},
- {"==", []token{token{tEQ, "==", 0, 2}}},
- {"!=", []token{token{tNE, "!=", 0, 2}}},
- {"`[0, 1, 2]`", []token{token{tJSONLiteral, "[0, 1, 2]", 1, 9}}},
- {"'foo'", []token{token{tStringLiteral, "foo", 1, 3}}},
- {"'a'", []token{token{tStringLiteral, "a", 1, 1}}},
- {`'foo\'bar'`, []token{token{tStringLiteral, "foo'bar", 1, 7}}},
- {"@", []token{token{tCurrent, "@", 0, 1}}},
- {"&", []token{token{tExpref, "&", 0, 1}}},
+ {`"bar\"baz"`, []token{{tQuotedIdentifier, `bar"baz`, 0, 7}}},
+ {",", []token{{tComma, ",", 0, 1}}},
+ {":", []token{{tColon, ":", 0, 1}}},
+ {"<", []token{{tLT, "<", 0, 1}}},
+ {"<=", []token{{tLTE, "<=", 0, 2}}},
+ {">", []token{{tGT, ">", 0, 1}}},
+ {">=", []token{{tGTE, ">=", 0, 2}}},
+ {"==", []token{{tEQ, "==", 0, 2}}},
+ {"!=", []token{{tNE, "!=", 0, 2}}},
+ {"`[0, 1, 2]`", []token{{tJSONLiteral, "[0, 1, 2]", 1, 9}}},
+ {"'foo'", []token{{tStringLiteral, "foo", 1, 3}}},
+ {"'a'", []token{{tStringLiteral, "a", 1, 1}}},
+ {`'foo\'bar'`, []token{{tStringLiteral, "foo'bar", 1, 7}}},
+ {"@", []token{{tCurrent, "@", 0, 1}}},
+ {"&", []token{{tExpref, "&", 0, 1}}},
// Quoted identifier unicode escape sequences
- {`"\u2713"`, []token{token{tQuotedIdentifier, "✓", 0, 3}}},
- {`"\\"`, []token{token{tQuotedIdentifier, `\`, 0, 1}}},
- {"`\"foo\"`", []token{token{tJSONLiteral, "\"foo\"", 1, 5}}},
+ {`"\u2713"`, []token{{tQuotedIdentifier, "✓", 0, 3}}},
+ {`"\\"`, []token{{tQuotedIdentifier, `\`, 0, 1}}},
+ {"`\"foo\"`", []token{{tJSONLiteral, "\"foo\"", 1, 5}}},
// Combinations of tokens.
{"foo.bar", []token{
- token{tUnquotedIdentifier, "foo", 0, 3},
- token{tDot, ".", 3, 1},
- token{tUnquotedIdentifier, "bar", 4, 3},
+ {tUnquotedIdentifier, "foo", 0, 3},
+ {tDot, ".", 3, 1},
+ {tUnquotedIdentifier, "bar", 4, 3},
}},
{"foo[0]", []token{
- token{tUnquotedIdentifier, "foo", 0, 3},
- token{tLbracket, "[", 3, 1},
- token{tNumber, "0", 4, 1},
- token{tRbracket, "]", 5, 1},
+ {tUnquotedIdentifier, "foo", 0, 3},
+ {tLbracket, "[", 3, 1},
+ {tNumber, "0", 4, 1},
+ {tRbracket, "]", 5, 1},
}},
{"foo[?a 0 {
- mgr_copy := mgr
- cb_copy := cb
- cb = func() { mgr_copy.SetValues(values, cb_copy) }
+ cb = func(mgr *ContextManager, cb func()) func() {
+ return func() { mgr.SetValues(values, cb) }
+ }(mgr, cb)
}
}
diff --git a/vendor/github.com/jtolds/gls/context_test.go b/vendor/github.com/jtolds/gls/context_test.go
index ae5bde4aede..2fa426cb5dc 100644
--- a/vendor/github.com/jtolds/gls/context_test.go
+++ b/vendor/github.com/jtolds/gls/context_test.go
@@ -1,16 +1,18 @@
-package gls
+package gls_test
import (
"fmt"
"sync"
"testing"
+
+ "github.com/jtolds/gls"
)
func TestContexts(t *testing.T) {
- mgr1 := NewContextManager()
- mgr2 := NewContextManager()
+ mgr1 := gls.NewContextManager()
+ mgr2 := gls.NewContextManager()
- CheckVal := func(mgr *ContextManager, key, exp_val string) {
+ CheckVal := func(mgr *gls.ContextManager, key, exp_val string) {
val, ok := mgr.GetValue(key)
if len(exp_val) == 0 {
if ok {
@@ -37,11 +39,11 @@ func TestContexts(t *testing.T) {
}
Check("", "", "", "")
- mgr2.SetValues(Values{"key1": "val1c"}, func() {
+ mgr2.SetValues(gls.Values{"key1": "val1c"}, func() {
Check("", "", "val1c", "")
- mgr1.SetValues(Values{"key1": "val1a"}, func() {
+ mgr1.SetValues(gls.Values{"key1": "val1a"}, func() {
Check("val1a", "", "val1c", "")
- mgr1.SetValues(Values{"key2": "val1b"}, func() {
+ mgr1.SetValues(gls.Values{"key2": "val1b"}, func() {
Check("val1a", "val1b", "val1c", "")
var wg sync.WaitGroup
wg.Add(2)
@@ -49,20 +51,24 @@ func TestContexts(t *testing.T) {
defer wg.Done()
Check("", "", "", "")
}()
- Go(func() {
+ gls.Go(func() {
defer wg.Done()
Check("val1a", "val1b", "val1c", "")
})
wg.Wait()
+ Check("val1a", "val1b", "val1c", "")
})
+ Check("val1a", "", "val1c", "")
})
+ Check("", "", "val1c", "")
})
+ Check("", "", "", "")
}
func ExampleContextManager_SetValues() {
var (
- mgr = NewContextManager()
- request_id_key = GenSym()
+ mgr = gls.NewContextManager()
+ request_id_key = gls.GenSym()
)
MyLog := func() {
@@ -73,7 +79,7 @@ func ExampleContextManager_SetValues() {
}
}
- mgr.SetValues(Values{request_id_key: "12345"}, func() {
+ mgr.SetValues(gls.Values{request_id_key: "12345"}, func() {
MyLog()
})
MyLog()
@@ -84,8 +90,8 @@ func ExampleContextManager_SetValues() {
func ExampleGo() {
var (
- mgr = NewContextManager()
- request_id_key = GenSym()
+ mgr = gls.NewContextManager()
+ request_id_key = gls.GenSym()
)
MyLog := func() {
@@ -96,7 +102,7 @@ func ExampleGo() {
}
}
- mgr.SetValues(Values{request_id_key: "12345"}, func() {
+ mgr.SetValues(gls.Values{request_id_key: "12345"}, func() {
var wg sync.WaitGroup
wg.Add(1)
go func() {
@@ -105,7 +111,7 @@ func ExampleGo() {
}()
wg.Wait()
wg.Add(1)
- Go(func() {
+ gls.Go(func() {
defer wg.Done()
MyLog()
})
@@ -117,8 +123,8 @@ func ExampleGo() {
}
func BenchmarkGetValue(b *testing.B) {
- mgr := NewContextManager()
- mgr.SetValues(Values{"test_key": "test_val"}, func() {
+ mgr := gls.NewContextManager()
+ mgr.SetValues(gls.Values{"test_key": "test_val"}, func() {
b.ResetTimer()
for i := 0; i < b.N; i++ {
val, ok := mgr.GetValue("test_key")
@@ -130,10 +136,10 @@ func BenchmarkGetValue(b *testing.B) {
}
func BenchmarkSetValues(b *testing.B) {
- mgr := NewContextManager()
+ mgr := gls.NewContextManager()
for i := 0; i < b.N/2; i++ {
- mgr.SetValues(Values{"test_key": "test_val"}, func() {
- mgr.SetValues(Values{"test_key2": "test_val2"}, func() {})
+ mgr.SetValues(gls.Values{"test_key": "test_val"}, func() {
+ mgr.SetValues(gls.Values{"test_key2": "test_val2"}, func() {})
})
}
}
diff --git a/vendor/github.com/jtolds/gls/gen_sym.go b/vendor/github.com/jtolds/gls/gen_sym.go
index 8d5fc24d4a4..7f615cce937 100644
--- a/vendor/github.com/jtolds/gls/gen_sym.go
+++ b/vendor/github.com/jtolds/gls/gen_sym.go
@@ -1,13 +1,21 @@
package gls
+import (
+ "sync"
+)
+
var (
- symPool = &idPool{}
+ keyMtx sync.Mutex
+ keyCounter uint64
)
// ContextKey is a throwaway value you can use as a key to a ContextManager
-type ContextKey struct{ id uint }
+type ContextKey struct{ id uint64 }
// GenSym will return a brand new, never-before-used ContextKey
func GenSym() ContextKey {
- return ContextKey{id: symPool.Acquire()}
+ keyMtx.Lock()
+ defer keyMtx.Unlock()
+ keyCounter += 1
+ return ContextKey{id: keyCounter}
}
diff --git a/vendor/github.com/jtolds/gls/gid.go b/vendor/github.com/jtolds/gls/gid.go
new file mode 100644
index 00000000000..c16bf3a554f
--- /dev/null
+++ b/vendor/github.com/jtolds/gls/gid.go
@@ -0,0 +1,25 @@
+package gls
+
+var (
+ stackTagPool = &idPool{}
+)
+
+// Will return this goroutine's identifier if set. If you always need a
+// goroutine identifier, you should use EnsureGoroutineId which will make one
+// if there isn't one already.
+func GetGoroutineId() (gid uint, ok bool) {
+ return readStackTag()
+}
+
+// Will call cb with the current goroutine identifier. If one hasn't already
+// been generated, one will be created and set first. The goroutine identifier
+// might be invalid after cb returns.
+func EnsureGoroutineId(cb func(gid uint)) {
+ if gid, ok := readStackTag(); ok {
+ cb(gid)
+ return
+ }
+ gid := stackTagPool.Acquire()
+ defer stackTagPool.Release(gid)
+ addStackTag(gid, func() { cb(gid) })
+}
diff --git a/vendor/github.com/jtolds/gls/stack_tags.go b/vendor/github.com/jtolds/gls/stack_tags.go
index 562a2fab799..cc95dcd8e77 100644
--- a/vendor/github.com/jtolds/gls/stack_tags.go
+++ b/vendor/github.com/jtolds/gls/stack_tags.go
@@ -2,68 +2,72 @@ package gls
// so, basically, we're going to encode integer tags in base-16 on the stack
-import (
- "reflect"
- "runtime"
+const (
+ bitWidth = 4
+ stackBatchSize = 16
)
-const (
- bitWidth = 4
+var (
+ pc_lookup = make(map[uintptr]int8, 17)
+ mark_lookup [16]func(uint, func())
)
+func init() {
+ setEntries := func(f func(uint, func()), v int8) {
+ var ptr uintptr
+ f(0, func() {
+ ptr = findPtr()
+ })
+ pc_lookup[ptr] = v
+ if v >= 0 {
+ mark_lookup[v] = f
+ }
+ }
+ setEntries(github_com_jtolds_gls_markS, -0x1)
+ setEntries(github_com_jtolds_gls_mark0, 0x0)
+ setEntries(github_com_jtolds_gls_mark1, 0x1)
+ setEntries(github_com_jtolds_gls_mark2, 0x2)
+ setEntries(github_com_jtolds_gls_mark3, 0x3)
+ setEntries(github_com_jtolds_gls_mark4, 0x4)
+ setEntries(github_com_jtolds_gls_mark5, 0x5)
+ setEntries(github_com_jtolds_gls_mark6, 0x6)
+ setEntries(github_com_jtolds_gls_mark7, 0x7)
+ setEntries(github_com_jtolds_gls_mark8, 0x8)
+ setEntries(github_com_jtolds_gls_mark9, 0x9)
+ setEntries(github_com_jtolds_gls_markA, 0xa)
+ setEntries(github_com_jtolds_gls_markB, 0xb)
+ setEntries(github_com_jtolds_gls_markC, 0xc)
+ setEntries(github_com_jtolds_gls_markD, 0xd)
+ setEntries(github_com_jtolds_gls_markE, 0xe)
+ setEntries(github_com_jtolds_gls_markF, 0xf)
+}
+
func addStackTag(tag uint, context_call func()) {
if context_call == nil {
return
}
- markS(tag, context_call)
+ github_com_jtolds_gls_markS(tag, context_call)
}
-func markS(tag uint, cb func()) { _m(tag, cb) }
-func mark0(tag uint, cb func()) { _m(tag, cb) }
-func mark1(tag uint, cb func()) { _m(tag, cb) }
-func mark2(tag uint, cb func()) { _m(tag, cb) }
-func mark3(tag uint, cb func()) { _m(tag, cb) }
-func mark4(tag uint, cb func()) { _m(tag, cb) }
-func mark5(tag uint, cb func()) { _m(tag, cb) }
-func mark6(tag uint, cb func()) { _m(tag, cb) }
-func mark7(tag uint, cb func()) { _m(tag, cb) }
-func mark8(tag uint, cb func()) { _m(tag, cb) }
-func mark9(tag uint, cb func()) { _m(tag, cb) }
-func markA(tag uint, cb func()) { _m(tag, cb) }
-func markB(tag uint, cb func()) { _m(tag, cb) }
-func markC(tag uint, cb func()) { _m(tag, cb) }
-func markD(tag uint, cb func()) { _m(tag, cb) }
-func markE(tag uint, cb func()) { _m(tag, cb) }
-func markF(tag uint, cb func()) { _m(tag, cb) }
-
-var pc_lookup = make(map[uintptr]int8, 17)
-var mark_lookup [16]func(uint, func())
-
-func init() {
- setEntries := func(f func(uint, func()), v int8) {
- pc_lookup[reflect.ValueOf(f).Pointer()] = v
- if v >= 0 {
- mark_lookup[v] = f
- }
- }
- setEntries(markS, -0x1)
- setEntries(mark0, 0x0)
- setEntries(mark1, 0x1)
- setEntries(mark2, 0x2)
- setEntries(mark3, 0x3)
- setEntries(mark4, 0x4)
- setEntries(mark5, 0x5)
- setEntries(mark6, 0x6)
- setEntries(mark7, 0x7)
- setEntries(mark8, 0x8)
- setEntries(mark9, 0x9)
- setEntries(markA, 0xa)
- setEntries(markB, 0xb)
- setEntries(markC, 0xc)
- setEntries(markD, 0xd)
- setEntries(markE, 0xe)
- setEntries(markF, 0xf)
-}
+// these private methods are named this horrendous name so gopherjs support
+// is easier. it shouldn't add any runtime cost in non-js builds.
+func github_com_jtolds_gls_markS(tag uint, cb func()) { _m(tag, cb) }
+func github_com_jtolds_gls_mark0(tag uint, cb func()) { _m(tag, cb) }
+func github_com_jtolds_gls_mark1(tag uint, cb func()) { _m(tag, cb) }
+func github_com_jtolds_gls_mark2(tag uint, cb func()) { _m(tag, cb) }
+func github_com_jtolds_gls_mark3(tag uint, cb func()) { _m(tag, cb) }
+func github_com_jtolds_gls_mark4(tag uint, cb func()) { _m(tag, cb) }
+func github_com_jtolds_gls_mark5(tag uint, cb func()) { _m(tag, cb) }
+func github_com_jtolds_gls_mark6(tag uint, cb func()) { _m(tag, cb) }
+func github_com_jtolds_gls_mark7(tag uint, cb func()) { _m(tag, cb) }
+func github_com_jtolds_gls_mark8(tag uint, cb func()) { _m(tag, cb) }
+func github_com_jtolds_gls_mark9(tag uint, cb func()) { _m(tag, cb) }
+func github_com_jtolds_gls_markA(tag uint, cb func()) { _m(tag, cb) }
+func github_com_jtolds_gls_markB(tag uint, cb func()) { _m(tag, cb) }
+func github_com_jtolds_gls_markC(tag uint, cb func()) { _m(tag, cb) }
+func github_com_jtolds_gls_markD(tag uint, cb func()) { _m(tag, cb) }
+func github_com_jtolds_gls_markE(tag uint, cb func()) { _m(tag, cb) }
+func github_com_jtolds_gls_markF(tag uint, cb func()) { _m(tag, cb) }
func _m(tag_remainder uint, cb func()) {
if tag_remainder == 0 {
@@ -73,21 +77,37 @@ func _m(tag_remainder uint, cb func()) {
}
}
-func readStackTags(stack []uintptr) (tags []uint) {
+func readStackTag() (tag uint, ok bool) {
var current_tag uint
- for _, pc := range stack {
- pc = runtime.FuncForPC(pc).Entry()
- val, ok := pc_lookup[pc]
- if !ok {
- continue
+ offset := 0
+ for {
+ batch, next_offset := getStack(offset, stackBatchSize)
+ for _, pc := range batch {
+ val, ok := pc_lookup[pc]
+ if !ok {
+ continue
+ }
+ if val < 0 {
+ return current_tag, true
+ }
+ current_tag <<= bitWidth
+ current_tag += uint(val)
}
- if val < 0 {
- tags = append(tags, current_tag)
- current_tag = 0
- continue
+ if next_offset == 0 {
+ break
}
- current_tag <<= bitWidth
- current_tag += uint(val)
+ offset = next_offset
}
- return
+ return 0, false
+}
+
+func (m *ContextManager) preventInlining() {
+ // dunno if findPtr or getStack are likely to get inlined in a future release
+ // of go, but if they are inlined and their callers are inlined, that could
+ // hork some things. let's do our best to explain to the compiler that we
+ // really don't want those two functions inlined by saying they could change
+ // at any time. assumes preventInlining doesn't get compiled out.
+ // this whole thing is probably overkill.
+ findPtr = m.values[0][0].(func() uintptr)
+ getStack = m.values[0][1].(func(int, int) ([]uintptr, int))
}
diff --git a/vendor/github.com/jtolds/gls/stack_tags_js.go b/vendor/github.com/jtolds/gls/stack_tags_js.go
new file mode 100644
index 00000000000..c4e8b801d31
--- /dev/null
+++ b/vendor/github.com/jtolds/gls/stack_tags_js.go
@@ -0,0 +1,75 @@
+// +build js
+
+package gls
+
+// This file is used for GopherJS builds, which don't have normal runtime
+// stack trace support
+
+import (
+ "strconv"
+ "strings"
+
+ "github.com/gopherjs/gopherjs/js"
+)
+
+const (
+ jsFuncNamePrefix = "github_com_jtolds_gls_mark"
+)
+
+func jsMarkStack() (f []uintptr) {
+ lines := strings.Split(
+ js.Global.Get("Error").New().Get("stack").String(), "\n")
+ f = make([]uintptr, 0, len(lines))
+ for i, line := range lines {
+ line = strings.TrimSpace(line)
+ if line == "" {
+ continue
+ }
+ if i == 0 {
+ if line != "Error" {
+ panic("didn't understand js stack trace")
+ }
+ continue
+ }
+ fields := strings.Fields(line)
+ if len(fields) < 2 || fields[0] != "at" {
+ panic("didn't understand js stack trace")
+ }
+
+ pos := strings.Index(fields[1], jsFuncNamePrefix)
+ if pos < 0 {
+ continue
+ }
+ pos += len(jsFuncNamePrefix)
+ if pos >= len(fields[1]) {
+ panic("didn't understand js stack trace")
+ }
+ char := string(fields[1][pos])
+ switch char {
+ case "S":
+ f = append(f, uintptr(0))
+ default:
+ val, err := strconv.ParseUint(char, 16, 8)
+ if err != nil {
+ panic("didn't understand js stack trace")
+ }
+ f = append(f, uintptr(val)+1)
+ }
+ }
+ return f
+}
+
+// variables to prevent inlining
+var (
+ findPtr = func() uintptr {
+ funcs := jsMarkStack()
+ if len(funcs) == 0 {
+ panic("failed to find function pointer")
+ }
+ return funcs[0]
+ }
+
+ getStack = func(offset, amount int) (stack []uintptr, next_offset int) {
+ return jsMarkStack(), 0
+ }
+)
diff --git a/vendor/github.com/jtolds/gls/stack_tags_main.go b/vendor/github.com/jtolds/gls/stack_tags_main.go
new file mode 100644
index 00000000000..4da89e44f8e
--- /dev/null
+++ b/vendor/github.com/jtolds/gls/stack_tags_main.go
@@ -0,0 +1,30 @@
+// +build !js
+
+package gls
+
+// This file is used for standard Go builds, which have the expected runtime
+// support
+
+import (
+ "runtime"
+)
+
+var (
+ findPtr = func() uintptr {
+ var pc [1]uintptr
+ n := runtime.Callers(4, pc[:])
+ if n != 1 {
+ panic("failed to find function pointer")
+ }
+ return pc[0]
+ }
+
+ getStack = func(offset, amount int) (stack []uintptr, next_offset int) {
+ stack = make([]uintptr, amount)
+ stack = stack[:runtime.Callers(offset, stack)]
+ if len(stack) < amount {
+ return stack, 0
+ }
+ return stack, offset + len(stack)
+ }
+)
diff --git a/vendor/github.com/klauspost/compress/.gitignore b/vendor/github.com/klauspost/compress/.gitignore
new file mode 100644
index 00000000000..daf913b1b34
--- /dev/null
+++ b/vendor/github.com/klauspost/compress/.gitignore
@@ -0,0 +1,24 @@
+# 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
diff --git a/vendor/github.com/klauspost/compress/README.md b/vendor/github.com/klauspost/compress/README.md
new file mode 100644
index 00000000000..25c8e2b4d53
--- /dev/null
+++ b/vendor/github.com/klauspost/compress/README.md
@@ -0,0 +1,289 @@
+# compress
+
+This package is based on an optimized Deflate function, which is used by gzip/zip/zlib packages.
+
+It offers slightly better compression at lower compression settings, and up to 3x faster encoding at highest compression level.
+
+* [High Throughput Benchmark](http://blog.klauspost.com/go-gzipdeflate-benchmarks/).
+* [Small Payload/Webserver Benchmarks](http://blog.klauspost.com/gzip-performance-for-go-webservers/).
+* [Linear Time Compression](http://blog.klauspost.com/constant-time-gzipzip-compression/).
+* [Re-balancing Deflate Compression Levels](https://blog.klauspost.com/rebalancing-deflate-compression-levels/)
+
+[](https://travis-ci.org/klauspost/compress)
+
+# changelog
+* Jan 14, 2017: Reduce stack pressure due to array copies. See [Issue #18625(https://github.com/golang/go/issues/18625).
+* Oct 25, 2016: Level 2-4 have been rewritten and now offers significantly better performance than before.
+* Oct 20, 2016: Port zlib changes from Go 1.7 to fix zlib writer issue. Please update.
+* Oct 16, 2016: Go 1.7 changes merged. Apples to apples this package is a few percent faster, but has a significantly better balance between speed and compression per level.
+* Mar 24, 2016: Always attempt Huffman encoding on level 4-7. This improves base 64 encoded data compression.
+* Mar 24, 2016: Small speedup for level 1-3.
+* Feb 19, 2016: Faster bit writer, level -2 is 15% faster, level 1 is 4% faster.
+* Feb 19, 2016: Handle small payloads faster in level 1-3.
+* Feb 19, 2016: Added faster level 2 + 3 compression modes.
+* Feb 19, 2016: [Rebalanced compression levels](https://blog.klauspost.com/rebalancing-deflate-compression-levels/), so there is a more even progresssion in terms of compression. New default level is 5.
+* Feb 14, 2016: Snappy: Merge upstream changes.
+* Feb 14, 2016: Snappy: Fix aggressive skipping.
+* Feb 14, 2016: Snappy: Update benchmark.
+* Feb 13, 2016: Deflate: Fixed assembler problem that could lead to sub-optimal compression.
+* Feb 12, 2016: Snappy: Added AMD64 SSE 4.2 optimizations to matching, which makes easy to compress material run faster. Typical speedup is around 25%.
+* Feb 9, 2016: Added Snappy package fork. This version is 5-7% faster, much more on hard to compress content.
+* Jan 30, 2016: Optimize level 1 to 3 by not considering static dictionary or storing uncompressed. ~4-5% speedup.
+* Jan 16, 2016: Optimization on deflate level 1,2,3 compression.
+* Jan 8 2016: Merge [CL 18317](https://go-review.googlesource.com/#/c/18317): fix reading, writing of zip64 archives.
+* Dec 8 2015: Make level 1 and -2 deterministic even if write size differs.
+* Dec 8 2015: Split encoding functions, so hashing and matching can potentially be inlined. 1-3% faster on AMD64. 5% faster on other platforms.
+* Dec 8 2015: Fixed rare [one byte out-of bounds read](https://github.com/klauspost/compress/issues/20). Please update!
+* Nov 23 2015: Optimization on token writer. ~2-4% faster. Contributed by [@dsnet](https://github.com/dsnet).
+* Nov 20 2015: Small optimization to bit writer on 64 bit systems.
+* Nov 17 2015: Fixed out-of-bound errors if the underlying Writer returned an error. See [#15](https://github.com/klauspost/compress/issues/15).
+* Nov 12 2015: Added [io.WriterTo](https://golang.org/pkg/io/#WriterTo) support to gzip/inflate.
+* Nov 11 2015: Merged [CL 16669](https://go-review.googlesource.com/#/c/16669/4): archive/zip: enable overriding (de)compressors per file
+* Oct 15 2015: Added skipping on uncompressible data. Random data speed up >5x.
+
+# usage
+
+The packages are drop-in replacements for standard libraries. Simply replace the import path to use them:
+
+| old import | new import |
+|--------------------|-----------------------------------------|
+| `compress/gzip` | `github.com/klauspost/compress/gzip` |
+| `compress/zlib` | `github.com/klauspost/compress/zlib` |
+| `archive/zip` | `github.com/klauspost/compress/zip` |
+| `compress/deflate` | `github.com/klauspost/compress/deflate` |
+
+You may also be interested in [pgzip](https://github.com/klauspost/pgzip), which is a drop in replacement for gzip, which support multithreaded compression on big files and the optimized [crc32](https://github.com/klauspost/crc32) package used by these packages.
+
+The packages contains the same as the standard library, so you can use the godoc for that: [gzip](http://golang.org/pkg/compress/gzip/), [zip](http://golang.org/pkg/archive/zip/), [zlib](http://golang.org/pkg/compress/zlib/), [flate](http://golang.org/pkg/compress/flate/).
+
+Currently there is only minor speedup on decompression (mostly CRC32 calculation).
+
+# deflate optimizations
+
+* Minimum matches are 4 bytes, this leads to fewer searches and better compression. (In Go 1.7)
+* Stronger hash (iSCSI CRC32) for matches on x64 with SSE 4.2 support. This leads to fewer hash collisions. (Go 1.7 also has improved hashes)
+* Literal byte matching using SSE 4.2 for faster match comparisons. (not in Go)
+* Bulk hashing on matches. (In Go 1.7)
+* Much faster dictionary indexing with `NewWriterDict()`/`Reset()`. (In Go 1.7)
+* Make Bit Coder faster by assuming we are on a 64 bit CPU. (In Go 1.7)
+* Level 1 compression replaced by converted "Snappy" algorithm. (In Go 1.7)
+* Uncompressible content is detected and skipped faster. (Only in BestSpeed in Go)
+* A lot of branching eliminated by having two encoders for levels 4-6 and 7-9. (not in Go)
+* All heap memory allocations eliminated. (In Go 1.7)
+
+```
+benchmark old ns/op new ns/op delta
+BenchmarkEncodeDigitsSpeed1e4-4 554029 265175 -52.14%
+BenchmarkEncodeDigitsSpeed1e5-4 3908558 2416595 -38.17%
+BenchmarkEncodeDigitsSpeed1e6-4 37546692 24875330 -33.75%
+BenchmarkEncodeDigitsDefault1e4-4 781510 486322 -37.77%
+BenchmarkEncodeDigitsDefault1e5-4 15530248 6740175 -56.60%
+BenchmarkEncodeDigitsDefault1e6-4 174915710 76498625 -56.27%
+BenchmarkEncodeDigitsCompress1e4-4 769995 485652 -36.93%
+BenchmarkEncodeDigitsCompress1e5-4 15450113 6929589 -55.15%
+BenchmarkEncodeDigitsCompress1e6-4 175114660 73348495 -58.11%
+BenchmarkEncodeTwainSpeed1e4-4 560122 275977 -50.73%
+BenchmarkEncodeTwainSpeed1e5-4 3740978 2506095 -33.01%
+BenchmarkEncodeTwainSpeed1e6-4 35542802 21904440 -38.37%
+BenchmarkEncodeTwainDefault1e4-4 828534 549026 -33.74%
+BenchmarkEncodeTwainDefault1e5-4 13667153 7528455 -44.92%
+BenchmarkEncodeTwainDefault1e6-4 141191770 79952170 -43.37%
+BenchmarkEncodeTwainCompress1e4-4 830050 545694 -34.26%
+BenchmarkEncodeTwainCompress1e5-4 16620852 8460600 -49.10%
+BenchmarkEncodeTwainCompress1e6-4 193326820 90808750 -53.03%
+
+benchmark old MB/s new MB/s speedup
+BenchmarkEncodeDigitsSpeed1e4-4 18.05 37.71 2.09x
+BenchmarkEncodeDigitsSpeed1e5-4 25.58 41.38 1.62x
+BenchmarkEncodeDigitsSpeed1e6-4 26.63 40.20 1.51x
+BenchmarkEncodeDigitsDefault1e4-4 12.80 20.56 1.61x
+BenchmarkEncodeDigitsDefault1e5-4 6.44 14.84 2.30x
+BenchmarkEncodeDigitsDefault1e6-4 5.72 13.07 2.28x
+BenchmarkEncodeDigitsCompress1e4-4 12.99 20.59 1.59x
+BenchmarkEncodeDigitsCompress1e5-4 6.47 14.43 2.23x
+BenchmarkEncodeDigitsCompress1e6-4 5.71 13.63 2.39x
+BenchmarkEncodeTwainSpeed1e4-4 17.85 36.23 2.03x
+BenchmarkEncodeTwainSpeed1e5-4 26.73 39.90 1.49x
+BenchmarkEncodeTwainSpeed1e6-4 28.14 45.65 1.62x
+BenchmarkEncodeTwainDefault1e4-4 12.07 18.21 1.51x
+BenchmarkEncodeTwainDefault1e5-4 7.32 13.28 1.81x
+BenchmarkEncodeTwainDefault1e6-4 7.08 12.51 1.77x
+BenchmarkEncodeTwainCompress1e4-4 12.05 18.33 1.52x
+BenchmarkEncodeTwainCompress1e5-4 6.02 11.82 1.96x
+BenchmarkEncodeTwainCompress1e6-4 5.17 11.01 2.13x
+```
+* "Speed" is compression level 1
+* "Default" is compression level 6
+* "Compress" is compression level 9
+* Test files are [Digits](https://github.com/klauspost/compress/blob/master/testdata/e.txt) (no matches) and [Twain](https://github.com/klauspost/compress/blob/master/testdata/Mark.Twain-Tom.Sawyer.txt) (plain text) .
+
+As can be seen it shows a very good speedup all across the line.
+
+`Twain` is a much more realistic benchmark, and will be closer to JSON/HTML performance. Here speed is equivalent or faster, up to 2 times.
+
+**Without assembly**. This is what you can expect on systems that does not have amd64 and SSE 4:
+```
+benchmark old ns/op new ns/op delta
+BenchmarkEncodeDigitsSpeed1e4-4 554029 249558 -54.96%
+BenchmarkEncodeDigitsSpeed1e5-4 3908558 2295216 -41.28%
+BenchmarkEncodeDigitsSpeed1e6-4 37546692 22594905 -39.82%
+BenchmarkEncodeDigitsDefault1e4-4 781510 579850 -25.80%
+BenchmarkEncodeDigitsDefault1e5-4 15530248 10096561 -34.99%
+BenchmarkEncodeDigitsDefault1e6-4 174915710 111470780 -36.27%
+BenchmarkEncodeDigitsCompress1e4-4 769995 579708 -24.71%
+BenchmarkEncodeDigitsCompress1e5-4 15450113 10266373 -33.55%
+BenchmarkEncodeDigitsCompress1e6-4 175114660 110170120 -37.09%
+BenchmarkEncodeTwainSpeed1e4-4 560122 260679 -53.46%
+BenchmarkEncodeTwainSpeed1e5-4 3740978 2097372 -43.94%
+BenchmarkEncodeTwainSpeed1e6-4 35542802 20353449 -42.74%
+BenchmarkEncodeTwainDefault1e4-4 828534 646016 -22.03%
+BenchmarkEncodeTwainDefault1e5-4 13667153 10056369 -26.42%
+BenchmarkEncodeTwainDefault1e6-4 141191770 105268770 -25.44%
+BenchmarkEncodeTwainCompress1e4-4 830050 642401 -22.61%
+BenchmarkEncodeTwainCompress1e5-4 16620852 11157081 -32.87%
+BenchmarkEncodeTwainCompress1e6-4 193326820 121780770 -37.01%
+
+benchmark old MB/s new MB/s speedup
+BenchmarkEncodeDigitsSpeed1e4-4 18.05 40.07 2.22x
+BenchmarkEncodeDigitsSpeed1e5-4 25.58 43.57 1.70x
+BenchmarkEncodeDigitsSpeed1e6-4 26.63 44.26 1.66x
+BenchmarkEncodeDigitsDefault1e4-4 12.80 17.25 1.35x
+BenchmarkEncodeDigitsDefault1e5-4 6.44 9.90 1.54x
+BenchmarkEncodeDigitsDefault1e6-4 5.72 8.97 1.57x
+BenchmarkEncodeDigitsCompress1e4-4 12.99 17.25 1.33x
+BenchmarkEncodeDigitsCompress1e5-4 6.47 9.74 1.51x
+BenchmarkEncodeDigitsCompress1e6-4 5.71 9.08 1.59x
+BenchmarkEncodeTwainSpeed1e4-4 17.85 38.36 2.15x
+BenchmarkEncodeTwainSpeed1e5-4 26.73 47.68 1.78x
+BenchmarkEncodeTwainSpeed1e6-4 28.14 49.13 1.75x
+BenchmarkEncodeTwainDefault1e4-4 12.07 15.48 1.28x
+BenchmarkEncodeTwainDefault1e5-4 7.32 9.94 1.36x
+BenchmarkEncodeTwainDefault1e6-4 7.08 9.50 1.34x
+BenchmarkEncodeTwainCompress1e4-4 12.05 15.57 1.29x
+BenchmarkEncodeTwainCompress1e5-4 6.02 8.96 1.49x
+BenchmarkEncodeTwainCompress1e6-4 5.17 8.21 1.59x
+```
+So even without the assembly optimizations there is a general speedup across the board.
+
+## level 1-3 "snappy" compression
+
+Levels 1 "Best Speed", 2 and 3 are completely replaced by a converted version of the algorithm found in Snappy, modified to be fully
+compatible with the deflate bitstream (and thus still compatible with all existing zlib/gzip libraries and tools).
+This version is considerably faster than the "old" deflate at level 1. It does however come at a compression loss, usually in the order of 3-4% compared to the old level 1. However, the speed is usually 1.75 times that of the fastest deflate mode.
+
+In my previous experiments the most common case for "level 1" was that it provided no significant speedup, only lower compression compared to level 2 and sometimes even 3. However, the modified Snappy algorithm provides a very good sweet spot. Usually about 75% faster and with only little compression loss. Therefore I decided to *replace* level 1 with this mode entirely.
+
+Input is split into blocks of 64kb of, and they are encoded independently (no backreferences across blocks) for the best speed. Contrary to Snappy the output is entropy-encoded, so you will almost always see better compression than Snappy. But Snappy is still about twice as fast as Snappy in deflate mode.
+
+Level 2 and 3 have also been replaced. Level 2 is capable is matching between blocks and level 3 checks up to two hashes for matches it will try.
+
+## compression levels
+
+This table shows the compression at each level, and the percentage of the output size compared to output
+at the similar level with the standard library. Compression data is `Twain`, see above.
+
+(Not up-to-date after rebalancing)
+
+| Level | Bytes | % size |
+|-------|--------|--------|
+| 1 | 194622 | 103.7% |
+| 2 | 174684 | 96.85% |
+| 3 | 170301 | 98.45% |
+| 4 | 165253 | 97.69% |
+| 5 | 161274 | 98.65% |
+| 6 | 160464 | 99.71% |
+| 7 | 160304 | 99.87% |
+| 8 | 160279 | 99.99% |
+| 9 | 160279 | 99.99% |
+
+To interpret and example, this version of deflate compresses input of 407287 bytes to 161274 bytes at level 5, which is 98.6% of the size of what the standard library produces; 161274 bytes.
+
+This means that from level 4 you can expect a compression level increase of a few percent. Level 1 is about 3% worse, as descibed above.
+
+# linear time compression (huffman only)
+
+This compression library adds a special compression level, named `ConstantCompression`, which allows near linear time compression. This is done by completely disabling matching of previous data, and only reduce the number of bits to represent each character.
+
+This means that often used characters, like 'e' and ' ' (space) in text use the fewest bits to represent, and rare characters like '¤' takes more bits to represent. For more information see [wikipedia](https://en.wikipedia.org/wiki/Huffman_coding) or this nice [video](https://youtu.be/ZdooBTdW5bM).
+
+Since this type of compression has much less variance, the compression speed is mostly unaffected by the input data, and is usually more than *180MB/s* for a single core.
+
+The downside is that the compression ratio is usually considerably worse than even the fastest conventional compression. The compression raio can never be better than 8:1 (12.5%).
+
+The linear time compression can be used as a "better than nothing" mode, where you cannot risk the encoder to slow down on some content. For comparison, the size of the "Twain" text is *233460 bytes* (+29% vs. level 1) and encode speed is 144MB/s (4.5x level 1). So in this case you trade a 30% size increase for a 4 times speedup.
+
+For more information see my blog post on [Fast Linear Time Compression](http://blog.klauspost.com/constant-time-gzipzip-compression/).
+
+This is implemented on Go 1.7 as "Huffman Only" mode, though not exposed for gzip.
+
+
+# gzip/zip optimizations
+ * Uses the faster deflate
+ * Uses SSE 4.2 CRC32 calculations.
+
+Speed increase is up to 3x of the standard library, but usually around 2x.
+
+This is close to a real world benchmark as you will get. A 2.3MB JSON file. (NOTE: not up-to-date)
+
+```
+benchmark old ns/op new ns/op delta
+BenchmarkGzipL1-4 95212470 59938275 -37.05%
+BenchmarkGzipL2-4 102069730 76349195 -25.20%
+BenchmarkGzipL3-4 115472770 82492215 -28.56%
+BenchmarkGzipL4-4 153197780 107570890 -29.78%
+BenchmarkGzipL5-4 203930260 134387930 -34.10%
+BenchmarkGzipL6-4 233172100 145495400 -37.60%
+BenchmarkGzipL7-4 297190260 197926950 -33.40%
+BenchmarkGzipL8-4 512819750 376244733 -26.63%
+BenchmarkGzipL9-4 563366800 403266833 -28.42%
+
+benchmark old MB/s new MB/s speedup
+BenchmarkGzipL1-4 52.11 82.78 1.59x
+BenchmarkGzipL2-4 48.61 64.99 1.34x
+BenchmarkGzipL3-4 42.97 60.15 1.40x
+BenchmarkGzipL4-4 32.39 46.13 1.42x
+BenchmarkGzipL5-4 24.33 36.92 1.52x
+BenchmarkGzipL6-4 21.28 34.10 1.60x
+BenchmarkGzipL7-4 16.70 25.07 1.50x
+BenchmarkGzipL8-4 9.68 13.19 1.36x
+BenchmarkGzipL9-4 8.81 12.30 1.40x
+```
+
+Multithreaded compression using [pgzip](https://github.com/klauspost/pgzip) comparison, Quadcore, CPU = 8:
+
+(Not updated, old numbers)
+
+```
+benchmark old ns/op new ns/op delta
+BenchmarkGzipL1 96155500 25981486 -72.98%
+BenchmarkGzipL2 101905830 24601408 -75.86%
+BenchmarkGzipL3 113506490 26321506 -76.81%
+BenchmarkGzipL4 143708220 31761818 -77.90%
+BenchmarkGzipL5 188210770 39602266 -78.96%
+BenchmarkGzipL6 209812000 40402313 -80.74%
+BenchmarkGzipL7 270015440 56103210 -79.22%
+BenchmarkGzipL8 461359700 91255220 -80.22%
+BenchmarkGzipL9 498361833 88755075 -82.19%
+
+benchmark old MB/s new MB/s speedup
+BenchmarkGzipL1 51.60 190.97 3.70x
+BenchmarkGzipL2 48.69 201.69 4.14x
+BenchmarkGzipL3 43.71 188.51 4.31x
+BenchmarkGzipL4 34.53 156.22 4.52x
+BenchmarkGzipL5 26.36 125.29 4.75x
+BenchmarkGzipL6 23.65 122.81 5.19x
+BenchmarkGzipL7 18.38 88.44 4.81x
+BenchmarkGzipL8 10.75 54.37 5.06x
+BenchmarkGzipL9 9.96 55.90 5.61x
+```
+
+# snappy package
+
+The standard snappy package has now been improved. This repo contains a copy of the snappy repo.
+
+I would advise to use the standard package: https://github.com/golang/snappy
+
+
+# license
+
+This code is licensed under the same conditions as the original Go code. See LICENSE file.
diff --git a/vendor/github.com/klauspost/compress/flate/crc32_amd64.go b/vendor/github.com/klauspost/compress/flate/crc32_amd64.go
index 45d52f629c2..70a6095e60d 100644
--- a/vendor/github.com/klauspost/compress/flate/crc32_amd64.go
+++ b/vendor/github.com/klauspost/compress/flate/crc32_amd64.go
@@ -12,18 +12,20 @@ import (
// crc32sse returns a hash for the first 4 bytes of the slice
// len(a) must be >= 4.
//go:noescape
-func crc32sse(a []byte) hash
+func crc32sse(a []byte) uint32
// crc32sseAll calculates hashes for each 4-byte set in a.
// dst must be east len(a) - 4 in size.
// The size is not checked by the assembly.
//go:noescape
-func crc32sseAll(a []byte, dst []hash)
+func crc32sseAll(a []byte, dst []uint32)
// matchLenSSE4 returns the number of matching bytes in a and b
// up to length 'max'. Both slices must be at least 'max'
// bytes in size.
-// It uses the PCMPESTRI SSE 4.2 instruction.
+//
+// TODO: drop the "SSE4" name, since it doesn't use any SSE instructions.
+//
//go:noescape
func matchLenSSE4(a, b []byte, max int) int
diff --git a/vendor/github.com/klauspost/compress/flate/crc32_amd64.s b/vendor/github.com/klauspost/compress/flate/crc32_amd64.s
index f94969b7603..2fb2079b9d0 100644
--- a/vendor/github.com/klauspost/compress/flate/crc32_amd64.s
+++ b/vendor/github.com/klauspost/compress/flate/crc32_amd64.s
@@ -1,9 +1,10 @@
-//+build !noasm !appengine
+//+build !noasm
+//+build !appengine
// Copyright 2015, Klaus Post, see LICENSE for details.
-// func crc32sse(a []byte) hash
-TEXT ·crc32sse(SB), 7, $0
+// func crc32sse(a []byte) uint32
+TEXT ·crc32sse(SB), 4, $0
MOVQ a+0(FP), R10
XORQ BX, BX
@@ -14,8 +15,8 @@ TEXT ·crc32sse(SB), 7, $0
MOVL BX, ret+24(FP)
RET
-// func crc32sseAll(a []byte, dst []hash)
-TEXT ·crc32sseAll(SB), 7, $0
+// func crc32sseAll(a []byte, dst []uint32)
+TEXT ·crc32sseAll(SB), 4, $0
MOVQ a+0(FP), R8 // R8: src
MOVQ a_len+8(FP), R10 // input length
MOVQ dst+24(FP), R9 // R9: dst
@@ -95,62 +96,62 @@ one_crc:
JMP rem_loop
// func matchLenSSE4(a, b []byte, max int) int
-TEXT ·matchLenSSE4(SB), 7, $0
- MOVQ a+0(FP), R8 // R8: &a
- MOVQ b+24(FP), R9 // R9: &b
- MOVQ max+48(FP), R10 // R10: max
- XORQ R11, R11 // match length
+TEXT ·matchLenSSE4(SB), 4, $0
+ MOVQ a_base+0(FP), SI
+ MOVQ b_base+24(FP), DI
+ MOVQ DI, DX
+ MOVQ max+48(FP), CX
- MOVQ R10, R12
- SHRQ $4, R10 // max/16
- ANDQ $15, R12 // max & 15
- CMPQ R10, $0
- JEQ matchlen_verysmall
+cmp8:
+ // As long as we are 8 or more bytes before the end of max, we can load and
+ // compare 8 bytes at a time. If those 8 bytes are equal, repeat.
+ CMPQ CX, $8
+ JLT cmp1
+ MOVQ (SI), AX
+ MOVQ (DI), BX
+ CMPQ AX, BX
+ JNE bsf
+ ADDQ $8, SI
+ ADDQ $8, DI
+ SUBQ $8, CX
+ JMP cmp8
-loopback_matchlen:
- MOVOU (R8), X0 // a[x]
- MOVOU (R9), X1 // b[x]
+bsf:
+ // If those 8 bytes were not equal, XOR the two 8 byte values, and return
+ // the index of the first byte that differs. The BSF instruction finds the
+ // least significant 1 bit, the amd64 architecture is little-endian, and
+ // the shift by 3 converts a bit index to a byte index.
+ XORQ AX, BX
+ BSFQ BX, BX
+ SHRQ $3, BX
+ ADDQ BX, DI
- // PCMPESTRI $0x18, X1, X0
- BYTE $0x66; BYTE $0x0f; BYTE $0x3a
- BYTE $0x61; BYTE $0xc1; BYTE $0x18
-
- JC match_ended
-
- ADDQ $16, R8
- ADDQ $16, R9
- ADDQ $16, R11
-
- SUBQ $1, R10
- JNZ loopback_matchlen
-
-matchlen_verysmall:
- CMPQ R12, $0
- JEQ done_matchlen
-
-loopback_matchlen_single:
- // Naiive, but small use
- MOVB (R8), R13
- MOVB (R9), R14
- CMPB R13, R14
- JNE done_matchlen
- ADDQ $1, R8
- ADDQ $1, R9
- ADDQ $1, R11
- SUBQ $1, R12
- JNZ loopback_matchlen_single
- MOVQ R11, ret+56(FP)
+ // Subtract off &b[0] to convert from &b[ret] to ret, and return.
+ SUBQ DX, DI
+ MOVQ DI, ret+56(FP)
RET
-match_ended:
- ADDQ CX, R11
+cmp1:
+ // In the slices' tail, compare 1 byte at a time.
+ CMPQ CX, $0
+ JEQ matchLenEnd
+ MOVB (SI), AX
+ MOVB (DI), BX
+ CMPB AX, BX
+ JNE matchLenEnd
+ ADDQ $1, SI
+ ADDQ $1, DI
+ SUBQ $1, CX
+ JMP cmp1
-done_matchlen:
- MOVQ R11, ret+56(FP)
+matchLenEnd:
+ // Subtract off &b[0] to convert from &b[ret] to ret, and return.
+ SUBQ DX, DI
+ MOVQ DI, ret+56(FP)
RET
// func histogram(b []byte, h []int32)
-TEXT ·histogram(SB), 7, $0
+TEXT ·histogram(SB), 4, $0
MOVQ b+0(FP), SI // SI: &b
MOVQ b_len+8(FP), R9 // R9: len(b)
MOVQ h+24(FP), DI // DI: Histogram
diff --git a/vendor/github.com/klauspost/compress/flate/crc32_noasm.go b/vendor/github.com/klauspost/compress/flate/crc32_noasm.go
index 1c6d23eed63..bd98bd598ff 100644
--- a/vendor/github.com/klauspost/compress/flate/crc32_noasm.go
+++ b/vendor/github.com/klauspost/compress/flate/crc32_noasm.go
@@ -9,12 +9,12 @@ func init() {
}
// crc32sse should never be called.
-func crc32sse(a []byte) hash {
+func crc32sse(a []byte) uint32 {
panic("no assembler")
}
// crc32sseAll should never be called.
-func crc32sseAll(a []byte, dst []hash) {
+func crc32sseAll(a []byte, dst []uint32) {
panic("no assembler")
}
@@ -25,9 +25,10 @@ func matchLenSSE4(a, b []byte, max int) int {
}
// histogram accumulates a histogram of b in h.
-// h must be at least 256 entries in length,
-// and must be cleared before calling this function.
+//
+// len(h) must be >= 256, and h's elements must be all zeroes.
func histogram(b []byte, h []int32) {
+ h = h[:256]
for _, t := range b {
h[t]++
}
diff --git a/vendor/github.com/klauspost/compress/flate/deflate.go b/vendor/github.com/klauspost/compress/flate/deflate.go
index a103c8f4ef5..9e6e7ff0cfe 100644
--- a/vendor/github.com/klauspost/compress/flate/deflate.go
+++ b/vendor/github.com/klauspost/compress/flate/deflate.go
@@ -12,19 +12,30 @@ import (
)
const (
- NoCompression = 0
- BestSpeed = 1
- fastCompression = 3
- BestCompression = 9
- DefaultCompression = -1
- ConstantCompression = -2 // Does only Huffman encoding
- logWindowSize = 15
- windowSize = 1 << logWindowSize
- windowMask = windowSize - 1
- logMaxOffsetSize = 15 // Standard DEFLATE
- minMatchLength = 4 // The smallest match that the compressor looks for
- maxMatchLength = 258 // The longest match for the compressor
- minOffsetSize = 1 // The shortest offset that makes any sense
+ NoCompression = 0
+ BestSpeed = 1
+ BestCompression = 9
+ DefaultCompression = -1
+
+ // HuffmanOnly disables Lempel-Ziv match searching and only performs Huffman
+ // entropy encoding. This mode is useful in compressing data that has
+ // already been compressed with an LZ style algorithm (e.g. Snappy or LZ4)
+ // that lacks an entropy encoder. Compression gains are achieved when
+ // certain bytes in the input stream occur more frequently than others.
+ //
+ // Note that HuffmanOnly produces a compressed output that is
+ // RFC 1951 compliant. That is, any valid DEFLATE decompressor will
+ // continue to be able to decompress this output.
+ HuffmanOnly = -2
+ ConstantCompression = HuffmanOnly // compatibility alias.
+
+ logWindowSize = 15
+ windowSize = 1 << logWindowSize
+ windowMask = windowSize - 1
+ logMaxOffsetSize = 15 // Standard DEFLATE
+ minMatchLength = 4 // The smallest match that the compressor looks for
+ maxMatchLength = 258 // The longest match for the compressor
+ minOffsetSize = 1 // The shortest offset that makes any sense
// The maximum number of tokens we put into a single flat block, just too
// stop things from getting too large.
@@ -45,29 +56,32 @@ type compressionLevel struct {
good, lazy, nice, chain, fastSkipHashing, level int
}
+// Compression levels have been rebalanced from zlib deflate defaults
+// to give a bigger spread in speed and compression.
+// See https://blog.klauspost.com/rebalancing-deflate-compression-levels/
var levels = []compressionLevel{
{}, // 0
- // For levels 1-3 we don't bother trying with lazy matches
- {4, 0, 8, 4, 4, 1},
- {4, 0, 16, 8, 5, 2},
- {4, 0, 32, 32, 6, 3},
- // Levels 4-9 use increasingly more lazy matching
+ // Level 1-4 uses specialized algorithm - values not used
+ {0, 0, 0, 0, 0, 1},
+ {0, 0, 0, 0, 0, 2},
+ {0, 0, 0, 0, 0, 3},
+ {0, 0, 0, 0, 0, 4},
+ // For levels 5-6 we don't bother trying with lazy matches.
+ // Lazy matching is at least 30% slower, with 1.5% increase.
+ {6, 0, 12, 8, 12, 5},
+ {8, 0, 24, 16, 16, 6},
+ // Levels 7-9 use increasingly more lazy matching
// and increasingly stringent conditions for "good enough".
- {4, 4, 16, 16, skipNever, 4},
- {8, 16, 32, 32, skipNever, 5},
- {8, 16, 128, 128, skipNever, 6},
- {8, 32, 128, 256, skipNever, 7},
- {32, 128, 258, 1024, skipNever, 8},
+ {8, 8, 24, 16, skipNever, 7},
+ {10, 16, 24, 64, skipNever, 8},
{32, 258, 258, 4096, skipNever, 9},
}
-type hashid uint32
-
type compressor struct {
compressionLevel
w *huffmanBitWriter
- bulkHasher func([]byte, []hash)
+ bulkHasher func([]byte, []uint32)
// compression algorithm
fill func(*compressor, []byte) int // copy data to window
@@ -80,8 +94,8 @@ type compressor struct {
// hashPrev[hashHead[hashValue] & windowMask] contains the previous index
// with the same hash value.
chainHead int
- hashHead []hashid
- hashPrev []hashid
+ hashHead [hashSize]uint32
+ hashPrev [windowSize]uint32
hashOffset int
// input window: unprocessed data is window[index:windowEnd]
@@ -97,20 +111,19 @@ type compressor struct {
// deflate state
length int
offset int
- hash hash
+ hash uint32
maxInsertIndex int
err error
ii uint16 // position of last match, intended to overflow to reset.
- hashMatch [maxMatchLength + minMatchLength]hash
+ snap snappyEnc
+ hashMatch [maxMatchLength + minMatchLength]uint32
}
-type hash int32
-
func (d *compressor) fillDeflate(b []byte) int {
if d.index >= 2*windowSize-(minMatchLength+maxMatchLength) {
// shift the window by windowSize
- copy(d.window, d.window[windowSize:2*windowSize])
+ copy(d.window[:], d.window[windowSize:2*windowSize])
d.index -= windowSize
d.windowEnd -= windowSize
if d.blockStart >= windowSize {
@@ -123,16 +136,18 @@ func (d *compressor) fillDeflate(b []byte) int {
delta := d.hashOffset - 1
d.hashOffset -= delta
d.chainHead -= delta
- for i, v := range d.hashPrev {
+ // Iterate over slices instead of arrays to avoid copying
+ // the entire table onto the stack (Issue #18625).
+ for i, v := range d.hashPrev[:] {
if int(v) > delta {
- d.hashPrev[i] = hashid(int(v) - delta)
+ d.hashPrev[i] = uint32(int(v) - delta)
} else {
d.hashPrev[i] = 0
}
}
- for i, v := range d.hashHead {
+ for i, v := range d.hashHead[:] {
if int(v) > delta {
- d.hashHead[i] = hashid(int(v) - delta)
+ d.hashHead[i] = uint32(int(v) - delta)
} else {
d.hashHead[i] = 0
}
@@ -151,7 +166,31 @@ func (d *compressor) writeBlock(tok tokens, index int, eof bool) error {
window = d.window[d.blockStart:index]
}
d.blockStart = index
- d.w.writeBlock(tok, eof, window)
+ d.w.writeBlock(tok.tokens[:tok.n], eof, window)
+ return d.w.err
+ }
+ return nil
+}
+
+// writeBlockSkip writes the current block and uses the number of tokens
+// to determine if the block should be stored on no matches, or
+// only huffman encoded.
+func (d *compressor) writeBlockSkip(tok tokens, index int, eof bool) error {
+ if index > 0 || eof {
+ if d.blockStart <= index {
+ window := d.window[d.blockStart:index]
+ // If we removed less than a 64th of all literals
+ // we huffman compress the block.
+ if int(tok.n) > len(window)-int(tok.n>>6) {
+ d.w.writeBlockHuff(eof, window)
+ } else {
+ // Write a dynamic huffman block.
+ d.w.writeBlockDynamic(tok.tokens[:tok.n], eof, window)
+ }
+ } else {
+ d.w.writeBlock(tok.tokens[:tok.n], eof, nil)
+ }
+ d.blockStart = index
return d.w.err
}
return nil
@@ -164,7 +203,8 @@ func (d *compressor) writeBlock(tok tokens, index int, eof bool) error {
func (d *compressor) fillWindow(b []byte) {
// Do not fill window if we are in store-only mode,
// use constant or Snappy compression.
- if d.compressionLevel.level == 0 {
+ switch d.compressionLevel.level {
+ case 0, 1, 2:
return
}
// If we are given too much, cut it.
@@ -191,7 +231,7 @@ func (d *compressor) fillWindow(b []byte) {
dst := d.hashMatch[:dstSize]
d.bulkHasher(tocheck, dst)
- var newH hash
+ var newH uint32
for i, val := range dst {
di := i + startindex
newH = val & hashMask
@@ -199,7 +239,7 @@ func (d *compressor) fillWindow(b []byte) {
// Our chain should point to the previous value.
d.hashPrev[di&windowMask] = d.hashHead[newH]
// Set the head of the hash chain to us.
- d.hashHead[newH] = hashid(di + d.hashOffset)
+ d.hashHead[newH] = uint32(di + d.hashOffset)
}
d.hash = newH
}
@@ -326,25 +366,27 @@ func (d *compressor) writeStoredBlock(buf []byte) error {
return d.w.err
}
-// oldHash is the hash function used when no native crc32 calculation
-// or similar is present.
-func oldHash(b []byte) hash {
- return hash(b[0])<<(hashShift*3) + hash(b[1])<<(hashShift*2) + hash(b[2])<= 4.
+func hash4(b []byte) uint32 {
+ return ((uint32(b[3]) | uint32(b[2])<<8 | uint32(b[1])<<16 | uint32(b[0])<<24) * hashmul) >> (32 - hashBits)
}
-// oldBulkHash will compute hashes using the same
-// algorithm as oldHash
-func oldBulkHash(b []byte, dst []hash) {
+// bulkHash4 will compute hashes using the same
+// algorithm as hash4
+func bulkHash4(b []byte, dst []uint32) {
if len(b) < minMatchLength {
return
}
- h := oldHash(b)
- dst[0] = h
- i := 1
+ hb := uint32(b[3]) | uint32(b[2])<<8 | uint32(b[1])<<16 | uint32(b[0])<<24
+ dst[0] = (hb * hashmul) >> (32 - hashBits)
end := len(b) - minMatchLength + 1
- for ; i < end; i++ {
- h = (h << hashShift) + hash(b[i+3])
- dst[i] = h
+ for i := 1; i < end; i++ {
+ hb = (hb << 8) | uint32(b[i+3])
+ dst[i] = (hb * hashmul) >> (32 - hashBits)
}
}
@@ -353,6 +395,7 @@ func oldBulkHash(b []byte, dst []hash) {
// bytes in size.
func matchLen(a, b []byte, max int) int {
a = a[:max]
+ b = b[:len(a)]
for i, av := range a {
if b[i] != av {
return i
@@ -362,25 +405,22 @@ func matchLen(a, b []byte, max int) int {
}
func (d *compressor) initDeflate() {
- d.hashHead = make([]hashid, hashSize)
- d.hashPrev = make([]hashid, windowSize)
d.window = make([]byte, 2*windowSize)
d.hashOffset = 1
- d.tokens.tokens = make([]token, maxFlateBlockTokens+1)
d.length = minMatchLength - 1
d.offset = 0
d.byteAvailable = false
d.index = 0
d.hash = 0
d.chainHead = -1
- d.bulkHasher = oldBulkHash
+ d.bulkHasher = bulkHash4
if useSSE42 {
d.bulkHasher = crc32sseAll
}
}
// Assumes that d.fastSkipHashing != skipNever,
-// otherwise use deflateNoSkip
+// otherwise use deflateLazy
func (d *compressor) deflate() {
// Sanity enables additional runtime tests.
@@ -394,7 +434,7 @@ func (d *compressor) deflate() {
d.maxInsertIndex = d.windowEnd - (minMatchLength - 1)
if d.index < d.maxInsertIndex {
- d.hash = oldHash(d.window[d.index:d.index+minMatchLength]) & hashMask
+ d.hash = hash4(d.window[d.index : d.index+minMatchLength])
}
for {
@@ -411,7 +451,7 @@ func (d *compressor) deflate() {
}
if lookahead == 0 {
if d.tokens.n > 0 {
- if d.err = d.writeBlock(d.tokens, d.index, false); d.err != nil {
+ if d.err = d.writeBlockSkip(d.tokens, d.index, false); d.err != nil {
return
}
d.tokens.n = 0
@@ -421,11 +461,11 @@ func (d *compressor) deflate() {
}
if d.index < d.maxInsertIndex {
// Update the hash
- d.hash = oldHash(d.window[d.index:d.index+minMatchLength]) & hashMask
- ch := d.hashHead[d.hash]
+ d.hash = hash4(d.window[d.index : d.index+minMatchLength])
+ ch := d.hashHead[d.hash&hashMask]
d.chainHead = int(ch)
d.hashPrev[d.index&windowMask] = ch
- d.hashHead[d.hash] = hashid(d.index + d.hashOffset)
+ d.hashHead[d.hash&hashMask] = uint32(d.index + d.hashOffset)
}
d.length = minMatchLength - 1
d.offset = 0
@@ -468,8 +508,8 @@ func (d *compressor) deflate() {
dstSize := len(tocheck) - minMatchLength + 1
if dstSize > 0 {
dst := d.hashMatch[:dstSize]
- oldBulkHash(tocheck, dst)
- var newH hash
+ bulkHash4(tocheck, dst)
+ var newH uint32
for i, val := range dst {
di := i + startindex
newH = val & hashMask
@@ -477,7 +517,7 @@ func (d *compressor) deflate() {
// Our chain should point to the previous value.
d.hashPrev[di&windowMask] = d.hashHead[newH]
// Set the head of the hash chain to us.
- d.hashHead[newH] = hashid(di + d.hashOffset)
+ d.hashHead[newH] = uint32(di + d.hashOffset)
}
d.hash = newH
}
@@ -487,12 +527,12 @@ func (d *compressor) deflate() {
// item into the table.
d.index += d.length
if d.index < d.maxInsertIndex {
- d.hash = oldHash(d.window[d.index:d.index+minMatchLength]) & hashMask
+ d.hash = hash4(d.window[d.index : d.index+minMatchLength])
}
}
if d.tokens.n == maxFlateBlockTokens {
// The block includes the current character
- if d.err = d.writeBlock(d.tokens, d.index, false); d.err != nil {
+ if d.err = d.writeBlockSkip(d.tokens, d.index, false); d.err != nil {
return
}
d.tokens.n = 0
@@ -507,7 +547,7 @@ func (d *compressor) deflate() {
d.tokens.tokens[d.tokens.n] = literalToken(uint32(d.window[i]))
d.tokens.n++
if d.tokens.n == maxFlateBlockTokens {
- if d.err = d.writeBlock(d.tokens, i+1, false); d.err != nil {
+ if d.err = d.writeBlockSkip(d.tokens, i+1, false); d.err != nil {
return
}
d.tokens.n = 0
@@ -532,7 +572,7 @@ func (d *compressor) deflateLazy() {
d.maxInsertIndex = d.windowEnd - (minMatchLength - 1)
if d.index < d.maxInsertIndex {
- d.hash = oldHash(d.window[d.index:d.index+minMatchLength]) & hashMask
+ d.hash = hash4(d.window[d.index : d.index+minMatchLength])
}
for {
@@ -566,11 +606,11 @@ func (d *compressor) deflateLazy() {
}
if d.index < d.maxInsertIndex {
// Update the hash
- d.hash = oldHash(d.window[d.index:d.index+minMatchLength]) & hashMask
- ch := d.hashHead[d.hash]
+ d.hash = hash4(d.window[d.index : d.index+minMatchLength])
+ ch := d.hashHead[d.hash&hashMask]
d.chainHead = int(ch)
d.hashPrev[d.index&windowMask] = ch
- d.hashHead[d.hash] = hashid(d.index + d.hashOffset)
+ d.hashHead[d.hash&hashMask] = uint32(d.index + d.hashOffset)
}
prevLength := d.length
prevOffset := d.offset
@@ -613,8 +653,8 @@ func (d *compressor) deflateLazy() {
dstSize := len(tocheck) - minMatchLength + 1
if dstSize > 0 {
dst := d.hashMatch[:dstSize]
- oldBulkHash(tocheck, dst)
- var newH hash
+ bulkHash4(tocheck, dst)
+ var newH uint32
for i, val := range dst {
di := i + startindex
newH = val & hashMask
@@ -622,7 +662,7 @@ func (d *compressor) deflateLazy() {
// Our chain should point to the previous value.
d.hashPrev[di&windowMask] = d.hashHead[newH]
// Set the head of the hash chain to us.
- d.hashHead[newH] = hashid(di + d.hashOffset)
+ d.hashHead[newH] = uint32(di + d.hashOffset)
}
d.hash = newH
}
@@ -658,7 +698,7 @@ func (d *compressor) deflateLazy() {
// If we have a long run of no matches, skip additional bytes
// Resets when d.ii overflows after 64KB.
if d.ii > 31 {
- n := int(d.ii >> 6)
+ n := int(d.ii >> 5)
for j := 0; j < n; j++ {
if d.index >= d.windowEnd-1 {
break
@@ -695,7 +735,7 @@ func (d *compressor) deflateLazy() {
}
// Assumes that d.fastSkipHashing != skipNever,
-// otherwise use deflateNoSkip
+// otherwise use deflateLazySSE
func (d *compressor) deflateSSE() {
// Sanity enables additional runtime tests.
@@ -709,7 +749,7 @@ func (d *compressor) deflateSSE() {
d.maxInsertIndex = d.windowEnd - (minMatchLength - 1)
if d.index < d.maxInsertIndex {
- d.hash = oldHash(d.window[d.index:d.index+minMatchLength]) & hashMask
+ d.hash = crc32sse(d.window[d.index:d.index+minMatchLength]) & hashMask
}
for {
@@ -726,7 +766,7 @@ func (d *compressor) deflateSSE() {
}
if lookahead == 0 {
if d.tokens.n > 0 {
- if d.err = d.writeBlock(d.tokens, d.index, false); d.err != nil {
+ if d.err = d.writeBlockSkip(d.tokens, d.index, false); d.err != nil {
return
}
d.tokens.n = 0
@@ -740,7 +780,7 @@ func (d *compressor) deflateSSE() {
ch := d.hashHead[d.hash]
d.chainHead = int(ch)
d.hashPrev[d.index&windowMask] = ch
- d.hashHead[d.hash] = hashid(d.index + d.hashOffset)
+ d.hashHead[d.hash] = uint32(d.index + d.hashOffset)
}
d.length = minMatchLength - 1
d.offset = 0
@@ -785,7 +825,7 @@ func (d *compressor) deflateSSE() {
dst := d.hashMatch[:dstSize]
crc32sseAll(tocheck, dst)
- var newH hash
+ var newH uint32
for i, val := range dst {
di := i + startindex
newH = val & hashMask
@@ -793,7 +833,7 @@ func (d *compressor) deflateSSE() {
// Our chain should point to the previous value.
d.hashPrev[di&windowMask] = d.hashHead[newH]
// Set the head of the hash chain to us.
- d.hashHead[newH] = hashid(di + d.hashOffset)
+ d.hashHead[newH] = uint32(di + d.hashOffset)
}
d.hash = newH
}
@@ -808,14 +848,14 @@ func (d *compressor) deflateSSE() {
}
if d.tokens.n == maxFlateBlockTokens {
// The block includes the current character
- if d.err = d.writeBlock(d.tokens, d.index, false); d.err != nil {
+ if d.err = d.writeBlockSkip(d.tokens, d.index, false); d.err != nil {
return
}
d.tokens.n = 0
}
} else {
d.ii++
- end := d.index + int(d.ii>>uint(d.fastSkipHashing)) + 1
+ end := d.index + int(d.ii>>5) + 1
if end > d.windowEnd {
end = d.windowEnd
}
@@ -823,7 +863,7 @@ func (d *compressor) deflateSSE() {
d.tokens.tokens[d.tokens.n] = literalToken(uint32(d.window[i]))
d.tokens.n++
if d.tokens.n == maxFlateBlockTokens {
- if d.err = d.writeBlock(d.tokens, i+1, false); d.err != nil {
+ if d.err = d.writeBlockSkip(d.tokens, i+1, false); d.err != nil {
return
}
d.tokens.n = 0
@@ -886,7 +926,7 @@ func (d *compressor) deflateLazySSE() {
ch := d.hashHead[d.hash]
d.chainHead = int(ch)
d.hashPrev[d.index&windowMask] = ch
- d.hashHead[d.hash] = hashid(d.index + d.hashOffset)
+ d.hashHead[d.hash] = uint32(d.index + d.hashOffset)
}
prevLength := d.length
prevOffset := d.offset
@@ -930,7 +970,7 @@ func (d *compressor) deflateLazySSE() {
if dstSize > 0 {
dst := d.hashMatch[:dstSize]
crc32sseAll(tocheck, dst)
- var newH hash
+ var newH uint32
for i, val := range dst {
di := i + startindex
newH = val & hashMask
@@ -938,7 +978,7 @@ func (d *compressor) deflateLazySSE() {
// Our chain should point to the previous value.
d.hashPrev[di&windowMask] = d.hashHead[newH]
// Set the head of the hash chain to us.
- d.hashHead[newH] = hashid(di + d.hashOffset)
+ d.hashHead[newH] = uint32(di + d.hashOffset)
}
d.hash = newH
}
@@ -1010,22 +1050,16 @@ func (d *compressor) deflateLazySSE() {
}
}
-func (d *compressor) fillStore(b []byte) int {
- n := copy(d.window[d.windowEnd:], b)
- d.windowEnd += n
- return n
-}
-
func (d *compressor) store() {
- if d.windowEnd > 0 {
+ if d.windowEnd > 0 && (d.windowEnd == maxStoreBlockSize || d.sync) {
d.err = d.writeStoredBlock(d.window[:d.windowEnd])
+ d.windowEnd = 0
}
- d.windowEnd = 0
}
-// fillHuff will fill the buffer with data for huffman-only compression.
+// fillWindow will fill the buffer with data for huffman-only compression.
// The number of bytes copied is returned.
-func (d *compressor) fillHuff(b []byte) int {
+func (d *compressor) fillBlock(b []byte) int {
n := copy(d.window[d.windowEnd:], b)
d.windowEnd += n
return n
@@ -1035,11 +1069,7 @@ func (d *compressor) fillHuff(b []byte) int {
// if enough has been accumulated or we at the end of the stream.
// Any error that occurred will be in d.err
func (d *compressor) storeHuff() {
- // We only compress if we have maxStoreBlockSize or we are at end-of-stream
- if d.windowEnd < maxStoreBlockSize && !d.sync {
- return
- }
- if d.windowEnd == 0 {
+ if d.windowEnd < len(d.window) && !d.sync || d.windowEnd == 0 {
return
}
d.w.writeBlockHuff(false, d.window[:d.windowEnd])
@@ -1052,15 +1082,42 @@ func (d *compressor) storeHuff() {
// Any error that occurred will be in d.err
func (d *compressor) storeSnappy() {
// We only compress if we have maxStoreBlockSize.
- if d.windowEnd < maxStoreBlockSize && !d.sync {
- return
+ if d.windowEnd < maxStoreBlockSize {
+ if !d.sync {
+ return
+ }
+ // Handle extremely small sizes.
+ if d.windowEnd < 128 {
+ if d.windowEnd == 0 {
+ return
+ }
+ if d.windowEnd <= 32 {
+ d.err = d.writeStoredBlock(d.window[:d.windowEnd])
+ d.tokens.n = 0
+ d.windowEnd = 0
+ } else {
+ d.w.writeBlockHuff(false, d.window[:d.windowEnd])
+ d.err = d.w.err
+ }
+ d.tokens.n = 0
+ d.windowEnd = 0
+ d.snap.Reset()
+ return
+ }
}
- if d.windowEnd == 0 {
- return
+
+ d.snap.Encode(&d.tokens, d.window[:d.windowEnd])
+ // If we made zero matches, store the block as is.
+ if int(d.tokens.n) == d.windowEnd {
+ d.err = d.writeStoredBlock(d.window[:d.windowEnd])
+ // If we removed less than 1/16th, huffman compress the block.
+ } else if int(d.tokens.n) > d.windowEnd-(d.windowEnd>>4) {
+ d.w.writeBlockHuff(false, d.window[:d.windowEnd])
+ d.err = d.w.err
+ } else {
+ d.w.writeBlockDynamic(d.tokens.tokens[:d.tokens.n], false, d.window[:d.windowEnd])
+ d.err = d.w.err
}
- snappyEncode(&d.tokens, d.window[:d.windowEnd])
- d.w.writeBlock(d.tokens, false, d.window[:d.windowEnd])
- d.err = d.w.err
d.tokens.n = 0
d.windowEnd = 0
}
@@ -1103,21 +1160,21 @@ func (d *compressor) init(w io.Writer, level int) (err error) {
switch {
case level == NoCompression:
d.window = make([]byte, maxStoreBlockSize)
- d.fill = (*compressor).fillStore
+ d.fill = (*compressor).fillBlock
d.step = (*compressor).store
case level == ConstantCompression:
d.window = make([]byte, maxStoreBlockSize)
- d.fill = (*compressor).fillHuff
+ d.fill = (*compressor).fillBlock
d.step = (*compressor).storeHuff
- case level == 1:
+ case level >= 1 && level <= 4:
+ d.snap = newSnappy(level)
d.window = make([]byte, maxStoreBlockSize)
- d.fill = (*compressor).fillHuff
+ d.fill = (*compressor).fillBlock
d.step = (*compressor).storeSnappy
- d.tokens.tokens = make([]token, maxStoreBlockSize+1)
case level == DefaultCompression:
- level = 6
+ level = 5
fallthrough
- case 2 <= level && level <= 9:
+ case 5 <= level && level <= 9:
d.compressionLevel = levels[level]
d.initDeflate()
d.fill = (*compressor).fillDeflate
@@ -1141,32 +1198,33 @@ func (d *compressor) init(w io.Writer, level int) (err error) {
return nil
}
-// Used for zeroing the hash slice
-var hzeroes [256]hashid
-
// reset the state of the compressor.
func (d *compressor) reset(w io.Writer) {
d.w.reset(w)
d.sync = false
d.err = nil
+ // We only need to reset a few things for Snappy.
+ if d.snap != nil {
+ d.snap.Reset()
+ d.windowEnd = 0
+ d.tokens.n = 0
+ return
+ }
switch d.compressionLevel.chain {
case 0:
// level was NoCompression or ConstantCompresssion.
d.windowEnd = 0
default:
d.chainHead = -1
- for s := d.hashHead; len(s) > 0; {
- n := copy(s, hzeroes[:])
- s = s[n:]
+ for i := range d.hashHead {
+ d.hashHead[i] = 0
}
- for s := d.hashPrev; len(s) > 0; s = s[len(hzeroes):] {
- copy(s, hzeroes[:])
+ for i := range d.hashPrev {
+ d.hashPrev[i] = 0
}
d.hashOffset = 1
-
d.index, d.windowEnd = 0, 0
d.blockStart, d.byteAvailable = 0, false
-
d.tokens.n = 0
d.length = minMatchLength - 1
d.offset = 0
@@ -1194,10 +1252,10 @@ func (d *compressor) close() error {
// NewWriter returns a new Writer compressing data at the given level.
// Following zlib, levels range from 1 (BestSpeed) to 9 (BestCompression);
-// higher levels typically run slower but compress more. Level 0
-// (NoCompression) does not attempt any compression; it only adds the
-// necessary DEFLATE framing. Level -1 (DefaultCompression) uses the default
-// compression level.
+// higher levels typically run slower but compress more.
+// Level 0 (NoCompression) does not attempt any compression; it only adds the
+// necessary DEFLATE framing.
+// Level -1 (DefaultCompression) uses the default compression level.
// Level -2 (ConstantCompression) will use Huffman compression only, giving
// a very fast compression for all types of input, but sacrificing considerable
// compression efficiency.
@@ -1250,10 +1308,12 @@ func (w *Writer) Write(data []byte) (n int, err error) {
return w.d.write(data)
}
-// Flush flushes any pending compressed data to the underlying writer.
+// Flush flushes any pending data to the underlying writer.
// It is useful mainly in compressed network protocols, to ensure that
// a remote reader has enough data to reconstruct a packet.
// Flush does not return until the data has been written.
+// Calling Flush when there is no pending data still causes the Writer
+// to emit a sync marker of at least 4 bytes.
// If the underlying writer returns an error, Flush returns that error.
//
// In the terminology of the zlib library, Flush is equivalent to Z_SYNC_FLUSH.
@@ -1272,7 +1332,7 @@ func (w *Writer) Close() error {
// the result of NewWriter or NewWriterDict called with dst
// and w's level and dictionary.
func (w *Writer) Reset(dst io.Writer) {
- if dw, ok := w.d.w.w.(*dictWriter); ok {
+ if dw, ok := w.d.w.writer.(*dictWriter); ok {
// w was created with NewWriterDict
dw.w = dst
w.d.reset(dw)
diff --git a/vendor/github.com/klauspost/compress/flate/dict_decoder.go b/vendor/github.com/klauspost/compress/flate/dict_decoder.go
new file mode 100644
index 00000000000..71c75a065ea
--- /dev/null
+++ b/vendor/github.com/klauspost/compress/flate/dict_decoder.go
@@ -0,0 +1,184 @@
+// 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 flate
+
+// dictDecoder implements the LZ77 sliding dictionary as used in decompression.
+// LZ77 decompresses data through sequences of two forms of commands:
+//
+// * Literal insertions: Runs of one or more symbols are inserted into the data
+// stream as is. This is accomplished through the writeByte method for a
+// single symbol, or combinations of writeSlice/writeMark for multiple symbols.
+// Any valid stream must start with a literal insertion if no preset dictionary
+// is used.
+//
+// * Backward copies: Runs of one or more symbols are copied from previously
+// emitted data. Backward copies come as the tuple (dist, length) where dist
+// determines how far back in the stream to copy from and length determines how
+// many bytes to copy. Note that it is valid for the length to be greater than
+// the distance. Since LZ77 uses forward copies, that situation is used to
+// perform a form of run-length encoding on repeated runs of symbols.
+// The writeCopy and tryWriteCopy are used to implement this command.
+//
+// For performance reasons, this implementation performs little to no sanity
+// checks about the arguments. As such, the invariants documented for each
+// method call must be respected.
+type dictDecoder struct {
+ hist []byte // Sliding window history
+
+ // Invariant: 0 <= rdPos <= wrPos <= len(hist)
+ wrPos int // Current output position in buffer
+ rdPos int // Have emitted hist[:rdPos] already
+ full bool // Has a full window length been written yet?
+}
+
+// init initializes dictDecoder to have a sliding window dictionary of the given
+// size. If a preset dict is provided, it will initialize the dictionary with
+// the contents of dict.
+func (dd *dictDecoder) init(size int, dict []byte) {
+ *dd = dictDecoder{hist: dd.hist}
+
+ if cap(dd.hist) < size {
+ dd.hist = make([]byte, size)
+ }
+ dd.hist = dd.hist[:size]
+
+ if len(dict) > len(dd.hist) {
+ dict = dict[len(dict)-len(dd.hist):]
+ }
+ dd.wrPos = copy(dd.hist, dict)
+ if dd.wrPos == len(dd.hist) {
+ dd.wrPos = 0
+ dd.full = true
+ }
+ dd.rdPos = dd.wrPos
+}
+
+// histSize reports the total amount of historical data in the dictionary.
+func (dd *dictDecoder) histSize() int {
+ if dd.full {
+ return len(dd.hist)
+ }
+ return dd.wrPos
+}
+
+// availRead reports the number of bytes that can be flushed by readFlush.
+func (dd *dictDecoder) availRead() int {
+ return dd.wrPos - dd.rdPos
+}
+
+// availWrite reports the available amount of output buffer space.
+func (dd *dictDecoder) availWrite() int {
+ return len(dd.hist) - dd.wrPos
+}
+
+// writeSlice returns a slice of the available buffer to write data to.
+//
+// This invariant will be kept: len(s) <= availWrite()
+func (dd *dictDecoder) writeSlice() []byte {
+ return dd.hist[dd.wrPos:]
+}
+
+// writeMark advances the writer pointer by cnt.
+//
+// This invariant must be kept: 0 <= cnt <= availWrite()
+func (dd *dictDecoder) writeMark(cnt int) {
+ dd.wrPos += cnt
+}
+
+// writeByte writes a single byte to the dictionary.
+//
+// This invariant must be kept: 0 < availWrite()
+func (dd *dictDecoder) writeByte(c byte) {
+ dd.hist[dd.wrPos] = c
+ dd.wrPos++
+}
+
+// writeCopy copies a string at a given (dist, length) to the output.
+// This returns the number of bytes copied and may be less than the requested
+// length if the available space in the output buffer is too small.
+//
+// This invariant must be kept: 0 < dist <= histSize()
+func (dd *dictDecoder) writeCopy(dist, length int) int {
+ dstBase := dd.wrPos
+ dstPos := dstBase
+ srcPos := dstPos - dist
+ endPos := dstPos + length
+ if endPos > len(dd.hist) {
+ endPos = len(dd.hist)
+ }
+
+ // Copy non-overlapping section after destination position.
+ //
+ // This section is non-overlapping in that the copy length for this section
+ // is always less than or equal to the backwards distance. This can occur
+ // if a distance refers to data that wraps-around in the buffer.
+ // Thus, a backwards copy is performed here; that is, the exact bytes in
+ // the source prior to the copy is placed in the destination.
+ if srcPos < 0 {
+ srcPos += len(dd.hist)
+ dstPos += copy(dd.hist[dstPos:endPos], dd.hist[srcPos:])
+ srcPos = 0
+ }
+
+ // Copy possibly overlapping section before destination position.
+ //
+ // This section can overlap if the copy length for this section is larger
+ // than the backwards distance. This is allowed by LZ77 so that repeated
+ // strings can be succinctly represented using (dist, length) pairs.
+ // Thus, a forwards copy is performed here; that is, the bytes copied is
+ // possibly dependent on the resulting bytes in the destination as the copy
+ // progresses along. This is functionally equivalent to the following:
+ //
+ // for i := 0; i < endPos-dstPos; i++ {
+ // dd.hist[dstPos+i] = dd.hist[srcPos+i]
+ // }
+ // dstPos = endPos
+ //
+ for dstPos < endPos {
+ dstPos += copy(dd.hist[dstPos:endPos], dd.hist[srcPos:dstPos])
+ }
+
+ dd.wrPos = dstPos
+ return dstPos - dstBase
+}
+
+// tryWriteCopy tries to copy a string at a given (distance, length) to the
+// output. This specialized version is optimized for short distances.
+//
+// This method is designed to be inlined for performance reasons.
+//
+// This invariant must be kept: 0 < dist <= histSize()
+func (dd *dictDecoder) tryWriteCopy(dist, length int) int {
+ dstPos := dd.wrPos
+ endPos := dstPos + length
+ if dstPos < dist || endPos > len(dd.hist) {
+ return 0
+ }
+ dstBase := dstPos
+ srcPos := dstPos - dist
+
+ // Copy possibly overlapping section before destination position.
+loop:
+ dstPos += copy(dd.hist[dstPos:endPos], dd.hist[srcPos:dstPos])
+ if dstPos < endPos {
+ goto loop // Avoid for-loop so that this function can be inlined
+ }
+
+ dd.wrPos = dstPos
+ return dstPos - dstBase
+}
+
+// readFlush returns a slice of the historical buffer that is ready to be
+// emitted to the user. The data returned by readFlush must be fully consumed
+// before calling any other dictDecoder methods.
+func (dd *dictDecoder) readFlush() []byte {
+ toRead := dd.hist[dd.rdPos:dd.wrPos]
+ dd.rdPos = dd.wrPos
+ if dd.wrPos == len(dd.hist) {
+ dd.wrPos, dd.rdPos = 0, 0
+ dd.full = true
+ }
+ return toRead
+}
diff --git a/vendor/github.com/klauspost/compress/flate/fixedhuff.go b/vendor/github.com/klauspost/compress/flate/fixedhuff.go
deleted file mode 100644
index 7df8b9a293f..00000000000
--- a/vendor/github.com/klauspost/compress/flate/fixedhuff.go
+++ /dev/null
@@ -1,78 +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 flate
-
-// autogenerated by go run gen.go -output fixedhuff.go, DO NOT EDIT
-
-var fixedHuffmanDecoder = huffmanDecoder{
- 7,
- [huffmanNumChunks]uint32{
- 0x1007, 0x0508, 0x0108, 0x1188, 0x1107, 0x0708, 0x0308, 0x0c09,
- 0x1087, 0x0608, 0x0208, 0x0a09, 0x0008, 0x0808, 0x0408, 0x0e09,
- 0x1047, 0x0588, 0x0188, 0x0909, 0x1147, 0x0788, 0x0388, 0x0d09,
- 0x10c7, 0x0688, 0x0288, 0x0b09, 0x0088, 0x0888, 0x0488, 0x0f09,
- 0x1027, 0x0548, 0x0148, 0x11c8, 0x1127, 0x0748, 0x0348, 0x0c89,
- 0x10a7, 0x0648, 0x0248, 0x0a89, 0x0048, 0x0848, 0x0448, 0x0e89,
- 0x1067, 0x05c8, 0x01c8, 0x0989, 0x1167, 0x07c8, 0x03c8, 0x0d89,
- 0x10e7, 0x06c8, 0x02c8, 0x0b89, 0x00c8, 0x08c8, 0x04c8, 0x0f89,
- 0x1017, 0x0528, 0x0128, 0x11a8, 0x1117, 0x0728, 0x0328, 0x0c49,
- 0x1097, 0x0628, 0x0228, 0x0a49, 0x0028, 0x0828, 0x0428, 0x0e49,
- 0x1057, 0x05a8, 0x01a8, 0x0949, 0x1157, 0x07a8, 0x03a8, 0x0d49,
- 0x10d7, 0x06a8, 0x02a8, 0x0b49, 0x00a8, 0x08a8, 0x04a8, 0x0f49,
- 0x1037, 0x0568, 0x0168, 0x11e8, 0x1137, 0x0768, 0x0368, 0x0cc9,
- 0x10b7, 0x0668, 0x0268, 0x0ac9, 0x0068, 0x0868, 0x0468, 0x0ec9,
- 0x1077, 0x05e8, 0x01e8, 0x09c9, 0x1177, 0x07e8, 0x03e8, 0x0dc9,
- 0x10f7, 0x06e8, 0x02e8, 0x0bc9, 0x00e8, 0x08e8, 0x04e8, 0x0fc9,
- 0x1007, 0x0518, 0x0118, 0x1198, 0x1107, 0x0718, 0x0318, 0x0c29,
- 0x1087, 0x0618, 0x0218, 0x0a29, 0x0018, 0x0818, 0x0418, 0x0e29,
- 0x1047, 0x0598, 0x0198, 0x0929, 0x1147, 0x0798, 0x0398, 0x0d29,
- 0x10c7, 0x0698, 0x0298, 0x0b29, 0x0098, 0x0898, 0x0498, 0x0f29,
- 0x1027, 0x0558, 0x0158, 0x11d8, 0x1127, 0x0758, 0x0358, 0x0ca9,
- 0x10a7, 0x0658, 0x0258, 0x0aa9, 0x0058, 0x0858, 0x0458, 0x0ea9,
- 0x1067, 0x05d8, 0x01d8, 0x09a9, 0x1167, 0x07d8, 0x03d8, 0x0da9,
- 0x10e7, 0x06d8, 0x02d8, 0x0ba9, 0x00d8, 0x08d8, 0x04d8, 0x0fa9,
- 0x1017, 0x0538, 0x0138, 0x11b8, 0x1117, 0x0738, 0x0338, 0x0c69,
- 0x1097, 0x0638, 0x0238, 0x0a69, 0x0038, 0x0838, 0x0438, 0x0e69,
- 0x1057, 0x05b8, 0x01b8, 0x0969, 0x1157, 0x07b8, 0x03b8, 0x0d69,
- 0x10d7, 0x06b8, 0x02b8, 0x0b69, 0x00b8, 0x08b8, 0x04b8, 0x0f69,
- 0x1037, 0x0578, 0x0178, 0x11f8, 0x1137, 0x0778, 0x0378, 0x0ce9,
- 0x10b7, 0x0678, 0x0278, 0x0ae9, 0x0078, 0x0878, 0x0478, 0x0ee9,
- 0x1077, 0x05f8, 0x01f8, 0x09e9, 0x1177, 0x07f8, 0x03f8, 0x0de9,
- 0x10f7, 0x06f8, 0x02f8, 0x0be9, 0x00f8, 0x08f8, 0x04f8, 0x0fe9,
- 0x1007, 0x0508, 0x0108, 0x1188, 0x1107, 0x0708, 0x0308, 0x0c19,
- 0x1087, 0x0608, 0x0208, 0x0a19, 0x0008, 0x0808, 0x0408, 0x0e19,
- 0x1047, 0x0588, 0x0188, 0x0919, 0x1147, 0x0788, 0x0388, 0x0d19,
- 0x10c7, 0x0688, 0x0288, 0x0b19, 0x0088, 0x0888, 0x0488, 0x0f19,
- 0x1027, 0x0548, 0x0148, 0x11c8, 0x1127, 0x0748, 0x0348, 0x0c99,
- 0x10a7, 0x0648, 0x0248, 0x0a99, 0x0048, 0x0848, 0x0448, 0x0e99,
- 0x1067, 0x05c8, 0x01c8, 0x0999, 0x1167, 0x07c8, 0x03c8, 0x0d99,
- 0x10e7, 0x06c8, 0x02c8, 0x0b99, 0x00c8, 0x08c8, 0x04c8, 0x0f99,
- 0x1017, 0x0528, 0x0128, 0x11a8, 0x1117, 0x0728, 0x0328, 0x0c59,
- 0x1097, 0x0628, 0x0228, 0x0a59, 0x0028, 0x0828, 0x0428, 0x0e59,
- 0x1057, 0x05a8, 0x01a8, 0x0959, 0x1157, 0x07a8, 0x03a8, 0x0d59,
- 0x10d7, 0x06a8, 0x02a8, 0x0b59, 0x00a8, 0x08a8, 0x04a8, 0x0f59,
- 0x1037, 0x0568, 0x0168, 0x11e8, 0x1137, 0x0768, 0x0368, 0x0cd9,
- 0x10b7, 0x0668, 0x0268, 0x0ad9, 0x0068, 0x0868, 0x0468, 0x0ed9,
- 0x1077, 0x05e8, 0x01e8, 0x09d9, 0x1177, 0x07e8, 0x03e8, 0x0dd9,
- 0x10f7, 0x06e8, 0x02e8, 0x0bd9, 0x00e8, 0x08e8, 0x04e8, 0x0fd9,
- 0x1007, 0x0518, 0x0118, 0x1198, 0x1107, 0x0718, 0x0318, 0x0c39,
- 0x1087, 0x0618, 0x0218, 0x0a39, 0x0018, 0x0818, 0x0418, 0x0e39,
- 0x1047, 0x0598, 0x0198, 0x0939, 0x1147, 0x0798, 0x0398, 0x0d39,
- 0x10c7, 0x0698, 0x0298, 0x0b39, 0x0098, 0x0898, 0x0498, 0x0f39,
- 0x1027, 0x0558, 0x0158, 0x11d8, 0x1127, 0x0758, 0x0358, 0x0cb9,
- 0x10a7, 0x0658, 0x0258, 0x0ab9, 0x0058, 0x0858, 0x0458, 0x0eb9,
- 0x1067, 0x05d8, 0x01d8, 0x09b9, 0x1167, 0x07d8, 0x03d8, 0x0db9,
- 0x10e7, 0x06d8, 0x02d8, 0x0bb9, 0x00d8, 0x08d8, 0x04d8, 0x0fb9,
- 0x1017, 0x0538, 0x0138, 0x11b8, 0x1117, 0x0738, 0x0338, 0x0c79,
- 0x1097, 0x0638, 0x0238, 0x0a79, 0x0038, 0x0838, 0x0438, 0x0e79,
- 0x1057, 0x05b8, 0x01b8, 0x0979, 0x1157, 0x07b8, 0x03b8, 0x0d79,
- 0x10d7, 0x06b8, 0x02b8, 0x0b79, 0x00b8, 0x08b8, 0x04b8, 0x0f79,
- 0x1037, 0x0578, 0x0178, 0x11f8, 0x1137, 0x0778, 0x0378, 0x0cf9,
- 0x10b7, 0x0678, 0x0278, 0x0af9, 0x0078, 0x0878, 0x0478, 0x0ef9,
- 0x1077, 0x05f8, 0x01f8, 0x09f9, 0x1177, 0x07f8, 0x03f8, 0x0df9,
- 0x10f7, 0x06f8, 0x02f8, 0x0bf9, 0x00f8, 0x08f8, 0x04f8, 0x0ff9,
- },
- nil, 0,
-}
diff --git a/vendor/github.com/klauspost/compress/flate/huffman_bit_writer.go b/vendor/github.com/klauspost/compress/flate/huffman_bit_writer.go
index 56985ef000b..f9b2a699a3d 100644
--- a/vendor/github.com/klauspost/compress/flate/huffman_bit_writer.go
+++ b/vendor/github.com/klauspost/compress/flate/huffman_bit_writer.go
@@ -6,7 +6,6 @@ package flate
import (
"io"
- "math"
)
const (
@@ -23,9 +22,16 @@ const (
codegenCodeCount = 19
badCode = 255
- // Output byte buffer size
- // Must be multiple of 6 (48 bits) + 8
- bufferSize = 240 + 8
+ // bufferFlushSize indicates the buffer size
+ // after which bytes are flushed to the writer.
+ // Should preferably be a multiple of 6, since
+ // we accumulate 6 bytes between writes to the buffer.
+ bufferFlushSize = 240
+
+ // bufferSize is the actual output byte buffer size.
+ // It must have additional headroom for a flush
+ // which can contain up to 8 bytes.
+ bufferSize = bufferFlushSize + 8
)
// The number of extra bits needed by length code X - LENGTH_CODES_START.
@@ -71,17 +77,21 @@ var offsetBase = []uint32{
var codegenOrder = []uint32{16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}
type huffmanBitWriter struct {
- w io.Writer
+ // writer is the underlying writer.
+ // Do not use it directly; use the write method, which ensures
+ // that Write errors are sticky.
+ writer io.Writer
+
// Data waiting to be written is bytes[0:nbytes]
// and then the low nbits of bits.
bits uint64
nbits uint
bytes [bufferSize]byte
+ codegenFreq [codegenCodeCount]int32
nbytes int
literalFreq []int32
offsetFreq []int32
codegen []uint8
- codegenFreq []int32
literalEncoding *huffmanEncoder
offsetEncoding *huffmanEncoder
codegenEncoding *huffmanEncoder
@@ -90,61 +100,22 @@ type huffmanBitWriter struct {
func newHuffmanBitWriter(w io.Writer) *huffmanBitWriter {
return &huffmanBitWriter{
- w: w,
+ writer: w,
literalFreq: make([]int32, maxNumLit),
offsetFreq: make([]int32, offsetCodeCount),
codegen: make([]uint8, maxNumLit+offsetCodeCount+1),
- codegenFreq: make([]int32, codegenCodeCount),
literalEncoding: newHuffmanEncoder(maxNumLit),
- offsetEncoding: newHuffmanEncoder(offsetCodeCount),
codegenEncoding: newHuffmanEncoder(codegenCodeCount),
+ offsetEncoding: newHuffmanEncoder(offsetCodeCount),
}
}
func (w *huffmanBitWriter) reset(writer io.Writer) {
- w.w = writer
+ w.writer = writer
w.bits, w.nbits, w.nbytes, w.err = 0, 0, 0, nil
w.bytes = [bufferSize]byte{}
- for i := range w.codegen {
- w.codegen[i] = 0
- }
- for _, s := range [...][]int32{w.literalFreq, w.offsetFreq, w.codegenFreq} {
- for i := range s {
- s[i] = 0
- }
- }
- encs := []*huffmanEncoder{w.literalEncoding, w.codegenEncoding}
- // Don't reset, if we are huffman only mode
- if w.offsetEncoding != huffOffset {
- encs = append(encs, w.offsetEncoding)
- }
- for _, enc := range encs {
- for i := range enc.codes {
- enc.codes[i] = 0
- }
- }
}
-/* Inlined in writeBits
-func (w *huffmanBitWriter) flushBits() {
- if w.err != nil {
- w.nbits = 0
- return
- }
- bits := w.bits
- w.bits >>= 16
- w.nbits -= 16
- n := w.nbytes
- w.bytes[n] = byte(bits)
- w.bytes[n+1] = byte(bits >> 8)
- if n += 2; n >= len(w.bytes) {
- _, w.err = w.w.Write(w.bytes[0:])
- n = 0
- }
- w.nbytes = n
-}
-*/
-
func (w *huffmanBitWriter) flush() {
if w.err != nil {
w.nbits = 0
@@ -162,11 +133,21 @@ func (w *huffmanBitWriter) flush() {
n++
}
w.bits = 0
- _, w.err = w.w.Write(w.bytes[0:n])
+ w.write(w.bytes[:n])
w.nbytes = 0
}
+func (w *huffmanBitWriter) write(b []byte) {
+ if w.err != nil {
+ return
+ }
+ _, w.err = w.writer.Write(b)
+}
+
func (w *huffmanBitWriter) writeBits(b int32, nb uint) {
+ if w.err != nil {
+ return
+ }
w.bits |= uint64(b) << w.nbits
w.nbits += nb
if w.nbits >= 48 {
@@ -174,15 +155,16 @@ func (w *huffmanBitWriter) writeBits(b int32, nb uint) {
w.bits >>= 48
w.nbits -= 48
n := w.nbytes
- w.bytes[n] = byte(bits)
- w.bytes[n+1] = byte(bits >> 8)
- w.bytes[n+2] = byte(bits >> 16)
- w.bytes[n+3] = byte(bits >> 24)
- w.bytes[n+4] = byte(bits >> 32)
- w.bytes[n+5] = byte(bits >> 40)
+ bytes := w.bytes[n : n+6]
+ bytes[0] = byte(bits)
+ bytes[1] = byte(bits >> 8)
+ bytes[2] = byte(bits >> 16)
+ bytes[3] = byte(bits >> 24)
+ bytes[4] = byte(bits >> 32)
+ bytes[5] = byte(bits >> 40)
n += 6
- if n >= bufferSize-8 {
- _, w.err = w.w.Write(w.bytes[:bufferSize-8])
+ if n >= bufferFlushSize {
+ w.write(w.bytes[:n])
n = 0
}
w.nbytes = n
@@ -194,24 +176,21 @@ func (w *huffmanBitWriter) writeBytes(bytes []byte) {
return
}
n := w.nbytes
+ if w.nbits&7 != 0 {
+ w.err = InternalError("writeBytes with unfinished bits")
+ return
+ }
for w.nbits != 0 {
w.bytes[n] = byte(w.bits)
w.bits >>= 8
w.nbits -= 8
n++
}
- if w.nbits != 0 {
- w.err = InternalError("writeBytes with unfinished bits")
- return
- }
if n != 0 {
- _, w.err = w.w.Write(w.bytes[0:n])
- if w.err != nil {
- return
- }
+ w.write(w.bytes[:n])
}
w.nbytes = 0
- _, w.err = w.w.Write(bytes)
+ w.write(bytes)
}
// RFC 1951 3.2.7 specifies a special run-length encoding for specifying
@@ -221,11 +200,12 @@ func (w *huffmanBitWriter) writeBytes(bytes []byte) {
// The result is written into the codegen array, and the frequencies
// of each code is written into the codegenFreq array.
// Codes 0-15 are single byte codes. Codes 16-18 are followed by additional
-// information. Code badCode is an end marker
+// information. Code badCode is an end marker
//
// numLiterals The number of literals in literalEncoding
// numOffsets The number of offsets in offsetEncoding
-func (w *huffmanBitWriter) generateCodegen(numLiterals int, numOffsets int) {
+// litenc, offenc The literal and offset encoder to use
+func (w *huffmanBitWriter) generateCodegen(numLiterals int, numOffsets int, litEnc, offEnc *huffmanEncoder) {
for i := range w.codegenFreq {
w.codegenFreq[i] = 0
}
@@ -234,17 +214,15 @@ func (w *huffmanBitWriter) generateCodegen(numLiterals int, numOffsets int) {
// This is fine because the output is always shorter than the input used
// so far.
codegen := w.codegen // cache
- // Copy the concatenated code sizes to codegen. Put a marker at the end.
- //copy(codegen[0:numLiterals], w.literalEncoding.codeBits)
- cgnl := codegen[0:numLiterals]
+ // Copy the concatenated code sizes to codegen. Put a marker at the end.
+ cgnl := codegen[:numLiterals]
for i := range cgnl {
- cgnl[i] = uint8(w.literalEncoding.codes[i].bits())
+ cgnl[i] = uint8(litEnc.codes[i].len)
}
- //copy(codegen[numLiterals:numLiterals+numOffsets], w.offsetEncoding.codeBits)
cgnl = codegen[numLiterals : numLiterals+numOffsets]
for i := range cgnl {
- cgnl[i] = uint8(w.offsetEncoding.codes[i].bits())
+ cgnl[i] = uint8(offEnc.codes[i].len)
}
codegen[numLiterals+numOffsets] = badCode
@@ -314,42 +292,71 @@ func (w *huffmanBitWriter) generateCodegen(numLiterals int, numOffsets int) {
codegen[outIndex] = badCode
}
-/* non-inlined:
-func (w *huffmanBitWriter) writeCode(code *huffmanEncoder, literal uint32) {
- if w.err != nil {
- return
+// dynamicSize returns the size of dynamically encoded data in bits.
+func (w *huffmanBitWriter) dynamicSize(litEnc, offEnc *huffmanEncoder, extraBits int) (size, numCodegens int) {
+ numCodegens = len(w.codegenFreq)
+ for numCodegens > 4 && w.codegenFreq[codegenOrder[numCodegens-1]] == 0 {
+ numCodegens--
}
- c := code.codes[literal]
- w.writeBits(int32(c.code()), int32(c.bits()))
-}
-*/
+ header := 3 + 5 + 5 + 4 + (3 * numCodegens) +
+ w.codegenEncoding.bitLength(w.codegenFreq[:]) +
+ int(w.codegenFreq[16])*2 +
+ int(w.codegenFreq[17])*3 +
+ int(w.codegenFreq[18])*7
+ size = header +
+ litEnc.bitLength(w.literalFreq) +
+ offEnc.bitLength(w.offsetFreq) +
+ extraBits
-func (w *huffmanBitWriter) writeCode(code *huffmanEncoder, literal uint32) {
+ return size, numCodegens
+}
+
+// fixedSize returns the size of dynamically encoded data in bits.
+func (w *huffmanBitWriter) fixedSize(extraBits int) int {
+ return 3 +
+ fixedLiteralEncoding.bitLength(w.literalFreq) +
+ fixedOffsetEncoding.bitLength(w.offsetFreq) +
+ extraBits
+}
+
+// storedSize calculates the stored size, including header.
+// The function returns the size in bits and whether the block
+// fits inside a single block.
+func (w *huffmanBitWriter) storedSize(in []byte) (int, bool) {
+ if in == nil {
+ return 0, false
+ }
+ if len(in) <= maxStoreBlockSize {
+ return (len(in) + 5) * 8, true
+ }
+ return 0, false
+}
+
+func (w *huffmanBitWriter) writeCode(c hcode) {
if w.err != nil {
return
}
- c := code.codes[literal]
- w.bits |= uint64(c.code()) << w.nbits
- w.nbits += c.bits()
+ w.bits |= uint64(c.code) << w.nbits
+ w.nbits += uint(c.len)
if w.nbits >= 48 {
bits := w.bits
w.bits >>= 48
w.nbits -= 48
n := w.nbytes
- w.bytes[n] = byte(bits)
- w.bytes[n+1] = byte(bits >> 8)
- w.bytes[n+2] = byte(bits >> 16)
- w.bytes[n+3] = byte(bits >> 24)
- w.bytes[n+4] = byte(bits >> 32)
- w.bytes[n+5] = byte(bits >> 40)
+ bytes := w.bytes[n : n+6]
+ bytes[0] = byte(bits)
+ bytes[1] = byte(bits >> 8)
+ bytes[2] = byte(bits >> 16)
+ bytes[3] = byte(bits >> 24)
+ bytes[4] = byte(bits >> 32)
+ bytes[5] = byte(bits >> 40)
n += 6
- if n >= bufferSize-8 {
- _, w.err = w.w.Write(w.bytes[:bufferSize-8])
+ if n >= bufferFlushSize {
+ w.write(w.bytes[:n])
n = 0
}
w.nbytes = n
}
-
}
// Write the header of a dynamic Huffman block to the output stream.
@@ -371,8 +378,7 @@ func (w *huffmanBitWriter) writeDynamicHeader(numLiterals int, numOffsets int, n
w.writeBits(int32(numCodegens-4), 4)
for i := 0; i < numCodegens; i++ {
- //value := w.codegenEncoding.codeBits[codegenOrder[i]]
- value := w.codegenEncoding.codes[codegenOrder[i]].bits()
+ value := uint(w.codegenEncoding.codes[codegenOrder[i]].len)
w.writeBits(int32(value), 3)
}
@@ -383,8 +389,7 @@ func (w *huffmanBitWriter) writeDynamicHeader(numLiterals int, numOffsets int, n
if codeWord == badCode {
break
}
- // The low byte contains the actual code to generate.
- w.writeCode(w.codegenEncoding, uint32(codeWord))
+ w.writeCode(w.codegenEncoding.codes[uint32(codeWord)])
switch codeWord {
case 16:
@@ -429,102 +434,50 @@ func (w *huffmanBitWriter) writeFixedHeader(isEof bool) {
w.writeBits(value, 3)
}
-func (w *huffmanBitWriter) writeBlock(tok tokens, eof bool, input []byte) {
+// writeBlock will write a block of tokens with the smallest encoding.
+// The original input can be supplied, and if the huffman encoded data
+// is larger than the original bytes, the data will be written as a
+// stored block.
+// If the input is nil, the tokens will always be Huffman encoded.
+func (w *huffmanBitWriter) writeBlock(tokens []token, eof bool, input []byte) {
if w.err != nil {
return
}
- copy(w.literalFreq, zeroLits[:])
- for i := range w.offsetFreq {
- w.offsetFreq[i] = 0
- }
+ tokens = append(tokens, endBlockMarker)
+ numLiterals, numOffsets := w.indexTokens(tokens)
- tok.tokens[tok.n] = endBlockMarker
- tokens := tok.tokens[0 : tok.n+1]
-
- for _, t := range tokens {
- switch t.typ() {
- case literalType:
- w.literalFreq[t.literal()]++
- case matchType:
- length := t.length()
- offset := t.offset()
- w.literalFreq[lengthCodesStart+lengthCode(length)]++
- w.offsetFreq[offsetCode(offset)]++
- }
- }
-
- // get the number of literals
- numLiterals := len(w.literalFreq)
- for w.literalFreq[numLiterals-1] == 0 {
- numLiterals--
- }
- // get the number of offsets
- numOffsets := len(w.offsetFreq)
- for numOffsets > 0 && w.offsetFreq[numOffsets-1] == 0 {
- numOffsets--
- }
- if numOffsets == 0 {
- // We haven't found a single match. If we want to go with the dynamic encoding,
- // we should count at least one offset to be sure that the offset huffman tree could be encoded.
- w.offsetFreq[0] = 1
- numOffsets = 1
- }
-
- w.literalEncoding.generate(w.literalFreq, 15)
- w.offsetEncoding.generate(w.offsetFreq, 15)
-
- storedBytes := 0
- if input != nil {
- storedBytes = len(input)
- }
- var extraBits int64
- var storedSize int64 = math.MaxInt64
- if storedBytes <= maxStoreBlockSize && input != nil {
- storedSize = int64((storedBytes + 5) * 8)
+ var extraBits int
+ storedSize, storable := w.storedSize(input)
+ if storable {
// We only bother calculating the costs of the extra bits required by
// the length of offset fields (which will be the same for both fixed
// and dynamic encoding), if we need to compare those two encodings
// against stored encoding.
for lengthCode := lengthCodesStart + 8; lengthCode < numLiterals; lengthCode++ {
// First eight length codes have extra size = 0.
- extraBits += int64(w.literalFreq[lengthCode]) * int64(lengthExtraBits[lengthCode-lengthCodesStart])
+ extraBits += int(w.literalFreq[lengthCode]) * int(lengthExtraBits[lengthCode-lengthCodesStart])
}
for offsetCode := 4; offsetCode < numOffsets; offsetCode++ {
// First four offset codes have extra size = 0.
- extraBits += int64(w.offsetFreq[offsetCode]) * int64(offsetExtraBits[offsetCode])
+ extraBits += int(w.offsetFreq[offsetCode]) * int(offsetExtraBits[offsetCode])
}
}
// Figure out smallest code.
// Fixed Huffman baseline.
- var size = int64(3) +
- fixedLiteralEncoding.bitLength(w.literalFreq) +
- fixedOffsetEncoding.bitLength(w.offsetFreq) +
- extraBits
var literalEncoding = fixedLiteralEncoding
var offsetEncoding = fixedOffsetEncoding
+ var size = w.fixedSize(extraBits)
// Dynamic Huffman?
var numCodegens int
// Generate codegen and codegenFrequencies, which indicates how to encode
// the literalEncoding and the offsetEncoding.
- w.generateCodegen(numLiterals, numOffsets)
- w.codegenEncoding.generate(w.codegenFreq, 7)
- numCodegens = len(w.codegenFreq)
- for numCodegens > 4 && w.codegenFreq[codegenOrder[numCodegens-1]] == 0 {
- numCodegens--
- }
- dynamicHeader := int64(3+5+5+4+(3*numCodegens)) +
- w.codegenEncoding.bitLength(w.codegenFreq) +
- int64(extraBits) +
- int64(w.codegenFreq[16]*2) +
- int64(w.codegenFreq[17]*3) +
- int64(w.codegenFreq[18]*7)
- dynamicSize := dynamicHeader +
- w.literalEncoding.bitLength(w.literalFreq) +
- w.offsetEncoding.bitLength(w.offsetFreq)
+ w.generateCodegen(numLiterals, numOffsets, w.literalEncoding, w.offsetEncoding)
+ w.codegenEncoding.generate(w.codegenFreq[:], 7)
+ dynamicSize, numCodegens := w.dynamicSize(w.literalEncoding, w.offsetEncoding, extraBits)
if dynamicSize < size {
size = dynamicSize
@@ -533,9 +486,9 @@ func (w *huffmanBitWriter) writeBlock(tok tokens, eof bool, input []byte) {
}
// Stored bytes?
- if storedSize < size {
- w.writeStoredHeader(storedBytes, eof)
- w.writeBytes(input[0:storedBytes])
+ if storable && storedSize < size {
+ w.writeStoredHeader(len(input), eof)
+ w.writeBytes(input)
return
}
@@ -545,89 +498,153 @@ func (w *huffmanBitWriter) writeBlock(tok tokens, eof bool, input []byte) {
} else {
w.writeDynamicHeader(numLiterals, numOffsets, numCodegens, eof)
}
+
+ // Write the tokens.
+ w.writeTokens(tokens, literalEncoding.codes, offsetEncoding.codes)
+}
+
+// writeBlockDynamic encodes a block using a dynamic Huffman table.
+// This should be used if the symbols used have a disproportionate
+// histogram distribution.
+// If input is supplied and the compression savings are below 1/16th of the
+// input size the block is stored.
+func (w *huffmanBitWriter) writeBlockDynamic(tokens []token, eof bool, input []byte) {
+ if w.err != nil {
+ return
+ }
+
+ tokens = append(tokens, endBlockMarker)
+ numLiterals, numOffsets := w.indexTokens(tokens)
+
+ // Generate codegen and codegenFrequencies, which indicates how to encode
+ // the literalEncoding and the offsetEncoding.
+ w.generateCodegen(numLiterals, numOffsets, w.literalEncoding, w.offsetEncoding)
+ w.codegenEncoding.generate(w.codegenFreq[:], 7)
+ size, numCodegens := w.dynamicSize(w.literalEncoding, w.offsetEncoding, 0)
+
+ // Store bytes, if we don't get a reasonable improvement.
+ if ssize, storable := w.storedSize(input); storable && ssize < (size+size>>4) {
+ w.writeStoredHeader(len(input), eof)
+ w.writeBytes(input)
+ return
+ }
+
+ // Write Huffman table.
+ w.writeDynamicHeader(numLiterals, numOffsets, numCodegens, eof)
+
+ // Write the tokens.
+ w.writeTokens(tokens, w.literalEncoding.codes, w.offsetEncoding.codes)
+}
+
+// indexTokens indexes a slice of tokens, and updates
+// literalFreq and offsetFreq, and generates literalEncoding
+// and offsetEncoding.
+// The number of literal and offset tokens is returned.
+func (w *huffmanBitWriter) indexTokens(tokens []token) (numLiterals, numOffsets int) {
+ for i := range w.literalFreq {
+ w.literalFreq[i] = 0
+ }
+ for i := range w.offsetFreq {
+ w.offsetFreq[i] = 0
+ }
+
for _, t := range tokens {
- switch t.typ() {
- case literalType:
- w.writeCode(literalEncoding, t.literal())
- break
- case matchType:
- // Write the length
- length := t.length()
- lengthCode := lengthCode(length)
- w.writeCode(literalEncoding, lengthCode+lengthCodesStart)
- extraLengthBits := uint(lengthExtraBits[lengthCode])
- if extraLengthBits > 0 {
- extraLength := int32(length - lengthBase[lengthCode])
- w.writeBits(extraLength, extraLengthBits)
- }
- // Write the offset
- offset := t.offset()
- offsetCode := offsetCode(offset)
- w.writeCode(offsetEncoding, offsetCode)
- extraOffsetBits := uint(offsetExtraBits[offsetCode])
- if extraOffsetBits > 0 {
- extraOffset := int32(offset - offsetBase[offsetCode])
- w.writeBits(extraOffset, extraOffsetBits)
- }
- break
- default:
- panic("unknown token type: " + string(t))
+ if t < matchType {
+ w.literalFreq[t.literal()]++
+ continue
+ }
+ length := t.length()
+ offset := t.offset()
+ w.literalFreq[lengthCodesStart+lengthCode(length)]++
+ w.offsetFreq[offsetCode(offset)]++
+ }
+
+ // get the number of literals
+ numLiterals = len(w.literalFreq)
+ for w.literalFreq[numLiterals-1] == 0 {
+ numLiterals--
+ }
+ // get the number of offsets
+ numOffsets = len(w.offsetFreq)
+ for numOffsets > 0 && w.offsetFreq[numOffsets-1] == 0 {
+ numOffsets--
+ }
+ if numOffsets == 0 {
+ // We haven't found a single match. If we want to go with the dynamic encoding,
+ // we should count at least one offset to be sure that the offset huffman tree could be encoded.
+ w.offsetFreq[0] = 1
+ numOffsets = 1
+ }
+ w.literalEncoding.generate(w.literalFreq, 15)
+ w.offsetEncoding.generate(w.offsetFreq, 15)
+ return
+}
+
+// writeTokens writes a slice of tokens to the output.
+// codes for literal and offset encoding must be supplied.
+func (w *huffmanBitWriter) writeTokens(tokens []token, leCodes, oeCodes []hcode) {
+ if w.err != nil {
+ return
+ }
+ for _, t := range tokens {
+ if t < matchType {
+ w.writeCode(leCodes[t.literal()])
+ continue
+ }
+ // Write the length
+ length := t.length()
+ lengthCode := lengthCode(length)
+ w.writeCode(leCodes[lengthCode+lengthCodesStart])
+ extraLengthBits := uint(lengthExtraBits[lengthCode])
+ if extraLengthBits > 0 {
+ extraLength := int32(length - lengthBase[lengthCode])
+ w.writeBits(extraLength, extraLengthBits)
+ }
+ // Write the offset
+ offset := t.offset()
+ offsetCode := offsetCode(offset)
+ w.writeCode(oeCodes[offsetCode])
+ extraOffsetBits := uint(offsetExtraBits[offsetCode])
+ if extraOffsetBits > 0 {
+ extraOffset := int32(offset - offsetBase[offsetCode])
+ w.writeBits(extraOffset, extraOffsetBits)
}
}
}
+// huffOffset is a static offset encoder used for huffman only encoding.
+// It can be reused since we will not be encoding offset values.
var huffOffset *huffmanEncoder
-var zeroLits [maxNumLit]int32
func init() {
- var w = newHuffmanBitWriter(nil)
+ w := newHuffmanBitWriter(nil)
w.offsetFreq[0] = 1
- w.offsetEncoding = newHuffmanEncoder(offsetCodeCount)
- w.offsetEncoding.generate(w.offsetFreq, 15)
- huffOffset = w.offsetEncoding
+ huffOffset = newHuffmanEncoder(offsetCodeCount)
+ huffOffset.generate(w.offsetFreq, 15)
}
-// writeBlockHuff will write a block of bytes as either
-// Huffman encoded literals, or uncompressed bytes depending
-// on what yields the smallest result.
+// writeBlockHuff encodes a block of bytes as either
+// Huffman encoded literals or uncompressed bytes if the
+// results only gains very little from compression.
func (w *huffmanBitWriter) writeBlockHuff(eof bool, input []byte) {
if w.err != nil {
return
}
+
// Clear histogram
- copy(w.literalFreq, zeroLits[:])
+ for i := range w.literalFreq {
+ w.literalFreq[i] = 0
+ }
// Add everything as literals
histogram(input, w.literalFreq)
- w.literalFreq[endBlockMarker]++
+ w.literalFreq[endBlockMarker] = 1
- // get the number of literals
- numLiterals := len(w.literalFreq)
- for w.literalFreq[numLiterals-1] == 0 {
- numLiterals--
- }
-
- numOffsets := 1
+ const numLiterals = endBlockMarker + 1
+ const numOffsets = 1
w.literalEncoding.generate(w.literalFreq, 15)
- w.offsetEncoding = huffOffset
-
- storedBytes := len(input)
-
- var extraBits int64
- var storedSize int64 = math.MaxInt64
- if storedBytes <= maxStoreBlockSize {
- storedSize = int64((storedBytes + 5) * 8)
- // We only bother calculating the costs of the extra bits required by
- // the length of offset fields (which will be the same for both fixed
- // and dynamic encoding), if we need to compare those two encodings
- // against stored encoding.
- for lengthCode := lengthCodesStart + 8; lengthCode < numLiterals; lengthCode++ {
- // First eight length codes have extra size = 0.
- extraBits += int64(w.literalFreq[lengthCode]) * int64(lengthExtraBits[lengthCode-lengthCodesStart])
- }
- }
// Figure out smallest code.
// Always use dynamic Huffman or Store
@@ -635,56 +652,50 @@ func (w *huffmanBitWriter) writeBlockHuff(eof bool, input []byte) {
// Generate codegen and codegenFrequencies, which indicates how to encode
// the literalEncoding and the offsetEncoding.
- w.generateCodegen(numLiterals, numOffsets)
- w.codegenEncoding.generate(w.codegenFreq, 7)
- numCodegens = len(w.codegenFreq)
- for numCodegens > 4 && w.codegenFreq[codegenOrder[numCodegens-1]] == 0 {
- numCodegens--
- }
- dynamicHeader := int64(3+5+5+4+(3*numCodegens)) +
- w.codegenEncoding.bitLength(w.codegenFreq) +
- int64(extraBits) +
- int64(w.codegenFreq[16]*2) +
- int64(w.codegenFreq[17]*3) +
- int64(w.codegenFreq[18]*7)
- size := dynamicHeader +
- w.literalEncoding.bitLength(w.literalFreq) +
- 1 /*w.offsetEncoding.bitLength(w.offsetFreq)*/
+ w.generateCodegen(numLiterals, numOffsets, w.literalEncoding, huffOffset)
+ w.codegenEncoding.generate(w.codegenFreq[:], 7)
+ size, numCodegens := w.dynamicSize(w.literalEncoding, huffOffset, 0)
- // Stored bytes?
- if storedSize < size {
- w.writeStoredHeader(storedBytes, eof)
- w.writeBytes(input[0:storedBytes])
+ // Store bytes, if we don't get a reasonable improvement.
+ if ssize, storable := w.storedSize(input); storable && ssize < (size+size>>4) {
+ w.writeStoredHeader(len(input), eof)
+ w.writeBytes(input)
return
}
// Huffman.
w.writeDynamicHeader(numLiterals, numOffsets, numCodegens, eof)
+ encoding := w.literalEncoding.codes[:257]
+ n := w.nbytes
for _, t := range input {
// Bitwriting inlined, ~30% speedup
- c := w.literalEncoding.codes[t]
- w.bits |= uint64(c.code()) << w.nbits
- w.nbits += c.bits()
- if w.nbits >= 48 {
- bits := w.bits
- w.bits >>= 48
- w.nbits -= 48
- n := w.nbytes
- w.bytes[n] = byte(bits)
- w.bytes[n+1] = byte(bits >> 8)
- w.bytes[n+2] = byte(bits >> 16)
- w.bytes[n+3] = byte(bits >> 24)
- w.bytes[n+4] = byte(bits >> 32)
- w.bytes[n+5] = byte(bits >> 40)
- n += 6
- if n >= bufferSize-8 {
- _, w.err = w.w.Write(w.bytes[:bufferSize-8])
- w.nbytes = 0
- } else {
- w.nbytes = n
- }
+ c := encoding[t]
+ w.bits |= uint64(c.code) << w.nbits
+ w.nbits += uint(c.len)
+ if w.nbits < 48 {
+ continue
}
+ // Store 6 bytes
+ bits := w.bits
+ w.bits >>= 48
+ w.nbits -= 48
+ bytes := w.bytes[n : n+6]
+ bytes[0] = byte(bits)
+ bytes[1] = byte(bits >> 8)
+ bytes[2] = byte(bits >> 16)
+ bytes[3] = byte(bits >> 24)
+ bytes[4] = byte(bits >> 32)
+ bytes[5] = byte(bits >> 40)
+ n += 6
+ if n < bufferFlushSize {
+ continue
+ }
+ w.write(w.bytes[:n])
+ if w.err != nil {
+ return // Return early in the event of write failures
+ }
+ n = 0
}
- // Write EOB
- w.writeCode(w.literalEncoding, endBlockMarker)
+ w.nbytes = n
+ w.writeCode(encoding[endBlockMarker])
}
diff --git a/vendor/github.com/klauspost/compress/flate/huffman_code.go b/vendor/github.com/klauspost/compress/flate/huffman_code.go
index 9dba0faf339..bdcbd823b00 100644
--- a/vendor/github.com/klauspost/compress/flate/huffman_code.go
+++ b/vendor/github.com/klauspost/compress/flate/huffman_code.go
@@ -9,14 +9,17 @@ import (
"sort"
)
-type hcode uint32
+// hcode is a huffman code with a bit code and bit length.
+type hcode struct {
+ code, len uint16
+}
type huffmanEncoder struct {
codes []hcode
freqcache []literalNode
bitCount [17]int32
- lns literalNodeSorter
- lfs literalFreqSorter
+ lns byLiteral // stored to avoid repeated allocation in generate
+ lfs byFreq // stored to avoid repeated allocation in generate
}
type literalNode struct {
@@ -44,34 +47,16 @@ type levelInfo struct {
needed int32
}
-func (h hcode) codeBits() (code uint16, bits uint8) {
- return uint16(h), uint8(h >> 16)
-}
-
-func (h *hcode) set(code uint16, bits uint8) {
- *h = hcode(code) | hcode(uint32(bits)<<16)
-}
-
-func (h *hcode) setBits(bits uint8) {
- *h = hcode(*h&0xffff) | hcode(uint32(bits)<<16)
-}
-
-func toCode(code uint16, bits uint8) hcode {
- return hcode(code) | hcode(uint32(bits)<<16)
-}
-
-func (h hcode) code() (code uint16) {
- return uint16(h)
-}
-
-func (h hcode) bits() (bits uint) {
- return uint(h >> 16)
+// set sets the code and length of an hcode.
+func (h *hcode) set(code uint16, length uint16) {
+ h.len = length
+ h.code = code
}
func maxNode() literalNode { return literalNode{math.MaxUint16, math.MaxInt32} }
func newHuffmanEncoder(size int) *huffmanEncoder {
- return &huffmanEncoder{codes: make([]hcode, size), freqcache: nil}
+ return &huffmanEncoder{codes: make([]hcode, size)}
}
// Generates a HuffmanCode corresponding to the fixed literal table
@@ -81,7 +66,7 @@ func generateFixedLiteralEncoding() *huffmanEncoder {
var ch uint16
for ch = 0; ch < maxNumLit; ch++ {
var bits uint16
- var size uint8
+ var size uint16
switch {
case ch < 144:
// size 8, 000110000 .. 10111111
@@ -103,7 +88,7 @@ func generateFixedLiteralEncoding() *huffmanEncoder {
bits = ch + 192 - 280
size = 8
}
- codes[ch] = toCode(reverseBits(bits, size), size)
+ codes[ch] = hcode{code: reverseBits(bits, byte(size)), len: size}
}
return h
}
@@ -111,8 +96,8 @@ func generateFixedLiteralEncoding() *huffmanEncoder {
func generateFixedOffsetEncoding() *huffmanEncoder {
h := newHuffmanEncoder(30)
codes := h.codes
- for ch := uint16(0); ch < 30; ch++ {
- codes[ch] = toCode(reverseBits(ch, 5), 5)
+ for ch := range codes {
+ codes[ch] = hcode{code: reverseBits(uint16(ch), 5), len: 5}
}
return h
}
@@ -120,11 +105,11 @@ func generateFixedOffsetEncoding() *huffmanEncoder {
var fixedLiteralEncoding *huffmanEncoder = generateFixedLiteralEncoding()
var fixedOffsetEncoding *huffmanEncoder = generateFixedOffsetEncoding()
-func (h *huffmanEncoder) bitLength(freq []int32) int64 {
- var total int64
+func (h *huffmanEncoder) bitLength(freq []int32) int {
+ var total int
for i, f := range freq {
if f != 0 {
- total += int64(f) * int64(h.codes[i].bits())
+ total += int(f) * int(h.codes[i].len)
}
}
return total
@@ -138,7 +123,7 @@ const maxBitsLimit = 16
// The cases of 0, 1, and 2 literals are handled by special case code.
//
// list An array of the literals with non-zero frequencies
-// and their associated frequencies. The array is in order of increasing
+// and their associated frequencies. The array is in order of increasing
// frequency, and has as its last element a special element with frequency
// MaxInt32
// maxBits The maximum number of bits that should be used to encode any literal.
@@ -153,7 +138,7 @@ func (h *huffmanEncoder) bitCounts(list []literalNode, maxBits int32) []int32 {
list = list[0 : n+1]
list[n] = maxNode()
- // The tree can't have greater depth than n - 1, no matter what. This
+ // The tree can't have greater depth than n - 1, no matter what. This
// saves a little bit of work in some small cases
if maxBits > n-1 {
maxBits = n - 1
@@ -222,7 +207,7 @@ func (h *huffmanEncoder) bitCounts(list []literalNode, maxBits int32) []int32 {
if l.needed--; l.needed == 0 {
// We've done everything we need to do for this level.
- // Continue calculating one level up. Fill in nextPairFreq
+ // Continue calculating one level up. Fill in nextPairFreq
// of that level with the sum of the two nodes we've just calculated on
// this level.
if l.level == maxBits {
@@ -246,7 +231,6 @@ func (h *huffmanEncoder) bitCounts(list []literalNode, maxBits int32) []int32 {
}
bitCount := h.bitCount[:maxBits+1]
- //make([]int32, maxBits+1)
bits := 1
counts := &leafCounts[maxBits]
for level := maxBits; level > 0; level-- {
@@ -273,9 +257,9 @@ func (h *huffmanEncoder) assignEncodingAndSize(bitCount []int32, list []literalN
// assigned in literal order (not frequency order).
chunk := list[len(list)-int(bits):]
- h.lns.Sort(chunk)
+ h.lns.sort(chunk)
for _, node := range chunk {
- h.codes[node.literal] = toCode(reverseBits(code, uint8(n)), uint8(n))
+ h.codes[node.literal] = hcode{code: reverseBits(code, uint8(n)), len: uint16(n)}
code++
}
list = list[0 : len(list)-int(bits)]
@@ -288,7 +272,10 @@ func (h *huffmanEncoder) assignEncodingAndSize(bitCount []int32, list []literalN
// maxBits The maximum number of bits to use for any literal.
func (h *huffmanEncoder) generate(freq []int32, maxBits int32) {
if h.freqcache == nil {
- h.freqcache = make([]literalNode, 300)
+ // Allocate a reusable buffer with the longest possible frequency table.
+ // Possible lengths are codegenCodeCount, offsetCodeCount and maxNumLit.
+ // The largest of these is maxNumLit, so we allocate for that case.
+ h.freqcache = make([]literalNode, maxNumLit+1)
}
list := h.freqcache[:len(freq)+1]
// Number of non-zero literals
@@ -300,28 +287,22 @@ func (h *huffmanEncoder) generate(freq []int32, maxBits int32) {
count++
} else {
list[count] = literalNode{}
- //h.codeBits[i] = 0
- h.codes[i].setBits(0)
+ h.codes[i].len = 0
}
}
list[len(freq)] = literalNode{}
- // If freq[] is shorter than codeBits[], fill rest of codeBits[] with zeros
- // FIXME: Doesn't do what it says on the tin (klauspost)
- //h.codeBits = h.codeBits[0:len(freq)]
- list = list[0:count]
+ list = list[:count]
if count <= 2 {
- // Handle the small cases here, because they are awkward for the general case code. With
+ // Handle the small cases here, because they are awkward for the general case code. With
// two or fewer literals, everything has bit length 1.
for i, node := range list {
// "list" is in order of increasing literal value.
h.codes[node.literal].set(uint16(i), 1)
- //h.codeBits[node.literal] = 1
- //h.code[node.literal] = uint16(i)
}
return
}
- h.lfs.Sort(list)
+ h.lfs.sort(list)
// Get the number of literals for each bit count
bitCount := h.bitCounts(list, maxBits)
@@ -329,35 +310,35 @@ func (h *huffmanEncoder) generate(freq []int32, maxBits int32) {
h.assignEncodingAndSize(bitCount, list)
}
-type literalNodeSorter []literalNode
+type byLiteral []literalNode
-func (s *literalNodeSorter) Sort(a []literalNode) {
- *s = literalNodeSorter(a)
+func (s *byLiteral) sort(a []literalNode) {
+ *s = byLiteral(a)
sort.Sort(s)
}
-func (s literalNodeSorter) Len() int { return len(s) }
+func (s byLiteral) Len() int { return len(s) }
-func (s literalNodeSorter) Less(i, j int) bool {
+func (s byLiteral) Less(i, j int) bool {
return s[i].literal < s[j].literal
}
-func (s literalNodeSorter) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
+func (s byLiteral) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
-type literalFreqSorter []literalNode
+type byFreq []literalNode
-func (s *literalFreqSorter) Sort(a []literalNode) {
- *s = literalFreqSorter(a)
+func (s *byFreq) sort(a []literalNode) {
+ *s = byFreq(a)
sort.Sort(s)
}
-func (s literalFreqSorter) Len() int { return len(s) }
+func (s byFreq) Len() int { return len(s) }
-func (s literalFreqSorter) Less(i, j int) bool {
+func (s byFreq) Less(i, j int) bool {
if s[i].freq == s[j].freq {
return s[i].literal < s[j].literal
}
return s[i].freq < s[j].freq
}
-func (s literalFreqSorter) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
+func (s byFreq) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
diff --git a/vendor/github.com/klauspost/compress/flate/inflate.go b/vendor/github.com/klauspost/compress/flate/inflate.go
index 91e27e7e280..53b63d9a0b3 100644
--- a/vendor/github.com/klauspost/compress/flate/inflate.go
+++ b/vendor/github.com/klauspost/compress/flate/inflate.go
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:generate go run gen.go -output fixedhuff.go
-
// Package flate implements the DEFLATE compressed data format, described in
// RFC 1951. The gzip and zlib packages implement access to DEFLATE-based file
// formats.
@@ -13,11 +11,11 @@ import (
"bufio"
"io"
"strconv"
+ "sync"
)
const (
- maxCodeLen = 16 // max length of Huffman code
- maxHist = 32768 // max history required
+ maxCodeLen = 16 // max length of Huffman code
// The next three numbers come from the RFC section 3.2.7, with the
// additional proviso in section 3.2.5 which implies that distance codes
// 30 and 31 should never occur in compressed data.
@@ -26,6 +24,10 @@ const (
numCodes = 19 // number of codes in Huffman meta-code
)
+// Initialize the fixedHuffmanDecoder only once upon first use.
+var fixedOnce sync.Once
+var fixedHuffmanDecoder huffmanDecoder
+
// A CorruptInputError reports the presence of corrupt input at a given offset.
type CorruptInputError int64
@@ -39,6 +41,8 @@ type InternalError string
func (e InternalError) Error() string { return "flate: internal error: " + string(e) }
// A ReadError reports an error encountered while reading input.
+//
+// Deprecated: No longer returned.
type ReadError struct {
Offset int64 // byte offset where error occurred
Err error // error returned by underlying Read
@@ -49,6 +53,8 @@ func (e *ReadError) Error() string {
}
// A WriteError reports an error encountered while writing output.
+//
+// Deprecated: No longer returned.
type WriteError struct {
Offset int64 // byte offset where error occurred
Err error // error returned by underlying Write
@@ -67,10 +73,6 @@ type Resetter interface {
Reset(r io.Reader, dict []byte) error
}
-// Note that much of the implementation of huffmanDecoder is also copied
-// into gen.go (in package main) for the purpose of precomputing the
-// fixed huffman tables so they can be included statically.
-
// The data structure for decoding Huffman tables is based on that of
// zlib. There is a lookup table of a fixed bit width (huffmanChunkBits),
// For codes smaller than the table width, there are multiple entries
@@ -78,12 +80,15 @@ type Resetter interface {
// larger than the table width, the table contains a link to an overflow
// table. The width of each entry in the link table is the maximum code
// size minus the chunk width.
-
+//
// Note that you can do a lookup in the table even without all bits
// filled. Since the extra bits are zero, and the DEFLATE Huffman codes
// have the property that shorter codes come before longer ones, the
// bit length estimate in the result is a lower bound on the actual
// number of bits.
+//
+// See the following:
+// http://www.gzip.org/algorithm.txt
// chunk & 15 is number of bits
// chunk >> 4 is value, including table link
@@ -109,7 +114,7 @@ type huffmanDecoder struct {
// trees are permitted.
func (h *huffmanDecoder) init(bits []int) bool {
// Sanity enables additional runtime tests during Huffman
- // table construction. It's intended to be used during
+ // table construction. It's intended to be used during
// development to supplement the currently ad-hoc unit tests.
const sanity = false
@@ -156,7 +161,7 @@ func (h *huffmanDecoder) init(bits []int) bool {
// Check that the coding is complete (i.e., that we've
// assigned all 2-to-the-max possible bit sequences).
// Exception: To be compatible with zlib, we also need to
- // accept degenerate single-code codings. See also
+ // accept degenerate single-code codings. See also
// TestDegenerateHuffmanCoding.
if code != 1< 0 {
n := copy(b, f.toRead)
f.toRead = f.toRead[n:]
+ if len(f.toRead) == 0 {
+ return n, f.err
+ }
return n, nil
}
if f.err != nil {
return 0, f.err
}
f.step(f)
+ if f.err != nil && len(f.toRead) == 0 {
+ f.toRead = f.dict.readFlush() // Flush what's left in case of error
+ }
}
}
// Support the io.WriteTo interface for io.Copy and friends.
func (f *decompressor) WriteTo(w io.Writer) (int64, error) {
total := int64(0)
+ flushed := false
for {
- if f.err != nil {
- if f.err == io.EOF {
- return total, nil
- }
- return total, f.err
- }
if len(f.toRead) > 0 {
- var n int
- n, f.err = w.Write(f.toRead)
- if f.err != nil {
- return total, f.err
+ n, err := w.Write(f.toRead)
+ total += int64(n)
+ if err != nil {
+ f.err = err
+ return total, err
}
if n != len(f.toRead) {
return total, io.ErrShortWrite
}
f.toRead = f.toRead[:0]
- total += int64(n)
}
- f.step(f)
+ if f.err != nil && flushed {
+ if f.err == io.EOF {
+ return total, nil
+ }
+ return total, f.err
+ }
+ if f.err == nil {
+ f.step(f)
+ }
+ if len(f.toRead) == 0 && f.err != nil && !flushed {
+ f.toRead = f.dict.readFlush() // Flush what's left in case of error
+ flushed = true
+ }
}
}
@@ -485,13 +492,12 @@ func (f *decompressor) readHuffman() error {
return CorruptInputError(f.roffset)
}
- // In order to preserve the property that we never read any extra bytes
- // after the end of the DEFLATE stream, huffSym conservatively reads min
- // bits at a time until it decodes the symbol. However, since every block
- // must end with an EOB marker, we can use that as the minimum number of
- // bits to read and guarantee we never read past the end of the stream.
- if f.bits[endBlockMarker] > 0 {
- f.h1.min = f.bits[endBlockMarker] // Length of EOB marker
+ // As an optimization, we can initialize the min bits to read at a time
+ // for the HLIT tree to the length of the EOB marker since we know that
+ // every block must terminate with one. This preserves the property that
+ // we never read any extra bytes after the end of the DEFLATE stream.
+ if f.h1.min < f.bits[endBlockMarker] {
+ f.h1.min = f.bits[endBlockMarker]
}
return nil
@@ -499,10 +505,24 @@ func (f *decompressor) readHuffman() error {
// Decode a single Huffman block from f.
// hl and hd are the Huffman states for the lit/length values
-// and the distance values, respectively. If hd == nil, using the
+// and the distance values, respectively. If hd == nil, using the
// fixed distance encoding associated with fixed Huffman blocks.
func (f *decompressor) huffmanBlock() {
- for {
+ const (
+ stateInit = iota // Zero value must be stateInit
+ stateDict
+ )
+
+ switch f.stepState {
+ case stateInit:
+ goto readLiteral
+ case stateDict:
+ goto copyHistory
+ }
+
+readLiteral:
+ // Read literal and/or (length, distance) according to RFC section 3.2.3.
+ {
v, err := f.huffSym(f.hl)
if err != nil {
f.err = err
@@ -512,17 +532,16 @@ func (f *decompressor) huffmanBlock() {
var length int
switch {
case v < 256:
- f.hist[f.hp] = byte(v)
- f.hp++
- if f.hp == len(f.hist) {
- // After the flush, continue this loop.
- f.flush((*decompressor).huffmanBlock)
+ f.dict.writeByte(byte(v))
+ if f.dict.availWrite() == 0 {
+ f.toRead = f.dict.readFlush()
+ f.step = (*decompressor).huffmanBlock
+ f.stepState = stateInit
return
}
- continue
+ goto readLiteral
case v == 256:
- // Done with huffman block; read next block.
- f.step = (*decompressor).nextBlock
+ f.finishBlock()
return
// otherwise, reference to older data
case v < 265:
@@ -602,63 +621,35 @@ func (f *decompressor) huffmanBlock() {
return
}
- // Copy history[-dist:-dist+length] into output.
- if dist > len(f.hist) {
- f.err = InternalError("bad history distance")
- return
- }
-
// No check on length; encoding can be prescient.
- if !f.hfull && dist > f.hp {
+ if dist > f.dict.histSize() {
f.err = CorruptInputError(f.roffset)
return
}
f.copyLen, f.copyDist = length, dist
- if f.copyHist() {
+ goto copyHistory
+ }
+
+copyHistory:
+ // Perform a backwards copy according to RFC section 3.2.3.
+ {
+ cnt := f.dict.tryWriteCopy(f.copyDist, f.copyLen)
+ if cnt == 0 {
+ cnt = f.dict.writeCopy(f.copyDist, f.copyLen)
+ }
+ f.copyLen -= cnt
+
+ if f.dict.availWrite() == 0 || f.copyLen > 0 {
+ f.toRead = f.dict.readFlush()
+ f.step = (*decompressor).huffmanBlock // We need to continue this work
+ f.stepState = stateDict
return
}
+ goto readLiteral
}
}
-// copyHist copies f.copyLen bytes from f.hist (f.copyDist bytes ago) to itself.
-// It reports whether the f.hist buffer is full.
-func (f *decompressor) copyHist() bool {
- p := f.hp - f.copyDist
- if p < 0 {
- p += len(f.hist)
- }
- for f.copyLen > 0 {
- n := f.copyLen
- if x := len(f.hist) - f.hp; n > x {
- n = x
- }
- if x := len(f.hist) - p; n > x {
- n = x
- }
- forwardCopy(f.hist[:], f.hp, p, n)
- p += n
- f.hp += n
- f.copyLen -= n
- if f.hp == len(f.hist) {
- // After flush continue copying out of history.
- f.flush((*decompressor).copyHuff)
- return true
- }
- if p == len(f.hist) {
- p = 0
- }
- }
- return false
-}
-
-func (f *decompressor) copyHuff() {
- if f.copyHist() {
- return
- }
- f.huffmanBlock()
-}
-
// Copy a single uncompressed data block from input to output.
func (f *decompressor) dataBlock() {
// Uncompressed.
@@ -670,7 +661,10 @@ func (f *decompressor) dataBlock() {
nr, err := io.ReadFull(f.r, f.buf[0:4])
f.roffset += int64(nr)
if err != nil {
- f.err = &ReadError{f.roffset, err}
+ if err == io.EOF {
+ err = io.ErrUnexpectedEOF
+ }
+ f.err = err
return
}
n := int(f.buf[0]) | int(f.buf[1])<<8
@@ -681,8 +675,8 @@ func (f *decompressor) dataBlock() {
}
if n == 0 {
- // 0-length block means sync
- f.flush((*decompressor).nextBlock)
+ f.toRead = f.dict.readFlush()
+ f.finishBlock()
return
}
@@ -693,41 +687,39 @@ func (f *decompressor) dataBlock() {
// copyData copies f.copyLen bytes from the underlying reader into f.hist.
// It pauses for reads when f.hist is full.
func (f *decompressor) copyData() {
- n := f.copyLen
- for n > 0 {
- m := len(f.hist) - f.hp
- if m > n {
- m = n
- }
- m, err := io.ReadFull(f.r, f.hist[f.hp:f.hp+m])
- f.roffset += int64(m)
- if err != nil {
- f.err = &ReadError{f.roffset, err}
- return
- }
- n -= m
- f.hp += m
- if f.hp == len(f.hist) {
- f.copyLen = n
- f.flush((*decompressor).copyData)
- return
- }
+ buf := f.dict.writeSlice()
+ if len(buf) > f.copyLen {
+ buf = buf[:f.copyLen]
}
- f.step = (*decompressor).nextBlock
+
+ cnt, err := io.ReadFull(f.r, buf)
+ f.roffset += int64(cnt)
+ f.copyLen -= cnt
+ f.dict.writeMark(cnt)
+ if err != nil {
+ if err == io.EOF {
+ err = io.ErrUnexpectedEOF
+ }
+ f.err = err
+ return
+ }
+
+ if f.dict.availWrite() == 0 || f.copyLen > 0 {
+ f.toRead = f.dict.readFlush()
+ f.step = (*decompressor).copyData
+ return
+ }
+ f.finishBlock()
}
-func (f *decompressor) setDict(dict []byte) {
- if len(dict) > len(f.hist) {
- // Will only remember the tail.
- dict = dict[len(dict)-len(f.hist):]
+func (f *decompressor) finishBlock() {
+ if f.final {
+ if f.dict.availRead() > 0 {
+ f.toRead = f.dict.readFlush()
+ }
+ f.err = io.EOF
}
-
- f.hp = copy(f.hist[:], dict)
- if f.hp == len(f.hist) {
- f.hp = 0
- f.hfull = true
- }
- f.hw = f.hp
+ f.step = (*decompressor).nextBlock
}
func (f *decompressor) moreBits() error {
@@ -775,19 +767,6 @@ func (f *decompressor) huffSym(h *huffmanDecoder) (int, error) {
}
}
-// Flush any buffered output to the underlying writer.
-func (f *decompressor) flush(step func(*decompressor)) {
- f.toRead = f.hist[f.hw:f.hp]
- f.woffset += int64(f.hp - f.hw)
- f.hw = f.hp
- if f.hp == len(f.hist) {
- f.hp = 0
- f.hw = 0
- f.hfull = true
- }
- f.step = step
-}
-
func makeReader(r io.Reader) Reader {
if rr, ok := r.(Reader); ok {
return rr
@@ -795,17 +774,35 @@ func makeReader(r io.Reader) Reader {
return bufio.NewReader(r)
}
+func fixedHuffmanDecoderInit() {
+ fixedOnce.Do(func() {
+ // These come from the RFC section 3.2.6.
+ var bits [288]int
+ for i := 0; i < 144; i++ {
+ bits[i] = 8
+ }
+ for i := 144; i < 256; i++ {
+ bits[i] = 9
+ }
+ for i := 256; i < 280; i++ {
+ bits[i] = 7
+ }
+ for i := 280; i < 288; i++ {
+ bits[i] = 8
+ }
+ fixedHuffmanDecoder.init(bits[:])
+ })
+}
+
func (f *decompressor) Reset(r io.Reader, dict []byte) error {
*f = decompressor{
r: makeReader(r),
bits: f.bits,
codebits: f.codebits,
- hist: f.hist,
+ dict: f.dict,
step: (*decompressor).nextBlock,
}
- if dict != nil {
- f.setDict(dict)
- }
+ f.dict.init(maxMatchOffset, dict)
return nil
}
@@ -818,29 +815,32 @@ func (f *decompressor) Reset(r io.Reader, dict []byte) error {
//
// The ReadCloser returned by NewReader also implements Resetter.
func NewReader(r io.Reader) io.ReadCloser {
+ fixedHuffmanDecoderInit()
+
var f decompressor
+ f.r = makeReader(r)
f.bits = new([maxNumLit + maxNumDist]int)
f.codebits = new([numCodes]int)
- f.r = makeReader(r)
- f.hist = new([maxHist]byte)
f.step = (*decompressor).nextBlock
+ f.dict.init(maxMatchOffset, nil)
return &f
}
// NewReaderDict is like NewReader but initializes the reader
-// with a preset dictionary. The returned Reader behaves as if
+// with a preset dictionary. The returned Reader behaves as if
// the uncompressed data stream started with the given dictionary,
-// which has already been read. NewReaderDict is typically used
+// which has already been read. NewReaderDict is typically used
// to read data compressed by NewWriterDict.
//
// The ReadCloser returned by NewReader also implements Resetter.
func NewReaderDict(r io.Reader, dict []byte) io.ReadCloser {
+ fixedHuffmanDecoderInit()
+
var f decompressor
f.r = makeReader(r)
- f.hist = new([maxHist]byte)
f.bits = new([maxNumLit + maxNumDist]int)
f.codebits = new([numCodes]int)
f.step = (*decompressor).nextBlock
- f.setDict(dict)
+ f.dict.init(maxMatchOffset, dict)
return &f
}
diff --git a/vendor/github.com/klauspost/compress/flate/snappy.go b/vendor/github.com/klauspost/compress/flate/snappy.go
index 78199380d18..d853320a758 100644
--- a/vendor/github.com/klauspost/compress/flate/snappy.go
+++ b/vendor/github.com/klauspost/compress/flate/snappy.go
@@ -5,16 +5,13 @@
package flate
-// We limit how far copy back-references can go, the same as the C++ code.
-const maxOffset = 1 << 15
-
// emitLiteral writes a literal chunk and returns the number of bytes written.
func emitLiteral(dst *tokens, lit []byte) {
- ol := dst.n
+ ol := int(dst.n)
for i, v := range lit {
- dst.tokens[i+ol] = token(v)
+ dst.tokens[(i+ol)&maxStoreBlockSize] = token(v)
}
- dst.n += len(lit)
+ dst.n += uint16(len(lit))
}
// emitCopy writes a copy chunk and returns the number of bytes written.
@@ -23,75 +20,881 @@ func emitCopy(dst *tokens, offset, length int) {
dst.n++
}
-// snappyEncode uses Snappy-like compression, but stores as Huffman
-// blocks.
-func snappyEncode(dst *tokens, src []byte) {
- // Return early if src is short.
- if len(src) <= 4 {
- if len(src) != 0 {
- emitLiteral(dst, src)
- }
+type snappyEnc interface {
+ Encode(dst *tokens, src []byte)
+ Reset()
+}
+
+func newSnappy(level int) snappyEnc {
+ switch level {
+ case 1:
+ return &snappyL1{}
+ case 2:
+ return &snappyL2{snappyGen: snappyGen{cur: maxStoreBlockSize, prev: make([]byte, 0, maxStoreBlockSize)}}
+ case 3:
+ return &snappyL3{snappyGen: snappyGen{cur: maxStoreBlockSize, prev: make([]byte, 0, maxStoreBlockSize)}}
+ case 4:
+ return &snappyL4{snappyL3{snappyGen: snappyGen{cur: maxStoreBlockSize, prev: make([]byte, 0, maxStoreBlockSize)}}}
+ default:
+ panic("invalid level specified")
+ }
+}
+
+const (
+ tableBits = 14 // Bits used in the table
+ tableSize = 1 << tableBits // Size of the table
+ tableMask = tableSize - 1 // Mask for table indices. Redundant, but can eliminate bounds checks.
+ tableShift = 32 - tableBits // Right-shift to get the tableBits most significant bits of a uint32.
+ baseMatchOffset = 1 // The smallest match offset
+ baseMatchLength = 3 // The smallest match length per the RFC section 3.2.5
+ maxMatchOffset = 1 << 15 // The largest match offset
+)
+
+func load32(b []byte, i int) uint32 {
+ b = b[i : i+4 : len(b)] // Help the compiler eliminate bounds checks on the next line.
+ return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
+}
+
+func load64(b []byte, i int) uint64 {
+ b = b[i : i+8 : len(b)] // Help the compiler eliminate bounds checks on the next line.
+ 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 hash(u uint32) uint32 {
+ return (u * 0x1e35a7bd) >> tableShift
+}
+
+// snappyL1 encapsulates level 1 compression
+type snappyL1 struct{}
+
+func (e *snappyL1) Reset() {}
+
+func (e *snappyL1) Encode(dst *tokens, src []byte) {
+ const (
+ inputMargin = 16 - 1
+ minNonLiteralBlockSize = 1 + 1 + inputMargin
+ )
+
+ // This check isn't in the Snappy implementation, but there, the caller
+ // instead of the callee handles this case.
+ if len(src) < minNonLiteralBlockSize {
+ // We do not fill the token table.
+ // This will be picked up by caller.
+ dst.n = uint16(len(src))
return
}
- // Initialize the hash table. Its size ranges from 1<<8 to 1<<14 inclusive.
- const maxTableSize = 1 << 14
- shift, tableSize := uint(32-8), 1<<8
- for tableSize < maxTableSize && tableSize < len(src) {
- shift--
- tableSize *= 2
- }
- var table [maxTableSize]int
- var misses int
- // Iterate over the source bytes.
- var (
- s int // The iterator position.
- t int // The last position with the same hash as s.
- lit int // The start position of any pending literal bytes.
- )
- for s+3 < len(src) {
- // Update the hash table.
- b0, b1, b2, b3 := src[s], src[s+1], src[s+2], src[s+3]
- h := uint32(b0) | uint32(b1)<<8 | uint32(b2)<<16 | uint32(b3)<<24
- p := &table[(h*0x1e35a7bd)>>shift]
- // We need to to store values in [-1, inf) in table. To save
- // some initialization time, (re)use the table's zero value
- // and shift the values against this zero: add 1 on writes,
- // subtract 1 on reads.
- t, *p = *p-1, s+1
- // If t is invalid or src[s:s+4] differs from src[t:t+4], accumulate a literal byte.
- if t < 0 || s-t >= maxOffset || b0 != src[t] || b1 != src[t+1] || b2 != src[t+2] || b3 != src[t+3] {
- misses++
- // Skip 1 byte for 16 consecutive missed.
- s += 1 + (misses >> 4)
- continue
- }
- // Otherwise, we have a match. First, emit any pending literal bytes.
- if lit != s {
- emitLiteral(dst, src[lit:s])
- }
- // Extend the match to be as long as possible.
- s0 := s
- s1 := s + maxMatchLength
- if s1 > len(src) {
- s1 = len(src)
- }
- s, t = s+4, t+4
- for s < s1 && src[s] == src[t] {
- s++
- t++
- }
- misses = 0
- // Emit the copied bytes.
- // inlined: emitCopy(dst, s-t, s-s0)
+ // Initialize the hash table.
+ //
+ // The table element type is uint16, as s < sLimit and sLimit < len(src)
+ // and len(src) <= maxStoreBlockSize and maxStoreBlockSize == 65535.
+ var table [tableSize]uint16
- dst.tokens[dst.n] = matchToken(uint32(s-s0-3), uint32(s-t-minOffsetSize))
- dst.n++
- lit = s
+ // sLimit is when to stop looking for offset/length copies. The inputMargin
+ // lets us use a fast path for emitLiteral in the main loop, while we are
+ // looking for copies.
+ sLimit := len(src) - inputMargin
+
+ // nextEmit is where in src the next emitLiteral should start from.
+ nextEmit := 0
+
+ // The encoded form must start with a literal, as there are no previous
+ // bytes to copy, so we start looking for hash matches at s == 1.
+ s := 1
+ nextHash := hash(load32(src, s))
+
+ for {
+ // Copied from the C++ snappy implementation:
+ //
+ // Heuristic match skipping: If 32 bytes are scanned with no matches
+ // found, start looking only at every other byte. If 32 more bytes are
+ // scanned (or skipped), look at every third byte, etc.. When a match
+ // is found, immediately go back to looking at every byte. This is a
+ // small loss (~5% performance, ~0.1% density) for compressible data
+ // due to more bookkeeping, but for non-compressible data (such as
+ // JPEG) it's a huge win since the compressor quickly "realizes" the
+ // data is incompressible and doesn't bother looking for matches
+ // everywhere.
+ //
+ // The "skip" variable keeps track of how many bytes there are since
+ // the last match; dividing it by 32 (ie. right-shifting by five) gives
+ // the number of bytes to move ahead for each iteration.
+ skip := 32
+
+ nextS := s
+ candidate := 0
+ for {
+ s = nextS
+ bytesBetweenHashLookups := skip >> 5
+ nextS = s + bytesBetweenHashLookups
+ skip += bytesBetweenHashLookups
+ if nextS > sLimit {
+ goto emitRemainder
+ }
+ candidate = int(table[nextHash&tableMask])
+ table[nextHash&tableMask] = uint16(s)
+ nextHash = hash(load32(src, nextS))
+ if s-candidate <= maxMatchOffset && load32(src, s) == load32(src, candidate) {
+ break
+ }
+ }
+
+ // A 4-byte match has been found. We'll later see if more than 4 bytes
+ // match. But, prior to the match, src[nextEmit:s] are unmatched. Emit
+ // them as literal bytes.
+ emitLiteral(dst, src[nextEmit:s])
+
+ // Call emitCopy, and then see if another emitCopy could be our next
+ // move. Repeat until we find no match for the input immediately after
+ // what was consumed by the last emitCopy call.
+ //
+ // If we exit this loop normally then we need to call emitLiteral next,
+ // though we don't yet know how big the literal will be. We handle that
+ // by proceeding to the next iteration of the main loop. We also can
+ // exit this loop via goto if we get close to exhausting the input.
+ for {
+ // Invariant: we have a 4-byte match at s, and no need to emit any
+ // literal bytes prior to s.
+ base := s
+
+ // Extend the 4-byte match as long as possible.
+ //
+ // This is an inlined version of Snappy's:
+ // s = extendMatch(src, candidate+4, s+4)
+ s += 4
+ s1 := base + maxMatchLength
+ if s1 > len(src) {
+ s1 = len(src)
+ }
+ a := src[s:s1]
+ b := src[candidate+4:]
+ b = b[:len(a)]
+ l := len(a)
+ for i := range a {
+ if a[i] != b[i] {
+ l = i
+ break
+ }
+ }
+ s += l
+
+ // matchToken is flate's equivalent of Snappy's emitCopy.
+ dst.tokens[dst.n] = matchToken(uint32(s-base-baseMatchLength), uint32(base-candidate-baseMatchOffset))
+ dst.n++
+ nextEmit = s
+ if s >= sLimit {
+ goto emitRemainder
+ }
+
+ // We could immediately start working at s now, but to improve
+ // compression we first update the hash table at s-1 and at s. If
+ // another emitCopy is not our next move, also calculate nextHash
+ // at s+1. At least on GOARCH=amd64, these three hash calculations
+ // are faster as one load64 call (with some shifts) instead of
+ // three load32 calls.
+ x := load64(src, s-1)
+ prevHash := hash(uint32(x >> 0))
+ table[prevHash&tableMask] = uint16(s - 1)
+ currHash := hash(uint32(x >> 8))
+ candidate = int(table[currHash&tableMask])
+ table[currHash&tableMask] = uint16(s)
+ if s-candidate > maxMatchOffset || uint32(x>>8) != load32(src, candidate) {
+ nextHash = hash(uint32(x >> 16))
+ s++
+ break
+ }
+ }
}
- // Emit any final pending literal bytes and return.
- if lit != len(src) {
- emitLiteral(dst, src[lit:])
+emitRemainder:
+ if nextEmit < len(src) {
+ emitLiteral(dst, src[nextEmit:])
}
}
+
+type tableEntry struct {
+ val uint32
+ offset int32
+}
+
+func load3232(b []byte, i int32) uint32 {
+ b = b[i : i+4 : len(b)] // Help the compiler eliminate bounds checks on the next line.
+ return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
+}
+
+func load6432(b []byte, i int32) uint64 {
+ b = b[i : i+8 : len(b)] // Help the compiler eliminate bounds checks on the next line.
+ 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
+}
+
+// snappyGen maintains the table for matches,
+// and the previous byte block for level 2.
+// This is the generic implementation.
+type snappyGen struct {
+ prev []byte
+ cur int32
+}
+
+// snappyGen maintains the table for matches,
+// and the previous byte block for level 2.
+// This is the generic implementation.
+type snappyL2 struct {
+ snappyGen
+ table [tableSize]tableEntry
+}
+
+// EncodeL2 uses a similar algorithm to level 1, but is capable
+// of matching across blocks giving better compression at a small slowdown.
+func (e *snappyL2) Encode(dst *tokens, src []byte) {
+ const (
+ inputMargin = 8 - 1
+ minNonLiteralBlockSize = 1 + 1 + inputMargin
+ )
+
+ // Protect against e.cur wraparound.
+ if e.cur > 1<<30 {
+ for i := range e.table[:] {
+ e.table[i] = tableEntry{}
+ }
+ e.cur = maxStoreBlockSize
+ }
+
+ // This check isn't in the Snappy implementation, but there, the caller
+ // instead of the callee handles this case.
+ if len(src) < minNonLiteralBlockSize {
+ // We do not fill the token table.
+ // This will be picked up by caller.
+ dst.n = uint16(len(src))
+ e.cur += maxStoreBlockSize
+ e.prev = e.prev[:0]
+ return
+ }
+
+ // sLimit is when to stop looking for offset/length copies. The inputMargin
+ // lets us use a fast path for emitLiteral in the main loop, while we are
+ // looking for copies.
+ sLimit := int32(len(src) - inputMargin)
+
+ // nextEmit is where in src the next emitLiteral should start from.
+ nextEmit := int32(0)
+ s := int32(0)
+ cv := load3232(src, s)
+ nextHash := hash(cv)
+
+ for {
+ // Copied from the C++ snappy implementation:
+ //
+ // Heuristic match skipping: If 32 bytes are scanned with no matches
+ // found, start looking only at every other byte. If 32 more bytes are
+ // scanned (or skipped), look at every third byte, etc.. When a match
+ // is found, immediately go back to looking at every byte. This is a
+ // small loss (~5% performance, ~0.1% density) for compressible data
+ // due to more bookkeeping, but for non-compressible data (such as
+ // JPEG) it's a huge win since the compressor quickly "realizes" the
+ // data is incompressible and doesn't bother looking for matches
+ // everywhere.
+ //
+ // The "skip" variable keeps track of how many bytes there are since
+ // the last match; dividing it by 32 (ie. right-shifting by five) gives
+ // the number of bytes to move ahead for each iteration.
+ skip := int32(32)
+
+ nextS := s
+ var candidate tableEntry
+ for {
+ s = nextS
+ bytesBetweenHashLookups := skip >> 5
+ nextS = s + bytesBetweenHashLookups
+ skip += bytesBetweenHashLookups
+ if nextS > sLimit {
+ goto emitRemainder
+ }
+ candidate = e.table[nextHash&tableMask]
+ now := load3232(src, nextS)
+ e.table[nextHash&tableMask] = tableEntry{offset: s + e.cur, val: cv}
+ nextHash = hash(now)
+
+ offset := s - (candidate.offset - e.cur)
+ if offset > maxMatchOffset || cv != candidate.val {
+ // Out of range or not matched.
+ cv = now
+ continue
+ }
+ break
+ }
+
+ // A 4-byte match has been found. We'll later see if more than 4 bytes
+ // match. But, prior to the match, src[nextEmit:s] are unmatched. Emit
+ // them as literal bytes.
+ emitLiteral(dst, src[nextEmit:s])
+
+ // Call emitCopy, and then see if another emitCopy could be our next
+ // move. Repeat until we find no match for the input immediately after
+ // what was consumed by the last emitCopy call.
+ //
+ // If we exit this loop normally then we need to call emitLiteral next,
+ // though we don't yet know how big the literal will be. We handle that
+ // by proceeding to the next iteration of the main loop. We also can
+ // exit this loop via goto if we get close to exhausting the input.
+ for {
+ // Invariant: we have a 4-byte match at s, and no need to emit any
+ // literal bytes prior to s.
+
+ // Extend the 4-byte match as long as possible.
+ //
+ s += 4
+ t := candidate.offset - e.cur + 4
+ l := e.matchlen(s, t, src)
+
+ // matchToken is flate's equivalent of Snappy's emitCopy. (length,offset)
+ dst.tokens[dst.n] = matchToken(uint32(l+4-baseMatchLength), uint32(s-t-baseMatchOffset))
+ dst.n++
+ s += l
+ nextEmit = s
+ if s >= sLimit {
+ t += l
+ // Index first pair after match end.
+ if int(t+4) < len(src) && t > 0 {
+ cv := load3232(src, t)
+ e.table[hash(cv)&tableMask] = tableEntry{offset: t + e.cur, val: cv}
+ }
+ goto emitRemainder
+ }
+
+ // We could immediately start working at s now, but to improve
+ // compression we first update the hash table at s-1 and at s. If
+ // another emitCopy is not our next move, also calculate nextHash
+ // at s+1. At least on GOARCH=amd64, these three hash calculations
+ // are faster as one load64 call (with some shifts) instead of
+ // three load32 calls.
+ x := load6432(src, s-1)
+ prevHash := hash(uint32(x))
+ e.table[prevHash&tableMask] = tableEntry{offset: e.cur + s - 1, val: uint32(x)}
+ x >>= 8
+ currHash := hash(uint32(x))
+ candidate = e.table[currHash&tableMask]
+ e.table[currHash&tableMask] = tableEntry{offset: e.cur + s, val: uint32(x)}
+
+ offset := s - (candidate.offset - e.cur)
+ if offset > maxMatchOffset || uint32(x) != candidate.val {
+ cv = uint32(x >> 8)
+ nextHash = hash(cv)
+ s++
+ break
+ }
+ }
+ }
+
+emitRemainder:
+ if int(nextEmit) < len(src) {
+ emitLiteral(dst, src[nextEmit:])
+ }
+ e.cur += int32(len(src))
+ e.prev = e.prev[:len(src)]
+ copy(e.prev, src)
+}
+
+type tableEntryPrev struct {
+ Cur tableEntry
+ Prev tableEntry
+}
+
+// snappyL3
+type snappyL3 struct {
+ snappyGen
+ table [tableSize]tableEntryPrev
+}
+
+// Encode uses a similar algorithm to level 2, will check up to two candidates.
+func (e *snappyL3) Encode(dst *tokens, src []byte) {
+ const (
+ inputMargin = 8 - 1
+ minNonLiteralBlockSize = 1 + 1 + inputMargin
+ )
+
+ // Protect against e.cur wraparound.
+ if e.cur > 1<<30 {
+ for i := range e.table[:] {
+ e.table[i] = tableEntryPrev{}
+ }
+ e.snappyGen = snappyGen{cur: maxStoreBlockSize, prev: e.prev[:0]}
+ }
+
+ // This check isn't in the Snappy implementation, but there, the caller
+ // instead of the callee handles this case.
+ if len(src) < minNonLiteralBlockSize {
+ // We do not fill the token table.
+ // This will be picked up by caller.
+ dst.n = uint16(len(src))
+ e.cur += maxStoreBlockSize
+ e.prev = e.prev[:0]
+ return
+ }
+
+ // sLimit is when to stop looking for offset/length copies. The inputMargin
+ // lets us use a fast path for emitLiteral in the main loop, while we are
+ // looking for copies.
+ sLimit := int32(len(src) - inputMargin)
+
+ // nextEmit is where in src the next emitLiteral should start from.
+ nextEmit := int32(0)
+ s := int32(0)
+ cv := load3232(src, s)
+ nextHash := hash(cv)
+
+ for {
+ // Copied from the C++ snappy implementation:
+ //
+ // Heuristic match skipping: If 32 bytes are scanned with no matches
+ // found, start looking only at every other byte. If 32 more bytes are
+ // scanned (or skipped), look at every third byte, etc.. When a match
+ // is found, immediately go back to looking at every byte. This is a
+ // small loss (~5% performance, ~0.1% density) for compressible data
+ // due to more bookkeeping, but for non-compressible data (such as
+ // JPEG) it's a huge win since the compressor quickly "realizes" the
+ // data is incompressible and doesn't bother looking for matches
+ // everywhere.
+ //
+ // The "skip" variable keeps track of how many bytes there are since
+ // the last match; dividing it by 32 (ie. right-shifting by five) gives
+ // the number of bytes to move ahead for each iteration.
+ skip := int32(32)
+
+ nextS := s
+ var candidate tableEntry
+ for {
+ s = nextS
+ bytesBetweenHashLookups := skip >> 5
+ nextS = s + bytesBetweenHashLookups
+ skip += bytesBetweenHashLookups
+ if nextS > sLimit {
+ goto emitRemainder
+ }
+ candidates := e.table[nextHash&tableMask]
+ now := load3232(src, nextS)
+ e.table[nextHash&tableMask] = tableEntryPrev{Prev: candidates.Cur, Cur: tableEntry{offset: s + e.cur, val: cv}}
+ nextHash = hash(now)
+
+ // Check both candidates
+ candidate = candidates.Cur
+ if cv == candidate.val {
+ offset := s - (candidate.offset - e.cur)
+ if offset <= maxMatchOffset {
+ break
+ }
+ } else {
+ // We only check if value mismatches.
+ // Offset will always be invalid in other cases.
+ candidate = candidates.Prev
+ if cv == candidate.val {
+ offset := s - (candidate.offset - e.cur)
+ if offset <= maxMatchOffset {
+ break
+ }
+ }
+ }
+ cv = now
+ }
+
+ // A 4-byte match has been found. We'll later see if more than 4 bytes
+ // match. But, prior to the match, src[nextEmit:s] are unmatched. Emit
+ // them as literal bytes.
+ emitLiteral(dst, src[nextEmit:s])
+
+ // Call emitCopy, and then see if another emitCopy could be our next
+ // move. Repeat until we find no match for the input immediately after
+ // what was consumed by the last emitCopy call.
+ //
+ // If we exit this loop normally then we need to call emitLiteral next,
+ // though we don't yet know how big the literal will be. We handle that
+ // by proceeding to the next iteration of the main loop. We also can
+ // exit this loop via goto if we get close to exhausting the input.
+ for {
+ // Invariant: we have a 4-byte match at s, and no need to emit any
+ // literal bytes prior to s.
+
+ // Extend the 4-byte match as long as possible.
+ //
+ s += 4
+ t := candidate.offset - e.cur + 4
+ l := e.matchlen(s, t, src)
+
+ // matchToken is flate's equivalent of Snappy's emitCopy. (length,offset)
+ dst.tokens[dst.n] = matchToken(uint32(l+4-baseMatchLength), uint32(s-t-baseMatchOffset))
+ dst.n++
+ s += l
+ nextEmit = s
+ if s >= sLimit {
+ t += l
+ // Index first pair after match end.
+ if int(t+4) < len(src) && t > 0 {
+ cv := load3232(src, t)
+ nextHash = hash(cv)
+ e.table[nextHash&tableMask] = tableEntryPrev{
+ Prev: e.table[nextHash&tableMask].Cur,
+ Cur: tableEntry{offset: e.cur + t, val: cv},
+ }
+ }
+ goto emitRemainder
+ }
+
+ // We could immediately start working at s now, but to improve
+ // compression we first update the hash table at s-3 to s. If
+ // another emitCopy is not our next move, also calculate nextHash
+ // at s+1. At least on GOARCH=amd64, these three hash calculations
+ // are faster as one load64 call (with some shifts) instead of
+ // three load32 calls.
+ x := load6432(src, s-3)
+ prevHash := hash(uint32(x))
+ e.table[prevHash&tableMask] = tableEntryPrev{
+ Prev: e.table[prevHash&tableMask].Cur,
+ Cur: tableEntry{offset: e.cur + s - 3, val: uint32(x)},
+ }
+ x >>= 8
+ prevHash = hash(uint32(x))
+
+ e.table[prevHash&tableMask] = tableEntryPrev{
+ Prev: e.table[prevHash&tableMask].Cur,
+ Cur: tableEntry{offset: e.cur + s - 2, val: uint32(x)},
+ }
+ x >>= 8
+ prevHash = hash(uint32(x))
+
+ e.table[prevHash&tableMask] = tableEntryPrev{
+ Prev: e.table[prevHash&tableMask].Cur,
+ Cur: tableEntry{offset: e.cur + s - 1, val: uint32(x)},
+ }
+ x >>= 8
+ currHash := hash(uint32(x))
+ candidates := e.table[currHash&tableMask]
+ cv = uint32(x)
+ e.table[currHash&tableMask] = tableEntryPrev{
+ Prev: candidates.Cur,
+ Cur: tableEntry{offset: s + e.cur, val: cv},
+ }
+
+ // Check both candidates
+ candidate = candidates.Cur
+ if cv == candidate.val {
+ offset := s - (candidate.offset - e.cur)
+ if offset <= maxMatchOffset {
+ continue
+ }
+ } else {
+ // We only check if value mismatches.
+ // Offset will always be invalid in other cases.
+ candidate = candidates.Prev
+ if cv == candidate.val {
+ offset := s - (candidate.offset - e.cur)
+ if offset <= maxMatchOffset {
+ continue
+ }
+ }
+ }
+ cv = uint32(x >> 8)
+ nextHash = hash(cv)
+ s++
+ break
+ }
+ }
+
+emitRemainder:
+ if int(nextEmit) < len(src) {
+ emitLiteral(dst, src[nextEmit:])
+ }
+ e.cur += int32(len(src))
+ e.prev = e.prev[:len(src)]
+ copy(e.prev, src)
+}
+
+// snappyL4
+type snappyL4 struct {
+ snappyL3
+}
+
+// Encode uses a similar algorithm to level 3,
+// but will check up to two candidates if first isn't long enough.
+func (e *snappyL4) Encode(dst *tokens, src []byte) {
+ const (
+ inputMargin = 8 - 3
+ minNonLiteralBlockSize = 1 + 1 + inputMargin
+ matchLenGood = 12
+ )
+
+ // Protect against e.cur wraparound.
+ if e.cur > 1<<30 {
+ for i := range e.table[:] {
+ e.table[i] = tableEntryPrev{}
+ }
+ e.snappyGen = snappyGen{cur: maxStoreBlockSize, prev: e.prev[:0]}
+ }
+
+ // This check isn't in the Snappy implementation, but there, the caller
+ // instead of the callee handles this case.
+ if len(src) < minNonLiteralBlockSize {
+ // We do not fill the token table.
+ // This will be picked up by caller.
+ dst.n = uint16(len(src))
+ e.cur += maxStoreBlockSize
+ e.prev = e.prev[:0]
+ return
+ }
+
+ // sLimit is when to stop looking for offset/length copies. The inputMargin
+ // lets us use a fast path for emitLiteral in the main loop, while we are
+ // looking for copies.
+ sLimit := int32(len(src) - inputMargin)
+
+ // nextEmit is where in src the next emitLiteral should start from.
+ nextEmit := int32(0)
+ s := int32(0)
+ cv := load3232(src, s)
+ nextHash := hash(cv)
+
+ for {
+ // Copied from the C++ snappy implementation:
+ //
+ // Heuristic match skipping: If 32 bytes are scanned with no matches
+ // found, start looking only at every other byte. If 32 more bytes are
+ // scanned (or skipped), look at every third byte, etc.. When a match
+ // is found, immediately go back to looking at every byte. This is a
+ // small loss (~5% performance, ~0.1% density) for compressible data
+ // due to more bookkeeping, but for non-compressible data (such as
+ // JPEG) it's a huge win since the compressor quickly "realizes" the
+ // data is incompressible and doesn't bother looking for matches
+ // everywhere.
+ //
+ // The "skip" variable keeps track of how many bytes there are since
+ // the last match; dividing it by 32 (ie. right-shifting by five) gives
+ // the number of bytes to move ahead for each iteration.
+ skip := int32(32)
+
+ nextS := s
+ var candidate tableEntry
+ var candidateAlt tableEntry
+ for {
+ s = nextS
+ bytesBetweenHashLookups := skip >> 5
+ nextS = s + bytesBetweenHashLookups
+ skip += bytesBetweenHashLookups
+ if nextS > sLimit {
+ goto emitRemainder
+ }
+ candidates := e.table[nextHash&tableMask]
+ now := load3232(src, nextS)
+ e.table[nextHash&tableMask] = tableEntryPrev{Prev: candidates.Cur, Cur: tableEntry{offset: s + e.cur, val: cv}}
+ nextHash = hash(now)
+
+ // Check both candidates
+ candidate = candidates.Cur
+ if cv == candidate.val {
+ offset := s - (candidate.offset - e.cur)
+ if offset < maxMatchOffset {
+ offset = s - (candidates.Prev.offset - e.cur)
+ if cv == candidates.Prev.val && offset < maxMatchOffset {
+ candidateAlt = candidates.Prev
+ }
+ break
+ }
+ } else {
+ // We only check if value mismatches.
+ // Offset will always be invalid in other cases.
+ candidate = candidates.Prev
+ if cv == candidate.val {
+ offset := s - (candidate.offset - e.cur)
+ if offset < maxMatchOffset {
+ break
+ }
+ }
+ }
+ cv = now
+ }
+
+ // A 4-byte match has been found. We'll later see if more than 4 bytes
+ // match. But, prior to the match, src[nextEmit:s] are unmatched. Emit
+ // them as literal bytes.
+ emitLiteral(dst, src[nextEmit:s])
+
+ // Call emitCopy, and then see if another emitCopy could be our next
+ // move. Repeat until we find no match for the input immediately after
+ // what was consumed by the last emitCopy call.
+ //
+ // If we exit this loop normally then we need to call emitLiteral next,
+ // though we don't yet know how big the literal will be. We handle that
+ // by proceeding to the next iteration of the main loop. We also can
+ // exit this loop via goto if we get close to exhausting the input.
+ for {
+ // Invariant: we have a 4-byte match at s, and no need to emit any
+ // literal bytes prior to s.
+
+ // Extend the 4-byte match as long as possible.
+ //
+ s += 4
+ t := candidate.offset - e.cur + 4
+ l := e.matchlen(s, t, src)
+ // Try alternative candidate if match length < matchLenGood.
+ if l < matchLenGood-4 && candidateAlt.offset != 0 {
+ t2 := candidateAlt.offset - e.cur + 4
+ l2 := e.matchlen(s, t2, src)
+ if l2 > l {
+ l = l2
+ t = t2
+ }
+ }
+ // matchToken is flate's equivalent of Snappy's emitCopy. (length,offset)
+ dst.tokens[dst.n] = matchToken(uint32(l+4-baseMatchLength), uint32(s-t-baseMatchOffset))
+ dst.n++
+ s += l
+ nextEmit = s
+ if s >= sLimit {
+ t += l
+ // Index first pair after match end.
+ if int(t+4) < len(src) && t > 0 {
+ cv := load3232(src, t)
+ nextHash = hash(cv)
+ e.table[nextHash&tableMask] = tableEntryPrev{
+ Prev: e.table[nextHash&tableMask].Cur,
+ Cur: tableEntry{offset: e.cur + t, val: cv},
+ }
+ }
+ goto emitRemainder
+ }
+
+ // We could immediately start working at s now, but to improve
+ // compression we first update the hash table at s-3 to s. If
+ // another emitCopy is not our next move, also calculate nextHash
+ // at s+1. At least on GOARCH=amd64, these three hash calculations
+ // are faster as one load64 call (with some shifts) instead of
+ // three load32 calls.
+ x := load6432(src, s-3)
+ prevHash := hash(uint32(x))
+ e.table[prevHash&tableMask] = tableEntryPrev{
+ Prev: e.table[prevHash&tableMask].Cur,
+ Cur: tableEntry{offset: e.cur + s - 3, val: uint32(x)},
+ }
+ x >>= 8
+ prevHash = hash(uint32(x))
+
+ e.table[prevHash&tableMask] = tableEntryPrev{
+ Prev: e.table[prevHash&tableMask].Cur,
+ Cur: tableEntry{offset: e.cur + s - 2, val: uint32(x)},
+ }
+ x >>= 8
+ prevHash = hash(uint32(x))
+
+ e.table[prevHash&tableMask] = tableEntryPrev{
+ Prev: e.table[prevHash&tableMask].Cur,
+ Cur: tableEntry{offset: e.cur + s - 1, val: uint32(x)},
+ }
+ x >>= 8
+ currHash := hash(uint32(x))
+ candidates := e.table[currHash&tableMask]
+ cv = uint32(x)
+ e.table[currHash&tableMask] = tableEntryPrev{
+ Prev: candidates.Cur,
+ Cur: tableEntry{offset: s + e.cur, val: cv},
+ }
+
+ // Check both candidates
+ candidate = candidates.Cur
+ candidateAlt = tableEntry{}
+ if cv == candidate.val {
+ offset := s - (candidate.offset - e.cur)
+ if offset <= maxMatchOffset {
+ offset = s - (candidates.Prev.offset - e.cur)
+ if cv == candidates.Prev.val && offset <= maxMatchOffset {
+ candidateAlt = candidates.Prev
+ }
+ continue
+ }
+ } else {
+ // We only check if value mismatches.
+ // Offset will always be invalid in other cases.
+ candidate = candidates.Prev
+ if cv == candidate.val {
+ offset := s - (candidate.offset - e.cur)
+ if offset <= maxMatchOffset {
+ continue
+ }
+ }
+ }
+ cv = uint32(x >> 8)
+ nextHash = hash(cv)
+ s++
+ break
+ }
+ }
+
+emitRemainder:
+ if int(nextEmit) < len(src) {
+ emitLiteral(dst, src[nextEmit:])
+ }
+ e.cur += int32(len(src))
+ e.prev = e.prev[:len(src)]
+ copy(e.prev, src)
+}
+
+func (e *snappyGen) matchlen(s, t int32, src []byte) int32 {
+ s1 := int(s) + maxMatchLength - 4
+ if s1 > len(src) {
+ s1 = len(src)
+ }
+
+ // If we are inside the current block
+ if t >= 0 {
+ b := src[t:]
+ a := src[s:s1]
+ b = b[:len(a)]
+ // Extend the match to be as long as possible.
+ for i := range a {
+ if a[i] != b[i] {
+ return int32(i)
+ }
+ }
+ return int32(len(a))
+ }
+
+ // We found a match in the previous block.
+ tp := int32(len(e.prev)) + t
+ if tp < 0 {
+ return 0
+ }
+
+ // Extend the match to be as long as possible.
+ a := src[s:s1]
+ b := e.prev[tp:]
+ if len(b) > len(a) {
+ b = b[:len(a)]
+ }
+ a = a[:len(b)]
+ for i := range b {
+ if a[i] != b[i] {
+ return int32(i)
+ }
+ }
+
+ // If we reached our limit, we matched everything we are
+ // allowed to in the previous block and we return.
+ n := int32(len(b))
+ if int(s+n) == s1 {
+ return n
+ }
+
+ // Continue looking for more matches in the current block.
+ a = src[s+n : s1]
+ b = src[:len(a)]
+ for i := range a {
+ if a[i] != b[i] {
+ return int32(i) + n
+ }
+ }
+ return int32(len(a)) + n
+}
+
+// Reset the encoding table.
+func (e *snappyGen) Reset() {
+ e.prev = e.prev[:0]
+ e.cur += maxMatchOffset
+}
diff --git a/vendor/github.com/klauspost/compress/flate/token.go b/vendor/github.com/klauspost/compress/flate/token.go
index 94fa5eb93ab..4f275ea61df 100644
--- a/vendor/github.com/klauspost/compress/flate/token.go
+++ b/vendor/github.com/klauspost/compress/flate/token.go
@@ -4,6 +4,8 @@
package flate
+import "fmt"
+
const (
// 2 bits: type 0 = literal 1=EOF 2=Match 3=Unused
// 8 bits: xlength = length - MIN_MATCH_LENGTH
@@ -68,8 +70,8 @@ var offsetCodes = [...]uint32{
type token uint32
type tokens struct {
- tokens []token
- n int
+ tokens [maxStoreBlockSize + 1]token
+ n uint16 // Must be able to contain maxStoreBlockSize
}
// Convert a literal into a literal token.
@@ -80,6 +82,14 @@ func matchToken(xlength uint32, xoffset uint32) token {
return token(matchType + xlength< maxMatchLength || xoffset > maxMatchOffset {
+ panic(fmt.Sprintf("Invalid match: len: %d, offset: %d\n", xlength, xoffset))
+ return token(matchType)
+ }
+ return token(matchType + xlength<= len(z.buf) {
return "", ErrHeader
@@ -146,147 +151,142 @@ func (z *Reader) readString() (string, error) {
return "", err
}
if z.buf[i] > 0x7f {
- needconv = true
+ needConv = true
}
if z.buf[i] == 0 {
- // GZIP (RFC 1952) specifies that strings are NUL-terminated ISO 8859-1 (Latin-1).
- if needconv {
+ // Digest covers the NUL terminator.
+ z.digest = crc32.Update(z.digest, crc32.IEEETable, z.buf[:i+1])
+
+ // Strings are ISO 8859-1, Latin-1 (RFC 1952, section 2.3.1).
+ if needConv {
s := make([]rune, 0, i)
- for _, v := range z.buf[0:i] {
+ for _, v := range z.buf[:i] {
s = append(s, rune(v))
}
return string(s), nil
}
- return string(z.buf[0:i]), nil
+ return string(z.buf[:i]), nil
}
}
}
-func (z *Reader) read2() (uint32, error) {
- _, err := io.ReadFull(z.r, z.buf[0:2])
- if err != nil {
- return 0, err
- }
- return uint32(z.buf[0]) | uint32(z.buf[1])<<8, nil
-}
-
-func (z *Reader) readHeader(save bool) error {
- _, err := io.ReadFull(z.r, z.buf[0:10])
- if err != nil {
- return err
+// readHeader reads the GZIP header according to section 2.3.1.
+// This method does not set z.err.
+func (z *Reader) readHeader() (hdr Header, err error) {
+ if _, err = io.ReadFull(z.r, z.buf[:10]); err != nil {
+ // RFC 1952, section 2.2, says the following:
+ // A gzip file consists of a series of "members" (compressed data sets).
+ //
+ // Other than this, the specification does not clarify whether a
+ // "series" is defined as "one or more" or "zero or more". To err on the
+ // side of caution, Go interprets this to mean "zero or more".
+ // Thus, it is okay to return io.EOF here.
+ return hdr, err
}
if z.buf[0] != gzipID1 || z.buf[1] != gzipID2 || z.buf[2] != gzipDeflate {
- return ErrHeader
+ return hdr, ErrHeader
}
- z.flg = z.buf[3]
- if save {
- z.ModTime = time.Unix(int64(get4(z.buf[4:8])), 0)
- // z.buf[8] is xfl, ignored
- z.OS = z.buf[9]
- }
- z.digest.Reset()
- z.digest.Write(z.buf[0:10])
+ flg := z.buf[3]
+ hdr.ModTime = time.Unix(int64(le.Uint32(z.buf[4:8])), 0)
+ // z.buf[8] is XFL and is currently ignored.
+ hdr.OS = z.buf[9]
+ z.digest = crc32.ChecksumIEEE(z.buf[:10])
- if z.flg&flagExtra != 0 {
- n, err := z.read2()
- if err != nil {
- return err
+ if flg&flagExtra != 0 {
+ if _, err = io.ReadFull(z.r, z.buf[:2]); err != nil {
+ return hdr, noEOF(err)
}
- data := make([]byte, n)
+ z.digest = crc32.Update(z.digest, crc32.IEEETable, z.buf[:2])
+ data := make([]byte, le.Uint16(z.buf[:2]))
if _, err = io.ReadFull(z.r, data); err != nil {
- return err
- }
- if save {
- z.Extra = data
+ return hdr, noEOF(err)
}
+ z.digest = crc32.Update(z.digest, crc32.IEEETable, data)
+ hdr.Extra = data
}
var s string
- if z.flg&flagName != 0 {
+ if flg&flagName != 0 {
if s, err = z.readString(); err != nil {
- return err
- }
- if save {
- z.Name = s
+ return hdr, err
}
+ hdr.Name = s
}
- if z.flg&flagComment != 0 {
+ if flg&flagComment != 0 {
if s, err = z.readString(); err != nil {
- return err
+ return hdr, err
}
- if save {
- z.Comment = s
+ hdr.Comment = s
+ }
+
+ if flg&flagHdrCrc != 0 {
+ if _, err = io.ReadFull(z.r, z.buf[:2]); err != nil {
+ return hdr, noEOF(err)
+ }
+ digest := le.Uint16(z.buf[:2])
+ if digest != uint16(z.digest) {
+ return hdr, ErrHeader
}
}
- if z.flg&flagHdrCrc != 0 {
- n, err := z.read2()
- if err != nil {
- return err
- }
- sum := z.digest.Sum32() & 0xFFFF
- if n != sum {
- return ErrHeader
- }
- }
-
- z.digest.Reset()
+ z.digest = 0
if z.decompressor == nil {
z.decompressor = flate.NewReader(z.r)
} else {
z.decompressor.(flate.Resetter).Reset(z.r, nil)
}
- return nil
+ return hdr, nil
}
+// Read implements io.Reader, reading uncompressed bytes from its underlying Reader.
func (z *Reader) Read(p []byte) (n int, err error) {
if z.err != nil {
return 0, z.err
}
- if len(p) == 0 {
- return 0, nil
- }
- n, err = z.decompressor.Read(p)
- z.digest.Write(p[0:n])
+ n, z.err = z.decompressor.Read(p)
+ z.digest = crc32.Update(z.digest, crc32.IEEETable, p[:n])
z.size += uint32(n)
- if n != 0 || err != io.EOF {
- z.err = err
- return
+ if z.err != io.EOF {
+ // In the normal case we return here.
+ return n, z.err
}
- // Finished file; check checksum + size.
- if _, err := io.ReadFull(z.r, z.buf[0:8]); err != nil {
- z.err = err
- return 0, err
+ // Finished file; check checksum and size.
+ if _, err := io.ReadFull(z.r, z.buf[:8]); err != nil {
+ z.err = noEOF(err)
+ return n, z.err
}
- crc32, isize := get4(z.buf[0:4]), get4(z.buf[4:8])
- sum := z.digest.Sum32()
- if sum != crc32 || isize != z.size {
+ digest := le.Uint32(z.buf[:4])
+ size := le.Uint32(z.buf[4:8])
+ if digest != z.digest || size != z.size {
z.err = ErrChecksum
- return 0, z.err
+ return n, z.err
}
+ z.digest, z.size = 0, 0
- // File is ok; is there another?
+ // File is ok; check if there is another.
if !z.multistream {
- return 0, io.EOF
+ return n, io.EOF
+ }
+ z.err = nil // Remove io.EOF
+
+ if _, z.err = z.readHeader(); z.err != nil {
+ return n, z.err
}
- if err = z.readHeader(false); err != nil {
- z.err = err
- return
+ // Read from next file, if necessary.
+ if n > 0 {
+ return n, nil
}
-
- // Yes. Reset and read from it.
- z.digest.Reset()
- z.size = 0
return z.Read(p)
}
// Support the io.WriteTo interface for io.Copy and friends.
func (z *Reader) WriteTo(w io.Writer) (int64, error) {
total := int64(0)
+ crcWriter := crc32.NewIEEE()
for {
if z.err != nil {
if z.err == io.EOF {
@@ -296,7 +296,7 @@ func (z *Reader) WriteTo(w io.Writer) (int64, error) {
}
// We write both to output and digest.
- mw := io.MultiWriter(w, z.digest)
+ mw := io.MultiWriter(w, crcWriter)
n, err := z.decompressor.(io.WriterTo).WriteTo(mw)
total += n
z.size += uint32(n)
@@ -307,36 +307,38 @@ func (z *Reader) WriteTo(w io.Writer) (int64, error) {
// Finished file; check checksum + size.
if _, err := io.ReadFull(z.r, z.buf[0:8]); err != nil {
- z.err = err
- return 0, err
- }
- crc32, isize := get4(z.buf[0:4]), get4(z.buf[4:8])
- sum := z.digest.Sum32()
- if sum != crc32 || isize != z.size {
- z.err = ErrChecksum
- return 0, z.err
- }
-
- // File is ok; is there another?
- if !z.multistream {
- return total, nil
- }
-
- err = z.readHeader(false)
- // There was not more
- if err == io.EOF {
- return total, nil
- }
- if err != nil {
+ if err == io.EOF {
+ err = io.ErrUnexpectedEOF
+ }
z.err = err
return total, err
}
+ z.digest = crcWriter.Sum32()
+ digest := le.Uint32(z.buf[:4])
+ size := le.Uint32(z.buf[4:8])
+ if digest != z.digest || size != z.size {
+ z.err = ErrChecksum
+ return total, z.err
+ }
+ z.digest, z.size = 0, 0
- // Yes. Reset and read from it.
- z.digest.Reset()
- z.size = 0
+ // File is ok; check if there is another.
+ if !z.multistream {
+ return total, nil
+ }
+ crcWriter.Reset()
+ z.err = nil // Remove io.EOF
+
+ if _, z.err = z.readHeader(); z.err != nil {
+ if z.err == io.EOF {
+ return total, nil
+ }
+ return total, z.err
+ }
}
}
// Close closes the Reader. It does not close the underlying io.Reader.
+// In order for the GZIP checksum to be verified, the reader must be
+// fully consumed until the io.EOF.
func (z *Reader) Close() error { return z.decompressor.Close() }
diff --git a/vendor/github.com/klauspost/compress/gzip/gzip.go b/vendor/github.com/klauspost/compress/gzip/gzip.go
index a590c883cd1..a0f3ed0fcf0 100644
--- a/vendor/github.com/klauspost/compress/gzip/gzip.go
+++ b/vendor/github.com/klauspost/compress/gzip/gzip.go
@@ -7,7 +7,6 @@ package gzip
import (
"errors"
"fmt"
- "hash"
"io"
"github.com/klauspost/compress/flate"
@@ -22,18 +21,19 @@ const (
BestCompression = flate.BestCompression
DefaultCompression = flate.DefaultCompression
ConstantCompression = flate.ConstantCompression
+ HuffmanOnly = flate.HuffmanOnly
)
// A Writer is an io.WriteCloser.
// Writes to a Writer are compressed and written to w.
type Writer struct {
- Header
+ Header // written at first call to Write, Flush, or Close
w io.Writer
level int
wroteHeader bool
compressor *flate.Writer
- digest hash.Hash32
- size uint32
+ digest uint32 // CRC-32, IEEE polynomial (section 8)
+ size uint32 // Uncompressed size (section 2.3.1)
closed bool
buf [10]byte
err error
@@ -46,10 +46,7 @@ type Writer struct {
// Writes may be buffered and not flushed until Close.
//
// Callers that wish to set the fields in Writer.Header must do so before
-// the first call to Write or Close. The Comment and Name header fields are
-// UTF-8 strings in Go, but the underlying format requires NUL-terminated ISO
-// 8859-1 (Latin-1). NUL or non-Latin-1 runes in those strings will lead to an
-// error on Write.
+// the first call to Write, Flush, or Close.
func NewWriter(w io.Writer) *Writer {
z, _ := NewWriterLevel(w, DefaultCompression)
return z
@@ -58,11 +55,11 @@ func NewWriter(w io.Writer) *Writer {
// NewWriterLevel is like NewWriter but specifies the compression level instead
// of assuming DefaultCompression.
//
-// The compression level can be ConstantCompression, DefaultCompression,
-// NoCompression, or any integer value between BestSpeed and BestCompression
-// inclusive. The error returned will be nil if the level is valid.
+// The compression level can be DefaultCompression, NoCompression, or any
+// integer value between BestSpeed and BestCompression inclusive. The error
+// returned will be nil if the level is valid.
func NewWriterLevel(w io.Writer, level int) (*Writer, error) {
- if level < ConstantCompression || level > BestCompression {
+ if level < HuffmanOnly || level > BestCompression {
return nil, fmt.Errorf("gzip: invalid compression level: %d", level)
}
z := new(Writer)
@@ -71,12 +68,6 @@ func NewWriterLevel(w io.Writer, level int) (*Writer, error) {
}
func (z *Writer) init(w io.Writer, level int) {
- digest := z.digest
- if digest != nil {
- digest.Reset()
- } else {
- digest = crc32.NewIEEE()
- }
compressor := z.compressor
if compressor != nil {
compressor.Reset(w)
@@ -87,7 +78,6 @@ func (z *Writer) init(w io.Writer, level int) {
},
w: w,
level: level,
- digest: digest,
compressor: compressor,
}
}
@@ -100,26 +90,13 @@ func (z *Writer) Reset(w io.Writer) {
z.init(w, z.level)
}
-// GZIP (RFC 1952) is little-endian, unlike ZLIB (RFC 1950).
-func put2(p []byte, v uint16) {
- p[0] = uint8(v >> 0)
- p[1] = uint8(v >> 8)
-}
-
-func put4(p []byte, v uint32) {
- p[0] = uint8(v >> 0)
- p[1] = uint8(v >> 8)
- p[2] = uint8(v >> 16)
- p[3] = uint8(v >> 24)
-}
-
// writeBytes writes a length-prefixed byte slice to z.w.
func (z *Writer) writeBytes(b []byte) error {
if len(b) > 0xffff {
return errors.New("gzip.Write: Extra data is too large")
}
- put2(z.buf[0:2], uint16(len(b)))
- _, err := z.w.Write(z.buf[0:2])
+ le.PutUint16(z.buf[:2], uint16(len(b)))
+ _, err := z.w.Write(z.buf[:2])
if err != nil {
return err
}
@@ -154,7 +131,7 @@ func (z *Writer) writeString(s string) (err error) {
}
// GZIP strings are NUL-terminated.
z.buf[0] = 0
- _, err = z.w.Write(z.buf[0:1])
+ _, err = z.w.Write(z.buf[:1])
return err
}
@@ -181,7 +158,7 @@ func (z *Writer) Write(p []byte) (int, error) {
if z.Comment != "" {
z.buf[3] |= 0x10
}
- put4(z.buf[4:8], uint32(z.ModTime.Unix()))
+ le.PutUint32(z.buf[4:8], uint32(z.ModTime.Unix()))
if z.level == BestCompression {
z.buf[8] = 2
} else if z.level == BestSpeed {
@@ -190,7 +167,7 @@ func (z *Writer) Write(p []byte) (int, error) {
z.buf[8] = 0
}
z.buf[9] = z.OS
- n, z.err = z.w.Write(z.buf[0:10])
+ n, z.err = z.w.Write(z.buf[:10])
if z.err != nil {
return n, z.err
}
@@ -217,7 +194,7 @@ func (z *Writer) Write(p []byte) (int, error) {
}
}
z.size += uint32(len(p))
- z.digest.Write(p)
+ z.digest = crc32.Update(z.digest, crc32.IEEETable, p)
n, z.err = z.compressor.Write(p)
return n, z.err
}
@@ -267,8 +244,8 @@ func (z *Writer) Close() error {
if z.err != nil {
return z.err
}
- put4(z.buf[0:4], z.digest.Sum32())
- put4(z.buf[4:8], z.size)
- _, z.err = z.w.Write(z.buf[0:8])
+ le.PutUint32(z.buf[:4], z.digest)
+ le.PutUint32(z.buf[4:8], z.size)
+ _, z.err = z.w.Write(z.buf[:8])
return z.err
}
diff --git a/vendor/github.com/klauspost/cpuid/.travis.yml b/vendor/github.com/klauspost/cpuid/.travis.yml
index fb74de6b878..2332ea6d707 100644
--- a/vendor/github.com/klauspost/cpuid/.travis.yml
+++ b/vendor/github.com/klauspost/cpuid/.travis.yml
@@ -1,7 +1,24 @@
language: go
+sudo: false
+
+os:
+ - linux
+ - osx
go:
- - 1.3
- - 1.4
- - 1.5
- - tip
+ - 1.5.x
+ - 1.6.x
+ - 1.7.x
+ - 1.8.x
+ - master
+
+script:
+ - go vet ./...
+ - go test -v ./...
+ - go test -race ./...
+ - diff <(gofmt -d .) <("")
+
+matrix:
+ allow_failures:
+ - go: 'master'
+ fast_finish: true
diff --git a/vendor/github.com/klauspost/cpuid/cpuid.go b/vendor/github.com/klauspost/cpuid/cpuid.go
index 9230ca56282..44e50946f31 100644
--- a/vendor/github.com/klauspost/cpuid/cpuid.go
+++ b/vendor/github.com/klauspost/cpuid/cpuid.go
@@ -192,7 +192,7 @@ func Detect() {
CPU.CacheLine = cacheLine()
CPU.Family, CPU.Model = familyModel()
CPU.Features = support()
- CPU.SGX = sgx(CPU.Features&SGX != 0)
+ CPU.SGX = hasSGX(CPU.Features&SGX != 0)
CPU.ThreadsPerCore = threadsPerCore()
CPU.LogicalCores = logicalCores()
CPU.PhysicalCores = physicalCores()
@@ -437,14 +437,22 @@ func (c CPUInfo) ERMS() bool {
return c.Features&ERMS != 0
}
+// RDTSCP Instruction is available.
func (c CPUInfo) RDTSCP() bool {
return c.Features&RDTSCP != 0
}
+// CX16 indicates if CMPXCHG16B instruction is available.
func (c CPUInfo) CX16() bool {
return c.Features&CX16 != 0
}
+// TSX is split into HLE (Hardware Lock Elision) and RTM (Restricted Transactional Memory) detection.
+// So TSX simply checks that.
+func (c CPUInfo) TSX() bool {
+ return c.Features&(MPX|RTM) == MPX|RTM
+}
+
// Atom indicates an Atom processor
func (c CPUInfo) Atom() bool {
return c.Features&ATOM != 0
@@ -757,7 +765,7 @@ type SGXSupport struct {
MaxEnclaveSize64 int64
}
-func sgx(available bool) (rval SGXSupport) {
+func hasSGX(available bool) (rval SGXSupport) {
rval.Available = available
if !available {
diff --git a/vendor/github.com/klauspost/cpuid/cpuid_386.s b/vendor/github.com/klauspost/cpuid/cpuid_386.s
index 9947f7b6f6a..4d731711e48 100644
--- a/vendor/github.com/klauspost/cpuid/cpuid_386.s
+++ b/vendor/github.com/klauspost/cpuid/cpuid_386.s
@@ -1,5 +1,7 @@
// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file.
+// +build 386,!gccgo
+
// func asmCpuid(op uint32) (eax, ebx, ecx, edx uint32)
TEXT ·asmCpuid(SB), 7, $0
XORL CX, CX
diff --git a/vendor/github.com/klauspost/cpuid/cpuid_amd64.s b/vendor/github.com/klauspost/cpuid/cpuid_amd64.s
index 68a7c9d8808..3c1d60e4221 100644
--- a/vendor/github.com/klauspost/cpuid/cpuid_amd64.s
+++ b/vendor/github.com/klauspost/cpuid/cpuid_amd64.s
@@ -1,5 +1,7 @@
// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file.
+//+build amd64,!gccgo
+
// func asmCpuid(op uint32) (eax, ebx, ecx, edx uint32)
TEXT ·asmCpuid(SB), 7, $0
XORQ CX, CX
diff --git a/vendor/github.com/klauspost/cpuid/detect_intel.go b/vendor/github.com/klauspost/cpuid/detect_intel.go
index d5475ebfaa8..a5f04dd6d0a 100644
--- a/vendor/github.com/klauspost/cpuid/detect_intel.go
+++ b/vendor/github.com/klauspost/cpuid/detect_intel.go
@@ -1,6 +1,6 @@
// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file.
-// +build 386 amd64
+// +build 386,!gccgo amd64,!gccgo
package cpuid
diff --git a/vendor/github.com/klauspost/cpuid/detect_ref.go b/vendor/github.com/klauspost/cpuid/detect_ref.go
index 6f9231b13bf..909c5d9a7ae 100644
--- a/vendor/github.com/klauspost/cpuid/detect_ref.go
+++ b/vendor/github.com/klauspost/cpuid/detect_ref.go
@@ -1,6 +1,6 @@
// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file.
-// +build !amd64,!386
+// +build !amd64,!386 gccgo
package cpuid
diff --git a/vendor/github.com/klauspost/cpuid/generate.go b/vendor/github.com/klauspost/cpuid/generate.go
index c060b8165e8..90e7a98d278 100644
--- a/vendor/github.com/klauspost/cpuid/generate.go
+++ b/vendor/github.com/klauspost/cpuid/generate.go
@@ -1,3 +1,4 @@
package cpuid
//go:generate go run private-gen.go
+//go:generate gofmt -w ./private
diff --git a/vendor/github.com/klauspost/cpuid/private/README.md b/vendor/github.com/klauspost/cpuid/private/README.md
deleted file mode 100644
index 57a68f88274..00000000000
--- a/vendor/github.com/klauspost/cpuid/private/README.md
+++ /dev/null
@@ -1,6 +0,0 @@
-# cpuid private
-
-This is a specially converted of the cpuid package, so it can be included in
-a package without exporting anything.
-
-Package home: https://github.com/klauspost/cpuid
diff --git a/vendor/github.com/klauspost/cpuid/private/cpuid.go b/vendor/github.com/klauspost/cpuid/private/cpuid.go
deleted file mode 100644
index be99cb0b70d..00000000000
--- a/vendor/github.com/klauspost/cpuid/private/cpuid.go
+++ /dev/null
@@ -1,987 +0,0 @@
-// Generated, DO NOT EDIT,
-// but copy it to your own project and rename the package.
-// See more at http://github.com/klauspost/cpuid
-
-package cpuid
-
-import (
- "strings"
-)
-
-// Vendor is a representation of a CPU vendor.
-type vendor int
-
-const (
- other vendor = iota
- intel
- amd
- via
- transmeta
- nsc
- kvm // Kernel-based Virtual Machine
- msvm // Microsoft Hyper-V or Windows Virtual PC
- vmware
- xenhvm
-)
-
-const (
- cmov = 1 << iota // i686 CMOV
- nx // NX (No-Execute) bit
- amd3dnow // AMD 3DNOW
- amd3dnowext // AMD 3DNowExt
- mmx // standard MMX
- mmxext // SSE integer functions or AMD MMX ext
- sse // SSE functions
- sse2 // P4 SSE functions
- sse3 // Prescott SSE3 functions
- ssse3 // Conroe SSSE3 functions
- sse4 // Penryn SSE4.1 functions
- sse4a // AMD Barcelona microarchitecture SSE4a instructions
- sse42 // Nehalem SSE4.2 functions
- avx // AVX functions
- avx2 // AVX2 functions
- fma3 // Intel FMA 3
- fma4 // Bulldozer FMA4 functions
- xop // Bulldozer XOP functions
- f16c // Half-precision floating-point conversion
- bmi1 // Bit Manipulation Instruction Set 1
- bmi2 // Bit Manipulation Instruction Set 2
- tbm // AMD Trailing Bit Manipulation
- lzcnt // LZCNT instruction
- popcnt // POPCNT instruction
- aesni // Advanced Encryption Standard New Instructions
- clmul // Carry-less Multiplication
- htt // Hyperthreading (enabled)
- hle // Hardware Lock Elision
- rtm // Restricted Transactional Memory
- rdrand // RDRAND instruction is available
- rdseed // RDSEED instruction is available
- adx // Intel ADX (Multi-Precision Add-Carry Instruction Extensions)
- sha // Intel SHA Extensions
- avx512f // AVX-512 Foundation
- avx512dq // AVX-512 Doubleword and Quadword Instructions
- avx512ifma // AVX-512 Integer Fused Multiply-Add Instructions
- avx512pf // AVX-512 Prefetch Instructions
- avx512er // AVX-512 Exponential and Reciprocal Instructions
- avx512cd // AVX-512 Conflict Detection Instructions
- avx512bw // AVX-512 Byte and Word Instructions
- avx512vl // AVX-512 Vector Length Extensions
- avx512vbmi // AVX-512 Vector Bit Manipulation Instructions
- mpx // Intel MPX (Memory Protection Extensions)
- erms // Enhanced REP MOVSB/STOSB
- rdtscp // RDTSCP Instruction
- cx16 // CMPXCHG16B Instruction
-
- // Performance indicators
- sse2slow // SSE2 is supported, but usually not faster
- sse3slow // SSE3 is supported, but usually not faster
- atom // Atom processor, some SSSE3 instructions are slower
-)
-
-var flagNames = map[flags]string{
- cmov: "CMOV", // i686 CMOV
- nx: "NX", // NX (No-Execute) bit
- amd3dnow: "AMD3DNOW", // AMD 3DNOW
- amd3dnowext: "AMD3DNOWEXT", // AMD 3DNowExt
- mmx: "MMX", // Standard MMX
- mmxext: "MMXEXT", // SSE integer functions or AMD MMX ext
- sse: "SSE", // SSE functions
- sse2: "SSE2", // P4 SSE2 functions
- sse3: "SSE3", // Prescott SSE3 functions
- ssse3: "SSSE3", // Conroe SSSE3 functions
- sse4: "SSE4.1", // Penryn SSE4.1 functions
- sse4a: "SSE4A", // AMD Barcelona microarchitecture SSE4a instructions
- sse42: "SSE4.2", // Nehalem SSE4.2 functions
- avx: "AVX", // AVX functions
- avx2: "AVX2", // AVX functions
- fma3: "FMA3", // Intel FMA 3
- fma4: "FMA4", // Bulldozer FMA4 functions
- xop: "XOP", // Bulldozer XOP functions
- f16c: "F16C", // Half-precision floating-point conversion
- bmi1: "BMI1", // Bit Manipulation Instruction Set 1
- bmi2: "BMI2", // Bit Manipulation Instruction Set 2
- tbm: "TBM", // AMD Trailing Bit Manipulation
- lzcnt: "LZCNT", // LZCNT instruction
- popcnt: "POPCNT", // POPCNT instruction
- aesni: "AESNI", // Advanced Encryption Standard New Instructions
- clmul: "CLMUL", // Carry-less Multiplication
- htt: "HTT", // Hyperthreading (enabled)
- hle: "HLE", // Hardware Lock Elision
- rtm: "RTM", // Restricted Transactional Memory
- rdrand: "RDRAND", // RDRAND instruction is available
- rdseed: "RDSEED", // RDSEED instruction is available
- adx: "ADX", // Intel ADX (Multi-Precision Add-Carry Instruction Extensions)
- sha: "SHA", // Intel SHA Extensions
- avx512f: "AVX512F", // AVX-512 Foundation
- avx512dq: "AVX512DQ", // AVX-512 Doubleword and Quadword Instructions
- avx512ifma: "AVX512IFMA", // AVX-512 Integer Fused Multiply-Add Instructions
- avx512pf: "AVX512PF", // AVX-512 Prefetch Instructions
- avx512er: "AVX512ER", // AVX-512 Exponential and Reciprocal Instructions
- avx512cd: "AVX512CD", // AVX-512 Conflict Detection Instructions
- avx512bw: "AVX512BW", // AVX-512 Byte and Word Instructions
- avx512vl: "AVX512VL", // AVX-512 Vector Length Extensions
- avx512vbmi: "AVX512VBMI", // AVX-512 Vector Bit Manipulation Instructions
- mpx: "MPX", // Intel MPX (Memory Protection Extensions)
- erms: "ERMS", // Enhanced REP MOVSB/STOSB
- rdtscp: "RDTSCP", // RDTSCP Instruction
- cx16: "CX16", // CMPXCHG16B Instruction
-
- // Performance indicators
- sse2slow: "SSE2SLOW", // SSE2 supported, but usually not faster
- sse3slow: "SSE3SLOW", // SSE3 supported, but usually not faster
- atom: "ATOM", // Atom processor, some SSSE3 instructions are slower
-
-}
-
-// CPUInfo contains information about the detected system CPU.
-type cpuInfo struct {
- brandname string // Brand name reported by the CPU
- vendorid vendor // Comparable CPU vendor ID
- features flags // Features of the CPU
- physicalcores int // Number of physical processor cores in your CPU. Will be 0 if undetectable.
- threadspercore int // Number of threads per physical core. Will be 1 if undetectable.
- logicalcores int // Number of physical cores times threads that can run on each core through the use of hyperthreading. Will be 0 if undetectable.
- family int // CPU family number
- model int // CPU model number
- cacheline int // Cache line size in bytes. Will be 0 if undetectable.
- cache struct {
- l1i int // L1 Instruction Cache (per core or shared). Will be -1 if undetected
- l1d int // L1 Data Cache (per core or shared). Will be -1 if undetected
- l2 int // L2 Cache (per core or shared). Will be -1 if undetected
- l3 int // L3 Instruction Cache (per core or shared). Will be -1 if undetected
- }
- maxFunc uint32
- maxExFunc uint32
-}
-
-var cpuid func(op uint32) (eax, ebx, ecx, edx uint32)
-var cpuidex func(op, op2 uint32) (eax, ebx, ecx, edx uint32)
-var xgetbv func(index uint32) (eax, edx uint32)
-var rdtscpAsm func() (eax, ebx, ecx, edx uint32)
-
-// CPU contains information about the CPU as detected on startup,
-// or when Detect last was called.
-//
-// Use this as the primary entry point to you data,
-// this way queries are
-var cpu cpuInfo
-
-func init() {
- initCPU()
- detect()
-}
-
-// Detect will re-detect current CPU info.
-// This will replace the content of the exported CPU variable.
-//
-// Unless you expect the CPU to change while you are running your program
-// you should not need to call this function.
-// If you call this, you must ensure that no other goroutine is accessing the
-// exported CPU variable.
-func detect() {
- cpu.maxFunc = maxFunctionID()
- cpu.maxExFunc = maxExtendedFunction()
- cpu.brandname = brandName()
- cpu.cacheline = cacheLine()
- cpu.family, cpu.model = familyModel()
- cpu.features = support()
- cpu.threadspercore = threadsPerCore()
- cpu.logicalcores = logicalCores()
- cpu.physicalcores = physicalCores()
- cpu.vendorid = vendorID()
- cpu.cacheSize()
-}
-
-// Generated here: http://play.golang.org/p/BxFH2Gdc0G
-
-// Cmov indicates support of CMOV instructions
-func (c cpuInfo) cmov() bool {
- return c.features&cmov != 0
-}
-
-// Amd3dnow indicates support of AMD 3DNOW! instructions
-func (c cpuInfo) amd3dnow() bool {
- return c.features&amd3dnow != 0
-}
-
-// Amd3dnowExt indicates support of AMD 3DNOW! Extended instructions
-func (c cpuInfo) amd3dnowext() bool {
- return c.features&amd3dnowext != 0
-}
-
-// MMX indicates support of MMX instructions
-func (c cpuInfo) mmx() bool {
- return c.features&mmx != 0
-}
-
-// MMXExt indicates support of MMXEXT instructions
-// (SSE integer functions or AMD MMX ext)
-func (c cpuInfo) mmxext() bool {
- return c.features&mmxext != 0
-}
-
-// SSE indicates support of SSE instructions
-func (c cpuInfo) sse() bool {
- return c.features&sse != 0
-}
-
-// SSE2 indicates support of SSE 2 instructions
-func (c cpuInfo) sse2() bool {
- return c.features&sse2 != 0
-}
-
-// SSE3 indicates support of SSE 3 instructions
-func (c cpuInfo) sse3() bool {
- return c.features&sse3 != 0
-}
-
-// SSSE3 indicates support of SSSE 3 instructions
-func (c cpuInfo) ssse3() bool {
- return c.features&ssse3 != 0
-}
-
-// SSE4 indicates support of SSE 4 (also called SSE 4.1) instructions
-func (c cpuInfo) sse4() bool {
- return c.features&sse4 != 0
-}
-
-// SSE42 indicates support of SSE4.2 instructions
-func (c cpuInfo) sse42() bool {
- return c.features&sse42 != 0
-}
-
-// AVX indicates support of AVX instructions
-// and operating system support of AVX instructions
-func (c cpuInfo) avx() bool {
- return c.features&avx != 0
-}
-
-// AVX2 indicates support of AVX2 instructions
-func (c cpuInfo) avx2() bool {
- return c.features&avx2 != 0
-}
-
-// FMA3 indicates support of FMA3 instructions
-func (c cpuInfo) fma3() bool {
- return c.features&fma3 != 0
-}
-
-// FMA4 indicates support of FMA4 instructions
-func (c cpuInfo) fma4() bool {
- return c.features&fma4 != 0
-}
-
-// XOP indicates support of XOP instructions
-func (c cpuInfo) xop() bool {
- return c.features&xop != 0
-}
-
-// F16C indicates support of F16C instructions
-func (c cpuInfo) f16c() bool {
- return c.features&f16c != 0
-}
-
-// BMI1 indicates support of BMI1 instructions
-func (c cpuInfo) bmi1() bool {
- return c.features&bmi1 != 0
-}
-
-// BMI2 indicates support of BMI2 instructions
-func (c cpuInfo) bmi2() bool {
- return c.features&bmi2 != 0
-}
-
-// TBM indicates support of TBM instructions
-// (AMD Trailing Bit Manipulation)
-func (c cpuInfo) tbm() bool {
- return c.features&tbm != 0
-}
-
-// Lzcnt indicates support of LZCNT instruction
-func (c cpuInfo) lzcnt() bool {
- return c.features&lzcnt != 0
-}
-
-// Popcnt indicates support of POPCNT instruction
-func (c cpuInfo) popcnt() bool {
- return c.features&popcnt != 0
-}
-
-// HTT indicates the processor has Hyperthreading enabled
-func (c cpuInfo) htt() bool {
- return c.features&htt != 0
-}
-
-// SSE2Slow indicates that SSE2 may be slow on this processor
-func (c cpuInfo) sse2slow() bool {
- return c.features&sse2slow != 0
-}
-
-// SSE3Slow indicates that SSE3 may be slow on this processor
-func (c cpuInfo) sse3slow() bool {
- return c.features&sse3slow != 0
-}
-
-// AesNi indicates support of AES-NI instructions
-// (Advanced Encryption Standard New Instructions)
-func (c cpuInfo) aesni() bool {
- return c.features&aesni != 0
-}
-
-// Clmul indicates support of CLMUL instructions
-// (Carry-less Multiplication)
-func (c cpuInfo) clmul() bool {
- return c.features&clmul != 0
-}
-
-// NX indicates support of NX (No-Execute) bit
-func (c cpuInfo) nx() bool {
- return c.features&nx != 0
-}
-
-// SSE4A indicates support of AMD Barcelona microarchitecture SSE4a instructions
-func (c cpuInfo) sse4a() bool {
- return c.features&sse4a != 0
-}
-
-// HLE indicates support of Hardware Lock Elision
-func (c cpuInfo) hle() bool {
- return c.features&hle != 0
-}
-
-// RTM indicates support of Restricted Transactional Memory
-func (c cpuInfo) rtm() bool {
- return c.features&rtm != 0
-}
-
-// Rdrand indicates support of RDRAND instruction is available
-func (c cpuInfo) rdrand() bool {
- return c.features&rdrand != 0
-}
-
-// Rdseed indicates support of RDSEED instruction is available
-func (c cpuInfo) rdseed() bool {
- return c.features&rdseed != 0
-}
-
-// ADX indicates support of Intel ADX (Multi-Precision Add-Carry Instruction Extensions)
-func (c cpuInfo) adx() bool {
- return c.features&adx != 0
-}
-
-// SHA indicates support of Intel SHA Extensions
-func (c cpuInfo) sha() bool {
- return c.features&sha != 0
-}
-
-// AVX512F indicates support of AVX-512 Foundation
-func (c cpuInfo) avx512f() bool {
- return c.features&avx512f != 0
-}
-
-// AVX512DQ indicates support of AVX-512 Doubleword and Quadword Instructions
-func (c cpuInfo) avx512dq() bool {
- return c.features&avx512dq != 0
-}
-
-// AVX512IFMA indicates support of AVX-512 Integer Fused Multiply-Add Instructions
-func (c cpuInfo) avx512ifma() bool {
- return c.features&avx512ifma != 0
-}
-
-// AVX512PF indicates support of AVX-512 Prefetch Instructions
-func (c cpuInfo) avx512pf() bool {
- return c.features&avx512pf != 0
-}
-
-// AVX512ER indicates support of AVX-512 Exponential and Reciprocal Instructions
-func (c cpuInfo) avx512er() bool {
- return c.features&avx512er != 0
-}
-
-// AVX512CD indicates support of AVX-512 Conflict Detection Instructions
-func (c cpuInfo) avx512cd() bool {
- return c.features&avx512cd != 0
-}
-
-// AVX512BW indicates support of AVX-512 Byte and Word Instructions
-func (c cpuInfo) avx512bw() bool {
- return c.features&avx512bw != 0
-}
-
-// AVX512VL indicates support of AVX-512 Vector Length Extensions
-func (c cpuInfo) avx512vl() bool {
- return c.features&avx512vl != 0
-}
-
-// AVX512VBMI indicates support of AVX-512 Vector Bit Manipulation Instructions
-func (c cpuInfo) avx512vbmi() bool {
- return c.features&avx512vbmi != 0
-}
-
-// MPX indicates support of Intel MPX (Memory Protection Extensions)
-func (c cpuInfo) mpx() bool {
- return c.features&mpx != 0
-}
-
-// ERMS indicates support of Enhanced REP MOVSB/STOSB
-func (c cpuInfo) erms() bool {
- return c.features&erms != 0
-}
-
-func (c cpuInfo) rdtscp() bool {
- return c.features&rdtscp != 0
-}
-
-func (c cpuInfo) cx16() bool {
- return c.features&cx16 != 0
-}
-
-// Atom indicates an Atom processor
-func (c cpuInfo) atom() bool {
- return c.features&atom != 0
-}
-
-// Intel returns true if vendor is recognized as Intel
-func (c cpuInfo) intel() bool {
- return c.vendorid == intel
-}
-
-// AMD returns true if vendor is recognized as AMD
-func (c cpuInfo) amd() bool {
- return c.vendorid == amd
-}
-
-// Transmeta returns true if vendor is recognized as Transmeta
-func (c cpuInfo) transmeta() bool {
- return c.vendorid == transmeta
-}
-
-// NSC returns true if vendor is recognized as National Semiconductor
-func (c cpuInfo) nsc() bool {
- return c.vendorid == nsc
-}
-
-// VIA returns true if vendor is recognized as VIA
-func (c cpuInfo) via() bool {
- return c.vendorid == via
-}
-
-// RTCounter returns the 64-bit time-stamp counter
-// Uses the RDTSCP instruction. The value 0 is returned
-// if the CPU does not support the instruction.
-func (c cpuInfo) rtcounter() uint64 {
- if !c.rdtscp() {
- return 0
- }
- a, _, _, d := rdtscpAsm()
- return uint64(a) | (uint64(d) << 32)
-}
-
-// Ia32TscAux returns the IA32_TSC_AUX part of the RDTSCP.
-// This variable is OS dependent, but on Linux contains information
-// about the current cpu/core the code is running on.
-// If the RDTSCP instruction isn't supported on the CPU, the value 0 is returned.
-func (c cpuInfo) ia32tscaux() uint32 {
- if !c.rdtscp() {
- return 0
- }
- _, _, ecx, _ := rdtscpAsm()
- return ecx
-}
-
-// LogicalCPU will return the Logical CPU the code is currently executing on.
-// This is likely to change when the OS re-schedules the running thread
-// to another CPU.
-// If the current core cannot be detected, -1 will be returned.
-func (c cpuInfo) logicalcpu() int {
- if c.maxFunc < 1 {
- return -1
- }
- _, ebx, _, _ := cpuid(1)
- return int(ebx >> 24)
-}
-
-// VM Will return true if the cpu id indicates we are in
-// a virtual machine. This is only a hint, and will very likely
-// have many false negatives.
-func (c cpuInfo) vm() bool {
- switch c.vendorid {
- case msvm, kvm, vmware, xenhvm:
- return true
- }
- return false
-}
-
-// Flags contains detected cpu features and caracteristics
-type flags uint64
-
-// String returns a string representation of the detected
-// CPU features.
-func (f flags) String() string {
- return strings.Join(f.strings(), ",")
-}
-
-// Strings returns and array of the detected features.
-func (f flags) strings() []string {
- s := support()
- r := make([]string, 0, 20)
- for i := uint(0); i < 64; i++ {
- key := flags(1 << i)
- val := flagNames[key]
- if s&key != 0 {
- r = append(r, val)
- }
- }
- return r
-}
-
-func maxExtendedFunction() uint32 {
- eax, _, _, _ := cpuid(0x80000000)
- return eax
-}
-
-func maxFunctionID() uint32 {
- a, _, _, _ := cpuid(0)
- return a
-}
-
-func brandName() string {
- if maxExtendedFunction() >= 0x80000004 {
- v := make([]uint32, 0, 48)
- for i := uint32(0); i < 3; i++ {
- a, b, c, d := cpuid(0x80000002 + i)
- v = append(v, a, b, c, d)
- }
- return strings.Trim(string(valAsString(v...)), " ")
- }
- return "unknown"
-}
-
-func threadsPerCore() int {
- mfi := maxFunctionID()
- if mfi < 0x4 || vendorID() != intel {
- return 1
- }
-
- if mfi < 0xb {
- _, b, _, d := cpuid(1)
- if (d & (1 << 28)) != 0 {
- // v will contain logical core count
- v := (b >> 16) & 255
- if v > 1 {
- a4, _, _, _ := cpuid(4)
- // physical cores
- v2 := (a4 >> 26) + 1
- if v2 > 0 {
- return int(v) / int(v2)
- }
- }
- }
- return 1
- }
- _, b, _, _ := cpuidex(0xb, 0)
- if b&0xffff == 0 {
- return 1
- }
- return int(b & 0xffff)
-}
-
-func logicalCores() int {
- mfi := maxFunctionID()
- switch vendorID() {
- case intel:
- // Use this on old Intel processors
- if mfi < 0xb {
- if mfi < 1 {
- return 0
- }
- // CPUID.1:EBX[23:16] represents the maximum number of addressable IDs (initial APIC ID)
- // that can be assigned to logical processors in a physical package.
- // The value may not be the same as the number of logical processors that are present in the hardware of a physical package.
- _, ebx, _, _ := cpuid(1)
- logical := (ebx >> 16) & 0xff
- return int(logical)
- }
- _, b, _, _ := cpuidex(0xb, 1)
- return int(b & 0xffff)
- case amd:
- _, b, _, _ := cpuid(1)
- return int((b >> 16) & 0xff)
- default:
- return 0
- }
-}
-
-func familyModel() (int, int) {
- if maxFunctionID() < 0x1 {
- return 0, 0
- }
- eax, _, _, _ := cpuid(1)
- family := ((eax >> 8) & 0xf) + ((eax >> 20) & 0xff)
- model := ((eax >> 4) & 0xf) + ((eax >> 12) & 0xf0)
- return int(family), int(model)
-}
-
-func physicalCores() int {
- switch vendorID() {
- case intel:
- return logicalCores() / threadsPerCore()
- case amd:
- if maxExtendedFunction() >= 0x80000008 {
- _, _, c, _ := cpuid(0x80000008)
- return int(c&0xff) + 1
- }
- }
- return 0
-}
-
-// Except from http://en.wikipedia.org/wiki/CPUID#EAX.3D0:_Get_vendor_ID
-var vendorMapping = map[string]vendor{
- "AMDisbetter!": amd,
- "AuthenticAMD": amd,
- "CentaurHauls": via,
- "GenuineIntel": intel,
- "TransmetaCPU": transmeta,
- "GenuineTMx86": transmeta,
- "Geode by NSC": nsc,
- "VIA VIA VIA ": via,
- "KVMKVMKVMKVM": kvm,
- "Microsoft Hv": msvm,
- "VMwareVMware": vmware,
- "XenVMMXenVMM": xenhvm,
-}
-
-func vendorID() vendor {
- _, b, c, d := cpuid(0)
- v := valAsString(b, d, c)
- vend, ok := vendorMapping[string(v)]
- if !ok {
- return other
- }
- return vend
-}
-
-func cacheLine() int {
- if maxFunctionID() < 0x1 {
- return 0
- }
-
- _, ebx, _, _ := cpuid(1)
- cache := (ebx & 0xff00) >> 5 // cflush size
- if cache == 0 && maxExtendedFunction() >= 0x80000006 {
- _, _, ecx, _ := cpuid(0x80000006)
- cache = ecx & 0xff // cacheline size
- }
- // TODO: Read from Cache and TLB Information
- return int(cache)
-}
-
-func (c *cpuInfo) cacheSize() {
- c.cache.l1d = -1
- c.cache.l1i = -1
- c.cache.l2 = -1
- c.cache.l3 = -1
- vendor := vendorID()
- switch vendor {
- case intel:
- if maxFunctionID() < 4 {
- return
- }
- for i := uint32(0); ; i++ {
- eax, ebx, ecx, _ := cpuidex(4, i)
- cacheType := eax & 15
- if cacheType == 0 {
- break
- }
- cacheLevel := (eax >> 5) & 7
- coherency := int(ebx&0xfff) + 1
- partitions := int((ebx>>12)&0x3ff) + 1
- associativity := int((ebx>>22)&0x3ff) + 1
- sets := int(ecx) + 1
- size := associativity * partitions * coherency * sets
- switch cacheLevel {
- case 1:
- if cacheType == 1 {
- // 1 = Data Cache
- c.cache.l1d = size
- } else if cacheType == 2 {
- // 2 = Instruction Cache
- c.cache.l1i = size
- } else {
- if c.cache.l1d < 0 {
- c.cache.l1i = size
- }
- if c.cache.l1i < 0 {
- c.cache.l1i = size
- }
- }
- case 2:
- c.cache.l2 = size
- case 3:
- c.cache.l3 = size
- }
- }
- case amd:
- // Untested.
- if maxExtendedFunction() < 0x80000005 {
- return
- }
- _, _, ecx, edx := cpuid(0x80000005)
- c.cache.l1d = int(((ecx >> 24) & 0xFF) * 1024)
- c.cache.l1i = int(((edx >> 24) & 0xFF) * 1024)
-
- if maxExtendedFunction() < 0x80000006 {
- return
- }
- _, _, ecx, _ = cpuid(0x80000006)
- c.cache.l2 = int(((ecx >> 16) & 0xFFFF) * 1024)
- }
-
- return
-}
-
-func support() flags {
- mfi := maxFunctionID()
- vend := vendorID()
- if mfi < 0x1 {
- return 0
- }
- rval := uint64(0)
- _, _, c, d := cpuid(1)
- if (d & (1 << 15)) != 0 {
- rval |= cmov
- }
- if (d & (1 << 23)) != 0 {
- rval |= mmx
- }
- if (d & (1 << 25)) != 0 {
- rval |= mmxext
- }
- if (d & (1 << 25)) != 0 {
- rval |= sse
- }
- if (d & (1 << 26)) != 0 {
- rval |= sse2
- }
- if (c & 1) != 0 {
- rval |= sse3
- }
- if (c & 0x00000200) != 0 {
- rval |= ssse3
- }
- if (c & 0x00080000) != 0 {
- rval |= sse4
- }
- if (c & 0x00100000) != 0 {
- rval |= sse42
- }
- if (c & (1 << 25)) != 0 {
- rval |= aesni
- }
- if (c & (1 << 1)) != 0 {
- rval |= clmul
- }
- if c&(1<<23) != 0 {
- rval |= popcnt
- }
- if c&(1<<30) != 0 {
- rval |= rdrand
- }
- if c&(1<<29) != 0 {
- rval |= f16c
- }
- if c&(1<<13) != 0 {
- rval |= cx16
- }
- if vend == intel && (d&(1<<28)) != 0 && mfi >= 4 {
- if threadsPerCore() > 1 {
- rval |= htt
- }
- }
-
- // Check XGETBV, OXSAVE and AVX bits
- if c&(1<<26) != 0 && c&(1<<27) != 0 && c&(1<<28) != 0 {
- // Check for OS support
- eax, _ := xgetbv(0)
- if (eax & 0x6) == 0x6 {
- rval |= avx
- if (c & 0x00001000) != 0 {
- rval |= fma3
- }
- }
- }
-
- // Check AVX2, AVX2 requires OS support, but BMI1/2 don't.
- if mfi >= 7 {
- _, ebx, ecx, _ := cpuidex(7, 0)
- if (rval&avx) != 0 && (ebx&0x00000020) != 0 {
- rval |= avx2
- }
- if (ebx & 0x00000008) != 0 {
- rval |= bmi1
- if (ebx & 0x00000100) != 0 {
- rval |= bmi2
- }
- }
- if ebx&(1<<4) != 0 {
- rval |= hle
- }
- if ebx&(1<<9) != 0 {
- rval |= erms
- }
- if ebx&(1<<11) != 0 {
- rval |= rtm
- }
- if ebx&(1<<14) != 0 {
- rval |= mpx
- }
- if ebx&(1<<18) != 0 {
- rval |= rdseed
- }
- if ebx&(1<<19) != 0 {
- rval |= adx
- }
- if ebx&(1<<29) != 0 {
- rval |= sha
- }
-
- // Only detect AVX-512 features if XGETBV is supported
- if c&((1<<26)|(1<<27)) == (1<<26)|(1<<27) {
- // Check for OS support
- eax, _ := xgetbv(0)
-
- // Verify that XCR0[7:5] = ‘111b’ (OPMASK state, upper 256-bit of ZMM0-ZMM15 and
- // ZMM16-ZMM31 state are enabled by OS)
- /// and that XCR0[2:1] = ‘11b’ (XMM state and YMM state are enabled by OS).
- if (eax>>5)&7 == 7 && (eax>>1)&3 == 3 {
- if ebx&(1<<16) != 0 {
- rval |= avx512f
- }
- if ebx&(1<<17) != 0 {
- rval |= avx512dq
- }
- if ebx&(1<<21) != 0 {
- rval |= avx512ifma
- }
- if ebx&(1<<26) != 0 {
- rval |= avx512pf
- }
- if ebx&(1<<27) != 0 {
- rval |= avx512er
- }
- if ebx&(1<<28) != 0 {
- rval |= avx512cd
- }
- if ebx&(1<<30) != 0 {
- rval |= avx512bw
- }
- if ebx&(1<<31) != 0 {
- rval |= avx512vl
- }
- // ecx
- if ecx&(1<<1) != 0 {
- rval |= avx512vbmi
- }
- }
- }
- }
-
- if maxExtendedFunction() >= 0x80000001 {
- _, _, c, d := cpuid(0x80000001)
- if (c & (1 << 5)) != 0 {
- rval |= lzcnt
- rval |= popcnt
- }
- if (d & (1 << 31)) != 0 {
- rval |= amd3dnow
- }
- if (d & (1 << 30)) != 0 {
- rval |= amd3dnowext
- }
- if (d & (1 << 23)) != 0 {
- rval |= mmx
- }
- if (d & (1 << 22)) != 0 {
- rval |= mmxext
- }
- if (c & (1 << 6)) != 0 {
- rval |= sse4a
- }
- if d&(1<<20) != 0 {
- rval |= nx
- }
- if d&(1<<27) != 0 {
- rval |= rdtscp
- }
-
- /* Allow for selectively disabling SSE2 functions on AMD processors
- with SSE2 support but not SSE4a. This includes Athlon64, some
- Opteron, and some Sempron processors. MMX, SSE, or 3DNow! are faster
- than SSE2 often enough to utilize this special-case flag.
- AV_CPU_FLAG_SSE2 and AV_CPU_FLAG_SSE2SLOW are both set in this case
- so that SSE2 is used unless explicitly disabled by checking
- AV_CPU_FLAG_SSE2SLOW. */
- if vendorID() != intel &&
- rval&sse2 != 0 && (c&0x00000040) == 0 {
- rval |= sse2slow
- }
-
- /* XOP and FMA4 use the AVX instruction coding scheme, so they can't be
- * used unless the OS has AVX support. */
- if (rval & avx) != 0 {
- if (c & 0x00000800) != 0 {
- rval |= xop
- }
- if (c & 0x00010000) != 0 {
- rval |= fma4
- }
- }
-
- if vendorID() == intel {
- family, model := familyModel()
- if family == 6 && (model == 9 || model == 13 || model == 14) {
- /* 6/9 (pentium-m "banias"), 6/13 (pentium-m "dothan"), and
- * 6/14 (core1 "yonah") theoretically support sse2, but it's
- * usually slower than mmx. */
- if (rval & sse2) != 0 {
- rval |= sse2slow
- }
- if (rval & sse3) != 0 {
- rval |= sse3slow
- }
- }
- /* The Atom processor has SSSE3 support, which is useful in many cases,
- * but sometimes the SSSE3 version is slower than the SSE2 equivalent
- * on the Atom, but is generally faster on other processors supporting
- * SSSE3. This flag allows for selectively disabling certain SSSE3
- * functions on the Atom. */
- if family == 6 && model == 28 {
- rval |= atom
- }
- }
- }
- return flags(rval)
-}
-
-func valAsString(values ...uint32) []byte {
- r := make([]byte, 4*len(values))
- for i, v := range values {
- dst := r[i*4:]
- dst[0] = byte(v & 0xff)
- dst[1] = byte((v >> 8) & 0xff)
- dst[2] = byte((v >> 16) & 0xff)
- dst[3] = byte((v >> 24) & 0xff)
- switch {
- case dst[0] == 0:
- return r[:i*4]
- case dst[1] == 0:
- return r[:i*4+1]
- case dst[2] == 0:
- return r[:i*4+2]
- case dst[3] == 0:
- return r[:i*4+3]
- }
- }
- return r
-}
diff --git a/vendor/github.com/klauspost/cpuid/private/cpuid_386.s b/vendor/github.com/klauspost/cpuid/private/cpuid_386.s
deleted file mode 100644
index 9947f7b6f6a..00000000000
--- a/vendor/github.com/klauspost/cpuid/private/cpuid_386.s
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file.
-
-// func asmCpuid(op uint32) (eax, ebx, ecx, edx uint32)
-TEXT ·asmCpuid(SB), 7, $0
- XORL CX, CX
- MOVL op+0(FP), AX
- CPUID
- MOVL AX, eax+4(FP)
- MOVL BX, ebx+8(FP)
- MOVL CX, ecx+12(FP)
- MOVL DX, edx+16(FP)
- RET
-
-// func asmCpuidex(op, op2 uint32) (eax, ebx, ecx, edx uint32)
-TEXT ·asmCpuidex(SB), 7, $0
- MOVL op+0(FP), AX
- MOVL op2+4(FP), CX
- CPUID
- MOVL AX, eax+8(FP)
- MOVL BX, ebx+12(FP)
- MOVL CX, ecx+16(FP)
- MOVL DX, edx+20(FP)
- RET
-
-// func xgetbv(index uint32) (eax, edx uint32)
-TEXT ·asmXgetbv(SB), 7, $0
- MOVL index+0(FP), CX
- BYTE $0x0f; BYTE $0x01; BYTE $0xd0 // XGETBV
- MOVL AX, eax+4(FP)
- MOVL DX, edx+8(FP)
- RET
-
-// func asmRdtscpAsm() (eax, ebx, ecx, edx uint32)
-TEXT ·asmRdtscpAsm(SB), 7, $0
- BYTE $0x0F; BYTE $0x01; BYTE $0xF9 // RDTSCP
- MOVL AX, eax+0(FP)
- MOVL BX, ebx+4(FP)
- MOVL CX, ecx+8(FP)
- MOVL DX, edx+12(FP)
- RET
diff --git a/vendor/github.com/klauspost/cpuid/private/cpuid_amd64.s b/vendor/github.com/klauspost/cpuid/private/cpuid_amd64.s
deleted file mode 100644
index 68a7c9d8808..00000000000
--- a/vendor/github.com/klauspost/cpuid/private/cpuid_amd64.s
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file.
-
-// func asmCpuid(op uint32) (eax, ebx, ecx, edx uint32)
-TEXT ·asmCpuid(SB), 7, $0
- XORQ CX, CX
- MOVL op+0(FP), AX
- CPUID
- MOVL AX, eax+8(FP)
- MOVL BX, ebx+12(FP)
- MOVL CX, ecx+16(FP)
- MOVL DX, edx+20(FP)
- RET
-
-// func asmCpuidex(op, op2 uint32) (eax, ebx, ecx, edx uint32)
-TEXT ·asmCpuidex(SB), 7, $0
- MOVL op+0(FP), AX
- MOVL op2+4(FP), CX
- CPUID
- MOVL AX, eax+8(FP)
- MOVL BX, ebx+12(FP)
- MOVL CX, ecx+16(FP)
- MOVL DX, edx+20(FP)
- RET
-
-// func asmXgetbv(index uint32) (eax, edx uint32)
-TEXT ·asmXgetbv(SB), 7, $0
- MOVL index+0(FP), CX
- BYTE $0x0f; BYTE $0x01; BYTE $0xd0 // XGETBV
- MOVL AX, eax+8(FP)
- MOVL DX, edx+12(FP)
- RET
-
-// func asmRdtscpAsm() (eax, ebx, ecx, edx uint32)
-TEXT ·asmRdtscpAsm(SB), 7, $0
- BYTE $0x0F; BYTE $0x01; BYTE $0xF9 // RDTSCP
- MOVL AX, eax+0(FP)
- MOVL BX, ebx+4(FP)
- MOVL CX, ecx+8(FP)
- MOVL DX, edx+12(FP)
- RET
diff --git a/vendor/github.com/klauspost/cpuid/private/cpuid_detect_intel.go b/vendor/github.com/klauspost/cpuid/private/cpuid_detect_intel.go
deleted file mode 100644
index d5475ebfaa8..00000000000
--- a/vendor/github.com/klauspost/cpuid/private/cpuid_detect_intel.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file.
-
-// +build 386 amd64
-
-package cpuid
-
-func asmCpuid(op uint32) (eax, ebx, ecx, edx uint32)
-func asmCpuidex(op, op2 uint32) (eax, ebx, ecx, edx uint32)
-func asmXgetbv(index uint32) (eax, edx uint32)
-func asmRdtscpAsm() (eax, ebx, ecx, edx uint32)
-
-func initCPU() {
- cpuid = asmCpuid
- cpuidex = asmCpuidex
- xgetbv = asmXgetbv
- rdtscpAsm = asmRdtscpAsm
-}
diff --git a/vendor/github.com/klauspost/cpuid/private/cpuid_detect_ref.go b/vendor/github.com/klauspost/cpuid/private/cpuid_detect_ref.go
deleted file mode 100644
index 6f9231b13bf..00000000000
--- a/vendor/github.com/klauspost/cpuid/private/cpuid_detect_ref.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file.
-
-// +build !amd64,!386
-
-package cpuid
-
-func initCPU() {
- cpuid = func(op uint32) (eax, ebx, ecx, edx uint32) {
- return 0, 0, 0, 0
- }
-
- cpuidex = func(op, op2 uint32) (eax, ebx, ecx, edx uint32) {
- return 0, 0, 0, 0
- }
-
- xgetbv = func(index uint32) (eax, edx uint32) {
- return 0, 0
- }
-
- rdtscpAsm = func() (eax, ebx, ecx, edx uint32) {
- return 0, 0, 0, 0
- }
-}
diff --git a/vendor/github.com/klauspost/crc32/.gitignore b/vendor/github.com/klauspost/crc32/.gitignore
new file mode 100644
index 00000000000..daf913b1b34
--- /dev/null
+++ b/vendor/github.com/klauspost/crc32/.gitignore
@@ -0,0 +1,24 @@
+# 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
diff --git a/vendor/github.com/kr/pretty/diff.go b/vendor/github.com/kr/pretty/diff.go
index 8fe8e2405a0..6aa7f743a28 100644
--- a/vendor/github.com/kr/pretty/diff.go
+++ b/vendor/github.com/kr/pretty/diff.go
@@ -8,43 +8,81 @@ import (
type sbuf []string
-func (s *sbuf) Write(b []byte) (int, error) {
- *s = append(*s, string(b))
- return len(b), nil
+func (p *sbuf) Printf(format string, a ...interface{}) {
+ s := fmt.Sprintf(format, a...)
+ *p = append(*p, s)
}
// Diff returns a slice where each element describes
// a difference between a and b.
func Diff(a, b interface{}) (desc []string) {
- Fdiff((*sbuf)(&desc), a, b)
+ Pdiff((*sbuf)(&desc), a, b)
return desc
}
+// wprintfer calls Fprintf on w for each Printf call
+// with a trailing newline.
+type wprintfer struct{ w io.Writer }
+
+func (p *wprintfer) Printf(format string, a ...interface{}) {
+ fmt.Fprintf(p.w, format+"\n", a...)
+}
+
// Fdiff writes to w a description of the differences between a and b.
func Fdiff(w io.Writer, a, b interface{}) {
- diffWriter{w: w}.diff(reflect.ValueOf(a), reflect.ValueOf(b))
+ Pdiff(&wprintfer{w}, a, b)
}
-type diffWriter struct {
- w io.Writer
+type Printfer interface {
+ Printf(format string, a ...interface{})
+}
+
+// Pdiff prints to p a description of the differences between a and b.
+// It calls Printf once for each difference, with no trailing newline.
+// The standard library log.Logger is a Printfer.
+func Pdiff(p Printfer, a, b interface{}) {
+ diffPrinter{w: p}.diff(reflect.ValueOf(a), reflect.ValueOf(b))
+}
+
+type Logfer interface {
+ Logf(format string, a ...interface{})
+}
+
+// logprintfer calls Fprintf on w for each Printf call
+// with a trailing newline.
+type logprintfer struct{ l Logfer }
+
+func (p *logprintfer) Printf(format string, a ...interface{}) {
+ p.l.Logf(format, a...)
+}
+
+// Ldiff prints to l a description of the differences between a and b.
+// It calls Logf once for each difference, with no trailing newline.
+// The standard library testing.T and testing.B are Logfers.
+func Ldiff(l Logfer, a, b interface{}) {
+ Pdiff(&logprintfer{l}, a, b)
+}
+
+type diffPrinter struct {
+ w Printfer
l string // label
}
-func (w diffWriter) printf(f string, a ...interface{}) {
+func (w diffPrinter) printf(f string, a ...interface{}) {
var l string
if w.l != "" {
l = w.l + ": "
}
- fmt.Fprintf(w.w, l+f, a...)
+ w.w.Printf(l+f, a...)
}
-func (w diffWriter) diff(av, bv reflect.Value) {
+func (w diffPrinter) diff(av, bv reflect.Value) {
if !av.IsValid() && bv.IsValid() {
- w.printf("nil != %#v", bv.Interface())
+ w.printf("nil != %# v", formatter{v: bv, quote: true})
return
}
if av.IsValid() && !bv.IsValid() {
- w.printf("%#v != nil", av.Interface())
+ w.printf("%# v != nil", formatter{v: av, quote: true})
return
}
if !av.IsValid() && !bv.IsValid() {
@@ -58,34 +96,61 @@ func (w diffWriter) diff(av, bv reflect.Value) {
return
}
- // numeric types, including bool
- if at.Kind() < reflect.Array {
- a, b := av.Interface(), bv.Interface()
- if a != b {
- w.printf("%#v != %#v", a, b)
+ switch kind := at.Kind(); kind {
+ case reflect.Bool:
+ if a, b := av.Bool(), bv.Bool(); a != b {
+ w.printf("%v != %v", a, b)
}
- return
- }
-
- switch at.Kind() {
- case reflect.String:
- a, b := av.Interface(), bv.Interface()
- if a != b {
- w.printf("%q != %q", a, b)
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+ if a, b := av.Int(), bv.Int(); a != b {
+ w.printf("%d != %d", a, b)
+ }
+ case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
+ if a, b := av.Uint(), bv.Uint(); a != b {
+ w.printf("%d != %d", a, b)
+ }
+ case reflect.Float32, reflect.Float64:
+ if a, b := av.Float(), bv.Float(); a != b {
+ w.printf("%v != %v", a, b)
+ }
+ case reflect.Complex64, reflect.Complex128:
+ if a, b := av.Complex(), bv.Complex(); a != b {
+ w.printf("%v != %v", a, b)
+ }
+ case reflect.Array:
+ n := av.Len()
+ for i := 0; i < n; i++ {
+ w.relabel(fmt.Sprintf("[%d]", i)).diff(av.Index(i), bv.Index(i))
+ }
+ case reflect.Chan, reflect.Func, reflect.UnsafePointer:
+ if a, b := av.Pointer(), bv.Pointer(); a != b {
+ w.printf("%#x != %#x", a, b)
+ }
+ case reflect.Interface:
+ w.diff(av.Elem(), bv.Elem())
+ case reflect.Map:
+ ak, both, bk := keyDiff(av.MapKeys(), bv.MapKeys())
+ for _, k := range ak {
+ w := w.relabel(fmt.Sprintf("[%#v]", k))
+ w.printf("%q != (missing)", av.MapIndex(k))
+ }
+ for _, k := range both {
+ w := w.relabel(fmt.Sprintf("[%#v]", k))
+ w.diff(av.MapIndex(k), bv.MapIndex(k))
+ }
+ for _, k := range bk {
+ w := w.relabel(fmt.Sprintf("[%#v]", k))
+ w.printf("(missing) != %q", bv.MapIndex(k))
}
case reflect.Ptr:
switch {
case av.IsNil() && !bv.IsNil():
- w.printf("nil != %v", bv.Interface())
+ w.printf("nil != %# v", formatter{v: bv, quote: true})
case !av.IsNil() && bv.IsNil():
- w.printf("%v != nil", av.Interface())
+ w.printf("%# v != nil", formatter{v: av, quote: true})
case !av.IsNil() && !bv.IsNil():
w.diff(av.Elem(), bv.Elem())
}
- case reflect.Struct:
- for i := 0; i < av.NumField(); i++ {
- w.relabel(at.Field(i).Name).diff(av.Field(i), bv.Field(i))
- }
case reflect.Slice:
lenA := av.Len()
lenB := bv.Len()
@@ -96,30 +161,20 @@ func (w diffWriter) diff(av, bv reflect.Value) {
for i := 0; i < lenA; i++ {
w.relabel(fmt.Sprintf("[%d]", i)).diff(av.Index(i), bv.Index(i))
}
- case reflect.Map:
- ak, both, bk := keyDiff(av.MapKeys(), bv.MapKeys())
- for _, k := range ak {
- w := w.relabel(fmt.Sprintf("[%#v]", k.Interface()))
- w.printf("%q != (missing)", av.MapIndex(k))
+ case reflect.String:
+ if a, b := av.String(), bv.String(); a != b {
+ w.printf("%q != %q", a, b)
}
- for _, k := range both {
- w := w.relabel(fmt.Sprintf("[%#v]", k.Interface()))
- w.diff(av.MapIndex(k), bv.MapIndex(k))
+ case reflect.Struct:
+ for i := 0; i < av.NumField(); i++ {
+ w.relabel(at.Field(i).Name).diff(av.Field(i), bv.Field(i))
}
- for _, k := range bk {
- w := w.relabel(fmt.Sprintf("[%#v]", k.Interface()))
- w.printf("(missing) != %q", bv.MapIndex(k))
- }
- case reflect.Interface:
- w.diff(reflect.ValueOf(av.Interface()), reflect.ValueOf(bv.Interface()))
default:
- if !reflect.DeepEqual(av.Interface(), bv.Interface()) {
- w.printf("%# v != %# v", Formatter(av.Interface()), Formatter(bv.Interface()))
- }
+ panic("unknown reflect Kind: " + kind.String())
}
}
-func (d diffWriter) relabel(name string) (d1 diffWriter) {
+func (d diffPrinter) relabel(name string) (d1 diffPrinter) {
d1 = d
if d.l != "" && name[0] != '[' {
d1.l += "."
@@ -128,11 +183,63 @@ func (d diffWriter) relabel(name string) (d1 diffWriter) {
return d1
}
+// keyEqual compares a and b for equality.
+// Both a and b must be valid map keys.
+func keyEqual(av, bv reflect.Value) bool {
+ if !av.IsValid() && !bv.IsValid() {
+ return true
+ }
+ if !av.IsValid() || !bv.IsValid() || av.Type() != bv.Type() {
+ return false
+ }
+ switch kind := av.Kind(); kind {
+ case reflect.Bool:
+ a, b := av.Bool(), bv.Bool()
+ return a == b
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+ a, b := av.Int(), bv.Int()
+ return a == b
+ case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
+ a, b := av.Uint(), bv.Uint()
+ return a == b
+ case reflect.Float32, reflect.Float64:
+ a, b := av.Float(), bv.Float()
+ return a == b
+ case reflect.Complex64, reflect.Complex128:
+ a, b := av.Complex(), bv.Complex()
+ return a == b
+ case reflect.Array:
+ for i := 0; i < av.Len(); i++ {
+ if !keyEqual(av.Index(i), bv.Index(i)) {
+ return false
+ }
+ }
+ return true
+ case reflect.Chan, reflect.UnsafePointer, reflect.Ptr:
+ a, b := av.Pointer(), bv.Pointer()
+ return a == b
+ case reflect.Interface:
+ return keyEqual(av.Elem(), bv.Elem())
+ case reflect.String:
+ a, b := av.String(), bv.String()
+ return a == b
+ case reflect.Struct:
+ for i := 0; i < av.NumField(); i++ {
+ if !keyEqual(av.Field(i), bv.Field(i)) {
+ return false
+ }
+ }
+ return true
+ default:
+ panic("invalid map key type " + av.Type().String())
+ }
+}
+
func keyDiff(a, b []reflect.Value) (ak, both, bk []reflect.Value) {
for _, av := range a {
inBoth := false
for _, bv := range b {
- if reflect.DeepEqual(av.Interface(), bv.Interface()) {
+ if keyEqual(av, bv) {
inBoth = true
both = append(both, av)
break
@@ -145,7 +252,7 @@ func keyDiff(a, b []reflect.Value) (ak, both, bk []reflect.Value) {
for _, bv := range b {
inBoth := false
for _, av := range a {
- if reflect.DeepEqual(av.Interface(), bv.Interface()) {
+ if keyEqual(av, bv) {
inBoth = true
break
}
diff --git a/vendor/github.com/kr/pretty/diff_test.go b/vendor/github.com/kr/pretty/diff_test.go
index 3c388f13ca7..a951e4b6c3f 100644
--- a/vendor/github.com/kr/pretty/diff_test.go
+++ b/vendor/github.com/kr/pretty/diff_test.go
@@ -1,7 +1,18 @@
package pretty
import (
+ "bytes"
+ "fmt"
+ "log"
+ "reflect"
"testing"
+ "unsafe"
+)
+
+var (
+ _ Logfer = (*testing.T)(nil)
+ _ Logfer = (*testing.B)(nil)
+ _ Printfer = (*log.Logger)(nil)
)
type difftest struct {
@@ -17,6 +28,20 @@ type S struct {
C []int
}
+type (
+ N struct{ N int }
+ E interface{}
+)
+
+var (
+ c0 = make(chan int)
+ c1 = make(chan int)
+ f0 = func() {}
+ f1 = func() {}
+ i0 = 0
+ i1 = 1
+)
+
var diffs = []difftest{
{a: nil, b: nil},
{a: S{A: 1}, b: S{A: 1}},
@@ -28,12 +53,79 @@ var diffs = []difftest{
{S{}, S{A: 1}, []string{`A: 0 != 1`}},
{new(S), &S{A: 1}, []string{`A: 0 != 1`}},
{S{S: new(S)}, S{S: &S{A: 1}}, []string{`S.A: 0 != 1`}},
- {S{}, S{I: 0}, []string{`I: nil != 0`}},
+ {S{}, S{I: 0}, []string{`I: nil != int(0)`}},
{S{I: 1}, S{I: "x"}, []string{`I: int != string`}},
{S{}, S{C: []int{1}}, []string{`C: []int[0] != []int[1]`}},
{S{C: []int{}}, S{C: []int{1}}, []string{`C: []int[0] != []int[1]`}},
{S{C: []int{1, 2, 3}}, S{C: []int{1, 2, 4}}, []string{`C[2]: 3 != 4`}},
- {S{}, S{A: 1, S: new(S)}, []string{`A: 0 != 1`, `S: nil != &{0 []}`}},
+ {S{}, S{A: 1, S: new(S)}, []string{`A: 0 != 1`, `S: nil != &pretty.S{}`}},
+
+ // unexported fields of every reflect.Kind (both equal and unequal)
+ {struct{ x bool }{false}, struct{ x bool }{false}, nil},
+ {struct{ x bool }{false}, struct{ x bool }{true}, []string{`x: false != true`}},
+ {struct{ x int }{0}, struct{ x int }{0}, nil},
+ {struct{ x int }{0}, struct{ x int }{1}, []string{`x: 0 != 1`}},
+ {struct{ x int8 }{0}, struct{ x int8 }{0}, nil},
+ {struct{ x int8 }{0}, struct{ x int8 }{1}, []string{`x: 0 != 1`}},
+ {struct{ x int16 }{0}, struct{ x int16 }{0}, nil},
+ {struct{ x int16 }{0}, struct{ x int16 }{1}, []string{`x: 0 != 1`}},
+ {struct{ x int32 }{0}, struct{ x int32 }{0}, nil},
+ {struct{ x int32 }{0}, struct{ x int32 }{1}, []string{`x: 0 != 1`}},
+ {struct{ x int64 }{0}, struct{ x int64 }{0}, nil},
+ {struct{ x int64 }{0}, struct{ x int64 }{1}, []string{`x: 0 != 1`}},
+ {struct{ x uint }{0}, struct{ x uint }{0}, nil},
+ {struct{ x uint }{0}, struct{ x uint }{1}, []string{`x: 0 != 1`}},
+ {struct{ x uint8 }{0}, struct{ x uint8 }{0}, nil},
+ {struct{ x uint8 }{0}, struct{ x uint8 }{1}, []string{`x: 0 != 1`}},
+ {struct{ x uint16 }{0}, struct{ x uint16 }{0}, nil},
+ {struct{ x uint16 }{0}, struct{ x uint16 }{1}, []string{`x: 0 != 1`}},
+ {struct{ x uint32 }{0}, struct{ x uint32 }{0}, nil},
+ {struct{ x uint32 }{0}, struct{ x uint32 }{1}, []string{`x: 0 != 1`}},
+ {struct{ x uint64 }{0}, struct{ x uint64 }{0}, nil},
+ {struct{ x uint64 }{0}, struct{ x uint64 }{1}, []string{`x: 0 != 1`}},
+ {struct{ x uintptr }{0}, struct{ x uintptr }{0}, nil},
+ {struct{ x uintptr }{0}, struct{ x uintptr }{1}, []string{`x: 0 != 1`}},
+ {struct{ x float32 }{0}, struct{ x float32 }{0}, nil},
+ {struct{ x float32 }{0}, struct{ x float32 }{1}, []string{`x: 0 != 1`}},
+ {struct{ x float64 }{0}, struct{ x float64 }{0}, nil},
+ {struct{ x float64 }{0}, struct{ x float64 }{1}, []string{`x: 0 != 1`}},
+ {struct{ x complex64 }{0}, struct{ x complex64 }{0}, nil},
+ {struct{ x complex64 }{0}, struct{ x complex64 }{1}, []string{`x: (0+0i) != (1+0i)`}},
+ {struct{ x complex128 }{0}, struct{ x complex128 }{0}, nil},
+ {struct{ x complex128 }{0}, struct{ x complex128 }{1}, []string{`x: (0+0i) != (1+0i)`}},
+ {struct{ x [1]int }{[1]int{0}}, struct{ x [1]int }{[1]int{0}}, nil},
+ {struct{ x [1]int }{[1]int{0}}, struct{ x [1]int }{[1]int{1}}, []string{`x[0]: 0 != 1`}},
+ {struct{ x chan int }{c0}, struct{ x chan int }{c0}, nil},
+ {struct{ x chan int }{c0}, struct{ x chan int }{c1}, []string{fmt.Sprintf("x: %p != %p", c0, c1)}},
+ {struct{ x func() }{f0}, struct{ x func() }{f0}, nil},
+ {struct{ x func() }{f0}, struct{ x func() }{f1}, []string{fmt.Sprintf("x: %p != %p", f0, f1)}},
+ {struct{ x interface{} }{0}, struct{ x interface{} }{0}, nil},
+ {struct{ x interface{} }{0}, struct{ x interface{} }{1}, []string{`x: 0 != 1`}},
+ {struct{ x interface{} }{0}, struct{ x interface{} }{""}, []string{`x: int != string`}},
+ {struct{ x interface{} }{0}, struct{ x interface{} }{nil}, []string{`x: int(0) != nil`}},
+ {struct{ x interface{} }{nil}, struct{ x interface{} }{0}, []string{`x: nil != int(0)`}},
+ {struct{ x map[int]int }{map[int]int{0: 0}}, struct{ x map[int]int }{map[int]int{0: 0}}, nil},
+ {struct{ x map[int]int }{map[int]int{0: 0}}, struct{ x map[int]int }{map[int]int{0: 1}}, []string{`x[0]: 0 != 1`}},
+ {struct{ x *int }{new(int)}, struct{ x *int }{new(int)}, nil},
+ {struct{ x *int }{&i0}, struct{ x *int }{&i1}, []string{`x: 0 != 1`}},
+ {struct{ x *int }{nil}, struct{ x *int }{&i0}, []string{`x: nil != &int(0)`}},
+ {struct{ x *int }{&i0}, struct{ x *int }{nil}, []string{`x: &int(0) != nil`}},
+ {struct{ x []int }{[]int{0}}, struct{ x []int }{[]int{0}}, nil},
+ {struct{ x []int }{[]int{0}}, struct{ x []int }{[]int{1}}, []string{`x[0]: 0 != 1`}},
+ {struct{ x string }{"a"}, struct{ x string }{"a"}, nil},
+ {struct{ x string }{"a"}, struct{ x string }{"b"}, []string{`x: "a" != "b"`}},
+ {struct{ x N }{N{0}}, struct{ x N }{N{0}}, nil},
+ {struct{ x N }{N{0}}, struct{ x N }{N{1}}, []string{`x.N: 0 != 1`}},
+ {
+ struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
+ struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
+ nil,
+ },
+ {
+ struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
+ struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(1))},
+ []string{`x: 0x0 != 0x1`},
+ },
}
func TestDiff(t *testing.T) {
@@ -54,6 +146,53 @@ func TestDiff(t *testing.T) {
}
}
+func TestKeyEqual(t *testing.T) {
+ var emptyInterfaceZero interface{} = 0
+
+ cases := []interface{}{
+ new(bool),
+ new(int),
+ new(int8),
+ new(int16),
+ new(int32),
+ new(int64),
+ new(uint),
+ new(uint8),
+ new(uint16),
+ new(uint32),
+ new(uint64),
+ new(uintptr),
+ new(float32),
+ new(float64),
+ new(complex64),
+ new(complex128),
+ new([1]int),
+ new(chan int),
+ new(unsafe.Pointer),
+ new(interface{}),
+ &emptyInterfaceZero,
+ new(*int),
+ new(string),
+ new(struct{ int }),
+ }
+
+ for _, test := range cases {
+ rv := reflect.ValueOf(test).Elem()
+ if !keyEqual(rv, rv) {
+ t.Errorf("keyEqual(%s, %s) = false want true", rv.Type(), rv.Type())
+ }
+ }
+}
+
+func TestFdiff(t *testing.T) {
+ var buf bytes.Buffer
+ Fdiff(&buf, 0, 1)
+ want := "0 != 1\n"
+ if got := buf.String(); got != want {
+ t.Errorf("Fdiff(0, 1) = %q want %q", got, want)
+ }
+}
+
func diffdiff(t *testing.T, got, exp []string) {
minus(t, "unexpected:", got, exp)
minus(t, "missing:", exp, got)
diff --git a/vendor/github.com/kr/pretty/formatter.go b/vendor/github.com/kr/pretty/formatter.go
index 8dacda25fa8..a317d7b8ee8 100644
--- a/vendor/github.com/kr/pretty/formatter.go
+++ b/vendor/github.com/kr/pretty/formatter.go
@@ -10,12 +10,8 @@ import (
"github.com/kr/text"
)
-const (
- limit = 50
-)
-
type formatter struct {
- x interface{}
+ v reflect.Value
force bool
quote bool
}
@@ -30,11 +26,11 @@ type formatter struct {
// format x according to the usual rules of package fmt.
// In particular, if x satisfies fmt.Formatter, then x.Format will be called.
func Formatter(x interface{}) (f fmt.Formatter) {
- return formatter{x: x, quote: true}
+ return formatter{v: reflect.ValueOf(x), quote: true}
}
func (fo formatter) String() string {
- return fmt.Sprint(fo.x) // unwrap it
+ return fmt.Sprint(fo.v.Interface()) // unwrap it
}
func (fo formatter) passThrough(f fmt.State, c rune) {
@@ -51,14 +47,14 @@ func (fo formatter) passThrough(f fmt.State, c rune) {
s += fmt.Sprintf(".%d", p)
}
s += string(c)
- fmt.Fprintf(f, s, fo.x)
+ fmt.Fprintf(f, s, fo.v.Interface())
}
func (fo formatter) Format(f fmt.State, c rune) {
if fo.force || c == 'v' && f.Flag('#') && f.Flag(' ') {
w := tabwriter.NewWriter(f, 4, 4, 1, ' ', 0)
p := &printer{tw: w, Writer: w, visited: make(map[visit]int)}
- p.printValue(reflect.ValueOf(fo.x), true, fo.quote)
+ p.printValue(fo.v, true, fo.quote)
w.Flush()
return
}
@@ -319,11 +315,6 @@ func (p *printer) fmtString(s string, quote bool) {
io.WriteString(p, s)
}
-func tryDeepEqual(a, b interface{}) bool {
- defer func() { recover() }()
- return reflect.DeepEqual(a, b)
-}
-
func writeByte(w io.Writer, b byte) {
w.Write([]byte{b})
}
diff --git a/vendor/github.com/kr/pretty/formatter_test.go b/vendor/github.com/kr/pretty/formatter_test.go
index 5f3204e8e87..c8c0b51531b 100644
--- a/vendor/github.com/kr/pretty/formatter_test.go
+++ b/vendor/github.com/kr/pretty/formatter_test.go
@@ -13,6 +13,11 @@ type test struct {
s string
}
+type passtest struct {
+ v interface{}
+ f, s string
+}
+
type LongStructTypeName struct {
longFieldName interface{}
otherLongFieldName interface{}
@@ -33,8 +38,30 @@ func (f F) Format(s fmt.State, c rune) {
fmt.Fprintf(s, "F(%d)", int(f))
}
+type Stringer struct { i int }
+
+func (s *Stringer) String() string { return "foo" }
+
var long = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
+var passthrough = []passtest{
+ {1, "%d", "1"},
+ {"a", "%s", "a"},
+ {&Stringer{}, "%s", "foo"},
+}
+
+func TestPassthrough(t *testing.T) {
+ for _, tt := range passthrough {
+ s := fmt.Sprintf(tt.f, Formatter(tt.v))
+ if tt.s != s {
+ t.Errorf("expected %q", tt.s)
+ t.Errorf("got %q", s)
+ t.Errorf("expraw\n%s", tt.s)
+ t.Errorf("gotraw\n%s", s)
+ }
+ }
+}
+
var gosyntax = []test{
{nil, `nil`},
{"", `""`},
diff --git a/vendor/github.com/kr/pretty/pretty.go b/vendor/github.com/kr/pretty/pretty.go
index d3df8686ce8..49423ec7f54 100644
--- a/vendor/github.com/kr/pretty/pretty.go
+++ b/vendor/github.com/kr/pretty/pretty.go
@@ -11,6 +11,7 @@ import (
"fmt"
"io"
"log"
+ "reflect"
)
// Errorf is a convenience wrapper for fmt.Errorf.
@@ -81,6 +82,15 @@ func Println(a ...interface{}) (n int, errno error) {
return fmt.Println(wrap(a, true)...)
}
+// Sprint is a convenience wrapper for fmt.Sprintf.
+//
+// Calling Sprint(x, y) is equivalent to
+// fmt.Sprint(Formatter(x), Formatter(y)), but each operand is
+// formatted with "%# v".
+func Sprint(a ...interface{}) string {
+ return fmt.Sprint(wrap(a, true)...)
+}
+
// Sprintf is a convenience wrapper for fmt.Sprintf.
//
// Calling Sprintf(f, x, y) is equivalent to
@@ -92,7 +102,7 @@ func Sprintf(format string, a ...interface{}) string {
func wrap(a []interface{}, force bool) []interface{} {
w := make([]interface{}, len(a))
for i, x := range a {
- w[i] = formatter{x: x, force: force}
+ w[i] = formatter{v: reflect.ValueOf(x), force: force}
}
return w
}
diff --git a/vendor/github.com/kr/s3/License b/vendor/github.com/kr/s3/License
deleted file mode 100644
index 4abc7488905..00000000000
--- a/vendor/github.com/kr/s3/License
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2012 Keith Rarick.
-
-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/kr/s3/Readme b/vendor/github.com/kr/s3/Readme
deleted file mode 100644
index 93b53595271..00000000000
--- a/vendor/github.com/kr/s3/Readme
+++ /dev/null
@@ -1,4 +0,0 @@
-Package s3 signs HTTP requests for use with Amazon’s S3 API.
-
-Documentation:
-http://godoc.org/github.com/kr/s3
diff --git a/vendor/github.com/kr/s3/s3util/Readme b/vendor/github.com/kr/s3/s3util/Readme
deleted file mode 100644
index 97c4a9de3d3..00000000000
--- a/vendor/github.com/kr/s3/s3util/Readme
+++ /dev/null
@@ -1,4 +0,0 @@
-Package s3util provides streaming transfers to and from Amazon S3.
-
-Full documentation:
-http://godoc.org/github.com/kr/s3/s3util
diff --git a/vendor/github.com/kr/s3/s3util/config.go b/vendor/github.com/kr/s3/s3util/config.go
deleted file mode 100644
index aeae14ac4e7..00000000000
--- a/vendor/github.com/kr/s3/s3util/config.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Package s3util provides streaming transfers to and from Amazon S3.
-//
-// To use it, open or create an S3 object, read or write data,
-// and close the object.
-//
-// You must assign valid credentials to DefaultConfig.Keys before using
-// DefaultConfig. Be sure to close an io.WriteCloser returned by this package,
-// to flush buffers and complete the multipart upload process.
-package s3util
-
-// TODO(kr): parse error responses; return structured data
-
-import (
- "github.com/kr/s3"
- "net/http"
-)
-
-var DefaultConfig = &Config{
- Service: s3.DefaultService,
- Keys: new(s3.Keys),
-}
-
-type Config struct {
- *s3.Service
- *s3.Keys
- *http.Client // if nil, uses http.DefaultClient
-}
diff --git a/vendor/github.com/kr/s3/s3util/error.go b/vendor/github.com/kr/s3/s3util/error.go
deleted file mode 100644
index 8f512f46811..00000000000
--- a/vendor/github.com/kr/s3/s3util/error.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package s3util
-
-import (
- "bytes"
- "fmt"
- "io"
- "net/http"
-)
-
-type respError struct {
- r *http.Response
- b bytes.Buffer
-}
-
-func newRespError(r *http.Response) *respError {
- e := new(respError)
- e.r = r
- io.Copy(&e.b, r.Body)
- r.Body.Close()
- return e
-}
-
-func (e *respError) Error() string {
- return fmt.Sprintf(
- "unwanted http status %d: %q",
- e.r.StatusCode,
- e.b.String(),
- )
-}
diff --git a/vendor/github.com/kr/s3/s3util/open.go b/vendor/github.com/kr/s3/s3util/open.go
deleted file mode 100644
index 3f6ae9c5d83..00000000000
--- a/vendor/github.com/kr/s3/s3util/open.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package s3util
-
-import (
- "io"
- "net/http"
- "time"
-)
-
-// Open requests the S3 object at url. An HTTP status other than 200 is
-// considered an error.
-//
-// If c is nil, Open uses DefaultConfig.
-func Open(url string, c *Config) (io.ReadCloser, error) {
- if c == nil {
- c = DefaultConfig
- }
- // TODO(kr): maybe parallel range fetching
- r, _ := http.NewRequest("GET", url, nil)
- r.Header.Set("Date", time.Now().UTC().Format(http.TimeFormat))
- c.Sign(r, *c.Keys)
- client := c.Client
- if client == nil {
- client = http.DefaultClient
- }
- resp, err := client.Do(r)
- if err != nil {
- return nil, err
- }
- if resp.StatusCode != 200 {
- return nil, newRespError(resp)
- }
- return resp.Body, nil
-}
diff --git a/vendor/github.com/kr/s3/s3util/readdir.go b/vendor/github.com/kr/s3/s3util/readdir.go
deleted file mode 100644
index d14d6002a34..00000000000
--- a/vendor/github.com/kr/s3/s3util/readdir.go
+++ /dev/null
@@ -1,208 +0,0 @@
-package s3util
-
-import (
- "bytes"
- "encoding/xml"
- "errors"
- "io"
- "net/http"
- "net/url"
- "os"
- "strconv"
- "strings"
- "time"
-)
-
-// File represents an S3 object or directory.
-type File struct {
- url string
- prefix string
- config *Config
- result *listObjectsResult
-}
-
-type fileInfo struct {
- name string
- size int64
- dir bool
- modTime time.Time
- sys *Stat
-}
-
-// Stat contains information about an S3 object or directory.
-// It is the "underlying data source" returned by method Sys
-// for each FileInfo produced by this package.
-// fi.Sys().(*s3util.Stat)
-// For the meaning of these fields, see
-// http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGET.html.
-type Stat struct {
- Key string
- LastModified string
- ETag string // ETag value, without double quotes.
- Size string
- StorageClass string
- OwnerID string `xml:"Owner>ID"`
- OwnerName string `xml:"Owner>DisplayName"`
-}
-
-type listObjectsResult struct {
- IsTruncated bool
- Contents []Stat
- Directories []string `xml:"CommonPrefixes>Prefix"` // Suffix "/" trimmed
-}
-
-func (f *fileInfo) Name() string { return f.name }
-func (f *fileInfo) Size() int64 { return f.size }
-func (f *fileInfo) Mode() os.FileMode {
- if f.dir {
- return 0755 | os.ModeDir
- }
- return 0644
-}
-func (f *fileInfo) ModTime() time.Time {
- if f.modTime.IsZero() && f.sys != nil {
- // we return the zero value if a parse error ever happens.
- f.modTime, _ = time.Parse(time.RFC3339Nano, f.sys.LastModified)
- }
- return f.modTime
-}
-func (f *fileInfo) IsDir() bool { return f.dir }
-func (f *fileInfo) Sys() interface{} { return f.sys }
-
-// NewFile returns a new File with the given URL and config.
-//
-// Set rawurl to a directory on S3, such as
-// https://mybucket.s3.amazonaws.com/myfolder.
-// The URL cannot have query parameters or a fragment.
-// If c is nil, DefaultConfig will be used.
-func NewFile(rawurl string, c *Config) (*File, error) {
- u, err := url.Parse(rawurl)
- if err != nil {
- return nil, err
- }
- if u.RawQuery != "" {
- return nil, errors.New("url cannot have raw query parameters.")
- }
- if u.Fragment != "" {
- return nil, errors.New("url cannot have a fragment.")
- }
-
- prefix := strings.TrimLeft(u.Path, "/")
- if prefix != "" && !strings.HasSuffix(prefix, "/") {
- prefix += "/"
- }
- u.Path = ""
- return &File{u.String(), prefix, c, nil}, nil
-}
-
-// Readdir requests a list of entries in the S3 directory
-// represented by f and returns a slice of up to n FileInfo
-// values, in alphabetical order. Subsequent calls
-// on the same File will yield further FileInfos.
-// Only direct children are returned, not deeper descendants.
-func (f *File) Readdir(n int) ([]os.FileInfo, error) {
- if f.result != nil && !f.result.IsTruncated {
- return make([]os.FileInfo, 0), io.EOF
- }
-
- reader, err := f.sendRequest(n)
- if err != nil {
- return nil, err
- }
- defer reader.Close()
-
- return f.parseResponse(reader)
-}
-
-func (f *File) sendRequest(count int) (io.ReadCloser, error) {
- c := f.config
- if c == nil {
- c = DefaultConfig
- }
- var buf bytes.Buffer
- buf.WriteString(f.url)
- buf.WriteString("?delimiter=%2F")
- if f.prefix != "" {
- buf.WriteString("&prefix=")
- buf.WriteString(url.QueryEscape(f.prefix))
- }
- if count > 0 {
- buf.WriteString("&max-keys=")
- buf.WriteString(strconv.Itoa(count))
- }
- if f.result != nil && f.result.IsTruncated {
- var lastDir, lastKey, marker string
- if len(f.result.Directories) > 0 {
- lastDir = f.result.Directories[len(f.result.Directories)-1]
- }
- if len(f.result.Contents) > 0 {
- lastKey = f.result.Contents[len(f.result.Contents)-1].Key
- }
-
- if lastKey > lastDir {
- marker = lastKey
- } else {
- marker = lastDir
- }
-
- if marker != "" {
- buf.WriteString("&marker=")
- buf.WriteString(url.QueryEscape(marker))
- }
- }
- u := buf.String()
- r, _ := http.NewRequest("GET", u, nil)
- r.Header.Set("Date", time.Now().UTC().Format(http.TimeFormat))
- c.Sign(r, *c.Keys)
- resp, err := http.DefaultClient.Do(r)
- if err != nil {
- return nil, err
- }
- if resp.StatusCode != 200 {
- return nil, newRespError(resp)
- }
- return resp.Body, nil
-}
-
-func (f *File) parseResponse(reader io.Reader) ([]os.FileInfo, error) {
- decoder := xml.NewDecoder(reader)
- result := listObjectsResult{}
- var err error
- err = decoder.Decode(&result)
- if err != nil {
- return nil, err
- }
-
- infos := make([]os.FileInfo, len(result.Contents)+len(result.Directories))
- var size int64
- var name string
- var is_dir bool
- for i, content := range result.Contents {
- c := content
- c.ETag = strings.Trim(c.ETag, `"`)
- size, _ = strconv.ParseInt(c.Size, 10, 0)
- if size == 0 && strings.HasSuffix(c.Key, "/") {
- name = strings.TrimRight(c.Key, "/")
- is_dir = true
- } else {
- name = c.Key
- is_dir = false
- }
- infos[i] = &fileInfo{
- name: name,
- size: size,
- dir: is_dir,
- sys: &c,
- }
- }
- for i, dir := range result.Directories {
- infos[len(result.Contents)+i] = &fileInfo{
- name: strings.TrimRight(dir, "/"),
- size: 0,
- dir: true,
- }
- }
- f.result = &result
-
- return infos, nil
-}
diff --git a/vendor/github.com/kr/s3/s3util/uploader.go b/vendor/github.com/kr/s3/s3util/uploader.go
deleted file mode 100644
index 1a21511bd29..00000000000
--- a/vendor/github.com/kr/s3/s3util/uploader.go
+++ /dev/null
@@ -1,267 +0,0 @@
-package s3util
-
-import (
- "bytes"
- "encoding/xml"
- "github.com/kr/s3"
- "fmt"
- "io"
- "net/http"
- "net/url"
- "strconv"
- "sync"
- "syscall"
- "time"
-)
-
-// defined by amazon
-const (
- minPartSize = 5 * 1024 * 1024
- maxPartSize = 1<<31 - 1 // for 32-bit use; amz max is 5GiB
- maxObjSize = 5 * 1024 * 1024 * 1024 * 1024
- maxNPart = 10000
-)
-
-const (
- concurrency = 5
- nTry = 2
-)
-
-type part struct {
- r io.ReadSeeker
- len int64
-
- // read by xml encoder
- PartNumber int
- ETag string
-}
-
-type uploader struct {
- s3 s3.Service
- keys s3.Keys
- url string
- client *http.Client
- UploadId string // written by xml decoder
-
- bufsz int64
- buf []byte
- off int
- ch chan *part
- part int
- closed bool
- err error
- wg sync.WaitGroup
-
- xml struct {
- XMLName string `xml:"CompleteMultipartUpload"`
- Part []*part
- }
-}
-
-// Create creates an S3 object at url and sends multipart upload requests as
-// data is written.
-//
-// If h is not nil, each of its entries is added to the HTTP request header.
-// If c is nil, Create uses DefaultConfig.
-func Create(url string, h http.Header, c *Config) (io.WriteCloser, error) {
- if c == nil {
- c = DefaultConfig
- }
- return newUploader(url, h, c)
-}
-
-// Sends an S3 multipart upload initiation request.
-// See http://docs.amazonwebservices.com/AmazonS3/latest/dev/mpuoverview.html.
-// This initial request returns an UploadId that we use to identify
-// subsequent PUT requests.
-func newUploader(url string, h http.Header, c *Config) (u *uploader, err error) {
- u = new(uploader)
- u.s3 = *c.Service
- u.url = url
- u.keys = *c.Keys
- u.client = c.Client
- if u.client == nil {
- u.client = http.DefaultClient
- }
- u.bufsz = minPartSize
- r, err := http.NewRequest("POST", url+"?uploads", nil)
- if err != nil {
- return nil, err
- }
- r.Header.Set("Date", time.Now().UTC().Format(http.TimeFormat))
- for k := range h {
- for _, v := range h[k] {
- r.Header.Add(k, v)
- }
- }
- u.s3.Sign(r, u.keys)
- resp, err := u.client.Do(r)
- if err != nil {
- return nil, err
- }
- defer resp.Body.Close()
- if resp.StatusCode != 200 {
- return nil, newRespError(resp)
- }
- err = xml.NewDecoder(resp.Body).Decode(u)
- if err != nil {
- return nil, err
- }
- u.ch = make(chan *part)
- for i := 0; i < concurrency; i++ {
- go u.worker()
- }
- return u, nil
-}
-
-func (u *uploader) Write(p []byte) (n int, err error) {
- if u.closed {
- return 0, syscall.EINVAL
- }
- if u.err != nil {
- return 0, u.err
- }
- for n < len(p) {
- if cap(u.buf) == 0 {
- u.buf = make([]byte, int(u.bufsz))
- // Increase part size (1.001x).
- // This lets us reach the max object size (5TiB) while
- // still doing minimal buffering for small objects.
- u.bufsz = min(u.bufsz+u.bufsz/1000, maxPartSize)
- }
- r := copy(u.buf[u.off:], p[n:])
- u.off += r
- n += r
- if u.off == len(u.buf) {
- u.flush()
- }
- }
- return n, nil
-}
-
-func (u *uploader) flush() {
- u.wg.Add(1)
- u.part++
- p := &part{bytes.NewReader(u.buf[:u.off]), int64(u.off), u.part, ""}
- u.xml.Part = append(u.xml.Part, p)
- u.ch <- p
- u.buf, u.off = nil, 0
-}
-
-func (u *uploader) worker() {
- for p := range u.ch {
- u.retryUploadPart(p)
- }
-}
-
-// Calls putPart up to nTry times to recover from transient errors.
-func (u *uploader) retryUploadPart(p *part) {
- defer u.wg.Done()
- defer func() { p.r = nil }() // free the large buffer
- var err error
- for i := 0; i < nTry; i++ {
- p.r.Seek(0, 0)
- err = u.putPart(p)
- if err == nil {
- return
- }
- }
- u.err = err
-}
-
-// Uploads part p, reading its contents from p.r.
-// Stores the ETag in p.ETag.
-func (u *uploader) putPart(p *part) error {
- v := url.Values{}
- v.Set("partNumber", strconv.Itoa(p.PartNumber))
- v.Set("uploadId", u.UploadId)
- req, err := http.NewRequest("PUT", u.url+"?"+v.Encode(), p.r)
- if err != nil {
- return err
- }
- req.ContentLength = p.len
- req.Header.Set("Date", time.Now().UTC().Format(http.TimeFormat))
- u.s3.Sign(req, u.keys)
- resp, err := u.client.Do(req)
- if err != nil {
- return err
- }
- defer resp.Body.Close()
- if resp.StatusCode != 200 {
- return newRespError(resp)
- }
- s := resp.Header.Get("etag") // includes quote chars for some reason
- if len(s) < 2 {
- return fmt.Errorf("received invalid etag %q", s)
- }
- p.ETag = s[1 : len(s)-1]
- return nil
-}
-
-func (u *uploader) Close() error {
- if u.closed {
- return syscall.EINVAL
- }
- if cap(u.buf) > 0 {
- u.flush()
- }
- u.wg.Wait()
- close(u.ch)
- u.closed = true
- if u.err != nil {
- u.abort()
- return u.err
- }
-
- body, err := xml.Marshal(u.xml)
- if err != nil {
- return err
- }
- b := bytes.NewBuffer(body)
- v := url.Values{}
- v.Set("uploadId", u.UploadId)
- req, err := http.NewRequest("POST", u.url+"?"+v.Encode(), b)
- if err != nil {
- return err
- }
- req.Header.Set("Date", time.Now().UTC().Format(http.TimeFormat))
- u.s3.Sign(req, u.keys)
- resp, err := u.client.Do(req)
- if err != nil {
- return err
- }
- if resp.StatusCode != 200 {
- return newRespError(resp)
- }
- resp.Body.Close()
- return nil
-}
-
-func (u *uploader) abort() {
- // TODO(kr): devise a reasonable way to report an error here in addition
- // to the error that caused the abort.
- v := url.Values{}
- v.Set("uploadId", u.UploadId)
- s := u.url + "?" + v.Encode()
- req, err := http.NewRequest("DELETE", s, nil)
- if err != nil {
- return
- }
- req.Header.Set("Date", time.Now().UTC().Format(http.TimeFormat))
- u.s3.Sign(req, u.keys)
- resp, err := u.client.Do(req)
- if err != nil {
- return
- }
- defer resp.Body.Close()
- if resp.StatusCode != 200 {
- return
- }
-}
-
-func min(a, b int64) int64 {
- if a < b {
- return a
- }
- return b
-}
diff --git a/vendor/github.com/kr/s3/sign.go b/vendor/github.com/kr/s3/sign.go
deleted file mode 100644
index 0ff2d483bb4..00000000000
--- a/vendor/github.com/kr/s3/sign.go
+++ /dev/null
@@ -1,200 +0,0 @@
-// Package s3 signs HTTP requests for Amazon S3 and compatible services.
-package s3
-
-// See
-// http://docs.amazonwebservices.com/AmazonS3/2006-03-01/dev/RESTAuthentication.html.
-
-import (
- "crypto/hmac"
- "crypto/sha1"
- "encoding/base64"
- "io"
- "net/http"
- "sort"
- "strings"
-)
-
-var signParams = map[string]bool{
- "acl": true,
- "delete": true,
- "lifecycle": true,
- "location": true,
- "logging": true,
- "notification": true,
- "partNumber": true,
- "policy": true,
- "requestPayment": true,
- "response-cache-control": true,
- "response-content-disposition": true,
- "response-content-encoding": true,
- "response-content-language": true,
- "response-content-type": true,
- "response-expires": true,
- "restore": true,
- "torrent": true,
- "uploadId": true,
- "uploads": true,
- "versionId": true,
- "versioning": true,
- "versions": true,
- "website": true,
-}
-
-// Keys holds a set of Amazon Security Credentials.
-type Keys struct {
- AccessKey string
- SecretKey string
-
- // SecurityToken is used for temporary security credentials.
- // If set, it will be added to header field X-Amz-Security-Token
- // before signing a request.
- SecurityToken string
- // See http://docs.aws.amazon.com/AmazonS3/latest/dev/MakingRequests.html#TypesofSecurityCredentials
-}
-
-// IdentityBucket returns subdomain.
-// It is designed to be used with S3-compatible services that
-// treat the entire subdomain as the bucket name, for example
-// storage.io.
-func IdentityBucket(subdomain string) string {
- return subdomain
-}
-
-// AmazonBucket returns everything up to the last '.' in subdomain.
-// It is designed to be used with the Amazon service.
-// "johnsmith.s3" becomes "johnsmith"
-// "johnsmith.s3-eu-west-1" becomes "johnsmith"
-// "www.example.com.s3" becomes "www.example.com"
-func AmazonBucket(subdomain string) string {
- if i := strings.LastIndex(subdomain, "."); i != -1 {
- return subdomain[:i]
- }
- return ""
-}
-
-// DefaultService is the default Service used by Sign.
-var DefaultService = &Service{Domain: "amazonaws.com"}
-
-// Sign signs an HTTP request with the given S3 keys.
-//
-// This function is a wrapper around DefaultService.Sign.
-func Sign(r *http.Request, k Keys) {
- DefaultService.Sign(r, k)
-}
-
-// Service represents an S3-compatible service.
-type Service struct {
- // Domain is the service's root domain. It is used to extract
- // the subdomain from an http.Request before passing the
- // subdomain to Bucket.
- Domain string
-
- // Bucket derives the bucket name from a subdomain.
- // If nil, AmazonBucket is used.
- Bucket func(subdomain string) string
-}
-
-// Sign signs an HTTP request with the given S3 keys for use on service s.
-func (s *Service) Sign(r *http.Request, k Keys) {
- if k.SecurityToken != "" {
- r.Header.Set("X-Amz-Security-Token", k.SecurityToken)
- }
- h := hmac.New(sha1.New, []byte(k.SecretKey))
- s.writeSigData(h, r)
- sig := make([]byte, base64.StdEncoding.EncodedLen(h.Size()))
- base64.StdEncoding.Encode(sig, h.Sum(nil))
- r.Header.Set("Authorization", "AWS "+k.AccessKey+":"+string(sig))
-}
-
-func (s *Service) writeSigData(w io.Writer, r *http.Request) {
- w.Write([]byte(r.Method))
- w.Write([]byte{'\n'})
- w.Write([]byte(r.Header.Get("content-md5")))
- w.Write([]byte{'\n'})
- w.Write([]byte(r.Header.Get("content-type")))
- w.Write([]byte{'\n'})
- if _, ok := r.Header["X-Amz-Date"]; !ok {
- w.Write([]byte(r.Header.Get("date")))
- }
- w.Write([]byte{'\n'})
- writeAmzHeaders(w, r)
- s.writeResource(w, r)
-}
-
-func (s *Service) writeResource(w io.Writer, r *http.Request) {
- s.writeVhostBucket(w, strings.ToLower(r.Host))
- path := r.URL.RequestURI()
- if r.URL.RawQuery != "" {
- path = path[:len(path)-len(r.URL.RawQuery)-1]
- }
- w.Write([]byte(path))
- s.writeSubResource(w, r)
-}
-
-func (s *Service) writeVhostBucket(w io.Writer, host string) {
- if i := strings.Index(host, ":"); i != -1 {
- host = host[:i]
- }
-
- if host == s.Domain {
- // no vhost - do nothing
- } else if strings.HasSuffix(host, "."+s.Domain) {
- // vhost - bucket may be in prefix
- b := s.Bucket
- if b == nil {
- b = AmazonBucket
- }
- bucket := b(host[:len(host)-len(s.Domain)-1])
-
- if bucket != "" {
- w.Write([]byte{'/'})
- w.Write([]byte(bucket))
- }
- } else {
- // cname - bucket is host
- w.Write([]byte{'/'})
- w.Write([]byte(host))
- }
-}
-
-func (s *Service) writeSubResource(w io.Writer, r *http.Request) {
- var a []string
- for k, vs := range r.URL.Query() {
- if signParams[k] {
- for _, v := range vs {
- if v == "" {
- a = append(a, k)
- } else {
- a = append(a, k+"="+v)
- }
- }
- }
- }
- sort.Strings(a)
- var p byte = '?'
- for _, s := range a {
- w.Write([]byte{p})
- w.Write([]byte(s))
- p = '&'
- }
-}
-
-func writeAmzHeaders(w io.Writer, r *http.Request) {
- var keys []string
- for k, _ := range r.Header {
- if strings.HasPrefix(strings.ToLower(k), "x-amz-") {
- keys = append(keys, k)
- }
- }
-
- sort.Strings(keys)
- var a []string
- for _, k := range keys {
- v := r.Header[k]
- a = append(a, strings.ToLower(k)+":"+strings.Join(v, ","))
- }
- for _, h := range a {
- w.Write([]byte(h))
- w.Write([]byte{'\n'})
- }
-}
diff --git a/vendor/github.com/kr/text/colwriter/Readme b/vendor/github.com/kr/text/colwriter/Readme
deleted file mode 100644
index 1c1f4e68393..00000000000
--- a/vendor/github.com/kr/text/colwriter/Readme
+++ /dev/null
@@ -1,5 +0,0 @@
-Package colwriter provides a write filter that formats
-input lines in multiple columns.
-
-The package is a straightforward translation from
-/src/cmd/draw/mc.c in Plan 9 from User Space.
diff --git a/vendor/github.com/kr/text/colwriter/column.go b/vendor/github.com/kr/text/colwriter/column.go
deleted file mode 100644
index 7302ce9f7a8..00000000000
--- a/vendor/github.com/kr/text/colwriter/column.go
+++ /dev/null
@@ -1,147 +0,0 @@
-// Package colwriter provides a write filter that formats
-// input lines in multiple columns.
-//
-// The package is a straightforward translation from
-// /src/cmd/draw/mc.c in Plan 9 from User Space.
-package colwriter
-
-import (
- "bytes"
- "io"
- "unicode/utf8"
-)
-
-const (
- tab = 4
-)
-
-const (
- // Print each input line ending in a colon ':' separately.
- BreakOnColon uint = 1 << iota
-)
-
-// A Writer is a filter that arranges input lines in as many columns as will
-// fit in its width. Tab '\t' chars in the input are translated to sequences
-// of spaces ending at multiples of 4 positions.
-//
-// If BreakOnColon is set, each input line ending in a colon ':' is written
-// separately.
-//
-// The Writer assumes that all Unicode code points have the same width; this
-// may not be true in some fonts.
-type Writer struct {
- w io.Writer
- buf []byte
- width int
- flag uint
-}
-
-// NewWriter allocates and initializes a new Writer writing to w.
-// Parameter width controls the total number of characters on each line
-// across all columns.
-func NewWriter(w io.Writer, width int, flag uint) *Writer {
- return &Writer{
- w: w,
- width: width,
- flag: flag,
- }
-}
-
-// Write writes p to the writer w. The only errors returned are ones
-// encountered while writing to the underlying output stream.
-func (w *Writer) Write(p []byte) (n int, err error) {
- var linelen int
- var lastWasColon bool
- for i, c := range p {
- w.buf = append(w.buf, c)
- linelen++
- if c == '\t' {
- w.buf[len(w.buf)-1] = ' '
- for linelen%tab != 0 {
- w.buf = append(w.buf, ' ')
- linelen++
- }
- }
- if w.flag&BreakOnColon != 0 && c == ':' {
- lastWasColon = true
- } else if lastWasColon {
- if c == '\n' {
- pos := bytes.LastIndex(w.buf[:len(w.buf)-1], []byte{'\n'})
- if pos < 0 {
- pos = 0
- }
- line := w.buf[pos:]
- w.buf = w.buf[:pos]
- if err = w.columnate(); err != nil {
- if len(line) < i {
- return i - len(line), err
- }
- return 0, err
- }
- if n, err := w.w.Write(line); err != nil {
- if r := len(line) - n; r < i {
- return i - r, err
- }
- return 0, err
- }
- }
- lastWasColon = false
- }
- if c == '\n' {
- linelen = 0
- }
- }
- return len(p), nil
-}
-
-// Flush should be called after the last call to Write to ensure that any data
-// buffered in the Writer is written to output.
-func (w *Writer) Flush() error {
- return w.columnate()
-}
-
-func (w *Writer) columnate() error {
- words := bytes.Split(w.buf, []byte{'\n'})
- w.buf = nil
- if len(words[len(words)-1]) == 0 {
- words = words[:len(words)-1]
- }
- maxwidth := 0
- for _, wd := range words {
- if n := utf8.RuneCount(wd); n > maxwidth {
- maxwidth = n
- }
- }
- maxwidth++ // space char
- wordsPerLine := w.width / maxwidth
- if wordsPerLine <= 0 {
- wordsPerLine = 1
- }
- nlines := (len(words) + wordsPerLine - 1) / wordsPerLine
- for i := 0; i < nlines; i++ {
- col := 0
- endcol := 0
- for j := i; j < len(words); j += nlines {
- endcol += maxwidth
- _, err := w.w.Write(words[j])
- if err != nil {
- return err
- }
- col += utf8.RuneCount(words[j])
- if j+nlines < len(words) {
- for col < endcol {
- _, err := w.w.Write([]byte{' '})
- if err != nil {
- return err
- }
- col++
- }
- }
- }
- _, err := w.w.Write([]byte{'\n'})
- if err != nil {
- return err
- }
- }
- return nil
-}
diff --git a/vendor/github.com/kr/text/colwriter/column_test.go b/vendor/github.com/kr/text/colwriter/column_test.go
deleted file mode 100644
index ce388f5a260..00000000000
--- a/vendor/github.com/kr/text/colwriter/column_test.go
+++ /dev/null
@@ -1,90 +0,0 @@
-package colwriter
-
-import (
- "bytes"
- "testing"
-)
-
-var src = `
-.git
-.gitignore
-.godir
-Procfile:
-README.md
-api.go
-apps.go
-auth.go
-darwin.go
-data.go
-dyno.go:
-env.go
-git.go
-help.go
-hkdist
-linux.go
-ls.go
-main.go
-plugin.go
-run.go
-scale.go
-ssh.go
-tail.go
-term
-unix.go
-update.go
-version.go
-windows.go
-`[1:]
-
-var tests = []struct {
- wid int
- flag uint
- src string
- want string
-}{
- {80, 0, "", ""},
- {80, 0, src, `
-.git README.md darwin.go git.go ls.go scale.go unix.go
-.gitignore api.go data.go help.go main.go ssh.go update.go
-.godir apps.go dyno.go: hkdist plugin.go tail.go version.go
-Procfile: auth.go env.go linux.go run.go term windows.go
-`[1:]},
- {80, BreakOnColon, src, `
-.git .gitignore .godir
-
-Procfile:
-README.md api.go apps.go auth.go darwin.go data.go
-
-dyno.go:
-env.go hkdist main.go scale.go term version.go
-git.go linux.go plugin.go ssh.go unix.go windows.go
-help.go ls.go run.go tail.go update.go
-`[1:]},
- {20, 0, `
-Hello
-Γειά σου
-안녕
-今日は
-`[1:], `
-Hello 안녕
-Γειά σου 今日は
-`[1:]},
-}
-
-func TestWriter(t *testing.T) {
- for _, test := range tests {
- b := new(bytes.Buffer)
- w := NewWriter(b, test.wid, test.flag)
- if _, err := w.Write([]byte(test.src)); err != nil {
- t.Error(err)
- }
- if err := w.Flush(); err != nil {
- t.Error(err)
- }
- if g := b.String(); test.want != g {
- t.Log("\n" + test.want)
- t.Log("\n" + g)
- t.Errorf("%q != %q", test.want, g)
- }
- }
-}
diff --git a/vendor/github.com/kr/text/mc/Readme b/vendor/github.com/kr/text/mc/Readme
deleted file mode 100644
index 519ddc00a13..00000000000
--- a/vendor/github.com/kr/text/mc/Readme
+++ /dev/null
@@ -1,9 +0,0 @@
-Command mc prints in multiple columns.
-
- Usage: mc [-] [-N] [file...]
-
-Mc splits the input into as many columns as will fit in N
-print positions. If the output is a tty, the default N is
-the number of characters in a terminal line; otherwise the
-default N is 80. Under option - each input line ending in
-a colon ':' is printed separately.
diff --git a/vendor/github.com/kr/text/mc/mc.go b/vendor/github.com/kr/text/mc/mc.go
deleted file mode 100644
index 00169a30f16..00000000000
--- a/vendor/github.com/kr/text/mc/mc.go
+++ /dev/null
@@ -1,62 +0,0 @@
-// Command mc prints in multiple columns.
-//
-// Usage: mc [-] [-N] [file...]
-//
-// Mc splits the input into as many columns as will fit in N
-// print positions. If the output is a tty, the default N is
-// the number of characters in a terminal line; otherwise the
-// default N is 80. Under option - each input line ending in
-// a colon ':' is printed separately.
-package main
-
-import (
- "github.com/kr/pty"
- "github.com/kr/text/colwriter"
- "io"
- "log"
- "os"
- "strconv"
-)
-
-func main() {
- var width int
- var flag uint
- args := os.Args[1:]
- for len(args) > 0 && len(args[0]) > 0 && args[0][0] == '-' {
- if len(args[0]) > 1 {
- width, _ = strconv.Atoi(args[0][1:])
- } else {
- flag |= colwriter.BreakOnColon
- }
- args = args[1:]
- }
- if width < 1 {
- _, width, _ = pty.Getsize(os.Stdout)
- }
- if width < 1 {
- width = 80
- }
-
- w := colwriter.NewWriter(os.Stdout, width, flag)
- if len(args) > 0 {
- for _, s := range args {
- if f, err := os.Open(s); err == nil {
- copyin(w, f)
- f.Close()
- } else {
- log.Println(err)
- }
- }
- } else {
- copyin(w, os.Stdin)
- }
-}
-
-func copyin(w *colwriter.Writer, r io.Reader) {
- if _, err := io.Copy(w, r); err != nil {
- log.Println(err)
- }
- if err := w.Flush(); err != nil {
- log.Println(err)
- }
-}
diff --git a/vendor/github.com/lib/pq/.gitignore b/vendor/github.com/lib/pq/.gitignore
new file mode 100644
index 00000000000..0f1d00e1196
--- /dev/null
+++ b/vendor/github.com/lib/pq/.gitignore
@@ -0,0 +1,4 @@
+.db
+*.test
+*~
+*.swp
diff --git a/vendor/github.com/lib/pq/.travis.sh b/vendor/github.com/lib/pq/.travis.sh
new file mode 100755
index 00000000000..ead01df739b
--- /dev/null
+++ b/vendor/github.com/lib/pq/.travis.sh
@@ -0,0 +1,98 @@
+#!/bin/bash
+
+set -eu
+
+client_configure() {
+ sudo chmod 600 $PQSSLCERTTEST_PATH/postgresql.key
+}
+
+pgdg_repository() {
+ local sourcelist='sources.list.d/postgresql.list'
+
+ curl -sS 'https://www.postgresql.org/media/keys/ACCC4CF8.asc' | sudo apt-key add -
+ echo deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main $PGVERSION | sudo tee "/etc/apt/$sourcelist"
+ sudo apt-get -o Dir::Etc::sourcelist="$sourcelist" -o Dir::Etc::sourceparts='-' -o APT::Get::List-Cleanup='0' update
+}
+
+postgresql_configure() {
+ sudo tee /etc/postgresql/$PGVERSION/main/pg_hba.conf > /dev/null <<-config
+ local all all trust
+ hostnossl all pqgossltest 127.0.0.1/32 reject
+ hostnossl all pqgosslcert 127.0.0.1/32 reject
+ hostssl all pqgossltest 127.0.0.1/32 trust
+ hostssl all pqgosslcert 127.0.0.1/32 cert
+ host all all 127.0.0.1/32 trust
+ hostnossl all pqgossltest ::1/128 reject
+ hostnossl all pqgosslcert ::1/128 reject
+ hostssl all pqgossltest ::1/128 trust
+ hostssl all pqgosslcert ::1/128 cert
+ host all all ::1/128 trust
+ config
+
+ xargs sudo install -o postgres -g postgres -m 600 -t /var/lib/postgresql/$PGVERSION/main/ <<-certificates
+ certs/root.crt
+ certs/server.crt
+ certs/server.key
+ certificates
+
+ sort -VCu <<-versions ||
+ $PGVERSION
+ 9.2
+ versions
+ sudo tee -a /etc/postgresql/$PGVERSION/main/postgresql.conf > /dev/null <<-config
+ ssl_ca_file = 'root.crt'
+ ssl_cert_file = 'server.crt'
+ ssl_key_file = 'server.key'
+ config
+
+ echo 127.0.0.1 postgres | sudo tee -a /etc/hosts > /dev/null
+
+ sudo service postgresql restart
+}
+
+postgresql_install() {
+ xargs sudo apt-get -y -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confnew' install <<-packages
+ postgresql-$PGVERSION
+ postgresql-server-dev-$PGVERSION
+ postgresql-contrib-$PGVERSION
+ packages
+}
+
+postgresql_uninstall() {
+ sudo service postgresql stop
+ xargs sudo apt-get -y --purge remove <<-packages
+ libpq-dev
+ libpq5
+ postgresql
+ postgresql-client-common
+ postgresql-common
+ packages
+ sudo rm -rf /var/lib/postgresql
+}
+
+megacheck_install() {
+ # Megacheck is Go 1.6+, so skip if Go 1.5.
+ if [[ "$(go version)" =~ "go1.5" ]]
+ then
+ echo "megacheck not supported, skipping installation"
+ return 0
+ fi
+ # Lock megacheck version at $MEGACHECK_VERSION to prevent spontaneous
+ # new error messages in old code.
+ go get -d honnef.co/go/tools/...
+ git -C $GOPATH/src/honnef.co/go/tools/ checkout $MEGACHECK_VERSION
+ go install honnef.co/go/tools/cmd/megacheck
+ megacheck --version
+}
+
+golint_install() {
+ # Golint is Go 1.6+, so skip if Go 1.5.
+ if [[ "$(go version)" =~ "go1.5" ]]
+ then
+ echo "golint not supported, skipping installation"
+ return 0
+ fi
+ go get github.com/golang/lint/golint
+}
+
+$1
diff --git a/vendor/github.com/lib/pq/certs/README b/vendor/github.com/lib/pq/certs/README
deleted file mode 100644
index 24ab7b25698..00000000000
--- a/vendor/github.com/lib/pq/certs/README
+++ /dev/null
@@ -1,3 +0,0 @@
-This directory contains certificates and private keys for testing some
-SSL-related functionality in Travis. Do NOT use these certificates for
-anything other than testing.
diff --git a/vendor/github.com/lib/pq/certs/postgresql.crt b/vendor/github.com/lib/pq/certs/postgresql.crt
deleted file mode 100644
index 6e6b4284a1f..00000000000
--- a/vendor/github.com/lib/pq/certs/postgresql.crt
+++ /dev/null
@@ -1,69 +0,0 @@
-Certificate:
- Data:
- Version: 3 (0x2)
- Serial Number: 2 (0x2)
- Signature Algorithm: sha256WithRSAEncryption
- Issuer: C=US, ST=Nevada, L=Las Vegas, O=github.com/lib/pq, CN=pq CA
- Validity
- Not Before: Oct 11 15:10:11 2014 GMT
- Not After : Oct 8 15:10:11 2024 GMT
- Subject: C=US, ST=Nevada, L=Las Vegas, O=github.com/lib/pq, CN=pqgosslcert
- Subject Public Key Info:
- Public Key Algorithm: rsaEncryption
- RSA Public Key: (1024 bit)
- Modulus (1024 bit):
- 00:e3:8c:06:9a:70:54:51:d1:34:34:83:39:cd:a2:
- 59:0f:05:ed:8d:d8:0e:34:d0:92:f4:09:4d:ee:8c:
- 78:55:49:24:f8:3c:e0:34:58:02:b2:e7:94:58:c1:
- e8:e5:bb:d1:af:f6:54:c1:40:b1:90:70:79:0d:35:
- 54:9c:8f:16:e9:c2:f0:92:e6:64:49:38:c1:76:f8:
- 47:66:c4:5b:4a:b6:a9:43:ce:c8:be:6c:4d:2b:94:
- 97:3c:55:bc:d1:d0:6e:b7:53:ae:89:5c:4b:6b:86:
- 40:be:c1:ae:1e:64:ce:9c:ae:87:0a:69:e5:c8:21:
- 12:be:ae:1d:f6:45:df:16:a7
- Exponent: 65537 (0x10001)
- X509v3 extensions:
- X509v3 Subject Key Identifier:
- 9B:25:31:63:A2:D8:06:FF:CB:E3:E9:96:FF:0D:BA:DC:12:7D:04:CF
- X509v3 Authority Key Identifier:
- keyid:52:93:ED:1E:76:0A:9F:65:4F:DE:19:66:C1:D5:22:40:35:CB:A0:72
-
- X509v3 Basic Constraints:
- CA:FALSE
- X509v3 Key Usage:
- Digital Signature, Non Repudiation, Key Encipherment
- Signature Algorithm: sha256WithRSAEncryption
- 3e:f5:f8:0b:4e:11:bd:00:86:1f:ce:dc:97:02:98:91:11:f5:
- 65:f6:f2:8a:b2:3e:47:92:05:69:28:c9:e9:b4:f7:cf:93:d1:
- 2d:81:5d:00:3c:23:be:da:70:ea:59:e1:2c:d3:25:49:ae:a6:
- 95:54:c1:10:df:23:e3:fe:d6:e4:76:c7:6b:73:ad:1b:34:7c:
- e2:56:cc:c0:37:ae:c5:7a:11:20:6c:3d:05:0e:99:cd:22:6c:
- cf:59:a1:da:28:d4:65:ba:7d:2f:2b:3d:69:6d:a6:c1:ae:57:
- bf:56:64:13:79:f8:48:46:65:eb:81:67:28:0b:7b:de:47:10:
- b3:80:3c:31:d1:58:94:01:51:4a:c7:c8:1a:01:a8:af:c4:cd:
- bb:84:a5:d9:8b:b4:b9:a1:64:3e:95:d9:90:1d:d5:3f:67:cc:
- 3b:ba:f5:b4:d1:33:77:ee:c2:d2:3e:7e:c5:66:6e:b7:35:4c:
- 60:57:b0:b8:be:36:c8:f3:d3:95:8c:28:4a:c9:f7:27:a4:0d:
- e5:96:99:eb:f5:c8:bd:f3:84:6d:ef:02:f9:8a:36:7d:6b:5f:
- 36:68:37:41:d9:74:ae:c6:78:2e:44:86:a1:ad:43:ca:fb:b5:
- 3e:ba:10:23:09:02:ac:62:d1:d0:83:c8:95:b9:e3:5e:30:ff:
- 5b:2b:38:fa
------BEGIN CERTIFICATE-----
-MIIDEzCCAfugAwIBAgIBAjANBgkqhkiG9w0BAQsFADBeMQswCQYDVQQGEwJVUzEP
-MA0GA1UECBMGTmV2YWRhMRIwEAYDVQQHEwlMYXMgVmVnYXMxGjAYBgNVBAoTEWdp
-dGh1Yi5jb20vbGliL3BxMQ4wDAYDVQQDEwVwcSBDQTAeFw0xNDEwMTExNTEwMTFa
-Fw0yNDEwMDgxNTEwMTFaMGQxCzAJBgNVBAYTAlVTMQ8wDQYDVQQIEwZOZXZhZGEx
-EjAQBgNVBAcTCUxhcyBWZWdhczEaMBgGA1UEChMRZ2l0aHViLmNvbS9saWIvcHEx
-FDASBgNVBAMTC3BxZ29zc2xjZXJ0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB
-gQDjjAaacFRR0TQ0gznNolkPBe2N2A400JL0CU3ujHhVSST4POA0WAKy55RYwejl
-u9Gv9lTBQLGQcHkNNVScjxbpwvCS5mRJOMF2+EdmxFtKtqlDzsi+bE0rlJc8VbzR
-0G63U66JXEtrhkC+wa4eZM6crocKaeXIIRK+rh32Rd8WpwIDAQABo1owWDAdBgNV
-HQ4EFgQUmyUxY6LYBv/L4+mW/w263BJ9BM8wHwYDVR0jBBgwFoAUUpPtHnYKn2VP
-3hlmwdUiQDXLoHIwCQYDVR0TBAIwADALBgNVHQ8EBAMCBeAwDQYJKoZIhvcNAQEL
-BQADggEBAD71+AtOEb0Ahh/O3JcCmJER9WX28oqyPkeSBWkoyem098+T0S2BXQA8
-I77acOpZ4SzTJUmuppVUwRDfI+P+1uR2x2tzrRs0fOJWzMA3rsV6ESBsPQUOmc0i
-bM9Zodoo1GW6fS8rPWltpsGuV79WZBN5+EhGZeuBZygLe95HELOAPDHRWJQBUUrH
-yBoBqK/EzbuEpdmLtLmhZD6V2ZAd1T9nzDu69bTRM3fuwtI+fsVmbrc1TGBXsLi+
-Nsjz05WMKErJ9yekDeWWmev1yL3zhG3vAvmKNn1rXzZoN0HZdK7GeC5EhqGtQ8r7
-tT66ECMJAqxi0dCDyJW5414w/1srOPo=
------END CERTIFICATE-----
diff --git a/vendor/github.com/lib/pq/certs/postgresql.key b/vendor/github.com/lib/pq/certs/postgresql.key
deleted file mode 100644
index eb8b20be96d..00000000000
--- a/vendor/github.com/lib/pq/certs/postgresql.key
+++ /dev/null
@@ -1,15 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIICWwIBAAKBgQDjjAaacFRR0TQ0gznNolkPBe2N2A400JL0CU3ujHhVSST4POA0
-WAKy55RYwejlu9Gv9lTBQLGQcHkNNVScjxbpwvCS5mRJOMF2+EdmxFtKtqlDzsi+
-bE0rlJc8VbzR0G63U66JXEtrhkC+wa4eZM6crocKaeXIIRK+rh32Rd8WpwIDAQAB
-AoGAM5dM6/kp9P700i8qjOgRPym96Zoh5nGfz/rIE5z/r36NBkdvIg8OVZfR96nH
-b0b9TOMR5lsPp0sI9yivTWvX6qyvLJRWy2vvx17hXK9NxXUNTAm0PYZUTvCtcPeX
-RnJpzQKNZQPkFzF0uXBc4CtPK2Vz0+FGvAelrhYAxnw1dIkCQQD+9qaW5QhXjsjb
-Nl85CmXgxPmGROcgLQCO+omfrjf9UXrituU9Dz6auym5lDGEdMFnkzfr+wpasEy9
-mf5ZZOhDAkEA5HjXfVGaCtpydOt6hDon/uZsyssCK2lQ7NSuE3vP+sUsYMzIpEoy
-t3VWXqKbo+g9KNDTP4WEliqp1aiSIylzzQJANPeqzihQnlgEdD4MdD4rwhFJwVIp
-Le8Lcais1KaN7StzOwxB/XhgSibd2TbnPpw+3bSg5n5lvUdo+e62/31OHwJAU1jS
-I+F09KikQIr28u3UUWT2IzTT4cpVv1AHAQyV3sG3YsjSGT0IK20eyP9BEBZU2WL0
-7aNjrvR5aHxKc5FXsQJABsFtyGpgI5X4xufkJZVZ+Mklz2n7iXa+XPatMAHFxAtb
-EEMt60rngwMjXAzBSC6OYuYogRRAY3UCacNC5VhLYQ==
------END RSA PRIVATE KEY-----
diff --git a/vendor/github.com/lib/pq/certs/root.crt b/vendor/github.com/lib/pq/certs/root.crt
deleted file mode 100644
index aecf8f6213b..00000000000
--- a/vendor/github.com/lib/pq/certs/root.crt
+++ /dev/null
@@ -1,24 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIEAzCCAuugAwIBAgIJANmheROCdW1NMA0GCSqGSIb3DQEBBQUAMF4xCzAJBgNV
-BAYTAlVTMQ8wDQYDVQQIEwZOZXZhZGExEjAQBgNVBAcTCUxhcyBWZWdhczEaMBgG
-A1UEChMRZ2l0aHViLmNvbS9saWIvcHExDjAMBgNVBAMTBXBxIENBMB4XDTE0MTAx
-MTE1MDQyOVoXDTI0MTAwODE1MDQyOVowXjELMAkGA1UEBhMCVVMxDzANBgNVBAgT
-Bk5ldmFkYTESMBAGA1UEBxMJTGFzIFZlZ2FzMRowGAYDVQQKExFnaXRodWIuY29t
-L2xpYi9wcTEOMAwGA1UEAxMFcHEgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
-ggEKAoIBAQCV4PxP7ShzWBzUCThcKk3qZtOLtHmszQVtbqhvgTpm1kTRtKBdVMu0
-pLAHQ3JgJCnAYgH0iZxVGoMP16T3irdgsdC48+nNTFM2T0cCdkfDURGIhSFN47cb
-Pgy306BcDUD2q7ucW33+dlFSRuGVewocoh4BWM/vMtMvvWzdi4Ag/L/jhb+5wZxZ
-sWymsadOVSDePEMKOvlCa3EdVwVFV40TVyDb+iWBUivDAYsS2a3KajuJrO6MbZiE
-Sp2RCIkZS2zFmzWxVRi9ZhzIZhh7EVF9JAaNC3T52jhGUdlRq3YpBTMnd89iOh74
-6jWXG7wSuPj3haFzyNhmJ0ZUh+2Ynoh1AgMBAAGjgcMwgcAwHQYDVR0OBBYEFFKT
-7R52Cp9lT94ZZsHVIkA1y6ByMIGQBgNVHSMEgYgwgYWAFFKT7R52Cp9lT94ZZsHV
-IkA1y6ByoWKkYDBeMQswCQYDVQQGEwJVUzEPMA0GA1UECBMGTmV2YWRhMRIwEAYD
-VQQHEwlMYXMgVmVnYXMxGjAYBgNVBAoTEWdpdGh1Yi5jb20vbGliL3BxMQ4wDAYD
-VQQDEwVwcSBDQYIJANmheROCdW1NMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEF
-BQADggEBAAEhCLWkqJNMI8b4gkbmj5fqQ/4+oO83bZ3w2Oqf6eZ8I8BC4f2NOyE6
-tRUlq5+aU7eqC1cOAvGjO+YHN/bF/DFpwLlzvUSXt+JP/pYcUjL7v+pIvwqec9hD
-ndvM4iIbkD/H/OYQ3L+N3W+G1x7AcFIX+bGCb3PzYVQAjxreV6//wgKBosMGFbZo
-HPxT9RPMun61SViF04H5TNs0derVn1+5eiiYENeAhJzQNyZoOOUuX1X/Inx9bEPh
-C5vFBtSMgIytPgieRJVWAiMLYsfpIAStrHztRAbBs2DU01LmMgRvHdxgFEKinC/d
-UHZZQDP+6pT+zADrGhQGXe4eThaO6f0=
------END CERTIFICATE-----
diff --git a/vendor/github.com/lib/pq/certs/server.crt b/vendor/github.com/lib/pq/certs/server.crt
deleted file mode 100644
index ddc995a6d61..00000000000
--- a/vendor/github.com/lib/pq/certs/server.crt
+++ /dev/null
@@ -1,81 +0,0 @@
-Certificate:
- Data:
- Version: 3 (0x2)
- Serial Number: 1 (0x1)
- Signature Algorithm: sha256WithRSAEncryption
- Issuer: C=US, ST=Nevada, L=Las Vegas, O=github.com/lib/pq, CN=pq CA
- Validity
- Not Before: Oct 11 15:05:15 2014 GMT
- Not After : Oct 8 15:05:15 2024 GMT
- Subject: C=US, ST=Nevada, L=Las Vegas, O=github.com/lib/pq, CN=postgres
- Subject Public Key Info:
- Public Key Algorithm: rsaEncryption
- RSA Public Key: (2048 bit)
- Modulus (2048 bit):
- 00:d7:8a:4c:85:fb:17:a5:3c:8f:e0:72:11:29:ce:
- 3f:b0:1f:3f:7d:c6:ee:7f:a7:fc:02:2b:35:47:08:
- a6:3d:90:df:5c:56:14:94:00:c7:6d:d1:d2:e2:61:
- 95:77:b8:e3:a6:66:31:f9:1f:21:7d:62:e1:27:da:
- 94:37:61:4a:ea:63:53:a0:61:b8:9c:bb:a5:e2:e7:
- b7:a6:d8:0f:05:04:c7:29:e2:ea:49:2b:7f:de:15:
- 00:a6:18:70:50:c7:0c:de:9a:f9:5a:96:b0:e1:94:
- 06:c6:6d:4a:21:3b:b4:0f:a5:6d:92:86:34:b2:4e:
- d7:0e:a7:19:c0:77:0b:7b:87:c8:92:de:42:ff:86:
- d2:b7:9a:a4:d4:15:23:ca:ad:a5:69:21:b8:ce:7e:
- 66:cb:85:5d:b9:ed:8b:2d:09:8d:94:e4:04:1e:72:
- ec:ef:d0:76:90:15:5a:a4:f7:91:4b:e9:ce:4e:9d:
- 5d:9a:70:17:9c:d8:e9:73:83:ea:3d:61:99:a6:cd:
- ac:91:40:5a:88:77:e5:4e:2a:8e:3d:13:f3:f9:38:
- 6f:81:6b:8a:95:ca:0e:07:ab:6f:da:b4:8c:d9:ff:
- aa:78:03:aa:c7:c2:cf:6f:64:92:d3:d8:83:d5:af:
- f1:23:18:a7:2e:7b:17:0b:e7:7d:f1:fa:a8:41:a3:
- 04:57
- Exponent: 65537 (0x10001)
- X509v3 extensions:
- X509v3 Subject Key Identifier:
- EE:F0:B3:46:DC:C7:09:EB:0E:B6:2F:E5:FE:62:60:45:44:9F:59:CC
- X509v3 Authority Key Identifier:
- keyid:52:93:ED:1E:76:0A:9F:65:4F:DE:19:66:C1:D5:22:40:35:CB:A0:72
-
- X509v3 Basic Constraints:
- CA:FALSE
- X509v3 Key Usage:
- Digital Signature, Non Repudiation, Key Encipherment
- Signature Algorithm: sha256WithRSAEncryption
- 7e:5a:6e:be:bf:d2:6c:c1:d6:fa:b6:fb:3f:06:53:36:08:87:
- 9d:95:b1:39:af:9e:f6:47:38:17:39:da:25:7c:f2:ad:0c:e3:
- ab:74:19:ca:fb:8c:a0:50:c0:1d:19:8a:9c:21:ed:0f:3a:d1:
- 96:54:2e:10:09:4f:b8:70:f7:2b:99:43:d2:c6:15:bc:3f:24:
- 7d:28:39:32:3f:8d:a4:4f:40:75:7f:3e:0d:1c:d1:69:f2:4e:
- 98:83:47:97:d2:25:ac:c9:36:86:2f:04:a6:c4:86:c7:c4:00:
- 5f:7f:b9:ad:fc:bf:e9:f5:78:d7:82:1a:51:0d:fc:ab:9e:92:
- 1d:5f:0c:18:d1:82:e0:14:c9:ce:91:89:71:ff:49:49:ff:35:
- bf:7b:44:78:42:c1:d0:66:65:bb:28:2e:60:ca:9b:20:12:a9:
- 90:61:b1:96:ec:15:46:c9:37:f7:07:90:8a:89:45:2a:3f:37:
- ec:dc:e3:e5:8f:c3:3a:57:80:a5:54:60:0c:e1:b2:26:99:2b:
- 40:7e:36:d1:9a:70:02:ec:63:f4:3b:72:ae:81:fb:30:20:6d:
- cb:48:46:c6:b5:8f:39:b1:84:05:25:55:8d:f5:62:f6:1b:46:
- 2e:da:a3:4c:26:12:44:d7:56:b6:b8:a9:ca:d3:ab:71:45:7c:
- 9f:48:6d:1e
------BEGIN CERTIFICATE-----
-MIIDlDCCAnygAwIBAgIBATANBgkqhkiG9w0BAQsFADBeMQswCQYDVQQGEwJVUzEP
-MA0GA1UECBMGTmV2YWRhMRIwEAYDVQQHEwlMYXMgVmVnYXMxGjAYBgNVBAoTEWdp
-dGh1Yi5jb20vbGliL3BxMQ4wDAYDVQQDEwVwcSBDQTAeFw0xNDEwMTExNTA1MTVa
-Fw0yNDEwMDgxNTA1MTVaMGExCzAJBgNVBAYTAlVTMQ8wDQYDVQQIEwZOZXZhZGEx
-EjAQBgNVBAcTCUxhcyBWZWdhczEaMBgGA1UEChMRZ2l0aHViLmNvbS9saWIvcHEx
-ETAPBgNVBAMTCHBvc3RncmVzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
-AQEA14pMhfsXpTyP4HIRKc4/sB8/fcbuf6f8Ais1RwimPZDfXFYUlADHbdHS4mGV
-d7jjpmYx+R8hfWLhJ9qUN2FK6mNToGG4nLul4ue3ptgPBQTHKeLqSSt/3hUAphhw
-UMcM3pr5Wpaw4ZQGxm1KITu0D6VtkoY0sk7XDqcZwHcLe4fIkt5C/4bSt5qk1BUj
-yq2laSG4zn5my4Vdue2LLQmNlOQEHnLs79B2kBVapPeRS+nOTp1dmnAXnNjpc4Pq
-PWGZps2skUBaiHflTiqOPRPz+ThvgWuKlcoOB6tv2rSM2f+qeAOqx8LPb2SS09iD
-1a/xIxinLnsXC+d98fqoQaMEVwIDAQABo1owWDAdBgNVHQ4EFgQU7vCzRtzHCesO
-ti/l/mJgRUSfWcwwHwYDVR0jBBgwFoAUUpPtHnYKn2VP3hlmwdUiQDXLoHIwCQYD
-VR0TBAIwADALBgNVHQ8EBAMCBeAwDQYJKoZIhvcNAQELBQADggEBAH5abr6/0mzB
-1vq2+z8GUzYIh52VsTmvnvZHOBc52iV88q0M46t0Gcr7jKBQwB0Zipwh7Q860ZZU
-LhAJT7hw9yuZQ9LGFbw/JH0oOTI/jaRPQHV/Pg0c0WnyTpiDR5fSJazJNoYvBKbE
-hsfEAF9/ua38v+n1eNeCGlEN/Kuekh1fDBjRguAUyc6RiXH/SUn/Nb97RHhCwdBm
-ZbsoLmDKmyASqZBhsZbsFUbJN/cHkIqJRSo/N+zc4+WPwzpXgKVUYAzhsiaZK0B+
-NtGacALsY/Q7cq6B+zAgbctIRsa1jzmxhAUlVY31YvYbRi7ao0wmEkTXVra4qcrT
-q3FFfJ9IbR4=
------END CERTIFICATE-----
diff --git a/vendor/github.com/lib/pq/certs/server.key b/vendor/github.com/lib/pq/certs/server.key
deleted file mode 100644
index bd7b019b655..00000000000
--- a/vendor/github.com/lib/pq/certs/server.key
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEogIBAAKCAQEA14pMhfsXpTyP4HIRKc4/sB8/fcbuf6f8Ais1RwimPZDfXFYU
-lADHbdHS4mGVd7jjpmYx+R8hfWLhJ9qUN2FK6mNToGG4nLul4ue3ptgPBQTHKeLq
-SSt/3hUAphhwUMcM3pr5Wpaw4ZQGxm1KITu0D6VtkoY0sk7XDqcZwHcLe4fIkt5C
-/4bSt5qk1BUjyq2laSG4zn5my4Vdue2LLQmNlOQEHnLs79B2kBVapPeRS+nOTp1d
-mnAXnNjpc4PqPWGZps2skUBaiHflTiqOPRPz+ThvgWuKlcoOB6tv2rSM2f+qeAOq
-x8LPb2SS09iD1a/xIxinLnsXC+d98fqoQaMEVwIDAQABAoIBAF3ZoihUhJ82F4+r
-Gz4QyDpv4L1reT2sb1aiabhcU8ZK5nbWJG+tRyjSS/i2dNaEcttpdCj9HR/zhgZM
-bm0OuAgG58rVwgS80CZUruq++Qs+YVojq8/gWPTiQD4SNhV2Fmx3HkwLgUk3oxuT
-SsvdqzGE3okGVrutCIcgy126eA147VPMoej1Bb3fO6npqK0pFPhZfAc0YoqJuM+k
-obRm5pAnGUipyLCFXjA9HYPKwYZw2RtfdA3CiImHeanSdqS+ctrC9y8BV40Th7gZ
-haXdKUNdjmIxV695QQ1mkGqpKLZFqhzKioGQ2/Ly2d1iaKN9fZltTusu8unepWJ2
-tlT9qMECgYEA9uHaF1t2CqE+AJvWTihHhPIIuLxoOQXYea1qvxfcH/UMtaLKzCNm
-lQ5pqCGsPvp+10f36yttO1ZehIvlVNXuJsjt0zJmPtIolNuJY76yeussfQ9jHheB
-5uPEzCFlHzxYbBUyqgWaF6W74okRGzEGJXjYSP0yHPPdU4ep2q3bGiUCgYEA34Af
-wBSuQSK7uLxArWHvQhyuvi43ZGXls6oRGl+Ysj54s8BP6XGkq9hEJ6G4yxgyV+BR
-DUOs5X8/TLT8POuIMYvKTQthQyCk0eLv2FLdESDuuKx0kBVY3s8lK3/z5HhrdOiN
-VMNZU+xDKgKc3hN9ypkk8vcZe6EtH7Y14e0rVcsCgYBTgxi8F/M5K0wG9rAqphNz
-VFBA9XKn/2M33cKjO5X5tXIEKzpAjaUQvNxexG04rJGljzG8+mar0M6ONahw5yD1
-O7i/XWgazgpuOEkkVYiYbd8RutfDgR4vFVMn3hAP3eDnRtBplRWH9Ec3HTiNIys6
-F8PKBOQjyRZQQC7jyzW3hQKBgACe5HeuFwXLSOYsb6mLmhR+6+VPT4wR1F95W27N
-USk9jyxAnngxfpmTkiziABdgS9N+pfr5cyN4BP77ia/Jn6kzkC5Cl9SN5KdIkA3z
-vPVtN/x/ThuQU5zaymmig1ThGLtMYggYOslG4LDfLPxY5YKIhle+Y+259twdr2yf
-Mf2dAoGAaGv3tWMgnIdGRk6EQL/yb9PKHo7ShN+tKNlGaK7WwzBdKs+Fe8jkgcr7
-pz4Ne887CmxejdISzOCcdT+Zm9Bx6I/uZwWOtDvWpIgIxVX9a9URj/+D1MxTE/y4
-d6H+c89yDY62I2+drMpdjCd3EtCaTlxpTbRS+s1eAHMH7aEkcCE=
------END RSA PRIVATE KEY-----
diff --git a/vendor/github.com/lib/pq/doc.go b/vendor/github.com/lib/pq/doc.go
index b2c3582c84a..a1b0297138d 100644
--- a/vendor/github.com/lib/pq/doc.go
+++ b/vendor/github.com/lib/pq/doc.go
@@ -239,7 +239,7 @@ for more information). Note that the channel name will be truncated to 63
bytes by the PostgreSQL server.
You can find a complete, working example of Listener usage at
-http://godoc.org/github.com/lib/pq/examples/listen.
+http://godoc.org/github.com/lib/pq/example/listen.
*/
package pq
diff --git a/vendor/github.com/lib/pq/error.go b/vendor/github.com/lib/pq/error.go
index b4bb44cee39..6928d96700e 100644
--- a/vendor/github.com/lib/pq/error.go
+++ b/vendor/github.com/lib/pq/error.go
@@ -153,6 +153,7 @@ var errorCodeNames = map[ErrorCode]string{
"22004": "null_value_not_allowed",
"22002": "null_value_no_indicator_parameter",
"22003": "numeric_value_out_of_range",
+ "2200H": "sequence_generator_limit_exceeded",
"22026": "string_data_length_mismatch",
"22001": "string_data_right_truncation",
"22011": "substring_error",
diff --git a/vendor/github.com/lib/pq/hstore/hstore.go b/vendor/github.com/lib/pq/hstore/hstore.go
deleted file mode 100644
index 72d5abf51df..00000000000
--- a/vendor/github.com/lib/pq/hstore/hstore.go
+++ /dev/null
@@ -1,118 +0,0 @@
-package hstore
-
-import (
- "database/sql"
- "database/sql/driver"
- "strings"
-)
-
-// A wrapper for transferring Hstore values back and forth easily.
-type Hstore struct {
- Map map[string]sql.NullString
-}
-
-// escapes and quotes hstore keys/values
-// s should be a sql.NullString or string
-func hQuote(s interface{}) string {
- var str string
- switch v := s.(type) {
- case sql.NullString:
- if !v.Valid {
- return "NULL"
- }
- str = v.String
- case string:
- str = v
- default:
- panic("not a string or sql.NullString")
- }
-
- str = strings.Replace(str, "\\", "\\\\", -1)
- return `"` + strings.Replace(str, "\"", "\\\"", -1) + `"`
-}
-
-// Scan implements the Scanner interface.
-//
-// Note h.Map is reallocated before the scan to clear existing values. If the
-// hstore column's database value is NULL, then h.Map is set to nil instead.
-func (h *Hstore) Scan(value interface{}) error {
- if value == nil {
- h.Map = nil
- return nil
- }
- h.Map = make(map[string]sql.NullString)
- var b byte
- pair := [][]byte{{}, {}}
- pi := 0
- inQuote := false
- didQuote := false
- sawSlash := false
- bindex := 0
- for bindex, b = range value.([]byte) {
- if sawSlash {
- pair[pi] = append(pair[pi], b)
- sawSlash = false
- continue
- }
-
- switch b {
- case '\\':
- sawSlash = true
- continue
- case '"':
- inQuote = !inQuote
- if !didQuote {
- didQuote = true
- }
- continue
- default:
- if !inQuote {
- switch b {
- case ' ', '\t', '\n', '\r':
- continue
- case '=':
- continue
- case '>':
- pi = 1
- didQuote = false
- continue
- case ',':
- s := string(pair[1])
- if !didQuote && len(s) == 4 && strings.ToLower(s) == "null" {
- h.Map[string(pair[0])] = sql.NullString{String: "", Valid: false}
- } else {
- h.Map[string(pair[0])] = sql.NullString{String: string(pair[1]), Valid: true}
- }
- pair[0] = []byte{}
- pair[1] = []byte{}
- pi = 0
- continue
- }
- }
- }
- pair[pi] = append(pair[pi], b)
- }
- if bindex > 0 {
- s := string(pair[1])
- if !didQuote && len(s) == 4 && strings.ToLower(s) == "null" {
- h.Map[string(pair[0])] = sql.NullString{String: "", Valid: false}
- } else {
- h.Map[string(pair[0])] = sql.NullString{String: string(pair[1]), Valid: true}
- }
- }
- return nil
-}
-
-// Value implements the driver Valuer interface. Note if h.Map is nil, the
-// database column value will be set to NULL.
-func (h Hstore) Value() (driver.Value, error) {
- if h.Map == nil {
- return nil, nil
- }
- parts := []string{}
- for key, val := range h.Map {
- thispart := hQuote(key) + "=>" + hQuote(val)
- parts = append(parts, thispart)
- }
- return []byte(strings.Join(parts, ",")), nil
-}
diff --git a/vendor/github.com/lib/pq/listen_example/doc.go b/vendor/github.com/lib/pq/listen_example/doc.go
deleted file mode 100644
index 80f0a9b9701..00000000000
--- a/vendor/github.com/lib/pq/listen_example/doc.go
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-
-Below you will find a self-contained Go program which uses the LISTEN / NOTIFY
-mechanism to avoid polling the database while waiting for more work to arrive.
-
- //
- // You can see the program in action by defining a function similar to
- // the following:
- //
- // CREATE OR REPLACE FUNCTION public.get_work()
- // RETURNS bigint
- // LANGUAGE sql
- // AS $$
- // SELECT CASE WHEN random() >= 0.2 THEN int8 '1' END
- // $$
- // ;
-
- package main
-
- import (
- "database/sql"
- "fmt"
- "time"
-
- "github.com/lib/pq"
- )
-
- func doWork(db *sql.DB, work int64) {
- // work here
- }
-
- func getWork(db *sql.DB) {
- for {
- // get work from the database here
- var work sql.NullInt64
- err := db.QueryRow("SELECT get_work()").Scan(&work)
- if err != nil {
- fmt.Println("call to get_work() failed: ", err)
- time.Sleep(10 * time.Second)
- continue
- }
- if !work.Valid {
- // no more work to do
- fmt.Println("ran out of work")
- return
- }
-
- fmt.Println("starting work on ", work.Int64)
- go doWork(db, work.Int64)
- }
- }
-
- func waitForNotification(l *pq.Listener) {
- select {
- case <-l.Notify:
- fmt.Println("received notification, new work available")
- case <-time.After(90 * time.Second):
- go l.Ping()
- // Check if there's more work available, just in case it takes
- // a while for the Listener to notice connection loss and
- // reconnect.
- fmt.Println("received no work for 90 seconds, checking for new work")
- }
- }
-
- func main() {
- var conninfo string = ""
-
- db, err := sql.Open("postgres", conninfo)
- if err != nil {
- panic(err)
- }
-
- reportProblem := func(ev pq.ListenerEventType, err error) {
- if err != nil {
- fmt.Println(err.Error())
- }
- }
-
- listener := pq.NewListener(conninfo, 10 * time.Second, time.Minute, reportProblem)
- err = listener.Listen("getwork")
- if err != nil {
- panic(err)
- }
-
- fmt.Println("entering main loop")
- for {
- // process all available work before waiting for notifications
- getWork(db)
- waitForNotification(listener)
- }
- }
-
-
-*/
-package listen_example
diff --git a/vendor/github.com/lib/pq/oid/gen.go b/vendor/github.com/lib/pq/oid/gen.go
new file mode 100644
index 00000000000..7c634cdc5cd
--- /dev/null
+++ b/vendor/github.com/lib/pq/oid/gen.go
@@ -0,0 +1,93 @@
+// +build ignore
+
+// Generate the table of OID values
+// Run with 'go run gen.go'.
+package main
+
+import (
+ "database/sql"
+ "fmt"
+ "log"
+ "os"
+ "os/exec"
+ "strings"
+
+ _ "github.com/lib/pq"
+)
+
+// OID represent a postgres Object Identifier Type.
+type OID struct {
+ ID int
+ Type string
+}
+
+// Name returns an upper case version of the oid type.
+func (o OID) Name() string {
+ return strings.ToUpper(o.Type)
+}
+
+func main() {
+ datname := os.Getenv("PGDATABASE")
+ sslmode := os.Getenv("PGSSLMODE")
+
+ if datname == "" {
+ os.Setenv("PGDATABASE", "pqgotest")
+ }
+
+ if sslmode == "" {
+ os.Setenv("PGSSLMODE", "disable")
+ }
+
+ db, err := sql.Open("postgres", "")
+ if err != nil {
+ log.Fatal(err)
+ }
+ rows, err := db.Query(`
+ SELECT typname, oid
+ FROM pg_type WHERE oid < 10000
+ ORDER BY oid;
+ `)
+ if err != nil {
+ log.Fatal(err)
+ }
+ oids := make([]*OID, 0)
+ for rows.Next() {
+ var oid OID
+ if err = rows.Scan(&oid.Type, &oid.ID); err != nil {
+ log.Fatal(err)
+ }
+ oids = append(oids, &oid)
+ }
+ if err = rows.Err(); err != nil {
+ log.Fatal(err)
+ }
+ cmd := exec.Command("gofmt")
+ cmd.Stderr = os.Stderr
+ w, err := cmd.StdinPipe()
+ if err != nil {
+ log.Fatal(err)
+ }
+ f, err := os.Create("types.go")
+ if err != nil {
+ log.Fatal(err)
+ }
+ cmd.Stdout = f
+ err = cmd.Start()
+ if err != nil {
+ log.Fatal(err)
+ }
+ fmt.Fprintln(w, "// Code generated by gen.go. DO NOT EDIT.")
+ fmt.Fprintln(w, "\npackage oid")
+ fmt.Fprintln(w, "const (")
+ for _, oid := range oids {
+ fmt.Fprintf(w, "T_%s Oid = %d\n", oid.Type, oid.ID)
+ }
+ fmt.Fprintln(w, ")")
+ fmt.Fprintln(w, "var TypeName = map[Oid]string{")
+ for _, oid := range oids {
+ fmt.Fprintf(w, "T_%s: \"%s\",\n", oid.Type, oid.Name())
+ }
+ fmt.Fprintln(w, "}")
+ w.Close()
+ cmd.Wait()
+}
diff --git a/vendor/github.com/mattn/go-colorable/README.md b/vendor/github.com/mattn/go-colorable/README.md
index e84226a7358..56729a92ca6 100644
--- a/vendor/github.com/mattn/go-colorable/README.md
+++ b/vendor/github.com/mattn/go-colorable/README.md
@@ -1,5 +1,10 @@
# go-colorable
+[](http://godoc.org/github.com/mattn/go-colorable)
+[](https://travis-ci.org/mattn/go-colorable)
+[](https://coveralls.io/github/mattn/go-colorable?branch=master)
+[](https://goreportcard.com/report/mattn/go-colorable)
+
Colorable writer for windows.
For example, most of logger packages doesn't show colors on windows. (I know we can do it with ansicon. But I don't want.)
diff --git a/vendor/github.com/mattn/go-colorable/colorable_appengine.go b/vendor/github.com/mattn/go-colorable/colorable_appengine.go
new file mode 100644
index 00000000000..1f28d773d74
--- /dev/null
+++ b/vendor/github.com/mattn/go-colorable/colorable_appengine.go
@@ -0,0 +1,29 @@
+// +build appengine
+
+package colorable
+
+import (
+ "io"
+ "os"
+
+ _ "github.com/mattn/go-isatty"
+)
+
+// NewColorable return new instance of Writer which handle escape sequence.
+func NewColorable(file *os.File) io.Writer {
+ if file == nil {
+ panic("nil passed instead of *os.File to NewColorable()")
+ }
+
+ return file
+}
+
+// NewColorableStdout return new instance of Writer which handle escape sequence for stdout.
+func NewColorableStdout() io.Writer {
+ return os.Stdout
+}
+
+// NewColorableStderr return new instance of Writer which handle escape sequence for stderr.
+func NewColorableStderr() io.Writer {
+ return os.Stderr
+}
diff --git a/vendor/github.com/mattn/go-colorable/colorable_others.go b/vendor/github.com/mattn/go-colorable/colorable_others.go
index 52d6653b34b..887f203dc7f 100644
--- a/vendor/github.com/mattn/go-colorable/colorable_others.go
+++ b/vendor/github.com/mattn/go-colorable/colorable_others.go
@@ -1,12 +1,16 @@
// +build !windows
+// +build !appengine
package colorable
import (
"io"
"os"
+
+ _ "github.com/mattn/go-isatty"
)
+// NewColorable return new instance of Writer which handle escape sequence.
func NewColorable(file *os.File) io.Writer {
if file == nil {
panic("nil passed instead of *os.File to NewColorable()")
@@ -15,10 +19,12 @@ func NewColorable(file *os.File) io.Writer {
return file
}
+// NewColorableStdout return new instance of Writer which handle escape sequence for stdout.
func NewColorableStdout() io.Writer {
return os.Stdout
}
+// NewColorableStderr return new instance of Writer which handle escape sequence for stderr.
func NewColorableStderr() io.Writer {
return os.Stderr
}
diff --git a/vendor/github.com/mattn/go-colorable/colorable_windows.go b/vendor/github.com/mattn/go-colorable/colorable_windows.go
index c8f4e096344..e17a5474e98 100644
--- a/vendor/github.com/mattn/go-colorable/colorable_windows.go
+++ b/vendor/github.com/mattn/go-colorable/colorable_windows.go
@@ -1,8 +1,10 @@
+// +build windows
+// +build !appengine
+
package colorable
import (
"bytes"
- "fmt"
"io"
"math"
"os"
@@ -52,6 +54,11 @@ type consoleScreenBufferInfo struct {
maximumWindowSize coord
}
+type consoleCursorInfo struct {
+ size dword
+ visible int32
+}
+
var (
kernel32 = syscall.NewLazyDLL("kernel32.dll")
procGetConsoleScreenBufferInfo = kernel32.NewProc("GetConsoleScreenBufferInfo")
@@ -59,15 +66,20 @@ var (
procSetConsoleCursorPosition = kernel32.NewProc("SetConsoleCursorPosition")
procFillConsoleOutputCharacter = kernel32.NewProc("FillConsoleOutputCharacterW")
procFillConsoleOutputAttribute = kernel32.NewProc("FillConsoleOutputAttribute")
+ procGetConsoleCursorInfo = kernel32.NewProc("GetConsoleCursorInfo")
+ procSetConsoleCursorInfo = kernel32.NewProc("SetConsoleCursorInfo")
+ procSetConsoleTitle = kernel32.NewProc("SetConsoleTitleW")
)
+// Writer provide colorable Writer to the console
type Writer struct {
out io.Writer
handle syscall.Handle
- lastbuf bytes.Buffer
oldattr word
+ oldpos coord
}
+// NewColorable return new instance of Writer which handle escape sequence from File.
func NewColorable(file *os.File) io.Writer {
if file == nil {
panic("nil passed instead of *os.File to NewColorable()")
@@ -77,16 +89,17 @@ func NewColorable(file *os.File) io.Writer {
var csbi consoleScreenBufferInfo
handle := syscall.Handle(file.Fd())
procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
- return &Writer{out: file, handle: handle, oldattr: csbi.attributes}
- } else {
- return file
+ return &Writer{out: file, handle: handle, oldattr: csbi.attributes, oldpos: coord{0, 0}}
}
+ return file
}
+// NewColorableStdout return new instance of Writer which handle escape sequence for stdout.
func NewColorableStdout() io.Writer {
return NewColorable(os.Stdout)
}
+// NewColorableStderr return new instance of Writer which handle escape sequence for stderr.
func NewColorableStderr() io.Writer {
return NewColorable(os.Stderr)
}
@@ -350,45 +363,83 @@ var color256 = map[int]int{
255: 0xeeeeee,
}
+// `\033]0;TITLESTR\007`
+func doTitleSequence(er *bytes.Reader) error {
+ var c byte
+ var err error
+
+ c, err = er.ReadByte()
+ if err != nil {
+ return err
+ }
+ if c != '0' && c != '2' {
+ return nil
+ }
+ c, err = er.ReadByte()
+ if err != nil {
+ return err
+ }
+ if c != ';' {
+ return nil
+ }
+ title := make([]byte, 0, 80)
+ for {
+ c, err = er.ReadByte()
+ if err != nil {
+ return err
+ }
+ if c == 0x07 || c == '\n' {
+ break
+ }
+ title = append(title, c)
+ }
+ if len(title) > 0 {
+ title8, err := syscall.UTF16PtrFromString(string(title))
+ if err == nil {
+ procSetConsoleTitle.Call(uintptr(unsafe.Pointer(title8)))
+ }
+ }
+ return nil
+}
+
+// Write write data on console
func (w *Writer) Write(data []byte) (n int, err error) {
var csbi consoleScreenBufferInfo
procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
- er := bytes.NewBuffer(data)
+ er := bytes.NewReader(data)
+ var bw [1]byte
loop:
for {
- r1, _, err := procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
- if r1 == 0 {
- break loop
- }
-
- c1, _, err := er.ReadRune()
+ c1, err := er.ReadByte()
if err != nil {
break loop
}
if c1 != 0x1b {
- fmt.Fprint(w.out, string(c1))
+ bw[0] = c1
+ w.out.Write(bw[:])
continue
}
- c2, _, err := er.ReadRune()
+ c2, err := er.ReadByte()
if err != nil {
- w.lastbuf.WriteRune(c1)
break loop
}
+
+ if c2 == ']' {
+ if err := doTitleSequence(er); err != nil {
+ break loop
+ }
+ continue
+ }
if c2 != 0x5b {
- w.lastbuf.WriteRune(c1)
- w.lastbuf.WriteRune(c2)
continue
}
var buf bytes.Buffer
- var m rune
+ var m byte
for {
- c, _, err := er.ReadRune()
+ c, err := er.ReadByte()
if err != nil {
- w.lastbuf.WriteRune(c1)
- w.lastbuf.WriteRune(c2)
- w.lastbuf.Write(buf.Bytes())
break loop
}
if ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || c == '@' {
@@ -398,7 +449,6 @@ loop:
buf.Write([]byte(string(c)))
}
- var csbi consoleScreenBufferInfo
switch m {
case 'A':
n, err = strconv.Atoi(buf.String())
@@ -422,19 +472,16 @@ loop:
continue
}
procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
- csbi.cursorPosition.x -= short(n)
+ csbi.cursorPosition.x += short(n)
procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
case 'D':
n, err = strconv.Atoi(buf.String())
if err != nil {
continue
}
- if n, err = strconv.Atoi(buf.String()); err == nil {
- var csbi consoleScreenBufferInfo
- procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
- csbi.cursorPosition.x += short(n)
- procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
- }
+ procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
+ csbi.cursorPosition.x -= short(n)
+ procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
case 'E':
n, err = strconv.Atoi(buf.String())
if err != nil {
@@ -459,61 +506,85 @@ loop:
continue
}
procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
- csbi.cursorPosition.x = short(n)
+ csbi.cursorPosition.x = short(n - 1)
procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
- case 'H':
- token := strings.Split(buf.String(), ";")
- if len(token) != 2 {
- continue
+ case 'H', 'f':
+ procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
+ if buf.Len() > 0 {
+ token := strings.Split(buf.String(), ";")
+ switch len(token) {
+ case 1:
+ n1, err := strconv.Atoi(token[0])
+ if err != nil {
+ continue
+ }
+ csbi.cursorPosition.y = short(n1 - 1)
+ case 2:
+ n1, err := strconv.Atoi(token[0])
+ if err != nil {
+ continue
+ }
+ n2, err := strconv.Atoi(token[1])
+ if err != nil {
+ continue
+ }
+ csbi.cursorPosition.x = short(n2 - 1)
+ csbi.cursorPosition.y = short(n1 - 1)
+ }
+ } else {
+ csbi.cursorPosition.y = 0
}
- n1, err := strconv.Atoi(token[0])
- if err != nil {
- continue
- }
- n2, err := strconv.Atoi(token[1])
- if err != nil {
- continue
- }
- csbi.cursorPosition.x = short(n2)
- csbi.cursorPosition.x = short(n1)
procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
case 'J':
- n, err := strconv.Atoi(buf.String())
- if err != nil {
- continue
+ n := 0
+ if buf.Len() > 0 {
+ n, err = strconv.Atoi(buf.String())
+ if err != nil {
+ continue
+ }
}
+ var count, written dword
var cursor coord
+ procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
switch n {
case 0:
cursor = coord{x: csbi.cursorPosition.x, y: csbi.cursorPosition.y}
+ count = dword(csbi.size.x - csbi.cursorPosition.x + (csbi.size.y-csbi.cursorPosition.y)*csbi.size.x)
case 1:
cursor = coord{x: csbi.window.left, y: csbi.window.top}
+ count = dword(csbi.size.x - csbi.cursorPosition.x + (csbi.window.top-csbi.cursorPosition.y)*csbi.size.x)
case 2:
cursor = coord{x: csbi.window.left, y: csbi.window.top}
+ count = dword(csbi.size.x - csbi.cursorPosition.x + (csbi.size.y-csbi.cursorPosition.y)*csbi.size.x)
}
- var count, written dword
- count = dword(csbi.size.x - csbi.cursorPosition.x + (csbi.size.y-csbi.cursorPosition.y)*csbi.size.x)
procFillConsoleOutputCharacter.Call(uintptr(w.handle), uintptr(' '), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written)))
procFillConsoleOutputAttribute.Call(uintptr(w.handle), uintptr(csbi.attributes), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written)))
case 'K':
- n, err := strconv.Atoi(buf.String())
- if err != nil {
- continue
+ n := 0
+ if buf.Len() > 0 {
+ n, err = strconv.Atoi(buf.String())
+ if err != nil {
+ continue
+ }
}
+ procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
var cursor coord
+ var count, written dword
switch n {
case 0:
- cursor = coord{x: csbi.cursorPosition.x, y: csbi.cursorPosition.y}
+ cursor = coord{x: csbi.cursorPosition.x + 1, y: csbi.cursorPosition.y}
+ count = dword(csbi.size.x - csbi.cursorPosition.x - 1)
case 1:
cursor = coord{x: csbi.window.left, y: csbi.window.top + csbi.cursorPosition.y}
+ count = dword(csbi.size.x - csbi.cursorPosition.x)
case 2:
cursor = coord{x: csbi.window.left, y: csbi.window.top + csbi.cursorPosition.y}
+ count = dword(csbi.size.x)
}
- var count, written dword
- count = dword(csbi.size.x - csbi.cursorPosition.x)
procFillConsoleOutputCharacter.Call(uintptr(w.handle), uintptr(' '), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written)))
procFillConsoleOutputAttribute.Call(uintptr(w.handle), uintptr(csbi.attributes), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written)))
case 'm':
+ procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
attr := csbi.attributes
cs := buf.String()
if cs == "" {
@@ -521,7 +592,7 @@ loop:
continue
}
token := strings.Split(cs, ";")
- for i := 0; i < len(token); i += 1 {
+ for i := 0; i < len(token); i++ {
ns := token[i]
if n, err = strconv.Atoi(ns); err == nil {
switch {
@@ -531,12 +602,12 @@ loop:
attr |= foregroundIntensity
case n == 7:
attr = ((attr & foregroundMask) << 4) | ((attr & backgroundMask) >> 4)
- case 22 == n || n == 25 || n == 25:
+ case n == 22 || n == 25:
attr |= foregroundIntensity
case n == 27:
attr = ((attr & foregroundMask) << 4) | ((attr & backgroundMask) >> 4)
case 30 <= n && n <= 37:
- attr = (attr & backgroundMask)
+ attr &= backgroundMask
if (n-30)&1 != 0 {
attr |= foregroundRed
}
@@ -563,7 +634,7 @@ loop:
attr &= backgroundMask
attr |= w.oldattr & foregroundMask
case 40 <= n && n <= 47:
- attr = (attr & foregroundMask)
+ attr &= foregroundMask
if (n-40)&1 != 0 {
attr |= backgroundRed
}
@@ -617,9 +688,39 @@ loop:
procSetConsoleTextAttribute.Call(uintptr(w.handle), uintptr(attr))
}
}
+ case 'h':
+ var ci consoleCursorInfo
+ cs := buf.String()
+ if cs == "5>" {
+ procGetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci)))
+ ci.visible = 0
+ procSetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci)))
+ } else if cs == "?25" {
+ procGetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci)))
+ ci.visible = 1
+ procSetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci)))
+ }
+ case 'l':
+ var ci consoleCursorInfo
+ cs := buf.String()
+ if cs == "5>" {
+ procGetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci)))
+ ci.visible = 1
+ procSetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci)))
+ } else if cs == "?25" {
+ procGetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci)))
+ ci.visible = 0
+ procSetConsoleCursorInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&ci)))
+ }
+ case 's':
+ procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi)))
+ w.oldpos = csbi.cursorPosition
+ case 'u':
+ procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&w.oldpos)))
}
}
- return len(data) - w.lastbuf.Len(), nil
+
+ return len(data), nil
}
type consoleColor struct {
@@ -663,22 +764,22 @@ func (c consoleColor) backgroundAttr() (attr word) {
}
var color16 = []consoleColor{
- consoleColor{0x000000, false, false, false, false},
- consoleColor{0x000080, false, false, true, false},
- consoleColor{0x008000, false, true, false, false},
- consoleColor{0x008080, false, true, true, false},
- consoleColor{0x800000, true, false, false, false},
- consoleColor{0x800080, true, false, true, false},
- consoleColor{0x808000, true, true, false, false},
- consoleColor{0xc0c0c0, true, true, true, false},
- consoleColor{0x808080, false, false, false, true},
- consoleColor{0x0000ff, false, false, true, true},
- consoleColor{0x00ff00, false, true, false, true},
- consoleColor{0x00ffff, false, true, true, true},
- consoleColor{0xff0000, true, false, false, true},
- consoleColor{0xff00ff, true, false, true, true},
- consoleColor{0xffff00, true, true, false, true},
- consoleColor{0xffffff, true, true, true, true},
+ {0x000000, false, false, false, false},
+ {0x000080, false, false, true, false},
+ {0x008000, false, true, false, false},
+ {0x008080, false, true, true, false},
+ {0x800000, true, false, false, false},
+ {0x800080, true, false, true, false},
+ {0x808000, true, true, false, false},
+ {0xc0c0c0, true, true, true, false},
+ {0x808080, false, false, false, true},
+ {0x0000ff, false, false, true, true},
+ {0x00ff00, false, true, false, true},
+ {0x00ffff, false, true, true, true},
+ {0xff0000, true, false, false, true},
+ {0xff00ff, true, false, true, true},
+ {0xffff00, true, true, false, true},
+ {0xffffff, true, true, true, true},
}
type hsv struct {
diff --git a/vendor/github.com/mattn/go-colorable/noncolorable.go b/vendor/github.com/mattn/go-colorable/noncolorable.go
new file mode 100644
index 00000000000..9721e16f4bf
--- /dev/null
+++ b/vendor/github.com/mattn/go-colorable/noncolorable.go
@@ -0,0 +1,55 @@
+package colorable
+
+import (
+ "bytes"
+ "io"
+)
+
+// NonColorable hold writer but remove escape sequence.
+type NonColorable struct {
+ out io.Writer
+}
+
+// NewNonColorable return new instance of Writer which remove escape sequence from Writer.
+func NewNonColorable(w io.Writer) io.Writer {
+ return &NonColorable{out: w}
+}
+
+// Write write data on console
+func (w *NonColorable) Write(data []byte) (n int, err error) {
+ er := bytes.NewReader(data)
+ var bw [1]byte
+loop:
+ for {
+ c1, err := er.ReadByte()
+ if err != nil {
+ break loop
+ }
+ if c1 != 0x1b {
+ bw[0] = c1
+ w.out.Write(bw[:])
+ continue
+ }
+ c2, err := er.ReadByte()
+ if err != nil {
+ break loop
+ }
+ if c2 != 0x5b {
+ continue
+ }
+
+ var buf bytes.Buffer
+ for {
+ c, err := er.ReadByte()
+ if err != nil {
+ break loop
+ }
+ if ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || c == '@' {
+ break
+ }
+ buf.Write([]byte(string(c)))
+ }
+ }
+
+ return len(data), nil
+}
diff --git a/vendor/github.com/mattn/go-sqlite3/.gitignore b/vendor/github.com/mattn/go-sqlite3/.gitignore
index bf90dfd898b..8a0e48d1aaf 100644
--- a/vendor/github.com/mattn/go-sqlite3/.gitignore
+++ b/vendor/github.com/mattn/go-sqlite3/.gitignore
@@ -1,3 +1,4 @@
*.db
*.exe
*.dll
+*.o
diff --git a/vendor/github.com/mattn/go-sqlite3/.travis.yml b/vendor/github.com/mattn/go-sqlite3/.travis.yml
index e85e4738e14..46e70cb0bfa 100644
--- a/vendor/github.com/mattn/go-sqlite3/.travis.yml
+++ b/vendor/github.com/mattn/go-sqlite3/.travis.yml
@@ -1,13 +1,19 @@
language: go
sudo: required
dist: trusty
+env:
+ - GOTAGS=
+ - GOTAGS=libsqlite3
+ - GOTAGS=trace
+ - GOTAGS=vtable
go:
- - 1.5
- - 1.6
- - tip
+ - 1.7.x
+ - 1.8.x
+ - 1.9.x
+ - master
before_install:
- go get github.com/mattn/goveralls
- go get golang.org/x/tools/cmd/cover
script:
- $HOME/gopath/bin/goveralls -repotoken 3qJVUE0iQwqnCbmNcDsjYu1nh4J4KIFXx
- - go test -v . -tags "libsqlite3"
+ - go test -race -v . -tags "$GOTAGS"
diff --git a/vendor/github.com/mattn/go-sqlite3/README.md b/vendor/github.com/mattn/go-sqlite3/README.md
index c2e0d5a636e..ad00f10dadc 100644
--- a/vendor/github.com/mattn/go-sqlite3/README.md
+++ b/vendor/github.com/mattn/go-sqlite3/README.md
@@ -1,9 +1,10 @@
go-sqlite3
==========
+[](http://godoc.org/github.com/mattn/go-sqlite3)
[](https://travis-ci.org/mattn/go-sqlite3)
[](https://coveralls.io/r/mattn/go-sqlite3?branch=master)
-[](http://godoc.org/github.com/mattn/go-sqlite3)
+[](https://goreportcard.com/report/github.com/mattn/go-sqlite3)
Description
-----------
@@ -16,11 +17,11 @@ Installation
This package can be installed with the go get command:
go get github.com/mattn/go-sqlite3
-
+
_go-sqlite3_ is *cgo* package.
If you want to build your app using go-sqlite3, you need gcc.
However, if you install _go-sqlite3_ with `go install github.com/mattn/go-sqlite3`, you don't need gcc to build your app anymore.
-
+
Documentation
-------------
@@ -45,24 +46,39 @@ FAQ
Use `go build --tags "icu"`
+ Available extensions: `json1`, `fts5`, `icu`
+
* Can't build go-sqlite3 on windows 64bit.
- > Probably, you are using go 1.0, go1.0 has a problem when it comes to compiling/linking on windows 64bit.
- > See: https://github.com/mattn/go-sqlite3/issues/27
+ > Probably, you are using go 1.0, go1.0 has a problem when it comes to compiling/linking on windows 64bit.
+ > See: [#27](https://github.com/mattn/go-sqlite3/issues/27)
* Getting insert error while query is opened.
> You can pass some arguments into the connection string, for example, a URI.
- > See: https://github.com/mattn/go-sqlite3/issues/39
+ > See: [#39](https://github.com/mattn/go-sqlite3/issues/39)
* Do you want to cross compile? mingw on Linux or Mac?
- > See: https://github.com/mattn/go-sqlite3/issues/106
+ > See: [#106](https://github.com/mattn/go-sqlite3/issues/106)
> See also: http://www.limitlessfx.com/cross-compile-golang-app-for-windows-from-linux.html
* Want to get time.Time with current locale
- Use `loc=auto` in SQLite3 filename schema like `file:foo.db?loc=auto`.
+ Use `_loc=auto` in SQLite3 filename schema like `file:foo.db?_loc=auto`.
+
+* Can I use this in multiple routines concurrently?
+
+ Yes for readonly. But, No for writable. See [#50](https://github.com/mattn/go-sqlite3/issues/50), [#51](https://github.com/mattn/go-sqlite3/issues/51), [#209](https://github.com/mattn/go-sqlite3/issues/209).
+
+* Why is it racy if I use a `sql.Open("sqlite3", ":memory:")` database?
+
+ Each connection to :memory: opens a brand new in-memory sql database, so if
+ the stdlib's sql engine happens to open another connection and you've only
+ specified ":memory:", that connection will see a brand new database. A
+ workaround is to use "file::memory:?mode=memory&cache=shared". Every
+ connection to this string will point to the same in-memory database. See
+ [#204](https://github.com/mattn/go-sqlite3/issues/204) for more info.
License
-------
diff --git a/vendor/github.com/mattn/go-sqlite3/backup.go b/vendor/github.com/mattn/go-sqlite3/backup.go
index 4c1e38c878b..5ab3a54ded0 100644
--- a/vendor/github.com/mattn/go-sqlite3/backup.go
+++ b/vendor/github.com/mattn/go-sqlite3/backup.go
@@ -19,10 +19,12 @@ import (
"unsafe"
)
+// SQLiteBackup implement interface of Backup.
type SQLiteBackup struct {
b *C.sqlite3_backup
}
+// Backup make backup from src to dest.
func (c *SQLiteConn) Backup(dest string, conn *SQLiteConn, src string) (*SQLiteBackup, error) {
destptr := C.CString(dest)
defer C.free(unsafe.Pointer(destptr))
@@ -37,10 +39,10 @@ func (c *SQLiteConn) Backup(dest string, conn *SQLiteConn, src string) (*SQLiteB
return nil, c.lastError()
}
-// Backs up for one step. Calls the underlying `sqlite3_backup_step` function.
-// This function returns a boolean indicating if the backup is done and
-// an error signalling any other error. Done is returned if the underlying C
-// function returns SQLITE_DONE (Code 101)
+// Step to backs up for one step. Calls the underlying `sqlite3_backup_step`
+// function. This function returns a boolean indicating if the backup is done
+// and an error signalling any other error. Done is returned if the underlying
+// C function returns SQLITE_DONE (Code 101)
func (b *SQLiteBackup) Step(p int) (bool, error) {
ret := C.sqlite3_backup_step(b.b, C.int(p))
if ret == C.SQLITE_DONE {
@@ -51,24 +53,33 @@ func (b *SQLiteBackup) Step(p int) (bool, error) {
return false, nil
}
+// Remaining return whether have the rest for backup.
func (b *SQLiteBackup) Remaining() int {
return int(C.sqlite3_backup_remaining(b.b))
}
+// PageCount return count of pages.
func (b *SQLiteBackup) PageCount() int {
return int(C.sqlite3_backup_pagecount(b.b))
}
+// Finish close backup.
func (b *SQLiteBackup) Finish() error {
return b.Close()
}
+// Close close backup.
func (b *SQLiteBackup) Close() error {
ret := C.sqlite3_backup_finish(b.b)
+
+ // sqlite3_backup_finish() never fails, it just returns the
+ // error code from previous operations, so clean up before
+ // checking and returning an error
+ b.b = nil
+ runtime.SetFinalizer(b, nil)
+
if ret != 0 {
return Error{Code: ErrNo(ret)}
}
- b.b = nil
- runtime.SetFinalizer(b, nil)
return nil
}
diff --git a/vendor/github.com/mattn/go-sqlite3/callback.go b/vendor/github.com/mattn/go-sqlite3/callback.go
index e2bf3c6a217..29ece3d11d1 100644
--- a/vendor/github.com/mattn/go-sqlite3/callback.go
+++ b/vendor/github.com/mattn/go-sqlite3/callback.go
@@ -11,7 +11,11 @@ package sqlite3
// code for SQLite custom functions is in here.
/*
+#ifndef USE_LIBSQLITE3
#include
+#else
+#include
+#endif
#include
void _sqlite3_result_text(sqlite3_context* ctx, const char* s);
@@ -36,8 +40,8 @@ func callbackTrampoline(ctx *C.sqlite3_context, argc int, argv **C.sqlite3_value
}
//export stepTrampoline
-func stepTrampoline(ctx *C.sqlite3_context, argc int, argv **C.sqlite3_value) {
- args := (*[(math.MaxInt32 - 1) / unsafe.Sizeof((*C.sqlite3_value)(nil))]*C.sqlite3_value)(unsafe.Pointer(argv))[:argc:argc]
+func stepTrampoline(ctx *C.sqlite3_context, argc C.int, argv **C.sqlite3_value) {
+ args := (*[(math.MaxInt32 - 1) / unsafe.Sizeof((*C.sqlite3_value)(nil))]*C.sqlite3_value)(unsafe.Pointer(argv))[:int(argc):int(argc)]
ai := lookupHandle(uintptr(C.sqlite3_user_data(ctx))).(*aggInfo)
ai.Step(ctx, args)
}
@@ -49,6 +53,30 @@ func doneTrampoline(ctx *C.sqlite3_context) {
ai.Done(ctx)
}
+//export compareTrampoline
+func compareTrampoline(handlePtr uintptr, la C.int, a *C.char, lb C.int, b *C.char) C.int {
+ cmp := lookupHandle(handlePtr).(func(string, string) int)
+ return C.int(cmp(C.GoStringN(a, la), C.GoStringN(b, lb)))
+}
+
+//export commitHookTrampoline
+func commitHookTrampoline(handle uintptr) int {
+ callback := lookupHandle(handle).(func() int)
+ return callback()
+}
+
+//export rollbackHookTrampoline
+func rollbackHookTrampoline(handle uintptr) {
+ callback := lookupHandle(handle).(func())
+ callback()
+}
+
+//export updateHookTrampoline
+func updateHookTrampoline(handle uintptr, op int, db *C.char, table *C.char, rowid int64) {
+ callback := lookupHandle(handle).(func(int, string, string, int64))
+ callback(op, C.GoString(db), C.GoString(table), rowid)
+}
+
// Use handles to avoid passing Go pointers to C.
type handleVal struct {
diff --git a/vendor/github.com/mattn/go-sqlite3/error.go b/vendor/github.com/mattn/go-sqlite3/error.go
index b91010835c3..49ab8903667 100644
--- a/vendor/github.com/mattn/go-sqlite3/error.go
+++ b/vendor/github.com/mattn/go-sqlite3/error.go
@@ -7,12 +7,16 @@ package sqlite3
import "C"
+// ErrNo inherit errno.
type ErrNo int
+// ErrNoMask is mask code.
const ErrNoMask C.int = 0xff
+// ErrNoExtended is extended errno.
type ErrNoExtended int
+// Error implement sqlite error code.
type Error struct {
Code ErrNo /* The error code returned by SQLite */
ExtendedCode ErrNoExtended /* The extended error code returned by SQLite */
@@ -52,14 +56,17 @@ var (
ErrWarning = ErrNo(28) /* Warnings from sqlite3_log() */
)
+// Error return error message from errno.
func (err ErrNo) Error() string {
return Error{Code: err}.Error()
}
+// Extend return extended errno.
func (err ErrNo) Extend(by int) ErrNoExtended {
return ErrNoExtended(int(err) | (by << 8))
}
+// Error return error message that is extended code.
func (err ErrNoExtended) Error() string {
return Error{Code: ErrNo(C.int(err) & ErrNoMask), ExtendedCode: err}.Error()
}
@@ -121,7 +128,7 @@ var (
ErrConstraintTrigger = ErrConstraint.Extend(7)
ErrConstraintUnique = ErrConstraint.Extend(8)
ErrConstraintVTab = ErrConstraint.Extend(9)
- ErrConstraintRowId = ErrConstraint.Extend(10)
+ ErrConstraintRowID = ErrConstraint.Extend(10)
ErrNoticeRecoverWAL = ErrNotice.Extend(1)
ErrNoticeRecoverRollback = ErrNotice.Extend(2)
ErrWarningAutoIndex = ErrWarning.Extend(1)
diff --git a/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c b/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c
index 614571c637f..b67d0a58997 100644
--- a/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c
+++ b/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c
@@ -1,8 +1,7 @@
-// +build !libsqlite3
-
+#ifndef USE_LIBSQLITE3
/******************************************************************************
** This file is an amalgamation of many separate C source files from SQLite
-** version 3.10.2. By combining all the individual C code files into this
+** version 3.21.0. By combining all the individual C code files into this
** single large file, the entire code can be compiled as a single translation
** unit. This allows many compilers to do optimizations that would not be
** possible if the files were compiled separately. Performance improvements
@@ -11,7 +10,7 @@
**
** This file is all you need to compile SQLite. To use SQLite in other
** programs, you need this file and the "sqlite3.h" header file that defines
-** the programming interface to the SQLite library. (If you do not have
+** the programming interface to the SQLite library. (If you do not have
** the "sqlite3.h" header file at hand, you will find a copy embedded within
** the text of this file. Search for "Begin file sqlite3.h" to find the start
** of the embedded sqlite3.h header file.) Additional code files may be needed
@@ -24,6 +23,761 @@
#ifndef SQLITE_PRIVATE
# define SQLITE_PRIVATE static
#endif
+/************** Begin file ctime.c *******************************************/
+/*
+** 2010 February 23
+**
+** The author disclaims copyright to this source code. In place of
+** a legal notice, here is a blessing:
+**
+** May you do good and not evil.
+** May you find forgiveness for yourself and forgive others.
+** May you share freely, never taking more than you give.
+**
+*************************************************************************
+**
+** This file implements routines used to report what compile-time options
+** SQLite was built with.
+*/
+
+#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
+
+/*
+** Include the configuration header output by 'configure' if we're using the
+** autoconf-based build
+*/
+#if defined(_HAVE_SQLITE_CONFIG_H) && !defined(SQLITECONFIG_H)
+#include "config.h"
+#define SQLITECONFIG_H 1
+#endif
+
+/* These macros are provided to "stringify" the value of the define
+** for those options in which the value is meaningful. */
+#define CTIMEOPT_VAL_(opt) #opt
+#define CTIMEOPT_VAL(opt) CTIMEOPT_VAL_(opt)
+
+/*
+** An array of names of all compile-time options. This array should
+** be sorted A-Z.
+**
+** This array looks large, but in a typical installation actually uses
+** only a handful of compile-time options, so most times this array is usually
+** rather short and uses little memory space.
+*/
+static const char * const sqlite3azCompileOpt[] = {
+
+/*
+** BEGIN CODE GENERATED BY tool/mkctime.tcl
+*/
+#if SQLITE_32BIT_ROWID
+ "32BIT_ROWID",
+#endif
+#if SQLITE_4_BYTE_ALIGNED_MALLOC
+ "4_BYTE_ALIGNED_MALLOC",
+#endif
+#if SQLITE_64BIT_STATS
+ "64BIT_STATS",
+#endif
+#if SQLITE_ALLOW_COVERING_INDEX_SCAN
+ "ALLOW_COVERING_INDEX_SCAN",
+#endif
+#if SQLITE_ALLOW_URI_AUTHORITY
+ "ALLOW_URI_AUTHORITY",
+#endif
+#ifdef SQLITE_BITMASK_TYPE
+ "BITMASK_TYPE=" CTIMEOPT_VAL(SQLITE_BITMASK_TYPE),
+#endif
+#if SQLITE_BUG_COMPATIBLE_20160819
+ "BUG_COMPATIBLE_20160819",
+#endif
+#if SQLITE_CASE_SENSITIVE_LIKE
+ "CASE_SENSITIVE_LIKE",
+#endif
+#if SQLITE_CHECK_PAGES
+ "CHECK_PAGES",
+#endif
+#if defined(__clang__) && defined(__clang_major__)
+ "COMPILER=clang-" CTIMEOPT_VAL(__clang_major__) "."
+ CTIMEOPT_VAL(__clang_minor__) "."
+ CTIMEOPT_VAL(__clang_patchlevel__),
+#elif defined(_MSC_VER)
+ "COMPILER=msvc-" CTIMEOPT_VAL(_MSC_VER),
+#elif defined(__GNUC__) && defined(__VERSION__)
+ "COMPILER=gcc-" __VERSION__,
+#endif
+#if SQLITE_COVERAGE_TEST
+ "COVERAGE_TEST",
+#endif
+#if SQLITE_DEBUG
+ "DEBUG",
+#endif
+#if SQLITE_DEFAULT_AUTOMATIC_INDEX
+ "DEFAULT_AUTOMATIC_INDEX",
+#endif
+#if SQLITE_DEFAULT_AUTOVACUUM
+ "DEFAULT_AUTOVACUUM",
+#endif
+#ifdef SQLITE_DEFAULT_CACHE_SIZE
+ "DEFAULT_CACHE_SIZE=" CTIMEOPT_VAL(SQLITE_DEFAULT_CACHE_SIZE),
+#endif
+#if SQLITE_DEFAULT_CKPTFULLFSYNC
+ "DEFAULT_CKPTFULLFSYNC",
+#endif
+#ifdef SQLITE_DEFAULT_FILE_FORMAT
+ "DEFAULT_FILE_FORMAT=" CTIMEOPT_VAL(SQLITE_DEFAULT_FILE_FORMAT),
+#endif
+#ifdef SQLITE_DEFAULT_FILE_PERMISSIONS
+ "DEFAULT_FILE_PERMISSIONS=" CTIMEOPT_VAL(SQLITE_DEFAULT_FILE_PERMISSIONS),
+#endif
+#if SQLITE_DEFAULT_FOREIGN_KEYS
+ "DEFAULT_FOREIGN_KEYS",
+#endif
+#ifdef SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT
+ "DEFAULT_JOURNAL_SIZE_LIMIT=" CTIMEOPT_VAL(SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT),
+#endif
+#ifdef SQLITE_DEFAULT_LOCKING_MODE
+ "DEFAULT_LOCKING_MODE=" CTIMEOPT_VAL(SQLITE_DEFAULT_LOCKING_MODE),
+#endif
+#ifdef SQLITE_DEFAULT_LOOKASIDE
+ "DEFAULT_LOOKASIDE=" CTIMEOPT_VAL(SQLITE_DEFAULT_LOOKASIDE),
+#endif
+#if SQLITE_DEFAULT_MEMSTATUS
+ "DEFAULT_MEMSTATUS",
+#endif
+#ifdef SQLITE_DEFAULT_MMAP_SIZE
+ "DEFAULT_MMAP_SIZE=" CTIMEOPT_VAL(SQLITE_DEFAULT_MMAP_SIZE),
+#endif
+#ifdef SQLITE_DEFAULT_PAGE_SIZE
+ "DEFAULT_PAGE_SIZE=" CTIMEOPT_VAL(SQLITE_DEFAULT_PAGE_SIZE),
+#endif
+#ifdef SQLITE_DEFAULT_PCACHE_INITSZ
+ "DEFAULT_PCACHE_INITSZ=" CTIMEOPT_VAL(SQLITE_DEFAULT_PCACHE_INITSZ),
+#endif
+#ifdef SQLITE_DEFAULT_PROXYDIR_PERMISSIONS
+ "DEFAULT_PROXYDIR_PERMISSIONS=" CTIMEOPT_VAL(SQLITE_DEFAULT_PROXYDIR_PERMISSIONS),
+#endif
+#if SQLITE_DEFAULT_RECURSIVE_TRIGGERS
+ "DEFAULT_RECURSIVE_TRIGGERS",
+#endif
+#ifdef SQLITE_DEFAULT_ROWEST
+ "DEFAULT_ROWEST=" CTIMEOPT_VAL(SQLITE_DEFAULT_ROWEST),
+#endif
+#ifdef SQLITE_DEFAULT_SECTOR_SIZE
+ "DEFAULT_SECTOR_SIZE=" CTIMEOPT_VAL(SQLITE_DEFAULT_SECTOR_SIZE),
+#endif
+#ifdef SQLITE_DEFAULT_SYNCHRONOUS
+ "DEFAULT_SYNCHRONOUS=" CTIMEOPT_VAL(SQLITE_DEFAULT_SYNCHRONOUS),
+#endif
+#ifdef SQLITE_DEFAULT_WAL_AUTOCHECKPOINT
+ "DEFAULT_WAL_AUTOCHECKPOINT=" CTIMEOPT_VAL(SQLITE_DEFAULT_WAL_AUTOCHECKPOINT),
+#endif
+#ifdef SQLITE_DEFAULT_WAL_SYNCHRONOUS
+ "DEFAULT_WAL_SYNCHRONOUS=" CTIMEOPT_VAL(SQLITE_DEFAULT_WAL_SYNCHRONOUS),
+#endif
+#ifdef SQLITE_DEFAULT_WORKER_THREADS
+ "DEFAULT_WORKER_THREADS=" CTIMEOPT_VAL(SQLITE_DEFAULT_WORKER_THREADS),
+#endif
+#if SQLITE_DIRECT_OVERFLOW_READ
+ "DIRECT_OVERFLOW_READ",
+#endif
+#if SQLITE_DISABLE_DIRSYNC
+ "DISABLE_DIRSYNC",
+#endif
+#if SQLITE_DISABLE_FTS3_UNICODE
+ "DISABLE_FTS3_UNICODE",
+#endif
+#if SQLITE_DISABLE_FTS4_DEFERRED
+ "DISABLE_FTS4_DEFERRED",
+#endif
+#if SQLITE_DISABLE_INTRINSIC
+ "DISABLE_INTRINSIC",
+#endif
+#if SQLITE_DISABLE_LFS
+ "DISABLE_LFS",
+#endif
+#if SQLITE_DISABLE_PAGECACHE_OVERFLOW_STATS
+ "DISABLE_PAGECACHE_OVERFLOW_STATS",
+#endif
+#if SQLITE_DISABLE_SKIPAHEAD_DISTINCT
+ "DISABLE_SKIPAHEAD_DISTINCT",
+#endif
+#ifdef SQLITE_ENABLE_8_3_NAMES
+ "ENABLE_8_3_NAMES=" CTIMEOPT_VAL(SQLITE_ENABLE_8_3_NAMES),
+#endif
+#if SQLITE_ENABLE_API_ARMOR
+ "ENABLE_API_ARMOR",
+#endif
+#if SQLITE_ENABLE_ATOMIC_WRITE
+ "ENABLE_ATOMIC_WRITE",
+#endif
+#if SQLITE_ENABLE_BATCH_ATOMIC_WRITE
+ "ENABLE_BATCH_ATOMIC_WRITE",
+#endif
+#if SQLITE_ENABLE_CEROD
+ "ENABLE_CEROD",
+#endif
+#if SQLITE_ENABLE_COLUMN_METADATA
+ "ENABLE_COLUMN_METADATA",
+#endif
+#if SQLITE_ENABLE_COLUMN_USED_MASK
+ "ENABLE_COLUMN_USED_MASK",
+#endif
+#if SQLITE_ENABLE_COSTMULT
+ "ENABLE_COSTMULT",
+#endif
+#if SQLITE_ENABLE_CURSOR_HINTS
+ "ENABLE_CURSOR_HINTS",
+#endif
+#if SQLITE_ENABLE_DBSTAT_VTAB
+ "ENABLE_DBSTAT_VTAB",
+#endif
+#if SQLITE_ENABLE_EXPENSIVE_ASSERT
+ "ENABLE_EXPENSIVE_ASSERT",
+#endif
+#if SQLITE_ENABLE_FTS1
+ "ENABLE_FTS1",
+#endif
+#if SQLITE_ENABLE_FTS2
+ "ENABLE_FTS2",
+#endif
+#if SQLITE_ENABLE_FTS3
+ "ENABLE_FTS3",
+#endif
+#if SQLITE_ENABLE_FTS3_PARENTHESIS
+ "ENABLE_FTS3_PARENTHESIS",
+#endif
+#if SQLITE_ENABLE_FTS3_TOKENIZER
+ "ENABLE_FTS3_TOKENIZER",
+#endif
+#if SQLITE_ENABLE_FTS4
+ "ENABLE_FTS4",
+#endif
+#if SQLITE_ENABLE_FTS5
+ "ENABLE_FTS5",
+#endif
+#if SQLITE_ENABLE_HIDDEN_COLUMNS
+ "ENABLE_HIDDEN_COLUMNS",
+#endif
+#if SQLITE_ENABLE_ICU
+ "ENABLE_ICU",
+#endif
+#if SQLITE_ENABLE_IOTRACE
+ "ENABLE_IOTRACE",
+#endif
+#if SQLITE_ENABLE_JSON1
+ "ENABLE_JSON1",
+#endif
+#if SQLITE_ENABLE_LOAD_EXTENSION
+ "ENABLE_LOAD_EXTENSION",
+#endif
+#ifdef SQLITE_ENABLE_LOCKING_STYLE
+ "ENABLE_LOCKING_STYLE=" CTIMEOPT_VAL(SQLITE_ENABLE_LOCKING_STYLE),
+#endif
+#if SQLITE_ENABLE_MEMORY_MANAGEMENT
+ "ENABLE_MEMORY_MANAGEMENT",
+#endif
+#if SQLITE_ENABLE_MEMSYS3
+ "ENABLE_MEMSYS3",
+#endif
+#if SQLITE_ENABLE_MEMSYS5
+ "ENABLE_MEMSYS5",
+#endif
+#if SQLITE_ENABLE_MULTIPLEX
+ "ENABLE_MULTIPLEX",
+#endif
+#if SQLITE_ENABLE_NULL_TRIM
+ "ENABLE_NULL_TRIM",
+#endif
+#if SQLITE_ENABLE_OVERSIZE_CELL_CHECK
+ "ENABLE_OVERSIZE_CELL_CHECK",
+#endif
+#if SQLITE_ENABLE_PREUPDATE_HOOK
+ "ENABLE_PREUPDATE_HOOK",
+#endif
+#if SQLITE_ENABLE_QPSG
+ "ENABLE_QPSG",
+#endif
+#if SQLITE_ENABLE_RBU
+ "ENABLE_RBU",
+#endif
+#if SQLITE_ENABLE_RTREE
+ "ENABLE_RTREE",
+#endif
+#if SQLITE_ENABLE_SELECTTRACE
+ "ENABLE_SELECTTRACE",
+#endif
+#if SQLITE_ENABLE_SESSION
+ "ENABLE_SESSION",
+#endif
+#if SQLITE_ENABLE_SNAPSHOT
+ "ENABLE_SNAPSHOT",
+#endif
+#if SQLITE_ENABLE_SQLLOG
+ "ENABLE_SQLLOG",
+#endif
+#if defined(SQLITE_ENABLE_STAT4)
+ "ENABLE_STAT4",
+#elif defined(SQLITE_ENABLE_STAT3)
+ "ENABLE_STAT3",
+#endif
+#if SQLITE_ENABLE_STMTVTAB
+ "ENABLE_STMTVTAB",
+#endif
+#if SQLITE_ENABLE_STMT_SCANSTATUS
+ "ENABLE_STMT_SCANSTATUS",
+#endif
+#if SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
+ "ENABLE_UNKNOWN_SQL_FUNCTION",
+#endif
+#if SQLITE_ENABLE_UNLOCK_NOTIFY
+ "ENABLE_UNLOCK_NOTIFY",
+#endif
+#if SQLITE_ENABLE_UPDATE_DELETE_LIMIT
+ "ENABLE_UPDATE_DELETE_LIMIT",
+#endif
+#if SQLITE_ENABLE_URI_00_ERROR
+ "ENABLE_URI_00_ERROR",
+#endif
+#if SQLITE_ENABLE_VFSTRACE
+ "ENABLE_VFSTRACE",
+#endif
+#if SQLITE_ENABLE_WHERETRACE
+ "ENABLE_WHERETRACE",
+#endif
+#if SQLITE_ENABLE_ZIPVFS
+ "ENABLE_ZIPVFS",
+#endif
+#if SQLITE_EXPLAIN_ESTIMATED_ROWS
+ "EXPLAIN_ESTIMATED_ROWS",
+#endif
+#if SQLITE_EXTRA_IFNULLROW
+ "EXTRA_IFNULLROW",
+#endif
+#ifdef SQLITE_EXTRA_INIT
+ "EXTRA_INIT=" CTIMEOPT_VAL(SQLITE_EXTRA_INIT),
+#endif
+#ifdef SQLITE_EXTRA_SHUTDOWN
+ "EXTRA_SHUTDOWN=" CTIMEOPT_VAL(SQLITE_EXTRA_SHUTDOWN),
+#endif
+#ifdef SQLITE_FTS3_MAX_EXPR_DEPTH
+ "FTS3_MAX_EXPR_DEPTH=" CTIMEOPT_VAL(SQLITE_FTS3_MAX_EXPR_DEPTH),
+#endif
+#if SQLITE_FTS5_ENABLE_TEST_MI
+ "FTS5_ENABLE_TEST_MI",
+#endif
+#if SQLITE_FTS5_NO_WITHOUT_ROWID
+ "FTS5_NO_WITHOUT_ROWID",
+#endif
+#if SQLITE_HAS_CODEC
+ "HAS_CODEC",
+#endif
+#if HAVE_ISNAN || SQLITE_HAVE_ISNAN
+ "HAVE_ISNAN",
+#endif
+#if SQLITE_HOMEGROWN_RECURSIVE_MUTEX
+ "HOMEGROWN_RECURSIVE_MUTEX",
+#endif
+#if SQLITE_IGNORE_AFP_LOCK_ERRORS
+ "IGNORE_AFP_LOCK_ERRORS",
+#endif
+#if SQLITE_IGNORE_FLOCK_LOCK_ERRORS
+ "IGNORE_FLOCK_LOCK_ERRORS",
+#endif
+#if SQLITE_INLINE_MEMCPY
+ "INLINE_MEMCPY",
+#endif
+#if SQLITE_INT64_TYPE
+ "INT64_TYPE",
+#endif
+#ifdef SQLITE_INTEGRITY_CHECK_ERROR_MAX
+ "INTEGRITY_CHECK_ERROR_MAX=" CTIMEOPT_VAL(SQLITE_INTEGRITY_CHECK_ERROR_MAX),
+#endif
+#if SQLITE_LIKE_DOESNT_MATCH_BLOBS
+ "LIKE_DOESNT_MATCH_BLOBS",
+#endif
+#if SQLITE_LOCK_TRACE
+ "LOCK_TRACE",
+#endif
+#if SQLITE_LOG_CACHE_SPILL
+ "LOG_CACHE_SPILL",
+#endif
+#ifdef SQLITE_MALLOC_SOFT_LIMIT
+ "MALLOC_SOFT_LIMIT=" CTIMEOPT_VAL(SQLITE_MALLOC_SOFT_LIMIT),
+#endif
+#ifdef SQLITE_MAX_ATTACHED
+ "MAX_ATTACHED=" CTIMEOPT_VAL(SQLITE_MAX_ATTACHED),
+#endif
+#ifdef SQLITE_MAX_COLUMN
+ "MAX_COLUMN=" CTIMEOPT_VAL(SQLITE_MAX_COLUMN),
+#endif
+#ifdef SQLITE_MAX_COMPOUND_SELECT
+ "MAX_COMPOUND_SELECT=" CTIMEOPT_VAL(SQLITE_MAX_COMPOUND_SELECT),
+#endif
+#ifdef SQLITE_MAX_DEFAULT_PAGE_SIZE
+ "MAX_DEFAULT_PAGE_SIZE=" CTIMEOPT_VAL(SQLITE_MAX_DEFAULT_PAGE_SIZE),
+#endif
+#ifdef SQLITE_MAX_EXPR_DEPTH
+ "MAX_EXPR_DEPTH=" CTIMEOPT_VAL(SQLITE_MAX_EXPR_DEPTH),
+#endif
+#ifdef SQLITE_MAX_FUNCTION_ARG
+ "MAX_FUNCTION_ARG=" CTIMEOPT_VAL(SQLITE_MAX_FUNCTION_ARG),
+#endif
+#ifdef SQLITE_MAX_LENGTH
+ "MAX_LENGTH=" CTIMEOPT_VAL(SQLITE_MAX_LENGTH),
+#endif
+#ifdef SQLITE_MAX_LIKE_PATTERN_LENGTH
+ "MAX_LIKE_PATTERN_LENGTH=" CTIMEOPT_VAL(SQLITE_MAX_LIKE_PATTERN_LENGTH),
+#endif
+#ifdef SQLITE_MAX_MEMORY
+ "MAX_MEMORY=" CTIMEOPT_VAL(SQLITE_MAX_MEMORY),
+#endif
+#ifdef SQLITE_MAX_MMAP_SIZE
+ "MAX_MMAP_SIZE=" CTIMEOPT_VAL(SQLITE_MAX_MMAP_SIZE),
+#endif
+#ifdef SQLITE_MAX_MMAP_SIZE_
+ "MAX_MMAP_SIZE_=" CTIMEOPT_VAL(SQLITE_MAX_MMAP_SIZE_),
+#endif
+#ifdef SQLITE_MAX_PAGE_COUNT
+ "MAX_PAGE_COUNT=" CTIMEOPT_VAL(SQLITE_MAX_PAGE_COUNT),
+#endif
+#ifdef SQLITE_MAX_PAGE_SIZE
+ "MAX_PAGE_SIZE=" CTIMEOPT_VAL(SQLITE_MAX_PAGE_SIZE),
+#endif
+#ifdef SQLITE_MAX_SCHEMA_RETRY
+ "MAX_SCHEMA_RETRY=" CTIMEOPT_VAL(SQLITE_MAX_SCHEMA_RETRY),
+#endif
+#ifdef SQLITE_MAX_SQL_LENGTH
+ "MAX_SQL_LENGTH=" CTIMEOPT_VAL(SQLITE_MAX_SQL_LENGTH),
+#endif
+#ifdef SQLITE_MAX_TRIGGER_DEPTH
+ "MAX_TRIGGER_DEPTH=" CTIMEOPT_VAL(SQLITE_MAX_TRIGGER_DEPTH),
+#endif
+#ifdef SQLITE_MAX_VARIABLE_NUMBER
+ "MAX_VARIABLE_NUMBER=" CTIMEOPT_VAL(SQLITE_MAX_VARIABLE_NUMBER),
+#endif
+#ifdef SQLITE_MAX_VDBE_OP
+ "MAX_VDBE_OP=" CTIMEOPT_VAL(SQLITE_MAX_VDBE_OP),
+#endif
+#ifdef SQLITE_MAX_WORKER_THREADS
+ "MAX_WORKER_THREADS=" CTIMEOPT_VAL(SQLITE_MAX_WORKER_THREADS),
+#endif
+#if SQLITE_MEMDEBUG
+ "MEMDEBUG",
+#endif
+#if SQLITE_MIXED_ENDIAN_64BIT_FLOAT
+ "MIXED_ENDIAN_64BIT_FLOAT",
+#endif
+#if SQLITE_MMAP_READWRITE
+ "MMAP_READWRITE",
+#endif
+#if SQLITE_MUTEX_NOOP
+ "MUTEX_NOOP",
+#endif
+#if SQLITE_MUTEX_NREF
+ "MUTEX_NREF",
+#endif
+#if SQLITE_MUTEX_OMIT
+ "MUTEX_OMIT",
+#endif
+#if SQLITE_MUTEX_PTHREADS
+ "MUTEX_PTHREADS",
+#endif
+#if SQLITE_MUTEX_W32
+ "MUTEX_W32",
+#endif
+#if SQLITE_NEED_ERR_NAME
+ "NEED_ERR_NAME",
+#endif
+#if SQLITE_NOINLINE
+ "NOINLINE",
+#endif
+#if SQLITE_NO_SYNC
+ "NO_SYNC",
+#endif
+#if SQLITE_OMIT_ALTERTABLE
+ "OMIT_ALTERTABLE",
+#endif
+#if SQLITE_OMIT_ANALYZE
+ "OMIT_ANALYZE",
+#endif
+#if SQLITE_OMIT_ATTACH
+ "OMIT_ATTACH",
+#endif
+#if SQLITE_OMIT_AUTHORIZATION
+ "OMIT_AUTHORIZATION",
+#endif
+#if SQLITE_OMIT_AUTOINCREMENT
+ "OMIT_AUTOINCREMENT",
+#endif
+#if SQLITE_OMIT_AUTOINIT
+ "OMIT_AUTOINIT",
+#endif
+#if SQLITE_OMIT_AUTOMATIC_INDEX
+ "OMIT_AUTOMATIC_INDEX",
+#endif
+#if SQLITE_OMIT_AUTORESET
+ "OMIT_AUTORESET",
+#endif
+#if SQLITE_OMIT_AUTOVACUUM
+ "OMIT_AUTOVACUUM",
+#endif
+#if SQLITE_OMIT_BETWEEN_OPTIMIZATION
+ "OMIT_BETWEEN_OPTIMIZATION",
+#endif
+#if SQLITE_OMIT_BLOB_LITERAL
+ "OMIT_BLOB_LITERAL",
+#endif
+#if SQLITE_OMIT_BTREECOUNT
+ "OMIT_BTREECOUNT",
+#endif
+#if SQLITE_OMIT_CAST
+ "OMIT_CAST",
+#endif
+#if SQLITE_OMIT_CHECK
+ "OMIT_CHECK",
+#endif
+#if SQLITE_OMIT_COMPLETE
+ "OMIT_COMPLETE",
+#endif
+#if SQLITE_OMIT_COMPOUND_SELECT
+ "OMIT_COMPOUND_SELECT",
+#endif
+#if SQLITE_OMIT_CONFLICT_CLAUSE
+ "OMIT_CONFLICT_CLAUSE",
+#endif
+#if SQLITE_OMIT_CTE
+ "OMIT_CTE",
+#endif
+#if SQLITE_OMIT_DATETIME_FUNCS
+ "OMIT_DATETIME_FUNCS",
+#endif
+#if SQLITE_OMIT_DECLTYPE
+ "OMIT_DECLTYPE",
+#endif
+#if SQLITE_OMIT_DEPRECATED
+ "OMIT_DEPRECATED",
+#endif
+#if SQLITE_OMIT_DISKIO
+ "OMIT_DISKIO",
+#endif
+#if SQLITE_OMIT_EXPLAIN
+ "OMIT_EXPLAIN",
+#endif
+#if SQLITE_OMIT_FLAG_PRAGMAS
+ "OMIT_FLAG_PRAGMAS",
+#endif
+#if SQLITE_OMIT_FLOATING_POINT
+ "OMIT_FLOATING_POINT",
+#endif
+#if SQLITE_OMIT_FOREIGN_KEY
+ "OMIT_FOREIGN_KEY",
+#endif
+#if SQLITE_OMIT_GET_TABLE
+ "OMIT_GET_TABLE",
+#endif
+#if SQLITE_OMIT_HEX_INTEGER
+ "OMIT_HEX_INTEGER",
+#endif
+#if SQLITE_OMIT_INCRBLOB
+ "OMIT_INCRBLOB",
+#endif
+#if SQLITE_OMIT_INTEGRITY_CHECK
+ "OMIT_INTEGRITY_CHECK",
+#endif
+#if SQLITE_OMIT_LIKE_OPTIMIZATION
+ "OMIT_LIKE_OPTIMIZATION",
+#endif
+#if SQLITE_OMIT_LOAD_EXTENSION
+ "OMIT_LOAD_EXTENSION",
+#endif
+#if SQLITE_OMIT_LOCALTIME
+ "OMIT_LOCALTIME",
+#endif
+#if SQLITE_OMIT_LOOKASIDE
+ "OMIT_LOOKASIDE",
+#endif
+#if SQLITE_OMIT_MEMORYDB
+ "OMIT_MEMORYDB",
+#endif
+#if SQLITE_OMIT_OR_OPTIMIZATION
+ "OMIT_OR_OPTIMIZATION",
+#endif
+#if SQLITE_OMIT_PAGER_PRAGMAS
+ "OMIT_PAGER_PRAGMAS",
+#endif
+#if SQLITE_OMIT_PARSER_TRACE
+ "OMIT_PARSER_TRACE",
+#endif
+#if SQLITE_OMIT_POPEN
+ "OMIT_POPEN",
+#endif
+#if SQLITE_OMIT_PRAGMA
+ "OMIT_PRAGMA",
+#endif
+#if SQLITE_OMIT_PROGRESS_CALLBACK
+ "OMIT_PROGRESS_CALLBACK",
+#endif
+#if SQLITE_OMIT_QUICKBALANCE
+ "OMIT_QUICKBALANCE",
+#endif
+#if SQLITE_OMIT_REINDEX
+ "OMIT_REINDEX",
+#endif
+#if SQLITE_OMIT_SCHEMA_PRAGMAS
+ "OMIT_SCHEMA_PRAGMAS",
+#endif
+#if SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS
+ "OMIT_SCHEMA_VERSION_PRAGMAS",
+#endif
+#if SQLITE_OMIT_SHARED_CACHE
+ "OMIT_SHARED_CACHE",
+#endif
+#if SQLITE_OMIT_SHUTDOWN_DIRECTORIES
+ "OMIT_SHUTDOWN_DIRECTORIES",
+#endif
+#if SQLITE_OMIT_SUBQUERY
+ "OMIT_SUBQUERY",
+#endif
+#if SQLITE_OMIT_TCL_VARIABLE
+ "OMIT_TCL_VARIABLE",
+#endif
+#if SQLITE_OMIT_TEMPDB
+ "OMIT_TEMPDB",
+#endif
+#if SQLITE_OMIT_TEST_CONTROL
+ "OMIT_TEST_CONTROL",
+#endif
+#if SQLITE_OMIT_TRACE
+ "OMIT_TRACE",
+#endif
+#if SQLITE_OMIT_TRIGGER
+ "OMIT_TRIGGER",
+#endif
+#if SQLITE_OMIT_TRUNCATE_OPTIMIZATION
+ "OMIT_TRUNCATE_OPTIMIZATION",
+#endif
+#if SQLITE_OMIT_UTF16
+ "OMIT_UTF16",
+#endif
+#if SQLITE_OMIT_VACUUM
+ "OMIT_VACUUM",
+#endif
+#if SQLITE_OMIT_VIEW
+ "OMIT_VIEW",
+#endif
+#if SQLITE_OMIT_VIRTUALTABLE
+ "OMIT_VIRTUALTABLE",
+#endif
+#if SQLITE_OMIT_WAL
+ "OMIT_WAL",
+#endif
+#if SQLITE_OMIT_WSD
+ "OMIT_WSD",
+#endif
+#if SQLITE_OMIT_XFER_OPT
+ "OMIT_XFER_OPT",
+#endif
+#if SQLITE_PCACHE_SEPARATE_HEADER
+ "PCACHE_SEPARATE_HEADER",
+#endif
+#if SQLITE_PERFORMANCE_TRACE
+ "PERFORMANCE_TRACE",
+#endif
+#if SQLITE_POWERSAFE_OVERWRITE
+ "POWERSAFE_OVERWRITE",
+#endif
+#if SQLITE_PREFER_PROXY_LOCKING
+ "PREFER_PROXY_LOCKING",
+#endif
+#if SQLITE_PROXY_DEBUG
+ "PROXY_DEBUG",
+#endif
+#if SQLITE_REVERSE_UNORDERED_SELECTS
+ "REVERSE_UNORDERED_SELECTS",
+#endif
+#if SQLITE_RTREE_INT_ONLY
+ "RTREE_INT_ONLY",
+#endif
+#if SQLITE_SECURE_DELETE
+ "SECURE_DELETE",
+#endif
+#if SQLITE_SMALL_STACK
+ "SMALL_STACK",
+#endif
+#ifdef SQLITE_SORTER_PMASZ
+ "SORTER_PMASZ=" CTIMEOPT_VAL(SQLITE_SORTER_PMASZ),
+#endif
+#if SQLITE_SOUNDEX
+ "SOUNDEX",
+#endif
+#ifdef SQLITE_STAT4_SAMPLES
+ "STAT4_SAMPLES=" CTIMEOPT_VAL(SQLITE_STAT4_SAMPLES),
+#endif
+#ifdef SQLITE_STMTJRNL_SPILL
+ "STMTJRNL_SPILL=" CTIMEOPT_VAL(SQLITE_STMTJRNL_SPILL),
+#endif
+#if SQLITE_SUBSTR_COMPATIBILITY
+ "SUBSTR_COMPATIBILITY",
+#endif
+#if SQLITE_SYSTEM_MALLOC
+ "SYSTEM_MALLOC",
+#endif
+#if SQLITE_TCL
+ "TCL",
+#endif
+#ifdef SQLITE_TEMP_STORE
+ "TEMP_STORE=" CTIMEOPT_VAL(SQLITE_TEMP_STORE),
+#endif
+#if SQLITE_TEST
+ "TEST",
+#endif
+#if defined(SQLITE_THREADSAFE)
+ "THREADSAFE=" CTIMEOPT_VAL(SQLITE_THREADSAFE),
+#elif defined(THREADSAFE)
+ "THREADSAFE=" CTIMEOPT_VAL(THREADSAFE),
+#else
+ "THREADSAFE=1",
+#endif
+#if SQLITE_UNLINK_AFTER_CLOSE
+ "UNLINK_AFTER_CLOSE",
+#endif
+#if SQLITE_UNTESTABLE
+ "UNTESTABLE",
+#endif
+#if SQLITE_USER_AUTHENTICATION
+ "USER_AUTHENTICATION",
+#endif
+#if SQLITE_USE_ALLOCA
+ "USE_ALLOCA",
+#endif
+#if SQLITE_USE_FCNTL_TRACE
+ "USE_FCNTL_TRACE",
+#endif
+#if SQLITE_USE_URI
+ "USE_URI",
+#endif
+#if SQLITE_VDBE_COVERAGE
+ "VDBE_COVERAGE",
+#endif
+#if SQLITE_WIN32_MALLOC
+ "WIN32_MALLOC",
+#endif
+#if SQLITE_ZERO_MALLOC
+ "ZERO_MALLOC",
+#endif
+/*
+** END CODE GENERATED BY tool/mkctime.tcl
+*/
+};
+
+SQLITE_PRIVATE const char **sqlite3CompileOptions(int *pnOpt){
+ *pnOpt = sizeof(sqlite3azCompileOpt) / sizeof(sqlite3azCompileOpt[0]);
+ return (const char**)sqlite3azCompileOpt;
+}
+
+#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */
+
+/************** End of ctime.c ***********************************************/
/************** Begin file sqliteInt.h ***************************************/
/*
** 2001 September 15
@@ -39,8 +793,43 @@
** Internal interface definitions for SQLite.
**
*/
-#ifndef _SQLITEINT_H_
-#define _SQLITEINT_H_
+#ifndef SQLITEINT_H
+#define SQLITEINT_H
+
+/* Special Comments:
+**
+** Some comments have special meaning to the tools that measure test
+** coverage:
+**
+** NO_TEST - The branches on this line are not
+** measured by branch coverage. This is
+** used on lines of code that actually
+** implement parts of coverage testing.
+**
+** OPTIMIZATION-IF-TRUE - This branch is allowed to alway be false
+** and the correct answer is still obtained,
+** though perhaps more slowly.
+**
+** OPTIMIZATION-IF-FALSE - This branch is allowed to alway be true
+** and the correct answer is still obtained,
+** though perhaps more slowly.
+**
+** PREVENTS-HARMLESS-OVERREAD - This branch prevents a buffer overread
+** that would be harmless and undetectable
+** if it did occur.
+**
+** In all cases, the special comment must be enclosed in the usual
+** slash-asterisk...asterisk-slash comment marks, with no spaces between the
+** asterisks and the comment text.
+*/
+
+/*
+** Make sure the Tcl calling convention macro is defined. This macro is
+** only used by test code and Tcl integration code.
+*/
+#ifndef SQLITE_TCLAPI
+# define SQLITE_TCLAPI
+#endif
/*
** Include the header file used to customize the compiler options for MSVC.
@@ -64,8 +853,8 @@
**
** This file contains code that is specific to MSVC.
*/
-#ifndef _MSVC_H_
-#define _MSVC_H_
+#ifndef SQLITE_MSVC_H
+#define SQLITE_MSVC_H
#if defined(_MSC_VER)
#pragma warning(disable : 4054)
@@ -85,7 +874,7 @@
#pragma warning(disable : 4706)
#endif /* defined(_MSC_VER) */
-#endif /* _MSVC_H_ */
+#endif /* SQLITE_MSVC_H */
/************** End of msvc.h ************************************************/
/************** Continuing where we left off in sqliteInt.h ******************/
@@ -123,6 +912,9 @@
#else
/* This is not VxWorks. */
#define OS_VXWORKS 0
+#define HAVE_FCHOWN 1
+#define HAVE_READLINK 1
+#define HAVE_LSTAT 1
#endif /* defined(_WRS_KERNEL) */
/************** End of vxworks.h *********************************************/
@@ -160,12 +952,29 @@
# define _LARGEFILE_SOURCE 1
#endif
-/* What version of GCC is being used. 0 means GCC is not being used */
-#ifdef __GNUC__
+/* The GCC_VERSION and MSVC_VERSION macros are used to
+** conditionally include optimizations for each of these compilers. A
+** value of 0 means that compiler is not being used. The
+** SQLITE_DISABLE_INTRINSIC macro means do not use any compiler-specific
+** optimizations, and hence set all compiler macros to 0
+**
+** There was once also a CLANG_VERSION macro. However, we learn that the
+** version numbers in clang are for "marketing" only and are inconsistent
+** and unreliable. Fortunately, all versions of clang also recognize the
+** gcc version numbers and have reasonable settings for gcc version numbers,
+** so the GCC_VERSION macro will be set to a correct non-zero value even
+** when compiling with clang.
+*/
+#if defined(__GNUC__) && !defined(SQLITE_DISABLE_INTRINSIC)
# define GCC_VERSION (__GNUC__*1000000+__GNUC_MINOR__*1000+__GNUC_PATCHLEVEL__)
#else
# define GCC_VERSION 0
#endif
+#if defined(_MSC_VER) && !defined(SQLITE_DISABLE_INTRINSIC)
+# define MSVC_VERSION _MSC_VER
+#else
+# define MSVC_VERSION 0
+#endif
/* Needed for various definitions... */
#if defined(__GNUC__) && !defined(_GNU_SOURCE)
@@ -215,7 +1024,7 @@
/************** Include sqlite3.h in the middle of sqliteInt.h ***************/
/************** Begin file sqlite3.h *****************************************/
/*
-** 2001 September 15
+** 2001-09-15
**
** The author disclaims copyright to this source code. In place of
** a legal notice, here is a blessing:
@@ -246,8 +1055,8 @@
** the version number) and changes its name to "sqlite3.h" as
** part of the build process.
*/
-#ifndef _SQLITE3_H_
-#define _SQLITE3_H_
+#ifndef SQLITE3_H
+#define SQLITE3_H
#include /* Needed for the definition of va_list */
/*
@@ -270,8 +1079,17 @@ extern "C" {
#ifndef SQLITE_CDECL
# define SQLITE_CDECL
#endif
+#ifndef SQLITE_APICALL
+# define SQLITE_APICALL
+#endif
#ifndef SQLITE_STDCALL
-# define SQLITE_STDCALL
+# define SQLITE_STDCALL SQLITE_APICALL
+#endif
+#ifndef SQLITE_CALLBACK
+# define SQLITE_CALLBACK
+#endif
+#ifndef SQLITE_SYSAPI
+# define SQLITE_SYSAPI
#endif
/*
@@ -315,25 +1133,28 @@ extern "C" {
** be held constant and Z will be incremented or else Y will be incremented
** and Z will be reset to zero.
**
-** Since version 3.6.18, SQLite source code has been stored in the
+** Since [version 3.6.18] ([dateof:3.6.18]),
+** SQLite source code has been stored in the
** Fossil configuration management
** system. ^The SQLITE_SOURCE_ID macro evaluates to
** a string which identifies a particular check-in of SQLite
** within its configuration management system. ^The SQLITE_SOURCE_ID
-** string contains the date and time of the check-in (UTC) and an SHA1
-** hash of the entire source tree.
+** string contains the date and time of the check-in (UTC) and a SHA1
+** or SHA3-256 hash of the entire source tree. If the source code has
+** been edited in any way since it was last checked in, then the last
+** four hexadecimal digits of the hash may be modified.
**
** See also: [sqlite3_libversion()],
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
-#define SQLITE_VERSION "3.10.2"
-#define SQLITE_VERSION_NUMBER 3010002
-#define SQLITE_SOURCE_ID "2016-01-20 15:27:19 17efb4209f97fb4971656086b138599a91a75ff9"
+#define SQLITE_VERSION "3.21.0"
+#define SQLITE_VERSION_NUMBER 3021000
+#define SQLITE_SOURCE_ID "2017-10-24 18:55:49 1a584e499906b5c87ec7d43d4abce641fdf017c42125b083109bc77c4de48827"
/*
** CAPI3REF: Run-Time Library Version Numbers
-** KEYWORDS: sqlite3_version, sqlite3_sourceid
+** KEYWORDS: sqlite3_version sqlite3_sourceid
**
** These interfaces provide the same information as the [SQLITE_VERSION],
** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros
@@ -345,7 +1166,7 @@ extern "C" {
**
**
** assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER );
-** assert( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)==0 );
+** assert( strncmp(sqlite3_sourceid(),SQLITE_SOURCE_ID,80)==0 );
** assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 );
**
)^
**
@@ -355,16 +1176,18 @@ extern "C" {
** function is provided for use in DLLs since DLL users usually do not have
** direct access to string constants within the DLL. ^The
** sqlite3_libversion_number() function returns an integer equal to
-** [SQLITE_VERSION_NUMBER]. ^The sqlite3_sourceid() function returns
+** [SQLITE_VERSION_NUMBER]. ^(The sqlite3_sourceid() function returns
** a pointer to a string constant whose value is the same as the
-** [SQLITE_SOURCE_ID] C preprocessor macro.
+** [SQLITE_SOURCE_ID] C preprocessor macro. Except if SQLite is built
+** using an edited copy of [the amalgamation], then the last four characters
+** of the hash might be different from [SQLITE_SOURCE_ID].)^
**
** See also: [sqlite_version()] and [sqlite_source_id()].
*/
SQLITE_API const char sqlite3_version[] = SQLITE_VERSION;
-SQLITE_API const char *SQLITE_STDCALL sqlite3_libversion(void);
-SQLITE_API const char *SQLITE_STDCALL sqlite3_sourceid(void);
-SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void);
+SQLITE_API const char *sqlite3_libversion(void);
+SQLITE_API const char *sqlite3_sourceid(void);
+SQLITE_API int sqlite3_libversion_number(void);
/*
** CAPI3REF: Run-Time Library Compilation Options Diagnostics
@@ -389,8 +1212,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_libversion_number(void);
** [sqlite_compileoption_get()] and the [compile_options pragma].
*/
#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
-SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName);
-SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N);
+SQLITE_API int sqlite3_compileoption_used(const char *zOptName);
+SQLITE_API const char *sqlite3_compileoption_get(int N);
#endif
/*
@@ -429,7 +1252,7 @@ SQLITE_API const char *SQLITE_STDCALL sqlite3_compileoption_get(int N);
**
** See the [threading mode] documentation for additional information.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_threadsafe(void);
+SQLITE_API int sqlite3_threadsafe(void);
/*
** CAPI3REF: Database Connection Handle
@@ -465,7 +1288,11 @@ typedef struct sqlite3 sqlite3;
*/
#ifdef SQLITE_INT64_TYPE
typedef SQLITE_INT64_TYPE sqlite_int64;
- typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;
+# ifdef SQLITE_UINT64_TYPE
+ typedef SQLITE_UINT64_TYPE sqlite_uint64;
+# else
+ typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;
+# endif
#elif defined(_MSC_VER) || defined(__BORLANDC__)
typedef __int64 sqlite_int64;
typedef unsigned __int64 sqlite_uint64;
@@ -526,8 +1353,8 @@ typedef sqlite_uint64 sqlite3_uint64;
** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer
** argument is a harmless no-op.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_close(sqlite3*);
-SQLITE_API int SQLITE_STDCALL sqlite3_close_v2(sqlite3*);
+SQLITE_API int sqlite3_close(sqlite3*);
+SQLITE_API int sqlite3_close_v2(sqlite3*);
/*
** The type for a callback function.
@@ -563,7 +1390,7 @@ typedef int (*sqlite3_callback)(void*,int,char**, char**);
** from [sqlite3_malloc()] and passed back through the 5th parameter.
** To avoid memory leaks, the application should invoke [sqlite3_free()]
** on error message strings returned through the 5th parameter of
-** of sqlite3_exec() after the error message string is no longer needed.
+** sqlite3_exec() after the error message string is no longer needed.
** ^If the 5th parameter to sqlite3_exec() is not NULL and no errors
** occur, then sqlite3_exec() sets the pointer in its 5th parameter to
** NULL before returning.
@@ -598,7 +1425,7 @@ typedef int (*sqlite3_callback)(void*,int,char**, char**);
** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.
**
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_exec(
+SQLITE_API int sqlite3_exec(
sqlite3*, /* An open database */
const char *sql, /* SQL to be evaluated */
int (*callback)(void*,int,char**,char**), /* Callback function */
@@ -619,7 +1446,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_exec(
*/
#define SQLITE_OK 0 /* Successful result */
/* beginning-of-error-codes */
-#define SQLITE_ERROR 1 /* SQL error or missing database */
+#define SQLITE_ERROR 1 /* Generic error */
#define SQLITE_INTERNAL 2 /* Internal logic error in SQLite */
#define SQLITE_PERM 3 /* Access permission denied */
#define SQLITE_ABORT 4 /* Callback routine requested an abort */
@@ -634,7 +1461,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_exec(
#define SQLITE_FULL 13 /* Insertion failed because database is full */
#define SQLITE_CANTOPEN 14 /* Unable to open the database file */
#define SQLITE_PROTOCOL 15 /* Database lock protocol error */
-#define SQLITE_EMPTY 16 /* Database is empty */
+#define SQLITE_EMPTY 16 /* Internal use only */
#define SQLITE_SCHEMA 17 /* The database schema changed */
#define SQLITE_TOOBIG 18 /* String or BLOB exceeds size limit */
#define SQLITE_CONSTRAINT 19 /* Abort due to constraint violation */
@@ -642,7 +1469,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_exec(
#define SQLITE_MISUSE 21 /* Library used incorrectly */
#define SQLITE_NOLFS 22 /* Uses OS features not supported on host */
#define SQLITE_AUTH 23 /* Authorization denied */
-#define SQLITE_FORMAT 24 /* Auxiliary database format error */
+#define SQLITE_FORMAT 24 /* Not used */
#define SQLITE_RANGE 25 /* 2nd parameter to sqlite3_bind out of range */
#define SQLITE_NOTADB 26 /* File opened that is not a database file */
#define SQLITE_NOTICE 27 /* Notifications from sqlite3_log() */
@@ -659,7 +1486,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_exec(
** [result codes]. However, experience has shown that many of
** these result codes are too coarse-grained. They do not provide as
** much information about problems as programmers might like. In an effort to
-** address this, newer versions of SQLite (version 3.3.8 and later) include
+** address this, newer versions of SQLite (version 3.3.8 [dateof:3.3.8]
+** and later) include
** support for additional result codes that provide more detailed information
** about errors. These [extended result codes] are enabled or disabled
** on a per database connection basis using the
@@ -695,6 +1523,9 @@ SQLITE_API int SQLITE_STDCALL sqlite3_exec(
#define SQLITE_IOERR_CONVPATH (SQLITE_IOERR | (26<<8))
#define SQLITE_IOERR_VNODE (SQLITE_IOERR | (27<<8))
#define SQLITE_IOERR_AUTH (SQLITE_IOERR | (28<<8))
+#define SQLITE_IOERR_BEGIN_ATOMIC (SQLITE_IOERR | (29<<8))
+#define SQLITE_IOERR_COMMIT_ATOMIC (SQLITE_IOERR | (30<<8))
+#define SQLITE_IOERR_ROLLBACK_ATOMIC (SQLITE_IOERR | (31<<8))
#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8))
#define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8))
#define SQLITE_BUSY_SNAPSHOT (SQLITE_BUSY | (2<<8))
@@ -722,6 +1553,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_exec(
#define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8))
#define SQLITE_WARNING_AUTOINDEX (SQLITE_WARNING | (1<<8))
#define SQLITE_AUTH_USER (SQLITE_AUTH | (1<<8))
+#define SQLITE_OK_LOAD_PERMANENTLY (SQLITE_OK | (1<<8))
/*
** CAPI3REF: Flags For File Open Operations
@@ -776,10 +1608,15 @@ SQLITE_API int SQLITE_STDCALL sqlite3_exec(
** file that were written at the application level might have changed
** and that adjacent bytes, even bytes within the same sector are
** guaranteed to be unchanged. The SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN
-** flag indicate that a file cannot be deleted when open. The
+** flag indicates that a file cannot be deleted when open. The
** SQLITE_IOCAP_IMMUTABLE flag indicates that the file is on
** read-only media and cannot be changed even by processes with
** elevated privileges.
+**
+** The SQLITE_IOCAP_BATCH_ATOMIC property means that the underlying
+** filesystem supports doing multiple write operations atomically when those
+** write operations are bracketed by [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] and
+** [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE].
*/
#define SQLITE_IOCAP_ATOMIC 0x00000001
#define SQLITE_IOCAP_ATOMIC512 0x00000002
@@ -795,6 +1632,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_exec(
#define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN 0x00000800
#define SQLITE_IOCAP_POWERSAFE_OVERWRITE 0x00001000
#define SQLITE_IOCAP_IMMUTABLE 0x00002000
+#define SQLITE_IOCAP_BATCH_ATOMIC 0x00004000
/*
** CAPI3REF: File Locking Levels
@@ -926,6 +1764,10 @@ struct sqlite3_file {
** [SQLITE_IOCAP_ATOMIC64K]
** [SQLITE_IOCAP_SAFE_APPEND]
** [SQLITE_IOCAP_SEQUENTIAL]
+** [SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN]
+** [SQLITE_IOCAP_POWERSAFE_OVERWRITE]
+** [SQLITE_IOCAP_IMMUTABLE]
+** [SQLITE_IOCAP_BATCH_ATOMIC]
**
**
** The SQLITE_IOCAP_ATOMIC property means that all writes of
@@ -1054,7 +1896,7 @@ struct sqlite3_io_methods {
** opcode allows these two values (10 retries and 25 milliseconds of delay)
** to be adjusted. The values are changed for all database connections
** within the same process. The argument is a pointer to an array of two
-** integers where the first integer i the new retry count and the second
+** integers where the first integer is the new retry count and the second
** integer is the delay. If either integer is negative, then the setting
** is not changed but instead the prior value of that setting is written
** into the array entry, allowing the current retry settings to be
@@ -1182,6 +2024,12 @@ struct sqlite3_io_methods {
** on whether or not the file has been renamed, moved, or deleted since it
** was first opened.
**
+** [[SQLITE_FCNTL_WIN32_GET_HANDLE]]
+** The [SQLITE_FCNTL_WIN32_GET_HANDLE] opcode can be used to obtain the
+** underlying native file handle associated with a file handle. This file
+** control interprets its argument as a pointer to a native file handle and
+** writes the resulting value there.
+**
** [[SQLITE_FCNTL_WIN32_SET_HANDLE]]
** The [SQLITE_FCNTL_WIN32_SET_HANDLE] opcode is used for debugging. This
** opcode causes the xFileControl method to swap the file handle with the one
@@ -1203,6 +2051,40 @@ struct sqlite3_io_methods {
** The [SQLITE_FCNTL_RBU] opcode is implemented by the special VFS used by
** the RBU extension only. All other VFS should return SQLITE_NOTFOUND for
** this opcode.
+**
+** [[SQLITE_FCNTL_BEGIN_ATOMIC_WRITE]]
+** If the [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] opcode returns SQLITE_OK, then
+** the file descriptor is placed in "batch write mode", which
+** means all subsequent write operations will be deferred and done
+** atomically at the next [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE]. Systems
+** that do not support batch atomic writes will return SQLITE_NOTFOUND.
+** ^Following a successful SQLITE_FCNTL_BEGIN_ATOMIC_WRITE and prior to
+** the closing [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE] or
+** [SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE], SQLite will make
+** no VFS interface calls on the same [sqlite3_file] file descriptor
+** except for calls to the xWrite method and the xFileControl method
+** with [SQLITE_FCNTL_SIZE_HINT].
+**
+** [[SQLITE_FCNTL_COMMIT_ATOMIC_WRITE]]
+** The [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE] opcode causes all write
+** operations since the previous successful call to
+** [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] to be performed atomically.
+** This file control returns [SQLITE_OK] if and only if the writes were
+** all performed successfully and have been committed to persistent storage.
+** ^Regardless of whether or not it is successful, this file control takes
+** the file descriptor out of batch write mode so that all subsequent
+** write operations are independent.
+** ^SQLite will never invoke SQLITE_FCNTL_COMMIT_ATOMIC_WRITE without
+** a prior successful call to [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE].
+**
+** [[SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE]]
+** The [SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE] opcode causes all write
+** operations since the previous successful call to
+** [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] to be rolled back.
+** ^This file control takes the file descriptor out of batch write mode
+** so that all subsequent write operations are independent.
+** ^SQLite will never invoke SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE without
+** a prior successful call to [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE].
**
*/
#define SQLITE_FCNTL_LOCKSTATE 1
@@ -1232,6 +2114,11 @@ struct sqlite3_io_methods {
#define SQLITE_FCNTL_RBU 26
#define SQLITE_FCNTL_VFS_POINTER 27
#define SQLITE_FCNTL_JOURNAL_POINTER 28
+#define SQLITE_FCNTL_WIN32_GET_HANDLE 29
+#define SQLITE_FCNTL_PDB 30
+#define SQLITE_FCNTL_BEGIN_ATOMIC_WRITE 31
+#define SQLITE_FCNTL_COMMIT_ATOMIC_WRITE 32
+#define SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE 33
/* deprecated names */
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
@@ -1251,6 +2138,16 @@ struct sqlite3_io_methods {
*/
typedef struct sqlite3_mutex sqlite3_mutex;
+/*
+** CAPI3REF: Loadable Extension Thunk
+**
+** A pointer to the opaque sqlite3_api_routines structure is passed as
+** the third parameter to entry points of [loadable extensions]. This
+** structure must be typedefed in order to work around compiler warnings
+** on some platforms.
+*/
+typedef struct sqlite3_api_routines sqlite3_api_routines;
+
/*
** CAPI3REF: OS Interface Object
**
@@ -1444,7 +2341,7 @@ struct sqlite3_vfs {
const char *(*xNextSystemCall)(sqlite3_vfs*, const char *zName);
/*
** The methods above are in versions 1 through 3 of the sqlite_vfs object.
- ** New fields may be appended in figure versions. The iVersion
+ ** New fields may be appended in future versions. The iVersion
** value will increment whenever this happens.
*/
};
@@ -1586,10 +2483,10 @@ struct sqlite3_vfs {
** must return [SQLITE_OK] on success and some other [error code] upon
** failure.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_initialize(void);
-SQLITE_API int SQLITE_STDCALL sqlite3_shutdown(void);
-SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void);
-SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void);
+SQLITE_API int sqlite3_initialize(void);
+SQLITE_API int sqlite3_shutdown(void);
+SQLITE_API int sqlite3_os_init(void);
+SQLITE_API int sqlite3_os_end(void);
/*
** CAPI3REF: Configuring The SQLite Library
@@ -1622,7 +2519,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void);
** ^If the option is unknown or SQLite is unable to set the option
** then this routine returns a non-zero [error code].
*/
-SQLITE_API int SQLITE_CDECL sqlite3_config(int, ...);
+SQLITE_API int sqlite3_config(int, ...);
/*
** CAPI3REF: Configure database connections
@@ -1641,7 +2538,7 @@ SQLITE_API int SQLITE_CDECL sqlite3_config(int, ...);
** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if
** the call is considered successful.
*/
-SQLITE_API int SQLITE_CDECL sqlite3_db_config(sqlite3*, int op, ...);
+SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...);
/*
** CAPI3REF: Memory Allocation Routines
@@ -1792,6 +2689,16 @@ struct sqlite3_mem_methods {
** routines with a wrapper that simulations memory allocation failure or
** tracks memory usage, for example.
**
+** [[SQLITE_CONFIG_SMALL_MALLOC]] SQLITE_CONFIG_SMALL_MALLOC
+** ^The SQLITE_CONFIG_SMALL_MALLOC option takes single argument of
+** type int, interpreted as a boolean, which if true provides a hint to
+** SQLite that it should avoid large memory allocations if possible.
+** SQLite will run faster if it is free to make large memory allocations,
+** but some application might prefer to run slower in exchange for
+** guarantees about memory fragmentation that are possible if large
+** allocations are avoided. This hint is normally off.
+**
+**
** [[SQLITE_CONFIG_MEMSTATUS]] SQLITE_CONFIG_MEMSTATUS
** ^The SQLITE_CONFIG_MEMSTATUS option takes single argument of type int,
** interpreted as a boolean, which enables or disables the collection of
@@ -1809,25 +2716,7 @@ struct sqlite3_mem_methods {
**
**
** [[SQLITE_CONFIG_SCRATCH]] SQLITE_CONFIG_SCRATCH
-** ^The SQLITE_CONFIG_SCRATCH option specifies a static memory buffer
-** that SQLite can use for scratch memory. ^(There are three arguments
-** to SQLITE_CONFIG_SCRATCH: A pointer an 8-byte
-** aligned memory buffer from which the scratch allocations will be
-** drawn, the size of each scratch allocation (sz),
-** and the maximum number of scratch allocations (N).)^
-** The first argument must be a pointer to an 8-byte aligned buffer
-** of at least sz*N bytes of memory.
-** ^SQLite will not use more than one scratch buffers per thread.
-** ^SQLite will never request a scratch buffer that is more than 6
-** times the database page size.
-** ^If SQLite needs needs additional
-** scratch memory beyond what is provided by this configuration option, then
-** [sqlite3_malloc()] will be used to obtain the memory needed.
-** ^When the application provides any amount of scratch memory using
-** SQLITE_CONFIG_SCRATCH, SQLite avoids unnecessary large
-** [sqlite3_malloc|heap allocations].
-** This can help [Robson proof|prevent memory allocation failures] due to heap
-** fragmentation in low-memory embedded systems.
+**
The SQLITE_CONFIG_SCRATCH option is no longer used.
**
**
** [[SQLITE_CONFIG_PAGECACHE]] SQLITE_CONFIG_PAGECACHE
@@ -1863,8 +2752,7 @@ struct sqlite3_mem_methods {
** [[SQLITE_CONFIG_HEAP]] SQLITE_CONFIG_HEAP
** ^The SQLITE_CONFIG_HEAP option specifies a static memory buffer
** that SQLite will use for all of its dynamic memory allocation needs
-** beyond those provided for by [SQLITE_CONFIG_SCRATCH] and
-** [SQLITE_CONFIG_PAGECACHE].
+** beyond those provided for by [SQLITE_CONFIG_PAGECACHE].
** ^The SQLITE_CONFIG_HEAP option is only available if SQLite is compiled
** with either [SQLITE_ENABLE_MEMSYS3] or [SQLITE_ENABLE_MEMSYS5] and returns
** [SQLITE_ERROR] if invoked otherwise.
@@ -2036,6 +2924,20 @@ struct sqlite3_mem_methods {
** is enabled (using the [PRAGMA threads] command) and the amount of content
** to be sorted exceeds the page size times the minimum of the
** [PRAGMA cache_size] setting and this value.
+**
+** [[SQLITE_CONFIG_STMTJRNL_SPILL]]
+** SQLITE_CONFIG_STMTJRNL_SPILL
+** ^The SQLITE_CONFIG_STMTJRNL_SPILL option takes a single parameter which
+** becomes the [statement journal] spill-to-disk threshold.
+** [Statement journals] are held in memory until their size (in bytes)
+** exceeds this threshold, at which point they are written to disk.
+** Or if the threshold is -1, statement journals are always held
+** exclusively in memory.
+** Since many statement journals never become large, setting the spill
+** threshold to a value such as 64KiB can greatly reduce the amount of
+** I/O required to support statement rollback.
+** The default value for this setting is controlled by the
+** [SQLITE_STMTJRNL_SPILL] compile-time option.
**
*/
#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */
@@ -2043,7 +2945,7 @@ struct sqlite3_mem_methods {
#define SQLITE_CONFIG_SERIALIZED 3 /* nil */
#define SQLITE_CONFIG_MALLOC 4 /* sqlite3_mem_methods* */
#define SQLITE_CONFIG_GETMALLOC 5 /* sqlite3_mem_methods* */
-#define SQLITE_CONFIG_SCRATCH 6 /* void*, int sz, int N */
+#define SQLITE_CONFIG_SCRATCH 6 /* No longer used */
#define SQLITE_CONFIG_PAGECACHE 7 /* void*, int sz, int N */
#define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */
#define SQLITE_CONFIG_MEMSTATUS 9 /* boolean */
@@ -2063,6 +2965,8 @@ struct sqlite3_mem_methods {
#define SQLITE_CONFIG_WIN32_HEAPSIZE 23 /* int nByte */
#define SQLITE_CONFIG_PCACHE_HDRSZ 24 /* int *psz */
#define SQLITE_CONFIG_PMASZ 25 /* unsigned int szPma */
+#define SQLITE_CONFIG_STMTJRNL_SPILL 26 /* int nByte */
+#define SQLITE_CONFIG_SMALL_MALLOC 27 /* boolean */
/*
** CAPI3REF: Database Connection Configuration Options
@@ -2120,11 +3024,78 @@ struct sqlite3_mem_methods {
** following this call. The second parameter may be a NULL pointer, in
** which case the trigger setting is not reported back.
**
+** SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER
+** ^This option is used to enable or disable the two-argument
+** version of the [fts3_tokenizer()] function which is part of the
+** [FTS3] full-text search engine extension.
+** There should be two additional arguments.
+** The first argument is an integer which is 0 to disable fts3_tokenizer() or
+** positive to enable fts3_tokenizer() or negative to leave the setting
+** unchanged.
+** The second parameter is a pointer to an integer into which
+** is written 0 or 1 to indicate whether fts3_tokenizer is disabled or enabled
+** following this call. The second parameter may be a NULL pointer, in
+** which case the new setting is not reported back.
+**
+** SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION
+** ^This option is used to enable or disable the [sqlite3_load_extension()]
+** interface independently of the [load_extension()] SQL function.
+** The [sqlite3_enable_load_extension()] API enables or disables both the
+** C-API [sqlite3_load_extension()] and the SQL function [load_extension()].
+** There should be two additional arguments.
+** When the first argument to this interface is 1, then only the C-API is
+** enabled and the SQL function remains disabled. If the first argument to
+** this interface is 0, then both the C-API and the SQL function are disabled.
+** If the first argument is -1, then no changes are made to state of either the
+** C-API or the SQL function.
+** The second parameter is a pointer to an integer into which
+** is written 0 or 1 to indicate whether [sqlite3_load_extension()] interface
+** is disabled or enabled following this call. The second parameter may
+** be a NULL pointer, in which case the new setting is not reported back.
+**
+**
+** SQLITE_DBCONFIG_MAINDBNAME
+** ^This option is used to change the name of the "main" database
+** schema. ^The sole argument is a pointer to a constant UTF8 string
+** which will become the new schema name in place of "main". ^SQLite
+** does not make a copy of the new main schema name string, so the application
+** must ensure that the argument passed into this DBCONFIG option is unchanged
+** until after the database connection closes.
+**
+**
+** SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE
+** Usually, when a database in wal mode is closed or detached from a
+** database handle, SQLite checks if this will mean that there are now no
+** connections at all to the database. If so, it performs a checkpoint
+** operation before closing the connection. This option may be used to
+** override this behaviour. The first parameter passed to this operation
+** is an integer - non-zero to disable checkpoints-on-close, or zero (the
+** default) to enable them. The second parameter is a pointer to an integer
+** into which is written 0 or 1 to indicate whether checkpoints-on-close
+** have been disabled - 0 if they are not disabled, 1 if they are.
+**
+**
+** SQLITE_DBCONFIG_ENABLE_QPSG
+** ^(The SQLITE_DBCONFIG_ENABLE_QPSG option activates or deactivates
+** the [query planner stability guarantee] (QPSG). When the QPSG is active,
+** a single SQL query statement will always use the same algorithm regardless
+** of values of [bound parameters].)^ The QPSG disables some query optimizations
+** that look at the values of bound parameters, which can make some queries
+** slower. But the QPSG has the advantage of more predictable behavior. With
+** the QPSG active, SQLite will always use the same query plan in the field as
+** was used during testing in the lab.
+**
+**
**
*/
-#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */
-#define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */
-#define SQLITE_DBCONFIG_ENABLE_TRIGGER 1003 /* int int* */
+#define SQLITE_DBCONFIG_MAINDBNAME 1000 /* const char* */
+#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */
+#define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */
+#define SQLITE_DBCONFIG_ENABLE_TRIGGER 1003 /* int int* */
+#define SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 1004 /* int int* */
+#define SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION 1005 /* int int* */
+#define SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE 1006 /* int int* */
+#define SQLITE_DBCONFIG_ENABLE_QPSG 1007 /* int int* */
/*
@@ -2135,7 +3106,7 @@ struct sqlite3_mem_methods {
** [extended result codes] feature of SQLite. ^The extended result
** codes are disabled by default for historical compatibility.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3*, int onoff);
+SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);
/*
** CAPI3REF: Last Insert Rowid
@@ -2149,20 +3120,30 @@ SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3*, int onoff)
** the table has a column of type [INTEGER PRIMARY KEY] then that column
** is another alias for the rowid.
**
-** ^The sqlite3_last_insert_rowid(D) interface returns the [rowid] of the
-** most recent successful [INSERT] into a rowid table or [virtual table]
-** on database connection D.
-** ^Inserts into [WITHOUT ROWID] tables are not recorded.
-** ^If no successful [INSERT]s into rowid tables
-** have ever occurred on the database connection D,
-** then sqlite3_last_insert_rowid(D) returns zero.
+** ^The sqlite3_last_insert_rowid(D) interface usually returns the [rowid] of
+** the most recent successful [INSERT] into a rowid table or [virtual table]
+** on database connection D. ^Inserts into [WITHOUT ROWID] tables are not
+** recorded. ^If no successful [INSERT]s into rowid tables have ever occurred
+** on the database connection D, then sqlite3_last_insert_rowid(D) returns
+** zero.
**
-** ^(If an [INSERT] occurs within a trigger or within a [virtual table]
-** method, then this routine will return the [rowid] of the inserted
-** row as long as the trigger or virtual table method is running.
-** But once the trigger or virtual table method ends, the value returned
-** by this routine reverts to what it was before the trigger or virtual
-** table method began.)^
+** As well as being set automatically as rows are inserted into database
+** tables, the value returned by this function may be set explicitly by
+** [sqlite3_set_last_insert_rowid()]
+**
+** Some virtual table implementations may INSERT rows into rowid tables as
+** part of committing a transaction (e.g. to flush data accumulated in memory
+** to disk). In this case subsequent calls to this function return the rowid
+** associated with these internal INSERT operations, which leads to
+** unintuitive results. Virtual table implementations that do write to rowid
+** tables in this way can avoid this problem by restoring the original
+** rowid value using [sqlite3_set_last_insert_rowid()] before returning
+** control to the user.
+**
+** ^(If an [INSERT] occurs within a trigger then this routine will
+** return the [rowid] of the inserted row as long as the trigger is
+** running. Once the trigger program ends, the value returned
+** by this routine reverts to what it was before the trigger was fired.)^
**
** ^An [INSERT] that fails due to a constraint violation is not a
** successful [INSERT] and does not change the value returned by this
@@ -2187,7 +3168,17 @@ SQLITE_API int SQLITE_STDCALL sqlite3_extended_result_codes(sqlite3*, int onoff)
** unpredictable and might not equal either the old or the new
** last insert [rowid].
*/
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3*);
+SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
+
+/*
+** CAPI3REF: Set the Last Insert Rowid value.
+** METHOD: sqlite3
+**
+** The sqlite3_set_last_insert_rowid(D, R) method allows the application to
+** set the value returned by calling sqlite3_last_insert_rowid(D) to R
+** without inserting a row into the database.
+*/
+SQLITE_API void sqlite3_set_last_insert_rowid(sqlite3*,sqlite3_int64);
/*
** CAPI3REF: Count The Number Of Rows Modified
@@ -2240,7 +3231,7 @@ SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_last_insert_rowid(sqlite3*);
** while [sqlite3_changes()] is running then the value returned
** is unpredictable and not meaningful.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3*);
+SQLITE_API int sqlite3_changes(sqlite3*);
/*
** CAPI3REF: Total Number Of Rows Modified
@@ -2264,7 +3255,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_changes(sqlite3*);
** while [sqlite3_total_changes()] is running then the value
** returned is unpredictable and not meaningful.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3*);
+SQLITE_API int sqlite3_total_changes(sqlite3*);
/*
** CAPI3REF: Interrupt A Long-Running Query
@@ -2300,11 +3291,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_total_changes(sqlite3*);
** ^A call to sqlite3_interrupt(D) that occurs when there are no running
** SQL statements is a no-op and has no effect on SQL statements
** that are started after the sqlite3_interrupt() call returns.
-**
-** If the database connection closes while [sqlite3_interrupt()]
-** is running then bad things will likely happen.
*/
-SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3*);
+SQLITE_API void sqlite3_interrupt(sqlite3*);
/*
** CAPI3REF: Determine If An SQL Statement Is Complete
@@ -2339,8 +3327,8 @@ SQLITE_API void SQLITE_STDCALL sqlite3_interrupt(sqlite3*);
** The input to [sqlite3_complete16()] must be a zero-terminated
** UTF-16 string in native byte order.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_complete(const char *sql);
-SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *sql);
+SQLITE_API int sqlite3_complete(const char *sql);
+SQLITE_API int sqlite3_complete16(const void *sql);
/*
** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors
@@ -2401,7 +3389,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *sql);
** A busy handler must not close the database connection
** or [prepared statement] that invoked the busy handler.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*);
+SQLITE_API int sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
/*
** CAPI3REF: Set A Busy Timeout
@@ -2424,7 +3412,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(sqlite3*, int(*)(void*,int),
**
** See also: [PRAGMA busy_timeout]
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3*, int ms);
+SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
/*
** CAPI3REF: Convenience Routines For Running Queries
@@ -2499,7 +3487,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_busy_timeout(sqlite3*, int ms);
** reflected in subsequent calls to [sqlite3_errcode()] or
** [sqlite3_errmsg()].
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_get_table(
+SQLITE_API int sqlite3_get_table(
sqlite3 *db, /* An open database */
const char *zSql, /* SQL to be evaluated */
char ***pazResult, /* Results of the query */
@@ -2507,7 +3495,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_get_table(
int *pnColumn, /* Number of result columns written here */
char **pzErrmsg /* Error msg written here */
);
-SQLITE_API void SQLITE_STDCALL sqlite3_free_table(char **result);
+SQLITE_API void sqlite3_free_table(char **result);
/*
** CAPI3REF: Formatted String Printing Functions
@@ -2613,10 +3601,10 @@ SQLITE_API void SQLITE_STDCALL sqlite3_free_table(char **result);
** addition that after the string has been read and copied into
** the result, [sqlite3_free()] is called on the input string.)^
*/
-SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char*,...);
-SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char*, va_list);
-SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int,char*,const char*, ...);
-SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int,char*,const char*, va_list);
+SQLITE_API char *sqlite3_mprintf(const char*,...);
+SQLITE_API char *sqlite3_vmprintf(const char*, va_list);
+SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...);
+SQLITE_API char *sqlite3_vsnprintf(int,char*,const char*, va_list);
/*
** CAPI3REF: Memory Allocation Subsystem
@@ -2706,12 +3694,12 @@ SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int,char*,const char*, va_list
** a block of memory after it has been released using
** [sqlite3_free()] or [sqlite3_realloc()].
*/
-SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int);
-SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64);
-SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void*, int);
-SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void*, sqlite3_uint64);
-SQLITE_API void SQLITE_STDCALL sqlite3_free(void*);
-SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void*);
+SQLITE_API void *sqlite3_malloc(int);
+SQLITE_API void *sqlite3_malloc64(sqlite3_uint64);
+SQLITE_API void *sqlite3_realloc(void*, int);
+SQLITE_API void *sqlite3_realloc64(void*, sqlite3_uint64);
+SQLITE_API void sqlite3_free(void*);
+SQLITE_API sqlite3_uint64 sqlite3_msize(void*);
/*
** CAPI3REF: Memory Allocator Statistics
@@ -2736,8 +3724,8 @@ SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void*);
** by [sqlite3_memory_highwater(1)] is the high-water mark
** prior to the reset.
*/
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void);
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag);
+SQLITE_API sqlite3_int64 sqlite3_memory_used(void);
+SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag);
/*
** CAPI3REF: Pseudo-Random Number Generator
@@ -2760,17 +3748,19 @@ SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag);
** internally and without recourse to the [sqlite3_vfs] xRandomness
** method.
*/
-SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P);
+SQLITE_API void sqlite3_randomness(int N, void *P);
/*
** CAPI3REF: Compile-Time Authorization Callbacks
** METHOD: sqlite3
+** KEYWORDS: {authorizer callback}
**
** ^This routine registers an authorizer callback with a particular
** [database connection], supplied in the first argument.
** ^The authorizer callback is invoked as SQL statements are being compiled
** by [sqlite3_prepare()] or its variants [sqlite3_prepare_v2()],
-** [sqlite3_prepare16()] and [sqlite3_prepare16_v2()]. ^At various
+** [sqlite3_prepare_v3()], [sqlite3_prepare16()], [sqlite3_prepare16_v2()],
+** and [sqlite3_prepare16_v3()]. ^At various
** points during the compilation process, as logic is being created
** to perform various actions, the authorizer callback is invoked to
** see if those actions are allowed. ^The authorizer callback should
@@ -2792,8 +3782,10 @@ SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P);
** parameter to the sqlite3_set_authorizer() interface. ^The second parameter
** to the callback is an integer [SQLITE_COPY | action code] that specifies
** the particular action to be authorized. ^The third through sixth parameters
-** to the callback are zero-terminated strings that contain additional
-** details about the action to be authorized.
+** to the callback are either NULL pointers or zero-terminated strings
+** that contain additional details about the action to be authorized.
+** Applications must always be prepared to encounter a NULL pointer in any
+** of the third through the sixth parameters of the authorization callback.
**
** ^If the action code is [SQLITE_READ]
** and the callback returns [SQLITE_IGNORE] then the
@@ -2802,6 +3794,10 @@ SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P);
** been read if [SQLITE_OK] had been returned. The [SQLITE_IGNORE]
** return can be used to deny an untrusted user access to individual
** columns of a table.
+** ^When a table is referenced by a [SELECT] but no column values are
+** extracted from that table (for example in a query like
+** "SELECT count(*) FROM tab") then the [SQLITE_READ] authorizer callback
+** is invoked once for that table with a column name that is an empty string.
** ^If the action code is [SQLITE_DELETE] and the callback returns
** [SQLITE_IGNORE] then the [DELETE] operation proceeds but the
** [truncate optimization] is disabled and all rows are deleted individually.
@@ -2843,7 +3839,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *P);
** as stated in the previous paragraph, sqlite3_step() invokes
** sqlite3_prepare_v2() to reprepare a statement after a schema change.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer(
+SQLITE_API int sqlite3_set_authorizer(
sqlite3*,
int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
void *pUserData
@@ -2923,6 +3919,9 @@ SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer(
** CAPI3REF: Tracing And Profiling Functions
** METHOD: sqlite3
**
+** These routines are deprecated. Use the [sqlite3_trace_v2()] interface
+** instead of the routines described here.
+**
** These routines register callback functions that can be used for
** tracing and profiling the execution of SQL statements.
**
@@ -2948,10 +3947,104 @@ SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer(
** sqlite3_profile() function is considered experimental and is
** subject to change in future versions of SQLite.
*/
-SQLITE_API void *SQLITE_STDCALL sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*);
-SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_profile(sqlite3*,
+SQLITE_API SQLITE_DEPRECATED void *sqlite3_trace(sqlite3*,
+ void(*xTrace)(void*,const char*), void*);
+SQLITE_API SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*,
void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
+/*
+** CAPI3REF: SQL Trace Event Codes
+** KEYWORDS: SQLITE_TRACE
+**
+** These constants identify classes of events that can be monitored
+** using the [sqlite3_trace_v2()] tracing logic. The third argument
+** to [sqlite3_trace_v2()] is an OR-ed combination of one or more of
+** the following constants. ^The first argument to the trace callback
+** is one of the following constants.
+**
+** New tracing constants may be added in future releases.
+**
+** ^A trace callback has four arguments: xCallback(T,C,P,X).
+** ^The T argument is one of the integer type codes above.
+** ^The C argument is a copy of the context pointer passed in as the
+** fourth argument to [sqlite3_trace_v2()].
+** The P and X arguments are pointers whose meanings depend on T.
+**
+**
+** [[SQLITE_TRACE_STMT]] - SQLITE_TRACE_STMT
+** - ^An SQLITE_TRACE_STMT callback is invoked when a prepared statement
+** first begins running and possibly at other times during the
+** execution of the prepared statement, such as at the start of each
+** trigger subprogram. ^The P argument is a pointer to the
+** [prepared statement]. ^The X argument is a pointer to a string which
+** is the unexpanded SQL text of the prepared statement or an SQL comment
+** that indicates the invocation of a trigger. ^The callback can compute
+** the same text that would have been returned by the legacy [sqlite3_trace()]
+** interface by using the X argument when X begins with "--" and invoking
+** [sqlite3_expanded_sql(P)] otherwise.
+**
+** [[SQLITE_TRACE_PROFILE]]
- SQLITE_TRACE_PROFILE
+** - ^An SQLITE_TRACE_PROFILE callback provides approximately the same
+** information as is provided by the [sqlite3_profile()] callback.
+** ^The P argument is a pointer to the [prepared statement] and the
+** X argument points to a 64-bit integer which is the estimated of
+** the number of nanosecond that the prepared statement took to run.
+** ^The SQLITE_TRACE_PROFILE callback is invoked when the statement finishes.
+**
+** [[SQLITE_TRACE_ROW]]
- SQLITE_TRACE_ROW
+** - ^An SQLITE_TRACE_ROW callback is invoked whenever a prepared
+** statement generates a single row of result.
+** ^The P argument is a pointer to the [prepared statement] and the
+** X argument is unused.
+**
+** [[SQLITE_TRACE_CLOSE]]
- SQLITE_TRACE_CLOSE
+** - ^An SQLITE_TRACE_CLOSE callback is invoked when a database
+** connection closes.
+** ^The P argument is a pointer to the [database connection] object
+** and the X argument is unused.
+**
+*/
+#define SQLITE_TRACE_STMT 0x01
+#define SQLITE_TRACE_PROFILE 0x02
+#define SQLITE_TRACE_ROW 0x04
+#define SQLITE_TRACE_CLOSE 0x08
+
+/*
+** CAPI3REF: SQL Trace Hook
+** METHOD: sqlite3
+**
+** ^The sqlite3_trace_v2(D,M,X,P) interface registers a trace callback
+** function X against [database connection] D, using property mask M
+** and context pointer P. ^If the X callback is
+** NULL or if the M mask is zero, then tracing is disabled. The
+** M argument should be the bitwise OR-ed combination of
+** zero or more [SQLITE_TRACE] constants.
+**
+** ^Each call to either sqlite3_trace() or sqlite3_trace_v2() overrides
+** (cancels) any prior calls to sqlite3_trace() or sqlite3_trace_v2().
+**
+** ^The X callback is invoked whenever any of the events identified by
+** mask M occur. ^The integer return value from the callback is currently
+** ignored, though this may change in future releases. Callback
+** implementations should return zero to ensure future compatibility.
+**
+** ^A trace callback is invoked with four arguments: callback(T,C,P,X).
+** ^The T argument is one of the [SQLITE_TRACE]
+** constants to indicate why the callback was invoked.
+** ^The C argument is a copy of the context pointer.
+** The P and X arguments are pointers whose meanings depend on T.
+**
+** The sqlite3_trace_v2() interface is intended to replace the legacy
+** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which
+** are deprecated.
+*/
+SQLITE_API int sqlite3_trace_v2(
+ sqlite3*,
+ unsigned uMask,
+ int(*xCallback)(unsigned,void*,void*,void*),
+ void *pCtx
+);
+
/*
** CAPI3REF: Query Progress Callbacks
** METHOD: sqlite3
@@ -2984,7 +4077,7 @@ SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_profile(sqlite3*,
** database connections for the meaning of "modify" in this paragraph.
**
*/
-SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
+SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
/*
** CAPI3REF: Opening A New Database Connection
@@ -3074,10 +4167,10 @@ SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler(sqlite3*, int, int(*)(vo
** ^If [URI filename] interpretation is enabled, and the filename argument
** begins with "file:", then the filename is interpreted as a URI. ^URI
** filename interpretation is enabled if the [SQLITE_OPEN_URI] flag is
-** set in the fourth argument to sqlite3_open_v2(), or if it has
+** set in the third argument to sqlite3_open_v2(), or if it has
** been enabled globally using the [SQLITE_CONFIG_URI] option with the
** [sqlite3_config()] method or by the [SQLITE_USE_URI] compile-time option.
-** As of SQLite version 3.7.7, URI filename interpretation is turned off
+** URI filename interpretation is turned off
** by default, but future releases of SQLite might enable URI filename
** interpretation by default. See "[URI filenames]" for additional
** information.
@@ -3213,15 +4306,15 @@ SQLITE_API void SQLITE_STDCALL sqlite3_progress_handler(sqlite3*, int, int(*)(vo
**
** See also: [sqlite3_temp_directory]
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_open(
+SQLITE_API int sqlite3_open(
const char *filename, /* Database filename (UTF-8) */
sqlite3 **ppDb /* OUT: SQLite db handle */
);
-SQLITE_API int SQLITE_STDCALL sqlite3_open16(
+SQLITE_API int sqlite3_open16(
const void *filename, /* Database filename (UTF-16) */
sqlite3 **ppDb /* OUT: SQLite db handle */
);
-SQLITE_API int SQLITE_STDCALL sqlite3_open_v2(
+SQLITE_API int sqlite3_open_v2(
const char *filename, /* Database filename (UTF-8) */
sqlite3 **ppDb, /* OUT: SQLite db handle */
int flags, /* Flags */
@@ -3267,9 +4360,9 @@ SQLITE_API int SQLITE_STDCALL sqlite3_open_v2(
** VFS method, then the behavior of this routine is undefined and probably
** undesirable.
*/
-SQLITE_API const char *SQLITE_STDCALL sqlite3_uri_parameter(const char *zFilename, const char *zParam);
-SQLITE_API int SQLITE_STDCALL sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault);
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64(const char*, const char*, sqlite3_int64);
+SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam);
+SQLITE_API int sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault);
+SQLITE_API sqlite3_int64 sqlite3_uri_int64(const char*, const char*, sqlite3_int64);
/*
@@ -3313,11 +4406,11 @@ SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_uri_int64(const char*, const cha
** was invoked incorrectly by the application. In that case, the
** error code and message may or may not be set.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_errcode(sqlite3 *db);
-SQLITE_API int SQLITE_STDCALL sqlite3_extended_errcode(sqlite3 *db);
-SQLITE_API const char *SQLITE_STDCALL sqlite3_errmsg(sqlite3*);
-SQLITE_API const void *SQLITE_STDCALL sqlite3_errmsg16(sqlite3*);
-SQLITE_API const char *SQLITE_STDCALL sqlite3_errstr(int);
+SQLITE_API int sqlite3_errcode(sqlite3 *db);
+SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
+SQLITE_API const char *sqlite3_errmsg(sqlite3*);
+SQLITE_API const void *sqlite3_errmsg16(sqlite3*);
+SQLITE_API const char *sqlite3_errstr(int);
/*
** CAPI3REF: Prepared Statement Object
@@ -3385,7 +4478,7 @@ typedef struct sqlite3_stmt sqlite3_stmt;
**
** New run-time limit categories may be added in future releases.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal);
+SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
/*
** CAPI3REF: Run-Time Limit Categories
@@ -3416,9 +4509,9 @@ SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal);
**
** [[SQLITE_LIMIT_VDBE_OP]] ^(SQLITE_LIMIT_VDBE_OP
** The maximum number of instructions in a virtual machine program
-** used to implement an SQL statement. This limit is not currently
-** enforced, though that might be added in some future release of
-** SQLite.)^
+** used to implement an SQL statement. If [sqlite3_prepare_v2()] or
+** the equivalent tries to allocate space for more than this many opcodes
+** in a single prepared statement, an SQLITE_NOMEM error is returned.)^
**
** [[SQLITE_LIMIT_FUNCTION_ARG]] ^(SQLITE_LIMIT_FUNCTION_ARG
** The maximum number of arguments on a function.)^
@@ -3456,23 +4549,59 @@ SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal);
#define SQLITE_LIMIT_TRIGGER_DEPTH 10
#define SQLITE_LIMIT_WORKER_THREADS 11
+/*
+** CAPI3REF: Prepare Flags
+**
+** These constants define various flags that can be passed into
+** "prepFlags" parameter of the [sqlite3_prepare_v3()] and
+** [sqlite3_prepare16_v3()] interfaces.
+**
+** New flags may be added in future releases of SQLite.
+**
+**
+** [[SQLITE_PREPARE_PERSISTENT]] ^(- SQLITE_PREPARE_PERSISTENT
+** - The SQLITE_PREPARE_PERSISTENT flag is a hint to the query planner
+** that the prepared statement will be retained for a long time and
+** probably reused many times.)^ ^Without this flag, [sqlite3_prepare_v3()]
+** and [sqlite3_prepare16_v3()] assume that the prepared statement will
+** be used just once or at most a few times and then destroyed using
+** [sqlite3_finalize()] relatively soon. The current implementation acts
+** on this hint by avoiding the use of [lookaside memory] so as not to
+** deplete the limited store of lookaside memory. Future versions of
+** SQLite may act on this hint differently.
+**
+*/
+#define SQLITE_PREPARE_PERSISTENT 0x01
+
/*
** CAPI3REF: Compiling An SQL Statement
** KEYWORDS: {SQL statement compiler}
** METHOD: sqlite3
** CONSTRUCTOR: sqlite3_stmt
**
-** To execute an SQL query, it must first be compiled into a byte-code
-** program using one of these routines.
+** To execute an SQL statement, it must first be compiled into a byte-code
+** program using one of these routines. Or, in other words, these routines
+** are constructors for the [prepared statement] object.
+**
+** The preferred routine to use is [sqlite3_prepare_v2()]. The
+** [sqlite3_prepare()] interface is legacy and should be avoided.
+** [sqlite3_prepare_v3()] has an extra "prepFlags" option that is used
+** for special purposes.
+**
+** The use of the UTF-8 interfaces is preferred, as SQLite currently
+** does all parsing using UTF-8. The UTF-16 interfaces are provided
+** as a convenience. The UTF-16 interfaces work by converting the
+** input text into UTF-8, then invoking the corresponding UTF-8 interface.
**
** The first argument, "db", is a [database connection] obtained from a
** prior successful call to [sqlite3_open()], [sqlite3_open_v2()] or
** [sqlite3_open16()]. The database connection must not have been closed.
**
** The second argument, "zSql", is the statement to be compiled, encoded
-** as either UTF-8 or UTF-16. The sqlite3_prepare() and sqlite3_prepare_v2()
-** interfaces use UTF-8, and sqlite3_prepare16() and sqlite3_prepare16_v2()
-** use UTF-16.
+** as either UTF-8 or UTF-16. The sqlite3_prepare(), sqlite3_prepare_v2(),
+** and sqlite3_prepare_v3()
+** interfaces use UTF-8, and sqlite3_prepare16(), sqlite3_prepare16_v2(),
+** and sqlite3_prepare16_v3() use UTF-16.
**
** ^If the nByte argument is negative, then zSql is read up to the
** first zero terminator. ^If nByte is positive, then it is the
@@ -3499,10 +4628,11 @@ SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal);
** ^On success, the sqlite3_prepare() family of routines return [SQLITE_OK];
** otherwise an [error code] is returned.
**
-** The sqlite3_prepare_v2() and sqlite3_prepare16_v2() interfaces are
-** recommended for all new programs. The two older interfaces are retained
-** for backwards compatibility, but their use is discouraged.
-** ^In the "v2" interfaces, the prepared statement
+** The sqlite3_prepare_v2(), sqlite3_prepare_v3(), sqlite3_prepare16_v2(),
+** and sqlite3_prepare16_v3() interfaces are recommended for all new programs.
+** The older interfaces (sqlite3_prepare() and sqlite3_prepare16())
+** are retained for backwards compatibility, but their use is discouraged.
+** ^In the "vX" interfaces, the prepared statement
** that is returned (the [sqlite3_stmt] object) contains a copy of the
** original SQL text. This causes the [sqlite3_step()] interface to
** behave differently in three ways:
@@ -3535,46 +4665,93 @@ SQLITE_API int SQLITE_STDCALL sqlite3_limit(sqlite3*, int id, int newVal);
** or [GLOB] operator or if the parameter is compared to an indexed column
** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled.
**
+**
+** ^sqlite3_prepare_v3() differs from sqlite3_prepare_v2() only in having
+** the extra prepFlags parameter, which is a bit array consisting of zero or
+** more of the [SQLITE_PREPARE_PERSISTENT|SQLITE_PREPARE_*] flags. ^The
+** sqlite3_prepare_v2() interface works exactly the same as
+** sqlite3_prepare_v3() with a zero prepFlags parameter.
**
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare(
+SQLITE_API int sqlite3_prepare(
sqlite3 *db, /* Database handle */
const char *zSql, /* SQL statement, UTF-8 encoded */
int nByte, /* Maximum length of zSql in bytes. */
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
const char **pzTail /* OUT: Pointer to unused portion of zSql */
);
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare_v2(
+SQLITE_API int sqlite3_prepare_v2(
sqlite3 *db, /* Database handle */
const char *zSql, /* SQL statement, UTF-8 encoded */
int nByte, /* Maximum length of zSql in bytes. */
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
const char **pzTail /* OUT: Pointer to unused portion of zSql */
);
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare16(
+SQLITE_API int sqlite3_prepare_v3(
+ sqlite3 *db, /* Database handle */
+ const char *zSql, /* SQL statement, UTF-8 encoded */
+ int nByte, /* Maximum length of zSql in bytes. */
+ unsigned int prepFlags, /* Zero or more SQLITE_PREPARE_ flags */
+ sqlite3_stmt **ppStmt, /* OUT: Statement handle */
+ const char **pzTail /* OUT: Pointer to unused portion of zSql */
+);
+SQLITE_API int sqlite3_prepare16(
sqlite3 *db, /* Database handle */
const void *zSql, /* SQL statement, UTF-16 encoded */
int nByte, /* Maximum length of zSql in bytes. */
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
const void **pzTail /* OUT: Pointer to unused portion of zSql */
);
-SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2(
+SQLITE_API int sqlite3_prepare16_v2(
sqlite3 *db, /* Database handle */
const void *zSql, /* SQL statement, UTF-16 encoded */
int nByte, /* Maximum length of zSql in bytes. */
sqlite3_stmt **ppStmt, /* OUT: Statement handle */
const void **pzTail /* OUT: Pointer to unused portion of zSql */
);
+SQLITE_API int sqlite3_prepare16_v3(
+ sqlite3 *db, /* Database handle */
+ const void *zSql, /* SQL statement, UTF-16 encoded */
+ int nByte, /* Maximum length of zSql in bytes. */
+ unsigned int prepFlags, /* Zero or more SQLITE_PREPARE_ flags */
+ sqlite3_stmt **ppStmt, /* OUT: Statement handle */
+ const void **pzTail /* OUT: Pointer to unused portion of zSql */
+);
/*
** CAPI3REF: Retrieving Statement SQL
** METHOD: sqlite3_stmt
**
-** ^This interface can be used to retrieve a saved copy of the original
-** SQL text used to create a [prepared statement] if that statement was
-** compiled using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()].
+** ^The sqlite3_sql(P) interface returns a pointer to a copy of the UTF-8
+** SQL text used to create [prepared statement] P if P was
+** created by [sqlite3_prepare_v2()], [sqlite3_prepare_v3()],
+** [sqlite3_prepare16_v2()], or [sqlite3_prepare16_v3()].
+** ^The sqlite3_expanded_sql(P) interface returns a pointer to a UTF-8
+** string containing the SQL text of prepared statement P with
+** [bound parameters] expanded.
+**
+** ^(For example, if a prepared statement is created using the SQL
+** text "SELECT $abc,:xyz" and if parameter $abc is bound to integer 2345
+** and parameter :xyz is unbound, then sqlite3_sql() will return
+** the original string, "SELECT $abc,:xyz" but sqlite3_expanded_sql()
+** will return "SELECT 2345,NULL".)^
+**
+** ^The sqlite3_expanded_sql() interface returns NULL if insufficient memory
+** is available to hold the result, or if the result would exceed the
+** the maximum string length determined by the [SQLITE_LIMIT_LENGTH].
+**
+** ^The [SQLITE_TRACE_SIZE_LIMIT] compile-time option limits the size of
+** bound parameter expansions. ^The [SQLITE_OMIT_TRACE] compile-time
+** option causes sqlite3_expanded_sql() to always return NULL.
+**
+** ^The string returned by sqlite3_sql(P) is managed by SQLite and is
+** automatically freed when the prepared statement is finalized.
+** ^The string returned by sqlite3_expanded_sql(P), on the other hand,
+** is obtained from [sqlite3_malloc()] and must be free by the application
+** by passing it to [sqlite3_free()].
*/
-SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt);
+SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt);
+SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt);
/*
** CAPI3REF: Determine If An SQL Statement Writes The Database
@@ -3605,8 +4782,12 @@ SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt);
** sqlite3_stmt_readonly() to return true since, while those statements
** change the configuration of a database connection, they do not make
** changes to the content of the database files on disk.
+** ^The sqlite3_stmt_readonly() interface returns true for [BEGIN] since
+** [BEGIN] merely sets internal flags, but the [BEGIN|BEGIN IMMEDIATE] and
+** [BEGIN|BEGIN EXCLUSIVE] commands do touch the database and so
+** sqlite3_stmt_readonly() returns false for those commands.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
+SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
/*
** CAPI3REF: Determine If A Prepared Statement Has Been Reset
@@ -3627,7 +4808,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
** for example, in diagnostic routines to search for prepared
** statements that are holding a transaction open.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt*);
+SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*);
/*
** CAPI3REF: Dynamically Typed Value Object
@@ -3663,12 +4844,13 @@ SQLITE_API int SQLITE_STDCALL sqlite3_stmt_busy(sqlite3_stmt*);
** implementation of [application-defined SQL functions] are protected.
** ^The sqlite3_value object returned by
** [sqlite3_column_value()] is unprotected.
-** Unprotected sqlite3_value objects may only be used with
-** [sqlite3_result_value()] and [sqlite3_bind_value()].
+** Unprotected sqlite3_value objects may only be used as arguments
+** to [sqlite3_result_value()], [sqlite3_bind_value()], and
+** [sqlite3_value_dup()].
** The [sqlite3_value_blob | sqlite3_value_type()] family of
** interfaces require protected sqlite3_value objects.
*/
-typedef struct Mem sqlite3_value;
+typedef struct sqlite3_value sqlite3_value;
/*
** CAPI3REF: SQL Function Context Object
@@ -3770,6 +4952,15 @@ typedef struct sqlite3_context sqlite3_context;
** [sqlite3_blob_open | incremental BLOB I/O] routines.
** ^A negative value for the zeroblob results in a zero-length BLOB.
**
+** ^The sqlite3_bind_pointer(S,I,P,T,D) routine causes the I-th parameter in
+** [prepared statement] S to have an SQL value of NULL, but to also be
+** associated with the pointer P of type T. ^D is either a NULL pointer or
+** a pointer to a destructor function for P. ^SQLite will invoke the
+** destructor D with a single argument of P when it is finished using
+** P. The T parameter should be a static string, preferably a string
+** literal. The sqlite3_bind_pointer() routine is part of the
+** [pointer passing interface] added for SQLite 3.20.0.
+**
** ^If any of the sqlite3_bind_*() routines are called with a NULL pointer
** for the [prepared statement] or with a prepared statement for which
** [sqlite3_step()] has been called more recently than [sqlite3_reset()],
@@ -3791,20 +4982,21 @@ typedef struct sqlite3_context sqlite3_context;
** See also: [sqlite3_bind_parameter_count()],
** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64,
+SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
+SQLITE_API int sqlite3_bind_blob64(sqlite3_stmt*, int, const void*, sqlite3_uint64,
void(*)(void*));
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_double(sqlite3_stmt*, int, double);
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_int(sqlite3_stmt*, int, int);
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_null(sqlite3_stmt*, int);
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*));
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
+SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double);
+SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int);
+SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
+SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int);
+SQLITE_API int sqlite3_bind_text(sqlite3_stmt*,int,const char*,int,void(*)(void*));
+SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
+SQLITE_API int sqlite3_bind_text64(sqlite3_stmt*, int, const char*, sqlite3_uint64,
void(*)(void*), unsigned char encoding);
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
+SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
+SQLITE_API int sqlite3_bind_pointer(sqlite3_stmt*, int, void*, const char*,void(*)(void*));
+SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
+SQLITE_API int sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite3_uint64);
/*
** CAPI3REF: Number Of SQL Parameters
@@ -3825,7 +5017,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_bind_zeroblob64(sqlite3_stmt*, int, sqlite
** [sqlite3_bind_parameter_name()], and
** [sqlite3_bind_parameter_index()].
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt*);
+SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*);
/*
** CAPI3REF: Name Of A Host Parameter
@@ -3846,14 +5038,14 @@ SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_count(sqlite3_stmt*);
** ^If the value N is out of range or if the N-th parameter is
** nameless, then NULL is returned. ^The returned string is
** always in UTF-8 encoding even if the named parameter was
-** originally specified as UTF-16 in [sqlite3_prepare16()] or
-** [sqlite3_prepare16_v2()].
+** originally specified as UTF-16 in [sqlite3_prepare16()],
+** [sqlite3_prepare16_v2()], or [sqlite3_prepare16_v3()].
**
** See also: [sqlite3_bind_blob|sqlite3_bind()],
** [sqlite3_bind_parameter_count()], and
** [sqlite3_bind_parameter_index()].
*/
-SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt*, int);
+SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);
/*
** CAPI3REF: Index Of A Parameter With A Given Name
@@ -3864,13 +5056,14 @@ SQLITE_API const char *SQLITE_STDCALL sqlite3_bind_parameter_name(sqlite3_stmt*,
** parameter to [sqlite3_bind_blob|sqlite3_bind()]. ^A zero
** is returned if no matching parameter is found. ^The parameter
** name must be given in UTF-8 even if the original statement
-** was prepared from UTF-16 text using [sqlite3_prepare16_v2()].
+** was prepared from UTF-16 text using [sqlite3_prepare16_v2()] or
+** [sqlite3_prepare16_v3()].
**
** See also: [sqlite3_bind_blob|sqlite3_bind()],
** [sqlite3_bind_parameter_count()], and
** [sqlite3_bind_parameter_name()].
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
+SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
/*
** CAPI3REF: Reset All Bindings On A Prepared Statement
@@ -3880,19 +5073,23 @@ SQLITE_API int SQLITE_STDCALL sqlite3_bind_parameter_index(sqlite3_stmt*, const
** the [sqlite3_bind_blob | bindings] on a [prepared statement].
** ^Use this routine to reset all host parameters to NULL.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_clear_bindings(sqlite3_stmt*);
+SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*);
/*
** CAPI3REF: Number Of Columns In A Result Set
** METHOD: sqlite3_stmt
**
** ^Return the number of columns in the result set returned by the
-** [prepared statement]. ^This routine returns 0 if pStmt is an SQL
-** statement that does not return data (for example an [UPDATE]).
+** [prepared statement]. ^If this routine returns 0, that means the
+** [prepared statement] returns no data (for example an [UPDATE]).
+** ^However, just because this routine returns a positive number does not
+** mean that one or more rows of data will be returned. ^A SELECT statement
+** will always have a positive sqlite3_column_count() but depending on the
+** WHERE clause constraints and the table content, it might return no rows.
**
** See also: [sqlite3_data_count()]
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt);
+SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt);
/*
** CAPI3REF: Column Names In A Result Set
@@ -3921,8 +5118,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_column_count(sqlite3_stmt *pStmt);
** then the name of the column is unspecified and may change from
** one release of SQLite to the next.
*/
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_name(sqlite3_stmt*, int N);
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt*, int N);
+SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N);
+SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);
/*
** CAPI3REF: Source Of Data In A Query Result
@@ -3970,12 +5167,12 @@ SQLITE_API const void *SQLITE_STDCALL sqlite3_column_name16(sqlite3_stmt*, int N
** for the same [prepared statement] and result column
** at the same time then the results are undefined.
*/
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_database_name(sqlite3_stmt*,int);
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_database_name16(sqlite3_stmt*,int);
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_table_name(sqlite3_stmt*,int);
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_table_name16(sqlite3_stmt*,int);
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_origin_name(sqlite3_stmt*,int);
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt*,int);
+SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int);
+SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int);
+SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int);
+SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int);
+SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int);
+SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int);
/*
** CAPI3REF: Declared Datatype Of A Query Result
@@ -4007,23 +5204,25 @@ SQLITE_API const void *SQLITE_STDCALL sqlite3_column_origin_name16(sqlite3_stmt*
** is associated with individual values, not with the containers
** used to hold those values.
*/
-SQLITE_API const char *SQLITE_STDCALL sqlite3_column_decltype(sqlite3_stmt*,int);
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt*,int);
+SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int);
+SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
/*
** CAPI3REF: Evaluate An SQL Statement
** METHOD: sqlite3_stmt
**
-** After a [prepared statement] has been prepared using either
-** [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] or one of the legacy
+** After a [prepared statement] has been prepared using any of
+** [sqlite3_prepare_v2()], [sqlite3_prepare_v3()], [sqlite3_prepare16_v2()],
+** or [sqlite3_prepare16_v3()] or one of the legacy
** interfaces [sqlite3_prepare()] or [sqlite3_prepare16()], this function
** must be called one or more times to evaluate the statement.
**
** The details of the behavior of the sqlite3_step() interface depend
-** on whether the statement was prepared using the newer "v2" interface
-** [sqlite3_prepare_v2()] and [sqlite3_prepare16_v2()] or the older legacy
-** interface [sqlite3_prepare()] and [sqlite3_prepare16()]. The use of the
-** new "v2" interface is recommended for new applications but the legacy
+** on whether the statement was prepared using the newer "vX" interfaces
+** [sqlite3_prepare_v3()], [sqlite3_prepare_v2()], [sqlite3_prepare16_v3()],
+** [sqlite3_prepare16_v2()] or the older legacy
+** interfaces [sqlite3_prepare()] and [sqlite3_prepare16()]. The use of the
+** new "vX" interface is recommended for new applications but the legacy
** interface will continue to be supported.
**
** ^In the legacy interface, the return value will be either [SQLITE_BUSY],
@@ -4069,7 +5268,8 @@ SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt*,in
** other than [SQLITE_ROW] before any subsequent invocation of
** sqlite3_step(). Failure to reset the prepared statement using
** [sqlite3_reset()] would result in an [SQLITE_MISUSE] return from
-** sqlite3_step(). But after version 3.6.23.1, sqlite3_step() began
+** sqlite3_step(). But after [version 3.6.23.1] ([dateof:3.6.23.1],
+** sqlite3_step() began
** calling [sqlite3_reset()] automatically in this circumstance rather
** than returning [SQLITE_MISUSE]. This is not considered a compatibility
** break because any application that ever receives an SQLITE_MISUSE error
@@ -4083,12 +5283,13 @@ SQLITE_API const void *SQLITE_STDCALL sqlite3_column_decltype16(sqlite3_stmt*,in
** specific [error codes] that better describes the error.
** We admit that this is a goofy design. The problem has been fixed
** with the "v2" interface. If you prepare all of your SQL statements
-** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead
+** using [sqlite3_prepare_v3()] or [sqlite3_prepare_v2()]
+** or [sqlite3_prepare16_v2()] or [sqlite3_prepare16_v3()] instead
** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces,
** then the more specific [error codes] are returned directly
-** by sqlite3_step(). The use of the "v2" interface is recommended.
+** by sqlite3_step(). The use of the "vX" interfaces is recommended.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt*);
+SQLITE_API int sqlite3_step(sqlite3_stmt*);
/*
** CAPI3REF: Number of columns in a result set
@@ -4109,7 +5310,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_step(sqlite3_stmt*);
**
** See also: [sqlite3_column_count()]
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt);
+SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);
/*
** CAPI3REF: Fundamental Datatypes
@@ -4148,6 +5349,28 @@ SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt);
** KEYWORDS: {column access functions}
** METHOD: sqlite3_stmt
**
+** Summary:
+**
+** | sqlite3_column_blob | → | BLOB result
+** |
| sqlite3_column_double | → | REAL result
+** |
| sqlite3_column_int | → | 32-bit INTEGER result
+** |
| sqlite3_column_int64 | → | 64-bit INTEGER result
+** |
| sqlite3_column_text | → | UTF-8 TEXT result
+** |
| sqlite3_column_text16 | → | UTF-16 TEXT result
+** |
| sqlite3_column_value | → | The result as an
+** [sqlite3_value|unprotected sqlite3_value] object.
+** |
| | |
+** |
| sqlite3_column_bytes | → | Size of a BLOB
+** or a UTF-8 TEXT result in bytes
+** |
| sqlite3_column_bytes16
+** | → | Size of UTF-16
+** TEXT in bytes
+** |
| sqlite3_column_type | → | Default
+** datatype of the result
+** |
+**
+** Details:
+**
** ^These routines return information about a single column of the current
** result row of a query. ^In every case the first argument is a pointer
** to the [prepared statement] that is being evaluated (the [sqlite3_stmt*]
@@ -4169,16 +5392,29 @@ SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt);
** are called from a different thread while any of these routines
** are pending, then the results are undefined.
**
+** The first six interfaces (_blob, _double, _int, _int64, _text, and _text16)
+** each return the value of a result column in a specific data format. If
+** the result column is not initially in the requested format (for example,
+** if the query returns an integer but the sqlite3_column_text() interface
+** is used to extract the value) then an automatic type conversion is performed.
+**
** ^The sqlite3_column_type() routine returns the
** [SQLITE_INTEGER | datatype code] for the initial data type
** of the result column. ^The returned value is one of [SQLITE_INTEGER],
-** [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL]. The value
-** returned by sqlite3_column_type() is only meaningful if no type
-** conversions have occurred as described below. After a type conversion,
-** the value returned by sqlite3_column_type() is undefined. Future
+** [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL].
+** The return value of sqlite3_column_type() can be used to decide which
+** of the first six interface should be used to extract the column value.
+** The value returned by sqlite3_column_type() is only meaningful if no
+** automatic type conversions have occurred for the value in question.
+** After a type conversion, the result of calling sqlite3_column_type()
+** is undefined, though harmless. Future
** versions of SQLite may change the behavior of sqlite3_column_type()
** following a type conversion.
**
+** If the result is a BLOB or a TEXT string, then the sqlite3_column_bytes()
+** or sqlite3_column_bytes16() interfaces can be used to determine the size
+** of that BLOB or string.
+**
** ^If the result is a BLOB or UTF-8 string then the sqlite3_column_bytes()
** routine returns the number of bytes in that BLOB or string.
** ^If the result is a UTF-16 string, then sqlite3_column_bytes() converts
@@ -4215,9 +5451,13 @@ SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt);
** [sqlite3_column_value()] is used in any other way, including calls
** to routines like [sqlite3_value_int()], [sqlite3_value_text()],
** or [sqlite3_value_bytes()], the behavior is not threadsafe.
+** Hence, the sqlite3_column_value() interface
+** is normally only useful within the implementation of
+** [application-defined SQL functions] or [virtual tables], not within
+** top-level application code.
**
-** These routines attempt to convert the value where appropriate. ^For
-** example, if the internal representation is FLOAT and a text result
+** The these routines may attempt to convert the datatype of the result.
+** ^For example, if the internal representation is FLOAT and a text result
** is requested, [sqlite3_snprintf()] is used internally to perform the
** conversion automatically. ^(The following table details the conversions
** that are applied:
@@ -4289,7 +5529,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt);
** ^The pointers returned are valid until a type conversion occurs as
** described above, or until [sqlite3_step()] or [sqlite3_reset()] or
** [sqlite3_finalize()] is called. ^The memory space used to hold strings
-** and BLOBs is freed automatically. Do not pass the pointers returned
+** and BLOBs is freed automatically. Do not pass the pointers returned
** from [sqlite3_column_blob()], [sqlite3_column_text()], etc. into
** [sqlite3_free()].
**
@@ -4299,16 +5539,16 @@ SQLITE_API int SQLITE_STDCALL sqlite3_data_count(sqlite3_stmt *pStmt);
** pointer. Subsequent calls to [sqlite3_errcode()] will return
** [SQLITE_NOMEM].)^
*/
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_blob(sqlite3_stmt*, int iCol);
-SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes(sqlite3_stmt*, int iCol);
-SQLITE_API int SQLITE_STDCALL sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
-SQLITE_API double SQLITE_STDCALL sqlite3_column_double(sqlite3_stmt*, int iCol);
-SQLITE_API int SQLITE_STDCALL sqlite3_column_int(sqlite3_stmt*, int iCol);
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_column_int64(sqlite3_stmt*, int iCol);
-SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_column_text(sqlite3_stmt*, int iCol);
-SQLITE_API const void *SQLITE_STDCALL sqlite3_column_text16(sqlite3_stmt*, int iCol);
-SQLITE_API int SQLITE_STDCALL sqlite3_column_type(sqlite3_stmt*, int iCol);
-SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt*, int iCol);
+SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol);
+SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol);
+SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol);
+SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol);
+SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);
+SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol);
+SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol);
+SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol);
+SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
+SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol);
/*
** CAPI3REF: Destroy A Prepared Statement Object
@@ -4336,7 +5576,7 @@ SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_column_value(sqlite3_stmt*, int
** statement after it has been finalized can result in undefined and
** undesirable behavior such as segfaults and heap corruption.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt);
+SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
/*
** CAPI3REF: Reset A Prepared Statement Object
@@ -4363,7 +5603,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_finalize(sqlite3_stmt *pStmt);
** ^The [sqlite3_reset(S)] interface does not change the values
** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt);
+SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
/*
** CAPI3REF: Create Or Redefine SQL Functions
@@ -4463,7 +5703,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_reset(sqlite3_stmt *pStmt);
** close the database connection nor finalize or reset the prepared
** statement in which the function is running.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_create_function(
+SQLITE_API int sqlite3_create_function(
sqlite3 *db,
const char *zFunctionName,
int nArg,
@@ -4473,7 +5713,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_create_function(
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
void (*xFinal)(sqlite3_context*)
);
-SQLITE_API int SQLITE_STDCALL sqlite3_create_function16(
+SQLITE_API int sqlite3_create_function16(
sqlite3 *db,
const void *zFunctionName,
int nArg,
@@ -4483,7 +5723,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_create_function16(
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
void (*xFinal)(sqlite3_context*)
);
-SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2(
+SQLITE_API int sqlite3_create_function_v2(
sqlite3 *db,
const char *zFunctionName,
int nArg,
@@ -4529,12 +5769,12 @@ SQLITE_API int SQLITE_STDCALL sqlite3_create_function_v2(
** these functions, we will not explain what they do.
*/
#ifndef SQLITE_OMIT_DEPRECATED
-SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_aggregate_count(sqlite3_context*);
-SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_expired(sqlite3_stmt*);
-SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
-SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_global_recover(void);
-SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_thread_cleanup(void);
-SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
+SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);
+SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);
+SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
+SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void);
+SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);
+SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
void*,sqlite3_int64);
#endif
@@ -4542,21 +5782,40 @@ SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_memory_alarm(void(*)(voi
** CAPI3REF: Obtaining SQL Values
** METHOD: sqlite3_value
**
-** The C-language implementation of SQL functions and aggregates uses
-** this set of interface routines to access the parameter values on
-** the function or aggregate.
+** Summary:
+**
+** | sqlite3_value_blob | → | BLOB value
+** |
| sqlite3_value_double | → | REAL value
+** |
| sqlite3_value_int | → | 32-bit INTEGER value
+** |
| sqlite3_value_int64 | → | 64-bit INTEGER value
+** |
| sqlite3_value_pointer | → | Pointer value
+** |
| sqlite3_value_text | → | UTF-8 TEXT value
+** |
| sqlite3_value_text16 | → | UTF-16 TEXT value in
+** the native byteorder
+** |
| sqlite3_value_text16be | → | UTF-16be TEXT value
+** |
| sqlite3_value_text16le | → | UTF-16le TEXT value
+** |
| | |
+** |
| sqlite3_value_bytes | → | Size of a BLOB
+** or a UTF-8 TEXT in bytes
+** |
| sqlite3_value_bytes16
+** | → | Size of UTF-16
+** TEXT in bytes
+** |
| sqlite3_value_type | → | Default
+** datatype of the value
+** |
| sqlite3_value_numeric_type
+** | → | Best numeric datatype of the value
+** |
**
-** The xFunc (for scalar functions) or xStep (for aggregates) parameters
-** to [sqlite3_create_function()] and [sqlite3_create_function16()]
-** define callbacks that implement the SQL functions and aggregates.
-** The 3rd parameter to these callbacks is an array of pointers to
-** [protected sqlite3_value] objects. There is one [sqlite3_value] object for
-** each parameter to the SQL function. These routines are used to
-** extract values from the [sqlite3_value] objects.
+** Details:
+**
+** These routines extract type, size, and content information from
+** [protected sqlite3_value] objects. Protected sqlite3_value objects
+** are used to pass parameter information into implementation of
+** [application-defined SQL functions] and [virtual tables].
**
** These routines work only with [protected sqlite3_value] objects.
** Any attempt to use these routines on an [unprotected sqlite3_value]
-** object results in undefined behavior.
+** is not threadsafe.
**
** ^These routines work just like the corresponding [column access functions]
** except that these routines take a single [protected sqlite3_value] object
@@ -4567,6 +5826,24 @@ SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_memory_alarm(void(*)(voi
** sqlite3_value_text16be() and sqlite3_value_text16le() interfaces
** extract UTF-16 strings as big-endian and little-endian respectively.
**
+** ^If [sqlite3_value] object V was initialized
+** using [sqlite3_bind_pointer(S,I,P,X,D)] or [sqlite3_result_pointer(C,P,X,D)]
+** and if X and Y are strings that compare equal according to strcmp(X,Y),
+** then sqlite3_value_pointer(V,Y) will return the pointer P. ^Otherwise,
+** sqlite3_value_pointer(V,Y) returns a NULL. The sqlite3_bind_pointer()
+** routine is part of the [pointer passing interface] added for SQLite 3.20.0.
+**
+** ^(The sqlite3_value_type(V) interface returns the
+** [SQLITE_INTEGER | datatype code] for the initial datatype of the
+** [sqlite3_value] object V. The returned value is one of [SQLITE_INTEGER],
+** [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL].)^
+** Other interfaces might change the datatype for an sqlite3_value object.
+** For example, if the datatype is initially SQLITE_INTEGER and
+** sqlite3_value_text(V) is called to extract a text value for that
+** integer, then subsequent calls to sqlite3_value_type(V) might return
+** SQLITE_TEXT. Whether or not a persistent internal datatype conversion
+** occurs is undefined and may change from one release of SQLite to the next.
+**
** ^(The sqlite3_value_numeric_type() interface attempts to apply
** numeric affinity to the value. This means that an attempt is
** made to convert the value to an integer or floating point. If
@@ -4584,18 +5861,19 @@ SQLITE_API SQLITE_DEPRECATED int SQLITE_STDCALL sqlite3_memory_alarm(void(*)(voi
** These routines must be called from the same thread as
** the SQL function that supplied the [sqlite3_value*] parameters.
*/
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_blob(sqlite3_value*);
-SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes(sqlite3_value*);
-SQLITE_API int SQLITE_STDCALL sqlite3_value_bytes16(sqlite3_value*);
-SQLITE_API double SQLITE_STDCALL sqlite3_value_double(sqlite3_value*);
-SQLITE_API int SQLITE_STDCALL sqlite3_value_int(sqlite3_value*);
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_value_int64(sqlite3_value*);
-SQLITE_API const unsigned char *SQLITE_STDCALL sqlite3_value_text(sqlite3_value*);
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16(sqlite3_value*);
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16le(sqlite3_value*);
-SQLITE_API const void *SQLITE_STDCALL sqlite3_value_text16be(sqlite3_value*);
-SQLITE_API int SQLITE_STDCALL sqlite3_value_type(sqlite3_value*);
-SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value*);
+SQLITE_API const void *sqlite3_value_blob(sqlite3_value*);
+SQLITE_API double sqlite3_value_double(sqlite3_value*);
+SQLITE_API int sqlite3_value_int(sqlite3_value*);
+SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*);
+SQLITE_API void *sqlite3_value_pointer(sqlite3_value*, const char*);
+SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*);
+SQLITE_API const void *sqlite3_value_text16(sqlite3_value*);
+SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*);
+SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*);
+SQLITE_API int sqlite3_value_bytes(sqlite3_value*);
+SQLITE_API int sqlite3_value_bytes16(sqlite3_value*);
+SQLITE_API int sqlite3_value_type(sqlite3_value*);
+SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*);
/*
** CAPI3REF: Finding The Subtype Of SQL Values
@@ -4606,12 +5884,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_value_numeric_type(sqlite3_value*);
** information can be used to pass a limited amount of context from
** one SQL function to another. Use the [sqlite3_result_subtype()]
** routine to set the subtype for the return value of an SQL function.
-**
-** SQLite makes no use of subtype itself. It merely passes the subtype
-** from the result of one [application-defined SQL function] into the
-** input of another.
*/
-SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*);
+SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*);
/*
** CAPI3REF: Copy And Free SQL Values
@@ -4627,8 +5901,8 @@ SQLITE_API unsigned int SQLITE_STDCALL sqlite3_value_subtype(sqlite3_value*);
** previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer
** then sqlite3_value_free(V) is a harmless no-op.
*/
-SQLITE_API sqlite3_value *SQLITE_STDCALL sqlite3_value_dup(const sqlite3_value*);
-SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value*);
+SQLITE_API sqlite3_value *sqlite3_value_dup(const sqlite3_value*);
+SQLITE_API void sqlite3_value_free(sqlite3_value*);
/*
** CAPI3REF: Obtain Aggregate Function Context
@@ -4673,7 +5947,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_value_free(sqlite3_value*);
** This routine must be called from the same thread in which
** the aggregate SQL function is running.
*/
-SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context*, int nBytes);
+SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);
/*
** CAPI3REF: User Data For Functions
@@ -4688,7 +5962,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_aggregate_context(sqlite3_context*, int
** This routine must be called from the same thread in which
** the application-defined function is running.
*/
-SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context*);
+SQLITE_API void *sqlite3_user_data(sqlite3_context*);
/*
** CAPI3REF: Database Connection For Functions
@@ -4700,7 +5974,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_user_data(sqlite3_context*);
** and [sqlite3_create_function16()] routines that originally
** registered the application defined function.
*/
-SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*);
+SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
/*
** CAPI3REF: Function Auxiliary Data
@@ -4717,10 +5991,11 @@ SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*);
** the compiled regular expression can be reused on multiple
** invocations of the same function.
**
-** ^The sqlite3_get_auxdata() interface returns a pointer to the metadata
-** associated by the sqlite3_set_auxdata() function with the Nth argument
-** value to the application-defined function. ^If there is no metadata
-** associated with the function argument, this sqlite3_get_auxdata() interface
+** ^The sqlite3_get_auxdata(C,N) interface returns a pointer to the metadata
+** associated by the sqlite3_set_auxdata(C,N,P,X) function with the Nth argument
+** value to the application-defined function. ^N is zero for the left-most
+** function argument. ^If there is no metadata
+** associated with the function argument, the sqlite3_get_auxdata(C,N) interface
** returns a NULL pointer.
**
** ^The sqlite3_set_auxdata(C,N,P,X) interface saves P as metadata for the N-th
@@ -4732,12 +6007,13 @@ SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*);
** SQLite will invoke the destructor function X with parameter P exactly
** once, when the metadata is discarded.
** SQLite is free to discard the metadata at any time, including:
-** - when the corresponding function parameter changes, or
-**
- when [sqlite3_reset()] or [sqlite3_finalize()] is called for the
-** SQL statement, or
-**
- when sqlite3_set_auxdata() is invoked again on the same parameter, or
-**
- during the original sqlite3_set_auxdata() call when a memory
-** allocation error occurs.
)^
+** ^(when the corresponding function parameter changes)^, or
+** ^(when [sqlite3_reset()] or [sqlite3_finalize()] is called for the
+** SQL statement)^, or
+** ^(when sqlite3_set_auxdata() is invoked again on the same
+** parameter)^, or
+** ^(during the original sqlite3_set_auxdata() call when a memory
+** allocation error occurs.)^
**
** Note the last bullet in particular. The destructor X in
** sqlite3_set_auxdata(C,N,P,X) might be called immediately, before the
@@ -4750,11 +6026,15 @@ SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*);
** function parameters that are compile-time constants, including literal
** values and [parameters] and expressions composed from the same.)^
**
+** The value of the N parameter to these interfaces should be non-negative.
+** Future enhancements may make use of negative N values to define new
+** kinds of function caching behavior.
+**
** These routines must be called from the same thread in which
** the SQL function is running.
*/
-SQLITE_API void *SQLITE_STDCALL sqlite3_get_auxdata(sqlite3_context*, int N);
-SQLITE_API void SQLITE_STDCALL sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
+SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);
+SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
/*
@@ -4873,7 +6153,7 @@ typedef void (*sqlite3_destructor_type)(void*);
** when it has finished using that result.
** ^If the 4th parameter to the sqlite3_result_text* interfaces
** or sqlite3_result_blob is the special constant SQLITE_TRANSIENT
-** then SQLite makes a copy of the result into space obtained from
+** then SQLite makes a copy of the result into space obtained
** from [sqlite3_malloc()] before it returns.
**
** ^The sqlite3_result_value() interface sets the result of
@@ -4886,31 +6166,43 @@ typedef void (*sqlite3_destructor_type)(void*);
** [unprotected sqlite3_value] object is required, so either
** kind of [sqlite3_value] object can be used with this interface.
**
+** ^The sqlite3_result_pointer(C,P,T,D) interface sets the result to an
+** SQL NULL value, just like [sqlite3_result_null(C)], except that it
+** also associates the host-language pointer P or type T with that
+** NULL value such that the pointer can be retrieved within an
+** [application-defined SQL function] using [sqlite3_value_pointer()].
+** ^If the D parameter is not NULL, then it is a pointer to a destructor
+** for the P parameter. ^SQLite invokes D with P as its only argument
+** when SQLite is finished with P. The T parameter should be a static
+** string and preferably a string literal. The sqlite3_result_pointer()
+** routine is part of the [pointer passing interface] added for SQLite 3.20.0.
+**
** If these routines are called from within the different thread
** than the one containing the application-defined function that received
** the [sqlite3_context] pointer, the results are undefined.
*/
-SQLITE_API void SQLITE_STDCALL sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
-SQLITE_API void SQLITE_STDCALL sqlite3_result_blob64(sqlite3_context*,const void*,
+SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
+SQLITE_API void sqlite3_result_blob64(sqlite3_context*,const void*,
sqlite3_uint64,void(*)(void*));
-SQLITE_API void SQLITE_STDCALL sqlite3_result_double(sqlite3_context*, double);
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error(sqlite3_context*, const char*, int);
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error16(sqlite3_context*, const void*, int);
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error_toobig(sqlite3_context*);
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error_nomem(sqlite3_context*);
-SQLITE_API void SQLITE_STDCALL sqlite3_result_error_code(sqlite3_context*, int);
-SQLITE_API void SQLITE_STDCALL sqlite3_result_int(sqlite3_context*, int);
-SQLITE_API void SQLITE_STDCALL sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
-SQLITE_API void SQLITE_STDCALL sqlite3_result_null(sqlite3_context*);
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64,
+SQLITE_API void sqlite3_result_double(sqlite3_context*, double);
+SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int);
+SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int);
+SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*);
+SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*);
+SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int);
+SQLITE_API void sqlite3_result_int(sqlite3_context*, int);
+SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
+SQLITE_API void sqlite3_result_null(sqlite3_context*);
+SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
+SQLITE_API void sqlite3_result_text64(sqlite3_context*, const char*,sqlite3_uint64,
void(*)(void*), unsigned char encoding);
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
-SQLITE_API void SQLITE_STDCALL sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
-SQLITE_API void SQLITE_STDCALL sqlite3_result_value(sqlite3_context*, sqlite3_value*);
-SQLITE_API void SQLITE_STDCALL sqlite3_result_zeroblob(sqlite3_context*, int n);
-SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
+SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
+SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
+SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
+SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*);
+SQLITE_API void sqlite3_result_pointer(sqlite3_context*, void*,const char*,void(*)(void*));
+SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n);
+SQLITE_API int sqlite3_result_zeroblob64(sqlite3_context*, sqlite3_uint64 n);
/*
@@ -4925,7 +6217,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_result_zeroblob64(sqlite3_context*, sqlite
** The number of subtype bytes preserved by SQLite might increase
** in future releases of SQLite.
*/
-SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned int);
+SQLITE_API void sqlite3_result_subtype(sqlite3_context*,unsigned int);
/*
** CAPI3REF: Define New Collating Sequences
@@ -5007,14 +6299,14 @@ SQLITE_API void SQLITE_STDCALL sqlite3_result_subtype(sqlite3_context*,unsigned
**
** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_create_collation(
+SQLITE_API int sqlite3_create_collation(
sqlite3*,
const char *zName,
int eTextRep,
void *pArg,
int(*xCompare)(void*,int,const void*,int,const void*)
);
-SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2(
+SQLITE_API int sqlite3_create_collation_v2(
sqlite3*,
const char *zName,
int eTextRep,
@@ -5022,7 +6314,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_create_collation_v2(
int(*xCompare)(void*,int,const void*,int,const void*),
void(*xDestroy)(void*)
);
-SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16(
+SQLITE_API int sqlite3_create_collation16(
sqlite3*,
const void *zName,
int eTextRep,
@@ -5057,12 +6349,12 @@ SQLITE_API int SQLITE_STDCALL sqlite3_create_collation16(
** [sqlite3_create_collation()], [sqlite3_create_collation16()], or
** [sqlite3_create_collation_v2()].
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed(
+SQLITE_API int sqlite3_collation_needed(
sqlite3*,
void*,
void(*)(void*,sqlite3*,int eTextRep,const char*)
);
-SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16(
+SQLITE_API int sqlite3_collation_needed16(
sqlite3*,
void*,
void(*)(void*,sqlite3*,int eTextRep,const void*)
@@ -5076,11 +6368,11 @@ SQLITE_API int SQLITE_STDCALL sqlite3_collation_needed16(
** The code to implement this API is not available in the public release
** of SQLite.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_key(
+SQLITE_API int sqlite3_key(
sqlite3 *db, /* Database to be rekeyed */
const void *pKey, int nKey /* The key */
);
-SQLITE_API int SQLITE_STDCALL sqlite3_key_v2(
+SQLITE_API int sqlite3_key_v2(
sqlite3 *db, /* Database to be rekeyed */
const char *zDbName, /* Name of the database */
const void *pKey, int nKey /* The key */
@@ -5094,11 +6386,11 @@ SQLITE_API int SQLITE_STDCALL sqlite3_key_v2(
** The code to implement this API is not available in the public release
** of SQLite.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_rekey(
+SQLITE_API int sqlite3_rekey(
sqlite3 *db, /* Database to be rekeyed */
const void *pKey, int nKey /* The new key */
);
-SQLITE_API int SQLITE_STDCALL sqlite3_rekey_v2(
+SQLITE_API int sqlite3_rekey_v2(
sqlite3 *db, /* Database to be rekeyed */
const char *zDbName, /* Name of the database */
const void *pKey, int nKey /* The new key */
@@ -5108,7 +6400,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_rekey_v2(
** Specify the activation key for a SEE database. Unless
** activated, none of the SEE routines will work.
*/
-SQLITE_API void SQLITE_STDCALL sqlite3_activate_see(
+SQLITE_API void sqlite3_activate_see(
const char *zPassPhrase /* Activation phrase */
);
#endif
@@ -5118,7 +6410,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_activate_see(
** Specify the activation key for a CEROD database. Unless
** activated, none of the CEROD routines will work.
*/
-SQLITE_API void SQLITE_STDCALL sqlite3_activate_cerod(
+SQLITE_API void sqlite3_activate_cerod(
const char *zPassPhrase /* Activation phrase */
);
#endif
@@ -5140,7 +6432,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_activate_cerod(
** all, then the behavior of sqlite3_sleep() may deviate from the description
** in the previous paragraphs.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_sleep(int);
+SQLITE_API int sqlite3_sleep(int);
/*
** CAPI3REF: Name Of The Folder Holding Temporary Files
@@ -5259,7 +6551,7 @@ SQLITE_API char *sqlite3_data_directory;
** connection while this routine is running, then the return value
** is undefined.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3*);
+SQLITE_API int sqlite3_get_autocommit(sqlite3*);
/*
** CAPI3REF: Find The Database Handle Of A Prepared Statement
@@ -5272,7 +6564,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_get_autocommit(sqlite3*);
** to the [sqlite3_prepare_v2()] call (or its variants) that was used to
** create the statement in the first place.
*/
-SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt*);
+SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
/*
** CAPI3REF: Return The Filename For A Database Connection
@@ -5289,7 +6581,7 @@ SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_db_handle(sqlite3_stmt*);
** will be an absolute pathname, even if the filename used
** to open the database originally was a URI or relative pathname.
*/
-SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const char *zDbName);
+SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName);
/*
** CAPI3REF: Determine if a database is read-only
@@ -5299,7 +6591,7 @@ SQLITE_API const char *SQLITE_STDCALL sqlite3_db_filename(sqlite3 *db, const cha
** of connection D is read-only, 0 if it is read/write, or -1 if N is not
** the name of a database on connection D.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
+SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName);
/*
** CAPI3REF: Find the next prepared statement
@@ -5315,7 +6607,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_readonly(sqlite3 *db, const char *zDbNa
** [sqlite3_next_stmt(D,S)] must refer to an open database
** connection and in particular must not be a NULL pointer.
*/
-SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
+SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
/*
** CAPI3REF: Commit And Rollback Notification Callbacks
@@ -5364,8 +6656,8 @@ SQLITE_API sqlite3_stmt *SQLITE_STDCALL sqlite3_next_stmt(sqlite3 *pDb, sqlite3_
**
** See also the [sqlite3_update_hook()] interface.
*/
-SQLITE_API void *SQLITE_STDCALL sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
-SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
+SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
+SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
/*
** CAPI3REF: Data Change Notification Callbacks
@@ -5374,7 +6666,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(sqlite3*, void(*)(void *),
** ^The sqlite3_update_hook() interface registers a callback function
** with the [database connection] identified by the first argument
** to be invoked whenever a row is updated, inserted or deleted in
-** a rowid table.
+** a [rowid table].
** ^Any callback set by a previous call to this function
** for the same database connection is overridden.
**
@@ -5395,7 +6687,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(sqlite3*, void(*)(void *),
** ^The update hook is not invoked when [WITHOUT ROWID] tables are modified.
**
** ^In the current implementation, the update hook
-** is not invoked when duplication rows are deleted because of an
+** is not invoked when conflicting rows are deleted because of an
** [ON CONFLICT | ON CONFLICT REPLACE] clause. ^Nor is the update hook
** invoked when rows are deleted using the [truncate optimization].
** The exceptions defined in this paragraph might change in a future
@@ -5413,10 +6705,10 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_rollback_hook(sqlite3*, void(*)(void *),
** on the same [database connection] D, or NULL for
** the first call on D.
**
-** See also the [sqlite3_commit_hook()] and [sqlite3_rollback_hook()]
-** interfaces.
+** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()],
+** and [sqlite3_preupdate_hook()] interfaces.
*/
-SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook(
+SQLITE_API void *sqlite3_update_hook(
sqlite3*,
void(*)(void *,int ,char const *,char const *,sqlite3_int64),
void*
@@ -5431,7 +6723,8 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook(
** and disabled if the argument is false.)^
**
** ^Cache sharing is enabled and disabled for an entire process.
-** This is a change as of SQLite version 3.5.0. In prior versions of SQLite,
+** This is a change as of SQLite [version 3.5.0] ([dateof:3.5.0]).
+** In prior versions of SQLite,
** sharing was enabled or disabled for each thread separately.
**
** ^(The cache sharing mode set by this interface effects all subsequent
@@ -5456,7 +6749,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_update_hook(
**
** See Also: [SQLite Shared-Cache Mode]
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int);
+SQLITE_API int sqlite3_enable_shared_cache(int);
/*
** CAPI3REF: Attempt To Free Heap Memory
@@ -5472,7 +6765,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int);
**
** See also: [sqlite3_db_release_memory()]
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int);
+SQLITE_API int sqlite3_release_memory(int);
/*
** CAPI3REF: Free Memory Used By A Database Connection
@@ -5486,7 +6779,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int);
**
** See also: [sqlite3_release_memory()]
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3*);
+SQLITE_API int sqlite3_db_release_memory(sqlite3*);
/*
** CAPI3REF: Impose A Limit On Heap Size
@@ -5525,7 +6818,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3*);
** from the heap.
** )^
**
-** Beginning with SQLite version 3.7.3, the soft heap limit is enforced
+** Beginning with SQLite [version 3.7.3] ([dateof:3.7.3]),
+** the soft heap limit is enforced
** regardless of whether or not the [SQLITE_ENABLE_MEMORY_MANAGEMENT]
** compile-time option is invoked. With [SQLITE_ENABLE_MEMORY_MANAGEMENT],
** the soft heap limit is enforced on every memory allocation. Without
@@ -5538,7 +6832,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_release_memory(sqlite3*);
** The circumstances under which SQLite will enforce the soft heap limit may
** changes in future releases of SQLite.
*/
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 N);
+SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N);
/*
** CAPI3REF: Deprecated Soft Heap Limit Interface
@@ -5549,7 +6843,7 @@ SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64
** only. All new applications should use the
** [sqlite3_soft_heap_limit64()] interface rather than this one.
*/
-SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_soft_heap_limit(int N);
+SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N);
/*
@@ -5564,9 +6858,11 @@ SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_soft_heap_limit(int N);
** column exists. ^The sqlite3_table_column_metadata() interface returns
** SQLITE_ERROR and if the specified column does not exist.
** ^If the column-name parameter to sqlite3_table_column_metadata() is a
-** NULL pointer, then this routine simply checks for the existance of the
+** NULL pointer, then this routine simply checks for the existence of the
** table and returns SQLITE_OK if the table exists and SQLITE_ERROR if it
-** does not.
+** does not. If the table name parameter T in a call to
+** sqlite3_table_column_metadata(X,D,T,C,...) is NULL then the result is
+** undefined behavior.
**
** ^The column is identified by the second, third and fourth parameters to
** this function. ^(The second parameter is either the name of the database
@@ -5619,7 +6915,7 @@ SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_soft_heap_limit(int N);
** parsed, if that has not already been done, and returns an error if
** any errors are encountered while loading the schema.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata(
+SQLITE_API int sqlite3_table_column_metadata(
sqlite3 *db, /* Connection handle */
const char *zDbName, /* Database name or NULL */
const char *zTableName, /* Table name */
@@ -5661,12 +6957,21 @@ SQLITE_API int SQLITE_STDCALL sqlite3_table_column_metadata(
** should free this memory by calling [sqlite3_free()].
**
** ^Extension loading must be enabled using
-** [sqlite3_enable_load_extension()] prior to calling this API,
+** [sqlite3_enable_load_extension()] or
+** [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],1,NULL)
+** prior to calling this API,
** otherwise an error will be returned.
**
+** Security warning: It is recommended that the
+** [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method be used to enable only this
+** interface. The use of the [sqlite3_enable_load_extension()] interface
+** should be avoided. This will keep the SQL function [load_extension()]
+** disabled and prevent SQL injections from giving attackers
+** access to extension loading capabilities.
+**
** See also the [load_extension() SQL function].
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_load_extension(
+SQLITE_API int sqlite3_load_extension(
sqlite3 *db, /* Load the extension into this database connection */
const char *zFile, /* Name of the shared library containing extension */
const char *zProc, /* Entry point. Derived from zFile if 0 */
@@ -5686,8 +6991,19 @@ SQLITE_API int SQLITE_STDCALL sqlite3_load_extension(
** ^Call the sqlite3_enable_load_extension() routine with onoff==1
** to turn extension loading on and call it with onoff==0 to turn
** it back off again.
+**
+** ^This interface enables or disables both the C-API
+** [sqlite3_load_extension()] and the SQL function [load_extension()].
+** ^(Use [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],..)
+** to enable or disable only the C-API.)^
+**
+** Security warning: It is recommended that extension loading
+** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method
+** rather than this interface, so the [load_extension()] SQL function
+** remains disabled. This will prevent SQL injections from giving attackers
+** access to extension loading capabilities.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int onoff);
+SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
/*
** CAPI3REF: Automatically Load Statically Linked Extensions
@@ -5699,7 +7015,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int ono
**
** ^(Even though the function prototype shows that xEntryPoint() takes
** no arguments and returns void, SQLite invokes xEntryPoint() with three
-** arguments and expects and integer result as if the signature of the
+** arguments and expects an integer result as if the signature of the
** entry point where as follows:
**
**
@@ -5725,7 +7041,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int ono
** See also: [sqlite3_reset_auto_extension()]
** and [sqlite3_cancel_auto_extension()]
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void (*xEntryPoint)(void));
+SQLITE_API int sqlite3_auto_extension(void(*xEntryPoint)(void));
/*
** CAPI3REF: Cancel Automatic Extension Loading
@@ -5737,7 +7053,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void (*xEntryPoint)(void));
** unregistered and it returns 0 if X was not on the list of initialization
** routines.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void (*xEntryPoint)(void));
+SQLITE_API int sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));
/*
** CAPI3REF: Reset Automatic Extension Loading
@@ -5745,7 +7061,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void (*xEntryPoint)(
** ^This interface disables all automatic extensions previously
** registered using [sqlite3_auto_extension()].
*/
-SQLITE_API void SQLITE_STDCALL sqlite3_reset_auto_extension(void);
+SQLITE_API void sqlite3_reset_auto_extension(void);
/*
** The interface to the virtual-table mechanism is currently considered
@@ -5899,13 +7215,15 @@ struct sqlite3_module {
** the xUpdate method are automatically rolled back by SQLite.
**
** IMPORTANT: The estimatedRows field was added to the sqlite3_index_info
-** structure for SQLite version 3.8.2. If a virtual table extension is
+** structure for SQLite [version 3.8.2] ([dateof:3.8.2]).
+** If a virtual table extension is
** used with an SQLite version earlier than 3.8.2, the results of attempting
** to read or write the estimatedRows field are undefined (but are likely
** to included crashing the application). The estimatedRows field should
** therefore only be used if [sqlite3_libversion_number()] returns a
** value greater than or equal to 3008002. Similarly, the idxFlags field
-** was added for version 3.9.0. It may therefore only be used if
+** was added for [version 3.9.0] ([dateof:3.9.0]).
+** It may therefore only be used if
** sqlite3_libversion_number() returns a value greater than or equal to
** 3009000.
*/
@@ -5913,7 +7231,7 @@ struct sqlite3_index_info {
/* Inputs */
int nConstraint; /* Number of entries in aConstraint */
struct sqlite3_index_constraint {
- int iColumn; /* Column on left-hand side of constraint */
+ int iColumn; /* Column constrained. -1 for ROWID */
unsigned char op; /* Constraint operator */
unsigned char usable; /* True if this constraint is usable */
int iTermOffset; /* Used internally - xBestIndex should ignore */
@@ -5954,15 +7272,20 @@ struct sqlite3_index_info {
** an operator that is part of a constraint term in the wHERE clause of
** a query that uses a [virtual table].
*/
-#define SQLITE_INDEX_CONSTRAINT_EQ 2
-#define SQLITE_INDEX_CONSTRAINT_GT 4
-#define SQLITE_INDEX_CONSTRAINT_LE 8
-#define SQLITE_INDEX_CONSTRAINT_LT 16
-#define SQLITE_INDEX_CONSTRAINT_GE 32
-#define SQLITE_INDEX_CONSTRAINT_MATCH 64
-#define SQLITE_INDEX_CONSTRAINT_LIKE 65
-#define SQLITE_INDEX_CONSTRAINT_GLOB 66
-#define SQLITE_INDEX_CONSTRAINT_REGEXP 67
+#define SQLITE_INDEX_CONSTRAINT_EQ 2
+#define SQLITE_INDEX_CONSTRAINT_GT 4
+#define SQLITE_INDEX_CONSTRAINT_LE 8
+#define SQLITE_INDEX_CONSTRAINT_LT 16
+#define SQLITE_INDEX_CONSTRAINT_GE 32
+#define SQLITE_INDEX_CONSTRAINT_MATCH 64
+#define SQLITE_INDEX_CONSTRAINT_LIKE 65
+#define SQLITE_INDEX_CONSTRAINT_GLOB 66
+#define SQLITE_INDEX_CONSTRAINT_REGEXP 67
+#define SQLITE_INDEX_CONSTRAINT_NE 68
+#define SQLITE_INDEX_CONSTRAINT_ISNOT 69
+#define SQLITE_INDEX_CONSTRAINT_ISNOTNULL 70
+#define SQLITE_INDEX_CONSTRAINT_ISNULL 71
+#define SQLITE_INDEX_CONSTRAINT_IS 72
/*
** CAPI3REF: Register A Virtual Table Implementation
@@ -5990,13 +7313,13 @@ struct sqlite3_index_info {
** interface is equivalent to sqlite3_create_module_v2() with a NULL
** destructor.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_create_module(
+SQLITE_API int sqlite3_create_module(
sqlite3 *db, /* SQLite connection to register module with */
const char *zName, /* Name of the module */
const sqlite3_module *p, /* Methods for the module */
void *pClientData /* Client data for xCreate/xConnect */
);
-SQLITE_API int SQLITE_STDCALL sqlite3_create_module_v2(
+SQLITE_API int sqlite3_create_module_v2(
sqlite3 *db, /* SQLite connection to register module with */
const char *zName, /* Name of the module */
const sqlite3_module *p, /* Methods for the module */
@@ -6059,7 +7382,7 @@ struct sqlite3_vtab_cursor {
** to declare the format (the names and datatypes of the columns) of
** the virtual tables they implement.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3*, const char *zSQL);
+SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL);
/*
** CAPI3REF: Overload A Function For A Virtual Table
@@ -6078,7 +7401,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_declare_vtab(sqlite3*, const char *zSQL);
** purpose is to be a placeholder function that can be overloaded
** by a [virtual table].
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
+SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
/*
** The interface to the virtual-table mechanism defined above (back up
@@ -6153,6 +7476,12 @@ typedef struct sqlite3_blob sqlite3_blob;
** [database connection] error code and message accessible via
** [sqlite3_errcode()] and [sqlite3_errmsg()] and related functions.
**
+** A BLOB referenced by sqlite3_blob_open() may be read using the
+** [sqlite3_blob_read()] interface and modified by using
+** [sqlite3_blob_write()]. The [BLOB handle] can be moved to a
+** different row of the same table using the [sqlite3_blob_reopen()]
+** interface. However, the column, table, or database of a [BLOB handle]
+** cannot be changed after the [BLOB handle] is opened.
**
** ^(If the row that a BLOB handle points to is modified by an
** [UPDATE], [DELETE], or by [ON CONFLICT] side-effects
@@ -6176,8 +7505,12 @@ typedef struct sqlite3_blob sqlite3_blob;
**
** To avoid a resource leak, every open [BLOB handle] should eventually
** be released by a call to [sqlite3_blob_close()].
+**
+** See also: [sqlite3_blob_close()],
+** [sqlite3_blob_reopen()], [sqlite3_blob_read()],
+** [sqlite3_blob_bytes()], [sqlite3_blob_write()].
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_open(
+SQLITE_API int sqlite3_blob_open(
sqlite3*,
const char *zDb,
const char *zTable,
@@ -6191,11 +7524,11 @@ SQLITE_API int SQLITE_STDCALL sqlite3_blob_open(
** CAPI3REF: Move a BLOB Handle to a New Row
** METHOD: sqlite3_blob
**
-** ^This function is used to move an existing blob handle so that it points
+** ^This function is used to move an existing [BLOB handle] so that it points
** to a different row of the same database table. ^The new row is identified
** by the rowid value passed as the second argument. Only the row can be
** changed. ^The database, table and column on which the blob handle is open
-** remain the same. Moving an existing blob handle to a new row can be
+** remain the same. Moving an existing [BLOB handle] to a new row is
** faster than closing the existing handle and opening a new one.
**
** ^(The new row must meet the same criteria as for [sqlite3_blob_open()] -
@@ -6210,7 +7543,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_blob_open(
**
** ^This function sets the database handle error code and message.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
+SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
/*
** CAPI3REF: Close A BLOB Handle
@@ -6233,7 +7566,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64)
** is passed a valid open blob handle, the values returned by the
** sqlite3_errcode() and sqlite3_errmsg() functions are set before returning.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *);
+SQLITE_API int sqlite3_blob_close(sqlite3_blob *);
/*
** CAPI3REF: Return The Size Of An Open BLOB
@@ -6249,7 +7582,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_blob_close(sqlite3_blob *);
** been closed by [sqlite3_blob_close()]. Passing any other pointer in
** to this routine results in undefined and probably undesirable behavior.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *);
+SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *);
/*
** CAPI3REF: Read Data From A BLOB Incrementally
@@ -6278,7 +7611,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_blob_bytes(sqlite3_blob *);
**
** See also: [sqlite3_blob_write()].
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
+SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
/*
** CAPI3REF: Write Data Into A BLOB Incrementally
@@ -6320,7 +7653,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_blob_read(sqlite3_blob *, void *Z, int N,
**
** See also: [sqlite3_blob_read()].
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
+SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
/*
** CAPI3REF: Virtual File System Objects
@@ -6351,9 +7684,9 @@ SQLITE_API int SQLITE_STDCALL sqlite3_blob_write(sqlite3_blob *, const void *z,
** ^(If the default VFS is unregistered, another VFS is chosen as
** the default. The choice for the new VFS is arbitrary.)^
*/
-SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfsName);
-SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
-SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs*);
+SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);
+SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
+SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
/*
** CAPI3REF: Mutexes
@@ -6469,11 +7802,11 @@ SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs*);
**
** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
*/
-SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int);
-SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex*);
-SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex*);
-SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex*);
-SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex*);
+SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int);
+SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*);
+SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*);
+SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*);
+SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*);
/*
** CAPI3REF: Mutex Methods Object
@@ -6583,8 +7916,8 @@ struct sqlite3_mutex_methods {
** interface should also return 1 when given a NULL pointer.
*/
#ifndef NDEBUG
-SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex*);
-SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex*);
+SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);
+SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
#endif
/*
@@ -6603,7 +7936,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex*);
#define SQLITE_MUTEX_STATIC_MEM 3 /* sqlite3_malloc() */
#define SQLITE_MUTEX_STATIC_MEM2 4 /* NOT USED */
#define SQLITE_MUTEX_STATIC_OPEN 4 /* sqlite3BtreeOpen() */
-#define SQLITE_MUTEX_STATIC_PRNG 5 /* sqlite3_random() */
+#define SQLITE_MUTEX_STATIC_PRNG 5 /* sqlite3_randomness() */
#define SQLITE_MUTEX_STATIC_LRU 6 /* lru page list */
#define SQLITE_MUTEX_STATIC_LRU2 7 /* NOT USED */
#define SQLITE_MUTEX_STATIC_PMEM 7 /* sqlite3PageMalloc() */
@@ -6624,7 +7957,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex*);
** ^If the [threading mode] is Single-thread or Multi-thread then this
** routine returns a NULL pointer.
*/
-SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3*);
+SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
/*
** CAPI3REF: Low-Level Control Of Database Files
@@ -6659,7 +7992,7 @@ SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_db_mutex(sqlite3*);
**
** See also: [SQLITE_FCNTL_LOCKSTATE]
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
+SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
/*
** CAPI3REF: Testing Interface
@@ -6678,7 +8011,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_file_control(sqlite3*, const char *zDbName
** Unlike most of the SQLite API, this function is not guaranteed to
** operate consistently from one release to the next.
*/
-SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...);
+SQLITE_API int sqlite3_test_control(int op, ...);
/*
** CAPI3REF: Testing Interface Operation Codes
@@ -6704,9 +8037,10 @@ SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...);
#define SQLITE_TESTCTRL_RESERVE 14
#define SQLITE_TESTCTRL_OPTIMIZATIONS 15
#define SQLITE_TESTCTRL_ISKEYWORD 16
-#define SQLITE_TESTCTRL_SCRATCHMALLOC 17
+#define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */
#define SQLITE_TESTCTRL_LOCALTIME_FAULT 18
#define SQLITE_TESTCTRL_EXPLAIN_STMT 19 /* NOT USED */
+#define SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD 19
#define SQLITE_TESTCTRL_NEVER_CORRUPT 20
#define SQLITE_TESTCTRL_VDBE_COVERAGE 21
#define SQLITE_TESTCTRL_BYTEORDER 22
@@ -6741,8 +8075,8 @@ SQLITE_API int SQLITE_CDECL sqlite3_test_control(int op, ...);
**
** See also: [sqlite3_db_status()]
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
-SQLITE_API int SQLITE_STDCALL sqlite3_status64(
+SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
+SQLITE_API int sqlite3_status64(
int op,
sqlite3_int64 *pCurrent,
sqlite3_int64 *pHighwater,
@@ -6762,8 +8096,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_status64(
** This parameter is the current amount of memory checked out
** using [sqlite3_malloc()], either directly or indirectly. The
** figure includes calls made to [sqlite3_malloc()] by the application
-** and internal memory usage by the SQLite library. Scratch memory
-** controlled by [SQLITE_CONFIG_SCRATCH] and auxiliary page-cache
+** and internal memory usage by the SQLite library. Auxiliary page-cache
** memory controlled by [SQLITE_CONFIG_PAGECACHE] is not included in
** this parameter. The amount returned is the sum of the allocation
** sizes as reported by the xSize method in [sqlite3_mem_methods].)^
@@ -6801,29 +8134,14 @@ SQLITE_API int SQLITE_STDCALL sqlite3_status64(
** *pHighwater parameter to [sqlite3_status()] is of interest.
** The value written into the *pCurrent parameter is undefined.)^
**
-** [[SQLITE_STATUS_SCRATCH_USED]] ^(SQLITE_STATUS_SCRATCH_USED
-** This parameter returns the number of allocations used out of the
-** [scratch memory allocator] configured using
-** [SQLITE_CONFIG_SCRATCH]. The value returned is in allocations, not
-** in bytes. Since a single thread may only have one scratch allocation
-** outstanding at time, this parameter also reports the number of threads
-** using scratch memory at the same time.)^
+** [[SQLITE_STATUS_SCRATCH_USED]] SQLITE_STATUS_SCRATCH_USED
+** No longer used.
**
** [[SQLITE_STATUS_SCRATCH_OVERFLOW]] ^(SQLITE_STATUS_SCRATCH_OVERFLOW
-** This parameter returns the number of bytes of scratch memory
-** allocation which could not be satisfied by the [SQLITE_CONFIG_SCRATCH]
-** buffer and where forced to overflow to [sqlite3_malloc()]. The values
-** returned include overflows because the requested allocation was too
-** larger (that is, because the requested allocation was larger than the
-** "sz" parameter to [SQLITE_CONFIG_SCRATCH]) and because no scratch buffer
-** slots were available.
-** )^
+** No longer used.
**
-** [[SQLITE_STATUS_SCRATCH_SIZE]] ^(SQLITE_STATUS_SCRATCH_SIZE
-** This parameter records the largest memory allocation request
-** handed to [scratch memory allocator]. Only the value returned in the
-** *pHighwater parameter to [sqlite3_status()] is of interest.
-** The value written into the *pCurrent parameter is undefined.)^
+** [[SQLITE_STATUS_SCRATCH_SIZE]] SQLITE_STATUS_SCRATCH_SIZE
+** No longer used.
**
** [[SQLITE_STATUS_PARSER_STACK]] ^(SQLITE_STATUS_PARSER_STACK
** The *pHighwater parameter records the deepest parser stack.
@@ -6836,12 +8154,12 @@ SQLITE_API int SQLITE_STDCALL sqlite3_status64(
#define SQLITE_STATUS_MEMORY_USED 0
#define SQLITE_STATUS_PAGECACHE_USED 1
#define SQLITE_STATUS_PAGECACHE_OVERFLOW 2
-#define SQLITE_STATUS_SCRATCH_USED 3
-#define SQLITE_STATUS_SCRATCH_OVERFLOW 4
+#define SQLITE_STATUS_SCRATCH_USED 3 /* NOT USED */
+#define SQLITE_STATUS_SCRATCH_OVERFLOW 4 /* NOT USED */
#define SQLITE_STATUS_MALLOC_SIZE 5
#define SQLITE_STATUS_PARSER_STACK 6
#define SQLITE_STATUS_PAGECACHE_SIZE 7
-#define SQLITE_STATUS_SCRATCH_SIZE 8
+#define SQLITE_STATUS_SCRATCH_SIZE 8 /* NOT USED */
#define SQLITE_STATUS_MALLOC_COUNT 9
/*
@@ -6867,7 +8185,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_status64(
**
** See also: [sqlite3_status()] and [sqlite3_stmt_status()].
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
+SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
/*
** CAPI3REF: Status Parameters for database connections
@@ -6913,6 +8231,18 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int
** memory used by all pager caches associated with the database connection.)^
** ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_USED is always 0.
**
+** [[SQLITE_DBSTATUS_CACHE_USED_SHARED]]
+** ^(SQLITE_DBSTATUS_CACHE_USED_SHARED
+** This parameter is similar to DBSTATUS_CACHE_USED, except that if a
+** pager cache is shared between two or more connections the bytes of heap
+** memory used by that pager cache is divided evenly between the attached
+** connections.)^ In other words, if none of the pager caches associated
+** with the database connection are shared, this request returns the same
+** value as DBSTATUS_CACHE_USED. Or, if one or more or the pager caches are
+** shared, the value returned by this call will be smaller than that returned
+** by DBSTATUS_CACHE_USED. ^The highwater mark associated with
+** SQLITE_DBSTATUS_CACHE_USED_SHARED is always 0.
+**
** [[SQLITE_DBSTATUS_SCHEMA_USED]] ^(SQLITE_DBSTATUS_SCHEMA_USED
** This parameter returns the approximate number of bytes of heap
** memory used to store the schema for all databases associated
@@ -6970,7 +8300,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int
#define SQLITE_DBSTATUS_CACHE_MISS 8
#define SQLITE_DBSTATUS_CACHE_WRITE 9
#define SQLITE_DBSTATUS_DEFERRED_FKS 10
-#define SQLITE_DBSTATUS_MAX 10 /* Largest defined DBSTATUS */
+#define SQLITE_DBSTATUS_CACHE_USED_SHARED 11
+#define SQLITE_DBSTATUS_MAX 11 /* Largest defined DBSTATUS */
/*
@@ -6997,7 +8328,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int
**
** See also: [sqlite3_status()] and [sqlite3_db_status()].
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
+SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
/*
** CAPI3REF: Status Parameters for prepared statements
@@ -7033,6 +8364,24 @@ SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt*, int op,int rese
** used as a proxy for the total work done by the prepared statement.
** If the number of virtual machine operations exceeds 2147483647
** then the value returned by this statement status code is undefined.
+**
+** [[SQLITE_STMTSTATUS_REPREPARE]] SQLITE_STMTSTATUS_REPREPARE
+** ^This is the number of times that the prepare statement has been
+** automatically regenerated due to schema changes or change to
+** [bound parameters] that might affect the query plan.
+**
+** [[SQLITE_STMTSTATUS_RUN]] SQLITE_STMTSTATUS_RUN
+** ^This is the number of times that the prepared statement has
+** been run. A single "run" for the purposes of this counter is one
+** or more calls to [sqlite3_step()] followed by a call to [sqlite3_reset()].
+** The counter is incremented on the first [sqlite3_step()] call of each
+** cycle.
+**
+** [[SQLITE_STMTSTATUS_MEMUSED]] SQLITE_STMTSTATUS_MEMUSED
+** ^This is the approximate number of bytes of heap memory
+** used to store the prepared statement. ^This value is not actually
+** a counter, and so the resetFlg parameter to sqlite3_stmt_status()
+** is ignored when the opcode is SQLITE_STMTSTATUS_MEMUSED.
**
**
*/
@@ -7040,6 +8389,9 @@ SQLITE_API int SQLITE_STDCALL sqlite3_stmt_status(sqlite3_stmt*, int op,int rese
#define SQLITE_STMTSTATUS_SORT 2
#define SQLITE_STMTSTATUS_AUTOINDEX 3
#define SQLITE_STMTSTATUS_VM_STEP 4
+#define SQLITE_STMTSTATUS_REPREPARE 5
+#define SQLITE_STMTSTATUS_RUN 6
+#define SQLITE_STMTSTATUS_MEMUSED 99
/*
** CAPI3REF: Custom Page Cache Object
@@ -7324,7 +8676,7 @@ typedef struct sqlite3_backup sqlite3_backup;
** must be different or else sqlite3_backup_init(D,N,S,M) will fail with
** an error.
**
-** ^A call to sqlite3_backup_init() will fail, returning SQLITE_ERROR, if
+** ^A call to sqlite3_backup_init() will fail, returning NULL, if
** there is already a read or read-write transaction open on the
** destination database.
**
@@ -7466,16 +8818,16 @@ typedef struct sqlite3_backup sqlite3_backup;
** same time as another thread is invoking sqlite3_backup_step() it is
** possible that they return invalid values.
*/
-SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init(
+SQLITE_API sqlite3_backup *sqlite3_backup_init(
sqlite3 *pDest, /* Destination database handle */
const char *zDestName, /* Destination database name */
sqlite3 *pSource, /* Source database handle */
const char *zSourceName /* Source database name */
);
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage);
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p);
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p);
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p);
+SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage);
+SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p);
+SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p);
+SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
/*
** CAPI3REF: Unlock Notification
@@ -7592,7 +8944,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p);
** the special "DROP TABLE/INDEX" case, the extended error code is just
** SQLITE_LOCKED.)^
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify(
+SQLITE_API int sqlite3_unlock_notify(
sqlite3 *pBlocked, /* Waiting connection */
void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */
void *pNotifyArg /* Argument to pass to xNotify */
@@ -7607,8 +8959,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_unlock_notify(
** strings in a case-independent fashion, using the same definition of "case
** independence" that SQLite uses internally when comparing identifiers.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *, const char *);
-SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *, const char *, int);
+SQLITE_API int sqlite3_stricmp(const char *, const char *);
+SQLITE_API int sqlite3_strnicmp(const char *, const char *, int);
/*
** CAPI3REF: String Globbing
@@ -7625,7 +8977,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *, const char *, int);
**
** See also: [sqlite3_strlike()].
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlob, const char *zStr);
+SQLITE_API int sqlite3_strglob(const char *zGlob, const char *zStr);
/*
** CAPI3REF: String LIKE Matching
@@ -7648,7 +9000,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_strglob(const char *zGlob, const char *zSt
**
** See also: [sqlite3_strglob()].
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc);
+SQLITE_API int sqlite3_strlike(const char *zGlob, const char *zStr, unsigned int cEsc);
/*
** CAPI3REF: Error Logging Interface
@@ -7671,7 +9023,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_strlike(const char *zGlob, const char *zSt
** a few hundred characters, it will be truncated to the length of the
** buffer.
*/
-SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...);
+SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...);
/*
** CAPI3REF: Write-Ahead Log Commit Hook
@@ -7705,9 +9057,9 @@ SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...)
** previously registered write-ahead log callback. ^Note that the
** [sqlite3_wal_autocheckpoint()] interface and the
** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will
-** those overwrite any prior [sqlite3_wal_hook()] settings.
+** overwrite any prior [sqlite3_wal_hook()] settings.
*/
-SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook(
+SQLITE_API void *sqlite3_wal_hook(
sqlite3*,
int(*)(void *,sqlite3*,const char*,int),
void*
@@ -7742,7 +9094,7 @@ SQLITE_API void *SQLITE_STDCALL sqlite3_wal_hook(
** is only necessary if the default setting is found to be suboptimal
** for a particular application.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
+SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
/*
** CAPI3REF: Checkpoint a database
@@ -7764,7 +9116,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
** start a callback but which do not need the full power (and corresponding
** complication) of [sqlite3_wal_checkpoint_v2()].
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
+SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
/*
** CAPI3REF: Checkpoint a database
@@ -7858,7 +9210,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint(sqlite3 *db, const char *zD
** ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface
** from SQL.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2(
+SQLITE_API int sqlite3_wal_checkpoint_v2(
sqlite3 *db, /* Database handle */
const char *zDb, /* Name of attached database (or NULL) */
int eMode, /* SQLITE_CHECKPOINT_* value */
@@ -7894,7 +9246,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_wal_checkpoint_v2(
** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options
** may be added in the future.
*/
-SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3*, int op, ...);
+SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
/*
** CAPI3REF: Virtual Table Configuration Options
@@ -7947,7 +9299,7 @@ SQLITE_API int SQLITE_CDECL sqlite3_vtab_config(sqlite3*, int op, ...);
** of the SQL statement that triggered the call to the [xUpdate] method of the
** [virtual table].
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *);
+SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *);
/*
** CAPI3REF: Conflict resolution modes
@@ -8052,7 +9404,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_vtab_on_conflict(sqlite3 *);
**
** See also: [sqlite3_stmt_scanstatus_reset()]
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus(
+SQLITE_API int sqlite3_stmt_scanstatus(
sqlite3_stmt *pStmt, /* Prepared statement for which info desired */
int idx, /* Index of loop to report on */
int iScanStatusOp, /* Information desired. SQLITE_SCANSTAT_* */
@@ -8068,7 +9420,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_stmt_scanstatus(
** This API is only available if the library is built with pre-processor
** symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined.
*/
-SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
+SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
/*
** CAPI3REF: Flush caches to disk mid-transaction
@@ -8100,11 +9452,125 @@ SQLITE_API void SQLITE_STDCALL sqlite3_stmt_scanstatus_reset(sqlite3_stmt*);
** ^This function does not set the database handle error code or message
** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*);
+SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
+
+/*
+** CAPI3REF: The pre-update hook.
+**
+** ^These interfaces are only available if SQLite is compiled using the
+** [SQLITE_ENABLE_PREUPDATE_HOOK] compile-time option.
+**
+** ^The [sqlite3_preupdate_hook()] interface registers a callback function
+** that is invoked prior to each [INSERT], [UPDATE], and [DELETE] operation
+** on a database table.
+** ^At most one preupdate hook may be registered at a time on a single
+** [database connection]; each call to [sqlite3_preupdate_hook()] overrides
+** the previous setting.
+** ^The preupdate hook is disabled by invoking [sqlite3_preupdate_hook()]
+** with a NULL pointer as the second parameter.
+** ^The third parameter to [sqlite3_preupdate_hook()] is passed through as
+** the first parameter to callbacks.
+**
+** ^The preupdate hook only fires for changes to real database tables; the
+** preupdate hook is not invoked for changes to [virtual tables] or to
+** system tables like sqlite_master or sqlite_stat1.
+**
+** ^The second parameter to the preupdate callback is a pointer to
+** the [database connection] that registered the preupdate hook.
+** ^The third parameter to the preupdate callback is one of the constants
+** [SQLITE_INSERT], [SQLITE_DELETE], or [SQLITE_UPDATE] to identify the
+** kind of update operation that is about to occur.
+** ^(The fourth parameter to the preupdate callback is the name of the
+** database within the database connection that is being modified. This
+** will be "main" for the main database or "temp" for TEMP tables or
+** the name given after the AS keyword in the [ATTACH] statement for attached
+** databases.)^
+** ^The fifth parameter to the preupdate callback is the name of the
+** table that is being modified.
+**
+** For an UPDATE or DELETE operation on a [rowid table], the sixth
+** parameter passed to the preupdate callback is the initial [rowid] of the
+** row being modified or deleted. For an INSERT operation on a rowid table,
+** or any operation on a WITHOUT ROWID table, the value of the sixth
+** parameter is undefined. For an INSERT or UPDATE on a rowid table the
+** seventh parameter is the final rowid value of the row being inserted
+** or updated. The value of the seventh parameter passed to the callback
+** function is not defined for operations on WITHOUT ROWID tables, or for
+** INSERT operations on rowid tables.
+**
+** The [sqlite3_preupdate_old()], [sqlite3_preupdate_new()],
+** [sqlite3_preupdate_count()], and [sqlite3_preupdate_depth()] interfaces
+** provide additional information about a preupdate event. These routines
+** may only be called from within a preupdate callback. Invoking any of
+** these routines from outside of a preupdate callback or with a
+** [database connection] pointer that is different from the one supplied
+** to the preupdate callback results in undefined and probably undesirable
+** behavior.
+**
+** ^The [sqlite3_preupdate_count(D)] interface returns the number of columns
+** in the row that is being inserted, updated, or deleted.
+**
+** ^The [sqlite3_preupdate_old(D,N,P)] interface writes into P a pointer to
+** a [protected sqlite3_value] that contains the value of the Nth column of
+** the table row before it is updated. The N parameter must be between 0
+** and one less than the number of columns or the behavior will be
+** undefined. This must only be used within SQLITE_UPDATE and SQLITE_DELETE
+** preupdate callbacks; if it is used by an SQLITE_INSERT callback then the
+** behavior is undefined. The [sqlite3_value] that P points to
+** will be destroyed when the preupdate callback returns.
+**
+** ^The [sqlite3_preupdate_new(D,N,P)] interface writes into P a pointer to
+** a [protected sqlite3_value] that contains the value of the Nth column of
+** the table row after it is updated. The N parameter must be between 0
+** and one less than the number of columns or the behavior will be
+** undefined. This must only be used within SQLITE_INSERT and SQLITE_UPDATE
+** preupdate callbacks; if it is used by an SQLITE_DELETE callback then the
+** behavior is undefined. The [sqlite3_value] that P points to
+** will be destroyed when the preupdate callback returns.
+**
+** ^The [sqlite3_preupdate_depth(D)] interface returns 0 if the preupdate
+** callback was invoked as a result of a direct insert, update, or delete
+** operation; or 1 for inserts, updates, or deletes invoked by top-level
+** triggers; or 2 for changes resulting from triggers called by top-level
+** triggers; and so forth.
+**
+** See also: [sqlite3_update_hook()]
+*/
+#if defined(SQLITE_ENABLE_PREUPDATE_HOOK)
+SQLITE_API void *sqlite3_preupdate_hook(
+ sqlite3 *db,
+ void(*xPreUpdate)(
+ void *pCtx, /* Copy of third arg to preupdate_hook() */
+ sqlite3 *db, /* Database handle */
+ int op, /* SQLITE_UPDATE, DELETE or INSERT */
+ char const *zDb, /* Database name */
+ char const *zName, /* Table name */
+ sqlite3_int64 iKey1, /* Rowid of row about to be deleted/updated */
+ sqlite3_int64 iKey2 /* New rowid value (for a rowid UPDATE) */
+ ),
+ void*
+);
+SQLITE_API int sqlite3_preupdate_old(sqlite3 *, int, sqlite3_value **);
+SQLITE_API int sqlite3_preupdate_count(sqlite3 *);
+SQLITE_API int sqlite3_preupdate_depth(sqlite3 *);
+SQLITE_API int sqlite3_preupdate_new(sqlite3 *, int, sqlite3_value **);
+#endif
+
+/*
+** CAPI3REF: Low-level system error code
+**
+** ^Attempt to return the underlying operating system error code or error
+** number that caused the most recent I/O error or failure to open a file.
+** The return value is OS-dependent. For example, on unix systems, after
+** [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be
+** called to get back the underlying "errno" that caused the problem, such
+** as ENOSPC, EAUTH, EISDIR, and so forth.
+*/
+SQLITE_API int sqlite3_system_errno(sqlite3*);
/*
** CAPI3REF: Database Snapshot
-** KEYWORDS: {snapshot}
+** KEYWORDS: {snapshot} {sqlite3_snapshot}
** EXPERIMENTAL
**
** An instance of the snapshot object records the state of a [WAL mode]
@@ -8128,7 +9594,9 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*);
** to an historical snapshot (if possible). The destructor for
** sqlite3_snapshot objects is [sqlite3_snapshot_free()].
*/
-typedef struct sqlite3_snapshot sqlite3_snapshot;
+typedef struct sqlite3_snapshot {
+ unsigned char hidden[48];
+} sqlite3_snapshot;
/*
** CAPI3REF: Record A Database Snapshot
@@ -8139,9 +9607,32 @@ typedef struct sqlite3_snapshot sqlite3_snapshot;
** schema S in database connection D. ^On success, the
** [sqlite3_snapshot_get(D,S,P)] interface writes a pointer to the newly
** created [sqlite3_snapshot] object into *P and returns SQLITE_OK.
-** ^If schema S of [database connection] D is not a [WAL mode] database
-** that is in a read transaction, then [sqlite3_snapshot_get(D,S,P)]
-** leaves the *P value unchanged and returns an appropriate [error code].
+** If there is not already a read-transaction open on schema S when
+** this function is called, one is opened automatically.
+**
+** The following must be true for this function to succeed. If any of
+** the following statements are false when sqlite3_snapshot_get() is
+** called, SQLITE_ERROR is returned. The final value of *P is undefined
+** in this case.
+**
+**
+** - The database handle must be in [autocommit mode].
+**
+**
- Schema S of [database connection] D must be a [WAL mode] database.
+**
+**
- There must not be a write transaction open on schema S of database
+** connection D.
+**
+**
- One or more transactions must have been written to the current wal
+** file since it was created on disk (by any connection). This means
+** that a snapshot cannot be taken on a wal mode database with no wal
+** file immediately after it is first opened. At least one transaction
+** must be written to it first.
+**
+**
+** This function may also return SQLITE_NOMEM. If it is called with the
+** database handle in autocommit mode but fails for some other reason,
+** whether or not a read transaction is opened on schema S is undefined.
**
** The [sqlite3_snapshot] object returned from a successful call to
** [sqlite3_snapshot_get()] must be freed using [sqlite3_snapshot_free()]
@@ -8150,7 +9641,7 @@ typedef struct sqlite3_snapshot sqlite3_snapshot;
** The [sqlite3_snapshot_get()] interface is only available when the
** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
*/
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_get(
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_get(
sqlite3 *db,
const char *zSchema,
sqlite3_snapshot **ppSnapshot
@@ -8160,22 +9651,35 @@ SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_get(
** CAPI3REF: Start a read transaction on an historical snapshot
** EXPERIMENTAL
**
-** ^The [sqlite3_snapshot_open(D,S,P)] interface attempts to move the
-** read transaction that is currently open on schema S of
-** [database connection] D so that it refers to historical [snapshot] P.
+** ^The [sqlite3_snapshot_open(D,S,P)] interface starts a
+** read transaction for schema S of
+** [database connection] D such that the read transaction
+** refers to historical [snapshot] P, rather than the most
+** recent change to the database.
** ^The [sqlite3_snapshot_open()] interface returns SQLITE_OK on success
** or an appropriate [error code] if it fails.
**
** ^In order to succeed, a call to [sqlite3_snapshot_open(D,S,P)] must be
-** the first operation, apart from other sqlite3_snapshot_open() calls,
-** following the [BEGIN] that starts a new read transaction.
-** ^A [snapshot] will fail to open if it has been overwritten by a
-** [checkpoint].
+** the first operation following the [BEGIN] that takes the schema S
+** out of [autocommit mode].
+** ^In other words, schema S must not currently be in
+** a transaction for [sqlite3_snapshot_open(D,S,P)] to work, but the
+** database connection D must be out of [autocommit mode].
+** ^A [snapshot] will fail to open if it has been overwritten by a
+** [checkpoint].
+** ^(A call to [sqlite3_snapshot_open(D,S,P)] will fail if the
+** database connection D does not know that the database file for
+** schema S is in [WAL mode]. A database connection might not know
+** that the database file is in [WAL mode] if there has been no prior
+** I/O on that database connection, or if the database entered [WAL mode]
+** after the most recent I/O on the database connection.)^
+** (Hint: Run "[PRAGMA application_id]" against a newly opened
+** database connection in order to make it ready to use snapshots.)
**
** The [sqlite3_snapshot_open()] interface is only available when the
** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
*/
-SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_open(
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_open(
sqlite3 *db,
const char *zSchema,
sqlite3_snapshot *pSnapshot
@@ -8192,7 +9696,56 @@ SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_open(
** The [sqlite3_snapshot_free()] interface is only available when the
** SQLITE_ENABLE_SNAPSHOT compile-time option is used.
*/
-SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3_snapshot*);
+SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot*);
+
+/*
+** CAPI3REF: Compare the ages of two snapshot handles.
+** EXPERIMENTAL
+**
+** The sqlite3_snapshot_cmp(P1, P2) interface is used to compare the ages
+** of two valid snapshot handles.
+**
+** If the two snapshot handles are not associated with the same database
+** file, the result of the comparison is undefined.
+**
+** Additionally, the result of the comparison is only valid if both of the
+** snapshot handles were obtained by calling sqlite3_snapshot_get() since the
+** last time the wal file was deleted. The wal file is deleted when the
+** database is changed back to rollback mode or when the number of database
+** clients drops to zero. If either snapshot handle was obtained before the
+** wal file was last deleted, the value returned by this function
+** is undefined.
+**
+** Otherwise, this API returns a negative value if P1 refers to an older
+** snapshot than P2, zero if the two handles refer to the same database
+** snapshot, and a positive value if P1 is a newer snapshot than P2.
+*/
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp(
+ sqlite3_snapshot *p1,
+ sqlite3_snapshot *p2
+);
+
+/*
+** CAPI3REF: Recover snapshots from a wal file
+** EXPERIMENTAL
+**
+** If all connections disconnect from a database file but do not perform
+** a checkpoint, the existing wal file is opened along with the database
+** file the next time the database is opened. At this point it is only
+** possible to successfully call sqlite3_snapshot_open() to open the most
+** recent snapshot of the database (the one at the head of the wal file),
+** even though the wal file may contain other valid snapshots for which
+** clients have sqlite3_snapshot handles.
+**
+** This function attempts to scan the wal file associated with database zDb
+** of database handle db and make all valid snapshots available to
+** sqlite3_snapshot_open(). It is an error if there is already a read
+** transaction open on the database, or if the database is not a wal mode
+** database.
+**
+** SQLITE_OK is returned if successful, or an SQLite error code otherwise.
+*/
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const char *zDb);
/*
** Undo the hack that converts floating point types to integer for
@@ -8205,8 +9758,9 @@ SQLITE_API SQLITE_EXPERIMENTAL void SQLITE_STDCALL sqlite3_snapshot_free(sqlite3
#if 0
} /* End of the 'extern "C"' block */
#endif
-#endif /* _SQLITE3_H_ */
+#endif /* SQLITE3_H */
+/******** Begin file sqlite3rtree.h *********/
/*
** 2010 August 30
**
@@ -8246,7 +9800,7 @@ typedef struct sqlite3_rtree_query_info sqlite3_rtree_query_info;
**
** SELECT ... FROM WHERE MATCH $zGeom(... params ...)
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_rtree_geometry_callback(
+SQLITE_API int sqlite3_rtree_geometry_callback(
sqlite3 *db,
const char *zGeom,
int (*xGeom)(sqlite3_rtree_geometry*, int, sqlite3_rtree_dbl*,int*),
@@ -8272,7 +9826,7 @@ struct sqlite3_rtree_geometry {
**
** SELECT ... FROM WHERE MATCH $zQueryFunc(... params ...)
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_rtree_query_callback(
+SQLITE_API int sqlite3_rtree_query_callback(
sqlite3 *db,
const char *zQueryFunc,
int (*xQueryFunc)(sqlite3_rtree_query_info*),
@@ -8324,6 +9878,1298 @@ struct sqlite3_rtree_query_info {
#endif /* ifndef _SQLITE3RTREE_H_ */
+/******** End of sqlite3rtree.h *********/
+/******** Begin file sqlite3session.h *********/
+
+#if !defined(__SQLITESESSION_H_) && defined(SQLITE_ENABLE_SESSION)
+#define __SQLITESESSION_H_ 1
+
+/*
+** Make sure we can call this stuff from C++.
+*/
+#if 0
+extern "C" {
+#endif
+
+
+/*
+** CAPI3REF: Session Object Handle
+*/
+typedef struct sqlite3_session sqlite3_session;
+
+/*
+** CAPI3REF: Changeset Iterator Handle
+*/
+typedef struct sqlite3_changeset_iter sqlite3_changeset_iter;
+
+/*
+** CAPI3REF: Create A New Session Object
+**
+** Create a new session object attached to database handle db. If successful,
+** a pointer to the new object is written to *ppSession and SQLITE_OK is
+** returned. If an error occurs, *ppSession is set to NULL and an SQLite
+** error code (e.g. SQLITE_NOMEM) is returned.
+**
+** It is possible to create multiple session objects attached to a single
+** database handle.
+**
+** Session objects created using this function should be deleted using the
+** [sqlite3session_delete()] function before the database handle that they
+** are attached to is itself closed. If the database handle is closed before
+** the session object is deleted, then the results of calling any session
+** module function, including [sqlite3session_delete()] on the session object
+** are undefined.
+**
+** Because the session module uses the [sqlite3_preupdate_hook()] API, it
+** is not possible for an application to register a pre-update hook on a
+** database handle that has one or more session objects attached. Nor is
+** it possible to create a session object attached to a database handle for
+** which a pre-update hook is already defined. The results of attempting
+** either of these things are undefined.
+**
+** The session object will be used to create changesets for tables in
+** database zDb, where zDb is either "main", or "temp", or the name of an
+** attached database. It is not an error if database zDb is not attached
+** to the database when the session object is created.
+*/
+SQLITE_API int sqlite3session_create(
+ sqlite3 *db, /* Database handle */
+ const char *zDb, /* Name of db (e.g. "main") */
+ sqlite3_session **ppSession /* OUT: New session object */
+);
+
+/*
+** CAPI3REF: Delete A Session Object
+**
+** Delete a session object previously allocated using
+** [sqlite3session_create()]. Once a session object has been deleted, the
+** results of attempting to use pSession with any other session module
+** function are undefined.
+**
+** Session objects must be deleted before the database handle to which they
+** are attached is closed. Refer to the documentation for
+** [sqlite3session_create()] for details.
+*/
+SQLITE_API void sqlite3session_delete(sqlite3_session *pSession);
+
+
+/*
+** CAPI3REF: Enable Or Disable A Session Object
+**
+** Enable or disable the recording of changes by a session object. When
+** enabled, a session object records changes made to the database. When
+** disabled - it does not. A newly created session object is enabled.
+** Refer to the documentation for [sqlite3session_changeset()] for further
+** details regarding how enabling and disabling a session object affects
+** the eventual changesets.
+**
+** Passing zero to this function disables the session. Passing a value
+** greater than zero enables it. Passing a value less than zero is a
+** no-op, and may be used to query the current state of the session.
+**
+** The return value indicates the final state of the session object: 0 if
+** the session is disabled, or 1 if it is enabled.
+*/
+SQLITE_API int sqlite3session_enable(sqlite3_session *pSession, int bEnable);
+
+/*
+** CAPI3REF: Set Or Clear the Indirect Change Flag
+**
+** Each change recorded by a session object is marked as either direct or
+** indirect. A change is marked as indirect if either:
+**
+**
+** - The session object "indirect" flag is set when the change is
+** made, or
+**
- The change is made by an SQL trigger or foreign key action
+** instead of directly as a result of a users SQL statement.
+**
+**
+** If a single row is affected by more than one operation within a session,
+** then the change is considered indirect if all operations meet the criteria
+** for an indirect change above, or direct otherwise.
+**
+** This function is used to set, clear or query the session object indirect
+** flag. If the second argument passed to this function is zero, then the
+** indirect flag is cleared. If it is greater than zero, the indirect flag
+** is set. Passing a value less than zero does not modify the current value
+** of the indirect flag, and may be used to query the current state of the
+** indirect flag for the specified session object.
+**
+** The return value indicates the final state of the indirect flag: 0 if
+** it is clear, or 1 if it is set.
+*/
+SQLITE_API int sqlite3session_indirect(sqlite3_session *pSession, int bIndirect);
+
+/*
+** CAPI3REF: Attach A Table To A Session Object
+**
+** If argument zTab is not NULL, then it is the name of a table to attach
+** to the session object passed as the first argument. All subsequent changes
+** made to the table while the session object is enabled will be recorded. See
+** documentation for [sqlite3session_changeset()] for further details.
+**
+** Or, if argument zTab is NULL, then changes are recorded for all tables
+** in the database. If additional tables are added to the database (by
+** executing "CREATE TABLE" statements) after this call is made, changes for
+** the new tables are also recorded.
+**
+** Changes can only be recorded for tables that have a PRIMARY KEY explicitly
+** defined as part of their CREATE TABLE statement. It does not matter if the
+** PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias) or not. The PRIMARY
+** KEY may consist of a single column, or may be a composite key.
+**
+** It is not an error if the named table does not exist in the database. Nor
+** is it an error if the named table does not have a PRIMARY KEY. However,
+** no changes will be recorded in either of these scenarios.
+**
+** Changes are not recorded for individual rows that have NULL values stored
+** in one or more of their PRIMARY KEY columns.
+**
+** SQLITE_OK is returned if the call completes without error. Or, if an error
+** occurs, an SQLite error code (e.g. SQLITE_NOMEM) is returned.
+*/
+SQLITE_API int sqlite3session_attach(
+ sqlite3_session *pSession, /* Session object */
+ const char *zTab /* Table name */
+);
+
+/*
+** CAPI3REF: Set a table filter on a Session Object.
+**
+** The second argument (xFilter) is the "filter callback". For changes to rows
+** in tables that are not attached to the Session object, the filter is called
+** to determine whether changes to the table's rows should be tracked or not.
+** If xFilter returns 0, changes is not tracked. Note that once a table is
+** attached, xFilter will not be called again.
+*/
+SQLITE_API void sqlite3session_table_filter(
+ sqlite3_session *pSession, /* Session object */
+ int(*xFilter)(
+ void *pCtx, /* Copy of third arg to _filter_table() */
+ const char *zTab /* Table name */
+ ),
+ void *pCtx /* First argument passed to xFilter */
+);
+
+/*
+** CAPI3REF: Generate A Changeset From A Session Object
+**
+** Obtain a changeset containing changes to the tables attached to the
+** session object passed as the first argument. If successful,
+** set *ppChangeset to point to a buffer containing the changeset
+** and *pnChangeset to the size of the changeset in bytes before returning
+** SQLITE_OK. If an error occurs, set both *ppChangeset and *pnChangeset to
+** zero and return an SQLite error code.
+**
+** A changeset consists of zero or more INSERT, UPDATE and/or DELETE changes,
+** each representing a change to a single row of an attached table. An INSERT
+** change contains the values of each field of a new database row. A DELETE
+** contains the original values of each field of a deleted database row. An
+** UPDATE change contains the original values of each field of an updated
+** database row along with the updated values for each updated non-primary-key
+** column. It is not possible for an UPDATE change to represent a change that
+** modifies the values of primary key columns. If such a change is made, it
+** is represented in a changeset as a DELETE followed by an INSERT.
+**
+** Changes are not recorded for rows that have NULL values stored in one or
+** more of their PRIMARY KEY columns. If such a row is inserted or deleted,
+** no corresponding change is present in the changesets returned by this
+** function. If an existing row with one or more NULL values stored in
+** PRIMARY KEY columns is updated so that all PRIMARY KEY columns are non-NULL,
+** only an INSERT is appears in the changeset. Similarly, if an existing row
+** with non-NULL PRIMARY KEY values is updated so that one or more of its
+** PRIMARY KEY columns are set to NULL, the resulting changeset contains a
+** DELETE change only.
+**
+** The contents of a changeset may be traversed using an iterator created
+** using the [sqlite3changeset_start()] API. A changeset may be applied to
+** a database with a compatible schema using the [sqlite3changeset_apply()]
+** API.
+**
+** Within a changeset generated by this function, all changes related to a
+** single table are grouped together. In other words, when iterating through
+** a changeset or when applying a changeset to a database, all changes related
+** to a single table are processed before moving on to the next table. Tables
+** are sorted in the same order in which they were attached (or auto-attached)
+** to the sqlite3_session object. The order in which the changes related to
+** a single table are stored is undefined.
+**
+** Following a successful call to this function, it is the responsibility of
+** the caller to eventually free the buffer that *ppChangeset points to using
+** [sqlite3_free()].
+**
+** Changeset Generation
+**
+** Once a table has been attached to a session object, the session object
+** records the primary key values of all new rows inserted into the table.
+** It also records the original primary key and other column values of any
+** deleted or updated rows. For each unique primary key value, data is only
+** recorded once - the first time a row with said primary key is inserted,
+** updated or deleted in the lifetime of the session.
+**
+** There is one exception to the previous paragraph: when a row is inserted,
+** updated or deleted, if one or more of its primary key columns contain a
+** NULL value, no record of the change is made.
+**
+** The session object therefore accumulates two types of records - those
+** that consist of primary key values only (created when the user inserts
+** a new record) and those that consist of the primary key values and the
+** original values of other table columns (created when the users deletes
+** or updates a record).
+**
+** When this function is called, the requested changeset is created using
+** both the accumulated records and the current contents of the database
+** file. Specifically:
+**
+**
+** - For each record generated by an insert, the database is queried
+** for a row with a matching primary key. If one is found, an INSERT
+** change is added to the changeset. If no such row is found, no change
+** is added to the changeset.
+**
+**
- For each record generated by an update or delete, the database is
+** queried for a row with a matching primary key. If such a row is
+** found and one or more of the non-primary key fields have been
+** modified from their original values, an UPDATE change is added to
+** the changeset. Or, if no such row is found in the table, a DELETE
+** change is added to the changeset. If there is a row with a matching
+** primary key in the database, but all fields contain their original
+** values, no change is added to the changeset.
+**
+**
+** This means, amongst other things, that if a row is inserted and then later
+** deleted while a session object is active, neither the insert nor the delete
+** will be present in the changeset. Or if a row is deleted and then later a
+** row with the same primary key values inserted while a session object is
+** active, the resulting changeset will contain an UPDATE change instead of
+** a DELETE and an INSERT.
+**
+** When a session object is disabled (see the [sqlite3session_enable()] API),
+** it does not accumulate records when rows are inserted, updated or deleted.
+** This may appear to have some counter-intuitive effects if a single row
+** is written to more than once during a session. For example, if a row
+** is inserted while a session object is enabled, then later deleted while
+** the same session object is disabled, no INSERT record will appear in the
+** changeset, even though the delete took place while the session was disabled.
+** Or, if one field of a row is updated while a session is disabled, and
+** another field of the same row is updated while the session is enabled, the
+** resulting changeset will contain an UPDATE change that updates both fields.
+*/
+SQLITE_API int sqlite3session_changeset(
+ sqlite3_session *pSession, /* Session object */
+ int *pnChangeset, /* OUT: Size of buffer at *ppChangeset */
+ void **ppChangeset /* OUT: Buffer containing changeset */
+);
+
+/*
+** CAPI3REF: Load The Difference Between Tables Into A Session
+**
+** If it is not already attached to the session object passed as the first
+** argument, this function attaches table zTbl in the same manner as the
+** [sqlite3session_attach()] function. If zTbl does not exist, or if it
+** does not have a primary key, this function is a no-op (but does not return
+** an error).
+**
+** Argument zFromDb must be the name of a database ("main", "temp" etc.)
+** attached to the same database handle as the session object that contains
+** a table compatible with the table attached to the session by this function.
+** A table is considered compatible if it:
+**
+**
+** - Has the same name,
+**
- Has the same set of columns declared in the same order, and
+**
- Has the same PRIMARY KEY definition.
+**
+**
+** If the tables are not compatible, SQLITE_SCHEMA is returned. If the tables
+** are compatible but do not have any PRIMARY KEY columns, it is not an error
+** but no changes are added to the session object. As with other session
+** APIs, tables without PRIMARY KEYs are simply ignored.
+**
+** This function adds a set of changes to the session object that could be
+** used to update the table in database zFrom (call this the "from-table")
+** so that its content is the same as the table attached to the session
+** object (call this the "to-table"). Specifically:
+**
+**
+** - For each row (primary key) that exists in the to-table but not in
+** the from-table, an INSERT record is added to the session object.
+**
+**
- For each row (primary key) that exists in the to-table but not in
+** the from-table, a DELETE record is added to the session object.
+**
+**
- For each row (primary key) that exists in both tables, but features
+** different non-PK values in each, an UPDATE record is added to the
+** session.
+**
+**
+** To clarify, if this function is called and then a changeset constructed
+** using [sqlite3session_changeset()], then after applying that changeset to
+** database zFrom the contents of the two compatible tables would be
+** identical.
+**
+** It an error if database zFrom does not exist or does not contain the
+** required compatible table.
+**
+** If the operation successful, SQLITE_OK is returned. Otherwise, an SQLite
+** error code. In this case, if argument pzErrMsg is not NULL, *pzErrMsg
+** may be set to point to a buffer containing an English language error
+** message. It is the responsibility of the caller to free this buffer using
+** sqlite3_free().
+*/
+SQLITE_API int sqlite3session_diff(
+ sqlite3_session *pSession,
+ const char *zFromDb,
+ const char *zTbl,
+ char **pzErrMsg
+);
+
+
+/*
+** CAPI3REF: Generate A Patchset From A Session Object
+**
+** The differences between a patchset and a changeset are that:
+**
+**
+** - DELETE records consist of the primary key fields only. The
+** original values of other fields are omitted.
+**
- The original values of any modified fields are omitted from
+** UPDATE records.
+**
+**
+** A patchset blob may be used with up to date versions of all
+** sqlite3changeset_xxx API functions except for sqlite3changeset_invert(),
+** which returns SQLITE_CORRUPT if it is passed a patchset. Similarly,
+** attempting to use a patchset blob with old versions of the
+** sqlite3changeset_xxx APIs also provokes an SQLITE_CORRUPT error.
+**
+** Because the non-primary key "old.*" fields are omitted, no
+** SQLITE_CHANGESET_DATA conflicts can be detected or reported if a patchset
+** is passed to the sqlite3changeset_apply() API. Other conflict types work
+** in the same way as for changesets.
+**
+** Changes within a patchset are ordered in the same way as for changesets
+** generated by the sqlite3session_changeset() function (i.e. all changes for
+** a single table are grouped together, tables appear in the order in which
+** they were attached to the session object).
+*/
+SQLITE_API int sqlite3session_patchset(
+ sqlite3_session *pSession, /* Session object */
+ int *pnPatchset, /* OUT: Size of buffer at *ppPatchset */
+ void **ppPatchset /* OUT: Buffer containing patchset */
+);
+
+/*
+** CAPI3REF: Test if a changeset has recorded any changes.
+**
+** Return non-zero if no changes to attached tables have been recorded by
+** the session object passed as the first argument. Otherwise, if one or
+** more changes have been recorded, return zero.
+**
+** Even if this function returns zero, it is possible that calling
+** [sqlite3session_changeset()] on the session handle may still return a
+** changeset that contains no changes. This can happen when a row in
+** an attached table is modified and then later on the original values
+** are restored. However, if this function returns non-zero, then it is
+** guaranteed that a call to sqlite3session_changeset() will return a
+** changeset containing zero changes.
+*/
+SQLITE_API int sqlite3session_isempty(sqlite3_session *pSession);
+
+/*
+** CAPI3REF: Create An Iterator To Traverse A Changeset
+**
+** Create an iterator used to iterate through the contents of a changeset.
+** If successful, *pp is set to point to the iterator handle and SQLITE_OK
+** is returned. Otherwise, if an error occurs, *pp is set to zero and an
+** SQLite error code is returned.
+**
+** The following functions can be used to advance and query a changeset
+** iterator created by this function:
+**
+**
+** - [sqlite3changeset_next()]
+**
- [sqlite3changeset_op()]
+**
- [sqlite3changeset_new()]
+**
- [sqlite3changeset_old()]
+**
+**
+** It is the responsibility of the caller to eventually destroy the iterator
+** by passing it to [sqlite3changeset_finalize()]. The buffer containing the
+** changeset (pChangeset) must remain valid until after the iterator is
+** destroyed.
+**
+** Assuming the changeset blob was created by one of the
+** [sqlite3session_changeset()], [sqlite3changeset_concat()] or
+** [sqlite3changeset_invert()] functions, all changes within the changeset
+** that apply to a single table are grouped together. This means that when
+** an application iterates through a changeset using an iterator created by
+** this function, all changes that relate to a single table are visited
+** consecutively. There is no chance that the iterator will visit a change
+** the applies to table X, then one for table Y, and then later on visit
+** another change for table X.
+*/
+SQLITE_API int sqlite3changeset_start(
+ sqlite3_changeset_iter **pp, /* OUT: New changeset iterator handle */
+ int nChangeset, /* Size of changeset blob in bytes */
+ void *pChangeset /* Pointer to blob containing changeset */
+);
+
+
+/*
+** CAPI3REF: Advance A Changeset Iterator
+**
+** This function may only be used with iterators created by function
+** [sqlite3changeset_start()]. If it is called on an iterator passed to
+** a conflict-handler callback by [sqlite3changeset_apply()], SQLITE_MISUSE
+** is returned and the call has no effect.
+**
+** Immediately after an iterator is created by sqlite3changeset_start(), it
+** does not point to any change in the changeset. Assuming the changeset
+** is not empty, the first call to this function advances the iterator to
+** point to the first change in the changeset. Each subsequent call advances
+** the iterator to point to the next change in the changeset (if any). If
+** no error occurs and the iterator points to a valid change after a call
+** to sqlite3changeset_next() has advanced it, SQLITE_ROW is returned.
+** Otherwise, if all changes in the changeset have already been visited,
+** SQLITE_DONE is returned.
+**
+** If an error occurs, an SQLite error code is returned. Possible error
+** codes include SQLITE_CORRUPT (if the changeset buffer is corrupt) or
+** SQLITE_NOMEM.
+*/
+SQLITE_API int sqlite3changeset_next(sqlite3_changeset_iter *pIter);
+
+/*
+** CAPI3REF: Obtain The Current Operation From A Changeset Iterator
+**
+** The pIter argument passed to this function may either be an iterator
+** passed to a conflict-handler by [sqlite3changeset_apply()], or an iterator
+** created by [sqlite3changeset_start()]. In the latter case, the most recent
+** call to [sqlite3changeset_next()] must have returned [SQLITE_ROW]. If this
+** is not the case, this function returns [SQLITE_MISUSE].
+**
+** If argument pzTab is not NULL, then *pzTab is set to point to a
+** nul-terminated utf-8 encoded string containing the name of the table
+** affected by the current change. The buffer remains valid until either
+** sqlite3changeset_next() is called on the iterator or until the
+** conflict-handler function returns. If pnCol is not NULL, then *pnCol is
+** set to the number of columns in the table affected by the change. If
+** pbIncorrect is not NULL, then *pbIndirect is set to true (1) if the change
+** is an indirect change, or false (0) otherwise. See the documentation for
+** [sqlite3session_indirect()] for a description of direct and indirect
+** changes. Finally, if pOp is not NULL, then *pOp is set to one of
+** [SQLITE_INSERT], [SQLITE_DELETE] or [SQLITE_UPDATE], depending on the
+** type of change that the iterator currently points to.
+**
+** If no error occurs, SQLITE_OK is returned. If an error does occur, an
+** SQLite error code is returned. The values of the output variables may not
+** be trusted in this case.
+*/
+SQLITE_API int sqlite3changeset_op(
+ sqlite3_changeset_iter *pIter, /* Iterator object */
+ const char **pzTab, /* OUT: Pointer to table name */
+ int *pnCol, /* OUT: Number of columns in table */
+ int *pOp, /* OUT: SQLITE_INSERT, DELETE or UPDATE */
+ int *pbIndirect /* OUT: True for an 'indirect' change */
+);
+
+/*
+** CAPI3REF: Obtain The Primary Key Definition Of A Table
+**
+** For each modified table, a changeset includes the following:
+**
+**
+** - The number of columns in the table, and
+**
- Which of those columns make up the tables PRIMARY KEY.
+**
+**
+** This function is used to find which columns comprise the PRIMARY KEY of
+** the table modified by the change that iterator pIter currently points to.
+** If successful, *pabPK is set to point to an array of nCol entries, where
+** nCol is the number of columns in the table. Elements of *pabPK are set to
+** 0x01 if the corresponding column is part of the tables primary key, or
+** 0x00 if it is not.
+**
+** If argument pnCol is not NULL, then *pnCol is set to the number of columns
+** in the table.
+**
+** If this function is called when the iterator does not point to a valid
+** entry, SQLITE_MISUSE is returned and the output variables zeroed. Otherwise,
+** SQLITE_OK is returned and the output variables populated as described
+** above.
+*/
+SQLITE_API int sqlite3changeset_pk(
+ sqlite3_changeset_iter *pIter, /* Iterator object */
+ unsigned char **pabPK, /* OUT: Array of boolean - true for PK cols */
+ int *pnCol /* OUT: Number of entries in output array */
+);
+
+/*
+** CAPI3REF: Obtain old.* Values From A Changeset Iterator
+**
+** The pIter argument passed to this function may either be an iterator
+** passed to a conflict-handler by [sqlite3changeset_apply()], or an iterator
+** created by [sqlite3changeset_start()]. In the latter case, the most recent
+** call to [sqlite3changeset_next()] must have returned SQLITE_ROW.
+** Furthermore, it may only be called if the type of change that the iterator
+** currently points to is either [SQLITE_DELETE] or [SQLITE_UPDATE]. Otherwise,
+** this function returns [SQLITE_MISUSE] and sets *ppValue to NULL.
+**
+** Argument iVal must be greater than or equal to 0, and less than the number
+** of columns in the table affected by the current change. Otherwise,
+** [SQLITE_RANGE] is returned and *ppValue is set to NULL.
+**
+** If successful, this function sets *ppValue to point to a protected
+** sqlite3_value object containing the iVal'th value from the vector of
+** original row values stored as part of the UPDATE or DELETE change and
+** returns SQLITE_OK. The name of the function comes from the fact that this
+** is similar to the "old.*" columns available to update or delete triggers.
+**
+** If some other error occurs (e.g. an OOM condition), an SQLite error code
+** is returned and *ppValue is set to NULL.
+*/
+SQLITE_API int sqlite3changeset_old(
+ sqlite3_changeset_iter *pIter, /* Changeset iterator */
+ int iVal, /* Column number */
+ sqlite3_value **ppValue /* OUT: Old value (or NULL pointer) */
+);
+
+/*
+** CAPI3REF: Obtain new.* Values From A Changeset Iterator
+**
+** The pIter argument passed to this function may either be an iterator
+** passed to a conflict-handler by [sqlite3changeset_apply()], or an iterator
+** created by [sqlite3changeset_start()]. In the latter case, the most recent
+** call to [sqlite3changeset_next()] must have returned SQLITE_ROW.
+** Furthermore, it may only be called if the type of change that the iterator
+** currently points to is either [SQLITE_UPDATE] or [SQLITE_INSERT]. Otherwise,
+** this function returns [SQLITE_MISUSE] and sets *ppValue to NULL.
+**
+** Argument iVal must be greater than or equal to 0, and less than the number
+** of columns in the table affected by the current change. Otherwise,
+** [SQLITE_RANGE] is returned and *ppValue is set to NULL.
+**
+** If successful, this function sets *ppValue to point to a protected
+** sqlite3_value object containing the iVal'th value from the vector of
+** new row values stored as part of the UPDATE or INSERT change and
+** returns SQLITE_OK. If the change is an UPDATE and does not include
+** a new value for the requested column, *ppValue is set to NULL and
+** SQLITE_OK returned. The name of the function comes from the fact that
+** this is similar to the "new.*" columns available to update or delete
+** triggers.
+**
+** If some other error occurs (e.g. an OOM condition), an SQLite error code
+** is returned and *ppValue is set to NULL.
+*/
+SQLITE_API int sqlite3changeset_new(
+ sqlite3_changeset_iter *pIter, /* Changeset iterator */
+ int iVal, /* Column number */
+ sqlite3_value **ppValue /* OUT: New value (or NULL pointer) */
+);
+
+/*
+** CAPI3REF: Obtain Conflicting Row Values From A Changeset Iterator
+**
+** This function should only be used with iterator objects passed to a
+** conflict-handler callback by [sqlite3changeset_apply()] with either
+** [SQLITE_CHANGESET_DATA] or [SQLITE_CHANGESET_CONFLICT]. If this function
+** is called on any other iterator, [SQLITE_MISUSE] is returned and *ppValue
+** is set to NULL.
+**
+** Argument iVal must be greater than or equal to 0, and less than the number
+** of columns in the table affected by the current change. Otherwise,
+** [SQLITE_RANGE] is returned and *ppValue is set to NULL.
+**
+** If successful, this function sets *ppValue to point to a protected
+** sqlite3_value object containing the iVal'th value from the
+** "conflicting row" associated with the current conflict-handler callback
+** and returns SQLITE_OK.
+**
+** If some other error occurs (e.g. an OOM condition), an SQLite error code
+** is returned and *ppValue is set to NULL.
+*/
+SQLITE_API int sqlite3changeset_conflict(
+ sqlite3_changeset_iter *pIter, /* Changeset iterator */
+ int iVal, /* Column number */
+ sqlite3_value **ppValue /* OUT: Value from conflicting row */
+);
+
+/*
+** CAPI3REF: Determine The Number Of Foreign Key Constraint Violations
+**
+** This function may only be called with an iterator passed to an
+** SQLITE_CHANGESET_FOREIGN_KEY conflict handler callback. In this case
+** it sets the output variable to the total number of known foreign key
+** violations in the destination database and returns SQLITE_OK.
+**
+** In all other cases this function returns SQLITE_MISUSE.
+*/
+SQLITE_API int sqlite3changeset_fk_conflicts(
+ sqlite3_changeset_iter *pIter, /* Changeset iterator */
+ int *pnOut /* OUT: Number of FK violations */
+);
+
+
+/*
+** CAPI3REF: Finalize A Changeset Iterator
+**
+** This function is used to finalize an iterator allocated with
+** [sqlite3changeset_start()].
+**
+** This function should only be called on iterators created using the
+** [sqlite3changeset_start()] function. If an application calls this
+** function with an iterator passed to a conflict-handler by
+** [sqlite3changeset_apply()], [SQLITE_MISUSE] is immediately returned and the
+** call has no effect.
+**
+** If an error was encountered within a call to an sqlite3changeset_xxx()
+** function (for example an [SQLITE_CORRUPT] in [sqlite3changeset_next()] or an
+** [SQLITE_NOMEM] in [sqlite3changeset_new()]) then an error code corresponding
+** to that error is returned by this function. Otherwise, SQLITE_OK is
+** returned. This is to allow the following pattern (pseudo-code):
+**
+** sqlite3changeset_start();
+** while( SQLITE_ROW==sqlite3changeset_next() ){
+** // Do something with change.
+** }
+** rc = sqlite3changeset_finalize();
+** if( rc!=SQLITE_OK ){
+** // An error has occurred
+** }
+*/
+SQLITE_API int sqlite3changeset_finalize(sqlite3_changeset_iter *pIter);
+
+/*
+** CAPI3REF: Invert A Changeset
+**
+** This function is used to "invert" a changeset object. Applying an inverted
+** changeset to a database reverses the effects of applying the uninverted
+** changeset. Specifically:
+**
+**
+** - Each DELETE change is changed to an INSERT, and
+**
- Each INSERT change is changed to a DELETE, and
+**
- For each UPDATE change, the old.* and new.* values are exchanged.
+**
+**
+** This function does not change the order in which changes appear within
+** the changeset. It merely reverses the sense of each individual change.
+**
+** If successful, a pointer to a buffer containing the inverted changeset
+** is stored in *ppOut, the size of the same buffer is stored in *pnOut, and
+** SQLITE_OK is returned. If an error occurs, both *pnOut and *ppOut are
+** zeroed and an SQLite error code returned.
+**
+** It is the responsibility of the caller to eventually call sqlite3_free()
+** on the *ppOut pointer to free the buffer allocation following a successful
+** call to this function.
+**
+** WARNING/TODO: This function currently assumes that the input is a valid
+** changeset. If it is not, the results are undefined.
+*/
+SQLITE_API int sqlite3changeset_invert(
+ int nIn, const void *pIn, /* Input changeset */
+ int *pnOut, void **ppOut /* OUT: Inverse of input */
+);
+
+/*
+** CAPI3REF: Concatenate Two Changeset Objects
+**
+** This function is used to concatenate two changesets, A and B, into a
+** single changeset. The result is a changeset equivalent to applying
+** changeset A followed by changeset B.
+**
+** This function combines the two input changesets using an
+** sqlite3_changegroup object. Calling it produces similar results as the
+** following code fragment:
+**
+** sqlite3_changegroup *pGrp;
+** rc = sqlite3_changegroup_new(&pGrp);
+** if( rc==SQLITE_OK ) rc = sqlite3changegroup_add(pGrp, nA, pA);
+** if( rc==SQLITE_OK ) rc = sqlite3changegroup_add(pGrp, nB, pB);
+** if( rc==SQLITE_OK ){
+** rc = sqlite3changegroup_output(pGrp, pnOut, ppOut);
+** }else{
+** *ppOut = 0;
+** *pnOut = 0;
+** }
+**
+** Refer to the sqlite3_changegroup documentation below for details.
+*/
+SQLITE_API int sqlite3changeset_concat(
+ int nA, /* Number of bytes in buffer pA */
+ void *pA, /* Pointer to buffer containing changeset A */
+ int nB, /* Number of bytes in buffer pB */
+ void *pB, /* Pointer to buffer containing changeset B */
+ int *pnOut, /* OUT: Number of bytes in output changeset */
+ void **ppOut /* OUT: Buffer containing output changeset */
+);
+
+
+/*
+** CAPI3REF: Changegroup Handle
+*/
+typedef struct sqlite3_changegroup sqlite3_changegroup;
+
+/*
+** CAPI3REF: Create A New Changegroup Object
+**
+** An sqlite3_changegroup object is used to combine two or more changesets
+** (or patchsets) into a single changeset (or patchset). A single changegroup
+** object may combine changesets or patchsets, but not both. The output is
+** always in the same format as the input.
+**
+** If successful, this function returns SQLITE_OK and populates (*pp) with
+** a pointer to a new sqlite3_changegroup object before returning. The caller
+** should eventually free the returned object using a call to
+** sqlite3changegroup_delete(). If an error occurs, an SQLite error code
+** (i.e. SQLITE_NOMEM) is returned and *pp is set to NULL.
+**
+** The usual usage pattern for an sqlite3_changegroup object is as follows:
+**
+**
+** - It is created using a call to sqlite3changegroup_new().
+**
+**
- Zero or more changesets (or patchsets) are added to the object
+** by calling sqlite3changegroup_add().
+**
+**
- The result of combining all input changesets together is obtained
+** by the application via a call to sqlite3changegroup_output().
+**
+**
- The object is deleted using a call to sqlite3changegroup_delete().
+**
+**
+** Any number of calls to add() and output() may be made between the calls to
+** new() and delete(), and in any order.
+**
+** As well as the regular sqlite3changegroup_add() and
+** sqlite3changegroup_output() functions, also available are the streaming
+** versions sqlite3changegroup_add_strm() and sqlite3changegroup_output_strm().
+*/
+SQLITE_API int sqlite3changegroup_new(sqlite3_changegroup **pp);
+
+/*
+** CAPI3REF: Add A Changeset To A Changegroup
+**
+** Add all changes within the changeset (or patchset) in buffer pData (size
+** nData bytes) to the changegroup.
+**
+** If the buffer contains a patchset, then all prior calls to this function
+** on the same changegroup object must also have specified patchsets. Or, if
+** the buffer contains a changeset, so must have the earlier calls to this
+** function. Otherwise, SQLITE_ERROR is returned and no changes are added
+** to the changegroup.
+**
+** Rows within the changeset and changegroup are identified by the values in
+** their PRIMARY KEY columns. A change in the changeset is considered to
+** apply to the same row as a change already present in the changegroup if
+** the two rows have the same primary key.
+**
+** Changes to rows that do not already appear in the changegroup are
+** simply copied into it. Or, if both the new changeset and the changegroup
+** contain changes that apply to a single row, the final contents of the
+** changegroup depends on the type of each change, as follows:
+**
+**
+** | Existing Change |
+** New Change |
+** Output Change
+** |
|---|
| INSERT | INSERT |
+** The new change is ignored. This case does not occur if the new
+** changeset was recorded immediately after the changesets already
+** added to the changegroup.
+** |
| INSERT | UPDATE |
+** The INSERT change remains in the changegroup. The values in the
+** INSERT change are modified as if the row was inserted by the
+** existing change and then updated according to the new change.
+** |
| INSERT | DELETE |
+** The existing INSERT is removed from the changegroup. The DELETE is
+** not added.
+** |
| UPDATE | INSERT |
+** The new change is ignored. This case does not occur if the new
+** changeset was recorded immediately after the changesets already
+** added to the changegroup.
+** |
| UPDATE | UPDATE |
+** The existing UPDATE remains within the changegroup. It is amended
+** so that the accompanying values are as if the row was updated once
+** by the existing change and then again by the new change.
+** |
| UPDATE | DELETE |
+** The existing UPDATE is replaced by the new DELETE within the
+** changegroup.
+** |
| DELETE | INSERT |
+** If one or more of the column values in the row inserted by the
+** new change differ from those in the row deleted by the existing
+** change, the existing DELETE is replaced by an UPDATE within the
+** changegroup. Otherwise, if the inserted row is exactly the same
+** as the deleted row, the existing DELETE is simply discarded.
+** |
| DELETE | UPDATE |
+** The new change is ignored. This case does not occur if the new
+** changeset was recorded immediately after the changesets already
+** added to the changegroup.
+** |
| DELETE | DELETE |
+** The new change is ignored. This case does not occur if the new
+** changeset was recorded immediately after the changesets already
+** added to the changegroup.
+** |
+**
+** If the new changeset contains changes to a table that is already present
+** in the changegroup, then the number of columns and the position of the
+** primary key columns for the table must be consistent. If this is not the
+** case, this function fails with SQLITE_SCHEMA. If the input changeset
+** appears to be corrupt and the corruption is detected, SQLITE_CORRUPT is
+** returned. Or, if an out-of-memory condition occurs during processing, this
+** function returns SQLITE_NOMEM. In all cases, if an error occurs the
+** final contents of the changegroup is undefined.
+**
+** If no error occurs, SQLITE_OK is returned.
+*/
+SQLITE_API int sqlite3changegroup_add(sqlite3_changegroup*, int nData, void *pData);
+
+/*
+** CAPI3REF: Obtain A Composite Changeset From A Changegroup
+**
+** Obtain a buffer containing a changeset (or patchset) representing the
+** current contents of the changegroup. If the inputs to the changegroup
+** were themselves changesets, the output is a changeset. Or, if the
+** inputs were patchsets, the output is also a patchset.
+**
+** As with the output of the sqlite3session_changeset() and
+** sqlite3session_patchset() functions, all changes related to a single
+** table are grouped together in the output of this function. Tables appear
+** in the same order as for the very first changeset added to the changegroup.
+** If the second or subsequent changesets added to the changegroup contain
+** changes for tables that do not appear in the first changeset, they are
+** appended onto the end of the output changeset, again in the order in
+** which they are first encountered.
+**
+** If an error occurs, an SQLite error code is returned and the output
+** variables (*pnData) and (*ppData) are set to 0. Otherwise, SQLITE_OK
+** is returned and the output variables are set to the size of and a
+** pointer to the output buffer, respectively. In this case it is the
+** responsibility of the caller to eventually free the buffer using a
+** call to sqlite3_free().
+*/
+SQLITE_API int sqlite3changegroup_output(
+ sqlite3_changegroup*,
+ int *pnData, /* OUT: Size of output buffer in bytes */
+ void **ppData /* OUT: Pointer to output buffer */
+);
+
+/*
+** CAPI3REF: Delete A Changegroup Object
+*/
+SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup*);
+
+/*
+** CAPI3REF: Apply A Changeset To A Database
+**
+** Apply a changeset to a database. This function attempts to update the
+** "main" database attached to handle db with the changes found in the
+** changeset passed via the second and third arguments.
+**
+** The fourth argument (xFilter) passed to this function is the "filter
+** callback". If it is not NULL, then for each table affected by at least one
+** change in the changeset, the filter callback is invoked with
+** the table name as the second argument, and a copy of the context pointer
+** passed as the sixth argument to this function as the first. If the "filter
+** callback" returns zero, then no attempt is made to apply any changes to
+** the table. Otherwise, if the return value is non-zero or the xFilter
+** argument to this function is NULL, all changes related to the table are
+** attempted.
+**
+** For each table that is not excluded by the filter callback, this function
+** tests that the target database contains a compatible table. A table is
+** considered compatible if all of the following are true:
+**
+**
+** - The table has the same name as the name recorded in the
+** changeset, and
+**
- The table has at least as many columns as recorded in the
+** changeset, and
+**
- The table has primary key columns in the same position as
+** recorded in the changeset.
+**
+**
+** If there is no compatible table, it is not an error, but none of the
+** changes associated with the table are applied. A warning message is issued
+** via the sqlite3_log() mechanism with the error code SQLITE_SCHEMA. At most
+** one such warning is issued for each table in the changeset.
+**
+** For each change for which there is a compatible table, an attempt is made
+** to modify the table contents according to the UPDATE, INSERT or DELETE
+** change. If a change cannot be applied cleanly, the conflict handler
+** function passed as the fifth argument to sqlite3changeset_apply() may be
+** invoked. A description of exactly when the conflict handler is invoked for
+** each type of change is below.
+**
+** Unlike the xFilter argument, xConflict may not be passed NULL. The results
+** of passing anything other than a valid function pointer as the xConflict
+** argument are undefined.
+**
+** Each time the conflict handler function is invoked, it must return one
+** of [SQLITE_CHANGESET_OMIT], [SQLITE_CHANGESET_ABORT] or
+** [SQLITE_CHANGESET_REPLACE]. SQLITE_CHANGESET_REPLACE may only be returned
+** if the second argument passed to the conflict handler is either
+** SQLITE_CHANGESET_DATA or SQLITE_CHANGESET_CONFLICT. If the conflict-handler
+** returns an illegal value, any changes already made are rolled back and
+** the call to sqlite3changeset_apply() returns SQLITE_MISUSE. Different
+** actions are taken by sqlite3changeset_apply() depending on the value
+** returned by each invocation of the conflict-handler function. Refer to
+** the documentation for the three
+** [SQLITE_CHANGESET_OMIT|available return values] for details.
+**
+**
+** - DELETE Changes
-
+** For each DELETE change, this function checks if the target database
+** contains a row with the same primary key value (or values) as the
+** original row values stored in the changeset. If it does, and the values
+** stored in all non-primary key columns also match the values stored in
+** the changeset the row is deleted from the target database.
+**
+** If a row with matching primary key values is found, but one or more of
+** the non-primary key fields contains a value different from the original
+** row value stored in the changeset, the conflict-handler function is
+** invoked with [SQLITE_CHANGESET_DATA] as the second argument. If the
+** database table has more columns than are recorded in the changeset,
+** only the values of those non-primary key fields are compared against
+** the current database contents - any trailing database table columns
+** are ignored.
+**
+** If no row with matching primary key values is found in the database,
+** the conflict-handler function is invoked with [SQLITE_CHANGESET_NOTFOUND]
+** passed as the second argument.
+**
+** If the DELETE operation is attempted, but SQLite returns SQLITE_CONSTRAINT
+** (which can only happen if a foreign key constraint is violated), the
+** conflict-handler function is invoked with [SQLITE_CHANGESET_CONSTRAINT]
+** passed as the second argument. This includes the case where the DELETE
+** operation is attempted because an earlier call to the conflict handler
+** function returned [SQLITE_CHANGESET_REPLACE].
+**
+**
- INSERT Changes
-
+** For each INSERT change, an attempt is made to insert the new row into
+** the database. If the changeset row contains fewer fields than the
+** database table, the trailing fields are populated with their default
+** values.
+**
+** If the attempt to insert the row fails because the database already
+** contains a row with the same primary key values, the conflict handler
+** function is invoked with the second argument set to
+** [SQLITE_CHANGESET_CONFLICT].
+**
+** If the attempt to insert the row fails because of some other constraint
+** violation (e.g. NOT NULL or UNIQUE), the conflict handler function is
+** invoked with the second argument set to [SQLITE_CHANGESET_CONSTRAINT].
+** This includes the case where the INSERT operation is re-attempted because
+** an earlier call to the conflict handler function returned
+** [SQLITE_CHANGESET_REPLACE].
+**
+**
- UPDATE Changes
-
+** For each UPDATE change, this function checks if the target database
+** contains a row with the same primary key value (or values) as the
+** original row values stored in the changeset. If it does, and the values
+** stored in all modified non-primary key columns also match the values
+** stored in the changeset the row is updated within the target database.
+**
+** If a row with matching primary key values is found, but one or more of
+** the modified non-primary key fields contains a value different from an
+** original row value stored in the changeset, the conflict-handler function
+** is invoked with [SQLITE_CHANGESET_DATA] as the second argument. Since
+** UPDATE changes only contain values for non-primary key fields that are
+** to be modified, only those fields need to match the original values to
+** avoid the SQLITE_CHANGESET_DATA conflict-handler callback.
+**
+** If no row with matching primary key values is found in the database,
+** the conflict-handler function is invoked with [SQLITE_CHANGESET_NOTFOUND]
+** passed as the second argument.
+**
+** If the UPDATE operation is attempted, but SQLite returns
+** SQLITE_CONSTRAINT, the conflict-handler function is invoked with
+** [SQLITE_CHANGESET_CONSTRAINT] passed as the second argument.
+** This includes the case where the UPDATE operation is attempted after
+** an earlier call to the conflict handler function returned
+** [SQLITE_CHANGESET_REPLACE].
+**
+**
+** It is safe to execute SQL statements, including those that write to the
+** table that the callback related to, from within the xConflict callback.
+** This can be used to further customize the applications conflict
+** resolution strategy.
+**
+** All changes made by this function are enclosed in a savepoint transaction.
+** If any other error (aside from a constraint failure when attempting to
+** write to the target database) occurs, then the savepoint transaction is
+** rolled back, restoring the target database to its original state, and an
+** SQLite error code returned.
+*/
+SQLITE_API int sqlite3changeset_apply(
+ sqlite3 *db, /* Apply change to "main" db of this handle */
+ int nChangeset, /* Size of changeset in bytes */
+ void *pChangeset, /* Changeset blob */
+ int(*xFilter)(
+ void *pCtx, /* Copy of sixth arg to _apply() */
+ const char *zTab /* Table name */
+ ),
+ int(*xConflict)(
+ void *pCtx, /* Copy of sixth arg to _apply() */
+ int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */
+ sqlite3_changeset_iter *p /* Handle describing change and conflict */
+ ),
+ void *pCtx /* First argument passed to xConflict */
+);
+
+/*
+** CAPI3REF: Constants Passed To The Conflict Handler
+**
+** Values that may be passed as the second argument to a conflict-handler.
+**
+**
+** - SQLITE_CHANGESET_DATA
-
+** The conflict handler is invoked with CHANGESET_DATA as the second argument
+** when processing a DELETE or UPDATE change if a row with the required
+** PRIMARY KEY fields is present in the database, but one or more other
+** (non primary-key) fields modified by the update do not contain the
+** expected "before" values.
+**
+** The conflicting row, in this case, is the database row with the matching
+** primary key.
+**
+**
- SQLITE_CHANGESET_NOTFOUND
-
+** The conflict handler is invoked with CHANGESET_NOTFOUND as the second
+** argument when processing a DELETE or UPDATE change if a row with the
+** required PRIMARY KEY fields is not present in the database.
+**
+** There is no conflicting row in this case. The results of invoking the
+** sqlite3changeset_conflict() API are undefined.
+**
+**
- SQLITE_CHANGESET_CONFLICT
-
+** CHANGESET_CONFLICT is passed as the second argument to the conflict
+** handler while processing an INSERT change if the operation would result
+** in duplicate primary key values.
+**
+** The conflicting row in this case is the database row with the matching
+** primary key.
+**
+**
- SQLITE_CHANGESET_FOREIGN_KEY
-
+** If foreign key handling is enabled, and applying a changeset leaves the
+** database in a state containing foreign key violations, the conflict
+** handler is invoked with CHANGESET_FOREIGN_KEY as the second argument
+** exactly once before the changeset is committed. If the conflict handler
+** returns CHANGESET_OMIT, the changes, including those that caused the
+** foreign key constraint violation, are committed. Or, if it returns
+** CHANGESET_ABORT, the changeset is rolled back.
+**
+** No current or conflicting row information is provided. The only function
+** it is possible to call on the supplied sqlite3_changeset_iter handle
+** is sqlite3changeset_fk_conflicts().
+**
+**
- SQLITE_CHANGESET_CONSTRAINT
-
+** If any other constraint violation occurs while applying a change (i.e.
+** a UNIQUE, CHECK or NOT NULL constraint), the conflict handler is
+** invoked with CHANGESET_CONSTRAINT as the second argument.
+**
+** There is no conflicting row in this case. The results of invoking the
+** sqlite3changeset_conflict() API are undefined.
+**
+**
+*/
+#define SQLITE_CHANGESET_DATA 1
+#define SQLITE_CHANGESET_NOTFOUND 2
+#define SQLITE_CHANGESET_CONFLICT 3
+#define SQLITE_CHANGESET_CONSTRAINT 4
+#define SQLITE_CHANGESET_FOREIGN_KEY 5
+
+/*
+** CAPI3REF: Constants Returned By The Conflict Handler
+**
+** A conflict handler callback must return one of the following three values.
+**
+**
+** - SQLITE_CHANGESET_OMIT
-
+** If a conflict handler returns this value no special action is taken. The
+** change that caused the conflict is not applied. The session module
+** continues to the next change in the changeset.
+**
+**
- SQLITE_CHANGESET_REPLACE
-
+** This value may only be returned if the second argument to the conflict
+** handler was SQLITE_CHANGESET_DATA or SQLITE_CHANGESET_CONFLICT. If this
+** is not the case, any changes applied so far are rolled back and the
+** call to sqlite3changeset_apply() returns SQLITE_MISUSE.
+**
+** If CHANGESET_REPLACE is returned by an SQLITE_CHANGESET_DATA conflict
+** handler, then the conflicting row is either updated or deleted, depending
+** on the type of change.
+**
+** If CHANGESET_REPLACE is returned by an SQLITE_CHANGESET_CONFLICT conflict
+** handler, then the conflicting row is removed from the database and a
+** second attempt to apply the change is made. If this second attempt fails,
+** the original row is restored to the database before continuing.
+**
+**
- SQLITE_CHANGESET_ABORT
-
+** If this value is returned, any changes applied so far are rolled back
+** and the call to sqlite3changeset_apply() returns SQLITE_ABORT.
+**
+*/
+#define SQLITE_CHANGESET_OMIT 0
+#define SQLITE_CHANGESET_REPLACE 1
+#define SQLITE_CHANGESET_ABORT 2
+
+/*
+** CAPI3REF: Streaming Versions of API functions.
+**
+** The six streaming API xxx_strm() functions serve similar purposes to the
+** corresponding non-streaming API functions:
+**
+**
+** | Streaming function | Non-streaming equivalent |
+**
|---|
| sqlite3changeset_apply_strm | [sqlite3changeset_apply]
+** |
| sqlite3changeset_concat_strm | [sqlite3changeset_concat]
+** |
| sqlite3changeset_invert_strm | [sqlite3changeset_invert]
+** |
| sqlite3changeset_start_strm | [sqlite3changeset_start]
+** |
| sqlite3session_changeset_strm | [sqlite3session_changeset]
+** |
| sqlite3session_patchset_strm | [sqlite3session_patchset]
+** |
+**
+** Non-streaming functions that accept changesets (or patchsets) as input
+** require that the entire changeset be stored in a single buffer in memory.
+** Similarly, those that return a changeset or patchset do so by returning
+** a pointer to a single large buffer allocated using sqlite3_malloc().
+** Normally this is convenient. However, if an application running in a
+** low-memory environment is required to handle very large changesets, the
+** large contiguous memory allocations required can become onerous.
+**
+** In order to avoid this problem, instead of a single large buffer, input
+** is passed to a streaming API functions by way of a callback function that
+** the sessions module invokes to incrementally request input data as it is
+** required. In all cases, a pair of API function parameters such as
+**
+**
+** int nChangeset,
+** void *pChangeset,
+**
+**
+** Is replaced by:
+**
+**
+** int (*xInput)(void *pIn, void *pData, int *pnData),
+** void *pIn,
+**
+**
+** Each time the xInput callback is invoked by the sessions module, the first
+** argument passed is a copy of the supplied pIn context pointer. The second
+** argument, pData, points to a buffer (*pnData) bytes in size. Assuming no
+** error occurs the xInput method should copy up to (*pnData) bytes of data
+** into the buffer and set (*pnData) to the actual number of bytes copied
+** before returning SQLITE_OK. If the input is completely exhausted, (*pnData)
+** should be set to zero to indicate this. Or, if an error occurs, an SQLite
+** error code should be returned. In all cases, if an xInput callback returns
+** an error, all processing is abandoned and the streaming API function
+** returns a copy of the error code to the caller.
+**
+** In the case of sqlite3changeset_start_strm(), the xInput callback may be
+** invoked by the sessions module at any point during the lifetime of the
+** iterator. If such an xInput callback returns an error, the iterator enters
+** an error state, whereby all subsequent calls to iterator functions
+** immediately fail with the same error code as returned by xInput.
+**
+** Similarly, streaming API functions that return changesets (or patchsets)
+** return them in chunks by way of a callback function instead of via a
+** pointer to a single large buffer. In this case, a pair of parameters such
+** as:
+**
+**
+** int *pnChangeset,
+** void **ppChangeset,
+**
+**
+** Is replaced by:
+**
+**
+** int (*xOutput)(void *pOut, const void *pData, int nData),
+** void *pOut
+**
+**
+** The xOutput callback is invoked zero or more times to return data to
+** the application. The first parameter passed to each call is a copy of the
+** pOut pointer supplied by the application. The second parameter, pData,
+** points to a buffer nData bytes in size containing the chunk of output
+** data being returned. If the xOutput callback successfully processes the
+** supplied data, it should return SQLITE_OK to indicate success. Otherwise,
+** it should return some other SQLite error code. In this case processing
+** is immediately abandoned and the streaming API function returns a copy
+** of the xOutput error code to the application.
+**
+** The sessions module never invokes an xOutput callback with the third
+** parameter set to a value less than or equal to zero. Other than this,
+** no guarantees are made as to the size of the chunks of data returned.
+*/
+SQLITE_API int sqlite3changeset_apply_strm(
+ sqlite3 *db, /* Apply change to "main" db of this handle */
+ int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */
+ void *pIn, /* First arg for xInput */
+ int(*xFilter)(
+ void *pCtx, /* Copy of sixth arg to _apply() */
+ const char *zTab /* Table name */
+ ),
+ int(*xConflict)(
+ void *pCtx, /* Copy of sixth arg to _apply() */
+ int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */
+ sqlite3_changeset_iter *p /* Handle describing change and conflict */
+ ),
+ void *pCtx /* First argument passed to xConflict */
+);
+SQLITE_API int sqlite3changeset_concat_strm(
+ int (*xInputA)(void *pIn, void *pData, int *pnData),
+ void *pInA,
+ int (*xInputB)(void *pIn, void *pData, int *pnData),
+ void *pInB,
+ int (*xOutput)(void *pOut, const void *pData, int nData),
+ void *pOut
+);
+SQLITE_API int sqlite3changeset_invert_strm(
+ int (*xInput)(void *pIn, void *pData, int *pnData),
+ void *pIn,
+ int (*xOutput)(void *pOut, const void *pData, int nData),
+ void *pOut
+);
+SQLITE_API int sqlite3changeset_start_strm(
+ sqlite3_changeset_iter **pp,
+ int (*xInput)(void *pIn, void *pData, int *pnData),
+ void *pIn
+);
+SQLITE_API int sqlite3session_changeset_strm(
+ sqlite3_session *pSession,
+ int (*xOutput)(void *pOut, const void *pData, int nData),
+ void *pOut
+);
+SQLITE_API int sqlite3session_patchset_strm(
+ sqlite3_session *pSession,
+ int (*xOutput)(void *pOut, const void *pData, int nData),
+ void *pOut
+);
+SQLITE_API int sqlite3changegroup_add_strm(sqlite3_changegroup*,
+ int (*xInput)(void *pIn, void *pData, int *pnData),
+ void *pIn
+);
+SQLITE_API int sqlite3changegroup_output_strm(sqlite3_changegroup*,
+ int (*xOutput)(void *pOut, const void *pData, int nData),
+ void *pOut
+);
+
+
+/*
+** Make sure we can call this stuff from C++.
+*/
+#if 0
+}
+#endif
+
+#endif /* !defined(__SQLITESESSION_H_) && defined(SQLITE_ENABLE_SESSION) */
+
+/******** End of sqlite3session.h *********/
+/******** Begin file fts5.h *********/
/*
** 2014 May 31
**
@@ -8409,6 +11255,9 @@ struct Fts5PhraseIter {
** an OOM condition or IO error), an appropriate SQLite error code is
** returned.
**
+** This function may be quite inefficient if used with an FTS5 table
+** created with the "columnsize=0" option.
+**
** xColumnText:
** This function attempts to retrieve the text of column iCol of the
** current document. If successful, (*pz) is set to point to a buffer
@@ -8429,15 +11278,29 @@ struct Fts5PhraseIter {
** the query within the current row. Return SQLITE_OK if successful, or
** an error code (i.e. SQLITE_NOMEM) if an error occurs.
**
+** This API can be quite slow if used with an FTS5 table created with the
+** "detail=none" or "detail=column" option. If the FTS5 table is created
+** with either "detail=none" or "detail=column" and "content=" option
+** (i.e. if it is a contentless table), then this API always returns 0.
+**
** xInst:
** Query for the details of phrase match iIdx within the current row.
** Phrase matches are numbered starting from zero, so the iIdx argument
** should be greater than or equal to zero and smaller than the value
** output by xInstCount().
**
+** Usually, output parameter *piPhrase is set to the phrase number, *piCol
+** to the column in which it occurs and *piOff the token offset of the
+** first token of the phrase. The exception is if the table was created
+** with the offsets=0 option specified. In this case *piOff is always
+** set to -1.
+**
** Returns SQLITE_OK if successful, or an error code (i.e. SQLITE_NOMEM)
** if an error occurs.
**
+** This API can be quite slow if used with an FTS5 table created with the
+** "detail=none" or "detail=column" option.
+**
** xRowid:
** Returns the rowid of the current row.
**
@@ -8451,11 +11314,13 @@ struct Fts5PhraseIter {
** ... FROM ftstable WHERE ftstable MATCH $p ORDER BY rowid
**
** with $p set to a phrase equivalent to the phrase iPhrase of the
-** current query is executed. For each row visited, the callback function
-** passed as the fourth argument is invoked. The context and API objects
-** passed to the callback function may be used to access the properties of
-** each matched row. Invoking Api.xUserData() returns a copy of the pointer
-** passed as the third argument to pUserData.
+** current query is executed. Any column filter that applies to
+** phrase iPhrase of the current query is included in $p. For each
+** row visited, the callback function passed as the fourth argument
+** is invoked. The context and API objects passed to the callback
+** function may be used to access the properties of each matched row.
+** Invoking Api.xUserData() returns a copy of the pointer passed as
+** the third argument to pUserData.
**
** If the callback function returns any value other than SQLITE_OK, the
** query is abandoned and the xQueryPhrase function returns immediately.
@@ -8521,7 +11386,7 @@ struct Fts5PhraseIter {
** Fts5PhraseIter iter;
** int iCol, iOff;
** for(pApi->xPhraseFirst(pFts, iPhrase, &iter, &iCol, &iOff);
-** iOff>=0;
+** iCol>=0;
** pApi->xPhraseNext(pFts, &iter, &iCol, &iOff)
** ){
** // An instance of phrase iPhrase at offset iOff of column iCol
@@ -8529,13 +11394,51 @@ struct Fts5PhraseIter {
**
** The Fts5PhraseIter structure is defined above. Applications should not
** modify this structure directly - it should only be used as shown above
-** with the xPhraseFirst() and xPhraseNext() API methods.
+** with the xPhraseFirst() and xPhraseNext() API methods (and by
+** xPhraseFirstColumn() and xPhraseNextColumn() as illustrated below).
+**
+** This API can be quite slow if used with an FTS5 table created with the
+** "detail=none" or "detail=column" option. If the FTS5 table is created
+** with either "detail=none" or "detail=column" and "content=" option
+** (i.e. if it is a contentless table), then this API always iterates
+** through an empty set (all calls to xPhraseFirst() set iCol to -1).
**
** xPhraseNext()
** See xPhraseFirst above.
+**
+** xPhraseFirstColumn()
+** This function and xPhraseNextColumn() are similar to the xPhraseFirst()
+** and xPhraseNext() APIs described above. The difference is that instead
+** of iterating through all instances of a phrase in the current row, these
+** APIs are used to iterate through the set of columns in the current row
+** that contain one or more instances of a specified phrase. For example:
+**
+** Fts5PhraseIter iter;
+** int iCol;
+** for(pApi->xPhraseFirstColumn(pFts, iPhrase, &iter, &iCol);
+** iCol>=0;
+** pApi->xPhraseNextColumn(pFts, &iter, &iCol)
+** ){
+** // Column iCol contains at least one instance of phrase iPhrase
+** }
+**
+** This API can be quite slow if used with an FTS5 table created with the
+** "detail=none" option. If the FTS5 table is created with either
+** "detail=none" "content=" option (i.e. if it is a contentless table),
+** then this API always iterates through an empty set (all calls to
+** xPhraseFirstColumn() set iCol to -1).
+**
+** The information accessed using this API and its companion
+** xPhraseFirstColumn() may also be obtained using xPhraseFirst/xPhraseNext
+** (or xInst/xInstCount). The chief advantage of this API is that it is
+** significantly more efficient than those alternatives when used with
+** "detail=column" tables.
+**
+** xPhraseNextColumn()
+** See xPhraseFirstColumn above.
*/
struct Fts5ExtensionApi {
- int iVersion; /* Currently always set to 1 */
+ int iVersion; /* Currently always set to 3 */
void *(*xUserData)(Fts5Context*);
@@ -8565,8 +11468,11 @@ struct Fts5ExtensionApi {
int (*xSetAuxdata)(Fts5Context*, void *pAux, void(*xDelete)(void*));
void *(*xGetAuxdata)(Fts5Context*, int bClear);
- void (*xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*, int*);
+ int (*xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*, int*);
void (*xPhraseNext)(Fts5Context*, Fts5PhraseIter*, int *piCol, int *piOff);
+
+ int (*xPhraseFirstColumn)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*);
+ void (*xPhraseNextColumn)(Fts5Context*, Fts5PhraseIter*, int *piCol);
};
/*
@@ -8583,7 +11489,7 @@ struct Fts5ExtensionApi {
** behaviour. The structure methods are expected to function as follows:
**
** xCreate:
-** This function is used to allocate and inititalize a tokenizer instance.
+** This function is used to allocate and initialize a tokenizer instance.
** A tokenizer instance is required to actually tokenize text.
**
** The first argument passed to this function is a copy of the (void*)
@@ -8843,7 +11749,7 @@ struct fts5_api {
#endif /* _FTS5_H */
-
+/******** End of fts5.h *********/
/************** End of sqlite3.h *********************************************/
/************** Continuing where we left off in sqliteInt.h ******************/
@@ -8852,8 +11758,9 @@ struct fts5_api {
** Include the configuration header output by 'configure' if we're using the
** autoconf-based build
*/
-#ifdef _HAVE_SQLITE_CONFIG_H
-#include "config.h"
+#if defined(_HAVE_SQLITE_CONFIG_H) && !defined(SQLITECONFIG_H)
+/* #include "config.h" */
+#define SQLITECONFIG_H 1
#endif
/************** Include sqliteLimit.h in the middle of sqliteInt.h ***********/
@@ -8947,7 +11854,7 @@ struct fts5_api {
** Not currently enforced.
*/
#ifndef SQLITE_MAX_VDBE_OP
-# define SQLITE_MAX_VDBE_OP 25000
+# define SQLITE_MAX_VDBE_OP 250000000
#endif
/*
@@ -8961,13 +11868,13 @@ struct fts5_api {
** The suggested maximum number of in-memory pages to use for
** the main database table and for temporary tables.
**
-** IMPLEMENTATION-OF: R-31093-59126 The default suggested cache size
-** is 2000 pages.
+** IMPLEMENTATION-OF: R-30185-15359 The default suggested cache size is -2000,
+** which means the cache size is limited to 2048000 bytes of memory.
** IMPLEMENTATION-OF: R-48205-43578 The default suggested cache size can be
** altered using the SQLITE_DEFAULT_CACHE_SIZE compile-time options.
*/
#ifndef SQLITE_DEFAULT_CACHE_SIZE
-# define SQLITE_DEFAULT_CACHE_SIZE 2000
+# define SQLITE_DEFAULT_CACHE_SIZE -2000
#endif
/*
@@ -8980,8 +11887,9 @@ struct fts5_api {
/*
** The maximum number of attached databases. This must be between 0
-** and 62. The upper bound on 62 is because a 64-bit integer bitmap
-** is used internally to track attached databases.
+** and 125. The upper bound of 125 is because the attached databases are
+** counted using a signed 8-bit integer which has a maximum value of 127
+** and we have to allow 2 extra counts for the "main" and "temp" databases.
*/
#ifndef SQLITE_MAX_ATTACHED
# define SQLITE_MAX_ATTACHED 10
@@ -9016,7 +11924,7 @@ struct fts5_api {
** The default size of a database page.
*/
#ifndef SQLITE_DEFAULT_PAGE_SIZE
-# define SQLITE_DEFAULT_PAGE_SIZE 1024
+# define SQLITE_DEFAULT_PAGE_SIZE 4096
#endif
#if SQLITE_DEFAULT_PAGE_SIZE>SQLITE_MAX_PAGE_SIZE
# undef SQLITE_DEFAULT_PAGE_SIZE
@@ -9097,7 +12005,7 @@ struct fts5_api {
** to the next, so we have developed the following set of #if statements
** to generate appropriate macros for a wide range of compilers.
**
-** The correct "ANSI" way to do this is to use the intptr_t type.
+** The correct "ANSI" way to do this is to use the intptr_t type.
** Unfortunately, that typedef is not available on all compilers, or
** if it is available, it requires an #include of specific headers
** that vary from one machine to the next.
@@ -9121,21 +12029,6 @@ struct fts5_api {
# define SQLITE_PTR_TO_INT(X) ((int)(X))
#endif
-/*
-** The SQLITE_WITHIN(P,S,E) macro checks to see if pointer P points to
-** something between S (inclusive) and E (exclusive).
-**
-** In other words, S is a buffer and E is a pointer to the first byte after
-** the end of buffer S. This macro returns true if P points to something
-** contained within the buffer S.
-*/
-#if defined(HAVE_STDINT_H)
-# define SQLITE_WITHIN(P,S,E) \
- ((uintptr_t)(P)>=(uintptr_t)(S) && (uintptr_t)(P)<(uintptr_t)(E))
-#else
-# define SQLITE_WITHIN(P,S,E) ((P)>=(S) && (P)<(E))
-#endif
-
/*
** A macro to hint to the compiler that a function should not be
** inlined.
@@ -9154,11 +12047,12 @@ struct fts5_api {
** the SQLITE_DISABLE_INTRINSIC define.
*/
#if !defined(SQLITE_DISABLE_INTRINSIC)
-# if defined(_MSC_VER) && _MSC_VER>=1300
+# if defined(_MSC_VER) && _MSC_VER>=1400
# if !defined(_WIN32_WCE)
# include
# pragma intrinsic(_byteswap_ushort)
# pragma intrinsic(_byteswap_ulong)
+# pragma intrinsic(_byteswap_uint64)
# pragma intrinsic(_ReadWriteBarrier)
# else
# include
@@ -9176,6 +12070,11 @@ struct fts5_api {
**
** Older versions of SQLite used an optional THREADSAFE macro.
** We support that for legacy.
+**
+** To ensure that the correct value of "THREADSAFE" is reported when querying
+** for compile-time options at runtime (e.g. "PRAGMA compile_options"), this
+** logic is partially replicated in ctime.c. If it is updated here, it should
+** also be updated there.
*/
#if !defined(SQLITE_THREADSAFE)
# if defined(THREADSAFE)
@@ -9264,7 +12163,7 @@ struct fts5_api {
** is set. Thus NDEBUG becomes an opt-in rather than an opt-out
** feature.
*/
-#if !defined(NDEBUG) && !defined(SQLITE_DEBUG)
+#if !defined(NDEBUG) && !defined(SQLITE_DEBUG)
# define NDEBUG 1
#endif
#if defined(NDEBUG) && defined(SQLITE_DEBUG)
@@ -9279,7 +12178,7 @@ struct fts5_api {
#endif
/*
-** The testcase() macro is used to aid in coverage testing. When
+** The testcase() macro is used to aid in coverage testing. When
** doing coverage testing, the condition inside the argument to
** testcase() must be evaluated both true and false in order to
** get full branch coverage. The testcase() macro is inserted
@@ -9325,7 +12224,7 @@ SQLITE_PRIVATE void sqlite3Coverage(int);
#endif
/*
-** The ALWAYS and NEVER macros surround boolean expressions which
+** The ALWAYS and NEVER macros surround boolean expressions which
** are intended to always be true or false, respectively. Such
** expressions could be omitted from the code completely. But they
** are included in a few cases in order to enhance the resilience
@@ -9339,7 +12238,7 @@ SQLITE_PRIVATE void sqlite3Coverage(int);
** be true and false so that the unreachable code they specify will
** not be counted as untested code.
*/
-#if defined(SQLITE_COVERAGE_TEST)
+#if defined(SQLITE_COVERAGE_TEST) || defined(SQLITE_MUTATION_TEST)
# define ALWAYS(X) (1)
# define NEVER(X) (0)
#elif !defined(NDEBUG)
@@ -9350,6 +12249,36 @@ SQLITE_PRIVATE void sqlite3Coverage(int);
# define NEVER(X) (X)
#endif
+/*
+** Some conditionals are optimizations only. In other words, if the
+** conditionals are replaced with a constant 1 (true) or 0 (false) then
+** the correct answer is still obtained, though perhaps not as quickly.
+**
+** The following macros mark these optimizations conditionals.
+*/
+#if defined(SQLITE_MUTATION_TEST)
+# define OK_IF_ALWAYS_TRUE(X) (1)
+# define OK_IF_ALWAYS_FALSE(X) (0)
+#else
+# define OK_IF_ALWAYS_TRUE(X) (X)
+# define OK_IF_ALWAYS_FALSE(X) (X)
+#endif
+
+/*
+** Some malloc failures are only possible if SQLITE_TEST_REALLOC_STRESS is
+** defined. We need to defend against those failures when testing with
+** SQLITE_TEST_REALLOC_STRESS, but we don't want the unreachable branches
+** during a normal build. The following macro can be used to disable tests
+** that are always false except when SQLITE_TEST_REALLOC_STRESS is set.
+*/
+#if defined(SQLITE_TEST_REALLOC_STRESS)
+# define ONLY_IF_REALLOC_STRESS(X) (X)
+#elif !defined(NDEBUG)
+# define ONLY_IF_REALLOC_STRESS(X) ((X)?(assert(0),1):0)
+#else
+# define ONLY_IF_REALLOC_STRESS(X) (0)
+#endif
+
/*
** Declarations used for tracing the operating system interfaces.
*/
@@ -9376,6 +12305,13 @@ SQLITE_PRIVATE void sqlite3Coverage(int);
# undef SQLITE_NEED_ERR_NAME
#endif
+/*
+** SQLITE_ENABLE_EXPLAIN_COMMENTS is incompatible with SQLITE_OMIT_EXPLAIN
+*/
+#ifdef SQLITE_OMIT_EXPLAIN
+# undef SQLITE_ENABLE_EXPLAIN_COMMENTS
+#endif
+
/*
** Return true (non-zero) if the input is an integer that is too large
** to fit in 32-bits. This macro is used inside of various testcase()
@@ -9409,8 +12345,8 @@ SQLITE_PRIVATE void sqlite3Coverage(int);
** This is the header file for the generic hash-table implementation
** used in SQLite.
*/
-#ifndef _SQLITE_HASH_H_
-#define _SQLITE_HASH_H_
+#ifndef SQLITE_HASH_H
+#define SQLITE_HASH_H
/* Forward declarations of structures. */
typedef struct Hash Hash;
@@ -9490,7 +12426,7 @@ SQLITE_PRIVATE void sqlite3HashClear(Hash*);
*/
/* #define sqliteHashCount(H) ((H)->count) // NOT USED */
-#endif /* _SQLITE_HASH_H_ */
+#endif /* SQLITE_HASH_H */
/************** End of hash.h ************************************************/
/************** Continuing where we left off in sqliteInt.h ******************/
@@ -9522,76 +12458,76 @@ SQLITE_PRIVATE void sqlite3HashClear(Hash*);
#define TK_AS 24
#define TK_WITHOUT 25
#define TK_COMMA 26
-#define TK_ID 27
-#define TK_INDEXED 28
-#define TK_ABORT 29
-#define TK_ACTION 30
-#define TK_AFTER 31
-#define TK_ANALYZE 32
-#define TK_ASC 33
-#define TK_ATTACH 34
-#define TK_BEFORE 35
-#define TK_BY 36
-#define TK_CASCADE 37
-#define TK_CAST 38
-#define TK_COLUMNKW 39
-#define TK_CONFLICT 40
-#define TK_DATABASE 41
-#define TK_DESC 42
-#define TK_DETACH 43
-#define TK_EACH 44
-#define TK_FAIL 45
-#define TK_FOR 46
-#define TK_IGNORE 47
-#define TK_INITIALLY 48
-#define TK_INSTEAD 49
-#define TK_LIKE_KW 50
-#define TK_MATCH 51
-#define TK_NO 52
-#define TK_KEY 53
-#define TK_OF 54
-#define TK_OFFSET 55
-#define TK_PRAGMA 56
-#define TK_RAISE 57
-#define TK_RECURSIVE 58
-#define TK_REPLACE 59
-#define TK_RESTRICT 60
-#define TK_ROW 61
-#define TK_TRIGGER 62
-#define TK_VACUUM 63
-#define TK_VIEW 64
-#define TK_VIRTUAL 65
-#define TK_WITH 66
-#define TK_REINDEX 67
-#define TK_RENAME 68
-#define TK_CTIME_KW 69
-#define TK_ANY 70
-#define TK_OR 71
-#define TK_AND 72
-#define TK_IS 73
-#define TK_BETWEEN 74
-#define TK_IN 75
-#define TK_ISNULL 76
-#define TK_NOTNULL 77
-#define TK_NE 78
-#define TK_EQ 79
-#define TK_GT 80
-#define TK_LE 81
-#define TK_LT 82
-#define TK_GE 83
-#define TK_ESCAPE 84
-#define TK_BITAND 85
-#define TK_BITOR 86
-#define TK_LSHIFT 87
-#define TK_RSHIFT 88
-#define TK_PLUS 89
-#define TK_MINUS 90
-#define TK_STAR 91
-#define TK_SLASH 92
-#define TK_REM 93
-#define TK_CONCAT 94
-#define TK_COLLATE 95
-#define TK_BITNOT 96
+#define TK_ABORT 27
+#define TK_ACTION 28
+#define TK_AFTER 29
+#define TK_ANALYZE 30
+#define TK_ASC 31
+#define TK_ATTACH 32
+#define TK_BEFORE 33
+#define TK_BY 34
+#define TK_CASCADE 35
+#define TK_CAST 36
+#define TK_CONFLICT 37
+#define TK_DATABASE 38
+#define TK_DESC 39
+#define TK_DETACH 40
+#define TK_EACH 41
+#define TK_FAIL 42
+#define TK_OR 43
+#define TK_AND 44
+#define TK_IS 45
+#define TK_MATCH 46
+#define TK_LIKE_KW 47
+#define TK_BETWEEN 48
+#define TK_IN 49
+#define TK_ISNULL 50
+#define TK_NOTNULL 51
+#define TK_NE 52
+#define TK_EQ 53
+#define TK_GT 54
+#define TK_LE 55
+#define TK_LT 56
+#define TK_GE 57
+#define TK_ESCAPE 58
+#define TK_ID 59
+#define TK_COLUMNKW 60
+#define TK_FOR 61
+#define TK_IGNORE 62
+#define TK_INITIALLY 63
+#define TK_INSTEAD 64
+#define TK_NO 65
+#define TK_KEY 66
+#define TK_OF 67
+#define TK_OFFSET 68
+#define TK_PRAGMA 69
+#define TK_RAISE 70
+#define TK_RECURSIVE 71
+#define TK_REPLACE 72
+#define TK_RESTRICT 73
+#define TK_ROW 74
+#define TK_TRIGGER 75
+#define TK_VACUUM 76
+#define TK_VIEW 77
+#define TK_VIRTUAL 78
+#define TK_WITH 79
+#define TK_REINDEX 80
+#define TK_RENAME 81
+#define TK_CTIME_KW 82
+#define TK_ANY 83
+#define TK_BITAND 84
+#define TK_BITOR 85
+#define TK_LSHIFT 86
+#define TK_RSHIFT 87
+#define TK_PLUS 88
+#define TK_MINUS 89
+#define TK_STAR 90
+#define TK_SLASH 91
+#define TK_REM 92
+#define TK_CONCAT 93
+#define TK_COLLATE 94
+#define TK_BITNOT 95
+#define TK_INDEXED 96
#define TK_STRING 97
#define TK_JOIN_KW 98
#define TK_CONSTRAINT 99
@@ -9627,9 +12563,9 @@ SQLITE_PRIVATE void sqlite3HashClear(Hash*);
#define TK_LIMIT 129
#define TK_WHERE 130
#define TK_INTO 131
-#define TK_INTEGER 132
-#define TK_FLOAT 133
-#define TK_BLOB 134
+#define TK_FLOAT 132
+#define TK_BLOB 133
+#define TK_INTEGER 134
#define TK_VARIABLE 135
#define TK_CASE 136
#define TK_WHEN 137
@@ -9638,24 +12574,23 @@ SQLITE_PRIVATE void sqlite3HashClear(Hash*);
#define TK_INDEX 140
#define TK_ALTER 141
#define TK_ADD 142
-#define TK_TO_TEXT 143
-#define TK_TO_BLOB 144
-#define TK_TO_NUMERIC 145
-#define TK_TO_INT 146
-#define TK_TO_REAL 147
-#define TK_ISNOT 148
-#define TK_END_OF_FILE 149
-#define TK_UNCLOSED_STRING 150
-#define TK_FUNCTION 151
-#define TK_COLUMN 152
-#define TK_AGG_FUNCTION 153
-#define TK_AGG_COLUMN 154
-#define TK_UMINUS 155
-#define TK_UPLUS 156
-#define TK_REGISTER 157
-#define TK_ASTERISK 158
-#define TK_SPACE 159
-#define TK_ILLEGAL 160
+#define TK_ISNOT 143
+#define TK_FUNCTION 144
+#define TK_COLUMN 145
+#define TK_AGG_FUNCTION 146
+#define TK_AGG_COLUMN 147
+#define TK_UMINUS 148
+#define TK_UPLUS 149
+#define TK_REGISTER 150
+#define TK_VECTOR 151
+#define TK_SELECT_COLUMN 152
+#define TK_IF_NULL_ROW 153
+#define TK_ASTERISK 154
+#define TK_SPAN 155
+#define TK_END_OF_FILE 156
+#define TK_UNCLOSED_STRING 157
+#define TK_SPACE 158
+#define TK_ILLEGAL 159
/* The token codes above must all fit in 8 bits */
#define TKFLG_MASK 0xff
@@ -9672,6 +12607,18 @@ SQLITE_PRIVATE void sqlite3HashClear(Hash*);
#include
#include
+/*
+** Use a macro to replace memcpy() if compiled with SQLITE_INLINE_MEMCPY.
+** This allows better measurements of where memcpy() is used when running
+** cachegrind. But this macro version of memcpy() is very slow so it
+** should not be used in production. This is a performance measurement
+** hack only.
+*/
+#ifdef SQLITE_INLINE_MEMCPY
+# define memcpy(D,S,N) {char*xxd=(char*)(D);const char*xxs=(const char*)(S);\
+ int xxn=(N);while(xxn-->0)*(xxd++)=*(xxs++);}
+#endif
+
/*
** If compiling for a processor that lacks floating point support,
** substitute integer for floating-point
@@ -9694,7 +12641,7 @@ SQLITE_PRIVATE void sqlite3HashClear(Hash*);
/*
** OMIT_TEMPDB is set to 1 if SQLITE_OMIT_TEMPDB is defined, or 0
-** afterward. Having this macro allows us to cause the C compiler
+** afterward. Having this macro allows us to cause the C compiler
** to omit code used by TEMP tables without messy #ifndef statements.
*/
#ifdef SQLITE_OMIT_TEMPDB
@@ -9728,12 +12675,11 @@ SQLITE_PRIVATE void sqlite3HashClear(Hash*);
*/
#ifndef SQLITE_TEMP_STORE
# define SQLITE_TEMP_STORE 1
-# define SQLITE_TEMP_STORE_xc 1 /* Exclude from ctime.c */
#endif
/*
** If no value has been provided for SQLITE_MAX_WORKER_THREADS, or if
-** SQLITE_TEMP_STORE is set to 3 (never use temporary files), set it
+** SQLITE_TEMP_STORE is set to 3 (never use temporary files), set it
** to zero.
*/
#if SQLITE_TEMP_STORE==3 || SQLITE_THREADSAFE==0
@@ -9756,9 +12702,21 @@ SQLITE_PRIVATE void sqlite3HashClear(Hash*);
** pagecaches for each database connection. A positive number is the
** number of pages. A negative number N translations means that a buffer
** of -1024*N bytes is allocated and used for as many pages as it will hold.
+**
+** The default value of "20" was choosen to minimize the run-time of the
+** speedtest1 test program with options: --shrink-memory --reprepare
*/
#ifndef SQLITE_DEFAULT_PCACHE_INITSZ
-# define SQLITE_DEFAULT_PCACHE_INITSZ 100
+# define SQLITE_DEFAULT_PCACHE_INITSZ 20
+#endif
+
+/*
+** The compile-time options SQLITE_MMAP_READWRITE and
+** SQLITE_ENABLE_BATCH_ATOMIC_WRITE are not compatible with one another.
+** You must choose one or the other (or neither) but not both.
+*/
+#if defined(SQLITE_MMAP_READWRITE) && defined(SQLITE_ENABLE_BATCH_ATOMIC_WRITE)
+#error Cannot use both SQLITE_MMAP_READWRITE and SQLITE_ENABLE_BATCH_ATOMIC_WRITE
#endif
/*
@@ -9772,8 +12730,12 @@ SQLITE_PRIVATE void sqlite3HashClear(Hash*);
/*
** Macros to compute minimum and maximum of two numbers.
*/
-#define MIN(A,B) ((A)<(B)?(A):(B))
-#define MAX(A,B) ((A)>(B)?(A):(B))
+#ifndef MIN
+# define MIN(A,B) ((A)<(B)?(A):(B))
+#endif
+#ifndef MAX
+# define MAX(A,B) ((A)>(B)?(A):(B))
+#endif
/*
** Swap two objects of type TYPE.
@@ -9881,7 +12843,7 @@ typedef INT8_TYPE i8; /* 1-byte signed integer */
** 4 -> 20 1000 -> 99 1048576 -> 200
** 10 -> 33 1024 -> 100 4294967296 -> 320
**
-** The LogEst can be negative to indicate fractional values.
+** The LogEst can be negative to indicate fractional values.
** Examples:
**
** 0.5 -> -10 0.1 -> -33 0.0625 -> -40
@@ -9902,38 +12864,62 @@ typedef INT16_TYPE LogEst;
# endif
#endif
+/* The uptr type is an unsigned integer large enough to hold a pointer
+*/
+#if defined(HAVE_STDINT_H)
+ typedef uintptr_t uptr;
+#elif SQLITE_PTRSIZE==4
+ typedef u32 uptr;
+#else
+ typedef u64 uptr;
+#endif
+
+/*
+** The SQLITE_WITHIN(P,S,E) macro checks to see if pointer P points to
+** something between S (inclusive) and E (exclusive).
+**
+** In other words, S is a buffer and E is a pointer to the first byte after
+** the end of buffer S. This macro returns true if P points to something
+** contained within the buffer S.
+*/
+#define SQLITE_WITHIN(P,S,E) (((uptr)(P)>=(uptr)(S))&&((uptr)(P)<(uptr)(E)))
+
+
/*
** Macros to determine whether the machine is big or little endian,
** and whether or not that determination is run-time or compile-time.
**
** For best performance, an attempt is made to guess at the byte-order
** using C-preprocessor macros. If that is unsuccessful, or if
-** -DSQLITE_RUNTIME_BYTEORDER=1 is set, then byte-order is determined
+** -DSQLITE_BYTEORDER=0 is set, then byte-order is determined
** at run-time.
*/
-#if (defined(i386) || defined(__i386__) || defined(_M_IX86) || \
+#ifndef SQLITE_BYTEORDER
+# if defined(i386) || defined(__i386__) || defined(_M_IX86) || \
defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \
defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \
- defined(__arm__)) && !defined(SQLITE_RUNTIME_BYTEORDER)
-# define SQLITE_BYTEORDER 1234
-# define SQLITE_BIGENDIAN 0
-# define SQLITE_LITTLEENDIAN 1
-# define SQLITE_UTF16NATIVE SQLITE_UTF16LE
+ defined(__arm__)
+# define SQLITE_BYTEORDER 1234
+# elif defined(sparc) || defined(__ppc__)
+# define SQLITE_BYTEORDER 4321
+# else
+# define SQLITE_BYTEORDER 0
+# endif
#endif
-#if (defined(sparc) || defined(__ppc__)) \
- && !defined(SQLITE_RUNTIME_BYTEORDER)
-# define SQLITE_BYTEORDER 4321
+#if SQLITE_BYTEORDER==4321
# define SQLITE_BIGENDIAN 1
# define SQLITE_LITTLEENDIAN 0
# define SQLITE_UTF16NATIVE SQLITE_UTF16BE
-#endif
-#if !defined(SQLITE_BYTEORDER)
+#elif SQLITE_BYTEORDER==1234
+# define SQLITE_BIGENDIAN 0
+# define SQLITE_LITTLEENDIAN 1
+# define SQLITE_UTF16NATIVE SQLITE_UTF16LE
+#else
# ifdef SQLITE_AMALGAMATION
const int sqlite3one = 1;
# else
extern const int sqlite3one;
# endif
-# define SQLITE_BYTEORDER 0 /* 0 means "unknown at compile-time" */
# define SQLITE_BIGENDIAN (*(char *)(&sqlite3one)==0)
# define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1)
# define SQLITE_UTF16NATIVE (SQLITE_BIGENDIAN?SQLITE_UTF16BE:SQLITE_UTF16LE)
@@ -9947,7 +12933,7 @@ typedef INT16_TYPE LogEst;
#define LARGEST_INT64 (0xffffffff|(((i64)0x7fffffff)<<32))
#define SMALLEST_INT64 (((i64)-1) - LARGEST_INT64)
-/*
+/*
** Round up a number to the next larger multiple of 8. This is used
** to force 8-byte alignment on 64-bit architectures.
*/
@@ -9986,10 +12972,6 @@ typedef INT16_TYPE LogEst;
*/
#ifdef __APPLE__
# include
-# if TARGET_OS_IPHONE
-# undef SQLITE_MAX_MMAP_SIZE
-# define SQLITE_MAX_MMAP_SIZE 0
-# endif
#endif
#ifndef SQLITE_MAX_MMAP_SIZE
# if defined(__linux__) \
@@ -10002,7 +12984,6 @@ typedef INT16_TYPE LogEst;
# else
# define SQLITE_MAX_MMAP_SIZE 0
# endif
-# define SQLITE_MAX_MMAP_SIZE_xc 1 /* exclude from ctime.c */
#endif
/*
@@ -10012,7 +12993,6 @@ typedef INT16_TYPE LogEst;
*/
#ifndef SQLITE_DEFAULT_MMAP_SIZE
# define SQLITE_DEFAULT_MMAP_SIZE 0
-# define SQLITE_DEFAULT_MMAP_SIZE_xc 1 /* Exclude from ctime.c */
#endif
#if SQLITE_DEFAULT_MMAP_SIZE>SQLITE_MAX_MMAP_SIZE
# undef SQLITE_DEFAULT_MMAP_SIZE
@@ -10037,7 +13017,7 @@ typedef INT16_TYPE LogEst;
** SELECTTRACE_ENABLED will be either 1 or 0 depending on whether or not
** the Select query generator tracing logic is turned on.
*/
-#if defined(SQLITE_DEBUG) || defined(SQLITE_ENABLE_SELECTTRACE)
+#if defined(SQLITE_ENABLE_SELECTTRACE)
# define SELECTTRACE_ENABLED 1
#else
# define SELECTTRACE_ENABLED 0
@@ -10045,7 +13025,7 @@ typedef INT16_TYPE LogEst;
/*
** An instance of the following structure is used to store the busy-handler
-** callback for a given sqlite handle.
+** callback for a given sqlite handle.
**
** The sqlite.busyHandler member of the sqlite struct contains the busy
** callback for the database handle. Each pager opened via the sqlite
@@ -10090,9 +13070,9 @@ struct BusyHandler {
/*
** The following value as a destructor means to use sqlite3DbFree().
-** The sqlite3DbFree() routine requires two parameters instead of the
-** one parameter that destructors normally want. So we have to introduce
-** this magic value that the code knows to handle differently. Any
+** The sqlite3DbFree() routine requires two parameters instead of the
+** one parameter that destructors normally want. So we have to introduce
+** this magic value that the code knows to handle differently. Any
** pointer will work here as long as it is distinct from SQLITE_STATIC
** and SQLITE_TRANSIENT.
*/
@@ -10116,19 +13096,19 @@ struct BusyHandler {
#define SQLITE_WSD const
#define GLOBAL(t,v) (*(t*)sqlite3_wsd_find((void*)&(v), sizeof(v)))
#define sqlite3GlobalConfig GLOBAL(struct Sqlite3Config, sqlite3Config)
-SQLITE_API int SQLITE_STDCALL sqlite3_wsd_init(int N, int J);
-SQLITE_API void *SQLITE_STDCALL sqlite3_wsd_find(void *K, int L);
+SQLITE_API int sqlite3_wsd_init(int N, int J);
+SQLITE_API void *sqlite3_wsd_find(void *K, int L);
#else
- #define SQLITE_WSD
+ #define SQLITE_WSD
#define GLOBAL(t,v) v
#define sqlite3GlobalConfig sqlite3Config
#endif
/*
** The following macros are used to suppress compiler warnings and to
-** make it clear to human readers when a function parameter is deliberately
+** make it clear to human readers when a function parameter is deliberately
** left unused within the body of a function. This usually happens when
-** a function is called via a function pointer. For example the
+** a function is called via a function pointer. For example the
** implementation of an SQL aggregate step callback may not use the
** parameter indicating the number of arguments passed to the aggregate,
** if it knows that this is enforced elsewhere.
@@ -10171,6 +13151,7 @@ typedef struct LookasideSlot LookasideSlot;
typedef struct Module Module;
typedef struct NameContext NameContext;
typedef struct Parse Parse;
+typedef struct PreUpdate PreUpdate;
typedef struct PrintfArguments PrintfArguments;
typedef struct RowSet RowSet;
typedef struct Savepoint Savepoint;
@@ -10193,8 +13174,16 @@ typedef struct Walker Walker;
typedef struct WhereInfo WhereInfo;
typedef struct With With;
+/* A VList object records a mapping between parameters/variables/wildcards
+** in the SQL statement (such as $abc, @pqr, or :xyz) and the integer
+** variable number associated with that parameter. See the format description
+** on the sqlite3VListAdd() routine for more information. A VList is really
+** just an array of integers.
+*/
+typedef int VList;
+
/*
-** Defer sourcing vdbe.h and btree.h until after the "u8" and
+** Defer sourcing vdbe.h and btree.h until after the "u8" and
** "BusyHandler" typedefs. vdbe.h also requires a few of the opaque
** pointer types (i.e. FuncDef) defined above.
*/
@@ -10215,8 +13204,8 @@ typedef struct With With;
** subsystem. See comments in the source code for a detailed description
** of what each interface routine does.
*/
-#ifndef _BTREE_H_
-#define _BTREE_H_
+#ifndef SQLITE_BTREE_H
+#define SQLITE_BTREE_H
/* TODO: This definition is just included so other modules compile. It
** needs to be revisited.
@@ -10241,6 +13230,7 @@ typedef struct With With;
typedef struct Btree Btree;
typedef struct BtCursor BtCursor;
typedef struct BtShared BtShared;
+typedef struct BtreePayload BtreePayload;
SQLITE_PRIVATE int sqlite3BtreeOpen(
@@ -10270,7 +13260,6 @@ SQLITE_PRIVATE int sqlite3BtreeSetSpillSize(Btree*,int);
SQLITE_PRIVATE int sqlite3BtreeSetMmapLimit(Btree*,sqlite3_int64);
#endif
SQLITE_PRIVATE int sqlite3BtreeSetPagerFlags(Btree*,unsigned);
-SQLITE_PRIVATE int sqlite3BtreeSyncDisabled(Btree*);
SQLITE_PRIVATE int sqlite3BtreeSetPageSize(Btree *p, int nPagesize, int nReserve, int eFix);
SQLITE_PRIVATE int sqlite3BtreeGetPageSize(Btree*);
SQLITE_PRIVATE int sqlite3BtreeMaxPageCount(Btree*,int);
@@ -10292,7 +13281,9 @@ SQLITE_PRIVATE int sqlite3BtreeIsInReadTrans(Btree*);
SQLITE_PRIVATE int sqlite3BtreeIsInBackup(Btree*);
SQLITE_PRIVATE void *sqlite3BtreeSchema(Btree *, int, void(*)(void *));
SQLITE_PRIVATE int sqlite3BtreeSchemaLocked(Btree *pBtree);
+#ifndef SQLITE_OMIT_SHARED_CACHE
SQLITE_PRIVATE int sqlite3BtreeLockTable(Btree *pBtree, int iTab, u8 isWriteLock);
+#endif
SQLITE_PRIVATE int sqlite3BtreeSavepoint(Btree *, int, int);
SQLITE_PRIVATE const char *sqlite3BtreeGetFilename(Btree *);
@@ -10401,14 +13392,24 @@ SQLITE_PRIVATE int sqlite3BtreeNewDb(Btree *p);
** Flags passed as the third argument to sqlite3BtreeCursor().
**
** For read-only cursors the wrFlag argument is always zero. For read-write
-** cursors it may be set to either (BTREE_WRCSR|BTREE_FORDELETE) or
-** (BTREE_WRCSR). If the BTREE_FORDELETE flag is set, then the cursor will
+** cursors it may be set to either (BTREE_WRCSR|BTREE_FORDELETE) or just
+** (BTREE_WRCSR). If the BTREE_FORDELETE bit is set, then the cursor will
** only be used by SQLite for the following:
**
-** * to seek to and delete specific entries, and/or
+** * to seek to and then delete specific entries, and/or
**
** * to read values that will be used to create keys that other
** BTREE_FORDELETE cursors will seek to and delete.
+**
+** The BTREE_FORDELETE flag is an optimization hint. It is not used by
+** by this, the native b-tree engine of SQLite, but it is available to
+** alternative storage engines that might be substituted in place of this
+** b-tree system. For alternative storage engines in which a delete of
+** the main table row automatically deletes corresponding index rows,
+** the FORDELETE flag hint allows those alternative storage engines to
+** skip a lot of work. Namely: FORDELETE cursors may treat all SEEK
+** and DELETE operations as no-ops, and any READ operation against a
+** FORDELETE cursor may return a null row: 0x01 0x00.
*/
#define BTREE_WRCSR 0x00000004 /* read-write cursor */
#define BTREE_FORDELETE 0x00000008 /* Cursor is for seek/delete only */
@@ -10420,6 +13421,7 @@ SQLITE_PRIVATE int sqlite3BtreeCursor(
struct KeyInfo*, /* First argument to compare function */
BtCursor *pCursor /* Space to write cursor structure */
);
+SQLITE_PRIVATE BtCursor *sqlite3BtreeFakeValidCursor(void);
SQLITE_PRIVATE int sqlite3BtreeCursorSize(void);
SQLITE_PRIVATE void sqlite3BtreeCursorZero(BtCursor*);
SQLITE_PRIVATE void sqlite3BtreeCursorHintFlags(BtCursor*, unsigned);
@@ -10437,27 +13439,62 @@ SQLITE_PRIVATE int sqlite3BtreeMovetoUnpacked(
);
SQLITE_PRIVATE int sqlite3BtreeCursorHasMoved(BtCursor*);
SQLITE_PRIVATE int sqlite3BtreeCursorRestore(BtCursor*, int*);
-SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor*, int);
-SQLITE_PRIVATE int sqlite3BtreeInsert(BtCursor*, const void *pKey, i64 nKey,
- const void *pData, int nData,
- int nZero, int bias, int seekResult);
+SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor*, u8 flags);
+
+/* Allowed flags for sqlite3BtreeDelete() and sqlite3BtreeInsert() */
+#define BTREE_SAVEPOSITION 0x02 /* Leave cursor pointing at NEXT or PREV */
+#define BTREE_AUXDELETE 0x04 /* not the primary delete operation */
+#define BTREE_APPEND 0x08 /* Insert is likely an append */
+
+/* An instance of the BtreePayload object describes the content of a single
+** entry in either an index or table btree.
+**
+** Index btrees (used for indexes and also WITHOUT ROWID tables) contain
+** an arbitrary key and no data. These btrees have pKey,nKey set to their
+** key and pData,nData,nZero set to zero.
+**
+** Table btrees (used for rowid tables) contain an integer rowid used as
+** the key and passed in the nKey field. The pKey field is zero.
+** pData,nData hold the content of the new entry. nZero extra zero bytes
+** are appended to the end of the content when constructing the entry.
+**
+** This object is used to pass information into sqlite3BtreeInsert(). The
+** same information used to be passed as five separate parameters. But placing
+** the information into this object helps to keep the interface more
+** organized and understandable, and it also helps the resulting code to
+** run a little faster by using fewer registers for parameter passing.
+*/
+struct BtreePayload {
+ const void *pKey; /* Key content for indexes. NULL for tables */
+ sqlite3_int64 nKey; /* Size of pKey for indexes. PRIMARY KEY for tabs */
+ const void *pData; /* Data for tables. NULL for indexes */
+ sqlite3_value *aMem; /* First of nMem value in the unpacked pKey */
+ u16 nMem; /* Number of aMem[] value. Might be zero */
+ int nData; /* Size of pData. 0 if none. */
+ int nZero; /* Extra zero data appended after pData,nData */
+};
+
+SQLITE_PRIVATE int sqlite3BtreeInsert(BtCursor*, const BtreePayload *pPayload,
+ int flags, int seekResult);
SQLITE_PRIVATE int sqlite3BtreeFirst(BtCursor*, int *pRes);
SQLITE_PRIVATE int sqlite3BtreeLast(BtCursor*, int *pRes);
-SQLITE_PRIVATE int sqlite3BtreeNext(BtCursor*, int *pRes);
+SQLITE_PRIVATE int sqlite3BtreeNext(BtCursor*, int flags);
SQLITE_PRIVATE int sqlite3BtreeEof(BtCursor*);
-SQLITE_PRIVATE int sqlite3BtreePrevious(BtCursor*, int *pRes);
-SQLITE_PRIVATE int sqlite3BtreeKeySize(BtCursor*, i64 *pSize);
-SQLITE_PRIVATE int sqlite3BtreeKey(BtCursor*, u32 offset, u32 amt, void*);
-SQLITE_PRIVATE const void *sqlite3BtreeKeyFetch(BtCursor*, u32 *pAmt);
-SQLITE_PRIVATE const void *sqlite3BtreeDataFetch(BtCursor*, u32 *pAmt);
-SQLITE_PRIVATE int sqlite3BtreeDataSize(BtCursor*, u32 *pSize);
-SQLITE_PRIVATE int sqlite3BtreeData(BtCursor*, u32 offset, u32 amt, void*);
+SQLITE_PRIVATE int sqlite3BtreePrevious(BtCursor*, int flags);
+SQLITE_PRIVATE i64 sqlite3BtreeIntegerKey(BtCursor*);
+SQLITE_PRIVATE int sqlite3BtreePayload(BtCursor*, u32 offset, u32 amt, void*);
+SQLITE_PRIVATE const void *sqlite3BtreePayloadFetch(BtCursor*, u32 *pAmt);
+SQLITE_PRIVATE u32 sqlite3BtreePayloadSize(BtCursor*);
SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck(Btree*, int *aRoot, int nRoot, int, int*);
SQLITE_PRIVATE struct Pager *sqlite3BtreePager(Btree*);
+SQLITE_PRIVATE i64 sqlite3BtreeRowCountEst(BtCursor*);
+#ifndef SQLITE_OMIT_INCRBLOB
+SQLITE_PRIVATE int sqlite3BtreePayloadChecked(BtCursor*, u32 offset, u32 amt, void*);
SQLITE_PRIVATE int sqlite3BtreePutData(BtCursor*, u32 offset, u32 amt, void*);
SQLITE_PRIVATE void sqlite3BtreeIncrblobCursor(BtCursor *);
+#endif
SQLITE_PRIVATE void sqlite3BtreeClearCursor(BtCursor *);
SQLITE_PRIVATE int sqlite3BtreeSetVersion(Btree *pBt, int iVersion);
SQLITE_PRIVATE int sqlite3BtreeCursorHasHint(BtCursor*, unsigned int mask);
@@ -10467,6 +13504,7 @@ SQLITE_PRIVATE int sqlite3HeaderSizeBtree(void);
#ifndef NDEBUG
SQLITE_PRIVATE int sqlite3BtreeCursorIsValid(BtCursor*);
#endif
+SQLITE_PRIVATE int sqlite3BtreeCursorIsValidNN(BtCursor*);
#ifndef SQLITE_OMIT_BTREECOUNT
SQLITE_PRIVATE int sqlite3BtreeCount(BtCursor *, i64 *);
@@ -10489,15 +13527,19 @@ SQLITE_PRIVATE int sqlite3BtreeCheckpoint(Btree*, int, int *, int *);
#ifndef SQLITE_OMIT_SHARED_CACHE
SQLITE_PRIVATE void sqlite3BtreeEnter(Btree*);
SQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3*);
+SQLITE_PRIVATE int sqlite3BtreeSharable(Btree*);
+SQLITE_PRIVATE void sqlite3BtreeEnterCursor(BtCursor*);
+SQLITE_PRIVATE int sqlite3BtreeConnectionCount(Btree*);
#else
# define sqlite3BtreeEnter(X)
# define sqlite3BtreeEnterAll(X)
+# define sqlite3BtreeSharable(X) 0
+# define sqlite3BtreeEnterCursor(X)
+# define sqlite3BtreeConnectionCount(X) 1
#endif
#if !defined(SQLITE_OMIT_SHARED_CACHE) && SQLITE_THREADSAFE
-SQLITE_PRIVATE int sqlite3BtreeSharable(Btree*);
SQLITE_PRIVATE void sqlite3BtreeLeave(Btree*);
-SQLITE_PRIVATE void sqlite3BtreeEnterCursor(BtCursor*);
SQLITE_PRIVATE void sqlite3BtreeLeaveCursor(BtCursor*);
SQLITE_PRIVATE void sqlite3BtreeLeaveAll(sqlite3*);
#ifndef NDEBUG
@@ -10508,9 +13550,7 @@ SQLITE_PRIVATE int sqlite3SchemaMutexHeld(sqlite3*,int,Schema*);
#endif
#else
-# define sqlite3BtreeSharable(X) 0
# define sqlite3BtreeLeave(X)
-# define sqlite3BtreeEnterCursor(X)
# define sqlite3BtreeLeaveCursor(X)
# define sqlite3BtreeLeaveAll(X)
@@ -10520,7 +13560,7 @@ SQLITE_PRIVATE int sqlite3SchemaMutexHeld(sqlite3*,int,Schema*);
#endif
-#endif /* _BTREE_H_ */
+#endif /* SQLITE_BTREE_H */
/************** End of btree.h ***********************************************/
/************** Continuing where we left off in sqliteInt.h ******************/
@@ -10543,8 +13583,8 @@ SQLITE_PRIVATE int sqlite3SchemaMutexHeld(sqlite3*,int,Schema*);
** or VDBE. The VDBE implements an abstract machine that runs a
** simple program to access and modify the underlying database.
*/
-#ifndef _SQLITE_VDBE_H_
-#define _SQLITE_VDBE_H_
+#ifndef SQLITE_VDBE_H
+#define SQLITE_VDBE_H
/* #include */
/*
@@ -10558,7 +13598,7 @@ typedef struct Vdbe Vdbe;
** The names of the following types declared in vdbeInt.h are required
** for the VdbeOp definition.
*/
-typedef struct Mem Mem;
+typedef struct sqlite3_value Mem;
typedef struct SubProgram SubProgram;
/*
@@ -10569,8 +13609,7 @@ typedef struct SubProgram SubProgram;
struct VdbeOp {
u8 opcode; /* What operation to perform */
signed char p4type; /* One of the P4_xxx constants for p4 */
- u8 opflags; /* Mask of the OPFLG_* flags in opcodes.h */
- u8 p5; /* Fifth parameter is an unsigned character */
+ u16 p5; /* Fifth parameter is an unsigned 16-bit integer */
int p1; /* First operand */
int p2; /* Second parameter (often the jump destination) */
int p3; /* The third parameter */
@@ -10588,10 +13627,11 @@ struct VdbeOp {
KeyInfo *pKeyInfo; /* Used when p4type is P4_KEYINFO */
int *ai; /* Used when p4type is P4_INTARRAY */
SubProgram *pProgram; /* Used when p4type is P4_SUBPROGRAM */
+ Table *pTab; /* Used when p4type is P4_TABLE */
#ifdef SQLITE_ENABLE_CURSOR_HINTS
Expr *pExpr; /* Used when p4type is P4_EXPR */
#endif
- int (*xAdvance)(BtCursor *, int *);
+ int (*xAdvance)(BtCursor *, int);
} p4;
#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS
char *zComment; /* Comment to improve readability */
@@ -10615,7 +13655,7 @@ struct SubProgram {
int nOp; /* Elements in aOp[] */
int nMem; /* Number of memory cells required */
int nCsr; /* Number of cursors required */
- int nOnce; /* Number of OP_Once instructions */
+ u8 *aOnce; /* Array of OP_Once flags */
void *token; /* id that may be used to recursive triggers */
SubProgram *pNext; /* Next sub-program already visited */
};
@@ -10635,24 +13675,26 @@ typedef struct VdbeOpList VdbeOpList;
/*
** Allowed values of VdbeOp.p4type
*/
-#define P4_NOTUSED 0 /* The P4 parameter is not used */
-#define P4_DYNAMIC (-1) /* Pointer to a string obtained from sqliteMalloc() */
-#define P4_STATIC (-2) /* Pointer to a static string */
-#define P4_COLLSEQ (-4) /* P4 is a pointer to a CollSeq structure */
-#define P4_FUNCDEF (-5) /* P4 is a pointer to a FuncDef structure */
-#define P4_KEYINFO (-6) /* P4 is a pointer to a KeyInfo structure */
-#define P4_EXPR (-7) /* P4 is a pointer to an Expr tree */
-#define P4_MEM (-8) /* P4 is a pointer to a Mem* structure */
-#define P4_TRANSIENT 0 /* P4 is a pointer to a transient string */
-#define P4_VTAB (-10) /* P4 is a pointer to an sqlite3_vtab structure */
-#define P4_MPRINTF (-11) /* P4 is a string obtained from sqlite3_mprintf() */
-#define P4_REAL (-12) /* P4 is a 64-bit floating point value */
-#define P4_INT64 (-13) /* P4 is a 64-bit signed integer */
-#define P4_INT32 (-14) /* P4 is a 32-bit signed integer */
-#define P4_INTARRAY (-15) /* P4 is a vector of 32-bit integers */
-#define P4_SUBPROGRAM (-18) /* P4 is a pointer to a SubProgram structure */
-#define P4_ADVANCE (-19) /* P4 is a pointer to BtreeNext() or BtreePrev() */
-#define P4_FUNCCTX (-20) /* P4 is a pointer to an sqlite3_context object */
+#define P4_NOTUSED 0 /* The P4 parameter is not used */
+#define P4_TRANSIENT 0 /* P4 is a pointer to a transient string */
+#define P4_STATIC (-1) /* Pointer to a static string */
+#define P4_COLLSEQ (-2) /* P4 is a pointer to a CollSeq structure */
+#define P4_INT32 (-3) /* P4 is a 32-bit signed integer */
+#define P4_SUBPROGRAM (-4) /* P4 is a pointer to a SubProgram structure */
+#define P4_ADVANCE (-5) /* P4 is a pointer to BtreeNext() or BtreePrev() */
+#define P4_TABLE (-6) /* P4 is a pointer to a Table structure */
+/* Above do not own any resources. Must free those below */
+#define P4_FREE_IF_LE (-7)
+#define P4_DYNAMIC (-7) /* Pointer to memory from sqliteMalloc() */
+#define P4_FUNCDEF (-8) /* P4 is a pointer to a FuncDef structure */
+#define P4_KEYINFO (-9) /* P4 is a pointer to a KeyInfo structure */
+#define P4_EXPR (-10) /* P4 is a pointer to an Expr tree */
+#define P4_MEM (-11) /* P4 is a pointer to a Mem* structure */
+#define P4_VTAB (-12) /* P4 is a pointer to an sqlite3_vtab structure */
+#define P4_REAL (-13) /* P4 is a 64-bit floating point value */
+#define P4_INT64 (-14) /* P4 is a 64-bit signed integer */
+#define P4_INTARRAY (-15) /* P4 is a vector of 32-bit integers */
+#define P4_FUNCCTX (-16) /* P4 is a pointer to an sqlite3_context object */
/* Error message codes for OP_Halt */
#define P5_ConstraintNotNull 1
@@ -10695,205 +13737,226 @@ typedef struct VdbeOpList VdbeOpList;
/************** Begin file opcodes.h *****************************************/
/* Automatically generated. Do not edit */
/* See the tool/mkopcodeh.tcl script for details */
-#define OP_Savepoint 1
-#define OP_AutoCommit 2
-#define OP_Transaction 3
-#define OP_SorterNext 4
-#define OP_PrevIfOpen 5
-#define OP_NextIfOpen 6
-#define OP_Prev 7
-#define OP_Next 8
-#define OP_Checkpoint 9
-#define OP_JournalMode 10
-#define OP_Vacuum 11
-#define OP_VFilter 12 /* synopsis: iplan=r[P3] zplan='P4' */
-#define OP_VUpdate 13 /* synopsis: data=r[P3@P2] */
-#define OP_Goto 14
-#define OP_Gosub 15
-#define OP_Return 16
-#define OP_InitCoroutine 17
-#define OP_EndCoroutine 18
+#define OP_Savepoint 0
+#define OP_AutoCommit 1
+#define OP_Transaction 2
+#define OP_SorterNext 3 /* jump */
+#define OP_PrevIfOpen 4 /* jump */
+#define OP_NextIfOpen 5 /* jump */
+#define OP_Prev 6 /* jump */
+#define OP_Next 7 /* jump */
+#define OP_Checkpoint 8
+#define OP_JournalMode 9
+#define OP_Vacuum 10
+#define OP_VFilter 11 /* jump, synopsis: iplan=r[P3] zplan='P4' */
+#define OP_VUpdate 12 /* synopsis: data=r[P3@P2] */
+#define OP_Goto 13 /* jump */
+#define OP_Gosub 14 /* jump */
+#define OP_InitCoroutine 15 /* jump */
+#define OP_Yield 16 /* jump */
+#define OP_MustBeInt 17 /* jump */
+#define OP_Jump 18 /* jump */
#define OP_Not 19 /* same as TK_NOT, synopsis: r[P2]= !r[P1] */
-#define OP_Yield 20
-#define OP_HaltIfNull 21 /* synopsis: if r[P3]=null halt */
-#define OP_Halt 22
-#define OP_Integer 23 /* synopsis: r[P2]=P1 */
-#define OP_Int64 24 /* synopsis: r[P2]=P4 */
-#define OP_String 25 /* synopsis: r[P2]='P4' (len=P1) */
-#define OP_Null 26 /* synopsis: r[P2..P3]=NULL */
-#define OP_SoftNull 27 /* synopsis: r[P1]=NULL */
-#define OP_Blob 28 /* synopsis: r[P2]=P4 (len=P1) */
-#define OP_Variable 29 /* synopsis: r[P2]=parameter(P1,P4) */
-#define OP_Move 30 /* synopsis: r[P2@P3]=r[P1@P3] */
-#define OP_Copy 31 /* synopsis: r[P2@P3+1]=r[P1@P3+1] */
-#define OP_SCopy 32 /* synopsis: r[P2]=r[P1] */
-#define OP_IntCopy 33 /* synopsis: r[P2]=r[P1] */
-#define OP_ResultRow 34 /* synopsis: output=r[P1@P2] */
-#define OP_CollSeq 35
-#define OP_Function0 36 /* synopsis: r[P3]=func(r[P2@P5]) */
-#define OP_Function 37 /* synopsis: r[P3]=func(r[P2@P5]) */
-#define OP_AddImm 38 /* synopsis: r[P1]=r[P1]+P2 */
-#define OP_MustBeInt 39
-#define OP_RealAffinity 40
-#define OP_Cast 41 /* synopsis: affinity(r[P1]) */
-#define OP_Permutation 42
-#define OP_Compare 43 /* synopsis: r[P1@P3] <-> r[P2@P3] */
-#define OP_Jump 44
-#define OP_Once 45
-#define OP_If 46
-#define OP_IfNot 47
-#define OP_Column 48 /* synopsis: r[P3]=PX */
-#define OP_Affinity 49 /* synopsis: affinity(r[P1@P2]) */
-#define OP_MakeRecord 50 /* synopsis: r[P3]=mkrec(r[P1@P2]) */
-#define OP_Count 51 /* synopsis: r[P2]=count() */
-#define OP_ReadCookie 52
-#define OP_SetCookie 53
-#define OP_ReopenIdx 54 /* synopsis: root=P2 iDb=P3 */
-#define OP_OpenRead 55 /* synopsis: root=P2 iDb=P3 */
-#define OP_OpenWrite 56 /* synopsis: root=P2 iDb=P3 */
-#define OP_OpenAutoindex 57 /* synopsis: nColumn=P2 */
-#define OP_OpenEphemeral 58 /* synopsis: nColumn=P2 */
-#define OP_SorterOpen 59
-#define OP_SequenceTest 60 /* synopsis: if( cursor[P1].ctr++ ) pc = P2 */
-#define OP_OpenPseudo 61 /* synopsis: P3 columns in r[P2] */
-#define OP_Close 62
-#define OP_ColumnsUsed 63
-#define OP_SeekLT 64 /* synopsis: key=r[P3@P4] */
-#define OP_SeekLE 65 /* synopsis: key=r[P3@P4] */
-#define OP_SeekGE 66 /* synopsis: key=r[P3@P4] */
-#define OP_SeekGT 67 /* synopsis: key=r[P3@P4] */
-#define OP_Seek 68 /* synopsis: intkey=r[P2] */
-#define OP_NoConflict 69 /* synopsis: key=r[P3@P4] */
-#define OP_NotFound 70 /* synopsis: key=r[P3@P4] */
-#define OP_Or 71 /* same as TK_OR, synopsis: r[P3]=(r[P1] || r[P2]) */
-#define OP_And 72 /* same as TK_AND, synopsis: r[P3]=(r[P1] && r[P2]) */
-#define OP_Found 73 /* synopsis: key=r[P3@P4] */
-#define OP_NotExists 74 /* synopsis: intkey=r[P3] */
-#define OP_Sequence 75 /* synopsis: r[P2]=cursor[P1].ctr++ */
-#define OP_IsNull 76 /* same as TK_ISNULL, synopsis: if r[P1]==NULL goto P2 */
-#define OP_NotNull 77 /* same as TK_NOTNULL, synopsis: if r[P1]!=NULL goto P2 */
-#define OP_Ne 78 /* same as TK_NE, synopsis: if r[P1]!=r[P3] goto P2 */
-#define OP_Eq 79 /* same as TK_EQ, synopsis: if r[P1]==r[P3] goto P2 */
-#define OP_Gt 80 /* same as TK_GT, synopsis: if r[P1]>r[P3] goto P2 */
-#define OP_Le 81 /* same as TK_LE, synopsis: if r[P1]<=r[P3] goto P2 */
-#define OP_Lt 82 /* same as TK_LT, synopsis: if r[P1]=r[P3] goto P2 */
-#define OP_NewRowid 84 /* synopsis: r[P2]=rowid */
-#define OP_BitAnd 85 /* same as TK_BITAND, synopsis: r[P3]=r[P1]&r[P2] */
-#define OP_BitOr 86 /* same as TK_BITOR, synopsis: r[P3]=r[P1]|r[P2] */
-#define OP_ShiftLeft 87 /* same as TK_LSHIFT, synopsis: r[P3]=r[P2]<>r[P1] */
-#define OP_Add 89 /* same as TK_PLUS, synopsis: r[P3]=r[P1]+r[P2] */
-#define OP_Subtract 90 /* same as TK_MINUS, synopsis: r[P3]=r[P2]-r[P1] */
-#define OP_Multiply 91 /* same as TK_STAR, synopsis: r[P3]=r[P1]*r[P2] */
-#define OP_Divide 92 /* same as TK_SLASH, synopsis: r[P3]=r[P2]/r[P1] */
-#define OP_Remainder 93 /* same as TK_REM, synopsis: r[P3]=r[P2]%r[P1] */
-#define OP_Concat 94 /* same as TK_CONCAT, synopsis: r[P3]=r[P2]+r[P1] */
-#define OP_Insert 95 /* synopsis: intkey=r[P3] data=r[P2] */
-#define OP_BitNot 96 /* same as TK_BITNOT, synopsis: r[P1]= ~r[P1] */
+#define OP_Once 20 /* jump */
+#define OP_If 21 /* jump */
+#define OP_IfNot 22 /* jump */
+#define OP_IfNullRow 23 /* jump, synopsis: if P1.nullRow then r[P3]=NULL, goto P2 */
+#define OP_SeekLT 24 /* jump, synopsis: key=r[P3@P4] */
+#define OP_SeekLE 25 /* jump, synopsis: key=r[P3@P4] */
+#define OP_SeekGE 26 /* jump, synopsis: key=r[P3@P4] */
+#define OP_SeekGT 27 /* jump, synopsis: key=r[P3@P4] */
+#define OP_NoConflict 28 /* jump, synopsis: key=r[P3@P4] */
+#define OP_NotFound 29 /* jump, synopsis: key=r[P3@P4] */
+#define OP_Found 30 /* jump, synopsis: key=r[P3@P4] */
+#define OP_SeekRowid 31 /* jump, synopsis: intkey=r[P3] */
+#define OP_NotExists 32 /* jump, synopsis: intkey=r[P3] */
+#define OP_Last 33 /* jump */
+#define OP_IfSmaller 34 /* jump */
+#define OP_SorterSort 35 /* jump */
+#define OP_Sort 36 /* jump */
+#define OP_Rewind 37 /* jump */
+#define OP_IdxLE 38 /* jump, synopsis: key=r[P3@P4] */
+#define OP_IdxGT 39 /* jump, synopsis: key=r[P3@P4] */
+#define OP_IdxLT 40 /* jump, synopsis: key=r[P3@P4] */
+#define OP_IdxGE 41 /* jump, synopsis: key=r[P3@P4] */
+#define OP_RowSetRead 42 /* jump, synopsis: r[P3]=rowset(P1) */
+#define OP_Or 43 /* same as TK_OR, synopsis: r[P3]=(r[P1] || r[P2]) */
+#define OP_And 44 /* same as TK_AND, synopsis: r[P3]=(r[P1] && r[P2]) */
+#define OP_RowSetTest 45 /* jump, synopsis: if r[P3] in rowset(P1) goto P2 */
+#define OP_Program 46 /* jump */
+#define OP_FkIfZero 47 /* jump, synopsis: if fkctr[P1]==0 goto P2 */
+#define OP_IfPos 48 /* jump, synopsis: if r[P1]>0 then r[P1]-=P3, goto P2 */
+#define OP_IfNotZero 49 /* jump, synopsis: if r[P1]!=0 then r[P1]--, goto P2 */
+#define OP_IsNull 50 /* jump, same as TK_ISNULL, synopsis: if r[P1]==NULL goto P2 */
+#define OP_NotNull 51 /* jump, same as TK_NOTNULL, synopsis: if r[P1]!=NULL goto P2 */
+#define OP_Ne 52 /* jump, same as TK_NE, synopsis: IF r[P3]!=r[P1] */
+#define OP_Eq 53 /* jump, same as TK_EQ, synopsis: IF r[P3]==r[P1] */
+#define OP_Gt 54 /* jump, same as TK_GT, synopsis: IF r[P3]>r[P1] */
+#define OP_Le 55 /* jump, same as TK_LE, synopsis: IF r[P3]<=r[P1] */
+#define OP_Lt 56 /* jump, same as TK_LT, synopsis: IF r[P3]=r[P1] */
+#define OP_ElseNotEq 58 /* jump, same as TK_ESCAPE */
+#define OP_DecrJumpZero 59 /* jump, synopsis: if (--r[P1])==0 goto P2 */
+#define OP_IncrVacuum 60 /* jump */
+#define OP_VNext 61 /* jump */
+#define OP_Init 62 /* jump, synopsis: Start at P2 */
+#define OP_Return 63
+#define OP_EndCoroutine 64
+#define OP_HaltIfNull 65 /* synopsis: if r[P3]=null halt */
+#define OP_Halt 66
+#define OP_Integer 67 /* synopsis: r[P2]=P1 */
+#define OP_Int64 68 /* synopsis: r[P2]=P4 */
+#define OP_String 69 /* synopsis: r[P2]='P4' (len=P1) */
+#define OP_Null 70 /* synopsis: r[P2..P3]=NULL */
+#define OP_SoftNull 71 /* synopsis: r[P1]=NULL */
+#define OP_Blob 72 /* synopsis: r[P2]=P4 (len=P1) */
+#define OP_Variable 73 /* synopsis: r[P2]=parameter(P1,P4) */
+#define OP_Move 74 /* synopsis: r[P2@P3]=r[P1@P3] */
+#define OP_Copy 75 /* synopsis: r[P2@P3+1]=r[P1@P3+1] */
+#define OP_SCopy 76 /* synopsis: r[P2]=r[P1] */
+#define OP_IntCopy 77 /* synopsis: r[P2]=r[P1] */
+#define OP_ResultRow 78 /* synopsis: output=r[P1@P2] */
+#define OP_CollSeq 79
+#define OP_AddImm 80 /* synopsis: r[P1]=r[P1]+P2 */
+#define OP_RealAffinity 81
+#define OP_Cast 82 /* synopsis: affinity(r[P1]) */
+#define OP_Permutation 83
+#define OP_BitAnd 84 /* same as TK_BITAND, synopsis: r[P3]=r[P1]&r[P2] */
+#define OP_BitOr 85 /* same as TK_BITOR, synopsis: r[P3]=r[P1]|r[P2] */
+#define OP_ShiftLeft 86 /* same as TK_LSHIFT, synopsis: r[P3]=r[P2]<>r[P1] */
+#define OP_Add 88 /* same as TK_PLUS, synopsis: r[P3]=r[P1]+r[P2] */
+#define OP_Subtract 89 /* same as TK_MINUS, synopsis: r[P3]=r[P2]-r[P1] */
+#define OP_Multiply 90 /* same as TK_STAR, synopsis: r[P3]=r[P1]*r[P2] */
+#define OP_Divide 91 /* same as TK_SLASH, synopsis: r[P3]=r[P2]/r[P1] */
+#define OP_Remainder 92 /* same as TK_REM, synopsis: r[P3]=r[P2]%r[P1] */
+#define OP_Concat 93 /* same as TK_CONCAT, synopsis: r[P3]=r[P2]+r[P1] */
+#define OP_Compare 94 /* synopsis: r[P1@P3] <-> r[P2@P3] */
+#define OP_BitNot 95 /* same as TK_BITNOT, synopsis: r[P1]= ~r[P1] */
+#define OP_Column 96 /* synopsis: r[P3]=PX */
#define OP_String8 97 /* same as TK_STRING, synopsis: r[P2]='P4' */
-#define OP_InsertInt 98 /* synopsis: intkey=P3 data=r[P2] */
-#define OP_Delete 99
-#define OP_ResetCount 100
-#define OP_SorterCompare 101 /* synopsis: if key(P1)!=trim(r[P3],P4) goto P2 */
-#define OP_SorterData 102 /* synopsis: r[P2]=data */
-#define OP_RowKey 103 /* synopsis: r[P2]=key */
-#define OP_RowData 104 /* synopsis: r[P2]=data */
-#define OP_Rowid 105 /* synopsis: r[P2]=rowid */
-#define OP_NullRow 106
-#define OP_Last 107
-#define OP_SorterSort 108
-#define OP_Sort 109
-#define OP_Rewind 110
-#define OP_SorterInsert 111
-#define OP_IdxInsert 112 /* synopsis: key=r[P2] */
-#define OP_IdxDelete 113 /* synopsis: key=r[P2@P3] */
-#define OP_IdxRowid 114 /* synopsis: r[P2]=rowid */
-#define OP_IdxLE 115 /* synopsis: key=r[P3@P4] */
-#define OP_IdxGT 116 /* synopsis: key=r[P3@P4] */
-#define OP_IdxLT 117 /* synopsis: key=r[P3@P4] */
-#define OP_IdxGE 118 /* synopsis: key=r[P3@P4] */
-#define OP_Destroy 119
-#define OP_Clear 120
-#define OP_ResetSorter 121
-#define OP_CreateIndex 122 /* synopsis: r[P2]=root iDb=P1 */
-#define OP_CreateTable 123 /* synopsis: r[P2]=root iDb=P1 */
-#define OP_ParseSchema 124
-#define OP_LoadAnalysis 125
-#define OP_DropTable 126
-#define OP_DropIndex 127
-#define OP_DropTrigger 128
-#define OP_IntegrityCk 129
-#define OP_RowSetAdd 130 /* synopsis: rowset(P1)=r[P2] */
-#define OP_RowSetRead 131 /* synopsis: r[P3]=rowset(P1) */
-#define OP_RowSetTest 132 /* synopsis: if r[P3] in rowset(P1) goto P2 */
-#define OP_Real 133 /* same as TK_FLOAT, synopsis: r[P2]=P4 */
-#define OP_Program 134
-#define OP_Param 135
-#define OP_FkCounter 136 /* synopsis: fkctr[P1]+=P2 */
-#define OP_FkIfZero 137 /* synopsis: if fkctr[P1]==0 goto P2 */
-#define OP_MemMax 138 /* synopsis: r[P1]=max(r[P1],r[P2]) */
-#define OP_IfPos 139 /* synopsis: if r[P1]>0 then r[P1]-=P3, goto P2 */
-#define OP_SetIfNotPos 140 /* synopsis: if r[P1]<=0 then r[P2]=P3 */
-#define OP_IfNotZero 141 /* synopsis: if r[P1]!=0 then r[P1]-=P3, goto P2 */
-#define OP_DecrJumpZero 142 /* synopsis: if (--r[P1])==0 goto P2 */
-#define OP_JumpZeroIncr 143 /* synopsis: if (r[P1]++)==0 ) goto P2 */
-#define OP_AggStep0 144 /* synopsis: accum=r[P3] step(r[P2@P5]) */
-#define OP_AggStep 145 /* synopsis: accum=r[P3] step(r[P2@P5]) */
-#define OP_AggFinal 146 /* synopsis: accum=r[P1] N=P2 */
-#define OP_IncrVacuum 147
-#define OP_Expire 148
-#define OP_TableLock 149 /* synopsis: iDb=P1 root=P2 write=P3 */
-#define OP_VBegin 150
-#define OP_VCreate 151
-#define OP_VDestroy 152
-#define OP_VOpen 153
-#define OP_VColumn 154 /* synopsis: r[P3]=vcolumn(P2) */
-#define OP_VNext 155
-#define OP_VRename 156
-#define OP_Pagecount 157
-#define OP_MaxPgcnt 158
-#define OP_Init 159 /* synopsis: Start at P2 */
-#define OP_CursorHint 160
-#define OP_Noop 161
-#define OP_Explain 162
+#define OP_Affinity 98 /* synopsis: affinity(r[P1@P2]) */
+#define OP_MakeRecord 99 /* synopsis: r[P3]=mkrec(r[P1@P2]) */
+#define OP_Count 100 /* synopsis: r[P2]=count() */
+#define OP_ReadCookie 101
+#define OP_SetCookie 102
+#define OP_ReopenIdx 103 /* synopsis: root=P2 iDb=P3 */
+#define OP_OpenRead 104 /* synopsis: root=P2 iDb=P3 */
+#define OP_OpenWrite 105 /* synopsis: root=P2 iDb=P3 */
+#define OP_OpenDup 106
+#define OP_OpenAutoindex 107 /* synopsis: nColumn=P2 */
+#define OP_OpenEphemeral 108 /* synopsis: nColumn=P2 */
+#define OP_SorterOpen 109
+#define OP_SequenceTest 110 /* synopsis: if( cursor[P1].ctr++ ) pc = P2 */
+#define OP_OpenPseudo 111 /* synopsis: P3 columns in r[P2] */
+#define OP_Close 112
+#define OP_ColumnsUsed 113
+#define OP_Sequence 114 /* synopsis: r[P2]=cursor[P1].ctr++ */
+#define OP_NewRowid 115 /* synopsis: r[P2]=rowid */
+#define OP_Insert 116 /* synopsis: intkey=r[P3] data=r[P2] */
+#define OP_InsertInt 117 /* synopsis: intkey=P3 data=r[P2] */
+#define OP_Delete 118
+#define OP_ResetCount 119
+#define OP_SorterCompare 120 /* synopsis: if key(P1)!=trim(r[P3],P4) goto P2 */
+#define OP_SorterData 121 /* synopsis: r[P2]=data */
+#define OP_RowData 122 /* synopsis: r[P2]=data */
+#define OP_Rowid 123 /* synopsis: r[P2]=rowid */
+#define OP_NullRow 124
+#define OP_SeekEnd 125
+#define OP_SorterInsert 126 /* synopsis: key=r[P2] */
+#define OP_IdxInsert 127 /* synopsis: key=r[P2] */
+#define OP_IdxDelete 128 /* synopsis: key=r[P2@P3] */
+#define OP_DeferredSeek 129 /* synopsis: Move P3 to P1.rowid if needed */
+#define OP_IdxRowid 130 /* synopsis: r[P2]=rowid */
+#define OP_Destroy 131
+#define OP_Real 132 /* same as TK_FLOAT, synopsis: r[P2]=P4 */
+#define OP_Clear 133
+#define OP_ResetSorter 134
+#define OP_CreateBtree 135 /* synopsis: r[P2]=root iDb=P1 flags=P3 */
+#define OP_SqlExec 136
+#define OP_ParseSchema 137
+#define OP_LoadAnalysis 138
+#define OP_DropTable 139
+#define OP_DropIndex 140
+#define OP_DropTrigger 141
+#define OP_IntegrityCk 142
+#define OP_RowSetAdd 143 /* synopsis: rowset(P1)=r[P2] */
+#define OP_Param 144
+#define OP_FkCounter 145 /* synopsis: fkctr[P1]+=P2 */
+#define OP_MemMax 146 /* synopsis: r[P1]=max(r[P1],r[P2]) */
+#define OP_OffsetLimit 147 /* synopsis: if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1) */
+#define OP_AggStep0 148 /* synopsis: accum=r[P3] step(r[P2@P5]) */
+#define OP_AggStep 149 /* synopsis: accum=r[P3] step(r[P2@P5]) */
+#define OP_AggFinal 150 /* synopsis: accum=r[P1] N=P2 */
+#define OP_Expire 151
+#define OP_TableLock 152 /* synopsis: iDb=P1 root=P2 write=P3 */
+#define OP_VBegin 153
+#define OP_VCreate 154
+#define OP_VDestroy 155
+#define OP_VOpen 156
+#define OP_VColumn 157 /* synopsis: r[P3]=vcolumn(P2) */
+#define OP_VRename 158
+#define OP_Pagecount 159
+#define OP_MaxPgcnt 160
+#define OP_PureFunc0 161
+#define OP_Function0 162 /* synopsis: r[P3]=func(r[P2@P5]) */
+#define OP_PureFunc 163
+#define OP_Function 164 /* synopsis: r[P3]=func(r[P2@P5]) */
+#define OP_CursorHint 165
+#define OP_Noop 166
+#define OP_Explain 167
/* Properties such as "out2" or "jump" that are specified in
** comments following the "case" for each opcode in the vdbe.c
** are encoded into bitvectors as follows:
*/
-#define OPFLG_JUMP 0x0001 /* jump: P2 holds jmp target */
-#define OPFLG_IN1 0x0002 /* in1: P1 is an input */
-#define OPFLG_IN2 0x0004 /* in2: P2 is an input */
-#define OPFLG_IN3 0x0008 /* in3: P3 is an input */
-#define OPFLG_OUT2 0x0010 /* out2: P2 is an output */
-#define OPFLG_OUT3 0x0020 /* out3: P3 is an output */
+#define OPFLG_JUMP 0x01 /* jump: P2 holds jmp target */
+#define OPFLG_IN1 0x02 /* in1: P1 is an input */
+#define OPFLG_IN2 0x04 /* in2: P2 is an input */
+#define OPFLG_IN3 0x08 /* in3: P3 is an input */
+#define OPFLG_OUT2 0x10 /* out2: P2 is an output */
+#define OPFLG_OUT3 0x20 /* out3: P3 is an output */
#define OPFLG_INITIALIZER {\
-/* 0 */ 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,\
-/* 8 */ 0x01, 0x00, 0x10, 0x00, 0x01, 0x00, 0x01, 0x01,\
-/* 16 */ 0x02, 0x01, 0x02, 0x12, 0x03, 0x08, 0x00, 0x10,\
-/* 24 */ 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x00, 0x00,\
-/* 32 */ 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03,\
-/* 40 */ 0x02, 0x02, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03,\
-/* 48 */ 0x00, 0x00, 0x00, 0x10, 0x10, 0x08, 0x00, 0x00,\
-/* 56 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
-/* 64 */ 0x09, 0x09, 0x09, 0x09, 0x04, 0x09, 0x09, 0x26,\
-/* 72 */ 0x26, 0x09, 0x09, 0x10, 0x03, 0x03, 0x0b, 0x0b,\
-/* 80 */ 0x0b, 0x0b, 0x0b, 0x0b, 0x10, 0x26, 0x26, 0x26,\
-/* 88 */ 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x00,\
-/* 96 */ 0x12, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
-/* 104 */ 0x00, 0x10, 0x00, 0x01, 0x01, 0x01, 0x01, 0x04,\
-/* 112 */ 0x04, 0x00, 0x10, 0x01, 0x01, 0x01, 0x01, 0x10,\
-/* 120 */ 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00,\
-/* 128 */ 0x00, 0x00, 0x06, 0x23, 0x0b, 0x10, 0x01, 0x10,\
-/* 136 */ 0x00, 0x01, 0x04, 0x03, 0x06, 0x03, 0x03, 0x03,\
-/* 144 */ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,\
-/* 152 */ 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x10, 0x01,\
-/* 160 */ 0x00, 0x00, 0x00,}
+/* 0 */ 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,\
+/* 8 */ 0x00, 0x10, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01,\
+/* 16 */ 0x03, 0x03, 0x01, 0x12, 0x01, 0x03, 0x03, 0x01,\
+/* 24 */ 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,\
+/* 32 */ 0x09, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\
+/* 40 */ 0x01, 0x01, 0x23, 0x26, 0x26, 0x0b, 0x01, 0x01,\
+/* 48 */ 0x03, 0x03, 0x03, 0x03, 0x0b, 0x0b, 0x0b, 0x0b,\
+/* 56 */ 0x0b, 0x0b, 0x01, 0x03, 0x01, 0x01, 0x01, 0x02,\
+/* 64 */ 0x02, 0x08, 0x00, 0x10, 0x10, 0x10, 0x10, 0x00,\
+/* 72 */ 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,\
+/* 80 */ 0x02, 0x02, 0x02, 0x00, 0x26, 0x26, 0x26, 0x26,\
+/* 88 */ 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x00, 0x12,\
+/* 96 */ 0x00, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,\
+/* 104 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
+/* 112 */ 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00,\
+/* 120 */ 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x04, 0x04,\
+/* 128 */ 0x00, 0x00, 0x10, 0x10, 0x10, 0x00, 0x00, 0x10,\
+/* 136 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,\
+/* 144 */ 0x10, 0x00, 0x04, 0x1a, 0x00, 0x00, 0x00, 0x00,\
+/* 152 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,\
+/* 160 */ 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
+}
+
+/* The sqlite3P2Values() routine is able to run faster if it knows
+** the value of the largest JUMP opcode. The smaller the maximum
+** JUMP opcode the better, so the mkopcodeh.tcl script that
+** generated this include file strives to group all JUMP opcodes
+** together near the beginning of the list.
+*/
+#define SQLITE_MX_JUMP_OPCODE 62 /* Maximum JUMP opcode */
/************** End of opcodes.h *********************************************/
/************** Continuing where we left off in vdbe.h ***********************/
+/*
+** Additional non-public SQLITE_PREPARE_* flags
+*/
+#define SQLITE_PREPARE_SAVESQL 0x80 /* Preserve SQL text */
+#define SQLITE_PREPARE_MASK 0x0f /* Mask of public flags */
+
/*
** Prototypes for the VDBE interface. See comments on the implementation
** for a description of what each of these routines does.
@@ -10909,22 +13972,32 @@ SQLITE_PRIVATE int sqlite3VdbeAddOp3(Vdbe*,int,int,int,int);
SQLITE_PRIVATE int sqlite3VdbeAddOp4(Vdbe*,int,int,int,int,const char *zP4,int);
SQLITE_PRIVATE int sqlite3VdbeAddOp4Dup8(Vdbe*,int,int,int,int,const u8*,int);
SQLITE_PRIVATE int sqlite3VdbeAddOp4Int(Vdbe*,int,int,int,int,int);
-SQLITE_PRIVATE int sqlite3VdbeAddOpList(Vdbe*, int nOp, VdbeOpList const *aOp, int iLineno);
+SQLITE_PRIVATE void sqlite3VdbeEndCoroutine(Vdbe*,int);
+#if defined(SQLITE_DEBUG) && !defined(SQLITE_TEST_REALLOC_STRESS)
+SQLITE_PRIVATE void sqlite3VdbeVerifyNoMallocRequired(Vdbe *p, int N);
+SQLITE_PRIVATE void sqlite3VdbeVerifyNoResultRow(Vdbe *p);
+#else
+# define sqlite3VdbeVerifyNoMallocRequired(A,B)
+# define sqlite3VdbeVerifyNoResultRow(A)
+#endif
+SQLITE_PRIVATE VdbeOp *sqlite3VdbeAddOpList(Vdbe*, int nOp, VdbeOpList const *aOp, int iLineno);
SQLITE_PRIVATE void sqlite3VdbeAddParseSchemaOp(Vdbe*,int,char*);
SQLITE_PRIVATE void sqlite3VdbeChangeOpcode(Vdbe*, u32 addr, u8);
SQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe*, u32 addr, int P1);
SQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe*, u32 addr, int P2);
SQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe*, u32 addr, int P3);
-SQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe*, u8 P5);
+SQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe*, u16 P5);
SQLITE_PRIVATE void sqlite3VdbeJumpHere(Vdbe*, int addr);
-SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe*, int addr);
+SQLITE_PRIVATE int sqlite3VdbeChangeToNoop(Vdbe*, int addr);
SQLITE_PRIVATE int sqlite3VdbeDeletePriorOpcode(Vdbe*, u8 op);
SQLITE_PRIVATE void sqlite3VdbeChangeP4(Vdbe*, int addr, const char *zP4, int N);
+SQLITE_PRIVATE void sqlite3VdbeAppendP4(Vdbe*, void *pP4, int p4type);
SQLITE_PRIVATE void sqlite3VdbeSetP4KeyInfo(Parse*, Index*);
SQLITE_PRIVATE void sqlite3VdbeUsesBtree(Vdbe*, int);
SQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe*, int);
SQLITE_PRIVATE int sqlite3VdbeMakeLabel(Vdbe*);
SQLITE_PRIVATE void sqlite3VdbeRunOnlyOnce(Vdbe*);
+SQLITE_PRIVATE void sqlite3VdbeReusable(Vdbe*);
SQLITE_PRIVATE void sqlite3VdbeDelete(Vdbe*);
SQLITE_PRIVATE void sqlite3VdbeClearObject(sqlite3*,Vdbe*);
SQLITE_PRIVATE void sqlite3VdbeMakeReady(Vdbe*,Parse*);
@@ -10941,7 +14014,8 @@ SQLITE_PRIVATE void sqlite3VdbeSetNumCols(Vdbe*,int);
SQLITE_PRIVATE int sqlite3VdbeSetColName(Vdbe*, int, int, const char *, void(*)(void*));
SQLITE_PRIVATE void sqlite3VdbeCountChanges(Vdbe*);
SQLITE_PRIVATE sqlite3 *sqlite3VdbeDb(Vdbe*);
-SQLITE_PRIVATE void sqlite3VdbeSetSql(Vdbe*, const char *z, int n, int);
+SQLITE_PRIVATE u8 sqlite3VdbePrepareFlags(Vdbe*);
+SQLITE_PRIVATE void sqlite3VdbeSetSql(Vdbe*, const char *z, int n, u8);
SQLITE_PRIVATE void sqlite3VdbeSwap(Vdbe*,Vdbe*);
SQLITE_PRIVATE VdbeOp *sqlite3VdbeTakeOpArray(Vdbe*, int*, int*);
SQLITE_PRIVATE sqlite3_value *sqlite3VdbeGetBoundValue(Vdbe*, int, u8);
@@ -10954,7 +14028,7 @@ SQLITE_PRIVATE int sqlite3MemCompare(const Mem*, const Mem*, const CollSeq*);
SQLITE_PRIVATE void sqlite3VdbeRecordUnpack(KeyInfo*,int,const void*,UnpackedRecord*);
SQLITE_PRIVATE int sqlite3VdbeRecordCompare(int,const void*,UnpackedRecord*);
SQLITE_PRIVATE int sqlite3VdbeRecordCompareWithSkip(int, const void *, UnpackedRecord *, int);
-SQLITE_PRIVATE UnpackedRecord *sqlite3VdbeAllocUnpackedRecord(KeyInfo *, char *, int, char **);
+SQLITE_PRIVATE UnpackedRecord *sqlite3VdbeAllocUnpackedRecord(KeyInfo*);
typedef int (*RecordCompare)(int,const void*,UnpackedRecord*);
SQLITE_PRIVATE RecordCompare sqlite3VdbeFindCompare(UnpackedRecord*);
@@ -10963,6 +14037,8 @@ SQLITE_PRIVATE RecordCompare sqlite3VdbeFindCompare(UnpackedRecord*);
SQLITE_PRIVATE void sqlite3VdbeLinkSubProgram(Vdbe *, SubProgram *);
#endif
+SQLITE_PRIVATE int sqlite3NotPureFunc(sqlite3_context*);
+
/* Use SQLITE_ENABLE_COMMENTS to enable generation of extra comments on
** each VDBE opcode.
**
@@ -11029,7 +14105,7 @@ SQLITE_PRIVATE void sqlite3VdbeScanStatus(Vdbe*, int, int, int, LogEst, const ch
# define sqlite3VdbeScanStatus(a,b,c,d,e)
#endif
-#endif
+#endif /* SQLITE_VDBE_H */
/************** End of vdbe.h ************************************************/
/************** Continuing where we left off in sqliteInt.h ******************/
@@ -11051,8 +14127,8 @@ SQLITE_PRIVATE void sqlite3VdbeScanStatus(Vdbe*, int, int, int, LogEst, const ch
** at a time and provides a journal for rollback.
*/
-#ifndef _PAGER_H_
-#define _PAGER_H_
+#ifndef SQLITE_PAGER_H
+#define SQLITE_PAGER_H
/*
** Default maximum size for persistent journal files. A negative
@@ -11105,7 +14181,11 @@ typedef struct PgHdr DbPage;
#define PAGER_LOCKINGMODE_EXCLUSIVE 1
/*
-** Numeric constants that encode the journalmode.
+** Numeric constants that encode the journalmode.
+**
+** The numeric values encoded here (other than PAGER_JOURNALMODE_QUERY)
+** are exposed in the API via the "PRAGMA journal_mode" command and
+** therefore cannot be changed without a compatibility break.
*/
#define PAGER_JOURNALMODE_QUERY (-1) /* Query the value of journalmode */
#define PAGER_JOURNALMODE_DELETE 0 /* Commit by deleting journal file */
@@ -11123,15 +14203,21 @@ typedef struct PgHdr DbPage;
/*
** Flags for sqlite3PagerSetFlags()
+**
+** Value constraints (enforced via assert()):
+** PAGER_FULLFSYNC == SQLITE_FullFSync
+** PAGER_CKPT_FULLFSYNC == SQLITE_CkptFullFSync
+** PAGER_CACHE_SPILL == SQLITE_CacheSpill
*/
#define PAGER_SYNCHRONOUS_OFF 0x01 /* PRAGMA synchronous=OFF */
#define PAGER_SYNCHRONOUS_NORMAL 0x02 /* PRAGMA synchronous=NORMAL */
#define PAGER_SYNCHRONOUS_FULL 0x03 /* PRAGMA synchronous=FULL */
-#define PAGER_SYNCHRONOUS_MASK 0x03 /* Mask for three values above */
-#define PAGER_FULLFSYNC 0x04 /* PRAGMA fullfsync=ON */
-#define PAGER_CKPT_FULLFSYNC 0x08 /* PRAGMA checkpoint_fullfsync=ON */
-#define PAGER_CACHESPILL 0x10 /* PRAGMA cache_spill=ON */
-#define PAGER_FLAGS_MASK 0x1c /* All above except SYNCHRONOUS */
+#define PAGER_SYNCHRONOUS_EXTRA 0x04 /* PRAGMA synchronous=EXTRA */
+#define PAGER_SYNCHRONOUS_MASK 0x07 /* Mask for four values above */
+#define PAGER_FULLFSYNC 0x08 /* PRAGMA fullfsync=ON */
+#define PAGER_CKPT_FULLFSYNC 0x10 /* PRAGMA checkpoint_fullfsync=ON */
+#define PAGER_CACHESPILL 0x20 /* PRAGMA cache_spill=ON */
+#define PAGER_FLAGS_MASK 0x38 /* All above except SYNCHRONOUS */
/*
** The remainder of this file contains the declarations of the functions
@@ -11149,7 +14235,7 @@ SQLITE_PRIVATE int sqlite3PagerOpen(
int,
void(*)(DbPage*)
);
-SQLITE_PRIVATE int sqlite3PagerClose(Pager *pPager);
+SQLITE_PRIVATE int sqlite3PagerClose(Pager *pPager, sqlite3*);
SQLITE_PRIVATE int sqlite3PagerReadFileheader(Pager*, int, unsigned char*);
/* Functions used to configure a Pager object. */
@@ -11178,6 +14264,7 @@ SQLITE_PRIVATE DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno);
SQLITE_PRIVATE void sqlite3PagerRef(DbPage*);
SQLITE_PRIVATE void sqlite3PagerUnref(DbPage*);
SQLITE_PRIVATE void sqlite3PagerUnrefNotNull(DbPage*);
+SQLITE_PRIVATE void sqlite3PagerUnrefPageOne(DbPage*);
/* Operations on page references. */
SQLITE_PRIVATE int sqlite3PagerWrite(DbPage*);
@@ -11200,15 +14287,21 @@ SQLITE_PRIVATE int sqlite3PagerSavepoint(Pager *pPager, int op, int iSavepoint);
SQLITE_PRIVATE int sqlite3PagerSharedLock(Pager *pPager);
#ifndef SQLITE_OMIT_WAL
-SQLITE_PRIVATE int sqlite3PagerCheckpoint(Pager *pPager, int, int*, int*);
+SQLITE_PRIVATE int sqlite3PagerCheckpoint(Pager *pPager, sqlite3*, int, int*, int*);
SQLITE_PRIVATE int sqlite3PagerWalSupported(Pager *pPager);
SQLITE_PRIVATE int sqlite3PagerWalCallback(Pager *pPager);
SQLITE_PRIVATE int sqlite3PagerOpenWal(Pager *pPager, int *pisOpen);
-SQLITE_PRIVATE int sqlite3PagerCloseWal(Pager *pPager);
+SQLITE_PRIVATE int sqlite3PagerCloseWal(Pager *pPager, sqlite3*);
+# ifdef SQLITE_DIRECT_OVERFLOW_READ
+SQLITE_PRIVATE int sqlite3PagerUseWal(Pager *pPager, Pgno);
+# endif
# ifdef SQLITE_ENABLE_SNAPSHOT
SQLITE_PRIVATE int sqlite3PagerSnapshotGet(Pager *pPager, sqlite3_snapshot **ppSnapshot);
SQLITE_PRIVATE int sqlite3PagerSnapshotOpen(Pager *pPager, sqlite3_snapshot *pSnapshot);
+SQLITE_PRIVATE int sqlite3PagerSnapshotRecover(Pager *pPager);
# endif
+#else
+# define sqlite3PagerUseWal(x,y) 0
#endif
#ifdef SQLITE_ENABLE_ZIPVFS
@@ -11227,11 +14320,10 @@ SQLITE_PRIVATE sqlite3_vfs *sqlite3PagerVfs(Pager*);
SQLITE_PRIVATE sqlite3_file *sqlite3PagerFile(Pager*);
SQLITE_PRIVATE sqlite3_file *sqlite3PagerJrnlFile(Pager*);
SQLITE_PRIVATE const char *sqlite3PagerJournalname(Pager*);
-SQLITE_PRIVATE int sqlite3PagerNosync(Pager*);
SQLITE_PRIVATE void *sqlite3PagerTempSpace(Pager*);
SQLITE_PRIVATE int sqlite3PagerIsMemdb(Pager*);
SQLITE_PRIVATE void sqlite3PagerCacheStat(Pager *, int, int, int *);
-SQLITE_PRIVATE void sqlite3PagerClearCache(Pager *);
+SQLITE_PRIVATE void sqlite3PagerClearCache(Pager*);
SQLITE_PRIVATE int sqlite3SectorSize(sqlite3_file *);
/* Functions used to truncate the database file. */
@@ -11258,7 +14350,7 @@ SQLITE_PRIVATE void sqlite3PagerRefdump(Pager*);
# define enable_simulated_io_errors()
#endif
-#endif /* _PAGER_H_ */
+#endif /* SQLITE_PAGER_H */
/************** End of pager.h ***********************************************/
/************** Continuing where we left off in sqliteInt.h ******************/
@@ -11292,7 +14384,8 @@ struct PgHdr {
sqlite3_pcache_page *pPage; /* Pcache object page handle */
void *pData; /* Page data */
void *pExtra; /* Extra content */
- PgHdr *pDirty; /* Transient list of dirty pages */
+ PCache *pCache; /* PRIVATE: Cache that owns this page */
+ PgHdr *pDirty; /* Transient list of dirty sorted by pgno */
Pager *pPager; /* The pager this page is part of */
Pgno pgno; /* Page number for this page */
#ifdef SQLITE_CHECK_PAGES
@@ -11301,14 +14394,15 @@ struct PgHdr {
u16 flags; /* PGHDR flags defined below */
/**********************************************************************
- ** Elements above are public. All that follows is private to pcache.c
- ** and should not be accessed by other modules.
+ ** Elements above, except pCache, are public. All that follow are
+ ** private to pcache.c and should not be accessed by other modules.
+ ** pCache is grouped with the public elements for efficiency.
*/
i16 nRef; /* Number of users of this page */
- PCache *pCache; /* Cache that owns this page */
-
PgHdr *pDirtyNext; /* Next element in list of dirty pages */
PgHdr *pDirtyPrev; /* Previous element in list of dirty pages */
+ /* NB: pDirtyNext and pDirtyPrev are undefined if the
+ ** PgHdr object is not dirty */
};
/* Bit values for PgHdr.flags */
@@ -11317,9 +14411,10 @@ struct PgHdr {
#define PGHDR_WRITEABLE 0x004 /* Journaled and ready to modify */
#define PGHDR_NEED_SYNC 0x008 /* Fsync the rollback journal before
** writing this page to the database */
-#define PGHDR_NEED_READ 0x010 /* Content is unread */
-#define PGHDR_DONT_WRITE 0x020 /* Do not write content to disk */
-#define PGHDR_MMAP 0x040 /* This is an mmap page object */
+#define PGHDR_DONT_WRITE 0x010 /* Do not write content to disk */
+#define PGHDR_MMAP 0x020 /* This is an mmap page object */
+
+#define PGHDR_WAL_APPEND 0x040 /* Appended to wal file */
/* Initialize and shutdown the page cache subsystem */
SQLITE_PRIVATE int sqlite3PcacheInitialize(void);
@@ -11363,6 +14458,7 @@ SQLITE_PRIVATE void sqlite3PcacheDrop(PgHdr*); /* Remove page from cache
SQLITE_PRIVATE void sqlite3PcacheMakeDirty(PgHdr*); /* Make sure page is marked dirty */
SQLITE_PRIVATE void sqlite3PcacheMakeClean(PgHdr*); /* Mark a single page as clean */
SQLITE_PRIVATE void sqlite3PcacheCleanAll(PCache*); /* Mark all dirty list pages as clean */
+SQLITE_PRIVATE void sqlite3PcacheClearWritable(PCache*);
/* Change a page number. Used by incr-vacuum. */
SQLITE_PRIVATE void sqlite3PcacheMove(PgHdr*, Pgno);
@@ -11401,6 +14497,11 @@ SQLITE_PRIVATE int sqlite3PcachePagecount(PCache*);
SQLITE_PRIVATE void sqlite3PcacheIterateDirty(PCache *pCache, void (*xIter)(PgHdr *));
#endif
+#if defined(SQLITE_DEBUG)
+/* Check invariants on a PgHdr object */
+SQLITE_PRIVATE int sqlite3PcachePageSanity(PgHdr*);
+#endif
+
/* Set and get the suggested cache-size for the specified pager-cache.
**
** If no global maximum is configured, then the system attempts to limit
@@ -11437,11 +14538,13 @@ SQLITE_PRIVATE void sqlite3PCacheSetDefault(void);
SQLITE_PRIVATE int sqlite3HeaderSizePcache(void);
SQLITE_PRIVATE int sqlite3HeaderSizePcache1(void);
+/* Number of dirty pages as a percentage of the configured cache size */
+SQLITE_PRIVATE int sqlite3PCachePercentDirty(PCache*);
+
#endif /* _PCACHE_H_ */
/************** End of pcache.h **********************************************/
/************** Continuing where we left off in sqliteInt.h ******************/
-
/************** Include os.h in the middle of sqliteInt.h ********************/
/************** Begin file os.h **********************************************/
/*
@@ -11487,8 +14590,8 @@ SQLITE_PRIVATE int sqlite3HeaderSizePcache1(void);
** This file contains pre-processor directives related to operating system
** detection and/or setup.
*/
-#ifndef _OS_SETUP_H_
-#define _OS_SETUP_H_
+#ifndef SQLITE_OS_SETUP_H
+#define SQLITE_OS_SETUP_H
/*
** Figure out if we are dealing with Unix, Windows, or some other operating
@@ -11528,7 +14631,7 @@ SQLITE_PRIVATE int sqlite3HeaderSizePcache1(void);
# endif
#endif
-#endif /* _OS_SETUP_H_ */
+#endif /* SQLITE_OS_SETUP_H */
/************** End of os_setup.h ********************************************/
/************** Continuing where we left off in os.h *************************/
@@ -11667,7 +14770,7 @@ SQLITE_PRIVATE int sqlite3OsInit(void);
/*
** Functions for accessing sqlite3_file methods
*/
-SQLITE_PRIVATE int sqlite3OsClose(sqlite3_file*);
+SQLITE_PRIVATE void sqlite3OsClose(sqlite3_file*);
SQLITE_PRIVATE int sqlite3OsRead(sqlite3_file*, void*, int amt, i64 offset);
SQLITE_PRIVATE int sqlite3OsWrite(sqlite3_file*, const void*, int amt, i64 offset);
SQLITE_PRIVATE int sqlite3OsTruncate(sqlite3_file*, i64 size);
@@ -11681,10 +14784,12 @@ SQLITE_PRIVATE void sqlite3OsFileControlHint(sqlite3_file*,int,void*);
#define SQLITE_FCNTL_DB_UNCHANGED 0xca093fa0
SQLITE_PRIVATE int sqlite3OsSectorSize(sqlite3_file *id);
SQLITE_PRIVATE int sqlite3OsDeviceCharacteristics(sqlite3_file *id);
+#ifndef SQLITE_OMIT_WAL
SQLITE_PRIVATE int sqlite3OsShmMap(sqlite3_file *,int,int,int,void volatile **);
SQLITE_PRIVATE int sqlite3OsShmLock(sqlite3_file *id, int, int, int);
SQLITE_PRIVATE void sqlite3OsShmBarrier(sqlite3_file *id);
SQLITE_PRIVATE int sqlite3OsShmUnmap(sqlite3_file *id, int);
+#endif /* SQLITE_OMIT_WAL */
SQLITE_PRIVATE int sqlite3OsFetch(sqlite3_file *id, i64, int, void **);
SQLITE_PRIVATE int sqlite3OsUnfetch(sqlite3_file *, i64, void *);
@@ -11704,6 +14809,7 @@ SQLITE_PRIVATE void sqlite3OsDlClose(sqlite3_vfs *, void *);
#endif /* SQLITE_OMIT_LOAD_EXTENSION */
SQLITE_PRIVATE int sqlite3OsRandomness(sqlite3_vfs *, int, char *);
SQLITE_PRIVATE int sqlite3OsSleep(sqlite3_vfs *, int);
+SQLITE_PRIVATE int sqlite3OsGetLastError(sqlite3_vfs*);
SQLITE_PRIVATE int sqlite3OsCurrentTimeInt64(sqlite3_vfs *, sqlite3_int64*);
/*
@@ -11711,7 +14817,7 @@ SQLITE_PRIVATE int sqlite3OsCurrentTimeInt64(sqlite3_vfs *, sqlite3_int64*);
** sqlite3_malloc() to obtain space for the file-handle structure.
*/
SQLITE_PRIVATE int sqlite3OsOpenMalloc(sqlite3_vfs *, const char *, sqlite3_file **, int,int*);
-SQLITE_PRIVATE int sqlite3OsCloseFree(sqlite3_file *);
+SQLITE_PRIVATE void sqlite3OsCloseFree(sqlite3_file *);
#endif /* _SQLITE_OS_H_ */
@@ -11793,6 +14899,36 @@ SQLITE_PRIVATE int sqlite3OsCloseFree(sqlite3_file *);
/************** End of mutex.h ***********************************************/
/************** Continuing where we left off in sqliteInt.h ******************/
+/* The SQLITE_EXTRA_DURABLE compile-time option used to set the default
+** synchronous setting to EXTRA. It is no longer supported.
+*/
+#ifdef SQLITE_EXTRA_DURABLE
+# warning Use SQLITE_DEFAULT_SYNCHRONOUS=3 instead of SQLITE_EXTRA_DURABLE
+# define SQLITE_DEFAULT_SYNCHRONOUS 3
+#endif
+
+/*
+** Default synchronous levels.
+**
+** Note that (for historcal reasons) the PAGER_SYNCHRONOUS_* macros differ
+** from the SQLITE_DEFAULT_SYNCHRONOUS value by 1.
+**
+** PAGER_SYNCHRONOUS DEFAULT_SYNCHRONOUS
+** OFF 1 0
+** NORMAL 2 1
+** FULL 3 2
+** EXTRA 4 3
+**
+** The "PRAGMA synchronous" statement also uses the zero-based numbers.
+** In other words, the zero-based numbers are used for all external interfaces
+** and the one-based values are used internally.
+*/
+#ifndef SQLITE_DEFAULT_SYNCHRONOUS
+# define SQLITE_DEFAULT_SYNCHRONOUS 2
+#endif
+#ifndef SQLITE_DEFAULT_WAL_SYNCHRONOUS
+# define SQLITE_DEFAULT_WAL_SYNCHRONOUS SQLITE_DEFAULT_SYNCHRONOUS
+#endif
/*
** Each database file to be accessed by the system is an instance
@@ -11802,9 +14938,10 @@ SQLITE_PRIVATE int sqlite3OsCloseFree(sqlite3_file *);
** databases may be attached.
*/
struct Db {
- char *zName; /* Name of this database */
+ char *zDbSName; /* Name of this database. (schema name, not filename) */
Btree *pBt; /* The B*Tree structure for this database file */
u8 safety_level; /* How aggressive at syncing data to disk */
+ u8 bSyncSet; /* True if "PRAGMA synchronous=N" has been run */
Schema *pSchema; /* Pointer to database schema (possibly shared) */
};
@@ -11815,7 +14952,7 @@ struct Db {
** the Schema for the TEMP databaes (sqlite3.aDb[1]) which is free-standing.
** In shared cache mode, a single Schema object can be shared by multiple
** Btrees that refer to the same underlying BtShared object.
-**
+**
** Schema objects are automatically deallocated when the last Btree that
** references them is destroyed. The TEMP Schema is manually freed by
** sqlite3_close().
@@ -11840,7 +14977,7 @@ struct Schema {
};
/*
-** These macros can be used to test, set, or clear bits in the
+** These macros can be used to test, set, or clear bits in the
** Db.pSchema->flags field.
*/
#define DbHasProperty(D,I,P) (((D)->aDb[I].pSchema->schemaFlags&(P))==(P))
@@ -11861,6 +14998,7 @@ struct Schema {
#define DB_SchemaLoaded 0x0001 /* The schema has been loaded */
#define DB_UnresetViews 0x0002 /* Some views have defined column names */
#define DB_Empty 0x0004 /* The file is empty (length 0 bytes) */
+#define DB_ResetWanted 0x0008 /* Reset the schema when nSchemaLock==0 */
/*
** The number of different kinds of things that can be limited
@@ -11889,12 +15027,12 @@ struct Schema {
** lookaside allocations are not used to construct the schema objects.
*/
struct Lookaside {
+ u32 bDisable; /* Only operate the lookaside when zero */
u16 sz; /* Size of each buffer in bytes */
- u8 bEnabled; /* False to disable new lookaside allocations */
u8 bMalloced; /* True if pStart obtained from sqlite3_malloc() */
- int nOut; /* Number of buffers currently checked out */
- int mxOut; /* Highwater mark for nOut */
- int anStat[3]; /* 0: hits. 1: size misses. 2: full misses */
+ u32 nSlot; /* Number of lookaside slots allocated */
+ u32 anStat[3]; /* 0: hits. 1: size misses. 2: full misses */
+ LookasideSlot *pInit; /* List of buffers not previously used */
LookasideSlot *pFree; /* List of available buffers */
void *pStart; /* First byte of available memory space */
void *pEnd; /* First byte past end of available space */
@@ -11904,13 +15042,15 @@ struct LookasideSlot {
};
/*
-** A hash table for function definitions.
+** A hash table for built-in function definitions. (Application-defined
+** functions use a regular table table from hash.h.)
**
** Hash each FuncDef structure into one of the FuncDefHash.a[] slots.
-** Collisions are on the FuncDef.pHash chain.
+** Collisions are on the FuncDef.u.pHash chain.
*/
+#define SQLITE_FUNC_HASH_SZ 23
struct FuncDefHash {
- FuncDef *a[23]; /* Hash table for functions */
+ FuncDef *a[SQLITE_FUNC_HASH_SZ]; /* Hash table for functions */
};
#ifdef SQLITE_USER_AUTHENTICATION
@@ -11951,6 +15091,15 @@ SQLITE_PRIVATE void sqlite3CryptFunc(sqlite3_context*,int,sqlite3_value**);
const char*);
#endif
+#ifndef SQLITE_OMIT_DEPRECATED
+/* This is an extra SQLITE_TRACE macro that indicates "legacy" tracing
+** in the style of sqlite3_trace()
+*/
+#define SQLITE_TRACE_LEGACY 0x80
+#else
+#define SQLITE_TRACE_LEGACY 0
+#endif /* SQLITE_OMIT_DEPRECATED */
+
/*
** Each database connection is an instance of the following structure.
@@ -11962,22 +15111,29 @@ struct sqlite3 {
sqlite3_mutex *mutex; /* Connection mutex */
Db *aDb; /* All backends */
int nDb; /* Number of backends currently in use */
- int flags; /* Miscellaneous flags. See below */
+ u32 mDbFlags; /* flags recording internal state */
+ u32 flags; /* flags settable by pragmas. See below */
i64 lastRowid; /* ROWID of most recent insert (see above) */
i64 szMmap; /* Default mmap_size setting */
+ u32 nSchemaLock; /* Do not reset the schema when non-zero */
unsigned int openFlags; /* Flags passed to sqlite3_vfs.xOpen() */
int errCode; /* Most recent error code (SQLITE_*) */
int errMask; /* & result codes with this before returning */
+ int iSysErrno; /* Errno value from last system error */
u16 dbOptFlags; /* Flags to enable/disable optimizations */
u8 enc; /* Text encoding */
u8 autoCommit; /* The auto-commit flag. */
u8 temp_store; /* 1: file 2: memory 0: default */
u8 mallocFailed; /* True if we have seen a malloc failure */
+ u8 bBenignMalloc; /* Do not require OOMs if true */
u8 dfltLockMode; /* Default locking-mode for attached dbs */
signed char nextAutovac; /* Autovac setting after VACUUM if >=0 */
u8 suppressErr; /* Do not issue error messages if true */
u8 vtabOnConflict; /* Value to return for s3_vtab_on_conflict() */
u8 isTransactionSavepoint; /* True if the outermost savepoint is a TS */
+ u8 mTrace; /* zero or more SQLITE_TRACE flags */
+ u8 skipBtreeMutex; /* True if no shared-cache backends */
+ u8 nSqlExec; /* Number of pending OP_SqlExec opcodes */
int nextPagesize; /* Pagesize after VACUUM if >0 */
u32 magic; /* Magic number for detect library misuse */
int nChange; /* Value returned by sqlite3_changes() */
@@ -11998,16 +15154,23 @@ struct sqlite3 {
int nVDestroy; /* Number of active OP_VDestroy operations */
int nExtension; /* Number of loaded extensions */
void **aExtension; /* Array of shared library handles */
- void (*xTrace)(void*,const char*); /* Trace function */
+ int (*xTrace)(u32,void*,void*,void*); /* Trace function */
void *pTraceArg; /* Argument to the trace function */
void (*xProfile)(void*,const char*,u64); /* Profiling function */
void *pProfileArg; /* Argument to profile function */
- void *pCommitArg; /* Argument to xCommitCallback() */
+ void *pCommitArg; /* Argument to xCommitCallback() */
int (*xCommitCallback)(void*); /* Invoked at every commit. */
- void *pRollbackArg; /* Argument to xRollbackCallback() */
+ void *pRollbackArg; /* Argument to xRollbackCallback() */
void (*xRollbackCallback)(void*); /* Invoked at every commit. */
void *pUpdateArg;
void (*xUpdateCallback)(void*,int, const char*,const char*,sqlite_int64);
+#ifdef SQLITE_ENABLE_PREUPDATE_HOOK
+ void *pPreUpdateArg; /* First argument to xPreUpdateCallback */
+ void (*xPreUpdateCallback)( /* Registered using sqlite3_preupdate_hook() */
+ void*,sqlite3*,int,char const*,char const*,sqlite3_int64,sqlite3_int64
+ );
+ PreUpdate *pPreUpdate; /* Context for active pre-update callback */
+#endif /* SQLITE_ENABLE_PREUPDATE_HOOK */
#ifndef SQLITE_OMIT_WAL
int (*xWalCallback)(void *, sqlite3 *, const char *, int);
void *pWalArg;
@@ -12037,7 +15200,7 @@ struct sqlite3 {
VTable **aVTrans; /* Virtual tables with open transactions */
VTable *pDisconnect; /* Disconnect these in next sqlite3_prepare() */
#endif
- FuncDefHash aFunc; /* Hash table of connection functions */
+ Hash aFunc; /* Hash table of connection functions */
Hash aCollSeq; /* All collating sequences */
BusyHandler busyHandler; /* Busy callback */
Db aDbStatic[2]; /* Static space for the 2 default backends */
@@ -12049,8 +15212,8 @@ struct sqlite3 {
i64 nDeferredImmCons; /* Net deferred immediate constraints */
int *pnBytesFreed; /* If not NULL, increment this in DbFree() */
#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY
- /* The following variables are all protected by the STATIC_MASTER
- ** mutex, not by sqlite3.mutex. They are used by code in notify.c.
+ /* The following variables are all protected by the STATIC_MASTER
+ ** mutex, not by sqlite3.mutex. They are used by code in notify.c.
**
** When X.pUnlockConnection==Y, that means that X is waiting for Y to
** unlock so that it can proceed.
@@ -12078,40 +15241,54 @@ struct sqlite3 {
/*
** Possible values for the sqlite3.flags.
+**
+** Value constraints (enforced via assert()):
+** SQLITE_FullFSync == PAGER_FULLFSYNC
+** SQLITE_CkptFullFSync == PAGER_CKPT_FULLFSYNC
+** SQLITE_CacheSpill == PAGER_CACHE_SPILL
*/
-#define SQLITE_VdbeTrace 0x00000001 /* True to trace VDBE execution */
-#define SQLITE_InternChanges 0x00000002 /* Uncommitted Hash table changes */
-#define SQLITE_FullFSync 0x00000004 /* Use full fsync on the backend */
-#define SQLITE_CkptFullFSync 0x00000008 /* Use full fsync for checkpoint */
-#define SQLITE_CacheSpill 0x00000010 /* OK to spill pager cache */
-#define SQLITE_FullColNames 0x00000020 /* Show full column names on SELECT */
+#define SQLITE_WriteSchema 0x00000001 /* OK to update SQLITE_MASTER */
+#define SQLITE_LegacyFileFmt 0x00000002 /* Create new databases in format 1 */
+#define SQLITE_FullColNames 0x00000004 /* Show full column names on SELECT */
+#define SQLITE_FullFSync 0x00000008 /* Use full fsync on the backend */
+#define SQLITE_CkptFullFSync 0x00000010 /* Use full fsync for checkpoint */
+#define SQLITE_CacheSpill 0x00000020 /* OK to spill pager cache */
#define SQLITE_ShortColNames 0x00000040 /* Show short columns names */
#define SQLITE_CountRows 0x00000080 /* Count rows changed by INSERT, */
/* DELETE, or UPDATE and return */
/* the count using a callback. */
#define SQLITE_NullCallback 0x00000100 /* Invoke the callback once if the */
/* result set is empty */
-#define SQLITE_SqlTrace 0x00000200 /* Debug print SQL as it executes */
-#define SQLITE_VdbeListing 0x00000400 /* Debug listings of VDBE programs */
-#define SQLITE_WriteSchema 0x00000800 /* OK to update SQLITE_MASTER */
-#define SQLITE_VdbeAddopTrace 0x00001000 /* Trace sqlite3VdbeAddOp() calls */
-#define SQLITE_IgnoreChecks 0x00002000 /* Do not enforce check constraints */
-#define SQLITE_ReadUncommitted 0x0004000 /* For shared-cache mode */
-#define SQLITE_LegacyFileFmt 0x00008000 /* Create new databases in format 1 */
-#define SQLITE_RecoveryMode 0x00010000 /* Ignore schema errors */
-#define SQLITE_ReverseOrder 0x00020000 /* Reverse unordered SELECTs */
-#define SQLITE_RecTriggers 0x00040000 /* Enable recursive triggers */
-#define SQLITE_ForeignKeys 0x00080000 /* Enforce foreign key constraints */
-#define SQLITE_AutoIndex 0x00100000 /* Enable automatic indexes */
-#define SQLITE_PreferBuiltin 0x00200000 /* Preference to built-in funcs */
-#define SQLITE_LoadExtension 0x00400000 /* Enable load_extension */
-#define SQLITE_EnableTrigger 0x00800000 /* True to enable triggers */
-#define SQLITE_DeferFKs 0x01000000 /* Defer all FK constraints */
-#define SQLITE_QueryOnly 0x02000000 /* Disable database changes */
-#define SQLITE_VdbeEQP 0x04000000 /* Debug EXPLAIN QUERY PLAN */
-#define SQLITE_Vacuum 0x08000000 /* Currently in a VACUUM */
-#define SQLITE_CellSizeCk 0x10000000 /* Check btree cell sizes on load */
+#define SQLITE_IgnoreChecks 0x00000200 /* Do not enforce check constraints */
+#define SQLITE_ReadUncommit 0x00000400 /* READ UNCOMMITTED in shared-cache */
+#define SQLITE_NoCkptOnClose 0x00000800 /* No checkpoint on close()/DETACH */
+#define SQLITE_ReverseOrder 0x00001000 /* Reverse unordered SELECTs */
+#define SQLITE_RecTriggers 0x00002000 /* Enable recursive triggers */
+#define SQLITE_ForeignKeys 0x00004000 /* Enforce foreign key constraints */
+#define SQLITE_AutoIndex 0x00008000 /* Enable automatic indexes */
+#define SQLITE_LoadExtension 0x00010000 /* Enable load_extension */
+#define SQLITE_LoadExtFunc 0x00020000 /* Enable load_extension() SQL func */
+#define SQLITE_EnableTrigger 0x00040000 /* True to enable triggers */
+#define SQLITE_DeferFKs 0x00080000 /* Defer all FK constraints */
+#define SQLITE_QueryOnly 0x00100000 /* Disable database changes */
+#define SQLITE_CellSizeCk 0x00200000 /* Check btree cell sizes on load */
+#define SQLITE_Fts3Tokenizer 0x00400000 /* Enable fts3_tokenizer(2) */
+#define SQLITE_EnableQPSG 0x00800000 /* Query Planner Stability Guarantee */
+/* Flags used only if debugging */
+#ifdef SQLITE_DEBUG
+#define SQLITE_SqlTrace 0x08000000 /* Debug print SQL as it executes */
+#define SQLITE_VdbeListing 0x10000000 /* Debug listings of VDBE programs */
+#define SQLITE_VdbeTrace 0x20000000 /* True to trace VDBE execution */
+#define SQLITE_VdbeAddopTrace 0x40000000 /* Trace sqlite3VdbeAddOp() calls */
+#define SQLITE_VdbeEQP 0x80000000 /* Debug EXPLAIN QUERY PLAN */
+#endif
+/*
+** Allowed values for sqlite3.mDbFlags
+*/
+#define DBFLAG_SchemaChange 0x0001 /* Uncommitted Hash table changes */
+#define DBFLAG_PreferBuiltin 0x0002 /* Preference to built-in funcs */
+#define DBFLAG_Vacuum 0x0004 /* Currently in a VACUUM */
/*
** Bits of the sqlite3.dbOptFlags field that are used by the
@@ -12122,27 +15299,22 @@ struct sqlite3 {
#define SQLITE_ColumnCache 0x0002 /* Column cache */
#define SQLITE_GroupByOrder 0x0004 /* GROUPBY cover of ORDERBY */
#define SQLITE_FactorOutConst 0x0008 /* Constant factoring */
-/* not used 0x0010 // Was: SQLITE_IdxRealAsInt */
-#define SQLITE_DistinctOpt 0x0020 /* DISTINCT using indexes */
-#define SQLITE_CoverIdxScan 0x0040 /* Covering index scans */
-#define SQLITE_OrderByIdxJoin 0x0080 /* ORDER BY of joins via index */
-#define SQLITE_SubqCoroutine 0x0100 /* Evaluate subqueries as coroutines */
-#define SQLITE_Transitive 0x0200 /* Transitive constraints */
-#define SQLITE_OmitNoopJoin 0x0400 /* Omit unused tables in joins */
+#define SQLITE_DistinctOpt 0x0010 /* DISTINCT using indexes */
+#define SQLITE_CoverIdxScan 0x0020 /* Covering index scans */
+#define SQLITE_OrderByIdxJoin 0x0040 /* ORDER BY of joins via index */
+#define SQLITE_Transitive 0x0080 /* Transitive constraints */
+#define SQLITE_OmitNoopJoin 0x0100 /* Omit unused tables in joins */
+#define SQLITE_CountOfView 0x0200 /* The count-of-view optimization */
+#define SQLITE_CursorHints 0x0400 /* Add OP_CursorHint opcodes */
#define SQLITE_Stat34 0x0800 /* Use STAT3 or STAT4 data */
-#define SQLITE_CursorHints 0x2000 /* Add OP_CursorHint opcodes */
+ /* TH3 expects the Stat34 ^^^^^^ value to be 0x0800. Don't change it */
#define SQLITE_AllOpts 0xffff /* All optimizations */
/*
** Macros for testing whether or not optimizations are enabled or disabled.
*/
-#ifndef SQLITE_OMIT_BUILTIN_TEST
#define OptimizationDisabled(db, mask) (((db)->dbOptFlags&(mask))!=0)
#define OptimizationEnabled(db, mask) (((db)->dbOptFlags&(mask))==0)
-#else
-#define OptimizationDisabled(db, mask) 0
-#define OptimizationEnabled(db, mask) 1
-#endif
/*
** Return true if it OK to factor constant expressions into the initialization
@@ -12164,28 +15336,33 @@ struct sqlite3 {
/*
** Each SQL function is defined by an instance of the following
-** structure. A pointer to this structure is stored in the sqlite.aFunc
-** hash table. When multiple functions have the same name, the hash table
-** points to a linked list of these structures.
+** structure. For global built-in functions (ex: substr(), max(), count())
+** a pointer to this structure is held in the sqlite3BuiltinFunctions object.
+** For per-connection application-defined functions, a pointer to this
+** structure is held in the db->aHash hash table.
+**
+** The u.pHash field is used by the global built-ins. The u.pDestructor
+** field is used by per-connection app-def functions.
*/
struct FuncDef {
- i16 nArg; /* Number of arguments. -1 means unlimited */
+ i8 nArg; /* Number of arguments. -1 means unlimited */
u16 funcFlags; /* Some combination of SQLITE_FUNC_* */
void *pUserData; /* User data parameter */
FuncDef *pNext; /* Next function with same name */
- void (*xFunc)(sqlite3_context*,int,sqlite3_value**); /* Regular function */
- void (*xStep)(sqlite3_context*,int,sqlite3_value**); /* Aggregate step */
- void (*xFinalize)(sqlite3_context*); /* Aggregate finalizer */
- char *zName; /* SQL name of the function. */
- FuncDef *pHash; /* Next with a different name but the same hash */
- FuncDestructor *pDestructor; /* Reference counted destructor function */
+ void (*xSFunc)(sqlite3_context*,int,sqlite3_value**); /* func or agg-step */
+ void (*xFinalize)(sqlite3_context*); /* Agg finalizer */
+ const char *zName; /* SQL name of the function. */
+ union {
+ FuncDef *pHash; /* Next with a different name but the same hash */
+ FuncDestructor *pDestructor; /* Reference counted destructor function */
+ } u;
};
/*
** This structure encapsulates a user-function destructor callback (as
** configured using create_function_v2()) and a reference counter. When
** create_function_v2() is called to create a function with a destructor,
-** a single object of this type is allocated. FuncDestructor.nRef is set to
+** a single object of this type is allocated. FuncDestructor.nRef is set to
** the number of FuncDef objects created (either 1 or 3, depending on whether
** or not the specified encoding is SQLITE_ANY). The FuncDef.pDestructor
** member of each of the new FuncDef objects is set to point to the allocated
@@ -12206,6 +15383,13 @@ struct FuncDestructor {
** values must correspond to OPFLAG_LENGTHARG and OPFLAG_TYPEOFARG. And
** SQLITE_FUNC_CONSTANT must be the same as SQLITE_DETERMINISTIC. There
** are assert() statements in the code to verify this.
+**
+** Value constraints (enforced via assert()):
+** SQLITE_FUNC_MINMAX == NC_MinMaxAgg == SF_MinMaxAgg
+** SQLITE_FUNC_LENGTH == OPFLAG_LENGTHARG
+** SQLITE_FUNC_TYPEOF == OPFLAG_TYPEOFARG
+** SQLITE_FUNC_CONSTANT == SQLITE_DETERMINISTIC from the API
+** SQLITE_FUNC_ENCMASK depends on SQLITE_UTF* macros in the API
*/
#define SQLITE_FUNC_ENCMASK 0x0003 /* SQLITE_UTF8, SQLITE_UTF16BE or UTF16LE */
#define SQLITE_FUNC_LIKE 0x0004 /* Candidate for the LIKE optimization */
@@ -12221,16 +15405,17 @@ struct FuncDestructor {
#define SQLITE_FUNC_MINMAX 0x1000 /* True for min() and max() aggregates */
#define SQLITE_FUNC_SLOCHNG 0x2000 /* "Slow Change". Value constant during a
** single query - might change over time */
+#define SQLITE_FUNC_AFFINITY 0x4000 /* Built-in affinity() function */
/*
** The following three macros, FUNCTION(), LIKEFUNC() and AGGREGATE() are
** used to create the initializers for the FuncDef structures.
**
** FUNCTION(zName, nArg, iArg, bNC, xFunc)
-** Used to create a scalar function definition of a function zName
+** Used to create a scalar function definition of a function zName
** implemented by C function xFunc that accepts nArg arguments. The
** value passed as iArg is cast to a (void*) and made available
-** as the user-data (sqlite3_user_data()) for the function. If
+** as the user-data (sqlite3_user_data()) for the function. If
** argument bNC is true, then the SQLITE_FUNC_NEEDCOLL flag is set.
**
** VFUNCTION(zName, nArg, iArg, bNC, xFunc)
@@ -12240,7 +15425,14 @@ struct FuncDestructor {
** Like FUNCTION except it omits the SQLITE_FUNC_CONSTANT flag and
** adds the SQLITE_FUNC_SLOCHNG flag. Used for date & time functions
** and functions like sqlite_version() that can change, but not during
-** a single query.
+** a single query. The iArg is ignored. The user-data is always set
+** to a NULL pointer. The bNC parameter is not used.
+**
+** PURE_DATE(zName, nArg, iArg, bNC, xFunc)
+** Used for "pure" date/time functions, this macro is like DFUNCTION
+** except that it does set the SQLITE_FUNC_CONSTANT flags. iArg is
+** ignored and the user-data for these functions is set to an
+** arbitrary non-NULL pointer. The bNC parameter is not used.
**
** AGGREGATE(zName, nArg, iArg, bNC, xStep, xFinal)
** Used to create an aggregate function definition implemented by
@@ -12249,8 +15441,8 @@ struct FuncDestructor {
** FUNCTION().
**
** LIKEFUNC(zName, nArg, pArg, flags)
-** Used to create a scalar function definition of a function zName
-** that accepts nArg arguments and is implemented by a call to C
+** Used to create a scalar function definition of a function zName
+** that accepts nArg arguments and is implemented by a call to C
** function likeFunc. Argument pArg is cast to a (void *) and made
** available as the function user-data (sqlite3_user_data()). The
** FuncDef.flags variable is set to the value passed as the flags
@@ -12258,28 +15450,31 @@ struct FuncDestructor {
*/
#define FUNCTION(zName, nArg, iArg, bNC, xFunc) \
{nArg, SQLITE_FUNC_CONSTANT|SQLITE_UTF8|(bNC*SQLITE_FUNC_NEEDCOLL), \
- SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, #zName, 0, 0}
+ SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, #zName, {0} }
#define VFUNCTION(zName, nArg, iArg, bNC, xFunc) \
{nArg, SQLITE_UTF8|(bNC*SQLITE_FUNC_NEEDCOLL), \
- SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, #zName, 0, 0}
+ SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, #zName, {0} }
#define DFUNCTION(zName, nArg, iArg, bNC, xFunc) \
- {nArg, SQLITE_FUNC_SLOCHNG|SQLITE_UTF8|(bNC*SQLITE_FUNC_NEEDCOLL), \
- SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, #zName, 0, 0}
+ {nArg, SQLITE_FUNC_SLOCHNG|SQLITE_UTF8, \
+ 0, 0, xFunc, 0, #zName, {0} }
+#define PURE_DATE(zName, nArg, iArg, bNC, xFunc) \
+ {nArg, SQLITE_FUNC_SLOCHNG|SQLITE_UTF8|SQLITE_FUNC_CONSTANT, \
+ (void*)&sqlite3Config, 0, xFunc, 0, #zName, {0} }
#define FUNCTION2(zName, nArg, iArg, bNC, xFunc, extraFlags) \
{nArg,SQLITE_FUNC_CONSTANT|SQLITE_UTF8|(bNC*SQLITE_FUNC_NEEDCOLL)|extraFlags,\
- SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, #zName, 0, 0}
+ SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, #zName, {0} }
#define STR_FUNCTION(zName, nArg, pArg, bNC, xFunc) \
{nArg, SQLITE_FUNC_SLOCHNG|SQLITE_UTF8|(bNC*SQLITE_FUNC_NEEDCOLL), \
- pArg, 0, xFunc, 0, 0, #zName, 0, 0}
+ pArg, 0, xFunc, 0, #zName, }
#define LIKEFUNC(zName, nArg, arg, flags) \
{nArg, SQLITE_FUNC_CONSTANT|SQLITE_UTF8|flags, \
- (void *)arg, 0, likeFunc, 0, 0, #zName, 0, 0}
+ (void *)arg, 0, likeFunc, 0, #zName, {0} }
#define AGGREGATE(zName, nArg, arg, nc, xStep, xFinal) \
{nArg, SQLITE_UTF8|(nc*SQLITE_FUNC_NEEDCOLL), \
- SQLITE_INT_TO_PTR(arg), 0, 0, xStep,xFinal,#zName,0,0}
+ SQLITE_INT_TO_PTR(arg), 0, xStep,xFinal,#zName, {0}}
#define AGGREGATE2(zName, nArg, arg, nc, xStep, xFinal, extraFlags) \
{nArg, SQLITE_UTF8|(nc*SQLITE_FUNC_NEEDCOLL)|extraFlags, \
- SQLITE_INT_TO_PTR(arg), 0, 0, xStep,xFinal,#zName,0,0}
+ SQLITE_INT_TO_PTR(arg), 0, xStep,xFinal,#zName, {0}}
/*
** All current savepoints are stored in a linked list starting at
@@ -12321,10 +15516,8 @@ struct Module {
** of this structure.
*/
struct Column {
- char *zName; /* Name of this column */
+ char *zName; /* Name of this column, \000, then the type */
Expr *pDflt; /* Default value of this column */
- char *zDflt; /* Original text of the default value */
- char *zType; /* Data type for this column */
char *zColl; /* Collating sequence. If NULL, use the default */
u8 notNull; /* An OE_ code for handling a NOT NULL constraint */
char affinity; /* One of the SQLITE_AFF_... values */
@@ -12336,6 +15529,7 @@ struct Column {
*/
#define COLFLAG_PRIMKEY 0x0001 /* Column is part of the primary key */
#define COLFLAG_HIDDEN 0x0002 /* A hidden column in a virtual table */
+#define COLFLAG_HASTYPE 0x0004 /* Type name follows column name */
/*
** A "Collating Sequence" is defined by an instance of the following
@@ -12366,7 +15560,7 @@ struct CollSeq {
**
** These used to have mnemonic name like 'i' for SQLITE_AFF_INTEGER and
** 't' for SQLITE_AFF_TEXT. But we can save a little space and improve
-** the speed a little by numbering the values consecutively.
+** the speed a little by numbering the values consecutively.
**
** But rather than start with 0 or 1, we begin with 'A'. That way,
** when multiple affinity types are concatenated into a string and
@@ -12385,7 +15579,7 @@ struct CollSeq {
/*
** The SQLITE_AFF_MASK values masks off the significant bits of an
-** affinity value.
+** affinity value.
*/
#define SQLITE_AFF_MASK 0x47
@@ -12398,6 +15592,7 @@ struct CollSeq {
** operator is NULL. It is added to certain comparison operators to
** prove that the operands are always NOT NULL.
*/
+#define SQLITE_KEEPNULL 0x08 /* Used by vector == or <> */
#define SQLITE_JUMPIFNULL 0x10 /* jumps if either operand is NULL */
#define SQLITE_STOREP2 0x20 /* Store result in reg[P2] rather than jump */
#define SQLITE_NULLEQ 0x80 /* NULL=NULL */
@@ -12405,20 +15600,20 @@ struct CollSeq {
/*
** An object of this type is created for each virtual table present in
-** the database schema.
+** the database schema.
**
** If the database schema is shared, then there is one instance of this
** structure for each database connection (sqlite3*) that uses the shared
** schema. This is because each database connection requires its own unique
-** instance of the sqlite3_vtab* handle used to access the virtual table
-** implementation. sqlite3_vtab* handles can not be shared between
-** database connections, even when the rest of the in-memory database
+** instance of the sqlite3_vtab* handle used to access the virtual table
+** implementation. sqlite3_vtab* handles can not be shared between
+** database connections, even when the rest of the in-memory database
** schema is shared, as the implementation often stores the database
** connection handle passed to it via the xConnect() or xCreate() method
** during initialization internally. This database connection handle may
-** then be used by the virtual table implementation to access real tables
-** within the database. So that they appear as part of the callers
-** transaction, these accesses need to be made via the same database
+** then be used by the virtual table implementation to access real tables
+** within the database. So that they appear as part of the callers
+** transaction, these accesses need to be made via the same database
** connection as that used to execute SQL operations on the virtual table.
**
** All VTable objects that correspond to a single table in a shared
@@ -12430,19 +15625,19 @@ struct CollSeq {
** sqlite3_vtab* handle in the compiled query.
**
** When an in-memory Table object is deleted (for example when the
-** schema is being reloaded for some reason), the VTable objects are not
-** deleted and the sqlite3_vtab* handles are not xDisconnect()ed
+** schema is being reloaded for some reason), the VTable objects are not
+** deleted and the sqlite3_vtab* handles are not xDisconnect()ed
** immediately. Instead, they are moved from the Table.pVTable list to
** another linked list headed by the sqlite3.pDisconnect member of the
-** corresponding sqlite3 structure. They are then deleted/xDisconnected
+** corresponding sqlite3 structure. They are then deleted/xDisconnected
** next time a statement is prepared using said sqlite3*. This is done
** to avoid deadlock issues involving multiple sqlite3.mutex mutexes.
** Refer to comments above function sqlite3VtabUnlockList() for an
** explanation as to why it is safe to add an entry to an sqlite3.pDisconnect
** list without holding the corresponding sqlite3.mutex mutex.
**
-** The memory for objects of this type is always allocated by
-** sqlite3DbMalloc(), using the connection handle stored in VTable.db as
+** The memory for objects of this type is always allocated by
+** sqlite3DbMalloc(), using the connection handle stored in VTable.db as
** the first argument.
*/
struct VTable {
@@ -12469,15 +15664,15 @@ struct Table {
ExprList *pCheck; /* All CHECK constraints */
/* ... also used as column name list in a VIEW */
int tnum; /* Root BTree page for this table */
+ u32 nTabRef; /* Number of pointers to this Table */
+ u32 tabFlags; /* Mask of TF_* values */
i16 iPKey; /* If not negative, use aCol[iPKey] as the rowid */
i16 nCol; /* Number of columns in this table */
- u16 nRef; /* Number of pointers to this Table */
LogEst nRowLogEst; /* Estimated rows in table - from sqlite_stat1 table */
LogEst szTabRow; /* Estimated size of each table row in bytes */
#ifdef SQLITE_ENABLE_COSTMULT
LogEst costMult; /* Cost multiplier for using this table */
#endif
- u8 tabFlags; /* Mask of TF_* values */
u8 keyConf; /* What to do in case of uniqueness conflict on iPKey */
#ifndef SQLITE_OMIT_ALTERTABLE
int addColOffset; /* Offset in CREATE TABLE stmt to add a new column */
@@ -12501,15 +15696,17 @@ struct Table {
** the TF_OOOHidden attribute would apply in this case. Such tables require
** special handling during INSERT processing.
*/
-#define TF_Readonly 0x01 /* Read-only system table */
-#define TF_Ephemeral 0x02 /* An ephemeral table */
-#define TF_HasPrimaryKey 0x04 /* Table has a primary key */
-#define TF_Autoincrement 0x08 /* Integer primary key is autoincrement */
-#define TF_Virtual 0x10 /* Is a virtual table */
-#define TF_WithoutRowid 0x20 /* No rowid. PRIMARY KEY is the key */
-#define TF_NoVisibleRowid 0x40 /* No user-visible "rowid" column */
-#define TF_OOOHidden 0x80 /* Out-of-Order hidden columns */
-
+#define TF_Readonly 0x0001 /* Read-only system table */
+#define TF_Ephemeral 0x0002 /* An ephemeral table */
+#define TF_HasPrimaryKey 0x0004 /* Table has a primary key */
+#define TF_Autoincrement 0x0008 /* Integer primary key is autoincrement */
+#define TF_HasStat1 0x0010 /* nRowLogEst set from sqlite_stat1 */
+#define TF_WithoutRowid 0x0020 /* No rowid. PRIMARY KEY is the key */
+#define TF_NoVisibleRowid 0x0040 /* No user-visible "rowid" column */
+#define TF_OOOHidden 0x0080 /* Out-of-Order hidden columns */
+#define TF_StatsUsed 0x0100 /* Query planner decisions affected by
+ ** Index.aiRowLogEst[] values */
+#define TF_HasNotNull 0x0200 /* Contains NOT NULL constraints */
/*
** Test to see whether or not a table is a virtual table. This is
@@ -12517,7 +15714,7 @@ struct Table {
** table support is omitted from the build.
*/
#ifndef SQLITE_OMIT_VIRTUALTABLE
-# define IsVirtual(X) (((X)->tabFlags & TF_Virtual)!=0)
+# define IsVirtual(X) ((X)->nModuleArg)
#else
# define IsVirtual(X) 0
#endif
@@ -12610,7 +15807,7 @@ struct FKey {
** key is set to NULL. CASCADE means that a DELETE or UPDATE of the
** referenced table row is propagated into the row that holds the
** foreign key.
-**
+**
** The following symbolic values are used to record which type
** of action to take.
*/
@@ -12631,7 +15828,7 @@ struct FKey {
/*
** An instance of the following structure is passed as the first
-** argument to sqlite3VdbeKeyCompare and is used to control the
+** argument to sqlite3VdbeKeyCompare and is used to control the
** comparison of the two index keys.
**
** Note that aSortOrder[] and aColl[] have nField+1 slots. There
@@ -12641,8 +15838,8 @@ struct FKey {
struct KeyInfo {
u32 nRef; /* Number of references to this KeyInfo object */
u8 enc; /* Text encoding - one of the SQLITE_UTF* values */
- u16 nField; /* Number of key columns in the index */
- u16 nXField; /* Number of columns beyond the key columns */
+ u16 nKeyField; /* Number of key columns in the index */
+ u16 nAllField; /* Total columns, including key plus others */
sqlite3 *db; /* The database connection */
u8 *aSortOrder; /* Sort order for each column. */
CollSeq *aColl[1]; /* Collating sequence for each term of the key */
@@ -12672,7 +15869,7 @@ struct KeyInfo {
** The key comparison functions actually return default_rc when they find
** an equals comparison. default_rc can be -1, 0, or +1. If there are
** multiple entries in the b-tree with the same key (when only looking
-** at the first pKeyInfo->nFields,) then default_rc can be set to -1 to
+** at the first pKeyInfo->nFields,) then default_rc can be set to -1 to
** cause the search to find the last match, or +1 to cause the search to
** find the first match.
**
@@ -12689,8 +15886,8 @@ struct UnpackedRecord {
u16 nField; /* Number of entries in apMem[] */
i8 default_rc; /* Comparison result if keys are equal */
u8 errCode; /* Error detected by xRecordCompare (CORRUPT or NOMEM) */
- i8 r1; /* Value to return if (lhs > rhs) */
- i8 r2; /* Value to return if (rhs < lhs) */
+ i8 r1; /* Value to return if (lhs < rhs) */
+ i8 r2; /* Value to return if (lhs > rhs) */
u8 eqSeen; /* True if an equality comparison has been seen */
};
@@ -12709,7 +15906,7 @@ struct UnpackedRecord {
** In the Table structure describing Ex1, nCol==3 because there are
** three columns in the table. In the Index structure describing
** Ex2, nColumn==2 since 2 of the 3 columns of Ex1 are indexed.
-** The value of aiColumn is {2, 0}. aiColumn[0]==2 because the
+** The value of aiColumn is {2, 0}. aiColumn[0]==2 because the
** first column to be indexed (c3) has an index of 2 in Ex1.aCol[].
** The second column to be indexed (c1) has an index of 0 in
** Ex1.aCol[], hence Ex2.aiColumn[1]==0.
@@ -12717,7 +15914,7 @@ struct UnpackedRecord {
** The Index.onError field determines whether or not the indexed columns
** must be unique and what to do if they are not. When Index.onError=OE_None,
** it means this is not a unique index. Otherwise it is a unique index
-** and the value of Index.onError indicate the which conflict resolution
+** and the value of Index.onError indicate the which conflict resolution
** algorithm to employ whenever an attempt is made to insert a non-unique
** element.
**
@@ -12752,6 +15949,7 @@ struct Index {
unsigned isResized:1; /* True if resizeIndexObject() has been called */
unsigned isCovering:1; /* True if this is a covering index */
unsigned noSkipScan:1; /* Do not try to use skip-scan if true */
+ unsigned hasStat1:1; /* aiRowLogEst values come from sqlite_stat1 */
#ifdef SQLITE_ENABLE_STAT3_OR_STAT4
int nSample; /* Number of elements in aSample[] */
int nSampleCol; /* Size of IndexSample.anEq[] and so on */
@@ -12782,7 +15980,7 @@ struct Index {
#define XN_EXPR (-2) /* Indexed column is an expression */
/*
-** Each sample stored in the sqlite_stat3 table is represented in memory
+** Each sample stored in the sqlite_stat3 table is represented in memory
** using a structure of this type. See documentation at the top of the
** analyze.c source file for additional information.
*/
@@ -12877,9 +16075,9 @@ typedef int ynVar;
** to represent the greater-than-or-equal-to operator in the expression
** tree.
**
-** If the expression is an SQL literal (TK_INTEGER, TK_FLOAT, TK_BLOB,
+** If the expression is an SQL literal (TK_INTEGER, TK_FLOAT, TK_BLOB,
** or TK_STRING), then Expr.token contains the text of the SQL literal. If
-** the expression is a variable (TK_VARIABLE), then Expr.token contains the
+** the expression is a variable (TK_VARIABLE), then Expr.token contains the
** variable name. Finally, if the expression is an SQL function (TK_FUNCTION),
** then Expr.token contains the name of the function.
**
@@ -12890,7 +16088,7 @@ typedef int ynVar;
** a CASE expression or an IN expression of the form " IN (, ...)".
** Expr.x.pSelect is used if the expression is a sub-select or an expression of
** the form " IN (SELECT ...)". If the EP_xIsSelect bit is set in the
-** Expr.flags mask, then Expr.x.pSelect is valid. Otherwise, Expr.x.pList is
+** Expr.flags mask, then Expr.x.pSelect is valid. Otherwise, Expr.x.pList is
** valid.
**
** An expression of the form ID or ID.ID refers to a column in a table.
@@ -12901,8 +16099,8 @@ typedef int ynVar;
** value is also stored in the Expr.iAgg column in the aggregate so that
** it can be accessed after all aggregates are computed.
**
-** If the expression is an unbound variable marker (a question mark
-** character '?' in the original SQL) then the Expr.iTable holds the index
+** If the expression is an unbound variable marker (a question mark
+** character '?' in the original SQL) then the Expr.iTable holds the index
** number for that variable.
**
** If the expression is a subquery then Expr.iColumn holds an integer
@@ -12941,7 +16139,7 @@ struct Expr {
/* If the EP_TokenOnly flag is set in the Expr.flags mask, then no
** space is allocated for the fields below this point. An attempt to
- ** access them will result in a segfault or malfunction.
+ ** access them will result in a segfault or malfunction.
*********************************************************************/
Expr *pLeft; /* Left subnode */
@@ -12962,16 +16160,19 @@ struct Expr {
int iTable; /* TK_COLUMN: cursor number of table holding column
** TK_REGISTER: register number
** TK_TRIGGER: 1 -> new, 0 -> old
- ** EP_Unlikely: 134217728 times likelihood */
+ ** EP_Unlikely: 134217728 times likelihood
+ ** TK_SELECT: 1st register of result vector */
ynVar iColumn; /* TK_COLUMN: column index. -1 for rowid.
- ** TK_VARIABLE: variable number (always >= 1). */
+ ** TK_VARIABLE: variable number (always >= 1).
+ ** TK_SELECT_COLUMN: column of the result vector */
i16 iAgg; /* Which entry in pAggInfo->aCol[] or ->aFunc[] */
i16 iRightJoinTable; /* If EP_FromJoin, the right table of the join */
u8 op2; /* TK_REGISTER: original value of Expr.op
** TK_COLUMN: the value of p5 for OP_Column
** TK_AGG_FUNCTION: nesting depth */
AggInfo *pAggInfo; /* Used by TK_AGG_COLUMN and TK_AGG_FUNCTION */
- Table *pTab; /* Table for TK_COLUMN expressions. */
+ Table *pTab; /* Table for TK_COLUMN expressions. Can be NULL
+ ** for a column of an index on an expression */
};
/*
@@ -12979,8 +16180,8 @@ struct Expr {
*/
#define EP_FromJoin 0x000001 /* Originates in ON/USING clause of outer join */
#define EP_Agg 0x000002 /* Contains one or more aggregate functions */
-#define EP_Resolved 0x000004 /* IDs have been resolved to COLUMNs */
-#define EP_Error 0x000008 /* Expression contains one or more errors */
+ /* 0x000004 // available for use */
+ /* 0x000008 // available for use */
#define EP_Distinct 0x000010 /* Aggregate function with DISTINCT keyword */
#define EP_VarSelect 0x000020 /* pSelect is correlated, not constant */
#define EP_DblQuoted 0x000040 /* token.z was originally in "..." */
@@ -13000,6 +16201,7 @@ struct Expr {
#define EP_CanBeNull 0x100000 /* Can be null despite NOT NULL constraint */
#define EP_Subquery 0x200000 /* Tree contains a TK_SELECT operator */
#define EP_Alias 0x400000 /* Is an alias for a result set column */
+#define EP_Leaf 0x800000 /* Expr.pLeft, .pRight, .u.pSelect all NULL */
/*
** Combinations of two or more EP_* flags
@@ -13007,7 +16209,7 @@ struct Expr {
#define EP_Propagate (EP_Collate|EP_Subquery) /* Propagate these bits up tree */
/*
-** These macros can be used to test, set, or clear bits in the
+** These macros can be used to test, set, or clear bits in the
** Expr.flags field.
*/
#define ExprHasProperty(E,P) (((E)->flags&(P))!=0)
@@ -13026,8 +16228,8 @@ struct Expr {
#endif
/*
-** Macros to determine the number of bytes required by a normal Expr
-** struct, an Expr struct with the EP_Reduced flag set in Expr.flags
+** Macros to determine the number of bytes required by a normal Expr
+** struct, an Expr struct with the EP_Reduced flag set in Expr.flags
** and an Expr struct with the EP_TokenOnly flag set.
*/
#define EXPR_FULLSIZE sizeof(Expr) /* Full size */
@@ -13035,7 +16237,7 @@ struct Expr {
#define EXPR_TOKENONLYSIZE offsetof(Expr,pLeft) /* Fewer features */
/*
-** Flags passed to the sqlite3ExprDup() function. See the header comment
+** Flags passed to the sqlite3ExprDup() function. See the header comment
** above sqlite3ExprDup() for details.
*/
#define EXPRDUP_REDUCE 0x0001 /* Used reduced-size Expr nodes */
@@ -13059,7 +16261,7 @@ struct Expr {
struct ExprList {
int nExpr; /* Number of expressions on the list */
struct ExprList_item { /* For each expression in the list */
- Expr *pExpr; /* The list of expressions */
+ Expr *pExpr; /* The parse tree for this expression */
char *zName; /* Token associated with this expression */
char *zSpan; /* Original text of the expression */
u8 sortOrder; /* 1 for DESC or 0 for ASC */
@@ -13073,7 +16275,7 @@ struct ExprList {
} x;
int iConstExprReg; /* Register in which Expr value is cached */
} u;
- } *a; /* Alloc a power of two greater or equal to nExpr */
+ } a[1]; /* One slot for each expression in the list */
};
/*
@@ -13117,7 +16319,11 @@ struct IdList {
** tables in a join to 32 instead of 64. But it also reduces the size
** of the library by 738 bytes on ix86.
*/
-typedef u64 Bitmask;
+#ifdef SQLITE_BITMASK_TYPE
+ typedef SQLITE_BITMASK_TYPE Bitmask;
+#else
+ typedef u64 Bitmask;
+#endif
/*
** The number of bits in a Bitmask. "BMS" means "BitMask Size".
@@ -13129,6 +16335,7 @@ typedef u64 Bitmask;
*/
#define MASKBIT(n) (((Bitmask)1)<<(n))
#define MASKBIT32(n) (((unsigned int)1)<<(n))
+#define ALLBITS ((Bitmask)-1)
/*
** The following structure describes the FROM clause of a SELECT statement.
@@ -13163,7 +16370,7 @@ struct SrcList {
int regReturn; /* Register holding return address of addrFillSub */
int regResult; /* Registers holding results of a co-routine */
struct {
- u8 jointype; /* Type of join between this able and the previous */
+ u8 jointype; /* Type of join between this table and the previous */
unsigned notIndexed :1; /* True if there is a NOT INDEXED clause */
unsigned isIndexedBy :1; /* True if there is an INDEXED BY clause */
unsigned isTabFunc :1; /* True if table-valued-function syntax */
@@ -13201,22 +16408,28 @@ struct SrcList {
/*
** Flags appropriate for the wctrlFlags parameter of sqlite3WhereBegin()
** and the WhereInfo.wctrlFlags member.
+**
+** Value constraints (enforced via assert()):
+** WHERE_USE_LIMIT == SF_FixedLimit
*/
#define WHERE_ORDERBY_NORMAL 0x0000 /* No-op */
#define WHERE_ORDERBY_MIN 0x0001 /* ORDER BY processing for min() func */
#define WHERE_ORDERBY_MAX 0x0002 /* ORDER BY processing for max() func */
#define WHERE_ONEPASS_DESIRED 0x0004 /* Want to do one-pass UPDATE/DELETE */
-#define WHERE_DUPLICATES_OK 0x0008 /* Ok to return a row more than once */
-#define WHERE_OMIT_OPEN_CLOSE 0x0010 /* Table cursors are already open */
-#define WHERE_FORCE_TABLE 0x0020 /* Do not use an index-only search */
-#define WHERE_ONETABLE_ONLY 0x0040 /* Only code the 1st table in pTabList */
-#define WHERE_NO_AUTOINDEX 0x0080 /* Disallow automatic indexes */
-#define WHERE_GROUPBY 0x0100 /* pOrderBy is really a GROUP BY */
-#define WHERE_DISTINCTBY 0x0200 /* pOrderby is really a DISTINCT clause */
-#define WHERE_WANT_DISTINCT 0x0400 /* All output needs to be distinct */
-#define WHERE_SORTBYGROUP 0x0800 /* Support sqlite3WhereIsSorted() */
-#define WHERE_REOPEN_IDX 0x1000 /* Try to use OP_ReopenIdx */
-#define WHERE_ONEPASS_MULTIROW 0x2000 /* ONEPASS is ok with multiple rows */
+#define WHERE_ONEPASS_MULTIROW 0x0008 /* ONEPASS is ok with multiple rows */
+#define WHERE_DUPLICATES_OK 0x0010 /* Ok to return a row more than once */
+#define WHERE_OR_SUBCLAUSE 0x0020 /* Processing a sub-WHERE as part of
+ ** the OR optimization */
+#define WHERE_GROUPBY 0x0040 /* pOrderBy is really a GROUP BY */
+#define WHERE_DISTINCTBY 0x0080 /* pOrderby is really a DISTINCT clause */
+#define WHERE_WANT_DISTINCT 0x0100 /* All output needs to be distinct */
+#define WHERE_SORTBYGROUP 0x0200 /* Support sqlite3WhereIsSorted() */
+#define WHERE_SEEK_TABLE 0x0400 /* Do not defer seeks on main table */
+#define WHERE_ORDERBY_LIMIT 0x0800 /* ORDERBY+LIMIT on the inner loop */
+#define WHERE_SEEK_UNIQ_TABLE 0x1000 /* Do not defer seeks if unique */
+ /* 0x2000 not currently used */
+#define WHERE_USE_LIMIT 0x4000 /* Use the LIMIT in cost estimates */
+ /* 0x8000 not currently used */
/* Allowed return values from sqlite3WhereIsDistinct()
*/
@@ -13234,12 +16447,12 @@ struct SrcList {
** pEList corresponds to the result set of a SELECT and is NULL for
** other statements.
**
-** NameContexts can be nested. When resolving names, the inner-most
+** NameContexts can be nested. When resolving names, the inner-most
** context is searched first. If no match is found, the next outer
** context is checked. If there is still no match, the next context
** is checked. This process continues until either a match is found
** or all contexts are check. When a match is found, the nRef member of
-** the context containing the match is incremented.
+** the context containing the match is incremented.
**
** Each subquery gets a new NameContext. The pNext field points to the
** NameContext in the parent query. Thus the process of scanning the
@@ -13260,16 +16473,18 @@ struct NameContext {
/*
** Allowed values for the NameContext, ncFlags field.
**
-** Note: NC_MinMaxAgg must have the same value as SF_MinMaxAgg and
-** SQLITE_FUNC_MINMAX.
-**
+** Value constraints (all checked via assert()):
+** NC_HasAgg == SF_HasAgg
+** NC_MinMaxAgg == SF_MinMaxAgg == SQLITE_FUNC_MINMAX
+**
*/
#define NC_AllowAgg 0x0001 /* Aggregate functions are allowed here */
-#define NC_HasAgg 0x0002 /* One or more aggregate functions seen */
+#define NC_PartIdx 0x0002 /* True if resolving a partial index WHERE */
#define NC_IsCheck 0x0004 /* True if resolving names in a CHECK constraint */
#define NC_InAggFunc 0x0008 /* True if analyzing arguments to an agg func */
-#define NC_PartIdx 0x0010 /* True if resolving a partial index WHERE */
+#define NC_HasAgg 0x0010 /* One or more aggregate functions seen */
#define NC_IdxExpr 0x0020 /* True if resolving columns of CREATE INDEX */
+#define NC_VarSelect 0x0040 /* A correlated subquery has been seen */
#define NC_MinMaxAgg 0x1000 /* min/max aggregates seen. See note above */
/*
@@ -13295,13 +16510,13 @@ struct NameContext {
struct Select {
ExprList *pEList; /* The fields of the result */
u8 op; /* One of: TK_UNION TK_ALL TK_INTERSECT TK_EXCEPT */
- u16 selFlags; /* Various SF_* values */
+ LogEst nSelectRow; /* Estimated number of result rows */
+ u32 selFlags; /* Various SF_* values */
int iLimit, iOffset; /* Memory registers holding LIMIT & OFFSET counters */
#if SELECTTRACE_ENABLED
char zSelName[12]; /* Symbolic name of this SELECT use for debugging */
#endif
int addrOpenEphm[2]; /* OP_OpenEphem opcodes related to this select */
- u64 nSelectRow; /* Estimated number of result rows */
SrcList *pSrc; /* The FROM clause */
Expr *pWhere; /* The WHERE clause */
ExprList *pGroupBy; /* The GROUP BY clause */
@@ -13317,23 +16532,30 @@ struct Select {
/*
** Allowed values for Select.selFlags. The "SF" prefix stands for
** "Select Flag".
+**
+** Value constraints (all checked via assert())
+** SF_HasAgg == NC_HasAgg
+** SF_MinMaxAgg == NC_MinMaxAgg == SQLITE_FUNC_MINMAX
+** SF_FixedLimit == WHERE_USE_LIMIT
*/
-#define SF_Distinct 0x0001 /* Output should be DISTINCT */
-#define SF_All 0x0002 /* Includes the ALL keyword */
-#define SF_Resolved 0x0004 /* Identifiers have been resolved */
-#define SF_Aggregate 0x0008 /* Contains aggregate functions */
-#define SF_UsesEphemeral 0x0010 /* Uses the OpenEphemeral opcode */
-#define SF_Expanded 0x0020 /* sqlite3SelectExpand() called on this */
-#define SF_HasTypeInfo 0x0040 /* FROM subqueries have Table metadata */
-#define SF_Compound 0x0080 /* Part of a compound query */
-#define SF_Values 0x0100 /* Synthesized from VALUES clause */
-#define SF_MultiValue 0x0200 /* Single VALUES term with multiple rows */
-#define SF_NestedFrom 0x0400 /* Part of a parenthesized FROM clause */
-#define SF_MaybeConvert 0x0800 /* Need convertCompoundSelectToSubquery() */
-#define SF_MinMaxAgg 0x1000 /* Aggregate containing min() or max() */
-#define SF_Recursive 0x2000 /* The recursive part of a recursive CTE */
-#define SF_Converted 0x4000 /* By convertCompoundSelectToSubquery() */
-#define SF_IncludeHidden 0x8000 /* Include hidden columns in output */
+#define SF_Distinct 0x00001 /* Output should be DISTINCT */
+#define SF_All 0x00002 /* Includes the ALL keyword */
+#define SF_Resolved 0x00004 /* Identifiers have been resolved */
+#define SF_Aggregate 0x00008 /* Contains agg functions or a GROUP BY */
+#define SF_HasAgg 0x00010 /* Contains aggregate functions */
+#define SF_UsesEphemeral 0x00020 /* Uses the OpenEphemeral opcode */
+#define SF_Expanded 0x00040 /* sqlite3SelectExpand() called on this */
+#define SF_HasTypeInfo 0x00080 /* FROM subqueries have Table metadata */
+#define SF_Compound 0x00100 /* Part of a compound query */
+#define SF_Values 0x00200 /* Synthesized from VALUES clause */
+#define SF_MultiValue 0x00400 /* Single VALUES term with multiple rows */
+#define SF_NestedFrom 0x00800 /* Part of a parenthesized FROM clause */
+#define SF_MinMaxAgg 0x01000 /* Aggregate containing min() or max() */
+#define SF_Recursive 0x02000 /* The recursive part of a recursive CTE */
+#define SF_FixedLimit 0x04000 /* nSelectRow set by a constant LIMIT */
+#define SF_MaybeConvert 0x08000 /* Need convertCompoundSelectToSubquery() */
+#define SF_Converted 0x10000 /* By convertCompoundSelectToSubquery() */
+#define SF_IncludeHidden 0x20000 /* Include hidden columns in output */
/*
@@ -13341,7 +16563,7 @@ struct Select {
** by one of the following macros. The "SRT" prefix means "SELECT Result
** Type".
**
-** SRT_Union Store results as a key in a temporary index
+** SRT_Union Store results as a key in a temporary index
** identified by pDest->iSDParm.
**
** SRT_Except Remove results from the temporary index pDest->iSDParm.
@@ -13365,7 +16587,7 @@ struct Select {
** of the query. This destination implies "LIMIT 1".
**
** SRT_Set The result must be a single column. Store each
-** row of result as the key in table pDest->iSDParm.
+** row of result as the key in table pDest->iSDParm.
** Apply the affinity pDest->affSdst before storing
** results. Used to implement "IN (SELECT ...)".
**
@@ -13425,19 +16647,19 @@ struct Select {
*/
struct SelectDest {
u8 eDest; /* How to dispose of the results. On of SRT_* above. */
- char affSdst; /* Affinity used when eDest==SRT_Set */
int iSDParm; /* A parameter used by the eDest disposal method */
int iSdst; /* Base register where results are written */
int nSdst; /* Number of registers allocated */
+ char *zAffSdst; /* Affinity used when eDest==SRT_Set */
ExprList *pOrderBy; /* Key columns for SRT_Queue and SRT_DistQueue */
};
/*
-** During code generation of statements that do inserts into AUTOINCREMENT
+** During code generation of statements that do inserts into AUTOINCREMENT
** tables, the following information is attached to the Table.u.autoInc.p
** pointer of each autoincrement table to record some side information that
** the code generator needs. We have to keep per-table autoincrement
-** information in case inserts are down within triggers. Triggers do not
+** information in case inserts are done within triggers. Triggers do not
** normally coordinate their activities, but we do need to coordinate the
** loading and saving of autoincrement information.
*/
@@ -13456,7 +16678,7 @@ struct AutoincInfo {
#endif
/*
-** At least one instance of the following structure is created for each
+** At least one instance of the following structure is created for each
** trigger that may be fired while parsing an INSERT, UPDATE or DELETE
** statement. All such objects are stored in the linked list headed at
** Parse.pTriggerPrg and deleted once statement compilation has been
@@ -13469,7 +16691,7 @@ struct AutoincInfo {
** values for both pTrigger and orconf.
**
** The TriggerPrg.aColmask[0] variable is set to a mask of old.* columns
-** accessed (or set to 0 for triggers fired as a result of INSERT
+** accessed (or set to 0 for triggers fired as a result of INSERT
** statements). Similarly, the TriggerPrg.aColmask[1] variable is set to
** a mask of new.* columns used by the program.
*/
@@ -13510,7 +16732,7 @@ struct TriggerPrg {
** is constant but the second part is reset at the beginning and end of
** each recursion.
**
-** The nTableLock and aTableLock variables are only used if the shared-cache
+** The nTableLock and aTableLock variables are only used if the shared-cache
** feature is enabled (if sqlite3Tsd()->useSharedData is true). They are
** used to store the set of table-locks required by the statement being
** compiled. Function sqlite3TableLock() is used to add entries to the
@@ -13529,36 +16751,25 @@ struct Parse {
u8 mayAbort; /* True if statement may throw an ABORT exception */
u8 hasCompound; /* Need to invoke convertCompoundSelectToSubquery() */
u8 okConstFactor; /* OK to factor out constants */
- int aTempReg[8]; /* Holding area for temporary registers */
+ u8 disableLookaside; /* Number of times lookaside has been disabled */
+ u8 nColCache; /* Number of entries in aColCache[] */
int nRangeReg; /* Size of the temporary register block */
int iRangeReg; /* First register in temporary register block */
int nErr; /* Number of errors seen */
int nTab; /* Number of previously allocated VDBE cursors */
int nMem; /* Number of memory cells used so far */
- int nSet; /* Number of sets used so far */
- int nOnce; /* Number of OP_Once instructions so far */
int nOpAlloc; /* Number of slots allocated for Vdbe.aOp[] */
int szOpAlloc; /* Bytes of memory space allocated for Vdbe.aOp[] */
- int iFixedOp; /* Never back out opcodes iFixedOp-1 or earlier */
- int ckBase; /* Base register of data during check constraints */
- int iSelfTab; /* Table of an index whose exprs are being coded */
+ int iSelfTab; /* Table for associated with an index on expr, or negative
+ ** of the base register during check-constraint eval */
int iCacheLevel; /* ColCache valid when aColCache[].iLevel<=iCacheLevel */
int iCacheCnt; /* Counter used to generate aColCache[].lru values */
int nLabel; /* Number of labels used */
int *aLabel; /* Space to hold the labels */
- struct yColCache {
- int iTable; /* Table cursor number */
- i16 iColumn; /* Table column number */
- u8 tempReg; /* iReg is a temp register that needs to be freed */
- int iLevel; /* Nesting level */
- int iReg; /* Reg with value of this column. 0 means none. */
- int lru; /* Least recently used entry has the smallest value */
- } aColCache[SQLITE_N_COLCACHE]; /* One for each column cache entry */
ExprList *pConstExpr;/* Constant expressions */
Token constraintName;/* Name of the constraint currently being parsed */
yDbMask writeMask; /* Start a write transaction on these databases */
yDbMask cookieMask; /* Bitmask of schema verified databases */
- int cookieValue[SQLITE_MAX_ATTACHED+2]; /* Values of cookies to verify */
int regRowid; /* Register holding rowid of CREATE TABLE entry */
int regRoot; /* Register holding root page number for new objects */
int nMaxArg; /* Max args passed to user function by sub-program */
@@ -13571,11 +16782,9 @@ struct Parse {
TableLock *aTableLock; /* Required table locks for shared-cache mode */
#endif
AutoincInfo *pAinc; /* Information about AUTOINCREMENT counters */
-
- /* Information used while coding trigger programs. */
Parse *pToplevel; /* Parse structure for main program (or NULL) */
Table *pTriggerTab; /* Table triggers are being coded for */
- int addrCrTab; /* Address of OP_CreateTable opcode on CREATE TABLE */
+ int addrCrTab; /* Address of OP_CreateBtree opcode on CREATE TABLE */
u32 nQueryLoop; /* Est number of iterations of a query (10*log2(N)) */
u32 oldmask; /* Mask of old.* columns referenced */
u32 newmask; /* Mask of new.* columns referenced */
@@ -13583,35 +16792,50 @@ struct Parse {
u8 eOrconf; /* Default ON CONFLICT policy for trigger steps */
u8 disableTriggers; /* True to disable triggers */
+ /**************************************************************************
+ ** Fields above must be initialized to zero. The fields that follow,
+ ** down to the beginning of the recursive section, do not need to be
+ ** initialized as they will be set before being used. The boundary is
+ ** determined by offsetof(Parse,aColCache).
+ **************************************************************************/
+
+ struct yColCache {
+ int iTable; /* Table cursor number */
+ i16 iColumn; /* Table column number */
+ u8 tempReg; /* iReg is a temp register that needs to be freed */
+ int iLevel; /* Nesting level */
+ int iReg; /* Reg with value of this column. 0 means none. */
+ int lru; /* Least recently used entry has the smallest value */
+ } aColCache[SQLITE_N_COLCACHE]; /* One for each column cache entry */
+ int aTempReg[8]; /* Holding area for temporary registers */
+ Token sNameToken; /* Token with unqualified schema object name */
+
/************************************************************************
** Above is constant between recursions. Below is reset before and after
** each recursion. The boundary between these two regions is determined
- ** using offsetof(Parse,nVar) so the nVar field must be the first field
- ** in the recursive region.
+ ** using offsetof(Parse,sLastToken) so the sLastToken field must be the
+ ** first field in the recursive region.
************************************************************************/
- int nVar; /* Number of '?' variables seen in the SQL so far */
- int nzVar; /* Number of available slots in azVar[] */
+ Token sLastToken; /* The last token parsed */
+ ynVar nVar; /* Number of '?' variables seen in the SQL so far */
u8 iPkSortOrder; /* ASC or DESC for INTEGER PRIMARY KEY */
u8 explain; /* True if the EXPLAIN flag is found on the query */
#ifndef SQLITE_OMIT_VIRTUALTABLE
u8 declareVtab; /* True if inside sqlite3_declare_vtab() */
int nVtabLock; /* Number of virtual tables to lock */
#endif
- int nAlias; /* Number of aliased result set columns */
int nHeight; /* Expression tree height of current sub-select */
#ifndef SQLITE_OMIT_EXPLAIN
int iSelectId; /* ID of current select for EXPLAIN output */
int iNextSelectId; /* Next available select ID for EXPLAIN output */
#endif
- char **azVar; /* Pointers to names of parameters */
+ VList *pVList; /* Mapping between variable names and numbers */
Vdbe *pReprepare; /* VM being reprepared (sqlite3Reprepare()) */
const char *zTail; /* All SQL text past the last semicolon parsed */
Table *pNewTable; /* A table being constructed by CREATE TABLE */
Trigger *pNewTrigger; /* Trigger under construct by a CREATE TRIGGER */
const char *zAuthContext; /* The 6th parameter to db->xAuth callbacks */
- Token sNameToken; /* Token with unqualified schema object name */
- Token sLastToken; /* The last token parsed */
#ifndef SQLITE_OMIT_VIRTUALTABLE
Token sArg; /* Complete text of a module argument */
Table **apVtabLock; /* Pointer to virtual tables needing locking */
@@ -13622,6 +16846,14 @@ struct Parse {
With *pWithToFree; /* Free this WITH object at the end of the parse */
};
+/*
+** Sizes and pointers of various parts of the Parse object.
+*/
+#define PARSE_HDR_SZ offsetof(Parse,aColCache) /* Recursive part w/o aColCache*/
+#define PARSE_RECURSE_SZ offsetof(Parse,sLastToken) /* Recursive part */
+#define PARSE_TAIL_SZ (sizeof(Parse)-PARSE_RECURSE_SZ) /* Non-recursive part */
+#define PARSE_TAIL(X) (((char*)(X))+PARSE_RECURSE_SZ) /* Pointer to tail */
+
/*
** Return true if currently inside an sqlite3_declare_vtab() call.
*/
@@ -13642,27 +16874,40 @@ struct AuthContext {
/*
** Bitfield flags for P5 value in various opcodes.
+**
+** Value constraints (enforced via assert()):
+** OPFLAG_LENGTHARG == SQLITE_FUNC_LENGTH
+** OPFLAG_TYPEOFARG == SQLITE_FUNC_TYPEOF
+** OPFLAG_BULKCSR == BTREE_BULKLOAD
+** OPFLAG_SEEKEQ == BTREE_SEEK_EQ
+** OPFLAG_FORDELETE == BTREE_FORDELETE
+** OPFLAG_SAVEPOSITION == BTREE_SAVEPOSITION
+** OPFLAG_AUXDELETE == BTREE_AUXDELETE
*/
-#define OPFLAG_NCHANGE 0x01 /* Set to update db->nChange */
+#define OPFLAG_NCHANGE 0x01 /* OP_Insert: Set to update db->nChange */
+ /* Also used in P2 (not P5) of OP_Delete */
#define OPFLAG_EPHEM 0x01 /* OP_Column: Ephemeral output is ok */
-#define OPFLAG_LASTROWID 0x02 /* Set to update db->lastRowid */
+#define OPFLAG_LASTROWID 0x20 /* Set to update db->lastRowid */
#define OPFLAG_ISUPDATE 0x04 /* This OP_Insert is an sql UPDATE */
#define OPFLAG_APPEND 0x08 /* This is likely to be an append */
#define OPFLAG_USESEEKRESULT 0x10 /* Try to avoid a seek in BtreeInsert() */
+#define OPFLAG_ISNOOP 0x40 /* OP_Delete does pre-update-hook only */
#define OPFLAG_LENGTHARG 0x40 /* OP_Column only used for length() */
#define OPFLAG_TYPEOFARG 0x80 /* OP_Column only used for typeof() */
#define OPFLAG_BULKCSR 0x01 /* OP_Open** used to open bulk cursor */
#define OPFLAG_SEEKEQ 0x02 /* OP_Open** cursor uses EQ seek only */
-#define OPFLAG_FORDELETE 0x08 /* OP_Open is opening for-delete csr */
+#define OPFLAG_FORDELETE 0x08 /* OP_Open should use BTREE_FORDELETE */
#define OPFLAG_P2ISREG 0x10 /* P2 to OP_Open** is a register number */
#define OPFLAG_PERMUTE 0x01 /* OP_Compare: use the permutation */
+#define OPFLAG_SAVEPOSITION 0x02 /* OP_Delete/Insert: save cursor pos */
+#define OPFLAG_AUXDELETE 0x04 /* OP_Delete: index in a DELETE op */
/*
* Each trigger present in the database schema is stored as an instance of
- * struct Trigger.
+ * struct Trigger.
*
* Pointers to instances of struct Trigger are stored in two ways.
- * 1. In the "trigHash" hash table (part of the sqlite3* that represents the
+ * 1. In the "trigHash" hash table (part of the sqlite3* that represents the
* database). This allows Trigger structures to be retrieved by name.
* 2. All triggers associated with a single table form a linked list, using the
* pNext member of struct Trigger. A pointer to the first element of the
@@ -13688,7 +16933,7 @@ struct Trigger {
/*
** A trigger is either a BEFORE or an AFTER trigger. The following constants
-** determine which.
+** determine which.
**
** If there are multiple triggers, you might of some BEFORE and some AFTER.
** In that cases, the constants below can be ORed together.
@@ -13698,15 +16943,15 @@ struct Trigger {
/*
* An instance of struct TriggerStep is used to store a single SQL statement
- * that is a part of a trigger-program.
+ * that is a part of a trigger-program.
*
* Instances of struct TriggerStep are stored in a singly linked list (linked
- * using the "pNext" member) referenced by the "step_list" member of the
+ * using the "pNext" member) referenced by the "step_list" member of the
* associated struct Trigger instance. The first element of the linked list is
* the first step of the trigger-program.
- *
+ *
* The "op" member indicates whether this is a "DELETE", "INSERT", "UPDATE" or
- * "SELECT" statement. The meanings of the other members is determined by the
+ * "SELECT" statement. The meanings of the other members is determined by the
* value of "op" as follows:
*
* (op == TK_INSERT)
@@ -13716,7 +16961,7 @@ struct Trigger {
* zTarget -> Dequoted name of the table to insert into.
* pExprList -> If this is an INSERT INTO ... VALUES ... statement, then
* this stores values to be inserted. Otherwise NULL.
- * pIdList -> If this is an INSERT INTO ... () VALUES ...
+ * pIdList -> If this is an INSERT INTO ... () VALUES ...
* statement, then this stores the column-names to be
* inserted into.
*
@@ -13724,7 +16969,7 @@ struct Trigger {
* zTarget -> Dequoted name of the table to delete from.
* pWhere -> The WHERE clause of the DELETE statement if one is specified.
* Otherwise NULL.
- *
+ *
* (op == TK_UPDATE)
* zTarget -> Dequoted name of the table to update.
* pWhere -> The WHERE clause of the UPDATE statement if one is specified.
@@ -13732,7 +16977,7 @@ struct Trigger {
* pExprList -> A list of the columns to update and the expressions to update
* them to. See sqlite3Update() documentation of "pChanges"
* argument.
- *
+ *
*/
struct TriggerStep {
u8 op; /* One of TK_DELETE, TK_UPDATE, TK_INSERT, TK_SELECT */
@@ -13750,7 +16995,7 @@ struct TriggerStep {
/*
** The following structure contains information used by the sqliteFix...
** routines as they walk the parse tree to make database references
-** explicit.
+** explicit.
*/
typedef struct DbFixer DbFixer;
struct DbFixer {
@@ -13768,16 +17013,21 @@ struct DbFixer {
*/
struct StrAccum {
sqlite3 *db; /* Optional database for lookaside. Can be NULL */
- char *zBase; /* A base allocation. Not from malloc. */
char *zText; /* The string collected so far */
- u32 nChar; /* Length of the string so far */
u32 nAlloc; /* Amount of space allocated in zText */
u32 mxAlloc; /* Maximum allowed allocation. 0 for no malloc usage */
+ u32 nChar; /* Length of the string so far */
u8 accError; /* STRACCUM_NOMEM or STRACCUM_TOOBIG */
- u8 bMalloced; /* zText points to allocated space */
+ u8 printfFlags; /* SQLITE_PRINTF flags below */
};
#define STRACCUM_NOMEM 1
#define STRACCUM_TOOBIG 2
+#define SQLITE_PRINTF_INTERNAL 0x01 /* Internal-use-only converters allowed */
+#define SQLITE_PRINTF_SQLFUNC 0x02 /* SQL function arguments to VXPrintf */
+#define SQLITE_PRINTF_MALLOCED 0x04 /* True if xText is allocated space */
+
+#define isMalloced(X) (((X)->printfFlags & SQLITE_PRINTF_MALLOCED)!=0)
+
/*
** A pointer to this structure is used to communicate information
@@ -13801,10 +17051,12 @@ struct Sqlite3Config {
int bFullMutex; /* True to enable full mutexing */
int bOpenUri; /* True to interpret filenames as URIs */
int bUseCis; /* Use covering indices for full-scans */
+ int bSmallMalloc; /* Avoid large memory allocations if true */
int mxStrlen; /* Maximum string length */
int neverCorrupt; /* Database is always well-formed */
int szLookaside; /* Default lookaside buffer size */
int nLookaside; /* Default lookaside buffer count */
+ int nStmtSpill; /* Stmt-journal spill-to-disk threshold */
sqlite3_mem_methods m; /* Low-level memory allocation interface */
sqlite3_mutex_methods mutex; /* Low-level mutex interface */
sqlite3_pcache_methods2 pcache2; /* Low-level page-cache interface */
@@ -13813,9 +17065,6 @@ struct Sqlite3Config {
int mnReq, mxReq; /* Min and max heap requests sizes */
sqlite3_int64 szMmap; /* mmap() space per open file */
sqlite3_int64 mxMmap; /* Maximum value for szMmap */
- void *pScratch; /* Scratch memory */
- int szScratch; /* Size of each scratch buffer */
- int nScratch; /* Number of scratch buffers */
void *pPage; /* Page cache memory */
int szPage; /* Size of each page in pPage[] */
int nPage; /* Number of pages in pPage[] */
@@ -13844,10 +17093,11 @@ struct Sqlite3Config {
void (*xVdbeBranch)(void*,int iSrcLine,u8 eThis,u8 eMx); /* Callback */
void *pVdbeBranchArg; /* 1st argument */
#endif
-#ifndef SQLITE_OMIT_BUILTIN_TEST
+#ifndef SQLITE_UNTESTABLE
int (*xTestCallback)(int); /* Invoked by sqlite3FaultSim() */
#endif
int bLocaltimeFault; /* True to fail localtime() calls */
+ int iOnceResetThreshold; /* When to reset OP_Once counters */
};
/*
@@ -13872,19 +17122,24 @@ struct Sqlite3Config {
** Context pointer passed down through the tree-walk.
*/
struct Walker {
+ Parse *pParse; /* Parser context. */
int (*xExprCallback)(Walker*, Expr*); /* Callback for expressions */
int (*xSelectCallback)(Walker*,Select*); /* Callback for SELECTs */
void (*xSelectCallback2)(Walker*,Select*);/* Second callback for SELECTs */
- Parse *pParse; /* Parser context. */
int walkerDepth; /* Number of subqueries */
u8 eCode; /* A small processing code */
union { /* Extra data for callback */
- NameContext *pNC; /* Naming context */
- int n; /* A counter */
- int iCur; /* A cursor number */
- SrcList *pSrcList; /* FROM clause */
- struct SrcCount *pSrcCount; /* Counting column references */
- struct CCurHint *pCCurHint; /* Used by codeCursorHint() */
+ NameContext *pNC; /* Naming context */
+ int n; /* A counter */
+ int iCur; /* A cursor number */
+ SrcList *pSrcList; /* FROM clause */
+ struct SrcCount *pSrcCount; /* Counting column references */
+ struct CCurHint *pCCurHint; /* Used by codeCursorHint() */
+ int *aiCol; /* array of column indexes */
+ struct IdxCover *pIdxCover; /* Check for index coverage */
+ struct IdxExprTrans *pIdxTrans; /* Convert indexed expr to column */
+ ExprList *pGroupBy; /* GROUP BY clause */
+ struct HavingToWhereCtx *pHavingCtx; /* HAVING to WHERE clause ctx */
} u;
};
@@ -13895,6 +17150,11 @@ SQLITE_PRIVATE int sqlite3WalkSelect(Walker*, Select*);
SQLITE_PRIVATE int sqlite3WalkSelectExpr(Walker*, Select*);
SQLITE_PRIVATE int sqlite3WalkSelectFrom(Walker*, Select*);
SQLITE_PRIVATE int sqlite3ExprWalkNoop(Walker*, Expr*);
+SQLITE_PRIVATE int sqlite3SelectWalkNoop(Walker*, Select*);
+SQLITE_PRIVATE int sqlite3SelectWalkFail(Walker*, Select*);
+#ifdef SQLITE_DEBUG
+SQLITE_PRIVATE void sqlite3SelectWalkAssert2(Walker*, Select*);
+#endif
/*
** Return code from the parse-tree walking primitives and their
@@ -13953,7 +17213,26 @@ SQLITE_PRIVATE int sqlite3CantopenError(int);
#define SQLITE_CORRUPT_BKPT sqlite3CorruptError(__LINE__)
#define SQLITE_MISUSE_BKPT sqlite3MisuseError(__LINE__)
#define SQLITE_CANTOPEN_BKPT sqlite3CantopenError(__LINE__)
+#ifdef SQLITE_DEBUG
+SQLITE_PRIVATE int sqlite3NomemError(int);
+SQLITE_PRIVATE int sqlite3IoerrnomemError(int);
+SQLITE_PRIVATE int sqlite3CorruptPgnoError(int,Pgno);
+# define SQLITE_NOMEM_BKPT sqlite3NomemError(__LINE__)
+# define SQLITE_IOERR_NOMEM_BKPT sqlite3IoerrnomemError(__LINE__)
+# define SQLITE_CORRUPT_PGNO(P) sqlite3CorruptPgnoError(__LINE__,(P))
+#else
+# define SQLITE_NOMEM_BKPT SQLITE_NOMEM
+# define SQLITE_IOERR_NOMEM_BKPT SQLITE_IOERR_NOMEM
+# define SQLITE_CORRUPT_PGNO(P) sqlite3CorruptError(__LINE__)
+#endif
+/*
+** FTS3 and FTS4 both require virtual table support
+*/
+#if defined(SQLITE_OMIT_VIRTUALTABLE)
+# undef SQLITE_ENABLE_FTS3
+# undef SQLITE_ENABLE_FTS4
+#endif
/*
** FTS4 is really an extension for FTS3. It is enabled using the
@@ -13986,6 +17265,7 @@ SQLITE_PRIVATE int sqlite3CantopenError(int);
# define sqlite3Isdigit(x) (sqlite3CtypeMap[(unsigned char)(x)]&0x04)
# define sqlite3Isxdigit(x) (sqlite3CtypeMap[(unsigned char)(x)]&0x08)
# define sqlite3Tolower(x) (sqlite3UpperToLower[(unsigned char)(x)])
+# define sqlite3Isquote(x) (sqlite3CtypeMap[(unsigned char)(x)]&0x80)
#else
# define sqlite3Toupper(x) toupper((unsigned char)(x))
# define sqlite3Isspace(x) isspace((unsigned char)(x))
@@ -13994,6 +17274,7 @@ SQLITE_PRIVATE int sqlite3CantopenError(int);
# define sqlite3Isdigit(x) isdigit((unsigned char)(x))
# define sqlite3Isxdigit(x) isxdigit((unsigned char)(x))
# define sqlite3Tolower(x) tolower((unsigned char)(x))
+# define sqlite3Isquote(x) ((x)=='"'||(x)=='\''||(x)=='['||(x)=='`')
#endif
#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
SQLITE_PRIVATE int sqlite3IsIdChar(u8);
@@ -14002,8 +17283,9 @@ SQLITE_PRIVATE int sqlite3IsIdChar(u8);
/*
** Internal function prototypes
*/
-#define sqlite3StrICmp sqlite3_stricmp
+SQLITE_PRIVATE int sqlite3StrICmp(const char*,const char*);
SQLITE_PRIVATE int sqlite3Strlen30(const char*);
+SQLITE_PRIVATE char *sqlite3ColumnType(Column*,char*);
#define sqlite3StrNICmp sqlite3_strnicmp
SQLITE_PRIVATE int sqlite3MallocInit(void);
@@ -14012,20 +17294,20 @@ SQLITE_PRIVATE void *sqlite3Malloc(u64);
SQLITE_PRIVATE void *sqlite3MallocZero(u64);
SQLITE_PRIVATE void *sqlite3DbMallocZero(sqlite3*, u64);
SQLITE_PRIVATE void *sqlite3DbMallocRaw(sqlite3*, u64);
+SQLITE_PRIVATE void *sqlite3DbMallocRawNN(sqlite3*, u64);
SQLITE_PRIVATE char *sqlite3DbStrDup(sqlite3*,const char*);
SQLITE_PRIVATE char *sqlite3DbStrNDup(sqlite3*,const char*, u64);
SQLITE_PRIVATE void *sqlite3Realloc(void*, u64);
SQLITE_PRIVATE void *sqlite3DbReallocOrFree(sqlite3 *, void *, u64);
SQLITE_PRIVATE void *sqlite3DbRealloc(sqlite3 *, void *, u64);
SQLITE_PRIVATE void sqlite3DbFree(sqlite3*, void*);
+SQLITE_PRIVATE void sqlite3DbFreeNN(sqlite3*, void*);
SQLITE_PRIVATE int sqlite3MallocSize(void*);
SQLITE_PRIVATE int sqlite3DbMallocSize(sqlite3*, void*);
-SQLITE_PRIVATE void *sqlite3ScratchMalloc(int);
-SQLITE_PRIVATE void sqlite3ScratchFree(void*);
SQLITE_PRIVATE void *sqlite3PageMalloc(int);
SQLITE_PRIVATE void sqlite3PageFree(void*);
SQLITE_PRIVATE void sqlite3MemSetDefault(void);
-#ifndef SQLITE_OMIT_BUILTIN_TEST
+#ifndef SQLITE_UNTESTABLE
SQLITE_PRIVATE void sqlite3BenignMallocHooks(void (*)(void), void (*)(void));
#endif
SQLITE_PRIVATE int sqlite3HeapNearlyFull(void);
@@ -14041,18 +17323,22 @@ SQLITE_PRIVATE int sqlite3HeapNearlyFull(void);
#ifdef SQLITE_USE_ALLOCA
# define sqlite3StackAllocRaw(D,N) alloca(N)
# define sqlite3StackAllocZero(D,N) memset(alloca(N), 0, N)
-# define sqlite3StackFree(D,P)
+# define sqlite3StackFree(D,P)
#else
# define sqlite3StackAllocRaw(D,N) sqlite3DbMallocRaw(D,N)
# define sqlite3StackAllocZero(D,N) sqlite3DbMallocZero(D,N)
# define sqlite3StackFree(D,P) sqlite3DbFree(D,P)
#endif
-#ifdef SQLITE_ENABLE_MEMSYS3
-SQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys3(void);
-#endif
+/* Do not allow both MEMSYS5 and MEMSYS3 to be defined together. If they
+** are, disable MEMSYS3
+*/
#ifdef SQLITE_ENABLE_MEMSYS5
SQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys5(void);
+#undef SQLITE_ENABLE_MEMSYS3
+#endif
+#ifdef SQLITE_ENABLE_MEMSYS3
+SQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys3(void);
#endif
@@ -14073,6 +17359,7 @@ SQLITE_PRIVATE sqlite3_int64 sqlite3StatusValue(int);
SQLITE_PRIVATE void sqlite3StatusUp(int, int);
SQLITE_PRIVATE void sqlite3StatusDown(int, int);
SQLITE_PRIVATE void sqlite3StatusHighwater(int, int);
+SQLITE_PRIVATE int sqlite3LookasideUsed(sqlite3*,int*);
/* Access to mutexes used by sqlite3_status() */
SQLITE_PRIVATE sqlite3_mutex *sqlite3Pcache1Mutex(void);
@@ -14094,10 +17381,8 @@ struct PrintfArguments {
sqlite3_value **apArg; /* The argument values */
};
-#define SQLITE_PRINTF_INTERNAL 0x01
-#define SQLITE_PRINTF_SQLFUNC 0x02
-SQLITE_PRIVATE void sqlite3VXPrintf(StrAccum*, u32, const char*, va_list);
-SQLITE_PRIVATE void sqlite3XPrintf(StrAccum*, u32, const char*, ...);
+SQLITE_PRIVATE void sqlite3VXPrintf(StrAccum*, const char*, va_list);
+SQLITE_PRIVATE void sqlite3XPrintf(StrAccum*, const char*, ...);
SQLITE_PRIVATE char *sqlite3MPrintf(sqlite3*,const char*, ...);
SQLITE_PRIVATE char *sqlite3VMPrintf(sqlite3*,const char*, va_list);
#if defined(SQLITE_DEBUG) || defined(SQLITE_HAVE_OS_TRACE)
@@ -14109,6 +17394,7 @@ SQLITE_PRIVATE void *sqlite3TestTextToPtr(const char*);
#if defined(SQLITE_DEBUG)
SQLITE_PRIVATE void sqlite3TreeViewExpr(TreeView*, const Expr*, u8);
+SQLITE_PRIVATE void sqlite3TreeViewBareExprList(TreeView*, const ExprList*, const char*);
SQLITE_PRIVATE void sqlite3TreeViewExprList(TreeView*, const ExprList*, u8, const char*);
SQLITE_PRIVATE void sqlite3TreeViewSelect(TreeView*, const Select*, u8);
SQLITE_PRIVATE void sqlite3TreeViewWith(TreeView*, const With*, u8);
@@ -14117,7 +17403,8 @@ SQLITE_PRIVATE void sqlite3TreeViewWith(TreeView*, const With*, u8);
SQLITE_PRIVATE void sqlite3SetString(char **, sqlite3*, const char*);
SQLITE_PRIVATE void sqlite3ErrorMsg(Parse*, const char*, ...);
-SQLITE_PRIVATE int sqlite3Dequote(char*);
+SQLITE_PRIVATE void sqlite3Dequote(char*);
+SQLITE_PRIVATE void sqlite3TokenInit(Token*,char*);
SQLITE_PRIVATE int sqlite3KeywordCode(const unsigned char*, int);
SQLITE_PRIVATE int sqlite3RunParser(Parse*, const char*, char **);
SQLITE_PRIVATE void sqlite3FinishCoding(Parse*);
@@ -14126,15 +17413,20 @@ SQLITE_PRIVATE void sqlite3ReleaseTempReg(Parse*,int);
SQLITE_PRIVATE int sqlite3GetTempRange(Parse*,int);
SQLITE_PRIVATE void sqlite3ReleaseTempRange(Parse*,int,int);
SQLITE_PRIVATE void sqlite3ClearTempRegCache(Parse*);
+#ifdef SQLITE_DEBUG
+SQLITE_PRIVATE int sqlite3NoTempsInRange(Parse*,int,int);
+#endif
SQLITE_PRIVATE Expr *sqlite3ExprAlloc(sqlite3*,int,const Token*,int);
SQLITE_PRIVATE Expr *sqlite3Expr(sqlite3*,int,const char*);
SQLITE_PRIVATE void sqlite3ExprAttachSubtrees(sqlite3*,Expr*,Expr*,Expr*);
-SQLITE_PRIVATE Expr *sqlite3PExpr(Parse*, int, Expr*, Expr*, const Token*);
+SQLITE_PRIVATE Expr *sqlite3PExpr(Parse*, int, Expr*, Expr*);
+SQLITE_PRIVATE void sqlite3PExprAddSelect(Parse*, Expr*, Select*);
SQLITE_PRIVATE Expr *sqlite3ExprAnd(sqlite3*,Expr*, Expr*);
SQLITE_PRIVATE Expr *sqlite3ExprFunction(Parse*,ExprList*, Token*);
-SQLITE_PRIVATE void sqlite3ExprAssignVarNumber(Parse*, Expr*);
+SQLITE_PRIVATE void sqlite3ExprAssignVarNumber(Parse*, Expr*, u32);
SQLITE_PRIVATE void sqlite3ExprDelete(sqlite3*, Expr*);
SQLITE_PRIVATE ExprList *sqlite3ExprListAppend(Parse*,ExprList*,Expr*);
+SQLITE_PRIVATE ExprList *sqlite3ExprListAppendVector(Parse*,ExprList*,IdList*,Expr*);
SQLITE_PRIVATE void sqlite3ExprListSetSortOrder(ExprList*,int);
SQLITE_PRIVATE void sqlite3ExprListSetName(Parse*,ExprList*,Token*,int);
SQLITE_PRIVATE void sqlite3ExprListSetSpan(Parse*,ExprList*,ExprSpan*);
@@ -14143,13 +17435,16 @@ SQLITE_PRIVATE u32 sqlite3ExprListFlags(const ExprList*);
SQLITE_PRIVATE int sqlite3Init(sqlite3*, char**);
SQLITE_PRIVATE int sqlite3InitCallback(void*, int, char**, char**);
SQLITE_PRIVATE void sqlite3Pragma(Parse*,Token*,Token*,Token*,int);
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+SQLITE_PRIVATE Module *sqlite3PragmaVtabRegister(sqlite3*,const char *zName);
+#endif
SQLITE_PRIVATE void sqlite3ResetAllSchemasOfConnection(sqlite3*);
SQLITE_PRIVATE void sqlite3ResetOneSchema(sqlite3*,int);
SQLITE_PRIVATE void sqlite3CollapseDatabaseArray(sqlite3*);
-SQLITE_PRIVATE void sqlite3BeginParse(Parse*,int);
SQLITE_PRIVATE void sqlite3CommitInternalChanges(sqlite3*);
SQLITE_PRIVATE void sqlite3DeleteColumnNames(sqlite3*,Table*);
SQLITE_PRIVATE int sqlite3ColumnsFromExprList(Parse*,ExprList*,i16*,Column**);
+SQLITE_PRIVATE void sqlite3SelectAddColumnTypeAndCollation(Parse*,Table*,Select*);
SQLITE_PRIVATE Table *sqlite3ResultSetOfSelect(Parse*,Select*);
SQLITE_PRIVATE void sqlite3OpenMasterTable(Parse *, int);
SQLITE_PRIVATE Index *sqlite3PrimaryKeyIndex(Table*);
@@ -14160,20 +17455,18 @@ SQLITE_PRIVATE void sqlite3ColumnPropertiesFromName(Table*, Column*);
#else
# define sqlite3ColumnPropertiesFromName(T,C) /* no-op */
#endif
-SQLITE_PRIVATE void sqlite3AddColumn(Parse*,Token*);
+SQLITE_PRIVATE void sqlite3AddColumn(Parse*,Token*,Token*);
SQLITE_PRIVATE void sqlite3AddNotNull(Parse*, int);
SQLITE_PRIVATE void sqlite3AddPrimaryKey(Parse*, ExprList*, int, int, int);
SQLITE_PRIVATE void sqlite3AddCheckConstraint(Parse*, Expr*);
-SQLITE_PRIVATE void sqlite3AddColumnType(Parse*,Token*);
SQLITE_PRIVATE void sqlite3AddDefaultValue(Parse*,ExprSpan*);
SQLITE_PRIVATE void sqlite3AddCollateType(Parse*, Token*);
SQLITE_PRIVATE void sqlite3EndTable(Parse*,Token*,Token*,u8,Select*);
SQLITE_PRIVATE int sqlite3ParseUri(const char*,const char*,unsigned int*,
sqlite3_vfs**,char**,char **);
SQLITE_PRIVATE Btree *sqlite3DbNameToBtree(sqlite3*,const char*);
-SQLITE_PRIVATE int sqlite3CodeOnce(Parse *);
-#ifdef SQLITE_OMIT_BUILTIN_TEST
+#ifdef SQLITE_UNTESTABLE
# define sqlite3FaultSim(X) SQLITE_OK
#else
SQLITE_PRIVATE int sqlite3FaultSim(int);
@@ -14186,7 +17479,7 @@ SQLITE_PRIVATE int sqlite3BitvecSet(Bitvec*, u32);
SQLITE_PRIVATE void sqlite3BitvecClear(Bitvec*, u32, void*);
SQLITE_PRIVATE void sqlite3BitvecDestroy(Bitvec*);
SQLITE_PRIVATE u32 sqlite3BitvecSize(Bitvec*);
-#ifndef SQLITE_OMIT_BUILTIN_TEST
+#ifndef SQLITE_UNTESTABLE
SQLITE_PRIVATE int sqlite3BitvecBuiltinTest(int,int*);
#endif
@@ -14233,12 +17526,12 @@ SQLITE_PRIVATE void sqlite3SrcListAssignCursors(Parse*, SrcList*);
SQLITE_PRIVATE void sqlite3IdListDelete(sqlite3*, IdList*);
SQLITE_PRIVATE void sqlite3SrcListDelete(sqlite3*, SrcList*);
SQLITE_PRIVATE Index *sqlite3AllocateIndexObject(sqlite3*,i16,int,char**);
-SQLITE_PRIVATE Index *sqlite3CreateIndex(Parse*,Token*,Token*,SrcList*,ExprList*,int,Token*,
- Expr*, int, int);
+SQLITE_PRIVATE void sqlite3CreateIndex(Parse*,Token*,Token*,SrcList*,ExprList*,int,Token*,
+ Expr*, int, int, u8);
SQLITE_PRIVATE void sqlite3DropIndex(Parse*, SrcList*, int);
SQLITE_PRIVATE int sqlite3Select(Parse*, Select*, SelectDest*);
SQLITE_PRIVATE Select *sqlite3SelectNew(Parse*,ExprList*,SrcList*,Expr*,ExprList*,
- Expr*,ExprList*,u16,Expr*,Expr*);
+ Expr*,ExprList*,u32,Expr*,Expr*);
SQLITE_PRIVATE void sqlite3SelectDelete(sqlite3*, Select*);
SQLITE_PRIVATE Table *sqlite3SrcListLookup(Parse*, SrcList*);
SQLITE_PRIVATE int sqlite3IsReadOnly(Parse*, Table*, int);
@@ -14250,9 +17543,10 @@ SQLITE_PRIVATE void sqlite3DeleteFrom(Parse*, SrcList*, Expr*);
SQLITE_PRIVATE void sqlite3Update(Parse*, SrcList*, ExprList*, Expr*, int);
SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(Parse*,SrcList*,Expr*,ExprList*,ExprList*,u16,int);
SQLITE_PRIVATE void sqlite3WhereEnd(WhereInfo*);
-SQLITE_PRIVATE u64 sqlite3WhereOutputRowCount(WhereInfo*);
+SQLITE_PRIVATE LogEst sqlite3WhereOutputRowCount(WhereInfo*);
SQLITE_PRIVATE int sqlite3WhereIsDistinct(WhereInfo*);
SQLITE_PRIVATE int sqlite3WhereIsOrdered(WhereInfo*);
+SQLITE_PRIVATE int sqlite3WhereOrderedInnerLoop(WhereInfo*);
SQLITE_PRIVATE int sqlite3WhereIsSorted(WhereInfo*);
SQLITE_PRIVATE int sqlite3WhereContinueLabel(WhereInfo*);
SQLITE_PRIVATE int sqlite3WhereBreakLabel(WhereInfo*);
@@ -14274,7 +17568,7 @@ SQLITE_PRIVATE void sqlite3ExprCacheAffinityChange(Parse*, int, int);
SQLITE_PRIVATE void sqlite3ExprCode(Parse*, Expr*, int);
SQLITE_PRIVATE void sqlite3ExprCodeCopy(Parse*, Expr*, int);
SQLITE_PRIVATE void sqlite3ExprCodeFactorable(Parse*, Expr*, int);
-SQLITE_PRIVATE void sqlite3ExprCodeAtInit(Parse*, Expr*, int, u8);
+SQLITE_PRIVATE int sqlite3ExprCodeAtInit(Parse*, Expr*, int);
SQLITE_PRIVATE int sqlite3ExprCodeTemp(Parse*, Expr*, int*);
SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse*, Expr*, int);
SQLITE_PRIVATE void sqlite3ExprCodeAndCache(Parse*, Expr*, int);
@@ -14282,26 +17576,31 @@ SQLITE_PRIVATE int sqlite3ExprCodeExprList(Parse*, ExprList*, int, int, u8);
#define SQLITE_ECEL_DUP 0x01 /* Deep, not shallow copies */
#define SQLITE_ECEL_FACTOR 0x02 /* Factor out constant terms */
#define SQLITE_ECEL_REF 0x04 /* Use ExprList.u.x.iOrderByCol */
+#define SQLITE_ECEL_OMITREF 0x08 /* Omit if ExprList.u.x.iOrderByCol */
SQLITE_PRIVATE void sqlite3ExprIfTrue(Parse*, Expr*, int, int);
SQLITE_PRIVATE void sqlite3ExprIfFalse(Parse*, Expr*, int, int);
SQLITE_PRIVATE void sqlite3ExprIfFalseDup(Parse*, Expr*, int, int);
SQLITE_PRIVATE Table *sqlite3FindTable(sqlite3*,const char*, const char*);
-SQLITE_PRIVATE Table *sqlite3LocateTable(Parse*,int isView,const char*, const char*);
-SQLITE_PRIVATE Table *sqlite3LocateTableItem(Parse*,int isView,struct SrcList_item *);
+#define LOCATE_VIEW 0x01
+#define LOCATE_NOERR 0x02
+SQLITE_PRIVATE Table *sqlite3LocateTable(Parse*,u32 flags,const char*, const char*);
+SQLITE_PRIVATE Table *sqlite3LocateTableItem(Parse*,u32 flags,struct SrcList_item *);
SQLITE_PRIVATE Index *sqlite3FindIndex(sqlite3*,const char*, const char*);
SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTable(sqlite3*,int,const char*);
SQLITE_PRIVATE void sqlite3UnlinkAndDeleteIndex(sqlite3*,int,const char*);
-SQLITE_PRIVATE void sqlite3Vacuum(Parse*);
-SQLITE_PRIVATE int sqlite3RunVacuum(char**, sqlite3*);
+SQLITE_PRIVATE void sqlite3Vacuum(Parse*,Token*);
+SQLITE_PRIVATE int sqlite3RunVacuum(char**, sqlite3*, int);
SQLITE_PRIVATE char *sqlite3NameFromToken(sqlite3*, Token*);
-SQLITE_PRIVATE int sqlite3ExprCompare(Expr*, Expr*, int);
+SQLITE_PRIVATE int sqlite3ExprCompare(Parse*,Expr*, Expr*, int);
+SQLITE_PRIVATE int sqlite3ExprCompareSkip(Expr*, Expr*, int);
SQLITE_PRIVATE int sqlite3ExprListCompare(ExprList*, ExprList*, int);
-SQLITE_PRIVATE int sqlite3ExprImpliesExpr(Expr*, Expr*, int);
+SQLITE_PRIVATE int sqlite3ExprImpliesExpr(Parse*,Expr*, Expr*, int);
SQLITE_PRIVATE void sqlite3ExprAnalyzeAggregates(NameContext*, Expr*);
SQLITE_PRIVATE void sqlite3ExprAnalyzeAggList(NameContext*,ExprList*);
+SQLITE_PRIVATE int sqlite3ExprCoveredByIndex(Expr*, int iCur, Index *pIdx);
SQLITE_PRIVATE int sqlite3FunctionUsesThisSrc(Expr*, SrcList*);
SQLITE_PRIVATE Vdbe *sqlite3GetVdbe(Parse*);
-#ifndef SQLITE_OMIT_BUILTIN_TEST
+#ifndef SQLITE_UNTESTABLE
SQLITE_PRIVATE void sqlite3PrngSaveState(void);
SQLITE_PRIVATE void sqlite3PrngRestoreState(void);
#endif
@@ -14309,14 +17608,14 @@ SQLITE_PRIVATE void sqlite3RollbackAll(sqlite3*,int);
SQLITE_PRIVATE void sqlite3CodeVerifySchema(Parse*, int);
SQLITE_PRIVATE void sqlite3CodeVerifyNamedSchema(Parse*, const char *zDb);
SQLITE_PRIVATE void sqlite3BeginTransaction(Parse*, int);
-SQLITE_PRIVATE void sqlite3CommitTransaction(Parse*);
-SQLITE_PRIVATE void sqlite3RollbackTransaction(Parse*);
+SQLITE_PRIVATE void sqlite3EndTransaction(Parse*,int);
SQLITE_PRIVATE void sqlite3Savepoint(Parse*, int, Token*);
SQLITE_PRIVATE void sqlite3CloseSavepoints(sqlite3 *);
SQLITE_PRIVATE void sqlite3LeaveMutexAndCloseZombie(sqlite3*);
SQLITE_PRIVATE int sqlite3ExprIsConstant(Expr*);
SQLITE_PRIVATE int sqlite3ExprIsConstantNotJoin(Expr*);
SQLITE_PRIVATE int sqlite3ExprIsConstantOrFunction(Expr*, u8);
+SQLITE_PRIVATE int sqlite3ExprIsConstantOrGroupBy(Parse*, Expr*, ExprList*);
SQLITE_PRIVATE int sqlite3ExprIsTableConstant(Expr*,int);
#ifdef SQLITE_ENABLE_CURSOR_HINTS
SQLITE_PRIVATE int sqlite3ExprContainsSubquery(Expr*);
@@ -14331,7 +17630,12 @@ SQLITE_PRIVATE void sqlite3GenerateRowIndexDelete(Parse*, Table*, int, int, int*
SQLITE_PRIVATE int sqlite3GenerateIndexKey(Parse*, Index*, int, int, int, int*,Index*,int);
SQLITE_PRIVATE void sqlite3ResolvePartIdxLabel(Parse*,int);
SQLITE_PRIVATE void sqlite3GenerateConstraintChecks(Parse*,Table*,int*,int,int,int,int,
- u8,u8,int,int*);
+ u8,u8,int,int*,int*);
+#ifdef SQLITE_ENABLE_NULL_TRIM
+SQLITE_PRIVATE void sqlite3SetMakeRecordP5(Vdbe*,Table*);
+#else
+# define sqlite3SetMakeRecordP5(A,B)
+#endif
SQLITE_PRIVATE void sqlite3CompleteInsertion(Parse*,Table*,int,int,int,int*,int,int,int);
SQLITE_PRIVATE int sqlite3OpenTableAndIndices(Parse*, Table*, int, u8, int, u8*, int*, int*);
SQLITE_PRIVATE void sqlite3BeginWriteOperation(Parse*, int, int);
@@ -14350,11 +17654,11 @@ SQLITE_PRIVATE void sqlite3SelectSetName(Select*,const char*);
#else
# define sqlite3SelectSetName(A,B)
#endif
-SQLITE_PRIVATE void sqlite3FuncDefInsert(FuncDefHash*, FuncDef*);
-SQLITE_PRIVATE FuncDef *sqlite3FindFunction(sqlite3*,const char*,int,int,u8,u8);
-SQLITE_PRIVATE void sqlite3RegisterBuiltinFunctions(sqlite3*);
+SQLITE_PRIVATE void sqlite3InsertBuiltinFuncs(FuncDef*,int);
+SQLITE_PRIVATE FuncDef *sqlite3FindFunction(sqlite3*,const char*,int,u8,u8);
+SQLITE_PRIVATE void sqlite3RegisterBuiltinFunctions(void);
SQLITE_PRIVATE void sqlite3RegisterDateTimeFunctions(void);
-SQLITE_PRIVATE void sqlite3RegisterGlobalFunctions(void);
+SQLITE_PRIVATE void sqlite3RegisterPerConnectionBuiltinFunctions(sqlite3*);
SQLITE_PRIVATE int sqlite3SafetyCheckOk(sqlite3*);
SQLITE_PRIVATE int sqlite3SafetyCheckSickOrOk(sqlite3*);
SQLITE_PRIVATE void sqlite3ChangeCookie(Parse*, int);
@@ -14425,7 +17729,9 @@ SQLITE_PRIVATE int sqlite3FixTriggerStep(DbFixer*, TriggerStep*);
SQLITE_PRIVATE int sqlite3AtoF(const char *z, double*, int, u8);
SQLITE_PRIVATE int sqlite3GetInt32(const char *, int*);
SQLITE_PRIVATE int sqlite3Atoi(const char*);
+#ifndef SQLITE_OMIT_UTF16
SQLITE_PRIVATE int sqlite3Utf16ByteLen(const void *pData, int nChar);
+#endif
SQLITE_PRIVATE int sqlite3Utf8CharLen(const char *pData, int nByte);
SQLITE_PRIVATE u32 sqlite3Utf8Read(const u8**);
SQLITE_PRIVATE LogEst sqlite3LogEst(u64);
@@ -14433,7 +17739,14 @@ SQLITE_PRIVATE LogEst sqlite3LogEstAdd(LogEst,LogEst);
#ifndef SQLITE_OMIT_VIRTUALTABLE
SQLITE_PRIVATE LogEst sqlite3LogEstFromDouble(double);
#endif
+#if defined(SQLITE_ENABLE_STMT_SCANSTATUS) || \
+ defined(SQLITE_ENABLE_STAT3_OR_STAT4) || \
+ defined(SQLITE_EXPLAIN_ESTIMATED_ROWS)
SQLITE_PRIVATE u64 sqlite3LogEstToInt(LogEst);
+#endif
+SQLITE_PRIVATE VList *sqlite3VListAdd(sqlite3*,VList*,const char*,int,int);
+SQLITE_PRIVATE const char *sqlite3VListNumToName(VList*,int);
+SQLITE_PRIVATE int sqlite3VListNameToNum(VList*,const char*,int);
/*
** Routines to read and write variable-length integers. These used to
@@ -14463,11 +17776,13 @@ SQLITE_PRIVATE const char *sqlite3IndexAffinityStr(sqlite3*, Index*);
SQLITE_PRIVATE void sqlite3TableAffinity(Vdbe*, Table*, int);
SQLITE_PRIVATE char sqlite3CompareAffinity(Expr *pExpr, char aff2);
SQLITE_PRIVATE int sqlite3IndexAffinityOk(Expr *pExpr, char idx_affinity);
+SQLITE_PRIVATE char sqlite3TableColumnAffinity(Table*,int);
SQLITE_PRIVATE char sqlite3ExprAffinity(Expr *pExpr);
SQLITE_PRIVATE int sqlite3Atoi64(const char*, i64*, int, u8);
SQLITE_PRIVATE int sqlite3DecOrHexToI64(const char*, i64*);
SQLITE_PRIVATE void sqlite3ErrorWithMsg(sqlite3*, int, const char*,...);
SQLITE_PRIVATE void sqlite3Error(sqlite3*,int);
+SQLITE_PRIVATE void sqlite3SystemError(sqlite3*,int);
SQLITE_PRIVATE void *sqlite3HexToBlob(sqlite3*, const char *z, int n);
SQLITE_PRIVATE u8 sqlite3HexToInt(int h);
SQLITE_PRIVATE int sqlite3TwoPartName(Parse *, Token *, Token *, Token **);
@@ -14481,6 +17796,8 @@ SQLITE_PRIVATE int sqlite3ReadSchema(Parse *pParse);
SQLITE_PRIVATE CollSeq *sqlite3FindCollSeq(sqlite3*,u8 enc, const char*,int);
SQLITE_PRIVATE CollSeq *sqlite3LocateCollSeq(Parse *pParse, const char*zName);
SQLITE_PRIVATE CollSeq *sqlite3ExprCollSeq(Parse *pParse, Expr *pExpr);
+SQLITE_PRIVATE CollSeq *sqlite3ExprNNCollSeq(Parse *pParse, Expr *pExpr);
+SQLITE_PRIVATE int sqlite3ExprCollSeqMatch(Parse*,Expr*,Expr*);
SQLITE_PRIVATE Expr *sqlite3ExprAddCollateToken(Parse *pParse, Expr*, const Token*, int);
SQLITE_PRIVATE Expr *sqlite3ExprAddCollateString(Parse*,Expr*,const char*);
SQLITE_PRIVATE Expr *sqlite3ExprSkipCollate(Expr*);
@@ -14500,12 +17817,14 @@ SQLITE_PRIVATE u8 sqlite3GetBoolean(const char *z,u8);
SQLITE_PRIVATE const void *sqlite3ValueText(sqlite3_value*, u8);
SQLITE_PRIVATE int sqlite3ValueBytes(sqlite3_value*, u8);
-SQLITE_PRIVATE void sqlite3ValueSetStr(sqlite3_value*, int, const void *,u8,
+SQLITE_PRIVATE void sqlite3ValueSetStr(sqlite3_value*, int, const void *,u8,
void(*)(void*));
SQLITE_PRIVATE void sqlite3ValueSetNull(sqlite3_value*);
SQLITE_PRIVATE void sqlite3ValueFree(sqlite3_value*);
SQLITE_PRIVATE sqlite3_value *sqlite3ValueNew(sqlite3 *);
+#ifndef SQLITE_OMIT_UTF16
SQLITE_PRIVATE char *sqlite3Utf16to8(sqlite3 *, const void*, int, u8);
+#endif
SQLITE_PRIVATE int sqlite3ValueFromExpr(sqlite3 *, Expr *, u8, u8, sqlite3_value **);
SQLITE_PRIVATE void sqlite3ValueApplyAffinity(sqlite3_value *, u8, u8);
#ifndef SQLITE_AMALGAMATION
@@ -14515,7 +17834,7 @@ SQLITE_PRIVATE const unsigned char sqlite3UpperToLower[];
SQLITE_PRIVATE const unsigned char sqlite3CtypeMap[];
SQLITE_PRIVATE const Token sqlite3IntTokens[];
SQLITE_PRIVATE SQLITE_WSD struct Sqlite3Config sqlite3Config;
-SQLITE_PRIVATE SQLITE_WSD FuncDefHash sqlite3GlobalFunctions;
+SQLITE_PRIVATE FuncDefHash sqlite3BuiltinFunctions;
#ifndef SQLITE_OMIT_WSD
SQLITE_PRIVATE int sqlite3PendingByte;
#endif
@@ -14527,7 +17846,7 @@ SQLITE_PRIVATE void sqlite3AlterRenameTable(Parse*, SrcList*, Token*);
SQLITE_PRIVATE int sqlite3GetToken(const unsigned char *, int *);
SQLITE_PRIVATE void sqlite3NestedParse(Parse*, const char*, ...);
SQLITE_PRIVATE void sqlite3ExpirePreparedStatements(sqlite3*);
-SQLITE_PRIVATE int sqlite3CodeSubselect(Parse *, Expr *, int, int);
+SQLITE_PRIVATE int sqlite3CodeSubselect(Parse*, Expr *, int, int);
SQLITE_PRIVATE void sqlite3SelectPrep(Parse*, Select*, NameContext*);
SQLITE_PRIVATE void sqlite3SelectWrongNumTermsError(Parse *pParse, Select *p);
SQLITE_PRIVATE int sqlite3MatchSpanName(const char*, const char*, const char*, const char*);
@@ -14550,7 +17869,6 @@ SQLITE_PRIVATE void sqlite3DeleteIndexSamples(sqlite3*,Index*);
SQLITE_PRIVATE void sqlite3DefaultRowEst(Index*);
SQLITE_PRIVATE void sqlite3RegisterLikeFunctions(sqlite3*, int);
SQLITE_PRIVATE int sqlite3IsLikeFunction(sqlite3*,Expr*,int*,char*);
-SQLITE_PRIVATE void sqlite3MinimumFileFormat(Parse*, int, int);
SQLITE_PRIVATE void sqlite3SchemaClear(void *);
SQLITE_PRIVATE Schema *sqlite3SchemaGet(sqlite3 *, Btree *);
SQLITE_PRIVATE int sqlite3SchemaToIndex(sqlite3 *db, Schema *);
@@ -14561,11 +17879,13 @@ SQLITE_PRIVATE KeyInfo *sqlite3KeyInfoOfIndex(Parse*, Index*);
#ifdef SQLITE_DEBUG
SQLITE_PRIVATE int sqlite3KeyInfoIsWriteable(KeyInfo*);
#endif
-SQLITE_PRIVATE int sqlite3CreateFunc(sqlite3 *, const char *, int, int, void *,
+SQLITE_PRIVATE int sqlite3CreateFunc(sqlite3 *, const char *, int, int, void *,
void (*)(sqlite3_context*,int,sqlite3_value **),
void (*)(sqlite3_context*,int,sqlite3_value **), void (*)(sqlite3_context*),
FuncDestructor *pDestructor
);
+SQLITE_PRIVATE void sqlite3OomFault(sqlite3*);
+SQLITE_PRIVATE void sqlite3OomClear(sqlite3*);
SQLITE_PRIVATE int sqlite3ApiExit(sqlite3 *db, int);
SQLITE_PRIVATE int sqlite3OpenTempDatabase(Parse *);
@@ -14581,19 +17901,29 @@ SQLITE_PRIVATE Expr *sqlite3CreateColumnExpr(sqlite3 *, SrcList *, int, int);
SQLITE_PRIVATE void sqlite3BackupRestart(sqlite3_backup *);
SQLITE_PRIVATE void sqlite3BackupUpdate(sqlite3_backup *, Pgno, const u8 *);
+#ifndef SQLITE_OMIT_SUBQUERY
+SQLITE_PRIVATE int sqlite3ExprCheckIN(Parse*, Expr*);
+#else
+# define sqlite3ExprCheckIN(x,y) SQLITE_OK
+#endif
+
#ifdef SQLITE_ENABLE_STAT3_OR_STAT4
SQLITE_PRIVATE void sqlite3AnalyzeFunctions(void);
-SQLITE_PRIVATE int sqlite3Stat4ProbeSetValue(Parse*,Index*,UnpackedRecord**,Expr*,u8,int,int*);
+SQLITE_PRIVATE int sqlite3Stat4ProbeSetValue(
+ Parse*,Index*,UnpackedRecord**,Expr*,int,int,int*);
SQLITE_PRIVATE int sqlite3Stat4ValueFromExpr(Parse*, Expr*, u8, sqlite3_value**);
SQLITE_PRIVATE void sqlite3Stat4ProbeFree(UnpackedRecord*);
SQLITE_PRIVATE int sqlite3Stat4Column(sqlite3*, const void*, int, int, sqlite3_value**);
+SQLITE_PRIVATE char sqlite3IndexColumnAffinity(sqlite3*, Index*, int);
#endif
/*
** The interface to the LEMON-generated parser
*/
-SQLITE_PRIVATE void *sqlite3ParserAlloc(void*(*)(u64));
-SQLITE_PRIVATE void sqlite3ParserFree(void*, void(*)(void*));
+#ifndef SQLITE_AMALGAMATION
+SQLITE_PRIVATE void *sqlite3ParserAlloc(void*(*)(u64));
+SQLITE_PRIVATE void sqlite3ParserFree(void*, void(*)(void*));
+#endif
SQLITE_PRIVATE void sqlite3Parser(void*, int, Token, Parse*);
#ifdef YYTRACKMAXSTACKDEPTH
SQLITE_PRIVATE int sqlite3ParserStackPeak(void*);
@@ -14622,7 +17952,7 @@ SQLITE_PRIVATE int sqlite3Utf8To8(unsigned char*);
# define sqlite3VtabRollback(X)
# define sqlite3VtabCommit(X)
# define sqlite3VtabInSync(db) 0
-# define sqlite3VtabLock(X)
+# define sqlite3VtabLock(X)
# define sqlite3VtabUnlock(X)
# define sqlite3VtabUnlockList(X)
# define sqlite3VtabSavepoint(X, Y, Z) SQLITE_OK
@@ -14639,6 +17969,13 @@ SQLITE_PRIVATE void sqlite3VtabUnlockList(sqlite3*);
SQLITE_PRIVATE int sqlite3VtabSavepoint(sqlite3 *, int, int);
SQLITE_PRIVATE void sqlite3VtabImportErrmsg(Vdbe*, sqlite3_vtab*);
SQLITE_PRIVATE VTable *sqlite3GetVTable(sqlite3*, Table*);
+SQLITE_PRIVATE Module *sqlite3VtabCreateModule(
+ sqlite3*,
+ const char*,
+ const sqlite3_module*,
+ void*,
+ void(*)(void*)
+ );
# define sqlite3VtabInSync(db) ((db)->nVTrans>0 && (db)->aVTrans==0)
#endif
SQLITE_PRIVATE int sqlite3VtabEponymousTableInit(Parse*,Module*);
@@ -14680,7 +18017,7 @@ SQLITE_PRIVATE void sqlite3WithPush(Parse*, With*, u8);
** no-op macros if OMIT_FOREIGN_KEY is defined. In this case no foreign
** key functionality is available. If OMIT_TRIGGER is defined but
** OMIT_FOREIGN_KEY is not, only some of the functions are no-oped. In
-** this case foreign keys are parsed, but no other functionality is
+** this case foreign keys are parsed, but no other functionality is
** provided (enforcement of FK constraints requires the triggers sub-system).
*/
#if !defined(SQLITE_OMIT_FOREIGN_KEY) && !defined(SQLITE_OMIT_TRIGGER)
@@ -14696,6 +18033,7 @@ SQLITE_PRIVATE FKey *sqlite3FkReferences(Table *);
#define sqlite3FkDropTable(a,b,c)
#define sqlite3FkOldmask(a,b) 0
#define sqlite3FkRequired(a,b,c,d) 0
+ #define sqlite3FkReferences(a) 0
#endif
#ifndef SQLITE_OMIT_FOREIGN_KEY
SQLITE_PRIVATE void sqlite3FkDelete(sqlite3 *, Table*);
@@ -14714,10 +18052,10 @@ SQLITE_PRIVATE int sqlite3FkLocateIndex(Parse*,Table*,FKey*,Index**,int**);
/*
** The interface to the code in fault.c used for identifying "benign"
-** malloc failures. This is only present if SQLITE_OMIT_BUILTIN_TEST
+** malloc failures. This is only present if SQLITE_UNTESTABLE
** is not defined.
*/
-#ifndef SQLITE_OMIT_BUILTIN_TEST
+#ifndef SQLITE_UNTESTABLE
SQLITE_PRIVATE void sqlite3BeginBenignMalloc(void);
SQLITE_PRIVATE void sqlite3EndBenignMalloc(void);
#else
@@ -14739,21 +18077,17 @@ SQLITE_PRIVATE void sqlite3EndBenignMalloc(void);
#define IN_INDEX_NOOP_OK 0x0001 /* OK to return IN_INDEX_NOOP */
#define IN_INDEX_MEMBERSHIP 0x0002 /* IN operator used for membership test */
#define IN_INDEX_LOOP 0x0004 /* IN operator used as a loop */
-SQLITE_PRIVATE int sqlite3FindInIndex(Parse *, Expr *, u32, int*);
+SQLITE_PRIVATE int sqlite3FindInIndex(Parse *, Expr *, u32, int*, int*);
-#ifdef SQLITE_ENABLE_ATOMIC_WRITE
-SQLITE_PRIVATE int sqlite3JournalOpen(sqlite3_vfs *, const char *, sqlite3_file *, int, int);
-SQLITE_PRIVATE int sqlite3JournalSize(sqlite3_vfs *);
+SQLITE_PRIVATE int sqlite3JournalOpen(sqlite3_vfs *, const char *, sqlite3_file *, int, int);
+SQLITE_PRIVATE int sqlite3JournalSize(sqlite3_vfs *);
+#if defined(SQLITE_ENABLE_ATOMIC_WRITE) \
+ || defined(SQLITE_ENABLE_BATCH_ATOMIC_WRITE)
SQLITE_PRIVATE int sqlite3JournalCreate(sqlite3_file *);
-SQLITE_PRIVATE int sqlite3JournalExists(sqlite3_file *p);
-#else
- #define sqlite3JournalSize(pVfs) ((pVfs)->szOsFile)
- #define sqlite3JournalExists(p) 1
#endif
+SQLITE_PRIVATE int sqlite3JournalIsInMemory(sqlite3_file *p);
SQLITE_PRIVATE void sqlite3MemJournalOpen(sqlite3_file *);
-SQLITE_PRIVATE int sqlite3MemJournalSize(void);
-SQLITE_PRIVATE int sqlite3IsMemJournal(sqlite3_file *);
SQLITE_PRIVATE void sqlite3ExprSetHeightAndFlags(Parse *pParse, Expr *p);
#if SQLITE_MAX_EXPR_DEPTH>0
@@ -14784,7 +18118,7 @@ SQLITE_PRIVATE void sqlite3ParserTrace(FILE*, char *);
/*
** If the SQLITE_ENABLE IOTRACE exists then the global variable
** sqlite3IoTrace is a pointer to a printf-like routine used to
-** print I/O tracing messages.
+** print I/O tracing messages.
*/
#ifdef SQLITE_ENABLE_IOTRACE
# define IOTRACE(A) if( sqlite3IoTrace ){ sqlite3IoTrace A; }
@@ -14818,7 +18152,7 @@ SQLITE_API SQLITE_EXTERN void (SQLITE_CDECL *sqlite3IoTrace)(const char*,...);
** that allocations that might have been satisfied by lookaside are not
** passed back to non-lookaside free() routines. Asserts such as the
** example above are placed on the non-lookaside free() routines to verify
-** this constraint.
+** this constraint.
**
** All of this is no-op for a production build. It only comes into
** play when the SQLITE_MEMDEBUG compile-time option is used.
@@ -14834,8 +18168,7 @@ SQLITE_PRIVATE int sqlite3MemdebugNoType(void*,u8);
#endif
#define MEMTYPE_HEAP 0x01 /* General heap allocations */
#define MEMTYPE_LOOKASIDE 0x02 /* Heap that might have been lookaside */
-#define MEMTYPE_SCRATCH 0x04 /* Scratch allocations */
-#define MEMTYPE_PCACHE 0x08 /* Page cache allocations */
+#define MEMTYPE_PCACHE 0x04 /* Page cache allocations */
/*
** Threading interface
@@ -14845,11 +18178,24 @@ SQLITE_PRIVATE int sqlite3ThreadCreate(SQLiteThread**,void*(*)(void*),void*);
SQLITE_PRIVATE int sqlite3ThreadJoin(SQLiteThread*, void**);
#endif
+#if defined(SQLITE_ENABLE_DBPAGE_VTAB) || defined(SQLITE_TEST)
+SQLITE_PRIVATE int sqlite3DbpageRegister(sqlite3*);
+#endif
#if defined(SQLITE_ENABLE_DBSTAT_VTAB) || defined(SQLITE_TEST)
SQLITE_PRIVATE int sqlite3DbstatRegister(sqlite3*);
#endif
-#endif /* _SQLITEINT_H_ */
+SQLITE_PRIVATE int sqlite3ExprVectorSize(Expr *pExpr);
+SQLITE_PRIVATE int sqlite3ExprIsVector(Expr *pExpr);
+SQLITE_PRIVATE Expr *sqlite3VectorFieldSubexpr(Expr*, int);
+SQLITE_PRIVATE Expr *sqlite3ExprForVectorField(Parse*,Expr*,int);
+SQLITE_PRIVATE void sqlite3VectorErrorMsg(Parse*, Expr*);
+
+#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
+SQLITE_PRIVATE const char **sqlite3CompileOptions(int *pnOpt);
+#endif
+
+#endif /* SQLITEINT_H */
/************** End of sqliteInt.h *******************************************/
/************** Begin file global.c ******************************************/
@@ -14925,6 +18271,7 @@ SQLITE_PRIVATE const unsigned char sqlite3UpperToLower[] = {
** isxdigit() 0x08
** toupper() 0x20
** SQLite identifier character 0x40
+** Quote character 0x80
**
** Bit 0x20 is set if the mapped character requires translation to upper
** case. i.e. if the character is a lower-case ASCII character.
@@ -14933,16 +18280,13 @@ SQLITE_PRIVATE const unsigned char sqlite3UpperToLower[] = {
**
** (x & ~(map[x]&0x20))
**
-** Standard function tolower() is implemented using the sqlite3UpperToLower[]
+** The equivalent of tolower() is implemented using the sqlite3UpperToLower[]
** array. tolower() is used more often than toupper() by SQLite.
**
-** Bit 0x40 is set if the character non-alphanumeric and can be used in an
+** Bit 0x40 is set if the character is non-alphanumeric and can be used in an
** SQLite identifier. Identifiers are alphanumerics, "_", "$", and any
** non-ASCII UTF character. Hence the test for whether or not a character is
** part of an identifier is 0x46.
-**
-** SQLite's versions are identical to the standard versions assuming a
-** locale of "C". They are implemented as macros in sqliteInt.h.
*/
#ifdef SQLITE_ASCII
SQLITE_PRIVATE const unsigned char sqlite3CtypeMap[256] = {
@@ -14950,7 +18294,7 @@ SQLITE_PRIVATE const unsigned char sqlite3CtypeMap[256] = {
0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, /* 08..0f ........ */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 10..17 ........ */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 18..1f ........ */
- 0x01, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, /* 20..27 !"#$%&' */
+ 0x01, 0x00, 0x80, 0x00, 0x40, 0x00, 0x00, 0x80, /* 20..27 !"#$%&' */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 28..2f ()*+,-./ */
0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, /* 30..37 01234567 */
0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 38..3f 89:;<=>? */
@@ -14958,8 +18302,8 @@ SQLITE_PRIVATE const unsigned char sqlite3CtypeMap[256] = {
0x00, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x02, /* 40..47 @ABCDEFG */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* 48..4f HIJKLMNO */
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* 50..57 PQRSTUVW */
- 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x40, /* 58..5f XYZ[\]^_ */
- 0x00, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x22, /* 60..67 `abcdefg */
+ 0x02, 0x02, 0x02, 0x80, 0x00, 0x00, 0x00, 0x40, /* 58..5f XYZ[\]^_ */
+ 0x80, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x22, /* 60..67 `abcdefg */
0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, /* 68..6f hijklmno */
0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, /* 70..77 pqrstuvw */
0x22, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, /* 78..7f xyz{|}~. */
@@ -14994,9 +18338,16 @@ SQLITE_PRIVATE const unsigned char sqlite3CtypeMap[256] = {
** EVIDENCE-OF: R-43642-56306 By default, URI handling is globally
** disabled. The default value may be changed by compiling with the
** SQLITE_USE_URI symbol defined.
+**
+** URI filenames are enabled by default if SQLITE_HAS_CODEC is
+** enabled.
*/
#ifndef SQLITE_USE_URI
-# define SQLITE_USE_URI 0
+# ifdef SQLITE_HAS_CODEC
+# define SQLITE_USE_URI 1
+# else
+# define SQLITE_USE_URI 0
+# endif
#endif
/* EVIDENCE-OF: R-38720-18127 The default setting is determined by the
@@ -15014,6 +18365,31 @@ SQLITE_PRIVATE const unsigned char sqlite3CtypeMap[256] = {
# define SQLITE_SORTER_PMASZ 250
#endif
+/* Statement journals spill to disk when their size exceeds the following
+** threshold (in bytes). 0 means that statement journals are created and
+** written to disk immediately (the default behavior for SQLite versions
+** before 3.12.0). -1 means always keep the entire statement journal in
+** memory. (The statement journal is also always held entirely in memory
+** if journal_mode=MEMORY or if temp_store=MEMORY, regardless of this
+** setting.)
+*/
+#ifndef SQLITE_STMTJRNL_SPILL
+# define SQLITE_STMTJRNL_SPILL (64*1024)
+#endif
+
+/*
+** The default lookaside-configuration, the format "SZ,N". SZ is the
+** number of bytes in each lookaside slot (should be a multiple of 8)
+** and N is the number of slots. The lookaside-configuration can be
+** changed as start-time using sqlite3_config(SQLITE_CONFIG_LOOKASIDE)
+** or at run-time for an individual database connection using
+** sqlite3_db_config(db, SQLITE_DBCONFIG_LOOKASIDE);
+*/
+#ifndef SQLITE_DEFAULT_LOOKASIDE
+# define SQLITE_DEFAULT_LOOKASIDE 1200,100
+#endif
+
+
/*
** The following singleton contains the global configuration for
** the SQLite library.
@@ -15024,10 +18400,11 @@ SQLITE_PRIVATE SQLITE_WSD struct Sqlite3Config sqlite3Config = {
SQLITE_THREADSAFE==1, /* bFullMutex */
SQLITE_USE_URI, /* bOpenUri */
SQLITE_ALLOW_COVERING_INDEX_SCAN, /* bUseCis */
+ 0, /* bSmallMalloc */
0x7ffffffe, /* mxStrlen */
0, /* neverCorrupt */
- 128, /* szLookaside */
- 500, /* nLookaside */
+ SQLITE_DEFAULT_LOOKASIDE, /* szLookaside, nLookaside */
+ SQLITE_STMTJRNL_SPILL, /* nStmtSpill */
{0,0,0,0,0,0,0,0}, /* m */
{0,0,0,0,0,0,0,0,0}, /* mutex */
{0,0,0,0,0,0,0,0,0,0,0,0,0},/* pcache2 */
@@ -15036,9 +18413,6 @@ SQLITE_PRIVATE SQLITE_WSD struct Sqlite3Config sqlite3Config = {
0, 0, /* mnHeap, mxHeap */
SQLITE_DEFAULT_MMAP_SIZE, /* szMmap */
SQLITE_MAX_MMAP_SIZE, /* mxMmap */
- (void*)0, /* pScratch */
- 0, /* szScratch */
- 0, /* nScratch */
(void*)0, /* pPage */
0, /* szPage */
SQLITE_DEFAULT_PCACHE_INITSZ, /* nPage */
@@ -15063,10 +18437,11 @@ SQLITE_PRIVATE SQLITE_WSD struct Sqlite3Config sqlite3Config = {
0, /* xVdbeBranch */
0, /* pVbeBranchArg */
#endif
-#ifndef SQLITE_OMIT_BUILTIN_TEST
+#ifndef SQLITE_UNTESTABLE
0, /* xTestCallback */
#endif
- 0 /* bLocaltimeFault */
+ 0, /* bLocaltimeFault */
+ 0x7ffffffe /* iOnceResetThreshold */
};
/*
@@ -15074,7 +18449,7 @@ SQLITE_PRIVATE SQLITE_WSD struct Sqlite3Config sqlite3Config = {
** database connections. After initialization, this table is
** read-only.
*/
-SQLITE_PRIVATE SQLITE_WSD FuncDefHash sqlite3GlobalFunctions;
+SQLITE_PRIVATE FuncDefHash sqlite3BuiltinFunctions;
/*
** Constant tokens for values 0 and 1.
@@ -15089,7 +18464,7 @@ SQLITE_PRIVATE const Token sqlite3IntTokens[] = {
** The value of the "pending" byte must be 0x40000000 (1 byte past the
** 1-gibabyte boundary) in a compatible database. SQLite never uses
** the database page that contains the pending byte. It never attempts
-** to read or write that page. The pending byte page is set assign
+** to read or write that page. The pending byte page is set aside
** for use by the VFS layers as space for managing file locks.
**
** During testing, it is often desirable to move the pending byte to
@@ -15122,451 +18497,6 @@ SQLITE_PRIVATE const unsigned char sqlite3OpcodeProperty[] = OPFLG_INITIALIZER;
SQLITE_PRIVATE const char sqlite3StrBINARY[] = "BINARY";
/************** End of global.c **********************************************/
-/************** Begin file ctime.c *******************************************/
-/*
-** 2010 February 23
-**
-** The author disclaims copyright to this source code. In place of
-** a legal notice, here is a blessing:
-**
-** May you do good and not evil.
-** May you find forgiveness for yourself and forgive others.
-** May you share freely, never taking more than you give.
-**
-*************************************************************************
-**
-** This file implements routines used to report what compile-time options
-** SQLite was built with.
-*/
-
-#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
-
-/* #include "sqliteInt.h" */
-
-/*
-** An array of names of all compile-time options. This array should
-** be sorted A-Z.
-**
-** This array looks large, but in a typical installation actually uses
-** only a handful of compile-time options, so most times this array is usually
-** rather short and uses little memory space.
-*/
-static const char * const azCompileOpt[] = {
-
-/* These macros are provided to "stringify" the value of the define
-** for those options in which the value is meaningful. */
-#define CTIMEOPT_VAL_(opt) #opt
-#define CTIMEOPT_VAL(opt) CTIMEOPT_VAL_(opt)
-
-#if SQLITE_32BIT_ROWID
- "32BIT_ROWID",
-#endif
-#if SQLITE_4_BYTE_ALIGNED_MALLOC
- "4_BYTE_ALIGNED_MALLOC",
-#endif
-#if SQLITE_CASE_SENSITIVE_LIKE
- "CASE_SENSITIVE_LIKE",
-#endif
-#if SQLITE_CHECK_PAGES
- "CHECK_PAGES",
-#endif
-#if SQLITE_COVERAGE_TEST
- "COVERAGE_TEST",
-#endif
-#if SQLITE_DEBUG
- "DEBUG",
-#endif
-#if SQLITE_DEFAULT_LOCKING_MODE
- "DEFAULT_LOCKING_MODE=" CTIMEOPT_VAL(SQLITE_DEFAULT_LOCKING_MODE),
-#endif
-#if defined(SQLITE_DEFAULT_MMAP_SIZE) && !defined(SQLITE_DEFAULT_MMAP_SIZE_xc)
- "DEFAULT_MMAP_SIZE=" CTIMEOPT_VAL(SQLITE_DEFAULT_MMAP_SIZE),
-#endif
-#if SQLITE_DISABLE_DIRSYNC
- "DISABLE_DIRSYNC",
-#endif
-#if SQLITE_DISABLE_LFS
- "DISABLE_LFS",
-#endif
-#if SQLITE_ENABLE_8_3_NAMES
- "ENABLE_8_3_NAMES",
-#endif
-#if SQLITE_ENABLE_API_ARMOR
- "ENABLE_API_ARMOR",
-#endif
-#if SQLITE_ENABLE_ATOMIC_WRITE
- "ENABLE_ATOMIC_WRITE",
-#endif
-#if SQLITE_ENABLE_CEROD
- "ENABLE_CEROD",
-#endif
-#if SQLITE_ENABLE_COLUMN_METADATA
- "ENABLE_COLUMN_METADATA",
-#endif
-#if SQLITE_ENABLE_DBSTAT_VTAB
- "ENABLE_DBSTAT_VTAB",
-#endif
-#if SQLITE_ENABLE_EXPENSIVE_ASSERT
- "ENABLE_EXPENSIVE_ASSERT",
-#endif
-#if SQLITE_ENABLE_FTS1
- "ENABLE_FTS1",
-#endif
-#if SQLITE_ENABLE_FTS2
- "ENABLE_FTS2",
-#endif
-#if SQLITE_ENABLE_FTS3
- "ENABLE_FTS3",
-#endif
-#if SQLITE_ENABLE_FTS3_PARENTHESIS
- "ENABLE_FTS3_PARENTHESIS",
-#endif
-#if SQLITE_ENABLE_FTS4
- "ENABLE_FTS4",
-#endif
-#if SQLITE_ENABLE_FTS5
- "ENABLE_FTS5",
-#endif
-#if SQLITE_ENABLE_ICU
- "ENABLE_ICU",
-#endif
-#if SQLITE_ENABLE_IOTRACE
- "ENABLE_IOTRACE",
-#endif
-#if SQLITE_ENABLE_JSON1
- "ENABLE_JSON1",
-#endif
-#if SQLITE_ENABLE_LOAD_EXTENSION
- "ENABLE_LOAD_EXTENSION",
-#endif
-#if SQLITE_ENABLE_LOCKING_STYLE
- "ENABLE_LOCKING_STYLE=" CTIMEOPT_VAL(SQLITE_ENABLE_LOCKING_STYLE),
-#endif
-#if SQLITE_ENABLE_MEMORY_MANAGEMENT
- "ENABLE_MEMORY_MANAGEMENT",
-#endif
-#if SQLITE_ENABLE_MEMSYS3
- "ENABLE_MEMSYS3",
-#endif
-#if SQLITE_ENABLE_MEMSYS5
- "ENABLE_MEMSYS5",
-#endif
-#if SQLITE_ENABLE_OVERSIZE_CELL_CHECK
- "ENABLE_OVERSIZE_CELL_CHECK",
-#endif
-#if SQLITE_ENABLE_RTREE
- "ENABLE_RTREE",
-#endif
-#if defined(SQLITE_ENABLE_STAT4)
- "ENABLE_STAT4",
-#elif defined(SQLITE_ENABLE_STAT3)
- "ENABLE_STAT3",
-#endif
-#if SQLITE_ENABLE_UNLOCK_NOTIFY
- "ENABLE_UNLOCK_NOTIFY",
-#endif
-#if SQLITE_ENABLE_UPDATE_DELETE_LIMIT
- "ENABLE_UPDATE_DELETE_LIMIT",
-#endif
-#if SQLITE_HAS_CODEC
- "HAS_CODEC",
-#endif
-#if HAVE_ISNAN || SQLITE_HAVE_ISNAN
- "HAVE_ISNAN",
-#endif
-#if SQLITE_HOMEGROWN_RECURSIVE_MUTEX
- "HOMEGROWN_RECURSIVE_MUTEX",
-#endif
-#if SQLITE_IGNORE_AFP_LOCK_ERRORS
- "IGNORE_AFP_LOCK_ERRORS",
-#endif
-#if SQLITE_IGNORE_FLOCK_LOCK_ERRORS
- "IGNORE_FLOCK_LOCK_ERRORS",
-#endif
-#ifdef SQLITE_INT64_TYPE
- "INT64_TYPE",
-#endif
-#ifdef SQLITE_LIKE_DOESNT_MATCH_BLOBS
- "LIKE_DOESNT_MATCH_BLOBS",
-#endif
-#if SQLITE_LOCK_TRACE
- "LOCK_TRACE",
-#endif
-#if defined(SQLITE_MAX_MMAP_SIZE) && !defined(SQLITE_MAX_MMAP_SIZE_xc)
- "MAX_MMAP_SIZE=" CTIMEOPT_VAL(SQLITE_MAX_MMAP_SIZE),
-#endif
-#ifdef SQLITE_MAX_SCHEMA_RETRY
- "MAX_SCHEMA_RETRY=" CTIMEOPT_VAL(SQLITE_MAX_SCHEMA_RETRY),
-#endif
-#if SQLITE_MEMDEBUG
- "MEMDEBUG",
-#endif
-#if SQLITE_MIXED_ENDIAN_64BIT_FLOAT
- "MIXED_ENDIAN_64BIT_FLOAT",
-#endif
-#if SQLITE_NO_SYNC
- "NO_SYNC",
-#endif
-#if SQLITE_OMIT_ALTERTABLE
- "OMIT_ALTERTABLE",
-#endif
-#if SQLITE_OMIT_ANALYZE
- "OMIT_ANALYZE",
-#endif
-#if SQLITE_OMIT_ATTACH
- "OMIT_ATTACH",
-#endif
-#if SQLITE_OMIT_AUTHORIZATION
- "OMIT_AUTHORIZATION",
-#endif
-#if SQLITE_OMIT_AUTOINCREMENT
- "OMIT_AUTOINCREMENT",
-#endif
-#if SQLITE_OMIT_AUTOINIT
- "OMIT_AUTOINIT",
-#endif
-#if SQLITE_OMIT_AUTOMATIC_INDEX
- "OMIT_AUTOMATIC_INDEX",
-#endif
-#if SQLITE_OMIT_AUTORESET
- "OMIT_AUTORESET",
-#endif
-#if SQLITE_OMIT_AUTOVACUUM
- "OMIT_AUTOVACUUM",
-#endif
-#if SQLITE_OMIT_BETWEEN_OPTIMIZATION
- "OMIT_BETWEEN_OPTIMIZATION",
-#endif
-#if SQLITE_OMIT_BLOB_LITERAL
- "OMIT_BLOB_LITERAL",
-#endif
-#if SQLITE_OMIT_BTREECOUNT
- "OMIT_BTREECOUNT",
-#endif
-#if SQLITE_OMIT_BUILTIN_TEST
- "OMIT_BUILTIN_TEST",
-#endif
-#if SQLITE_OMIT_CAST
- "OMIT_CAST",
-#endif
-#if SQLITE_OMIT_CHECK
- "OMIT_CHECK",
-#endif
-#if SQLITE_OMIT_COMPLETE
- "OMIT_COMPLETE",
-#endif
-#if SQLITE_OMIT_COMPOUND_SELECT
- "OMIT_COMPOUND_SELECT",
-#endif
-#if SQLITE_OMIT_CTE
- "OMIT_CTE",
-#endif
-#if SQLITE_OMIT_DATETIME_FUNCS
- "OMIT_DATETIME_FUNCS",
-#endif
-#if SQLITE_OMIT_DECLTYPE
- "OMIT_DECLTYPE",
-#endif
-#if SQLITE_OMIT_DEPRECATED
- "OMIT_DEPRECATED",
-#endif
-#if SQLITE_OMIT_DISKIO
- "OMIT_DISKIO",
-#endif
-#if SQLITE_OMIT_EXPLAIN
- "OMIT_EXPLAIN",
-#endif
-#if SQLITE_OMIT_FLAG_PRAGMAS
- "OMIT_FLAG_PRAGMAS",
-#endif
-#if SQLITE_OMIT_FLOATING_POINT
- "OMIT_FLOATING_POINT",
-#endif
-#if SQLITE_OMIT_FOREIGN_KEY
- "OMIT_FOREIGN_KEY",
-#endif
-#if SQLITE_OMIT_GET_TABLE
- "OMIT_GET_TABLE",
-#endif
-#if SQLITE_OMIT_INCRBLOB
- "OMIT_INCRBLOB",
-#endif
-#if SQLITE_OMIT_INTEGRITY_CHECK
- "OMIT_INTEGRITY_CHECK",
-#endif
-#if SQLITE_OMIT_LIKE_OPTIMIZATION
- "OMIT_LIKE_OPTIMIZATION",
-#endif
-#if SQLITE_OMIT_LOAD_EXTENSION
- "OMIT_LOAD_EXTENSION",
-#endif
-#if SQLITE_OMIT_LOCALTIME
- "OMIT_LOCALTIME",
-#endif
-#if SQLITE_OMIT_LOOKASIDE
- "OMIT_LOOKASIDE",
-#endif
-#if SQLITE_OMIT_MEMORYDB
- "OMIT_MEMORYDB",
-#endif
-#if SQLITE_OMIT_OR_OPTIMIZATION
- "OMIT_OR_OPTIMIZATION",
-#endif
-#if SQLITE_OMIT_PAGER_PRAGMAS
- "OMIT_PAGER_PRAGMAS",
-#endif
-#if SQLITE_OMIT_PRAGMA
- "OMIT_PRAGMA",
-#endif
-#if SQLITE_OMIT_PROGRESS_CALLBACK
- "OMIT_PROGRESS_CALLBACK",
-#endif
-#if SQLITE_OMIT_QUICKBALANCE
- "OMIT_QUICKBALANCE",
-#endif
-#if SQLITE_OMIT_REINDEX
- "OMIT_REINDEX",
-#endif
-#if SQLITE_OMIT_SCHEMA_PRAGMAS
- "OMIT_SCHEMA_PRAGMAS",
-#endif
-#if SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS
- "OMIT_SCHEMA_VERSION_PRAGMAS",
-#endif
-#if SQLITE_OMIT_SHARED_CACHE
- "OMIT_SHARED_CACHE",
-#endif
-#if SQLITE_OMIT_SUBQUERY
- "OMIT_SUBQUERY",
-#endif
-#if SQLITE_OMIT_TCL_VARIABLE
- "OMIT_TCL_VARIABLE",
-#endif
-#if SQLITE_OMIT_TEMPDB
- "OMIT_TEMPDB",
-#endif
-#if SQLITE_OMIT_TRACE
- "OMIT_TRACE",
-#endif
-#if SQLITE_OMIT_TRIGGER
- "OMIT_TRIGGER",
-#endif
-#if SQLITE_OMIT_TRUNCATE_OPTIMIZATION
- "OMIT_TRUNCATE_OPTIMIZATION",
-#endif
-#if SQLITE_OMIT_UTF16
- "OMIT_UTF16",
-#endif
-#if SQLITE_OMIT_VACUUM
- "OMIT_VACUUM",
-#endif
-#if SQLITE_OMIT_VIEW
- "OMIT_VIEW",
-#endif
-#if SQLITE_OMIT_VIRTUALTABLE
- "OMIT_VIRTUALTABLE",
-#endif
-#if SQLITE_OMIT_WAL
- "OMIT_WAL",
-#endif
-#if SQLITE_OMIT_WSD
- "OMIT_WSD",
-#endif
-#if SQLITE_OMIT_XFER_OPT
- "OMIT_XFER_OPT",
-#endif
-#if SQLITE_PERFORMANCE_TRACE
- "PERFORMANCE_TRACE",
-#endif
-#if SQLITE_PROXY_DEBUG
- "PROXY_DEBUG",
-#endif
-#if SQLITE_RTREE_INT_ONLY
- "RTREE_INT_ONLY",
-#endif
-#if SQLITE_SECURE_DELETE
- "SECURE_DELETE",
-#endif
-#if SQLITE_SMALL_STACK
- "SMALL_STACK",
-#endif
-#if SQLITE_SOUNDEX
- "SOUNDEX",
-#endif
-#if SQLITE_SYSTEM_MALLOC
- "SYSTEM_MALLOC",
-#endif
-#if SQLITE_TCL
- "TCL",
-#endif
-#if defined(SQLITE_TEMP_STORE) && !defined(SQLITE_TEMP_STORE_xc)
- "TEMP_STORE=" CTIMEOPT_VAL(SQLITE_TEMP_STORE),
-#endif
-#if SQLITE_TEST
- "TEST",
-#endif
-#if defined(SQLITE_THREADSAFE)
- "THREADSAFE=" CTIMEOPT_VAL(SQLITE_THREADSAFE),
-#endif
-#if SQLITE_USE_ALLOCA
- "USE_ALLOCA",
-#endif
-#if SQLITE_USER_AUTHENTICATION
- "USER_AUTHENTICATION",
-#endif
-#if SQLITE_WIN32_MALLOC
- "WIN32_MALLOC",
-#endif
-#if SQLITE_ZERO_MALLOC
- "ZERO_MALLOC"
-#endif
-};
-
-/*
-** Given the name of a compile-time option, return true if that option
-** was used and false if not.
-**
-** The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix
-** is not required for a match.
-*/
-SQLITE_API int SQLITE_STDCALL sqlite3_compileoption_used(const char *zOptName){
- int i, n;
-
-#if SQLITE_ENABLE_API_ARMOR
- if( zOptName==0 ){
- (void)SQLITE_MISUSE_BKPT;
- return 0;
- }
-#endif
- if( sqlite3StrNICmp(zOptName, "SQLITE_", 7)==0 ) zOptName += 7;
- n = sqlite3Strlen30(zOptName);
-
- /* Since ArraySize(azCompileOpt) is normally in single digits, a
- ** linear search is adequate. No need for a binary search. */
- for(i=0; i=0 && NaDb[] (or -1) */
- u8 nullRow; /* True if pointing to a row with no data */
- u8 deferredMoveto; /* A call to sqlite3BtreeMoveto() is needed */
- u8 isTable; /* True for rowid tables. False for indexes */
+ u8 eCurType; /* One of the CURTYPE_* values above */
+ i8 iDb; /* Index of cursor database in db->aDb[] (or -1) */
+ u8 nullRow; /* True if pointing to a row with no data */
+ u8 deferredMoveto; /* A call to sqlite3BtreeMoveto() is needed */
+ u8 isTable; /* True for rowid tables. False for indexes */
#ifdef SQLITE_DEBUG
- u8 seekOp; /* Most recent seek operation on this cursor */
+ u8 seekOp; /* Most recent seek operation on this cursor */
+ u8 wrFlag; /* The wrFlag argument to sqlite3BtreeCursor() */
#endif
- Bool isEphemeral:1; /* True for an ephemeral table */
- Bool useRandomRowid:1;/* Generate new record numbers semi-randomly */
- Bool isOrdered:1; /* True if the underlying table is BTREE_UNORDERED */
- Pgno pgnoRoot; /* Root page of the open btree cursor */
- i16 nField; /* Number of fields in the header */
- u16 nHdrParsed; /* Number of header fields parsed so far */
+ Bool isEphemeral:1; /* True for an ephemeral table */
+ Bool useRandomRowid:1; /* Generate new record numbers semi-randomly */
+ Bool isOrdered:1; /* True if the table is not BTREE_UNORDERED */
+ Btree *pBtx; /* Separate file holding temporary table */
+ i64 seqCount; /* Sequence counter */
+ int *aAltMap; /* Mapping from table to index column numbers */
+
+ /* Cached OP_Column parse information is only valid if cacheStatus matches
+ ** Vdbe.cacheCtr. Vdbe.cacheCtr will never take on the value of
+ ** CACHE_STALE (0) and so setting cacheStatus=CACHE_STALE guarantees that
+ ** the cache is out of date. */
+ u32 cacheStatus; /* Cache is valid if this matches Vdbe.cacheCtr */
+ int seekResult; /* Result of previous sqlite3BtreeMoveto() or 0
+ ** if there have been no prior seeks on the cursor. */
+ /* seekResult does not distinguish between "no seeks have ever occurred
+ ** on this cursor" and "the most recent seek was an exact match".
+ ** For CURTYPE_PSEUDO, seekResult is the register holding the record */
+
+ /* When a new VdbeCursor is allocated, only the fields above are zeroed.
+ ** The fields that follow are uninitialized, and must be individually
+ ** initialized prior to first use. */
+ VdbeCursor *pAltCursor; /* Associated index cursor from which to read */
union {
- BtCursor *pCursor; /* CURTYPE_BTREE. Btree cursor */
- sqlite3_vtab_cursor *pVCur; /* CURTYPE_VTAB. Vtab cursor */
- int pseudoTableReg; /* CURTYPE_PSEUDO. Reg holding content. */
- VdbeSorter *pSorter; /* CURTYPE_SORTER. Sorter object */
+ BtCursor *pCursor; /* CURTYPE_BTREE or _PSEUDO. Btree cursor */
+ sqlite3_vtab_cursor *pVCur; /* CURTYPE_VTAB. Vtab cursor */
+ VdbeSorter *pSorter; /* CURTYPE_SORTER. Sorter object */
} uc;
- Btree *pBt; /* Separate file holding temporary table */
- KeyInfo *pKeyInfo; /* Info about index keys needed by index cursors */
- int seekResult; /* Result of previous sqlite3BtreeMoveto() */
- i64 seqCount; /* Sequence counter */
- i64 movetoTarget; /* Argument to the deferred sqlite3BtreeMoveto() */
+ KeyInfo *pKeyInfo; /* Info about index keys needed by index cursors */
+ u32 iHdrOffset; /* Offset to next unparsed byte of the header */
+ Pgno pgnoRoot; /* Root page of the open btree cursor */
+ i16 nField; /* Number of fields in the header */
+ u16 nHdrParsed; /* Number of header fields parsed so far */
+ i64 movetoTarget; /* Argument to the deferred sqlite3BtreeMoveto() */
+ u32 *aOffset; /* Pointer to aType[nField] */
+ const u8 *aRow; /* Data for the current row, if all on one page */
+ u32 payloadSize; /* Total number of bytes in the record */
+ u32 szRow; /* Byte available in aRow */
#ifdef SQLITE_ENABLE_COLUMN_USED_MASK
- u64 maskUsed; /* Mask of columns used by this cursor */
+ u64 maskUsed; /* Mask of columns used by this cursor */
#endif
- /* Cached information about the header for the data record that the
- ** cursor is currently pointing to. Only valid if cacheStatus matches
- ** Vdbe.cacheCtr. Vdbe.cacheCtr will never take on the value of
- ** CACHE_STALE and so setting cacheStatus=CACHE_STALE guarantees that
- ** the cache is out of date.
- **
- ** aRow might point to (ephemeral) data for the current row, or it might
- ** be NULL.
- */
- u32 cacheStatus; /* Cache is valid if this matches Vdbe.cacheCtr */
- u32 payloadSize; /* Total number of bytes in the record */
- u32 szRow; /* Byte available in aRow */
- u32 iHdrOffset; /* Offset to next unparsed byte of the header */
- const u8 *aRow; /* Data for the current row, if all on one page */
- u32 *aOffset; /* Pointer to aType[nField] */
- u32 aType[1]; /* Type values for all entries in the record */
/* 2*nField extra array elements allocated for aType[], beyond the one
** static element declared in the structure. nField total array slots for
** aType[] and nField+1 array slots for aOffset[] */
+ u32 aType[1]; /* Type values record decode. MUST BE LAST */
};
-typedef struct VdbeCursor VdbeCursor;
+
+
+/*
+** A value for VdbeCursor.cacheStatus that means the cache is always invalid.
+*/
+#define CACHE_STALE 0
/*
** When a sub-program is executed (OP_Program), a structure of this type
@@ -15742,15 +18681,15 @@ struct VdbeFrame {
Op *aOp; /* Program instructions for parent frame */
i64 *anExec; /* Event counters from parent frame */
Mem *aMem; /* Array of memory cells for parent frame */
- u8 *aOnceFlag; /* Array of OP_Once flags for parent frame */
VdbeCursor **apCsr; /* Array of Vdbe cursors for parent frame */
+ u8 *aOnce; /* Bitmask used by OP_Once */
void *token; /* Copy of SubProgram.token */
i64 lastRowid; /* Last insert rowid (sqlite3.lastRowid) */
+ AuxData *pAuxData; /* Linked list of auxdata allocations */
int nCursor; /* Number of entries in apCsr */
int pc; /* Program Counter in parent (calling) frame */
int nOp; /* Size of aOp array */
int nMem; /* Number of entries in aMem */
- int nOnceFlag; /* Number of entries in aOnceFlag */
int nChildMem; /* Number of memory cells for child frame */
int nChildCsr; /* Number of cursors for child frame */
int nChange; /* Statement changes (Vdbe.nChange) */
@@ -15759,21 +18698,17 @@ struct VdbeFrame {
#define VdbeFrameMem(p) ((Mem *)&((u8 *)p)[ROUND8(sizeof(VdbeFrame))])
-/*
-** A value for VdbeCursor.cacheValid that means the cache is always invalid.
-*/
-#define CACHE_STALE 0
-
/*
** Internally, the vdbe manipulates nearly all SQL values as Mem
** structures. Each Mem struct may cache multiple representations (string,
** integer etc.) of the same value.
*/
-struct Mem {
+struct sqlite3_value {
union MemValue {
double r; /* Real value used when MEM_Real is set in flags */
i64 i; /* Integer value used when MEM_Int is set in flags */
- int nZero; /* Used when bit MEM_Zero is set in flags */
+ int nZero; /* Extra zero bytes when MEM_Zero and MEM_Blob set */
+ const char *zPType; /* Pointer type when MEM_Term|MEM_Subtype|MEM_Null */
FuncDef *pDef; /* Used only when flags==MEM_Agg */
RowSet *pRowSet; /* Used only when flags==MEM_RowSet */
VdbeFrame *pFrame; /* Used when flags==MEM_Frame */
@@ -15805,7 +18740,8 @@ struct Mem {
** representations of the value stored in the Mem struct.
**
** If the MEM_Null flag is set, then the value is an SQL NULL value.
-** No other flags may be set in this case.
+** For a pointer type created using sqlite3_bind_pointer() or
+** sqlite3_result_pointer() the MEM_Term and MEM_Subtype flags are also set.
**
** If the MEM_Str flag is set then Mem.z points at a string representation.
** Usually this is encoded in the same unicode encoding as the main
@@ -15813,7 +18749,7 @@ struct Mem {
** set, then the string is nul terminated. The MEM_Int and MEM_Real
** flags may coexist with the MEM_Str flag.
*/
-#define MEM_Null 0x0001 /* Value is NULL */
+#define MEM_Null 0x0001 /* Value is NULL (or a pointer) */
#define MEM_Str 0x0002 /* Value is a string */
#define MEM_Int 0x0004 /* Value is an integer */
#define MEM_Real 0x0008 /* Value is a real number */
@@ -15823,7 +18759,7 @@ struct Mem {
#define MEM_Frame 0x0040 /* Value is a VdbeFrame object */
#define MEM_Undefined 0x0080 /* Value is undefined */
#define MEM_Cleared 0x0100 /* NULL set by OP_Null, not from data */
-#define MEM_TypeMask 0x01ff /* Mask of type bits */
+#define MEM_TypeMask 0xc1ff /* Mask of type bits */
/* Whenever Mem contains a valid string or blob representation, one of
@@ -15831,17 +18767,24 @@ struct Mem {
** policy for Mem.z. The MEM_Term flag tells us whether or not the
** string is \000 or \u0000 terminated
*/
-#define MEM_Term 0x0200 /* String rep is nul terminated */
+#define MEM_Term 0x0200 /* String in Mem.z is zero terminated */
#define MEM_Dyn 0x0400 /* Need to call Mem.xDel() on Mem.z */
#define MEM_Static 0x0800 /* Mem.z points to a static string */
#define MEM_Ephem 0x1000 /* Mem.z points to an ephemeral string */
#define MEM_Agg 0x2000 /* Mem.z points to an agg function context */
#define MEM_Zero 0x4000 /* Mem.i contains count of 0s appended to blob */
+#define MEM_Subtype 0x8000 /* Mem.eSubtype is valid */
#ifdef SQLITE_OMIT_INCRBLOB
#undef MEM_Zero
#define MEM_Zero 0x0000
#endif
+/* Return TRUE if Mem X contains dynamically allocated content - anything
+** that needs to be deallocated to avoid a leak.
+*/
+#define VdbeMemDynamic(X) \
+ (((X)->flags&(MEM_Agg|MEM_Dyn|MEM_RowSet|MEM_Frame))!=0)
+
/*
** Clear any existing type flags from a Mem and replace them with f
*/
@@ -15864,11 +18807,11 @@ struct Mem {
** when the VM is halted (if not before).
*/
struct AuxData {
- int iOp; /* Instruction number of OP_Function opcode */
- int iArg; /* Index of function argument. */
+ int iAuxOp; /* Instruction number of OP_Function opcode */
+ int iAuxArg; /* Index of function argument. */
void *pAux; /* Aux data pointer */
- void (*xDelete)(void *); /* Destructor for the aux data */
- AuxData *pNext; /* Next element in list */
+ void (*xDeleteAux)(void*); /* Destructor for the aux data */
+ AuxData *pNextAux; /* Next element in list */
};
/*
@@ -15897,18 +18840,6 @@ struct sqlite3_context {
sqlite3_value *argv[1]; /* Argument set */
};
-/*
-** An Explain object accumulates indented output which is helpful
-** in describing recursive data structures.
-*/
-struct Explain {
- Vdbe *pVdbe; /* Attach the explanation to this Vdbe */
- StrAccum str; /* The string being accumulated */
- int nIndent; /* Number of elements in aIndent */
- u16 aIndent[100]; /* Levels of indentation */
- char zBase[100]; /* Initial space */
-};
-
/* A bitfield type for use inside of structures. Always follow with :N where
** N is the number of bits.
*/
@@ -15933,53 +18864,56 @@ struct ScanStatus {
*/
struct Vdbe {
sqlite3 *db; /* The database connection that owns this statement */
+ Vdbe *pPrev,*pNext; /* Linked list of VDBEs with the same Vdbe.db */
+ Parse *pParse; /* Parsing context used to create this Vdbe */
+ ynVar nVar; /* Number of entries in aVar[] */
+ u32 magic; /* Magic number for sanity checking */
+ int nMem; /* Number of memory locations currently allocated */
+ int nCursor; /* Number of slots in apCsr[] */
+ u32 cacheCtr; /* VdbeCursor row cache generation counter */
+ int pc; /* The program counter */
+ int rc; /* Value to return */
+ int nChange; /* Number of db changes made since last reset */
+ int iStatement; /* Statement number (or 0 if has not opened stmt) */
+ i64 iCurrentTime; /* Value of julianday('now') for this statement */
+ i64 nFkConstraint; /* Number of imm. FK constraints this VM */
+ i64 nStmtDefCons; /* Number of def. constraints when stmt started */
+ i64 nStmtDefImmCons; /* Number of def. imm constraints when stmt started */
+
+ /* When allocating a new Vdbe object, all of the fields below should be
+ ** initialized to zero or NULL */
+
Op *aOp; /* Space to hold the virtual machine's program */
Mem *aMem; /* The memory locations */
Mem **apArg; /* Arguments to currently executing user function */
Mem *aColName; /* Column names to return */
Mem *pResultSet; /* Pointer to an array of results */
- Parse *pParse; /* Parsing context used to create this Vdbe */
- int nMem; /* Number of memory locations currently allocated */
- int nOp; /* Number of instructions in the program */
- int nCursor; /* Number of slots in apCsr[] */
- u32 magic; /* Magic number for sanity checking */
char *zErrMsg; /* Error message written here */
- Vdbe *pPrev,*pNext; /* Linked list of VDBEs with the same Vdbe.db */
VdbeCursor **apCsr; /* One element of this array for each open cursor */
Mem *aVar; /* Values for the OP_Variable opcode. */
- char **azVar; /* Name of variables */
- ynVar nVar; /* Number of entries in aVar[] */
- ynVar nzVar; /* Number of entries in azVar[] */
- u32 cacheCtr; /* VdbeCursor row cache generation counter */
- int pc; /* The program counter */
- int rc; /* Value to return */
+ VList *pVList; /* Name of variables */
+#ifndef SQLITE_OMIT_TRACE
+ i64 startTime; /* Time when query started - used for profiling */
+#endif
+ int nOp; /* Number of instructions in the program */
#ifdef SQLITE_DEBUG
int rcApp; /* errcode set by sqlite3_result_error_code() */
#endif
u16 nResColumn; /* Number of columns in one row of the result set */
u8 errorAction; /* Recovery action to do in case of an error */
u8 minWriteFileFormat; /* Minimum file format for writable database files */
+ u8 prepFlags; /* SQLITE_PREPARE_* flags */
+ bft expired:1; /* True if the VM needs to be recompiled */
+ bft doingRerun:1; /* True if rerunning after an auto-reprepare */
bft explain:2; /* True if EXPLAIN present on SQL command */
bft changeCntOn:1; /* True to update the change-counter */
- bft expired:1; /* True if the VM needs to be recompiled */
bft runOnlyOnce:1; /* Automatically expire on reset */
bft usesStmtJournal:1; /* True if uses a statement journal */
bft readOnly:1; /* True for statements that do not write */
bft bIsReader:1; /* True for statements that read */
- bft isPrepareV2:1; /* True if prepared with prepare_v2() */
- bft doingRerun:1; /* True if rerunning after an auto-reprepare */
- int nChange; /* Number of db changes made since last reset */
yDbMask btreeMask; /* Bitmask of db->aDb[] entries referenced */
yDbMask lockMask; /* Subset of btreeMask that requires a lock */
- int iStatement; /* Statement number (or 0 if has not opened stmt) */
- u32 aCounter[5]; /* Counters used by sqlite3_stmt_status() */
-#ifndef SQLITE_OMIT_TRACE
- i64 startTime; /* Time when query started - used for profiling */
-#endif
- i64 iCurrentTime; /* Value of julianday('now') for this statement */
- i64 nFkConstraint; /* Number of imm. FK constraints this VM */
- i64 nStmtDefCons; /* Number of def. constraints when stmt started */
- i64 nStmtDefImmCons; /* Number of def. imm constraints when stmt started */
+ u32 aCounter[7]; /* Counters used by sqlite3_stmt_status() */
char *zSql; /* Text of the SQL statement that generated this */
void *pFree; /* Free this when deleting the vdbe */
VdbeFrame *pFrame; /* Parent frame */
@@ -15987,8 +18921,6 @@ struct Vdbe {
int nFrame; /* Number of frames in pFrame list */
u32 expmask; /* Binding to these vars invalidates VM */
SubProgram *pProgram; /* Linked list of all sub-programs used by VM */
- int nOnceFlag; /* Size of array aOnceFlag[] */
- u8 *aOnceFlag; /* Flags for OP_Once */
AuxData *pAuxData; /* Linked list of auxdata allocations */
#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
i64 *anExec; /* Number of times each op has been executed */
@@ -16000,10 +18932,31 @@ struct Vdbe {
/*
** The following are allowed values for Vdbe.magic
*/
-#define VDBE_MAGIC_INIT 0x26bceaa5 /* Building a VDBE program */
-#define VDBE_MAGIC_RUN 0xbdf20da3 /* VDBE is ready to execute */
-#define VDBE_MAGIC_HALT 0x519c2973 /* VDBE has completed execution */
-#define VDBE_MAGIC_DEAD 0xb606c3c8 /* The VDBE has been deallocated */
+#define VDBE_MAGIC_INIT 0x16bceaa5 /* Building a VDBE program */
+#define VDBE_MAGIC_RUN 0x2df20da3 /* VDBE is ready to execute */
+#define VDBE_MAGIC_HALT 0x319c2973 /* VDBE has completed execution */
+#define VDBE_MAGIC_RESET 0x48fa9f76 /* Reset and ready to run again */
+#define VDBE_MAGIC_DEAD 0x5606c3c8 /* The VDBE has been deallocated */
+
+/*
+** Structure used to store the context required by the
+** sqlite3_preupdate_*() API functions.
+*/
+struct PreUpdate {
+ Vdbe *v;
+ VdbeCursor *pCsr; /* Cursor to read old values from */
+ int op; /* One of SQLITE_INSERT, UPDATE, DELETE */
+ u8 *aRecord; /* old.* database record */
+ KeyInfo keyinfo;
+ UnpackedRecord *pUnpacked; /* Unpacked version of aRecord[] */
+ UnpackedRecord *pNewUnpacked; /* Unpacked version of new.* record */
+ int iNewReg; /* Register for new.* values */
+ i64 iKey1; /* First key value passed to hook */
+ i64 iKey2; /* Second key value passed to hook */
+ Mem *aNew; /* Array of new.* values */
+ Table *pTab; /* Schema object being upated */
+ Index *pPk; /* PK index if pTab is WITHOUT ROWID */
+};
/*
** Function prototypes
@@ -16011,7 +18964,7 @@ struct Vdbe {
SQLITE_PRIVATE void sqlite3VdbeError(Vdbe*, const char *, ...);
SQLITE_PRIVATE void sqlite3VdbeFreeCursor(Vdbe *, VdbeCursor*);
void sqliteVdbePopStack(Vdbe*,int);
-SQLITE_PRIVATE int sqlite3VdbeCursorMoveto(VdbeCursor*);
+SQLITE_PRIVATE int sqlite3VdbeCursorMoveto(VdbeCursor**, int*);
SQLITE_PRIVATE int sqlite3VdbeCursorRestore(VdbeCursor*);
#if defined(SQLITE_DEBUG) || defined(VDBE_PROFILE)
SQLITE_PRIVATE void sqlite3VdbePrintOp(FILE*, int, Op*);
@@ -16021,7 +18974,7 @@ SQLITE_PRIVATE u8 sqlite3VdbeOneByteSerialTypeLen(u8);
SQLITE_PRIVATE u32 sqlite3VdbeSerialType(Mem*, int, u32*);
SQLITE_PRIVATE u32 sqlite3VdbeSerialPut(unsigned char*, Mem*, u32);
SQLITE_PRIVATE u32 sqlite3VdbeSerialGet(const unsigned char*, u32, Mem*);
-SQLITE_PRIVATE void sqlite3VdbeDeleteAuxData(Vdbe*, int, int);
+SQLITE_PRIVATE void sqlite3VdbeDeleteAuxData(sqlite3*, AuxData**, int, int);
int sqlite2BtreeKeyCompare(BtCursor *, const void *, int, int, int *);
SQLITE_PRIVATE int sqlite3VdbeIdxKeyCompare(sqlite3*,VdbeCursor*,UnpackedRecord*,int*);
@@ -16042,6 +18995,7 @@ SQLITE_PRIVATE void sqlite3VdbeMemSetInt64(Mem*, i64);
#else
SQLITE_PRIVATE void sqlite3VdbeMemSetDouble(Mem*, double);
#endif
+SQLITE_PRIVATE void sqlite3VdbeMemSetPointer(Mem*, void*, const char*, void(*)(void*));
SQLITE_PRIVATE void sqlite3VdbeMemInit(Mem*,sqlite3*,u16);
SQLITE_PRIVATE void sqlite3VdbeMemSetNull(Mem*);
SQLITE_PRIVATE void sqlite3VdbeMemSetZeroBlob(Mem*,int);
@@ -16055,10 +19009,8 @@ SQLITE_PRIVATE void sqlite3VdbeIntegerAffinity(Mem*);
SQLITE_PRIVATE int sqlite3VdbeMemRealify(Mem*);
SQLITE_PRIVATE int sqlite3VdbeMemNumerify(Mem*);
SQLITE_PRIVATE void sqlite3VdbeMemCast(Mem*,u8,u8);
-SQLITE_PRIVATE int sqlite3VdbeMemFromBtree(BtCursor*,u32,u32,int,Mem*);
+SQLITE_PRIVATE int sqlite3VdbeMemFromBtree(BtCursor*,u32,u32,Mem*);
SQLITE_PRIVATE void sqlite3VdbeMemRelease(Mem *p);
-#define VdbeMemDynamic(X) \
- (((X)->flags&(MEM_Agg|MEM_Dyn|MEM_RowSet|MEM_Frame))!=0)
SQLITE_PRIVATE int sqlite3VdbeMemFinalize(Mem*, FuncDef*);
SQLITE_PRIVATE const char *sqlite3OpcodeName(int);
SQLITE_PRIVATE int sqlite3VdbeMemGrow(Mem *pMem, int n, int preserve);
@@ -16066,22 +19018,29 @@ SQLITE_PRIVATE int sqlite3VdbeMemClearAndResize(Mem *pMem, int n);
SQLITE_PRIVATE int sqlite3VdbeCloseStatement(Vdbe *, int);
SQLITE_PRIVATE void sqlite3VdbeFrameDelete(VdbeFrame*);
SQLITE_PRIVATE int sqlite3VdbeFrameRestore(VdbeFrame *);
+#ifdef SQLITE_ENABLE_PREUPDATE_HOOK
+SQLITE_PRIVATE void sqlite3VdbePreUpdateHook(Vdbe*,VdbeCursor*,int,const char*,Table*,i64,int);
+#endif
SQLITE_PRIVATE int sqlite3VdbeTransferError(Vdbe *p);
SQLITE_PRIVATE int sqlite3VdbeSorterInit(sqlite3 *, int, VdbeCursor *);
SQLITE_PRIVATE void sqlite3VdbeSorterReset(sqlite3 *, VdbeSorter *);
SQLITE_PRIVATE void sqlite3VdbeSorterClose(sqlite3 *, VdbeCursor *);
SQLITE_PRIVATE int sqlite3VdbeSorterRowkey(const VdbeCursor *, Mem *);
-SQLITE_PRIVATE int sqlite3VdbeSorterNext(sqlite3 *, const VdbeCursor *, int *);
+SQLITE_PRIVATE int sqlite3VdbeSorterNext(sqlite3 *, const VdbeCursor *);
SQLITE_PRIVATE int sqlite3VdbeSorterRewind(const VdbeCursor *, int *);
SQLITE_PRIVATE int sqlite3VdbeSorterWrite(const VdbeCursor *, Mem *);
SQLITE_PRIVATE int sqlite3VdbeSorterCompare(const VdbeCursor *, Mem *, int, int *);
-#if !defined(SQLITE_OMIT_SHARED_CACHE) && SQLITE_THREADSAFE>0
+#if !defined(SQLITE_OMIT_SHARED_CACHE)
SQLITE_PRIVATE void sqlite3VdbeEnter(Vdbe*);
-SQLITE_PRIVATE void sqlite3VdbeLeave(Vdbe*);
#else
# define sqlite3VdbeEnter(X)
+#endif
+
+#if !defined(SQLITE_OMIT_SHARED_CACHE) && SQLITE_THREADSAFE>0
+SQLITE_PRIVATE void sqlite3VdbeLeave(Vdbe*);
+#else
# define sqlite3VdbeLeave(X)
#endif
@@ -16096,12 +19055,14 @@ SQLITE_PRIVATE int sqlite3VdbeCheckFk(Vdbe *, int);
# define sqlite3VdbeCheckFk(p,i) 0
#endif
-SQLITE_PRIVATE int sqlite3VdbeMemTranslate(Mem*, u8);
#ifdef SQLITE_DEBUG
SQLITE_PRIVATE void sqlite3VdbePrintSql(Vdbe*);
SQLITE_PRIVATE void sqlite3VdbeMemPrettyPrint(Mem *pMem, char *zBuf);
#endif
-SQLITE_PRIVATE int sqlite3VdbeMemHandleBom(Mem *pMem);
+#ifndef SQLITE_OMIT_UTF16
+SQLITE_PRIVATE int sqlite3VdbeMemTranslate(Mem*, u8);
+SQLITE_PRIVATE int sqlite3VdbeMemHandleBom(Mem *pMem);
+#endif
#ifndef SQLITE_OMIT_INCRBLOB
SQLITE_PRIVATE int sqlite3VdbeMemExpandBlob(Mem *);
@@ -16111,7 +19072,7 @@ SQLITE_PRIVATE int sqlite3VdbeMemExpandBlob(Mem *);
#define ExpandBlob(P) SQLITE_OK
#endif
-#endif /* !defined(_VDBEINT_H_) */
+#endif /* !defined(SQLITE_VDBEINT_H) */
/************** End of vdbeInt.h *********************************************/
/************** Continuing where we left off in status.c *********************/
@@ -16222,7 +19183,6 @@ SQLITE_PRIVATE void sqlite3StatusHighwater(int op, int X){
: sqlite3MallocMutex()) );
assert( op==SQLITE_STATUS_MALLOC_SIZE
|| op==SQLITE_STATUS_PAGECACHE_SIZE
- || op==SQLITE_STATUS_SCRATCH_SIZE
|| op==SQLITE_STATUS_PARSER_STACK );
if( newValue>wsdStat.mxValue[op] ){
wsdStat.mxValue[op] = newValue;
@@ -16232,7 +19192,7 @@ SQLITE_PRIVATE void sqlite3StatusHighwater(int op, int X){
/*
** Query status information.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_status64(
+SQLITE_API int sqlite3_status64(
int op,
sqlite3_int64 *pCurrent,
sqlite3_int64 *pHighwater,
@@ -16257,8 +19217,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_status64(
(void)pMutex; /* Prevent warning when SQLITE_THREADSAFE=0 */
return SQLITE_OK;
}
-SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag){
- sqlite3_int64 iCur, iHwtr;
+SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag){
+ sqlite3_int64 iCur = 0, iHwtr = 0;
int rc;
#ifdef SQLITE_ENABLE_API_ARMOR
if( pCurrent==0 || pHighwater==0 ) return SQLITE_MISUSE_BKPT;
@@ -16271,10 +19231,32 @@ SQLITE_API int SQLITE_STDCALL sqlite3_status(int op, int *pCurrent, int *pHighwa
return rc;
}
+/*
+** Return the number of LookasideSlot elements on the linked list
+*/
+static u32 countLookasideSlots(LookasideSlot *p){
+ u32 cnt = 0;
+ while( p ){
+ p = p->pNext;
+ cnt++;
+ }
+ return cnt;
+}
+
+/*
+** Count the number of slots of lookaside memory that are outstanding
+*/
+SQLITE_PRIVATE int sqlite3LookasideUsed(sqlite3 *db, int *pHighwater){
+ u32 nInit = countLookasideSlots(db->lookaside.pInit);
+ u32 nFree = countLookasideSlots(db->lookaside.pFree);
+ if( pHighwater ) *pHighwater = db->lookaside.nSlot - nInit;
+ return db->lookaside.nSlot - (nInit+nFree);
+}
+
/*
** Query status information for a single database connection
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_db_status(
+SQLITE_API int sqlite3_db_status(
sqlite3 *db, /* The database connection whose status is desired */
int op, /* Status verb */
int *pCurrent, /* Write current value here */
@@ -16290,10 +19272,15 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_status(
sqlite3_mutex_enter(db->mutex);
switch( op ){
case SQLITE_DBSTATUS_LOOKASIDE_USED: {
- *pCurrent = db->lookaside.nOut;
- *pHighwater = db->lookaside.mxOut;
+ *pCurrent = sqlite3LookasideUsed(db, pHighwater);
if( resetFlag ){
- db->lookaside.mxOut = db->lookaside.nOut;
+ LookasideSlot *p = db->lookaside.pFree;
+ if( p ){
+ while( p->pNext ) p = p->pNext;
+ p->pNext = db->lookaside.pInit;
+ db->lookaside.pInit = db->lookaside.pFree;
+ db->lookaside.pFree = 0;
+ }
}
break;
}
@@ -16319,6 +19306,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_status(
** by all pagers associated with the given database connection. The
** highwater mark is meaningless and is returned as zero.
*/
+ case SQLITE_DBSTATUS_CACHE_USED_SHARED:
case SQLITE_DBSTATUS_CACHE_USED: {
int totalUsed = 0;
int i;
@@ -16327,7 +19315,11 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_status(
Btree *pBt = db->aDb[i].pBt;
if( pBt ){
Pager *pPager = sqlite3BtreePager(pBt);
- totalUsed += sqlite3PagerMemUsed(pPager);
+ int nByte = sqlite3PagerMemUsed(pPager);
+ if( op==SQLITE_DBSTATUS_CACHE_USED_SHARED ){
+ nByte = nByte / sqlite3BtreeConnectionCount(pBt);
+ }
+ totalUsed += nByte;
}
}
sqlite3BtreeLeaveAll(db);
@@ -16499,54 +19491,80 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_status(
#ifndef SQLITE_OMIT_DATETIME_FUNCS
+/*
+** The MSVC CRT on Windows CE may not have a localtime() function.
+** So declare a substitute. The substitute function itself is
+** defined in "os_win.c".
+*/
+#if !defined(SQLITE_OMIT_LOCALTIME) && defined(_WIN32_WCE) && \
+ (!defined(SQLITE_MSVC_LOCALTIME_API) || !SQLITE_MSVC_LOCALTIME_API)
+struct tm *__cdecl localtime(const time_t *);
+#endif
/*
** A structure for holding a single date and time.
*/
typedef struct DateTime DateTime;
struct DateTime {
- sqlite3_int64 iJD; /* The julian day number times 86400000 */
- int Y, M, D; /* Year, month, and day */
- int h, m; /* Hour and minutes */
- int tz; /* Timezone offset in minutes */
- double s; /* Seconds */
- char validYMD; /* True (1) if Y,M,D are valid */
- char validHMS; /* True (1) if h,m,s are valid */
- char validJD; /* True (1) if iJD is valid */
- char validTZ; /* True (1) if tz is valid */
- char tzSet; /* Timezone was set explicitly */
+ sqlite3_int64 iJD; /* The julian day number times 86400000 */
+ int Y, M, D; /* Year, month, and day */
+ int h, m; /* Hour and minutes */
+ int tz; /* Timezone offset in minutes */
+ double s; /* Seconds */
+ char validJD; /* True (1) if iJD is valid */
+ char rawS; /* Raw numeric value stored in s */
+ char validYMD; /* True (1) if Y,M,D are valid */
+ char validHMS; /* True (1) if h,m,s are valid */
+ char validTZ; /* True (1) if tz is valid */
+ char tzSet; /* Timezone was set explicitly */
+ char isError; /* An overflow has occurred */
};
/*
-** Convert zDate into one or more integers. Additional arguments
-** come in groups of 5 as follows:
+** Convert zDate into one or more integers according to the conversion
+** specifier zFormat.
**
-** N number of digits in the integer
-** min minimum allowed value of the integer
-** max maximum allowed value of the integer
-** nextC first character after the integer
-** pVal where to write the integers value.
+** zFormat[] contains 4 characters for each integer converted, except for
+** the last integer which is specified by three characters. The meaning
+** of a four-character format specifiers ABCD is:
+**
+** A: number of digits to convert. Always "2" or "4".
+** B: minimum value. Always "0" or "1".
+** C: maximum value, decoded as:
+** a: 12
+** b: 14
+** c: 24
+** d: 31
+** e: 59
+** f: 9999
+** D: the separator character, or \000 to indicate this is the
+** last number to convert.
+**
+** Example: To translate an ISO-8601 date YYYY-MM-DD, the format would
+** be "40f-21a-20c". The "40f-" indicates the 4-digit year followed by "-".
+** The "21a-" indicates the 2-digit month followed by "-". The "20c" indicates
+** the 2-digit day which is the last integer in the set.
**
-** Conversions continue until one with nextC==0 is encountered.
** The function returns the number of successful conversions.
*/
-static int getDigits(const char *zDate, ...){
+static int getDigits(const char *zDate, const char *zFormat, ...){
+ /* The aMx[] array translates the 3rd character of each format
+ ** spec into a max size: a b c d e f */
+ static const u16 aMx[] = { 12, 14, 24, 31, 59, 9999 };
va_list ap;
- int val;
- int N;
- int min;
- int max;
- int nextC;
- int *pVal;
int cnt = 0;
- va_start(ap, zDate);
+ char nextC;
+ va_start(ap, zFormat);
do{
- N = va_arg(ap, int);
- min = va_arg(ap, int);
- max = va_arg(ap, int);
- nextC = va_arg(ap, int);
- pVal = va_arg(ap, int*);
+ char N = zFormat[0] - '0';
+ char min = zFormat[1] - '0';
+ int val = 0;
+ u16 max;
+
+ assert( zFormat[2]>='a' && zFormat[2]<='f' );
+ max = aMx[zFormat[2] - 'a'];
+ nextC = zFormat[3];
val = 0;
while( N-- ){
if( !sqlite3Isdigit(*zDate) ){
@@ -16555,12 +19573,13 @@ static int getDigits(const char *zDate, ...){
val = val*10 + *zDate - '0';
zDate++;
}
- if( valmax || (nextC!=0 && nextC!=*zDate) ){
+ if( val<(int)min || val>(int)max || (nextC!=0 && nextC!=*zDate) ){
goto end_getDigits;
}
- *pVal = val;
+ *va_arg(ap,int*) = val;
zDate++;
cnt++;
+ zFormat += 4;
}while( nextC );
end_getDigits:
va_end(ap);
@@ -16601,7 +19620,7 @@ static int parseTimezone(const char *zDate, DateTime *p){
return c!=0;
}
zDate++;
- if( getDigits(zDate, 2, 0, 14, ':', &nHr, 2, 0, 59, 0, &nMn)!=2 ){
+ if( getDigits(zDate, "20b:20e", &nHr, &nMn)!=2 ){
return 1;
}
zDate += 5;
@@ -16622,13 +19641,13 @@ zulu_time:
static int parseHhMmSs(const char *zDate, DateTime *p){
int h, m, s;
double ms = 0.0;
- if( getDigits(zDate, 2, 0, 24, ':', &h, 2, 0, 59, 0, &m)!=2 ){
+ if( getDigits(zDate, "20c:20e", &h, &m)!=2 ){
return 1;
}
zDate += 5;
if( *zDate==':' ){
zDate++;
- if( getDigits(zDate, 2, 0, 59, 0, &s)!=1 ){
+ if( getDigits(zDate, "20e", &s)!=1 ){
return 1;
}
zDate += 2;
@@ -16646,6 +19665,7 @@ static int parseHhMmSs(const char *zDate, DateTime *p){
s = 0;
}
p->validJD = 0;
+ p->rawS = 0;
p->validHMS = 1;
p->h = h;
p->m = m;
@@ -16655,6 +19675,14 @@ static int parseHhMmSs(const char *zDate, DateTime *p){
return 0;
}
+/*
+** Put the DateTime object into its error state.
+*/
+static void datetimeError(DateTime *p){
+ memset(p, 0, sizeof(*p));
+ p->isError = 1;
+}
+
/*
** Convert from YYYY-MM-DD HH:MM:SS to julian day. We always assume
** that the YYYY-MM-DD is according to the Gregorian calendar.
@@ -16674,6 +19702,10 @@ static void computeJD(DateTime *p){
M = 1;
D = 1;
}
+ if( Y<-4713 || Y>9999 || p->rawS ){
+ datetimeError(p);
+ return;
+ }
if( M<=2 ){
Y--;
M += 12;
@@ -16716,7 +19748,7 @@ static int parseYyyyMmDd(const char *zDate, DateTime *p){
}else{
neg = 0;
}
- if( getDigits(zDate,4,0,9999,'-',&Y,2,1,12,'-',&M,2,1,31,0,&D)!=3 ){
+ if( getDigits(zDate, "40f-21a-21d", &Y, &M, &D)!=3 ){
return 1;
}
zDate += 10;
@@ -16754,6 +19786,21 @@ static int setDateTimeToCurrent(sqlite3_context *context, DateTime *p){
}
}
+/*
+** Input "r" is a numeric quantity which might be a julian day number,
+** or the number of seconds since 1970. If the value if r is within
+** range of a julian day number, install it as such and set validJD.
+** If the value is a valid unix timestamp, put it in p->s and set p->rawS.
+*/
+static void setRawDateNumber(DateTime *p, double r){
+ p->s = r;
+ p->rawS = 1;
+ if( r>=0.0 && r<5373484.5 ){
+ p->iJD = (sqlite3_int64)(r*86400000.0 + 0.5);
+ p->validJD = 1;
+ }
+}
+
/*
** Attempt to parse the given string into a julian day number. Return
** the number of errors.
@@ -16780,16 +19827,33 @@ static int parseDateOrTime(
return 0;
}else if( parseHhMmSs(zDate, p)==0 ){
return 0;
- }else if( sqlite3StrICmp(zDate,"now")==0){
+ }else if( sqlite3StrICmp(zDate,"now")==0 && sqlite3NotPureFunc(context) ){
return setDateTimeToCurrent(context, p);
}else if( sqlite3AtoF(zDate, &r, sqlite3Strlen30(zDate), SQLITE_UTF8) ){
- p->iJD = (sqlite3_int64)(r*86400000.0 + 0.5);
- p->validJD = 1;
+ setRawDateNumber(p, r);
return 0;
}
return 1;
}
+/* The julian day number for 9999-12-31 23:59:59.999 is 5373484.4999999.
+** Multiplying this by 86400000 gives 464269060799999 as the maximum value
+** for DateTime.iJD.
+**
+** But some older compilers (ex: gcc 4.2.1 on older Macs) cannot deal with
+** such a large integer literal, so we have to encode it.
+*/
+#define INT_464269060799999 ((((i64)0x1a640)<<32)|0x1072fdff)
+
+/*
+** Return TRUE if the given julian day number is within range.
+**
+** The input is the JulianDay times 86400000.
+*/
+static int validJulianDay(sqlite3_int64 iJD){
+ return iJD>=0 && iJD<=INT_464269060799999;
+}
+
/*
** Compute the Year, Month, and Day from the julian day number.
*/
@@ -16800,6 +19864,9 @@ static void computeYMD(DateTime *p){
p->Y = 2000;
p->M = 1;
p->D = 1;
+ }else if( !validJulianDay(p->iJD) ){
+ datetimeError(p);
+ return;
}else{
Z = (int)((p->iJD + 43200000)/86400000);
A = (int)((Z - 1867216.25)/36524.25);
@@ -16831,6 +19898,7 @@ static void computeHMS(DateTime *p){
s -= p->h*3600;
p->m = s/60;
p->s += s - p->m*60;
+ p->rawS = 0;
p->validHMS = 1;
}
@@ -16851,6 +19919,7 @@ static void clearYMD_HMS_TZ(DateTime *p){
p->validTZ = 0;
}
+#ifndef SQLITE_OMIT_LOCALTIME
/*
** On recent Windows platforms, the localtime_s() function is available
** as part of the "Secure CRT". It is essentially equivalent to
@@ -16869,7 +19938,6 @@ static void clearYMD_HMS_TZ(DateTime *p){
#define HAVE_LOCALTIME_S 1
#endif
-#ifndef SQLITE_OMIT_LOCALTIME
/*
** The following routine implements the rough equivalent of localtime_r()
** using whatever operating-system specific localtime facility that
@@ -16892,14 +19960,14 @@ static int osLocaltime(time_t *t, struct tm *pTm){
#endif
sqlite3_mutex_enter(mutex);
pX = localtime(t);
-#ifndef SQLITE_OMIT_BUILTIN_TEST
+#ifndef SQLITE_UNTESTABLE
if( sqlite3GlobalConfig.bLocaltimeFault ) pX = 0;
#endif
if( pX ) *pTm = *pX;
sqlite3_mutex_leave(mutex);
rc = pX==0;
#else
-#ifndef SQLITE_OMIT_BUILTIN_TEST
+#ifndef SQLITE_UNTESTABLE
if( sqlite3GlobalConfig.bLocaltimeFault ) return 1;
#endif
#if HAVE_LOCALTIME_R
@@ -16970,13 +20038,38 @@ static sqlite3_int64 localtimeOffset(
y.validYMD = 1;
y.validHMS = 1;
y.validJD = 0;
+ y.rawS = 0;
y.validTZ = 0;
+ y.isError = 0;
computeJD(&y);
*pRc = SQLITE_OK;
return y.iJD - x.iJD;
}
#endif /* SQLITE_OMIT_LOCALTIME */
+/*
+** The following table defines various date transformations of the form
+**
+** 'NNN days'
+**
+** Where NNN is an arbitrary floating-point number and "days" can be one
+** of several units of time.
+*/
+static const struct {
+ u8 eType; /* Transformation type code */
+ u8 nName; /* Length of th name */
+ char *zName; /* Name of the transformation */
+ double rLimit; /* Maximum NNN value for this transform */
+ double rXform; /* Constant used for this transform */
+} aXformType[] = {
+ { 0, 6, "second", 464269060800.0, 86400000.0/(24.0*60.0*60.0) },
+ { 0, 6, "minute", 7737817680.0, 86400000.0/(24.0*60.0) },
+ { 0, 4, "hour", 128963628.0, 86400000.0/24.0 },
+ { 0, 3, "day", 5373485.0, 86400000.0 },
+ { 1, 5, "month", 176546.0, 30.0*86400000.0 },
+ { 2, 4, "year", 14713.0, 365.0*86400000.0 },
+};
+
/*
** Process a modifier to a date-time stamp. The modifiers are
** as follows:
@@ -17001,17 +20094,15 @@ static sqlite3_int64 localtimeOffset(
** to context pCtx. If the error is an unrecognized modifier, no error is
** written to pCtx.
*/
-static int parseModifier(sqlite3_context *pCtx, const char *zMod, DateTime *p){
+static int parseModifier(
+ sqlite3_context *pCtx, /* Function context */
+ const char *z, /* The text of the modifier */
+ int n, /* Length of zMod in bytes */
+ DateTime *p /* The date/time value to be modified */
+){
int rc = 1;
- int n;
double r;
- char *z, zBuf[30];
- z = zBuf;
- for(n=0; niJD += localtimeOffset(p, pCtx, &rc);
clearYMD_HMS_TZ(p);
@@ -17031,16 +20122,21 @@ static int parseModifier(sqlite3_context *pCtx, const char *zMod, DateTime *p){
/*
** unixepoch
**
- ** Treat the current value of p->iJD as the number of
+ ** Treat the current value of p->s as the number of
** seconds since 1970. Convert to a real julian day number.
*/
- if( strcmp(z, "unixepoch")==0 && p->validJD ){
- p->iJD = (p->iJD + 43200)/86400 + 21086676*(i64)10000000;
- clearYMD_HMS_TZ(p);
- rc = 0;
+ if( sqlite3_stricmp(z, "unixepoch")==0 && p->rawS ){
+ r = p->s*1000.0 + 210866760000000.0;
+ if( r>=0.0 && r<464269060800000.0 ){
+ clearYMD_HMS_TZ(p);
+ p->iJD = (sqlite3_int64)r;
+ p->validJD = 1;
+ p->rawS = 0;
+ rc = 0;
+ }
}
#ifndef SQLITE_OMIT_LOCALTIME
- else if( strcmp(z, "utc")==0 ){
+ else if( sqlite3_stricmp(z, "utc")==0 && sqlite3NotPureFunc(pCtx) ){
if( p->tzSet==0 ){
sqlite3_int64 c1;
computeJD(p);
@@ -17066,7 +20162,7 @@ static int parseModifier(sqlite3_context *pCtx, const char *zMod, DateTime *p){
** weekday N where 0==Sunday, 1==Monday, and so forth. If the
** date is already on the appropriate weekday, this is a no-op.
*/
- if( strncmp(z, "weekday ", 8)==0
+ if( sqlite3_strnicmp(z, "weekday ", 8)==0
&& sqlite3AtoF(&z[8], &r, sqlite3Strlen30(&z[8]), SQLITE_UTF8)
&& (n=(int)r)==r && n>=0 && r<7 ){
sqlite3_int64 Z;
@@ -17089,23 +20185,24 @@ static int parseModifier(sqlite3_context *pCtx, const char *zMod, DateTime *p){
** Move the date backwards to the beginning of the current day,
** or month or year.
*/
- if( strncmp(z, "start of ", 9)!=0 ) break;
+ if( sqlite3_strnicmp(z, "start of ", 9)!=0 ) break;
+ if( !p->validJD && !p->validYMD && !p->validHMS ) break;
z += 9;
computeYMD(p);
p->validHMS = 1;
p->h = p->m = 0;
p->s = 0.0;
+ p->rawS = 0;
p->validTZ = 0;
p->validJD = 0;
- if( strcmp(z,"month")==0 ){
+ if( sqlite3_stricmp(z,"month")==0 ){
p->D = 1;
rc = 0;
- }else if( strcmp(z,"year")==0 ){
- computeYMD(p);
+ }else if( sqlite3_stricmp(z,"year")==0 ){
p->M = 1;
p->D = 1;
rc = 0;
- }else if( strcmp(z,"day")==0 ){
+ }else if( sqlite3_stricmp(z,"day")==0 ){
rc = 0;
}
break;
@@ -17123,6 +20220,7 @@ static int parseModifier(sqlite3_context *pCtx, const char *zMod, DateTime *p){
case '8':
case '9': {
double rRounder;
+ int i;
for(n=1; z[n] && z[n]!=':' && !sqlite3Isspace(z[n]); n++){}
if( !sqlite3AtoF(z, &r, n, SQLITE_UTF8) ){
rc = 1;
@@ -17151,46 +20249,48 @@ static int parseModifier(sqlite3_context *pCtx, const char *zMod, DateTime *p){
rc = 0;
break;
}
+
+ /* If control reaches this point, it means the transformation is
+ ** one of the forms like "+NNN days". */
z += n;
while( sqlite3Isspace(*z) ) z++;
n = sqlite3Strlen30(z);
if( n>10 || n<3 ) break;
- if( z[n-1]=='s' ){ z[n-1] = 0; n--; }
+ if( sqlite3UpperToLower[(u8)z[n-1]]=='s' ) n--;
computeJD(p);
- rc = 0;
+ rc = 1;
rRounder = r<0 ? -0.5 : +0.5;
- if( n==3 && strcmp(z,"day")==0 ){
- p->iJD += (sqlite3_int64)(r*86400000.0 + rRounder);
- }else if( n==4 && strcmp(z,"hour")==0 ){
- p->iJD += (sqlite3_int64)(r*(86400000.0/24.0) + rRounder);
- }else if( n==6 && strcmp(z,"minute")==0 ){
- p->iJD += (sqlite3_int64)(r*(86400000.0/(24.0*60.0)) + rRounder);
- }else if( n==6 && strcmp(z,"second")==0 ){
- p->iJD += (sqlite3_int64)(r*(86400000.0/(24.0*60.0*60.0)) + rRounder);
- }else if( n==5 && strcmp(z,"month")==0 ){
- int x, y;
- computeYMD_HMS(p);
- p->M += (int)r;
- x = p->M>0 ? (p->M-1)/12 : (p->M-12)/12;
- p->Y += x;
- p->M -= x*12;
- p->validJD = 0;
- computeJD(p);
- y = (int)r;
- if( y!=r ){
- p->iJD += (sqlite3_int64)((r - y)*30.0*86400000.0 + rRounder);
+ for(i=0; i-aXformType[i].rLimit && rM += (int)r;
+ x = p->M>0 ? (p->M-1)/12 : (p->M-12)/12;
+ p->Y += x;
+ p->M -= x*12;
+ p->validJD = 0;
+ r -= (int)r;
+ break;
+ }
+ case 2: { /* Special processing to add years */
+ int y = (int)r;
+ computeYMD_HMS(p);
+ p->Y += y;
+ p->validJD = 0;
+ r -= (int)r;
+ break;
+ }
+ }
+ computeJD(p);
+ p->iJD += (sqlite3_int64)(r*aXformType[i].rXform + rRounder);
+ rc = 0;
+ break;
}
- }else if( n==4 && strcmp(z,"year")==0 ){
- int y = (int)r;
- computeYMD_HMS(p);
- p->Y += y;
- p->validJD = 0;
- computeJD(p);
- if( y!=r ){
- p->iJD += (sqlite3_int64)((r - y)*365.0*86400000.0 + rRounder);
- }
- }else{
- rc = 1;
}
clearYMD_HMS_TZ(p);
break;
@@ -17217,7 +20317,7 @@ static int isDate(
sqlite3_value **argv,
DateTime *p
){
- int i;
+ int i, n;
const unsigned char *z;
int eType;
memset(p, 0, sizeof(*p));
@@ -17226,8 +20326,7 @@ static int isDate(
}
if( (eType = sqlite3_value_type(argv[0]))==SQLITE_FLOAT
|| eType==SQLITE_INTEGER ){
- p->iJD = (sqlite3_int64)(sqlite3_value_double(argv[0])*86400000.0 + 0.5);
- p->validJD = 1;
+ setRawDateNumber(p, sqlite3_value_double(argv[0]));
}else{
z = sqlite3_value_text(argv[0]);
if( !z || parseDateOrTime(context, (char*)z, p) ){
@@ -17236,8 +20335,11 @@ static int isDate(
}
for(i=1; iisError || !validJulianDay(p->iJD) ) return 1;
return 0;
}
@@ -17400,7 +20502,7 @@ static void strftimeFunc(
sqlite3_result_error_toobig(context);
return;
}else{
- z = sqlite3DbMallocRaw(db, (int)n);
+ z = sqlite3DbMallocRawNN(db, (int)n);
if( z==0 ){
sqlite3_result_error_nomem(context);
return;
@@ -17536,7 +20638,6 @@ static void currentTimeFunc(
){
time_t t;
char *zFormat = (char *)sqlite3_user_data(context);
- sqlite3 *db;
sqlite3_int64 iT;
struct tm *pTm;
struct tm sNow;
@@ -17569,13 +20670,13 @@ static void currentTimeFunc(
** external linkage.
*/
SQLITE_PRIVATE void sqlite3RegisterDateTimeFunctions(void){
- static SQLITE_WSD FuncDef aDateTimeFuncs[] = {
+ static FuncDef aDateTimeFuncs[] = {
#ifndef SQLITE_OMIT_DATETIME_FUNCS
- DFUNCTION(julianday, -1, 0, 0, juliandayFunc ),
- DFUNCTION(date, -1, 0, 0, dateFunc ),
- DFUNCTION(time, -1, 0, 0, timeFunc ),
- DFUNCTION(datetime, -1, 0, 0, datetimeFunc ),
- DFUNCTION(strftime, -1, 0, 0, strftimeFunc ),
+ PURE_DATE(julianday, -1, 0, 0, juliandayFunc ),
+ PURE_DATE(date, -1, 0, 0, dateFunc ),
+ PURE_DATE(time, -1, 0, 0, timeFunc ),
+ PURE_DATE(datetime, -1, 0, 0, datetimeFunc ),
+ PURE_DATE(strftime, -1, 0, 0, strftimeFunc ),
DFUNCTION(current_time, 0, 0, 0, ctimeFunc ),
DFUNCTION(current_timestamp, 0, 0, 0, ctimestampFunc),
DFUNCTION(current_date, 0, 0, 0, cdateFunc ),
@@ -17585,13 +20686,7 @@ SQLITE_PRIVATE void sqlite3RegisterDateTimeFunctions(void){
STR_FUNCTION(current_timestamp, 0, "%Y-%m-%d %H:%M:%S", 0, currentTimeFunc),
#endif
};
- int i;
- FuncDefHash *pHash = &GLOBAL(FuncDefHash, sqlite3GlobalFunctions);
- FuncDef *aFunc = (FuncDef*)&GLOBAL(FuncDef, aDateTimeFuncs);
-
- for(i=0; ipMethods ){
- rc = pId->pMethods->xClose(pId);
+ pId->pMethods->xClose(pId);
pId->pMethods = 0;
}
- return rc;
}
SQLITE_PRIVATE int sqlite3OsRead(sqlite3_file *id, void *pBuf, int amt, i64 offset){
DO_OS_MALLOC_TEST(id);
@@ -17678,7 +20791,7 @@ SQLITE_PRIVATE int sqlite3OsTruncate(sqlite3_file *id, i64 size){
}
SQLITE_PRIVATE int sqlite3OsSync(sqlite3_file *id, int flags){
DO_OS_MALLOC_TEST(id);
- return id->pMethods->xSync(id, flags);
+ return flags ? id->pMethods->xSync(id, flags) : SQLITE_OK;
}
SQLITE_PRIVATE int sqlite3OsFileSize(sqlite3_file *id, i64 *pSize){
DO_OS_MALLOC_TEST(id);
@@ -17708,8 +20821,8 @@ SQLITE_PRIVATE int sqlite3OsFileControl(sqlite3_file *id, int op, void *pArg){
#ifdef SQLITE_TEST
if( op!=SQLITE_FCNTL_COMMIT_PHASETWO ){
/* Faults are not injected into COMMIT_PHASETWO because, assuming SQLite
- ** is using a regular VFS, it is called after the corresponding
- ** transaction has been committed. Injecting a fault at this point
+ ** is using a regular VFS, it is called after the corresponding
+ ** transaction has been committed. Injecting a fault at this point
** confuses the test scripts - the COMMIT comand returns SQLITE_NOMEM
** but the transaction is committed anyway.
**
@@ -17733,6 +20846,7 @@ SQLITE_PRIVATE int sqlite3OsSectorSize(sqlite3_file *id){
SQLITE_PRIVATE int sqlite3OsDeviceCharacteristics(sqlite3_file *id){
return id->pMethods->xDeviceCharacteristics(id);
}
+#ifndef SQLITE_OMIT_WAL
SQLITE_PRIVATE int sqlite3OsShmLock(sqlite3_file *id, int offset, int n, int flags){
return id->pMethods->xShmLock(id, offset, n, flags);
}
@@ -17752,6 +20866,7 @@ SQLITE_PRIVATE int sqlite3OsShmMap(
DO_OS_MALLOC_TEST(id);
return id->pMethods->xShmMap(id, iPage, pgsz, bExtend, pp);
}
+#endif /* SQLITE_OMIT_WAL */
#if SQLITE_MAX_MMAP_SIZE>0
/* The real implementation of xFetch and xUnfetch */
@@ -17778,10 +20893,10 @@ SQLITE_PRIVATE int sqlite3OsUnfetch(sqlite3_file *id, i64 iOff, void *p){
** VFS methods.
*/
SQLITE_PRIVATE int sqlite3OsOpen(
- sqlite3_vfs *pVfs,
- const char *zPath,
- sqlite3_file *pFile,
- int flags,
+ sqlite3_vfs *pVfs,
+ const char *zPath,
+ sqlite3_file *pFile,
+ int flags,
int *pFlagsOut
){
int rc;
@@ -17800,18 +20915,18 @@ SQLITE_PRIVATE int sqlite3OsDelete(sqlite3_vfs *pVfs, const char *zPath, int dir
return pVfs->xDelete(pVfs, zPath, dirSync);
}
SQLITE_PRIVATE int sqlite3OsAccess(
- sqlite3_vfs *pVfs,
- const char *zPath,
- int flags,
+ sqlite3_vfs *pVfs,
+ const char *zPath,
+ int flags,
int *pResOut
){
DO_OS_MALLOC_TEST(0);
return pVfs->xAccess(pVfs, zPath, flags, pResOut);
}
SQLITE_PRIVATE int sqlite3OsFullPathname(
- sqlite3_vfs *pVfs,
- const char *zPath,
- int nPathOut,
+ sqlite3_vfs *pVfs,
+ const char *zPath,
+ int nPathOut,
char *zPathOut
){
DO_OS_MALLOC_TEST(0);
@@ -17838,6 +20953,9 @@ SQLITE_PRIVATE int sqlite3OsRandomness(sqlite3_vfs *pVfs, int nByte, char *zBufO
SQLITE_PRIVATE int sqlite3OsSleep(sqlite3_vfs *pVfs, int nMicro){
return pVfs->xSleep(pVfs, nMicro);
}
+SQLITE_PRIVATE int sqlite3OsGetLastError(sqlite3_vfs *pVfs){
+ return pVfs->xGetLastError ? pVfs->xGetLastError(pVfs, 0, 0) : 0;
+}
SQLITE_PRIVATE int sqlite3OsCurrentTimeInt64(sqlite3_vfs *pVfs, sqlite3_int64 *pTimeOut){
int rc;
/* IMPLEMENTATION-OF: R-49045-42493 SQLite will use the xCurrentTimeInt64()
@@ -17857,13 +20975,13 @@ SQLITE_PRIVATE int sqlite3OsCurrentTimeInt64(sqlite3_vfs *pVfs, sqlite3_int64 *p
}
SQLITE_PRIVATE int sqlite3OsOpenMalloc(
- sqlite3_vfs *pVfs,
- const char *zFile,
- sqlite3_file **ppFile,
+ sqlite3_vfs *pVfs,
+ const char *zFile,
+ sqlite3_file **ppFile,
int flags,
int *pOutFlags
){
- int rc = SQLITE_NOMEM;
+ int rc;
sqlite3_file *pFile;
pFile = (sqlite3_file *)sqlite3MallocZero(pVfs->szOsFile);
if( pFile ){
@@ -17873,15 +20991,15 @@ SQLITE_PRIVATE int sqlite3OsOpenMalloc(
}else{
*ppFile = pFile;
}
+ }else{
+ rc = SQLITE_NOMEM_BKPT;
}
return rc;
}
-SQLITE_PRIVATE int sqlite3OsCloseFree(sqlite3_file *pFile){
- int rc = SQLITE_OK;
+SQLITE_PRIVATE void sqlite3OsCloseFree(sqlite3_file *pFile){
assert( pFile );
- rc = sqlite3OsClose(pFile);
+ sqlite3OsClose(pFile);
sqlite3_free(pFile);
- return rc;
}
/*
@@ -17892,7 +21010,7 @@ SQLITE_PRIVATE int sqlite3OsCloseFree(sqlite3_file *pFile){
*/
SQLITE_PRIVATE int sqlite3OsInit(void){
void *p = sqlite3_malloc(10);
- if( p==0 ) return SQLITE_NOMEM;
+ if( p==0 ) return SQLITE_NOMEM_BKPT;
sqlite3_free(p);
return sqlite3_os_init();
}
@@ -17907,7 +21025,7 @@ static sqlite3_vfs * SQLITE_WSD vfsList = 0;
** Locate a VFS by name. If no name is given, simply return the
** first VFS on the list.
*/
-SQLITE_API sqlite3_vfs *SQLITE_STDCALL sqlite3_vfs_find(const char *zVfs){
+SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfs){
sqlite3_vfs *pVfs = 0;
#if SQLITE_THREADSAFE
sqlite3_mutex *mutex;
@@ -17953,7 +21071,7 @@ static void vfsUnlink(sqlite3_vfs *pVfs){
** VFS multiple times. The new VFS becomes the default if makeDflt is
** true.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){
+SQLITE_API int sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){
MUTEX_LOGIC(sqlite3_mutex *mutex;)
#ifndef SQLITE_OMIT_AUTOINIT
int rc = sqlite3_initialize();
@@ -17981,7 +21099,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDf
/*
** Unregister a VFS so that it is no longer accessible.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs *pVfs){
+SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs *pVfs){
#if SQLITE_THREADSAFE
sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
#endif
@@ -18021,7 +21139,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_vfs_unregister(sqlite3_vfs *pVfs){
/* #include "sqliteInt.h" */
-#ifndef SQLITE_OMIT_BUILTIN_TEST
+#ifndef SQLITE_UNTESTABLE
/*
** Global variables.
@@ -18079,7 +21197,7 @@ SQLITE_PRIVATE void sqlite3EndBenignMalloc(void){
}
}
-#endif /* #ifndef SQLITE_OMIT_BUILTIN_TEST */
+#endif /* #ifndef SQLITE_UNTESTABLE */
/************** End of fault.c ***********************************************/
/************** Begin file mem0.c ********************************************/
@@ -18204,7 +21322,9 @@ SQLITE_PRIVATE void sqlite3MemSetDefault(void){
*/
#include
#include
+#ifdef SQLITE_MIGHT_BE_SINGLE_CORE
#include
+#endif /* SQLITE_MIGHT_BE_SINGLE_CORE */
static malloc_zone_t* _sqliteZone_;
#define SQLITE_MALLOC(x) malloc_zone_malloc(_sqliteZone_, (x))
#define SQLITE_FREE(x) malloc_zone_free(_sqliteZone_, (x));
@@ -18272,7 +21392,9 @@ static malloc_zone_t* _sqliteZone_;
*/
static void *sqlite3MemMalloc(int nByte){
#ifdef SQLITE_MALLOCSIZE
- void *p = SQLITE_MALLOC( nByte );
+ void *p;
+ testcase( ROUND8(nByte)==nByte );
+ p = SQLITE_MALLOC( nByte );
if( p==0 ){
testcase( sqlite3GlobalConfig.xLog!=0 );
sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes of memory", nByte);
@@ -18281,7 +21403,7 @@ static void *sqlite3MemMalloc(int nByte){
#else
sqlite3_int64 *p;
assert( nByte>0 );
- nByte = ROUND8(nByte);
+ testcase( ROUND8(nByte)!=nByte );
p = SQLITE_MALLOC( nByte+8 );
if( p ){
p[0] = nByte;
@@ -18395,19 +21517,10 @@ static int sqlite3MemInit(void *NotUsed){
}else{
/* only 1 core, use our own zone to contention over global locks,
** e.g. we have our own dedicated locks */
- bool success;
- malloc_zone_t* newzone = malloc_create_zone(4096, 0);
- malloc_set_zone_name(newzone, "Sqlite_Heap");
- do{
- success = OSAtomicCompareAndSwapPtrBarrier(NULL, newzone,
- (void * volatile *)&_sqliteZone_);
- }while(!_sqliteZone_);
- if( !success ){
- /* somebody registered a zone first */
- malloc_destroy_zone(newzone);
- }
+ _sqliteZone_ = malloc_create_zone(4096, 0);
+ malloc_set_zone_name(_sqliteZone_, "Sqlite_Heap");
}
-#endif
+#endif /* defined(__APPLE__) && !defined(SQLITE_WITHOUT_ZONEMALLOC) */
UNUSED_PARAMETER(NotUsed);
return SQLITE_OK;
}
@@ -19769,6 +22882,7 @@ static SQLITE_WSD struct Mem5Global {
*/
sqlite3_mutex *mutex;
+#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST)
/*
** Performance statistics
*/
@@ -19780,6 +22894,7 @@ static SQLITE_WSD struct Mem5Global {
u32 maxOut; /* Maximum instantaneous currentOut */
u32 maxCount; /* Maximum instantaneous currentCount */
u32 maxRequest; /* Largest allocation (exclusive of internal frag) */
+#endif
/*
** Lists of free blocks. aiFreelist[0] is a list of free blocks of
@@ -19891,14 +23006,17 @@ static void *memsys5MallocUnsafe(int nByte){
/* nByte must be a positive */
assert( nByte>0 );
+ /* No more than 1GiB per allocation */
+ if( nByte > 0x40000000 ) return 0;
+
+#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST)
/* Keep track of the maximum allocation request. Even unfulfilled
** requests are counted */
if( (u32)nByte>mem5.maxRequest ){
- /* Abort if the requested allocation size is larger than the largest
- ** power of two that we can represent using 32-bit signed integers. */
- if( nByte > 0x40000000 ) return 0;
mem5.maxRequest = nByte;
}
+#endif
+
/* Round nByte up to the next valid power of two */
for(iFullSz=mem5.szAtom,iLogsize=0; iFullSz0 );
assert( mem5.currentOut>=(size*mem5.szAtom) );
mem5.currentCount--;
mem5.currentOut -= size*mem5.szAtom;
assert( mem5.currentOut>0 || mem5.currentCount==0 );
assert( mem5.currentCount>0 || mem5.currentOut==0 );
+#endif
mem5.aCtrl[iBlock] = CTRL_FREE | iLogsize;
while( ALWAYS(iLogsize>iLogsize) & 1 ){
iBuddy = iBlock - size;
+ assert( iBuddy>=0 );
}else{
iBuddy = iBlock + size;
+ if( iBuddy>=mem5.nBlock ) break;
}
- assert( iBuddy>=0 );
- if( (iBuddy+(1<mem5.nBlock ) break;
if( mem5.aCtrl[iBuddy]!=(CTRL_FREE | iLogsize) ) break;
memsys5Unlink(iBuddy, iLogsize);
iLogsize++;
@@ -20322,7 +23445,7 @@ SQLITE_PRIVATE int sqlite3MutexEnd(void){
/*
** Retrieve a pointer to a static mutex or allocate a new dynamic one.
*/
-SQLITE_API sqlite3_mutex *SQLITE_STDCALL sqlite3_mutex_alloc(int id){
+SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int id){
#ifndef SQLITE_OMIT_AUTOINIT
if( id<=SQLITE_MUTEX_RECURSIVE && sqlite3_initialize() ) return 0;
if( id>SQLITE_MUTEX_RECURSIVE && sqlite3MutexInit() ) return 0;
@@ -20343,7 +23466,7 @@ SQLITE_PRIVATE sqlite3_mutex *sqlite3MutexAlloc(int id){
/*
** Free a dynamic mutex.
*/
-SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex *p){
+SQLITE_API void sqlite3_mutex_free(sqlite3_mutex *p){
if( p ){
assert( sqlite3GlobalConfig.mutex.xMutexFree );
sqlite3GlobalConfig.mutex.xMutexFree(p);
@@ -20354,7 +23477,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_mutex_free(sqlite3_mutex *p){
** Obtain the mutex p. If some other thread already has the mutex, block
** until it can be obtained.
*/
-SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex *p){
+SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex *p){
if( p ){
assert( sqlite3GlobalConfig.mutex.xMutexEnter );
sqlite3GlobalConfig.mutex.xMutexEnter(p);
@@ -20365,7 +23488,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_mutex_enter(sqlite3_mutex *p){
** Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another
** thread holds the mutex and it cannot be obtained, return SQLITE_BUSY.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex *p){
+SQLITE_API int sqlite3_mutex_try(sqlite3_mutex *p){
int rc = SQLITE_OK;
if( p ){
assert( sqlite3GlobalConfig.mutex.xMutexTry );
@@ -20380,7 +23503,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_mutex_try(sqlite3_mutex *p){
** is not currently entered. If a NULL pointer is passed as an argument
** this function is a no-op.
*/
-SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex *p){
+SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex *p){
if( p ){
assert( sqlite3GlobalConfig.mutex.xMutexLeave );
sqlite3GlobalConfig.mutex.xMutexLeave(p);
@@ -20392,11 +23515,11 @@ SQLITE_API void SQLITE_STDCALL sqlite3_mutex_leave(sqlite3_mutex *p){
** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
** intended for use inside assert() statements.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_mutex_held(sqlite3_mutex *p){
+SQLITE_API int sqlite3_mutex_held(sqlite3_mutex *p){
assert( p==0 || sqlite3GlobalConfig.mutex.xMutexHeld );
return p==0 || sqlite3GlobalConfig.mutex.xMutexHeld(p);
}
-SQLITE_API int SQLITE_STDCALL sqlite3_mutex_notheld(sqlite3_mutex *p){
+SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex *p){
assert( p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld );
return p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld(p);
}
@@ -21072,8 +24195,8 @@ SQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3DefaultMutex(void){
*/
#ifdef SQLITE_PERFORMANCE_TRACE
-/*
-** hwtime.h contains inline assembler code for implementing
+/*
+** hwtime.h contains inline assembler code for implementing
** high-performance timing routines.
*/
/************** Include hwtime.h in the middle of os_common.h ****************/
@@ -21093,8 +24216,8 @@ SQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3DefaultMutex(void){
** This file contains inline asm code for retrieving "high-performance"
** counters for x86 class CPUs.
*/
-#ifndef _HWTIME_H_
-#define _HWTIME_H_
+#ifndef SQLITE_HWTIME_H
+#define SQLITE_HWTIME_H
/*
** The following routine only works on pentium-class (or newer) processors.
@@ -21162,7 +24285,7 @@ SQLITE_PRIVATE sqlite_uint64 sqlite3Hwtime(void){ return ((sqlite_uint64)0); }
#endif
-#endif /* !defined(_HWTIME_H_) */
+#endif /* !defined(SQLITE_HWTIME_H) */
/************** End of hwtime.h **********************************************/
/************** Continuing where we left off in os_common.h ******************/
@@ -21183,14 +24306,14 @@ static sqlite_uint64 g_elapsed;
** of code will give us the ability to simulate a disk I/O error. This
** is used for testing the I/O recovery logic.
*/
-#ifdef SQLITE_TEST
-SQLITE_API int sqlite3_io_error_hit = 0; /* Total number of I/O Errors */
-SQLITE_API int sqlite3_io_error_hardhit = 0; /* Number of non-benign errors */
-SQLITE_API int sqlite3_io_error_pending = 0; /* Count down to first I/O error */
-SQLITE_API int sqlite3_io_error_persist = 0; /* True if I/O errors persist */
-SQLITE_API int sqlite3_io_error_benign = 0; /* True if errors are benign */
-SQLITE_API int sqlite3_diskfull_pending = 0;
-SQLITE_API int sqlite3_diskfull = 0;
+#if defined(SQLITE_TEST)
+SQLITE_API extern int sqlite3_io_error_hit;
+SQLITE_API extern int sqlite3_io_error_hardhit;
+SQLITE_API extern int sqlite3_io_error_pending;
+SQLITE_API extern int sqlite3_io_error_persist;
+SQLITE_API extern int sqlite3_io_error_benign;
+SQLITE_API extern int sqlite3_diskfull_pending;
+SQLITE_API extern int sqlite3_diskfull;
#define SimulateIOErrorBenign(X) sqlite3_io_error_benign=(X)
#define SimulateIOError(CODE) \
if( (sqlite3_io_error_persist && sqlite3_io_error_hit) \
@@ -21216,17 +24339,17 @@ static void local_ioerr(){
#define SimulateIOErrorBenign(X)
#define SimulateIOError(A)
#define SimulateDiskfullError(A)
-#endif
+#endif /* defined(SQLITE_TEST) */
/*
** When testing, keep a count of the number of open files.
*/
-#ifdef SQLITE_TEST
-SQLITE_API int sqlite3_open_file_count = 0;
+#if defined(SQLITE_TEST)
+SQLITE_API extern int sqlite3_open_file_count;
#define OpenCounter(X) sqlite3_open_file_count+=(X)
#else
#define OpenCounter(X)
-#endif
+#endif /* defined(SQLITE_TEST) */
#endif /* !defined(_OS_COMMON_H_) */
@@ -21252,8 +24375,8 @@ SQLITE_API int sqlite3_open_file_count = 0;
**
** This file contains code that is specific to Windows.
*/
-#ifndef _OS_WIN_H_
-#define _OS_WIN_H_
+#ifndef SQLITE_OS_WIN_H
+#define SQLITE_OS_WIN_H
/*
** Include the primary Windows SDK header file.
@@ -21325,7 +24448,7 @@ SQLITE_API int sqlite3_open_file_count = 0;
# define SQLITE_OS_WIN_THREADS 0
#endif
-#endif /* _OS_WIN_H_ */
+#endif /* SQLITE_OS_WIN_H */
/************** End of os_win.h **********************************************/
/************** Continuing where we left off in mutex_w32.c ******************/
@@ -21393,8 +24516,7 @@ SQLITE_PRIVATE void sqlite3MemoryBarrier(void){
SQLITE_MEMORY_BARRIER;
#elif defined(__GNUC__)
__sync_synchronize();
-#elif !defined(SQLITE_DISABLE_INTRINSIC) && \
- defined(_MSC_VER) && _MSC_VER>=1300
+#elif MSVC_VERSION>=1300
_ReadWriteBarrier();
#elif defined(MemoryBarrier)
MemoryBarrier();
@@ -21428,8 +24550,8 @@ static int winMutex_isNt = -1; /* <0 means "need to query" */
*/
static LONG SQLITE_WIN32_VOLATILE winMutex_lock = 0;
-SQLITE_API int SQLITE_STDCALL sqlite3_win32_is_nt(void); /* os_win.c */
-SQLITE_API void SQLITE_STDCALL sqlite3_win32_sleep(DWORD milliseconds); /* os_win.c */
+SQLITE_API int sqlite3_win32_is_nt(void); /* os_win.c */
+SQLITE_API void sqlite3_win32_sleep(DWORD milliseconds); /* os_win.c */
static int winMutexInit(void){
/* The first to increment to 1 does actual initialization */
@@ -21605,8 +24727,8 @@ static void winMutexEnter(sqlite3_mutex *p){
p->owner = tid;
p->nRef++;
if( p->trace ){
- OSTRACE(("ENTER-MUTEX tid=%lu, mutex=%p (%d), nRef=%d\n",
- tid, p, p->trace, p->nRef));
+ OSTRACE(("ENTER-MUTEX tid=%lu, mutex(%d)=%p (%d), nRef=%d\n",
+ tid, p->id, p, p->trace, p->nRef));
}
#endif
}
@@ -21648,8 +24770,8 @@ static int winMutexTry(sqlite3_mutex *p){
#endif
#ifdef SQLITE_DEBUG
if( p->trace ){
- OSTRACE(("TRY-MUTEX tid=%lu, mutex=%p (%d), owner=%lu, nRef=%d, rc=%s\n",
- tid, p, p->trace, p->owner, p->nRef, sqlite3ErrName(rc)));
+ OSTRACE(("TRY-MUTEX tid=%lu, mutex(%d)=%p (%d), owner=%lu, nRef=%d, rc=%s\n",
+ tid, p->id, p, p->trace, p->owner, p->nRef, sqlite3ErrName(rc)));
}
#endif
return rc;
@@ -21677,8 +24799,8 @@ static void winMutexLeave(sqlite3_mutex *p){
LeaveCriticalSection(&p->mutex);
#ifdef SQLITE_DEBUG
if( p->trace ){
- OSTRACE(("LEAVE-MUTEX tid=%lu, mutex=%p (%d), nRef=%d\n",
- tid, p, p->trace, p->nRef));
+ OSTRACE(("LEAVE-MUTEX tid=%lu, mutex(%d)=%p (%d), nRef=%d\n",
+ tid, p->id, p, p->trace, p->nRef));
}
#endif
}
@@ -21729,7 +24851,7 @@ SQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3DefaultMutex(void){
** held by SQLite. An example of non-essential memory is memory used to
** cache database pages that are not currently in use.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int n){
+SQLITE_API int sqlite3_release_memory(int n){
#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
return sqlite3PcacheReleaseMemory(n);
#else
@@ -21741,14 +24863,6 @@ SQLITE_API int SQLITE_STDCALL sqlite3_release_memory(int n){
#endif
}
-/*
-** An instance of the following object records the location of
-** each unused scratch buffer.
-*/
-typedef struct ScratchFreeslot {
- struct ScratchFreeslot *pNext; /* Next unused scratch buffer */
-} ScratchFreeslot;
-
/*
** State information local to the memory allocation subsystem.
*/
@@ -21756,22 +24870,12 @@ static SQLITE_WSD struct Mem0Global {
sqlite3_mutex *mutex; /* Mutex to serialize access */
sqlite3_int64 alarmThreshold; /* The soft heap limit */
- /*
- ** Pointers to the end of sqlite3GlobalConfig.pScratch memory
- ** (so that a range test can be used to determine if an allocation
- ** being freed came from pScratch) and a pointer to the list of
- ** unused scratch allocations.
- */
- void *pScratchEnd;
- ScratchFreeslot *pScratchFree;
- u32 nScratchFree;
-
/*
** True if heap is nearly "full" where "full" is defined by the
** sqlite3_soft_heap_limit() setting.
*/
int nearlyFull;
-} mem0 = { 0, 0, 0, 0, 0, 0 };
+} mem0 = { 0, 0, 0 };
#define mem0 GLOBAL(struct Mem0Global, mem0)
@@ -21788,7 +24892,7 @@ SQLITE_PRIVATE sqlite3_mutex *sqlite3MallocMutex(void){
** that was invoked when memory usage grew too large. Now it is a
** no-op.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_memory_alarm(
+SQLITE_API int sqlite3_memory_alarm(
void(*xCallback)(void *pArg, sqlite3_int64 used,int N),
void *pArg,
sqlite3_int64 iThreshold
@@ -21804,7 +24908,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_memory_alarm(
** Set the soft heap-size limit for the library. Passing a zero or
** negative value indicates no limit.
*/
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64 n){
+SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 n){
sqlite3_int64 priorLimit;
sqlite3_int64 excess;
sqlite3_int64 nUsed;
@@ -21826,7 +24930,7 @@ SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_soft_heap_limit64(sqlite3_int64
if( excess>0 ) sqlite3_release_memory((int)(excess & 0x7fffffff));
return priorLimit;
}
-SQLITE_API void SQLITE_STDCALL sqlite3_soft_heap_limit(int n){
+SQLITE_API void sqlite3_soft_heap_limit(int n){
if( n<0 ) n = 0;
sqlite3_soft_heap_limit64(n);
}
@@ -21841,28 +24945,6 @@ SQLITE_PRIVATE int sqlite3MallocInit(void){
}
memset(&mem0, 0, sizeof(mem0));
mem0.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM);
- if( sqlite3GlobalConfig.pScratch && sqlite3GlobalConfig.szScratch>=100
- && sqlite3GlobalConfig.nScratch>0 ){
- int i, n, sz;
- ScratchFreeslot *pSlot;
- sz = ROUNDDOWN8(sqlite3GlobalConfig.szScratch);
- sqlite3GlobalConfig.szScratch = sz;
- pSlot = (ScratchFreeslot*)sqlite3GlobalConfig.pScratch;
- n = sqlite3GlobalConfig.nScratch;
- mem0.pScratchFree = pSlot;
- mem0.nScratchFree = n;
- for(i=0; ipNext = (ScratchFreeslot*)(sz+(char*)pSlot);
- pSlot = pSlot->pNext;
- }
- pSlot->pNext = 0;
- mem0.pScratchEnd = (void*)&pSlot[1];
- }else{
- mem0.pScratchEnd = 0;
- sqlite3GlobalConfig.pScratch = 0;
- sqlite3GlobalConfig.szScratch = 0;
- sqlite3GlobalConfig.nScratch = 0;
- }
if( sqlite3GlobalConfig.pPage==0 || sqlite3GlobalConfig.szPage<512
|| sqlite3GlobalConfig.nPage<=0 ){
sqlite3GlobalConfig.pPage = 0;
@@ -21895,7 +24977,7 @@ SQLITE_PRIVATE void sqlite3MallocEnd(void){
/*
** Return the amount of memory currently checked out.
*/
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void){
+SQLITE_API sqlite3_int64 sqlite3_memory_used(void){
sqlite3_int64 res, mx;
sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, 0);
return res;
@@ -21906,7 +24988,7 @@ SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_used(void){
** checked out since either the beginning of this process
** or since the most recent reset.
*/
-SQLITE_API sqlite3_int64 SQLITE_STDCALL sqlite3_memory_highwater(int resetFlag){
+SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag){
sqlite3_int64 res, mx;
sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &res, &mx, resetFlag);
return mx;
@@ -21926,11 +25008,26 @@ static void sqlite3MallocAlarm(int nByte){
** Do a memory allocation with statistics and alarms. Assume the
** lock is already held.
*/
-static int mallocWithAlarm(int n, void **pp){
- int nFull;
+static void mallocWithAlarm(int n, void **pp){
void *p;
+ int nFull;
assert( sqlite3_mutex_held(mem0.mutex) );
+ assert( n>0 );
+
+ /* In Firefox (circa 2017-02-08), xRoundup() is remapped to an internal
+ ** implementation of malloc_good_size(), which must be called in debug
+ ** mode and specifically when the DMD "Dark Matter Detector" is enabled
+ ** or else a crash results. Hence, do not attempt to optimize out the
+ ** following xRoundup() call. */
nFull = sqlite3GlobalConfig.m.xRoundup(n);
+
+#ifdef SQLITE_MAX_MEMORY
+ if( sqlite3StatusValue(SQLITE_STATUS_MEMORY_USED)+nFull>SQLITE_MAX_MEMORY ){
+ *pp = 0;
+ return;
+ }
+#endif
+
sqlite3StatusHighwater(SQLITE_STATUS_MALLOC_SIZE, n);
if( mem0.alarmThreshold>0 ){
sqlite3_int64 nUsed = sqlite3StatusValue(SQLITE_STATUS_MEMORY_USED);
@@ -21954,7 +25051,6 @@ static int mallocWithAlarm(int n, void **pp){
sqlite3StatusUp(SQLITE_STATUS_MALLOC_COUNT, 1);
}
*pp = p;
- return nFull;
}
/*
@@ -21986,118 +25082,19 @@ SQLITE_PRIVATE void *sqlite3Malloc(u64 n){
** First make sure the memory subsystem is initialized, then do the
** allocation.
*/
-SQLITE_API void *SQLITE_STDCALL sqlite3_malloc(int n){
+SQLITE_API void *sqlite3_malloc(int n){
#ifndef SQLITE_OMIT_AUTOINIT
if( sqlite3_initialize() ) return 0;
#endif
return n<=0 ? 0 : sqlite3Malloc(n);
}
-SQLITE_API void *SQLITE_STDCALL sqlite3_malloc64(sqlite3_uint64 n){
+SQLITE_API void *sqlite3_malloc64(sqlite3_uint64 n){
#ifndef SQLITE_OMIT_AUTOINIT
if( sqlite3_initialize() ) return 0;
#endif
return sqlite3Malloc(n);
}
-/*
-** Each thread may only have a single outstanding allocation from
-** xScratchMalloc(). We verify this constraint in the single-threaded
-** case by setting scratchAllocOut to 1 when an allocation
-** is outstanding clearing it when the allocation is freed.
-*/
-#if SQLITE_THREADSAFE==0 && !defined(NDEBUG)
-static int scratchAllocOut = 0;
-#endif
-
-
-/*
-** Allocate memory that is to be used and released right away.
-** This routine is similar to alloca() in that it is not intended
-** for situations where the memory might be held long-term. This
-** routine is intended to get memory to old large transient data
-** structures that would not normally fit on the stack of an
-** embedded processor.
-*/
-SQLITE_PRIVATE void *sqlite3ScratchMalloc(int n){
- void *p;
- assert( n>0 );
-
- sqlite3_mutex_enter(mem0.mutex);
- sqlite3StatusHighwater(SQLITE_STATUS_SCRATCH_SIZE, n);
- if( mem0.nScratchFree && sqlite3GlobalConfig.szScratch>=n ){
- p = mem0.pScratchFree;
- mem0.pScratchFree = mem0.pScratchFree->pNext;
- mem0.nScratchFree--;
- sqlite3StatusUp(SQLITE_STATUS_SCRATCH_USED, 1);
- sqlite3_mutex_leave(mem0.mutex);
- }else{
- sqlite3_mutex_leave(mem0.mutex);
- p = sqlite3Malloc(n);
- if( sqlite3GlobalConfig.bMemstat && p ){
- sqlite3_mutex_enter(mem0.mutex);
- sqlite3StatusUp(SQLITE_STATUS_SCRATCH_OVERFLOW, sqlite3MallocSize(p));
- sqlite3_mutex_leave(mem0.mutex);
- }
- sqlite3MemdebugSetType(p, MEMTYPE_SCRATCH);
- }
- assert( sqlite3_mutex_notheld(mem0.mutex) );
-
-
-#if SQLITE_THREADSAFE==0 && !defined(NDEBUG)
- /* EVIDENCE-OF: R-12970-05880 SQLite will not use more than one scratch
- ** buffers per thread.
- **
- ** This can only be checked in single-threaded mode.
- */
- assert( scratchAllocOut==0 );
- if( p ) scratchAllocOut++;
-#endif
-
- return p;
-}
-SQLITE_PRIVATE void sqlite3ScratchFree(void *p){
- if( p ){
-
-#if SQLITE_THREADSAFE==0 && !defined(NDEBUG)
- /* Verify that no more than two scratch allocation per thread
- ** is outstanding at one time. (This is only checked in the
- ** single-threaded case since checking in the multi-threaded case
- ** would be much more complicated.) */
- assert( scratchAllocOut>=1 && scratchAllocOut<=2 );
- scratchAllocOut--;
-#endif
-
- if( SQLITE_WITHIN(p, sqlite3GlobalConfig.pScratch, mem0.pScratchEnd) ){
- /* Release memory from the SQLITE_CONFIG_SCRATCH allocation */
- ScratchFreeslot *pSlot;
- pSlot = (ScratchFreeslot*)p;
- sqlite3_mutex_enter(mem0.mutex);
- pSlot->pNext = mem0.pScratchFree;
- mem0.pScratchFree = pSlot;
- mem0.nScratchFree++;
- assert( mem0.nScratchFree <= (u32)sqlite3GlobalConfig.nScratch );
- sqlite3StatusDown(SQLITE_STATUS_SCRATCH_USED, 1);
- sqlite3_mutex_leave(mem0.mutex);
- }else{
- /* Release memory back to the heap */
- assert( sqlite3MemdebugHasType(p, MEMTYPE_SCRATCH) );
- assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_SCRATCH) );
- sqlite3MemdebugSetType(p, MEMTYPE_HEAP);
- if( sqlite3GlobalConfig.bMemstat ){
- int iSize = sqlite3MallocSize(p);
- sqlite3_mutex_enter(mem0.mutex);
- sqlite3StatusDown(SQLITE_STATUS_SCRATCH_OVERFLOW, iSize);
- sqlite3StatusDown(SQLITE_STATUS_MEMORY_USED, iSize);
- sqlite3StatusDown(SQLITE_STATUS_MALLOC_COUNT, 1);
- sqlite3GlobalConfig.m.xFree(p);
- sqlite3_mutex_leave(mem0.mutex);
- }else{
- sqlite3GlobalConfig.m.xFree(p);
- }
- }
- }
-}
-
/*
** TRUE if p is a lookaside memory allocation from db
*/
@@ -22120,7 +25117,7 @@ SQLITE_PRIVATE int sqlite3MallocSize(void *p){
SQLITE_PRIVATE int sqlite3DbMallocSize(sqlite3 *db, void *p){
assert( p!=0 );
if( db==0 || !isLookaside(db,p) ){
-#if SQLITE_DEBUG
+#ifdef SQLITE_DEBUG
if( db==0 ){
assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) );
assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) );
@@ -22135,7 +25132,7 @@ SQLITE_PRIVATE int sqlite3DbMallocSize(sqlite3 *db, void *p){
return db->lookaside.sz;
}
}
-SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void *p){
+SQLITE_API sqlite3_uint64 sqlite3_msize(void *p){
assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) );
assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) );
return p ? sqlite3GlobalConfig.m.xSize(p) : 0;
@@ -22144,7 +25141,7 @@ SQLITE_API sqlite3_uint64 SQLITE_STDCALL sqlite3_msize(void *p){
/*
** Free memory previously obtained from sqlite3Malloc().
*/
-SQLITE_API void SQLITE_STDCALL sqlite3_free(void *p){
+SQLITE_API void sqlite3_free(void *p){
if( p==0 ) return; /* IMP: R-49053-54554 */
assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) );
assert( sqlite3MemdebugNoType(p, (u8)~MEMTYPE_HEAP) );
@@ -22169,11 +25166,12 @@ static SQLITE_NOINLINE void measureAllocationSize(sqlite3 *db, void *p){
/*
** Free memory that might be associated with a particular database
-** connection.
+** connection. Calling sqlite3DbFree(D,X) for X==0 is a harmless no-op.
+** The sqlite3DbFreeNN(D,X) version requires that X be non-NULL.
*/
-SQLITE_PRIVATE void sqlite3DbFree(sqlite3 *db, void *p){
+SQLITE_PRIVATE void sqlite3DbFreeNN(sqlite3 *db, void *p){
assert( db==0 || sqlite3_mutex_held(db->mutex) );
- if( p==0 ) return;
+ assert( p!=0 );
if( db ){
if( db->pnBytesFreed ){
measureAllocationSize(db, p);
@@ -22181,13 +25179,12 @@ SQLITE_PRIVATE void sqlite3DbFree(sqlite3 *db, void *p){
}
if( isLookaside(db, p) ){
LookasideSlot *pBuf = (LookasideSlot*)p;
-#if SQLITE_DEBUG
+#ifdef SQLITE_DEBUG
/* Trash all content in the buffer being freed */
memset(p, 0xaa, db->lookaside.sz);
#endif
pBuf->pNext = db->lookaside.pFree;
db->lookaside.pFree = pBuf;
- db->lookaside.nOut--;
return;
}
}
@@ -22197,6 +25194,10 @@ SQLITE_PRIVATE void sqlite3DbFree(sqlite3 *db, void *p){
sqlite3MemdebugSetType(p, MEMTYPE_HEAP);
sqlite3_free(p);
}
+SQLITE_PRIVATE void sqlite3DbFree(sqlite3 *db, void *p){
+ assert( db==0 || sqlite3_mutex_held(db->mutex) );
+ if( p ) sqlite3DbFreeNN(db, p);
+}
/*
** Change the size of an existing memory allocation
@@ -22228,7 +25229,7 @@ SQLITE_PRIVATE void *sqlite3Realloc(void *pOld, u64 nBytes){
sqlite3_mutex_enter(mem0.mutex);
sqlite3StatusHighwater(SQLITE_STATUS_MALLOC_SIZE, (int)nBytes);
nDiff = nNew - nOld;
- if( sqlite3StatusValue(SQLITE_STATUS_MEMORY_USED) >=
+ if( nDiff>0 && sqlite3StatusValue(SQLITE_STATUS_MEMORY_USED) >=
mem0.alarmThreshold-nDiff ){
sqlite3MallocAlarm(nDiff);
}
@@ -22253,14 +25254,14 @@ SQLITE_PRIVATE void *sqlite3Realloc(void *pOld, u64 nBytes){
** The public interface to sqlite3Realloc. Make sure that the memory
** subsystem is initialized prior to invoking sqliteRealloc.
*/
-SQLITE_API void *SQLITE_STDCALL sqlite3_realloc(void *pOld, int n){
+SQLITE_API void *sqlite3_realloc(void *pOld, int n){
#ifndef SQLITE_OMIT_AUTOINIT
if( sqlite3_initialize() ) return 0;
#endif
if( n<0 ) n = 0; /* IMP: R-26507-47431 */
return sqlite3Realloc(pOld, n);
}
-SQLITE_API void *SQLITE_STDCALL sqlite3_realloc64(void *pOld, sqlite3_uint64 n){
+SQLITE_API void *sqlite3_realloc64(void *pOld, sqlite3_uint64 n){
#ifndef SQLITE_OMIT_AUTOINIT
if( sqlite3_initialize() ) return 0;
#endif
@@ -22284,16 +25285,31 @@ SQLITE_PRIVATE void *sqlite3MallocZero(u64 n){
** the mallocFailed flag in the connection pointer.
*/
SQLITE_PRIVATE void *sqlite3DbMallocZero(sqlite3 *db, u64 n){
- void *p = sqlite3DbMallocRaw(db, n);
- if( p ){
- memset(p, 0, (size_t)n);
- }
+ void *p;
+ testcase( db==0 );
+ p = sqlite3DbMallocRaw(db, n);
+ if( p ) memset(p, 0, (size_t)n);
+ return p;
+}
+
+
+/* Finish the work of sqlite3DbMallocRawNN for the unusual and
+** slower case when the allocation cannot be fulfilled using lookaside.
+*/
+static SQLITE_NOINLINE void *dbMallocRawFinish(sqlite3 *db, u64 n){
+ void *p;
+ assert( db!=0 );
+ p = sqlite3Malloc(n);
+ if( !p ) sqlite3OomFault(db);
+ sqlite3MemdebugSetType(p,
+ (db->lookaside.bDisable==0) ? MEMTYPE_LOOKASIDE : MEMTYPE_HEAP);
return p;
}
/*
-** Allocate and zero memory. If the allocation fails, make
-** the mallocFailed flag in the connection pointer.
+** Allocate memory, either lookaside (if possible) or heap.
+** If the allocation fails, set the mallocFailed flag in
+** the connection pointer.
**
** If db!=0 and db->mallocFailed is true (indicating a prior malloc
** failure on the same database connection) then always return 0.
@@ -22308,64 +25324,73 @@ SQLITE_PRIVATE void *sqlite3DbMallocZero(sqlite3 *db, u64 n){
**
** In other words, if a subsequent malloc (ex: "b") worked, it is assumed
** that all prior mallocs (ex: "a") worked too.
+**
+** The sqlite3MallocRawNN() variant guarantees that the "db" parameter is
+** not a NULL pointer.
*/
SQLITE_PRIVATE void *sqlite3DbMallocRaw(sqlite3 *db, u64 n){
void *p;
- assert( db==0 || sqlite3_mutex_held(db->mutex) );
- assert( db==0 || db->pnBytesFreed==0 );
+ if( db ) return sqlite3DbMallocRawNN(db, n);
+ p = sqlite3Malloc(n);
+ sqlite3MemdebugSetType(p, MEMTYPE_HEAP);
+ return p;
+}
+SQLITE_PRIVATE void *sqlite3DbMallocRawNN(sqlite3 *db, u64 n){
#ifndef SQLITE_OMIT_LOOKASIDE
- if( db ){
- LookasideSlot *pBuf;
- if( db->mallocFailed ){
- return 0;
- }
- if( db->lookaside.bEnabled ){
- if( n>db->lookaside.sz ){
- db->lookaside.anStat[1]++;
- }else if( (pBuf = db->lookaside.pFree)==0 ){
- db->lookaside.anStat[2]++;
- }else{
- db->lookaside.pFree = pBuf->pNext;
- db->lookaside.nOut++;
- db->lookaside.anStat[0]++;
- if( db->lookaside.nOut>db->lookaside.mxOut ){
- db->lookaside.mxOut = db->lookaside.nOut;
- }
- return (void*)pBuf;
- }
+ LookasideSlot *pBuf;
+ assert( db!=0 );
+ assert( sqlite3_mutex_held(db->mutex) );
+ assert( db->pnBytesFreed==0 );
+ if( db->lookaside.bDisable==0 ){
+ assert( db->mallocFailed==0 );
+ if( n>db->lookaside.sz ){
+ db->lookaside.anStat[1]++;
+ }else if( (pBuf = db->lookaside.pFree)!=0 ){
+ db->lookaside.pFree = pBuf->pNext;
+ db->lookaside.anStat[0]++;
+ return (void*)pBuf;
+ }else if( (pBuf = db->lookaside.pInit)!=0 ){
+ db->lookaside.pInit = pBuf->pNext;
+ db->lookaside.anStat[0]++;
+ return (void*)pBuf;
+ }else{
+ db->lookaside.anStat[2]++;
}
+ }else if( db->mallocFailed ){
+ return 0;
}
#else
- if( db && db->mallocFailed ){
+ assert( db!=0 );
+ assert( sqlite3_mutex_held(db->mutex) );
+ assert( db->pnBytesFreed==0 );
+ if( db->mallocFailed ){
return 0;
}
#endif
- p = sqlite3Malloc(n);
- if( !p && db ){
- db->mallocFailed = 1;
- }
- sqlite3MemdebugSetType(p,
- (db && db->lookaside.bEnabled) ? MEMTYPE_LOOKASIDE : MEMTYPE_HEAP);
- return p;
+ return dbMallocRawFinish(db, n);
}
+/* Forward declaration */
+static SQLITE_NOINLINE void *dbReallocFinish(sqlite3 *db, void *p, u64 n);
+
/*
** Resize the block of memory pointed to by p to n bytes. If the
** resize fails, set the mallocFailed flag in the connection object.
*/
SQLITE_PRIVATE void *sqlite3DbRealloc(sqlite3 *db, void *p, u64 n){
+ assert( db!=0 );
+ if( p==0 ) return sqlite3DbMallocRawNN(db, n);
+ assert( sqlite3_mutex_held(db->mutex) );
+ if( isLookaside(db,p) && n<=db->lookaside.sz ) return p;
+ return dbReallocFinish(db, p, n);
+}
+static SQLITE_NOINLINE void *dbReallocFinish(sqlite3 *db, void *p, u64 n){
void *pNew = 0;
assert( db!=0 );
- assert( sqlite3_mutex_held(db->mutex) );
+ assert( p!=0 );
if( db->mallocFailed==0 ){
- if( p==0 ){
- return sqlite3DbMallocRaw(db, n);
- }
if( isLookaside(db, p) ){
- if( n<=db->lookaside.sz ){
- return p;
- }
- pNew = sqlite3DbMallocRaw(db, n);
+ pNew = sqlite3DbMallocRawNN(db, n);
if( pNew ){
memcpy(pNew, p, db->lookaside.sz);
sqlite3DbFree(db, p);
@@ -22376,10 +25401,10 @@ SQLITE_PRIVATE void *sqlite3DbRealloc(sqlite3 *db, void *p, u64 n){
sqlite3MemdebugSetType(p, MEMTYPE_HEAP);
pNew = sqlite3_realloc64(p, n);
if( !pNew ){
- db->mallocFailed = 1;
+ sqlite3OomFault(db);
}
sqlite3MemdebugSetType(pNew,
- (db->lookaside.bEnabled ? MEMTYPE_LOOKASIDE : MEMTYPE_HEAP));
+ (db->lookaside.bDisable==0 ? MEMTYPE_LOOKASIDE : MEMTYPE_HEAP));
}
}
return pNew;
@@ -22411,9 +25436,8 @@ SQLITE_PRIVATE char *sqlite3DbStrDup(sqlite3 *db, const char *z){
if( z==0 ){
return 0;
}
- n = sqlite3Strlen30(z) + 1;
- assert( (n&0x7fffffff)==n );
- zNew = sqlite3DbMallocRaw(db, (int)n);
+ n = strlen(z) + 1;
+ zNew = sqlite3DbMallocRaw(db, n);
if( zNew ){
memcpy(zNew, z, n);
}
@@ -22421,11 +25445,12 @@ SQLITE_PRIVATE char *sqlite3DbStrDup(sqlite3 *db, const char *z){
}
SQLITE_PRIVATE char *sqlite3DbStrNDup(sqlite3 *db, const char *z, u64 n){
char *zNew;
+ assert( db!=0 );
if( z==0 ){
return 0;
}
assert( (n&0x7fffffff)==n );
- zNew = sqlite3DbMallocRaw(db, n+1);
+ zNew = sqlite3DbMallocRawNN(db, n+1);
if( zNew ){
memcpy(zNew, z, (size_t)n);
zNew[n] = 0;
@@ -22441,13 +25466,45 @@ SQLITE_PRIVATE void sqlite3SetString(char **pz, sqlite3 *db, const char *zNew){
*pz = sqlite3DbStrDup(db, zNew);
}
+/*
+** Call this routine to record the fact that an OOM (out-of-memory) error
+** has happened. This routine will set db->mallocFailed, and also
+** temporarily disable the lookaside memory allocator and interrupt
+** any running VDBEs.
+*/
+SQLITE_PRIVATE void sqlite3OomFault(sqlite3 *db){
+ if( db->mallocFailed==0 && db->bBenignMalloc==0 ){
+ db->mallocFailed = 1;
+ if( db->nVdbeExec>0 ){
+ db->u1.isInterrupted = 1;
+ }
+ db->lookaside.bDisable++;
+ }
+}
+
+/*
+** This routine reactivates the memory allocator and clears the
+** db->mallocFailed flag as necessary.
+**
+** The memory allocator is not restarted if there are running
+** VDBEs.
+*/
+SQLITE_PRIVATE void sqlite3OomClear(sqlite3 *db){
+ if( db->mallocFailed && db->nVdbeExec==0 ){
+ db->mallocFailed = 0;
+ db->u1.isInterrupted = 0;
+ assert( db->lookaside.bDisable>0 );
+ db->lookaside.bDisable--;
+ }
+}
+
/*
** Take actions at the end of an API call to indicate an OOM error
*/
static SQLITE_NOINLINE int apiOomError(sqlite3 *db){
- db->mallocFailed = 0;
+ sqlite3OomClear(db);
sqlite3Error(db, SQLITE_NOMEM);
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
/*
@@ -22494,26 +25551,27 @@ SQLITE_PRIVATE int sqlite3ApiExit(sqlite3* db, int rc){
** Conversion types fall into various categories as defined by the
** following enumeration.
*/
-#define etRADIX 1 /* Integer types. %d, %x, %o, and so forth */
-#define etFLOAT 2 /* Floating point. %f */
-#define etEXP 3 /* Exponentional notation. %e and %E */
-#define etGENERIC 4 /* Floating or exponential, depending on exponent. %g */
-#define etSIZE 5 /* Return number of characters processed so far. %n */
-#define etSTRING 6 /* Strings. %s */
-#define etDYNSTRING 7 /* Dynamically allocated strings. %z */
-#define etPERCENT 8 /* Percent symbol. %% */
-#define etCHARX 9 /* Characters. %c */
+#define etRADIX 0 /* non-decimal integer types. %x %o */
+#define etFLOAT 1 /* Floating point. %f */
+#define etEXP 2 /* Exponentional notation. %e and %E */
+#define etGENERIC 3 /* Floating or exponential, depending on exponent. %g */
+#define etSIZE 4 /* Return number of characters processed so far. %n */
+#define etSTRING 5 /* Strings. %s */
+#define etDYNSTRING 6 /* Dynamically allocated strings. %z */
+#define etPERCENT 7 /* Percent symbol. %% */
+#define etCHARX 8 /* Characters. %c */
/* The rest are extensions, not normally found in printf() */
-#define etSQLESCAPE 10 /* Strings with '\'' doubled. %q */
-#define etSQLESCAPE2 11 /* Strings with '\'' doubled and enclosed in '',
+#define etSQLESCAPE 9 /* Strings with '\'' doubled. %q */
+#define etSQLESCAPE2 10 /* Strings with '\'' doubled and enclosed in '',
NULL pointers replaced by SQL NULL. %Q */
-#define etTOKEN 12 /* a pointer to a Token structure */
-#define etSRCLIST 13 /* a pointer to a SrcList */
-#define etPOINTER 14 /* The %p conversion */
-#define etSQLESCAPE3 15 /* %w -> Strings with '\"' doubled */
-#define etORDINAL 16 /* %r -> 1st, 2nd, 3rd, 4th, etc. English only */
+#define etTOKEN 11 /* a pointer to a Token structure */
+#define etSRCLIST 12 /* a pointer to a SrcList */
+#define etPOINTER 13 /* The %p conversion */
+#define etSQLESCAPE3 14 /* %w -> Strings with '\"' doubled */
+#define etORDINAL 15 /* %r -> 1st, 2nd, 3rd, 4th, etc. English only */
+#define etDECIMAL 16 /* %d or %u, but not %x, %o */
-#define etINVALID 0 /* Any unrecognized conversion type */
+#define etINVALID 17 /* Any unrecognized conversion type */
/*
@@ -22537,9 +25595,8 @@ typedef struct et_info { /* Information about each format field */
/*
** Allowed values for et_info.flags
*/
-#define FLAG_SIGNED 1 /* True if the value to convert is signed */
-#define FLAG_INTERN 2 /* True if for internal use only */
-#define FLAG_STRING 4 /* Allow infinity precision */
+#define FLAG_SIGNED 1 /* True if the value to convert is signed */
+#define FLAG_STRING 4 /* Allow infinite precision */
/*
@@ -22549,7 +25606,7 @@ typedef struct et_info { /* Information about each format field */
static const char aDigits[] = "0123456789ABCDEF0123456789abcdef";
static const char aPrefix[] = "-x0\000X0";
static const et_info fmtinfo[] = {
- { 'd', 10, 1, etRADIX, 0, 0 },
+ { 'd', 10, 1, etDECIMAL, 0, 0 },
{ 's', 0, 4, etSTRING, 0, 0 },
{ 'g', 0, 1, etGENERIC, 30, 0 },
{ 'z', 0, 4, etDYNSTRING, 0, 0 },
@@ -22558,7 +25615,7 @@ static const et_info fmtinfo[] = {
{ 'w', 0, 4, etSQLESCAPE3, 0, 0 },
{ 'c', 0, 0, etCHARX, 0, 0 },
{ 'o', 8, 0, etRADIX, 0, 2 },
- { 'u', 10, 0, etRADIX, 0, 0 },
+ { 'u', 10, 0, etDECIMAL, 0, 0 },
{ 'x', 16, 0, etRADIX, 16, 1 },
{ 'X', 16, 0, etRADIX, 0, 4 },
#ifndef SQLITE_OMIT_FLOATING_POINT
@@ -22567,16 +25624,15 @@ static const et_info fmtinfo[] = {
{ 'E', 0, 1, etEXP, 14, 0 },
{ 'G', 0, 1, etGENERIC, 14, 0 },
#endif
- { 'i', 10, 1, etRADIX, 0, 0 },
+ { 'i', 10, 1, etDECIMAL, 0, 0 },
{ 'n', 0, 0, etSIZE, 0, 0 },
{ '%', 0, 0, etPERCENT, 0, 0 },
{ 'p', 16, 0, etPOINTER, 0, 1 },
-/* All the rest have the FLAG_INTERN bit set and are thus for internal
-** use only */
- { 'T', 0, 2, etTOKEN, 0, 0 },
- { 'S', 0, 2, etSRCLIST, 0, 0 },
- { 'r', 10, 3, etORDINAL, 0, 0 },
+ /* All the rest are undocumented and are for internal use only */
+ { 'T', 0, 0, etTOKEN, 0, 0 },
+ { 'S', 0, 0, etSRCLIST, 0, 0 },
+ { 'r', 10, 1, etORDINAL, 0, 0 },
};
/*
@@ -22650,7 +25706,6 @@ static char *getTextArg(PrintfArguments *p){
*/
SQLITE_PRIVATE void sqlite3VXPrintf(
StrAccum *pAccum, /* Accumulate results here */
- u32 bFlags, /* SQLITE_PRINTF_* flags */
const char *fmt, /* Format string */
va_list ap /* arguments */
){
@@ -22661,17 +25716,15 @@ SQLITE_PRIVATE void sqlite3VXPrintf(
int idx; /* A general purpose loop counter */
int width; /* Width of the current field */
etByte flag_leftjustify; /* True if "-" flag is present */
- etByte flag_plussign; /* True if "+" flag is present */
- etByte flag_blanksign; /* True if " " flag is present */
+ etByte flag_prefix; /* '+' or ' ' or 0 for prefix */
etByte flag_alternateform; /* True if "#" flag is present */
etByte flag_altform2; /* True if "!" flag is present */
etByte flag_zeropad; /* True if field width constant starts with zero */
- etByte flag_long; /* True if "l" flag is present */
- etByte flag_longlong; /* True if the "ll" flag is present */
+ etByte flag_long; /* 1 for the "l" flag, 2 for "ll", 0 by default */
etByte done; /* Loop termination flag */
- etByte xtype = 0; /* Conversion paradigm */
+ etByte cThousand; /* Thousands separator for %d and %u */
+ etByte xtype = etINVALID; /* Conversion paradigm */
u8 bArgList; /* True for SQLITE_PRINTF_SQLFUNC */
- u8 useIntern; /* Ok to use internal conversions (ex: %T) */
char prefix; /* Prefix character. "+" or "-" or " " or '\0'. */
sqlite_uint64 longvalue; /* Value for integer types */
LONGDOUBLE_TYPE realvalue; /* Value for real types */
@@ -22690,13 +25743,11 @@ SQLITE_PRIVATE void sqlite3VXPrintf(
char buf[etBUFSIZE]; /* Conversion buffer */
bufpt = 0;
- if( bFlags ){
- if( (bArgList = (bFlags & SQLITE_PRINTF_SQLFUNC))!=0 ){
- pArgList = va_arg(ap, PrintfArguments*);
- }
- useIntern = bFlags & SQLITE_PRINTF_INTERNAL;
+ if( (pAccum->printfFlags & SQLITE_PRINTF_SQLFUNC)!=0 ){
+ pArgList = va_arg(ap, PrintfArguments*);
+ bArgList = 1;
}else{
- bArgList = useIntern = 0;
+ bArgList = 0;
}
for(; (c=(*fmt))!=0; ++fmt){
if( c!='%' ){
@@ -22714,17 +25765,18 @@ SQLITE_PRIVATE void sqlite3VXPrintf(
break;
}
/* Find out what flags are present */
- flag_leftjustify = flag_plussign = flag_blanksign =
+ flag_leftjustify = flag_prefix = cThousand =
flag_alternateform = flag_altform2 = flag_zeropad = 0;
done = 0;
do{
switch( c ){
case '-': flag_leftjustify = 1; break;
- case '+': flag_plussign = 1; break;
- case ' ': flag_blanksign = 1; break;
+ case '+': flag_prefix = '+'; break;
+ case ' ': flag_prefix = ' '; break;
case '#': flag_alternateform = 1; break;
case '!': flag_altform2 = 1; break;
case '0': flag_zeropad = 1; break;
+ case ',': cThousand = ','; break;
default: done = 1; break;
}
}while( !done && (c=(*++fmt))!=0 );
@@ -22794,13 +25846,11 @@ SQLITE_PRIVATE void sqlite3VXPrintf(
flag_long = 1;
c = *++fmt;
if( c=='l' ){
- flag_longlong = 1;
+ flag_long = 2;
c = *++fmt;
- }else{
- flag_longlong = 0;
}
}else{
- flag_long = flag_longlong = 0;
+ flag_long = 0;
}
/* Fetch the info entry for the field */
infop = &fmtinfo[0];
@@ -22808,11 +25858,7 @@ SQLITE_PRIVATE void sqlite3VXPrintf(
for(idx=0; idxflags & FLAG_INTERN)==0 ){
- xtype = infop->type;
- }else{
- return;
- }
+ xtype = infop->type;
break;
}
}
@@ -22822,15 +25868,11 @@ SQLITE_PRIVATE void sqlite3VXPrintf(
**
** flag_alternateform TRUE if a '#' is present.
** flag_altform2 TRUE if a '!' is present.
- ** flag_plussign TRUE if a '+' is present.
+ ** flag_prefix '+' or ' ' or zero
** flag_leftjustify TRUE if a '-' is present or if the
** field width was negative.
** flag_zeropad TRUE if the width began with 0.
- ** flag_long TRUE if the letter 'l' (ell) prefixed
- ** the conversion character.
- ** flag_longlong TRUE if the letter 'll' (ell ell) prefixed
- ** the conversion character.
- ** flag_blanksign TRUE if a ' ' is present.
+ ** flag_long 1 for "l", 2 for "ll"
** width The specified field width. This is
** always non-negative. Zero is the default.
** precision The specified precision. The default
@@ -22840,19 +25882,24 @@ SQLITE_PRIVATE void sqlite3VXPrintf(
*/
switch( xtype ){
case etPOINTER:
- flag_longlong = sizeof(char*)==sizeof(i64);
- flag_long = sizeof(char*)==sizeof(long int);
+ flag_long = sizeof(char*)==sizeof(i64) ? 2 :
+ sizeof(char*)==sizeof(long int) ? 1 : 0;
/* Fall through into the next case */
case etORDINAL:
- case etRADIX:
+ case etRADIX:
+ cThousand = 0;
+ /* Fall through into the next case */
+ case etDECIMAL:
if( infop->flags & FLAG_SIGNED ){
i64 v;
if( bArgList ){
v = getIntArg(pArgList);
- }else if( flag_longlong ){
- v = va_arg(ap,i64);
}else if( flag_long ){
- v = va_arg(ap,long int);
+ if( flag_long==2 ){
+ v = va_arg(ap,i64) ;
+ }else{
+ v = va_arg(ap,long int);
+ }
}else{
v = va_arg(ap,int);
}
@@ -22865,17 +25912,17 @@ SQLITE_PRIVATE void sqlite3VXPrintf(
prefix = '-';
}else{
longvalue = v;
- if( flag_plussign ) prefix = '+';
- else if( flag_blanksign ) prefix = ' ';
- else prefix = 0;
+ prefix = flag_prefix;
}
}else{
if( bArgList ){
longvalue = (u64)getIntArg(pArgList);
- }else if( flag_longlong ){
- longvalue = va_arg(ap,u64);
}else if( flag_long ){
- longvalue = va_arg(ap,unsigned long int);
+ if( flag_long==2 ){
+ longvalue = va_arg(ap,u64);
+ }else{
+ longvalue = va_arg(ap,unsigned long int);
+ }
}else{
longvalue = va_arg(ap,unsigned int);
}
@@ -22885,16 +25932,17 @@ SQLITE_PRIVATE void sqlite3VXPrintf(
if( flag_zeropad && precision0 );
}
length = (int)(&zOut[nOut-1]-bufpt);
- for(idx=precision-length; idx>0; idx--){
+ while( precision>length ){
*(--bufpt) = '0'; /* Zero pad */
+ length++;
+ }
+ if( cThousand ){
+ int nn = (length - 1)/3; /* Number of "," to insert */
+ int ix = (length - 1)%3 + 1;
+ bufpt -= nn;
+ for(idx=0; nn>0; idx++){
+ bufpt[idx] = bufpt[idx+nn];
+ ix--;
+ if( ix==0 ){
+ bufpt[++idx] = cThousand;
+ nn--;
+ ix = 3;
+ }
+ }
}
if( prefix ) *(--bufpt) = prefix; /* Add sign */
if( flag_alternateform && infop->prefix ){ /* Add "0" or "0x" */
@@ -22943,9 +26006,7 @@ SQLITE_PRIVATE void sqlite3VXPrintf(
realvalue = -realvalue;
prefix = '-';
}else{
- if( flag_plussign ) prefix = '+';
- else if( flag_blanksign ) prefix = ' ';
- else prefix = 0;
+ prefix = flag_prefix;
}
if( xtype==etGENERIC && precision>0 ) precision--;
testcase( precision>0xfff );
@@ -23131,7 +26192,7 @@ SQLITE_PRIVATE void sqlite3VXPrintf(
if( precision>=0 ){
for(length=0; lengthprintfFlags & SQLITE_PRINTF_INTERNAL)==0 ) return;
+ pToken = va_arg(ap, Token*);
assert( bArgList==0 );
if( pToken && pToken->n ){
sqlite3StrAccumAppend(pAccum, (const char*)pToken->z, pToken->n);
@@ -23190,9 +26253,13 @@ SQLITE_PRIVATE void sqlite3VXPrintf(
break;
}
case etSRCLIST: {
- SrcList *pSrc = va_arg(ap, SrcList*);
- int k = va_arg(ap, int);
- struct SrcList_item *pItem = &pSrc->a[k];
+ SrcList *pSrc;
+ int k;
+ struct SrcList_item *pItem;
+ if( (pAccum->printfFlags & SQLITE_PRINTF_INTERNAL)==0 ) return;
+ pSrc = va_arg(ap, SrcList*);
+ k = va_arg(ap, int);
+ pItem = &pSrc->a[k];
assert( bArgList==0 );
assert( k>=0 && knSrc );
if( pItem->zDatabase ){
@@ -23214,9 +26281,13 @@ SQLITE_PRIVATE void sqlite3VXPrintf(
** the output.
*/
width -= length;
- if( width>0 && !flag_leftjustify ) sqlite3AppendChar(pAccum, width, ' ');
- sqlite3StrAccumAppend(pAccum, bufpt, length);
- if( width>0 && flag_leftjustify ) sqlite3AppendChar(pAccum, width, ' ');
+ if( width>0 ){
+ if( !flag_leftjustify ) sqlite3AppendChar(pAccum, width, ' ');
+ sqlite3StrAccumAppend(pAccum, bufpt, length);
+ if( flag_leftjustify ) sqlite3AppendChar(pAccum, width, ' ');
+ }else{
+ sqlite3StrAccumAppend(pAccum, bufpt, length);
+ }
if( zExtra ){
sqlite3DbFree(pAccum->db, zExtra);
@@ -23245,9 +26316,8 @@ static int sqlite3StrAccumEnlarge(StrAccum *p, int N){
setStrAccumError(p, STRACCUM_TOOBIG);
return N;
}else{
- char *zOld = p->bMalloced ? p->zText : 0;
+ char *zOld = isMalloced(p) ? p->zText : 0;
i64 szNew = p->nChar;
- assert( (p->zText==0 || p->zText==p->zBase)==(p->bMalloced==0) );
szNew += N + 1;
if( szNew+p->nChar<=p->mxAlloc ){
/* Force exponential buffer size growth as long as it does not overflow,
@@ -23268,10 +26338,10 @@ static int sqlite3StrAccumEnlarge(StrAccum *p, int N){
}
if( zNew ){
assert( p->zText!=0 || p->nChar==0 );
- if( !p->bMalloced && p->nChar>0 ) memcpy(zNew, p->zText, p->nChar);
+ if( !isMalloced(p) && p->nChar>0 ) memcpy(zNew, p->zText, p->nChar);
p->zText = zNew;
p->nAlloc = sqlite3DbMallocSize(p->db, zNew);
- p->bMalloced = 1;
+ p->printfFlags |= SQLITE_PRINTF_MALLOCED;
}else{
sqlite3StrAccumReset(p);
setStrAccumError(p, STRACCUM_NOMEM);
@@ -23289,7 +26359,6 @@ SQLITE_PRIVATE void sqlite3AppendChar(StrAccum *p, int N, char c){
if( p->nChar+(i64)N >= p->nAlloc && (N = sqlite3StrAccumEnlarge(p, N))<=0 ){
return;
}
- assert( (p->zText==p->zBase)==(p->bMalloced==0) );
while( (N--)>0 ) p->zText[p->nChar++] = c;
}
@@ -23307,7 +26376,6 @@ static void SQLITE_NOINLINE enlargeAndAppend(StrAccum *p, const char *z, int N){
memcpy(&p->zText[p->nChar], z, N);
p->nChar += N;
}
- assert( (p->zText==0 || p->zText==p->zBase)==(p->bMalloced==0) );
}
/*
@@ -23321,7 +26389,7 @@ SQLITE_PRIVATE void sqlite3StrAccumAppend(StrAccum *p, const char *z, int N){
assert( p->accError==0 || p->nAlloc==0 );
if( p->nChar+N >= p->nAlloc ){
enlargeAndAppend(p,z,N);
- }else{
+ }else if( N ){
assert( p->zText );
p->nChar += N;
memcpy(&p->zText[p->nChar-N], z, N);
@@ -23341,18 +26409,24 @@ SQLITE_PRIVATE void sqlite3StrAccumAppendAll(StrAccum *p, const char *z){
** Return a pointer to the resulting string. Return a NULL
** pointer if any kind of error was encountered.
*/
+static SQLITE_NOINLINE char *strAccumFinishRealloc(StrAccum *p){
+ char *zText;
+ assert( p->mxAlloc>0 && !isMalloced(p) );
+ zText = sqlite3DbMallocRaw(p->db, p->nChar+1 );
+ if( zText ){
+ memcpy(zText, p->zText, p->nChar+1);
+ p->printfFlags |= SQLITE_PRINTF_MALLOCED;
+ }else{
+ setStrAccumError(p, STRACCUM_NOMEM);
+ }
+ p->zText = zText;
+ return zText;
+}
SQLITE_PRIVATE char *sqlite3StrAccumFinish(StrAccum *p){
if( p->zText ){
- assert( (p->zText==p->zBase)==(p->bMalloced==0) );
p->zText[p->nChar] = 0;
- if( p->mxAlloc>0 && p->bMalloced==0 ){
- p->zText = sqlite3DbMallocRaw(p->db, p->nChar+1 );
- if( p->zText ){
- memcpy(p->zText, p->zBase, p->nChar+1);
- p->bMalloced = 1;
- }else{
- setStrAccumError(p, STRACCUM_NOMEM);
- }
+ if( p->mxAlloc>0 && !isMalloced(p) ){
+ return strAccumFinishRealloc(p);
}
}
return p->zText;
@@ -23362,10 +26436,9 @@ SQLITE_PRIVATE char *sqlite3StrAccumFinish(StrAccum *p){
** Reset an StrAccum string. Reclaim all malloced memory.
*/
SQLITE_PRIVATE void sqlite3StrAccumReset(StrAccum *p){
- assert( (p->zText==0 || p->zText==p->zBase)==(p->bMalloced==0) );
- if( p->bMalloced ){
+ if( isMalloced(p) ){
sqlite3DbFree(p->db, p->zText);
- p->bMalloced = 0;
+ p->printfFlags &= ~SQLITE_PRINTF_MALLOCED;
}
p->zText = 0;
}
@@ -23385,13 +26458,13 @@ SQLITE_PRIVATE void sqlite3StrAccumReset(StrAccum *p){
** allocations will ever occur.
*/
SQLITE_PRIVATE void sqlite3StrAccumInit(StrAccum *p, sqlite3 *db, char *zBase, int n, int mx){
- p->zText = p->zBase = zBase;
+ p->zText = zBase;
p->db = db;
- p->nChar = 0;
p->nAlloc = n;
p->mxAlloc = mx;
+ p->nChar = 0;
p->accError = 0;
- p->bMalloced = 0;
+ p->printfFlags = 0;
}
/*
@@ -23405,10 +26478,11 @@ SQLITE_PRIVATE char *sqlite3VMPrintf(sqlite3 *db, const char *zFormat, va_list a
assert( db!=0 );
sqlite3StrAccumInit(&acc, db, zBase, sizeof(zBase),
db->aLimit[SQLITE_LIMIT_LENGTH]);
- sqlite3VXPrintf(&acc, SQLITE_PRINTF_INTERNAL, zFormat, ap);
+ acc.printfFlags = SQLITE_PRINTF_INTERNAL;
+ sqlite3VXPrintf(&acc, zFormat, ap);
z = sqlite3StrAccumFinish(&acc);
if( acc.accError==STRACCUM_NOMEM ){
- db->mallocFailed = 1;
+ sqlite3OomFault(db);
}
return z;
}
@@ -23430,7 +26504,7 @@ SQLITE_PRIVATE char *sqlite3MPrintf(sqlite3 *db, const char *zFormat, ...){
** Print into memory obtained from sqlite3_malloc(). Omit the internal
** %-conversion extensions.
*/
-SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char *zFormat, va_list ap){
+SQLITE_API char *sqlite3_vmprintf(const char *zFormat, va_list ap){
char *z;
char zBase[SQLITE_PRINT_BUF_SIZE];
StrAccum acc;
@@ -23445,7 +26519,7 @@ SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char *zFormat, va_list ap
if( sqlite3_initialize() ) return 0;
#endif
sqlite3StrAccumInit(&acc, 0, zBase, sizeof(zBase), SQLITE_MAX_LENGTH);
- sqlite3VXPrintf(&acc, 0, zFormat, ap);
+ sqlite3VXPrintf(&acc, zFormat, ap);
z = sqlite3StrAccumFinish(&acc);
return z;
}
@@ -23454,7 +26528,7 @@ SQLITE_API char *SQLITE_STDCALL sqlite3_vmprintf(const char *zFormat, va_list ap
** Print into memory obtained from sqlite3_malloc()(). Omit the internal
** %-conversion extensions.
*/
-SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char *zFormat, ...){
+SQLITE_API char *sqlite3_mprintf(const char *zFormat, ...){
va_list ap;
char *z;
#ifndef SQLITE_OMIT_AUTOINIT
@@ -23479,7 +26553,7 @@ SQLITE_API char *SQLITE_CDECL sqlite3_mprintf(const char *zFormat, ...){
**
** sqlite3_vsnprintf() is the varargs version.
*/
-SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){
+SQLITE_API char *sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){
StrAccum acc;
if( n<=0 ) return zBuf;
#ifdef SQLITE_ENABLE_API_ARMOR
@@ -23490,10 +26564,11 @@ SQLITE_API char *SQLITE_STDCALL sqlite3_vsnprintf(int n, char *zBuf, const char
}
#endif
sqlite3StrAccumInit(&acc, 0, zBuf, n, 0);
- sqlite3VXPrintf(&acc, 0, zFormat, ap);
- return sqlite3StrAccumFinish(&acc);
+ sqlite3VXPrintf(&acc, zFormat, ap);
+ zBuf[acc.nChar] = 0;
+ return zBuf;
}
-SQLITE_API char *SQLITE_CDECL sqlite3_snprintf(int n, char *zBuf, const char *zFormat, ...){
+SQLITE_API char *sqlite3_snprintf(int n, char *zBuf, const char *zFormat, ...){
char *z;
va_list ap;
va_start(ap,zFormat);
@@ -23521,7 +26596,7 @@ static void renderLogMsg(int iErrCode, const char *zFormat, va_list ap){
char zMsg[SQLITE_PRINT_BUF_SIZE*3]; /* Complete log message */
sqlite3StrAccumInit(&acc, 0, zMsg, sizeof(zMsg), 0);
- sqlite3VXPrintf(&acc, 0, zFormat, ap);
+ sqlite3VXPrintf(&acc, zFormat, ap);
sqlite3GlobalConfig.xLog(sqlite3GlobalConfig.pLogArg, iErrCode,
sqlite3StrAccumFinish(&acc));
}
@@ -23529,7 +26604,7 @@ static void renderLogMsg(int iErrCode, const char *zFormat, va_list ap){
/*
** Format and write a message to the log if logging is enabled.
*/
-SQLITE_API void SQLITE_CDECL sqlite3_log(int iErrCode, const char *zFormat, ...){
+SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...){
va_list ap; /* Vararg list */
if( sqlite3GlobalConfig.xLog ){
va_start(ap, zFormat);
@@ -23550,7 +26625,7 @@ SQLITE_PRIVATE void sqlite3DebugPrintf(const char *zFormat, ...){
char zBuf[500];
sqlite3StrAccumInit(&acc, 0, zBuf, sizeof(zBuf), 0);
va_start(ap,zFormat);
- sqlite3VXPrintf(&acc, 0, zFormat, ap);
+ sqlite3VXPrintf(&acc, zFormat, ap);
va_end(ap);
sqlite3StrAccumFinish(&acc);
fprintf(stdout,"%s", zBuf);
@@ -23563,10 +26638,10 @@ SQLITE_PRIVATE void sqlite3DebugPrintf(const char *zFormat, ...){
** variable-argument wrapper around sqlite3VXPrintf(). The bFlags argument
** can contain the bit SQLITE_PRINTF_INTERNAL enable internal formats.
*/
-SQLITE_PRIVATE void sqlite3XPrintf(StrAccum *p, u32 bFlags, const char *zFormat, ...){
+SQLITE_PRIVATE void sqlite3XPrintf(StrAccum *p, const char *zFormat, ...){
va_list ap;
va_start(ap,zFormat);
- sqlite3VXPrintf(p, bFlags, zFormat, ap);
+ sqlite3VXPrintf(p, zFormat, ap);
va_end(ap);
}
@@ -23637,8 +26712,9 @@ static void sqlite3TreeViewLine(TreeView *p, const char *zFormat, ...){
sqlite3StrAccumAppend(&acc, p->bLine[i] ? "|-- " : "'-- ", 4);
}
va_start(ap, zFormat);
- sqlite3VXPrintf(&acc, 0, zFormat, ap);
+ sqlite3VXPrintf(&acc, zFormat, ap);
va_end(ap);
+ assert( acc.nChar>0 );
if( zBuf[acc.nChar-1]!='\n' ) sqlite3StrAccumAppend(&acc, "\n", 1);
sqlite3StrAccumFinish(&acc);
fprintf(stdout,"%s", zBuf);
@@ -23672,17 +26748,17 @@ SQLITE_PRIVATE void sqlite3TreeViewWith(TreeView *pView, const With *pWith, u8 m
char zLine[1000];
const struct Cte *pCte = &pWith->a[i];
sqlite3StrAccumInit(&x, 0, zLine, sizeof(zLine), 0);
- sqlite3XPrintf(&x, 0, "%s", pCte->zName);
+ sqlite3XPrintf(&x, "%s", pCte->zName);
if( pCte->pCols && pCte->pCols->nExpr>0 ){
char cSep = '(';
int j;
for(j=0; jpCols->nExpr; j++){
- sqlite3XPrintf(&x, 0, "%c%s", cSep, pCte->pCols->a[j].zName);
+ sqlite3XPrintf(&x, "%c%s", cSep, pCte->pCols->a[j].zName);
cSep = ',';
}
- sqlite3XPrintf(&x, 0, ")");
+ sqlite3XPrintf(&x, ")");
}
- sqlite3XPrintf(&x, 0, " AS");
+ sqlite3XPrintf(&x, " AS");
sqlite3StrAccumFinish(&x);
sqlite3TreeViewItem(pView, zLine, inCte-1);
sqlite3TreeViewSelect(pView, pCte->pSelect, 0);
@@ -23694,11 +26770,15 @@ SQLITE_PRIVATE void sqlite3TreeViewWith(TreeView *pView, const With *pWith, u8 m
/*
-** Generate a human-readable description of a the Select object.
+** Generate a human-readable description of a Select object.
*/
SQLITE_PRIVATE void sqlite3TreeViewSelect(TreeView *pView, const Select *p, u8 moreToFollow){
int n = 0;
int cnt = 0;
+ if( p==0 ){
+ sqlite3TreeViewLine(pView, "nil-SELECT");
+ return;
+ }
pView = sqlite3TreeViewPush(pView, moreToFollow);
if( p->pWith ){
sqlite3TreeViewWith(pView, p->pWith, 1);
@@ -23706,9 +26786,10 @@ SQLITE_PRIVATE void sqlite3TreeViewSelect(TreeView *pView, const Select *p, u8 m
sqlite3TreeViewPush(pView, 1);
}
do{
- sqlite3TreeViewLine(pView, "SELECT%s%s (0x%p) selFlags=0x%x",
+ sqlite3TreeViewLine(pView, "SELECT%s%s (0x%p) selFlags=0x%x nSelectRow=%d",
((p->selFlags & SF_Distinct) ? " DISTINCT" : ""),
- ((p->selFlags & SF_Aggregate) ? " agg_flag" : ""), p, p->selFlags
+ ((p->selFlags & SF_Aggregate) ? " agg_flag" : ""), p, p->selFlags,
+ (int)p->nSelectRow
);
if( cnt++ ) sqlite3TreeViewPop(pView);
if( p->pPrior ){
@@ -23733,20 +26814,20 @@ SQLITE_PRIVATE void sqlite3TreeViewSelect(TreeView *pView, const Select *p, u8 m
StrAccum x;
char zLine[100];
sqlite3StrAccumInit(&x, 0, zLine, sizeof(zLine), 0);
- sqlite3XPrintf(&x, 0, "{%d,*}", pItem->iCursor);
+ sqlite3XPrintf(&x, "{%d,*}", pItem->iCursor);
if( pItem->zDatabase ){
- sqlite3XPrintf(&x, 0, " %s.%s", pItem->zDatabase, pItem->zName);
+ sqlite3XPrintf(&x, " %s.%s", pItem->zDatabase, pItem->zName);
}else if( pItem->zName ){
- sqlite3XPrintf(&x, 0, " %s", pItem->zName);
+ sqlite3XPrintf(&x, " %s", pItem->zName);
}
if( pItem->pTab ){
- sqlite3XPrintf(&x, 0, " tabname=%Q", pItem->pTab->zName);
+ sqlite3XPrintf(&x, " tabname=%Q", pItem->pTab->zName);
}
if( pItem->zAlias ){
- sqlite3XPrintf(&x, 0, " (AS %s)", pItem->zAlias);
+ sqlite3XPrintf(&x, " (AS %s)", pItem->zAlias);
}
if( pItem->fg.jointype & JT_LEFT ){
- sqlite3XPrintf(&x, 0, " LEFT-JOIN");
+ sqlite3XPrintf(&x, " LEFT-JOIN");
}
sqlite3StrAccumFinish(&x);
sqlite3TreeViewItem(pView, zLine, ipSrc->nSrc-1);
@@ -23806,7 +26887,7 @@ SQLITE_PRIVATE void sqlite3TreeViewSelect(TreeView *pView, const Select *p, u8 m
SQLITE_PRIVATE void sqlite3TreeViewExpr(TreeView *pView, const Expr *pExpr, u8 moreToFollow){
const char *zBinOp = 0; /* Binary operator */
const char *zUniOp = 0; /* Unary operator */
- char zFlgs[30];
+ char zFlgs[60];
pView = sqlite3TreeViewPush(pView, moreToFollow);
if( pExpr==0 ){
sqlite3TreeViewLine(pView, "nil");
@@ -23814,7 +26895,12 @@ SQLITE_PRIVATE void sqlite3TreeViewExpr(TreeView *pView, const Expr *pExpr, u8 m
return;
}
if( pExpr->flags ){
- sqlite3_snprintf(sizeof(zFlgs),zFlgs," flags=0x%x",pExpr->flags);
+ if( ExprHasProperty(pExpr, EP_FromJoin) ){
+ sqlite3_snprintf(sizeof(zFlgs),zFlgs," flags=0x%x iRJT=%d",
+ pExpr->flags, pExpr->iRightJoinTable);
+ }else{
+ sqlite3_snprintf(sizeof(zFlgs),zFlgs," flags=0x%x",pExpr->flags);
+ }
}else{
zFlgs[0] = 0;
}
@@ -23912,6 +26998,12 @@ SQLITE_PRIVATE void sqlite3TreeViewExpr(TreeView *pView, const Expr *pExpr, u8 m
case TK_ISNULL: zUniOp = "ISNULL"; break;
case TK_NOTNULL: zUniOp = "NOTNULL"; break;
+ case TK_SPAN: {
+ sqlite3TreeViewLine(pView, "SPAN %Q", pExpr->u.zToken);
+ sqlite3TreeViewExpr(pView, pExpr->pLeft, 0);
+ break;
+ }
+
case TK_COLLATE: {
sqlite3TreeViewLine(pView, "COLLATE %Q", pExpr->u.zToken);
sqlite3TreeViewExpr(pView, pExpr->pLeft, 0);
@@ -23939,17 +27031,17 @@ SQLITE_PRIVATE void sqlite3TreeViewExpr(TreeView *pView, const Expr *pExpr, u8 m
}
#ifndef SQLITE_OMIT_SUBQUERY
case TK_EXISTS: {
- sqlite3TreeViewLine(pView, "EXISTS-expr");
+ sqlite3TreeViewLine(pView, "EXISTS-expr flags=0x%x", pExpr->flags);
sqlite3TreeViewSelect(pView, pExpr->x.pSelect, 0);
break;
}
case TK_SELECT: {
- sqlite3TreeViewLine(pView, "SELECT-expr");
+ sqlite3TreeViewLine(pView, "SELECT-expr flags=0x%x", pExpr->flags);
sqlite3TreeViewSelect(pView, pExpr->x.pSelect, 0);
break;
}
case TK_IN: {
- sqlite3TreeViewLine(pView, "IN");
+ sqlite3TreeViewLine(pView, "IN flags=0x%x", pExpr->flags);
sqlite3TreeViewExpr(pView, pExpr->pLeft, 1);
if( ExprHasProperty(pExpr, EP_xIsSelect) ){
sqlite3TreeViewSelect(pView, pExpr->x.pSelect, 0);
@@ -24012,6 +27104,26 @@ SQLITE_PRIVATE void sqlite3TreeViewExpr(TreeView *pView, const Expr *pExpr, u8 m
break;
}
#endif
+ case TK_MATCH: {
+ sqlite3TreeViewLine(pView, "MATCH {%d:%d}%s",
+ pExpr->iTable, pExpr->iColumn, zFlgs);
+ sqlite3TreeViewExpr(pView, pExpr->pRight, 0);
+ break;
+ }
+ case TK_VECTOR: {
+ sqlite3TreeViewBareExprList(pView, pExpr->x.pList, "VECTOR");
+ break;
+ }
+ case TK_SELECT_COLUMN: {
+ sqlite3TreeViewLine(pView, "SELECT-COLUMN %d", pExpr->iColumn);
+ sqlite3TreeViewSelect(pView, pExpr->pLeft->x.pSelect, 0);
+ break;
+ }
+ case TK_IF_NULL_ROW: {
+ sqlite3TreeViewLine(pView, "IF-NULL-ROW %d", pExpr->iTable);
+ sqlite3TreeViewExpr(pView, pExpr->pLeft, 0);
+ break;
+ }
default: {
sqlite3TreeViewLine(pView, "op=%d", pExpr->op);
break;
@@ -24028,21 +27140,20 @@ SQLITE_PRIVATE void sqlite3TreeViewExpr(TreeView *pView, const Expr *pExpr, u8 m
sqlite3TreeViewPop(pView);
}
+
/*
** Generate a human-readable explanation of an expression list.
*/
-SQLITE_PRIVATE void sqlite3TreeViewExprList(
+SQLITE_PRIVATE void sqlite3TreeViewBareExprList(
TreeView *pView,
const ExprList *pList,
- u8 moreToFollow,
const char *zLabel
){
- int i;
- pView = sqlite3TreeViewPush(pView, moreToFollow);
if( zLabel==0 || zLabel[0]==0 ) zLabel = "LIST";
if( pList==0 ){
sqlite3TreeViewLine(pView, "%s (empty)", zLabel);
}else{
+ int i;
sqlite3TreeViewLine(pView, "%s", zLabel);
for(i=0; inExpr; i++){
int j = pList->a[i].u.x.iOrderByCol;
@@ -24054,6 +27165,15 @@ SQLITE_PRIVATE void sqlite3TreeViewExprList(
if( j ) sqlite3TreeViewPop(pView);
}
}
+}
+SQLITE_PRIVATE void sqlite3TreeViewExprList(
+ TreeView *pView,
+ const ExprList *pList,
+ u8 moreToFollow,
+ const char *zLabel
+){
+ pView = sqlite3TreeViewPush(pView, moreToFollow);
+ sqlite3TreeViewBareExprList(pView, pList, zLabel);
sqlite3TreeViewPop(pView);
}
@@ -24093,7 +27213,7 @@ static SQLITE_WSD struct sqlite3PrngType {
/*
** Return N random bytes.
*/
-SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *pBuf){
+SQLITE_API void sqlite3_randomness(int N, void *pBuf){
unsigned char t;
unsigned char *zBuf = pBuf;
@@ -24169,7 +27289,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_randomness(int N, void *pBuf){
sqlite3_mutex_leave(mutex);
}
-#ifndef SQLITE_OMIT_BUILTIN_TEST
+#ifndef SQLITE_UNTESTABLE
/*
** For testing purposes, we sometimes want to preserve the state of
** PRNG and restore the PRNG to its saved state at a later time, or
@@ -24194,7 +27314,7 @@ SQLITE_PRIVATE void sqlite3PrngRestoreState(void){
sizeof(sqlite3Prng)
);
}
-#endif /* SQLITE_OMIT_BUILTIN_TEST */
+#endif /* SQLITE_UNTESTABLE */
/************** End of random.c **********************************************/
/************** Begin file threads.c *****************************************/
@@ -24263,7 +27383,7 @@ SQLITE_PRIVATE int sqlite3ThreadCreate(
*ppThread = 0;
p = sqlite3Malloc(sizeof(*p));
- if( p==0 ) return SQLITE_NOMEM;
+ if( p==0 ) return SQLITE_NOMEM_BKPT;
memset(p, 0, sizeof(*p));
p->xTask = xTask;
p->pIn = pIn;
@@ -24289,7 +27409,7 @@ SQLITE_PRIVATE int sqlite3ThreadJoin(SQLiteThread *p, void **ppOut){
int rc;
assert( ppOut!=0 );
- if( NEVER(p==0) ) return SQLITE_NOMEM;
+ if( NEVER(p==0) ) return SQLITE_NOMEM_BKPT;
if( p->done ){
*ppOut = p->pOut;
rc = SQLITE_OK;
@@ -24354,7 +27474,7 @@ SQLITE_PRIVATE int sqlite3ThreadCreate(
assert( xTask!=0 );
*ppThread = 0;
p = sqlite3Malloc(sizeof(*p));
- if( p==0 ) return SQLITE_NOMEM;
+ if( p==0 ) return SQLITE_NOMEM_BKPT;
/* If the SQLITE_TESTCTRL_FAULT_INSTALL callback is registered to a
** function that returns SQLITE_ERROR when passed the argument 200, that
** forces worker threads to run sequentially and deterministically
@@ -24386,7 +27506,7 @@ SQLITE_PRIVATE int sqlite3ThreadJoin(SQLiteThread *p, void **ppOut){
BOOL bRc;
assert( ppOut!=0 );
- if( NEVER(p==0) ) return SQLITE_NOMEM;
+ if( NEVER(p==0) ) return SQLITE_NOMEM_BKPT;
if( p->xTask==0 ){
/* assert( p->id==GetCurrentThreadId() ); */
rc = WAIT_OBJECT_0;
@@ -24434,7 +27554,7 @@ SQLITE_PRIVATE int sqlite3ThreadCreate(
assert( xTask!=0 );
*ppThread = 0;
p = sqlite3Malloc(sizeof(*p));
- if( p==0 ) return SQLITE_NOMEM;
+ if( p==0 ) return SQLITE_NOMEM_BKPT;
if( (SQLITE_PTR_TO_INT(p)/17)&1 ){
p->xTask = xTask;
p->pIn = pIn;
@@ -24450,7 +27570,7 @@ SQLITE_PRIVATE int sqlite3ThreadCreate(
SQLITE_PRIVATE int sqlite3ThreadJoin(SQLiteThread *p, void **ppOut){
assert( ppOut!=0 );
- if( NEVER(p==0) ) return SQLITE_NOMEM;
+ if( NEVER(p==0) ) return SQLITE_NOMEM_BKPT;
if( p->xTask ){
*ppOut = p->xTask(p->pIn);
}else{
@@ -24461,7 +27581,7 @@ SQLITE_PRIVATE int sqlite3ThreadJoin(SQLiteThread *p, void **ppOut){
#if defined(SQLITE_TEST)
{
void *pTstAlloc = sqlite3Malloc(10);
- if (!pTstAlloc) return SQLITE_NOMEM;
+ if (!pTstAlloc) return SQLITE_NOMEM_BKPT;
sqlite3_free(pTstAlloc);
}
#endif
@@ -24708,7 +27828,7 @@ SQLITE_PRIVATE SQLITE_NOINLINE int sqlite3VdbeMemTranslate(Mem *pMem, u8 desired
rc = sqlite3VdbeMemMakeWriteable(pMem);
if( rc!=SQLITE_OK ){
assert( rc==SQLITE_NOMEM );
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
zIn = (u8*)pMem->z;
zTerm = &zIn[pMem->n&~1];
@@ -24750,7 +27870,7 @@ SQLITE_PRIVATE SQLITE_NOINLINE int sqlite3VdbeMemTranslate(Mem *pMem, u8 desired
zTerm = &zIn[pMem->n];
zOut = sqlite3DbMallocRaw(pMem->db, len);
if( !zOut ){
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
z = zOut;
@@ -24793,7 +27913,7 @@ SQLITE_PRIVATE SQLITE_NOINLINE int sqlite3VdbeMemTranslate(Mem *pMem, u8 desired
c = pMem->flags;
sqlite3VdbeMemRelease(pMem);
- pMem->flags = MEM_Str|MEM_Term|(c&MEM_AffMask);
+ pMem->flags = MEM_Str|MEM_Term|(c&(MEM_AffMask|MEM_Subtype));
pMem->enc = desiredEnc;
pMem->z = (char*)zOut;
pMem->zMalloc = pMem->z;
@@ -24809,7 +27929,9 @@ translate_out:
#endif
return SQLITE_OK;
}
+#endif /* SQLITE_OMIT_UTF16 */
+#ifndef SQLITE_OMIT_UTF16
/*
** This routine checks for a byte-order mark at the beginning of the
** UTF-16 string stored in *pMem. If one is present, it is removed and
@@ -25052,7 +28174,7 @@ SQLITE_PRIVATE void sqlite3Coverage(int x){
** Return whatever integer value the test callback returns, or return
** SQLITE_OK if no test callback is installed.
*/
-#ifndef SQLITE_OMIT_BUILTIN_TEST
+#ifndef SQLITE_UNTESTABLE
SQLITE_PRIVATE int sqlite3FaultSim(int iTest){
int (*xCallback)(int) = sqlite3GlobalConfig.xTestCallback;
return xCallback ? xCallback(iTest) : SQLITE_OK;
@@ -25119,13 +28241,49 @@ SQLITE_PRIVATE int sqlite3Strlen30(const char *z){
return 0x3fffffff & (int)strlen(z);
}
+/*
+** Return the declared type of a column. Or return zDflt if the column
+** has no declared type.
+**
+** The column type is an extra string stored after the zero-terminator on
+** the column name if and only if the COLFLAG_HASTYPE flag is set.
+*/
+SQLITE_PRIVATE char *sqlite3ColumnType(Column *pCol, char *zDflt){
+ if( (pCol->colFlags & COLFLAG_HASTYPE)==0 ) return zDflt;
+ return pCol->zName + strlen(pCol->zName) + 1;
+}
+
+/*
+** Helper function for sqlite3Error() - called rarely. Broken out into
+** a separate routine to avoid unnecessary register saves on entry to
+** sqlite3Error().
+*/
+static SQLITE_NOINLINE void sqlite3ErrorFinish(sqlite3 *db, int err_code){
+ if( db->pErr ) sqlite3ValueSetNull(db->pErr);
+ sqlite3SystemError(db, err_code);
+}
+
/*
** Set the current error code to err_code and clear any prior error message.
+** Also set iSysErrno (by calling sqlite3System) if the err_code indicates
+** that would be appropriate.
*/
SQLITE_PRIVATE void sqlite3Error(sqlite3 *db, int err_code){
assert( db!=0 );
db->errCode = err_code;
- if( db->pErr ) sqlite3ValueSetNull(db->pErr);
+ if( err_code || db->pErr ) sqlite3ErrorFinish(db, err_code);
+}
+
+/*
+** Load the sqlite3.iSysErrno field if that is an appropriate thing
+** to do based on the SQLite error code in rc.
+*/
+SQLITE_PRIVATE void sqlite3SystemError(sqlite3 *db, int rc){
+ if( rc==SQLITE_IOERR_NOMEM ) return;
+ rc &= 0xff;
+ if( rc==SQLITE_CANTOPEN || rc==SQLITE_IOERR ){
+ db->iSysErrno = sqlite3OsGetLastError(db->pVfs);
+ }
}
/*
@@ -25152,6 +28310,7 @@ SQLITE_PRIVATE void sqlite3Error(sqlite3 *db, int err_code){
SQLITE_PRIVATE void sqlite3ErrorWithMsg(sqlite3 *db, int err_code, const char *zFormat, ...){
assert( db!=0 );
db->errCode = err_code;
+ sqlite3SystemError(db, err_code);
if( zFormat==0 ){
sqlite3Error(db, err_code);
}else if( db->pErr || (db->pErr = sqlite3ValueNew(db))!=0 ){
@@ -25215,18 +28374,13 @@ SQLITE_PRIVATE void sqlite3ErrorMsg(Parse *pParse, const char *zFormat, ...){
** brackets from around identifiers. For example: "[a-b-c]" becomes
** "a-b-c".
*/
-SQLITE_PRIVATE int sqlite3Dequote(char *z){
+SQLITE_PRIVATE void sqlite3Dequote(char *z){
char quote;
int i, j;
- if( z==0 ) return -1;
+ if( z==0 ) return;
quote = z[0];
- switch( quote ){
- case '\'': break;
- case '"': break;
- case '`': break; /* For MySQL compatibility */
- case '[': quote = ']'; break; /* For MS SqlServer compatibility */
- default: return -1;
- }
+ if( !sqlite3Isquote(quote) ) return;
+ if( quote=='[' ) quote = ']';
for(i=1, j=0;; i++){
assert( z[i] );
if( z[i]==quote ){
@@ -25241,7 +28395,14 @@ SQLITE_PRIVATE int sqlite3Dequote(char *z){
}
}
z[j] = 0;
- return j;
+}
+
+/*
+** Generate a Token object from a string
+*/
+SQLITE_PRIVATE void sqlite3TokenInit(Token *p, char *z){
+ p->z = z;
+ p->n = sqlite3Strlen30(z);
}
/* Convenient short-hand */
@@ -25257,19 +28418,28 @@ SQLITE_PRIVATE int sqlite3Dequote(char *z){
** case-independent fashion, using the same definition of "case
** independence" that SQLite uses internally when comparing identifiers.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_stricmp(const char *zLeft, const char *zRight){
- register unsigned char *a, *b;
+SQLITE_API int sqlite3_stricmp(const char *zLeft, const char *zRight){
if( zLeft==0 ){
return zRight ? -1 : 0;
}else if( zRight==0 ){
return 1;
}
+ return sqlite3StrICmp(zLeft, zRight);
+}
+SQLITE_PRIVATE int sqlite3StrICmp(const char *zLeft, const char *zRight){
+ unsigned char *a, *b;
+ int c;
a = (unsigned char *)zLeft;
b = (unsigned char *)zRight;
- while( *a!=0 && UpperToLower[*a]==UpperToLower[*b]){ a++; b++; }
- return UpperToLower[*a] - UpperToLower[*b];
+ for(;;){
+ c = (int)UpperToLower[*a] - (int)UpperToLower[*b];
+ if( c || *a==0 ) break;
+ a++;
+ b++;
+ }
+ return c;
}
-SQLITE_API int SQLITE_STDCALL sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){
+SQLITE_API int sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){
register unsigned char *a, *b;
if( zLeft==0 ){
return zRight ? -1 : 0;
@@ -25317,7 +28487,7 @@ SQLITE_PRIVATE int sqlite3AtoF(const char *z, double *pResult, int length, u8 en
int eValid = 1; /* True exponent is either not used or is well-formed */
double result;
int nDigits = 0;
- int nonNum = 0;
+ int nonNum = 0; /* True if input contains UTF16 with high byte non-zero */
assert( enc==SQLITE_UTF8 || enc==SQLITE_UTF16LE || enc==SQLITE_UTF16BE );
*pResult = 0.0; /* Default return value, in case of an error */
@@ -25330,7 +28500,7 @@ SQLITE_PRIVATE int sqlite3AtoF(const char *z, double *pResult, int length, u8 en
assert( SQLITE_UTF16LE==2 && SQLITE_UTF16BE==3 );
for(i=3-enc; i=zEnd ) goto do_atof_calc;
@@ -25378,7 +28546,12 @@ SQLITE_PRIVATE int sqlite3AtoF(const char *z, double *pResult, int length, u8 en
if( *z=='e' || *z=='E' ){
z+=incr;
eValid = 0;
- if( z>=zEnd ) goto do_atof_calc;
+
+ /* This branch is needed to avoid a (harmless) buffer overread. The
+ ** special comment alerts the mutation tester that the correct answer
+ ** is obtained even if the branch is omitted */
+ if( z>=zEnd ) goto do_atof_calc; /*PREVENTS-HARMLESS-OVERREAD*/
+
/* get sign of exponent */
if( *z=='-' ){
esign = -1;
@@ -25395,9 +28568,7 @@ SQLITE_PRIVATE int sqlite3AtoF(const char *z, double *pResult, int length, u8 en
}
/* skip trailing spaces */
- if( nDigits && eValid ){
- while( z0 ){
- while( s<(LARGEST_INT64/10) && e>0 ) e--,s*=10;
- }else{
- while( !(s%10) && e>0 ) e--,s/=10;
+ /* Attempt to reduce exponent.
+ **
+ ** Branches that are not required for the correct answer but which only
+ ** help to obtain the correct answer faster are marked with special
+ ** comments, as a hint to the mutation tester.
+ */
+ while( e>0 ){ /*OPTIMIZATION-IF-TRUE*/
+ if( esign>0 ){
+ if( s>=(LARGEST_INT64/10) ) break; /*OPTIMIZATION-IF-FALSE*/
+ s *= 10;
+ }else{
+ if( s%10!=0 ) break; /*OPTIMIZATION-IF-FALSE*/
+ s /= 10;
+ }
+ e--;
}
/* adjust the sign of significand */
s = sign<0 ? -s : s;
- /* if exponent, scale significand as appropriate
- ** and store in result. */
- if( e ){
+ if( e==0 ){ /*OPTIMIZATION-IF-TRUE*/
+ result = (double)s;
+ }else{
LONGDOUBLE_TYPE scale = 1.0;
/* attempt to handle extremely small/large numbers better */
- if( e>307 && e<342 ){
- while( e%308 ) { scale *= 1.0e+1; e -= 1; }
- if( esign<0 ){
- result = s / scale;
- result /= 1.0e+308;
- }else{
- result = s * scale;
- result *= 1.0e+308;
- }
- }else if( e>=342 ){
- if( esign<0 ){
- result = 0.0*s;
- }else{
- result = 1e308*1e308*s; /* Infinity */
+ if( e>307 ){ /*OPTIMIZATION-IF-TRUE*/
+ if( e<342 ){ /*OPTIMIZATION-IF-TRUE*/
+ while( e%308 ) { scale *= 1.0e+1; e -= 1; }
+ if( esign<0 ){
+ result = s / scale;
+ result /= 1.0e+308;
+ }else{
+ result = s * scale;
+ result *= 1.0e+308;
+ }
+ }else{ assert( e>=342 );
+ if( esign<0 ){
+ result = 0.0*s;
+ }else{
+#ifdef INFINITY
+ result = INFINITY*s;
+#else
+ result = 1e308*1e308*s; /* Infinity */
+#endif
+ }
}
}else{
/* 1.0e+22 is the largest power of 10 than can be
@@ -25456,8 +28641,6 @@ do_atof_calc:
result = s * scale;
}
}
- } else {
- result = (double)s;
}
}
@@ -25465,7 +28648,7 @@ do_atof_calc:
*pResult = result;
/* return true if number and no extra non-whitespace chracters after */
- return z>=zEnd && nDigits>0 && eValid && nonNum==0;
+ return z==zEnd && nDigits>0 && eValid && nonNum==0;
#else
return !sqlite3Atoi64(z, pResult, length, enc);
#endif /* SQLITE_OMIT_FLOATING_POINT */
@@ -25506,16 +28689,12 @@ static int compare2pow63(const char *zNum, int incr){
** Convert zNum to a 64-bit signed integer. zNum must be decimal. This
** routine does *not* accept hexadecimal notation.
**
-** If the zNum value is representable as a 64-bit twos-complement
-** integer, then write that value into *pNum and return 0.
+** Returns:
**
-** If zNum is exactly 9223372036854775808, return 2. This special
-** case is broken out because while 9223372036854775808 cannot be a
-** signed 64-bit integer, its negative -9223372036854775808 can be.
-**
-** If zNum is too big for a 64-bit integer and is not
-** 9223372036854775808 or if zNum contains any non-numeric text,
-** then return 1.
+** 0 Successful transformation. Fits in a 64-bit signed integer.
+** 1 Excess text after the integer value
+** 2 Integer too large for a 64-bit signed integer or is malformed
+** 3 Special case of 9223372036854775808
**
** length is the number of bytes in the string (bytes, not characters).
** The string is not necessarily zero-terminated. The encoding is
@@ -25527,7 +28706,8 @@ SQLITE_PRIVATE int sqlite3Atoi64(const char *zNum, i64 *pNum, int length, u8 enc
int neg = 0; /* assume positive */
int i;
int c = 0;
- int nonNum = 0;
+ int nonNum = 0; /* True if input contains UTF16 with high byte non-zero */
+ int rc; /* Baseline return code */
const char *zStart;
const char *zEnd = zNum + length;
assert( enc==SQLITE_UTF8 || enc==SQLITE_UTF16LE || enc==SQLITE_UTF16BE );
@@ -25538,7 +28718,7 @@ SQLITE_PRIVATE int sqlite3Atoi64(const char *zNum, i64 *pNum, int length, u8 enc
assert( SQLITE_UTF16LE==2 && SQLITE_UTF16BE==3 );
for(i=3-enc; i19*incr || nonNum ){
+ if( &zNum[i]19*incr ){ /* Too many digits */
/* zNum is empty or contains non-numeric text or is longer
** than 19 digits (thus guaranteeing that it is too large) */
- return 1;
+ return 2;
}else if( i<19*incr ){
/* Less than 19 digits, so we know that it fits in 64 bits */
assert( u<=LARGEST_INT64 );
- return 0;
+ return rc;
}else{
/* zNum is a 19-digit numbers. Compare it against 9223372036854775808. */
c = compare2pow63(zNum, incr);
if( c<0 ){
/* zNum is less than 9223372036854775808 so it fits */
assert( u<=LARGEST_INT64 );
- return 0;
+ return rc;
}else if( c>0 ){
/* zNum is greater than 9223372036854775808 so it overflows */
- return 1;
+ return 2;
}else{
/* zNum is exactly 9223372036854775808. Fits if negative. The
** special case 2 overflow if positive */
assert( u-1==LARGEST_INT64 );
- return neg ? 0 : 2;
+ return neg ? rc : 3;
}
}
}
@@ -25601,14 +28788,14 @@ SQLITE_PRIVATE int sqlite3Atoi64(const char *zNum, i64 *pNum, int length, u8 enc
** Returns:
**
** 0 Successful transformation. Fits in a 64-bit signed integer.
-** 1 Integer too large for a 64-bit signed integer or is malformed
-** 2 Special case of 9223372036854775808
+** 1 Excess text after the integer value
+** 2 Integer too large for a 64-bit signed integer or is malformed
+** 3 Special case of 9223372036854775808
*/
SQLITE_PRIVATE int sqlite3DecOrHexToI64(const char *z, i64 *pOut){
#ifndef SQLITE_OMIT_HEX_INTEGER
if( z[0]=='0'
&& (z[1]=='x' || z[1]=='X')
- && sqlite3Isxdigit(z[2])
){
u64 u = 0;
int i, k;
@@ -25617,7 +28804,7 @@ SQLITE_PRIVATE int sqlite3DecOrHexToI64(const char *z, i64 *pOut){
u = u*16 + sqlite3HexToInt(z[k]);
}
memcpy(pOut, &u, 8);
- return (z[k]==0 && k-i<=16) ? 0 : 1;
+ return (z[k]==0 && k-i<=16) ? 0 : 2;
}else
#endif /* SQLITE_OMIT_HEX_INTEGER */
{
@@ -25664,6 +28851,7 @@ SQLITE_PRIVATE int sqlite3GetInt32(const char *zNum, int *pValue){
}
}
#endif
+ if( !sqlite3Isdigit(zNum[0]) ) return 0;
while( zNum[0]=='0' ) zNum++;
for(i=0; i<11 && (c = zNum[i] - '0')>=0 && c<=9; i++){
v = v*10 + c;
@@ -26078,7 +29266,7 @@ SQLITE_PRIVATE u8 sqlite3GetVarint32(const unsigned char *p, u32 *v){
*/
SQLITE_PRIVATE int sqlite3VarintLen(u64 v){
int i;
- for(i=1; (v >>= 7)!=0; i++){ assert( i<9 ); }
+ for(i=1; (v >>= 7)!=0; i++){ assert( i<10 ); }
return i;
}
@@ -26091,13 +29279,11 @@ SQLITE_PRIVATE u32 sqlite3Get4byte(const u8 *p){
u32 x;
memcpy(&x,p,4);
return x;
-#elif SQLITE_BYTEORDER==1234 && !defined(SQLITE_DISABLE_INTRINSIC) \
- && defined(__GNUC__) && GCC_VERSION>=4003000
+#elif SQLITE_BYTEORDER==1234 && GCC_VERSION>=4003000
u32 x;
memcpy(&x,p,4);
return __builtin_bswap32(x);
-#elif SQLITE_BYTEORDER==1234 && !defined(SQLITE_DISABLE_INTRINSIC) \
- && defined(_MSC_VER) && _MSC_VER>=1300
+#elif SQLITE_BYTEORDER==1234 && MSVC_VERSION>=1300
u32 x;
memcpy(&x,p,4);
return _byteswap_ulong(x);
@@ -26109,10 +29295,10 @@ SQLITE_PRIVATE u32 sqlite3Get4byte(const u8 *p){
SQLITE_PRIVATE void sqlite3Put4byte(unsigned char *p, u32 v){
#if SQLITE_BYTEORDER==4321
memcpy(p,&v,4);
-#elif SQLITE_BYTEORDER==1234 && defined(__GNUC__) && GCC_VERSION>=4003000
+#elif SQLITE_BYTEORDER==1234 && GCC_VERSION>=4003000
u32 x = __builtin_bswap32(v);
memcpy(p,&x,4);
-#elif SQLITE_BYTEORDER==1234 && defined(_MSC_VER) && _MSC_VER>=1300
+#elif SQLITE_BYTEORDER==1234 && MSVC_VERSION>=1300
u32 x = _byteswap_ulong(v);
memcpy(p,&x,4);
#else
@@ -26152,7 +29338,7 @@ SQLITE_PRIVATE void *sqlite3HexToBlob(sqlite3 *db, const char *z, int n){
char *zBlob;
int i;
- zBlob = (char *)sqlite3DbMallocRaw(db, n/2 + 1);
+ zBlob = (char *)sqlite3DbMallocRawNN(db, n/2 + 1);
n--;
if( zBlob ){
for(i=0; i=5004000 && !defined(__INTEL_COMPILER)
+ return __builtin_add_overflow(*pA, iB, pA);
+#else
i64 iA = *pA;
testcase( iA==0 ); testcase( iA==1 );
testcase( iB==-1 ); testcase( iB==0 );
@@ -26242,8 +29431,12 @@ SQLITE_PRIVATE int sqlite3AddInt64(i64 *pA, i64 iB){
}
*pA += iB;
return 0;
+#endif
}
SQLITE_PRIVATE int sqlite3SubInt64(i64 *pA, i64 iB){
+#if GCC_VERSION>=5004000 && !defined(__INTEL_COMPILER)
+ return __builtin_sub_overflow(*pA, iB, pA);
+#else
testcase( iB==SMALLEST_INT64+1 );
if( iB==SMALLEST_INT64 ){
testcase( (*pA)==(-1) ); testcase( (*pA)==0 );
@@ -26253,38 +29446,28 @@ SQLITE_PRIVATE int sqlite3SubInt64(i64 *pA, i64 iB){
}else{
return sqlite3AddInt64(pA, -iB);
}
+#endif
}
-#define TWOPOWER32 (((i64)1)<<32)
-#define TWOPOWER31 (((i64)1)<<31)
SQLITE_PRIVATE int sqlite3MulInt64(i64 *pA, i64 iB){
+#if GCC_VERSION>=5004000 && !defined(__INTEL_COMPILER)
+ return __builtin_mul_overflow(*pA, iB, pA);
+#else
i64 iA = *pA;
- i64 iA1, iA0, iB1, iB0, r;
-
- iA1 = iA/TWOPOWER32;
- iA0 = iA % TWOPOWER32;
- iB1 = iB/TWOPOWER32;
- iB0 = iB % TWOPOWER32;
- if( iA1==0 ){
- if( iB1==0 ){
- *pA *= iB;
- return 0;
+ if( iB>0 ){
+ if( iA>LARGEST_INT64/iB ) return 1;
+ if( iA0 ){
+ if( iBLARGEST_INT64/-iB ) return 1;
}
- r = iA0*iB1;
- }else if( iB1==0 ){
- r = iA1*iB0;
- }else{
- /* If both iA1 and iB1 are non-zero, overflow will result */
- return 1;
}
- testcase( r==(-TWOPOWER31)-1 );
- testcase( r==(-TWOPOWER31) );
- testcase( r==TWOPOWER31 );
- testcase( r==TWOPOWER31-1 );
- if( r<(-TWOPOWER31) || r>=TWOPOWER31 ) return 1;
- r *= TWOPOWER32;
- if( sqlite3AddInt64(&r, iA0*iB0) ) return 1;
- *pA = r;
+ *pA = iA*iB;
return 0;
+#endif
}
/*
@@ -26368,8 +29551,14 @@ SQLITE_PRIVATE LogEst sqlite3LogEst(u64 x){
if( x<2 ) return 0;
while( x<8 ){ y -= 10; x <<= 1; }
}else{
- while( x>255 ){ y += 40; x >>= 4; }
+#if GCC_VERSION>=5004000
+ int i = 60 - __builtin_clzll(x);
+ y += i*10;
+ x >>= i;
+#else
+ while( x>255 ){ y += 40; x >>= 4; } /*OPTIMIZATION-IF-TRUE*/
while( x>15 ){ y += 10; x >>= 1; }
+#endif
}
return a[x&7] + y - 10;
}
@@ -26391,20 +29580,134 @@ SQLITE_PRIVATE LogEst sqlite3LogEstFromDouble(double x){
}
#endif /* SQLITE_OMIT_VIRTUALTABLE */
+#if defined(SQLITE_ENABLE_STMT_SCANSTATUS) || \
+ defined(SQLITE_ENABLE_STAT3_OR_STAT4) || \
+ defined(SQLITE_EXPLAIN_ESTIMATED_ROWS)
/*
** Convert a LogEst into an integer.
+**
+** Note that this routine is only used when one or more of various
+** non-standard compile-time options is enabled.
*/
SQLITE_PRIVATE u64 sqlite3LogEstToInt(LogEst x){
u64 n;
- if( x<10 ) return 1;
n = x%10;
x /= 10;
if( n>=5 ) n -= 2;
else if( n>=1 ) n -= 1;
- if( x>=3 ){
- return x>60 ? (u64)LARGEST_INT64 : (n+8)<<(x-3);
+#if defined(SQLITE_ENABLE_STMT_SCANSTATUS) || \
+ defined(SQLITE_EXPLAIN_ESTIMATED_ROWS)
+ if( x>60 ) return (u64)LARGEST_INT64;
+#else
+ /* If only SQLITE_ENABLE_STAT3_OR_STAT4 is on, then the largest input
+ ** possible to this routine is 310, resulting in a maximum x of 31 */
+ assert( x<=60 );
+#endif
+ return x>=3 ? (n+8)<<(x-3) : (n+8)>>(3-x);
+}
+#endif /* defined SCANSTAT or STAT4 or ESTIMATED_ROWS */
+
+/*
+** Add a new name/number pair to a VList. This might require that the
+** VList object be reallocated, so return the new VList. If an OOM
+** error occurs, the original VList returned and the
+** db->mallocFailed flag is set.
+**
+** A VList is really just an array of integers. To destroy a VList,
+** simply pass it to sqlite3DbFree().
+**
+** The first integer is the number of integers allocated for the whole
+** VList. The second integer is the number of integers actually used.
+** Each name/number pair is encoded by subsequent groups of 3 or more
+** integers.
+**
+** Each name/number pair starts with two integers which are the numeric
+** value for the pair and the size of the name/number pair, respectively.
+** The text name overlays one or more following integers. The text name
+** is always zero-terminated.
+**
+** Conceptually:
+**
+** struct VList {
+** int nAlloc; // Number of allocated slots
+** int nUsed; // Number of used slots
+** struct VListEntry {
+** int iValue; // Value for this entry
+** int nSlot; // Slots used by this entry
+** // ... variable name goes here
+** } a[0];
+** }
+**
+** During code generation, pointers to the variable names within the
+** VList are taken. When that happens, nAlloc is set to zero as an
+** indication that the VList may never again be enlarged, since the
+** accompanying realloc() would invalidate the pointers.
+*/
+SQLITE_PRIVATE VList *sqlite3VListAdd(
+ sqlite3 *db, /* The database connection used for malloc() */
+ VList *pIn, /* The input VList. Might be NULL */
+ const char *zName, /* Name of symbol to add */
+ int nName, /* Bytes of text in zName */
+ int iVal /* Value to associate with zName */
+){
+ int nInt; /* number of sizeof(int) objects needed for zName */
+ char *z; /* Pointer to where zName will be stored */
+ int i; /* Index in pIn[] where zName is stored */
+
+ nInt = nName/4 + 3;
+ assert( pIn==0 || pIn[0]>=3 ); /* Verify ok to add new elements */
+ if( pIn==0 || pIn[1]+nInt > pIn[0] ){
+ /* Enlarge the allocation */
+ int nAlloc = (pIn ? pIn[0]*2 : 10) + nInt;
+ VList *pOut = sqlite3DbRealloc(db, pIn, nAlloc*sizeof(int));
+ if( pOut==0 ) return pIn;
+ if( pIn==0 ) pOut[1] = 2;
+ pIn = pOut;
+ pIn[0] = nAlloc;
}
- return (n+8)>>(3-x);
+ i = pIn[1];
+ pIn[i] = iVal;
+ pIn[i+1] = nInt;
+ z = (char*)&pIn[i+2];
+ pIn[1] = i+nInt;
+ assert( pIn[1]<=pIn[0] );
+ memcpy(z, zName, nName);
+ z[nName] = 0;
+ return pIn;
+}
+
+/*
+** Return a pointer to the name of a variable in the given VList that
+** has the value iVal. Or return a NULL if there is no such variable in
+** the list
+*/
+SQLITE_PRIVATE const char *sqlite3VListNumToName(VList *pIn, int iVal){
+ int i, mx;
+ if( pIn==0 ) return 0;
+ mx = pIn[1];
+ i = 2;
+ do{
+ if( pIn[i]==iVal ) return (char*)&pIn[i+2];
+ i += pIn[i+1];
+ }while( iht ){
+ if( pH->ht ){ /*OPTIMIZATION-IF-TRUE*/
struct _ht *pEntry;
h = strHash(pKey) % pH->htsize;
pEntry = &pH->ht[h];
@@ -26570,7 +29879,7 @@ static HashElem *findElementWithHash(
elem = pH->first;
count = pH->count;
}
- *pHash = h;
+ if( pHash ) *pHash = h;
while( count-- ){
assert( elem!=0 );
if( sqlite3StrICmp(elem->pKey,pKey)==0 ){
@@ -26578,7 +29887,7 @@ static HashElem *findElementWithHash(
}
elem = elem->next;
}
- return 0;
+ return &nullElement;
}
/* Remove a single entry from the hash table given a pointer to that
@@ -26620,13 +29929,9 @@ static void removeElementGivenHash(
** found, or NULL if there is no match.
*/
SQLITE_PRIVATE void *sqlite3HashFind(const Hash *pH, const char *pKey){
- HashElem *elem; /* The element that matches key */
- unsigned int h; /* A hash on key */
-
assert( pH!=0 );
assert( pKey!=0 );
- elem = findElementWithHash(pH, pKey, &h);
- return elem ? elem->data : 0;
+ return findElementWithHash(pH, pKey, 0)->data;
}
/* Insert an element into the hash table pH. The key is pKey
@@ -26651,7 +29956,7 @@ SQLITE_PRIVATE void *sqlite3HashInsert(Hash *pH, const char *pKey, void *data){
assert( pH!=0 );
assert( pKey!=0 );
elem = findElementWithHash(pH,pKey,&h);
- if( elem ){
+ if( elem->data ){
void *old_data = elem->data;
if( data==0 ){
removeElementGivenHash(pH,elem,h);
@@ -26690,169 +29995,175 @@ SQLITE_PRIVATE void *sqlite3HashInsert(Hash *pH, const char *pKey, void *data){
# define OpHelp(X)
#endif
SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
- static const char *const azName[] = { "?",
- /* 1 */ "Savepoint" OpHelp(""),
- /* 2 */ "AutoCommit" OpHelp(""),
- /* 3 */ "Transaction" OpHelp(""),
- /* 4 */ "SorterNext" OpHelp(""),
- /* 5 */ "PrevIfOpen" OpHelp(""),
- /* 6 */ "NextIfOpen" OpHelp(""),
- /* 7 */ "Prev" OpHelp(""),
- /* 8 */ "Next" OpHelp(""),
- /* 9 */ "Checkpoint" OpHelp(""),
- /* 10 */ "JournalMode" OpHelp(""),
- /* 11 */ "Vacuum" OpHelp(""),
- /* 12 */ "VFilter" OpHelp("iplan=r[P3] zplan='P4'"),
- /* 13 */ "VUpdate" OpHelp("data=r[P3@P2]"),
- /* 14 */ "Goto" OpHelp(""),
- /* 15 */ "Gosub" OpHelp(""),
- /* 16 */ "Return" OpHelp(""),
- /* 17 */ "InitCoroutine" OpHelp(""),
- /* 18 */ "EndCoroutine" OpHelp(""),
+ static const char *const azName[] = {
+ /* 0 */ "Savepoint" OpHelp(""),
+ /* 1 */ "AutoCommit" OpHelp(""),
+ /* 2 */ "Transaction" OpHelp(""),
+ /* 3 */ "SorterNext" OpHelp(""),
+ /* 4 */ "PrevIfOpen" OpHelp(""),
+ /* 5 */ "NextIfOpen" OpHelp(""),
+ /* 6 */ "Prev" OpHelp(""),
+ /* 7 */ "Next" OpHelp(""),
+ /* 8 */ "Checkpoint" OpHelp(""),
+ /* 9 */ "JournalMode" OpHelp(""),
+ /* 10 */ "Vacuum" OpHelp(""),
+ /* 11 */ "VFilter" OpHelp("iplan=r[P3] zplan='P4'"),
+ /* 12 */ "VUpdate" OpHelp("data=r[P3@P2]"),
+ /* 13 */ "Goto" OpHelp(""),
+ /* 14 */ "Gosub" OpHelp(""),
+ /* 15 */ "InitCoroutine" OpHelp(""),
+ /* 16 */ "Yield" OpHelp(""),
+ /* 17 */ "MustBeInt" OpHelp(""),
+ /* 18 */ "Jump" OpHelp(""),
/* 19 */ "Not" OpHelp("r[P2]= !r[P1]"),
- /* 20 */ "Yield" OpHelp(""),
- /* 21 */ "HaltIfNull" OpHelp("if r[P3]=null halt"),
- /* 22 */ "Halt" OpHelp(""),
- /* 23 */ "Integer" OpHelp("r[P2]=P1"),
- /* 24 */ "Int64" OpHelp("r[P2]=P4"),
- /* 25 */ "String" OpHelp("r[P2]='P4' (len=P1)"),
- /* 26 */ "Null" OpHelp("r[P2..P3]=NULL"),
- /* 27 */ "SoftNull" OpHelp("r[P1]=NULL"),
- /* 28 */ "Blob" OpHelp("r[P2]=P4 (len=P1)"),
- /* 29 */ "Variable" OpHelp("r[P2]=parameter(P1,P4)"),
- /* 30 */ "Move" OpHelp("r[P2@P3]=r[P1@P3]"),
- /* 31 */ "Copy" OpHelp("r[P2@P3+1]=r[P1@P3+1]"),
- /* 32 */ "SCopy" OpHelp("r[P2]=r[P1]"),
- /* 33 */ "IntCopy" OpHelp("r[P2]=r[P1]"),
- /* 34 */ "ResultRow" OpHelp("output=r[P1@P2]"),
- /* 35 */ "CollSeq" OpHelp(""),
- /* 36 */ "Function0" OpHelp("r[P3]=func(r[P2@P5])"),
- /* 37 */ "Function" OpHelp("r[P3]=func(r[P2@P5])"),
- /* 38 */ "AddImm" OpHelp("r[P1]=r[P1]+P2"),
- /* 39 */ "MustBeInt" OpHelp(""),
- /* 40 */ "RealAffinity" OpHelp(""),
- /* 41 */ "Cast" OpHelp("affinity(r[P1])"),
- /* 42 */ "Permutation" OpHelp(""),
- /* 43 */ "Compare" OpHelp("r[P1@P3] <-> r[P2@P3]"),
- /* 44 */ "Jump" OpHelp(""),
- /* 45 */ "Once" OpHelp(""),
- /* 46 */ "If" OpHelp(""),
- /* 47 */ "IfNot" OpHelp(""),
- /* 48 */ "Column" OpHelp("r[P3]=PX"),
- /* 49 */ "Affinity" OpHelp("affinity(r[P1@P2])"),
- /* 50 */ "MakeRecord" OpHelp("r[P3]=mkrec(r[P1@P2])"),
- /* 51 */ "Count" OpHelp("r[P2]=count()"),
- /* 52 */ "ReadCookie" OpHelp(""),
- /* 53 */ "SetCookie" OpHelp(""),
- /* 54 */ "ReopenIdx" OpHelp("root=P2 iDb=P3"),
- /* 55 */ "OpenRead" OpHelp("root=P2 iDb=P3"),
- /* 56 */ "OpenWrite" OpHelp("root=P2 iDb=P3"),
- /* 57 */ "OpenAutoindex" OpHelp("nColumn=P2"),
- /* 58 */ "OpenEphemeral" OpHelp("nColumn=P2"),
- /* 59 */ "SorterOpen" OpHelp(""),
- /* 60 */ "SequenceTest" OpHelp("if( cursor[P1].ctr++ ) pc = P2"),
- /* 61 */ "OpenPseudo" OpHelp("P3 columns in r[P2]"),
- /* 62 */ "Close" OpHelp(""),
- /* 63 */ "ColumnsUsed" OpHelp(""),
- /* 64 */ "SeekLT" OpHelp("key=r[P3@P4]"),
- /* 65 */ "SeekLE" OpHelp("key=r[P3@P4]"),
- /* 66 */ "SeekGE" OpHelp("key=r[P3@P4]"),
- /* 67 */ "SeekGT" OpHelp("key=r[P3@P4]"),
- /* 68 */ "Seek" OpHelp("intkey=r[P2]"),
- /* 69 */ "NoConflict" OpHelp("key=r[P3@P4]"),
- /* 70 */ "NotFound" OpHelp("key=r[P3@P4]"),
- /* 71 */ "Or" OpHelp("r[P3]=(r[P1] || r[P2])"),
- /* 72 */ "And" OpHelp("r[P3]=(r[P1] && r[P2])"),
- /* 73 */ "Found" OpHelp("key=r[P3@P4]"),
- /* 74 */ "NotExists" OpHelp("intkey=r[P3]"),
- /* 75 */ "Sequence" OpHelp("r[P2]=cursor[P1].ctr++"),
- /* 76 */ "IsNull" OpHelp("if r[P1]==NULL goto P2"),
- /* 77 */ "NotNull" OpHelp("if r[P1]!=NULL goto P2"),
- /* 78 */ "Ne" OpHelp("if r[P1]!=r[P3] goto P2"),
- /* 79 */ "Eq" OpHelp("if r[P1]==r[P3] goto P2"),
- /* 80 */ "Gt" OpHelp("if r[P1]>r[P3] goto P2"),
- /* 81 */ "Le" OpHelp("if r[P1]<=r[P3] goto P2"),
- /* 82 */ "Lt" OpHelp("if r[P1]=r[P3] goto P2"),
- /* 84 */ "NewRowid" OpHelp("r[P2]=rowid"),
- /* 85 */ "BitAnd" OpHelp("r[P3]=r[P1]&r[P2]"),
- /* 86 */ "BitOr" OpHelp("r[P3]=r[P1]|r[P2]"),
- /* 87 */ "ShiftLeft" OpHelp("r[P3]=r[P2]<>r[P1]"),
- /* 89 */ "Add" OpHelp("r[P3]=r[P1]+r[P2]"),
- /* 90 */ "Subtract" OpHelp("r[P3]=r[P2]-r[P1]"),
- /* 91 */ "Multiply" OpHelp("r[P3]=r[P1]*r[P2]"),
- /* 92 */ "Divide" OpHelp("r[P3]=r[P2]/r[P1]"),
- /* 93 */ "Remainder" OpHelp("r[P3]=r[P2]%r[P1]"),
- /* 94 */ "Concat" OpHelp("r[P3]=r[P2]+r[P1]"),
- /* 95 */ "Insert" OpHelp("intkey=r[P3] data=r[P2]"),
- /* 96 */ "BitNot" OpHelp("r[P1]= ~r[P1]"),
+ /* 20 */ "Once" OpHelp(""),
+ /* 21 */ "If" OpHelp(""),
+ /* 22 */ "IfNot" OpHelp(""),
+ /* 23 */ "IfNullRow" OpHelp("if P1.nullRow then r[P3]=NULL, goto P2"),
+ /* 24 */ "SeekLT" OpHelp("key=r[P3@P4]"),
+ /* 25 */ "SeekLE" OpHelp("key=r[P3@P4]"),
+ /* 26 */ "SeekGE" OpHelp("key=r[P3@P4]"),
+ /* 27 */ "SeekGT" OpHelp("key=r[P3@P4]"),
+ /* 28 */ "NoConflict" OpHelp("key=r[P3@P4]"),
+ /* 29 */ "NotFound" OpHelp("key=r[P3@P4]"),
+ /* 30 */ "Found" OpHelp("key=r[P3@P4]"),
+ /* 31 */ "SeekRowid" OpHelp("intkey=r[P3]"),
+ /* 32 */ "NotExists" OpHelp("intkey=r[P3]"),
+ /* 33 */ "Last" OpHelp(""),
+ /* 34 */ "IfSmaller" OpHelp(""),
+ /* 35 */ "SorterSort" OpHelp(""),
+ /* 36 */ "Sort" OpHelp(""),
+ /* 37 */ "Rewind" OpHelp(""),
+ /* 38 */ "IdxLE" OpHelp("key=r[P3@P4]"),
+ /* 39 */ "IdxGT" OpHelp("key=r[P3@P4]"),
+ /* 40 */ "IdxLT" OpHelp("key=r[P3@P4]"),
+ /* 41 */ "IdxGE" OpHelp("key=r[P3@P4]"),
+ /* 42 */ "RowSetRead" OpHelp("r[P3]=rowset(P1)"),
+ /* 43 */ "Or" OpHelp("r[P3]=(r[P1] || r[P2])"),
+ /* 44 */ "And" OpHelp("r[P3]=(r[P1] && r[P2])"),
+ /* 45 */ "RowSetTest" OpHelp("if r[P3] in rowset(P1) goto P2"),
+ /* 46 */ "Program" OpHelp(""),
+ /* 47 */ "FkIfZero" OpHelp("if fkctr[P1]==0 goto P2"),
+ /* 48 */ "IfPos" OpHelp("if r[P1]>0 then r[P1]-=P3, goto P2"),
+ /* 49 */ "IfNotZero" OpHelp("if r[P1]!=0 then r[P1]--, goto P2"),
+ /* 50 */ "IsNull" OpHelp("if r[P1]==NULL goto P2"),
+ /* 51 */ "NotNull" OpHelp("if r[P1]!=NULL goto P2"),
+ /* 52 */ "Ne" OpHelp("IF r[P3]!=r[P1]"),
+ /* 53 */ "Eq" OpHelp("IF r[P3]==r[P1]"),
+ /* 54 */ "Gt" OpHelp("IF r[P3]>r[P1]"),
+ /* 55 */ "Le" OpHelp("IF r[P3]<=r[P1]"),
+ /* 56 */ "Lt" OpHelp("IF r[P3]=r[P1]"),
+ /* 58 */ "ElseNotEq" OpHelp(""),
+ /* 59 */ "DecrJumpZero" OpHelp("if (--r[P1])==0 goto P2"),
+ /* 60 */ "IncrVacuum" OpHelp(""),
+ /* 61 */ "VNext" OpHelp(""),
+ /* 62 */ "Init" OpHelp("Start at P2"),
+ /* 63 */ "Return" OpHelp(""),
+ /* 64 */ "EndCoroutine" OpHelp(""),
+ /* 65 */ "HaltIfNull" OpHelp("if r[P3]=null halt"),
+ /* 66 */ "Halt" OpHelp(""),
+ /* 67 */ "Integer" OpHelp("r[P2]=P1"),
+ /* 68 */ "Int64" OpHelp("r[P2]=P4"),
+ /* 69 */ "String" OpHelp("r[P2]='P4' (len=P1)"),
+ /* 70 */ "Null" OpHelp("r[P2..P3]=NULL"),
+ /* 71 */ "SoftNull" OpHelp("r[P1]=NULL"),
+ /* 72 */ "Blob" OpHelp("r[P2]=P4 (len=P1)"),
+ /* 73 */ "Variable" OpHelp("r[P2]=parameter(P1,P4)"),
+ /* 74 */ "Move" OpHelp("r[P2@P3]=r[P1@P3]"),
+ /* 75 */ "Copy" OpHelp("r[P2@P3+1]=r[P1@P3+1]"),
+ /* 76 */ "SCopy" OpHelp("r[P2]=r[P1]"),
+ /* 77 */ "IntCopy" OpHelp("r[P2]=r[P1]"),
+ /* 78 */ "ResultRow" OpHelp("output=r[P1@P2]"),
+ /* 79 */ "CollSeq" OpHelp(""),
+ /* 80 */ "AddImm" OpHelp("r[P1]=r[P1]+P2"),
+ /* 81 */ "RealAffinity" OpHelp(""),
+ /* 82 */ "Cast" OpHelp("affinity(r[P1])"),
+ /* 83 */ "Permutation" OpHelp(""),
+ /* 84 */ "BitAnd" OpHelp("r[P3]=r[P1]&r[P2]"),
+ /* 85 */ "BitOr" OpHelp("r[P3]=r[P1]|r[P2]"),
+ /* 86 */ "ShiftLeft" OpHelp("r[P3]=r[P2]<>r[P1]"),
+ /* 88 */ "Add" OpHelp("r[P3]=r[P1]+r[P2]"),
+ /* 89 */ "Subtract" OpHelp("r[P3]=r[P2]-r[P1]"),
+ /* 90 */ "Multiply" OpHelp("r[P3]=r[P1]*r[P2]"),
+ /* 91 */ "Divide" OpHelp("r[P3]=r[P2]/r[P1]"),
+ /* 92 */ "Remainder" OpHelp("r[P3]=r[P2]%r[P1]"),
+ /* 93 */ "Concat" OpHelp("r[P3]=r[P2]+r[P1]"),
+ /* 94 */ "Compare" OpHelp("r[P1@P3] <-> r[P2@P3]"),
+ /* 95 */ "BitNot" OpHelp("r[P1]= ~r[P1]"),
+ /* 96 */ "Column" OpHelp("r[P3]=PX"),
/* 97 */ "String8" OpHelp("r[P2]='P4'"),
- /* 98 */ "InsertInt" OpHelp("intkey=P3 data=r[P2]"),
- /* 99 */ "Delete" OpHelp(""),
- /* 100 */ "ResetCount" OpHelp(""),
- /* 101 */ "SorterCompare" OpHelp("if key(P1)!=trim(r[P3],P4) goto P2"),
- /* 102 */ "SorterData" OpHelp("r[P2]=data"),
- /* 103 */ "RowKey" OpHelp("r[P2]=key"),
- /* 104 */ "RowData" OpHelp("r[P2]=data"),
- /* 105 */ "Rowid" OpHelp("r[P2]=rowid"),
- /* 106 */ "NullRow" OpHelp(""),
- /* 107 */ "Last" OpHelp(""),
- /* 108 */ "SorterSort" OpHelp(""),
- /* 109 */ "Sort" OpHelp(""),
- /* 110 */ "Rewind" OpHelp(""),
- /* 111 */ "SorterInsert" OpHelp(""),
- /* 112 */ "IdxInsert" OpHelp("key=r[P2]"),
- /* 113 */ "IdxDelete" OpHelp("key=r[P2@P3]"),
- /* 114 */ "IdxRowid" OpHelp("r[P2]=rowid"),
- /* 115 */ "IdxLE" OpHelp("key=r[P3@P4]"),
- /* 116 */ "IdxGT" OpHelp("key=r[P3@P4]"),
- /* 117 */ "IdxLT" OpHelp("key=r[P3@P4]"),
- /* 118 */ "IdxGE" OpHelp("key=r[P3@P4]"),
- /* 119 */ "Destroy" OpHelp(""),
- /* 120 */ "Clear" OpHelp(""),
- /* 121 */ "ResetSorter" OpHelp(""),
- /* 122 */ "CreateIndex" OpHelp("r[P2]=root iDb=P1"),
- /* 123 */ "CreateTable" OpHelp("r[P2]=root iDb=P1"),
- /* 124 */ "ParseSchema" OpHelp(""),
- /* 125 */ "LoadAnalysis" OpHelp(""),
- /* 126 */ "DropTable" OpHelp(""),
- /* 127 */ "DropIndex" OpHelp(""),
- /* 128 */ "DropTrigger" OpHelp(""),
- /* 129 */ "IntegrityCk" OpHelp(""),
- /* 130 */ "RowSetAdd" OpHelp("rowset(P1)=r[P2]"),
- /* 131 */ "RowSetRead" OpHelp("r[P3]=rowset(P1)"),
- /* 132 */ "RowSetTest" OpHelp("if r[P3] in rowset(P1) goto P2"),
- /* 133 */ "Real" OpHelp("r[P2]=P4"),
- /* 134 */ "Program" OpHelp(""),
- /* 135 */ "Param" OpHelp(""),
- /* 136 */ "FkCounter" OpHelp("fkctr[P1]+=P2"),
- /* 137 */ "FkIfZero" OpHelp("if fkctr[P1]==0 goto P2"),
- /* 138 */ "MemMax" OpHelp("r[P1]=max(r[P1],r[P2])"),
- /* 139 */ "IfPos" OpHelp("if r[P1]>0 then r[P1]-=P3, goto P2"),
- /* 140 */ "SetIfNotPos" OpHelp("if r[P1]<=0 then r[P2]=P3"),
- /* 141 */ "IfNotZero" OpHelp("if r[P1]!=0 then r[P1]-=P3, goto P2"),
- /* 142 */ "DecrJumpZero" OpHelp("if (--r[P1])==0 goto P2"),
- /* 143 */ "JumpZeroIncr" OpHelp("if (r[P1]++)==0 ) goto P2"),
- /* 144 */ "AggStep0" OpHelp("accum=r[P3] step(r[P2@P5])"),
- /* 145 */ "AggStep" OpHelp("accum=r[P3] step(r[P2@P5])"),
- /* 146 */ "AggFinal" OpHelp("accum=r[P1] N=P2"),
- /* 147 */ "IncrVacuum" OpHelp(""),
- /* 148 */ "Expire" OpHelp(""),
- /* 149 */ "TableLock" OpHelp("iDb=P1 root=P2 write=P3"),
- /* 150 */ "VBegin" OpHelp(""),
- /* 151 */ "VCreate" OpHelp(""),
- /* 152 */ "VDestroy" OpHelp(""),
- /* 153 */ "VOpen" OpHelp(""),
- /* 154 */ "VColumn" OpHelp("r[P3]=vcolumn(P2)"),
- /* 155 */ "VNext" OpHelp(""),
- /* 156 */ "VRename" OpHelp(""),
- /* 157 */ "Pagecount" OpHelp(""),
- /* 158 */ "MaxPgcnt" OpHelp(""),
- /* 159 */ "Init" OpHelp("Start at P2"),
- /* 160 */ "CursorHint" OpHelp(""),
- /* 161 */ "Noop" OpHelp(""),
- /* 162 */ "Explain" OpHelp(""),
+ /* 98 */ "Affinity" OpHelp("affinity(r[P1@P2])"),
+ /* 99 */ "MakeRecord" OpHelp("r[P3]=mkrec(r[P1@P2])"),
+ /* 100 */ "Count" OpHelp("r[P2]=count()"),
+ /* 101 */ "ReadCookie" OpHelp(""),
+ /* 102 */ "SetCookie" OpHelp(""),
+ /* 103 */ "ReopenIdx" OpHelp("root=P2 iDb=P3"),
+ /* 104 */ "OpenRead" OpHelp("root=P2 iDb=P3"),
+ /* 105 */ "OpenWrite" OpHelp("root=P2 iDb=P3"),
+ /* 106 */ "OpenDup" OpHelp(""),
+ /* 107 */ "OpenAutoindex" OpHelp("nColumn=P2"),
+ /* 108 */ "OpenEphemeral" OpHelp("nColumn=P2"),
+ /* 109 */ "SorterOpen" OpHelp(""),
+ /* 110 */ "SequenceTest" OpHelp("if( cursor[P1].ctr++ ) pc = P2"),
+ /* 111 */ "OpenPseudo" OpHelp("P3 columns in r[P2]"),
+ /* 112 */ "Close" OpHelp(""),
+ /* 113 */ "ColumnsUsed" OpHelp(""),
+ /* 114 */ "Sequence" OpHelp("r[P2]=cursor[P1].ctr++"),
+ /* 115 */ "NewRowid" OpHelp("r[P2]=rowid"),
+ /* 116 */ "Insert" OpHelp("intkey=r[P3] data=r[P2]"),
+ /* 117 */ "InsertInt" OpHelp("intkey=P3 data=r[P2]"),
+ /* 118 */ "Delete" OpHelp(""),
+ /* 119 */ "ResetCount" OpHelp(""),
+ /* 120 */ "SorterCompare" OpHelp("if key(P1)!=trim(r[P3],P4) goto P2"),
+ /* 121 */ "SorterData" OpHelp("r[P2]=data"),
+ /* 122 */ "RowData" OpHelp("r[P2]=data"),
+ /* 123 */ "Rowid" OpHelp("r[P2]=rowid"),
+ /* 124 */ "NullRow" OpHelp(""),
+ /* 125 */ "SeekEnd" OpHelp(""),
+ /* 126 */ "SorterInsert" OpHelp("key=r[P2]"),
+ /* 127 */ "IdxInsert" OpHelp("key=r[P2]"),
+ /* 128 */ "IdxDelete" OpHelp("key=r[P2@P3]"),
+ /* 129 */ "DeferredSeek" OpHelp("Move P3 to P1.rowid if needed"),
+ /* 130 */ "IdxRowid" OpHelp("r[P2]=rowid"),
+ /* 131 */ "Destroy" OpHelp(""),
+ /* 132 */ "Real" OpHelp("r[P2]=P4"),
+ /* 133 */ "Clear" OpHelp(""),
+ /* 134 */ "ResetSorter" OpHelp(""),
+ /* 135 */ "CreateBtree" OpHelp("r[P2]=root iDb=P1 flags=P3"),
+ /* 136 */ "SqlExec" OpHelp(""),
+ /* 137 */ "ParseSchema" OpHelp(""),
+ /* 138 */ "LoadAnalysis" OpHelp(""),
+ /* 139 */ "DropTable" OpHelp(""),
+ /* 140 */ "DropIndex" OpHelp(""),
+ /* 141 */ "DropTrigger" OpHelp(""),
+ /* 142 */ "IntegrityCk" OpHelp(""),
+ /* 143 */ "RowSetAdd" OpHelp("rowset(P1)=r[P2]"),
+ /* 144 */ "Param" OpHelp(""),
+ /* 145 */ "FkCounter" OpHelp("fkctr[P1]+=P2"),
+ /* 146 */ "MemMax" OpHelp("r[P1]=max(r[P1],r[P2])"),
+ /* 147 */ "OffsetLimit" OpHelp("if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1)"),
+ /* 148 */ "AggStep0" OpHelp("accum=r[P3] step(r[P2@P5])"),
+ /* 149 */ "AggStep" OpHelp("accum=r[P3] step(r[P2@P5])"),
+ /* 150 */ "AggFinal" OpHelp("accum=r[P1] N=P2"),
+ /* 151 */ "Expire" OpHelp(""),
+ /* 152 */ "TableLock" OpHelp("iDb=P1 root=P2 write=P3"),
+ /* 153 */ "VBegin" OpHelp(""),
+ /* 154 */ "VCreate" OpHelp(""),
+ /* 155 */ "VDestroy" OpHelp(""),
+ /* 156 */ "VOpen" OpHelp(""),
+ /* 157 */ "VColumn" OpHelp("r[P3]=vcolumn(P2)"),
+ /* 158 */ "VRename" OpHelp(""),
+ /* 159 */ "Pagecount" OpHelp(""),
+ /* 160 */ "MaxPgcnt" OpHelp(""),
+ /* 161 */ "PureFunc0" OpHelp(""),
+ /* 162 */ "Function0" OpHelp("r[P3]=func(r[P2@P5])"),
+ /* 163 */ "PureFunc" OpHelp(""),
+ /* 164 */ "Function" OpHelp("r[P3]=func(r[P2@P5])"),
+ /* 165 */ "CursorHint" OpHelp(""),
+ /* 166 */ "Noop" OpHelp(""),
+ /* 167 */ "Explain" OpHelp(""),
};
return azName[i];
}
@@ -26933,12 +30244,26 @@ SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
# endif
#endif
+/* Use pread() and pwrite() if they are available */
+#if defined(__APPLE__)
+# define HAVE_PREAD 1
+# define HAVE_PWRITE 1
+#endif
+#if defined(HAVE_PREAD64) && defined(HAVE_PWRITE64)
+# undef USE_PREAD
+# define USE_PREAD64 1
+#elif defined(HAVE_PREAD) && defined(HAVE_PWRITE)
+# undef USE_PREAD64
+# define USE_PREAD 1
+#endif
+
/*
** standard include files.
*/
#include
#include
#include
+#include
#include
/* #include */
#include
@@ -26948,7 +30273,7 @@ SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
#endif
#if SQLITE_ENABLE_LOCKING_STYLE
-# include
+/* # include */
# include
# include
#endif /* SQLITE_ENABLE_LOCKING_STYLE */
@@ -27011,6 +30336,11 @@ SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
*/
#define MAX_PATHNAME 512
+/*
+** Maximum supported symbolic links
+*/
+#define SQLITE_MAX_SYMLINKS 100
+
/* Always cast the getpid() return type for compatibility with
** kernel modules in VxWorks. */
#define osGetpid(X) (pid_t)getpid()
@@ -27053,7 +30383,7 @@ struct unixFile {
unsigned short int ctrlFlags; /* Behavioral bits. UNIXFILE_* flags */
int lastErrno; /* The unix errno from last I/O error */
void *lockingContext; /* Locking style specific state */
- UnixUnusedFd *pUnused; /* Pre-allocated UnixUnusedFd */
+ UnixUnusedFd *pPreallocatedUnused; /* Pre-allocated UnixUnusedFd */
const char *zPath; /* Name of the file */
unixShm *pShm; /* Shared memory segment information */
int szChunk; /* Configured by FCNTL_CHUNK_SIZE */
@@ -27064,10 +30394,8 @@ struct unixFile {
sqlite3_int64 mmapSizeMax; /* Configured FCNTL_MMAP_SIZE value */
void *pMapRegion; /* Memory mapped region */
#endif
-#ifdef __QNXNTO__
int sectorSize; /* Device sector size */
int deviceCharacteristics; /* Precomputed device characteristics */
-#endif
#if SQLITE_ENABLE_LOCKING_STYLE
int openFlags; /* The flags specified at open() */
#endif
@@ -27163,8 +30491,8 @@ static pid_t randomnessPid = 0;
*/
#ifdef SQLITE_PERFORMANCE_TRACE
-/*
-** hwtime.h contains inline assembler code for implementing
+/*
+** hwtime.h contains inline assembler code for implementing
** high-performance timing routines.
*/
/************** Include hwtime.h in the middle of os_common.h ****************/
@@ -27184,8 +30512,8 @@ static pid_t randomnessPid = 0;
** This file contains inline asm code for retrieving "high-performance"
** counters for x86 class CPUs.
*/
-#ifndef _HWTIME_H_
-#define _HWTIME_H_
+#ifndef SQLITE_HWTIME_H
+#define SQLITE_HWTIME_H
/*
** The following routine only works on pentium-class (or newer) processors.
@@ -27253,7 +30581,7 @@ SQLITE_PRIVATE sqlite_uint64 sqlite3Hwtime(void){ return ((sqlite_uint64)0); }
#endif
-#endif /* !defined(_HWTIME_H_) */
+#endif /* !defined(SQLITE_HWTIME_H) */
/************** End of hwtime.h **********************************************/
/************** Continuing where we left off in os_common.h ******************/
@@ -27274,14 +30602,14 @@ static sqlite_uint64 g_elapsed;
** of code will give us the ability to simulate a disk I/O error. This
** is used for testing the I/O recovery logic.
*/
-#ifdef SQLITE_TEST
-SQLITE_API int sqlite3_io_error_hit = 0; /* Total number of I/O Errors */
-SQLITE_API int sqlite3_io_error_hardhit = 0; /* Number of non-benign errors */
-SQLITE_API int sqlite3_io_error_pending = 0; /* Count down to first I/O error */
-SQLITE_API int sqlite3_io_error_persist = 0; /* True if I/O errors persist */
-SQLITE_API int sqlite3_io_error_benign = 0; /* True if errors are benign */
-SQLITE_API int sqlite3_diskfull_pending = 0;
-SQLITE_API int sqlite3_diskfull = 0;
+#if defined(SQLITE_TEST)
+SQLITE_API extern int sqlite3_io_error_hit;
+SQLITE_API extern int sqlite3_io_error_hardhit;
+SQLITE_API extern int sqlite3_io_error_pending;
+SQLITE_API extern int sqlite3_io_error_persist;
+SQLITE_API extern int sqlite3_io_error_benign;
+SQLITE_API extern int sqlite3_diskfull_pending;
+SQLITE_API extern int sqlite3_diskfull;
#define SimulateIOErrorBenign(X) sqlite3_io_error_benign=(X)
#define SimulateIOError(CODE) \
if( (sqlite3_io_error_persist && sqlite3_io_error_hit) \
@@ -27307,17 +30635,17 @@ static void local_ioerr(){
#define SimulateIOErrorBenign(X)
#define SimulateIOError(A)
#define SimulateDiskfullError(A)
-#endif
+#endif /* defined(SQLITE_TEST) */
/*
** When testing, keep a count of the number of open files.
*/
-#ifdef SQLITE_TEST
-SQLITE_API int sqlite3_open_file_count = 0;
+#if defined(SQLITE_TEST)
+SQLITE_API extern int sqlite3_open_file_count;
#define OpenCounter(X) sqlite3_open_file_count+=(X)
#else
#define OpenCounter(X)
-#endif
+#endif /* defined(SQLITE_TEST) */
#endif /* !defined(_OS_COMMON_H_) */
@@ -27370,6 +30698,20 @@ SQLITE_API int sqlite3_open_file_count = 0;
# define lseek lseek64
#endif
+#ifdef __linux__
+/*
+** Linux-specific IOCTL magic numbers used for controlling F2FS
+*/
+#define F2FS_IOCTL_MAGIC 0xf5
+#define F2FS_IOC_START_ATOMIC_WRITE _IO(F2FS_IOCTL_MAGIC, 1)
+#define F2FS_IOC_COMMIT_ATOMIC_WRITE _IO(F2FS_IOCTL_MAGIC, 2)
+#define F2FS_IOC_START_VOLATILE_WRITE _IO(F2FS_IOCTL_MAGIC, 3)
+#define F2FS_IOC_ABORT_VOLATILE_WRITE _IO(F2FS_IOCTL_MAGIC, 5)
+#define F2FS_IOC_GET_FEATURES _IOR(F2FS_IOCTL_MAGIC, 12, u32)
+#define F2FS_FEATURE_ATOMIC_WRITE 0x0004
+#endif /* __linux__ */
+
+
/*
** Different Unix systems declare open() in different ways. Same use
** open(const char*,int,mode_t). Others use open(const char*,int,...).
@@ -27447,7 +30789,7 @@ static struct unix_syscall {
#else
{ "pread64", (sqlite3_syscall_ptr)0, 0 },
#endif
-#define osPread64 ((ssize_t(*)(int,void*,size_t,off_t))aSyscall[10].pCurrent)
+#define osPread64 ((ssize_t(*)(int,void*,size_t,off64_t))aSyscall[10].pCurrent)
{ "write", (sqlite3_syscall_ptr)write, 0 },
#define osWrite ((ssize_t(*)(int,const void*,size_t))aSyscall[11].pCurrent)
@@ -27465,7 +30807,7 @@ static struct unix_syscall {
#else
{ "pwrite64", (sqlite3_syscall_ptr)0, 0 },
#endif
-#define osPwrite64 ((ssize_t(*)(int,const void*,size_t,off_t))\
+#define osPwrite64 ((ssize_t(*)(int,const void*,size_t,off64_t))\
aSyscall[13].pCurrent)
{ "fchmod", (sqlite3_syscall_ptr)fchmod, 0 },
@@ -27490,33 +30832,60 @@ static struct unix_syscall {
{ "rmdir", (sqlite3_syscall_ptr)rmdir, 0 },
#define osRmdir ((int(*)(const char*))aSyscall[19].pCurrent)
+#if defined(HAVE_FCHOWN)
{ "fchown", (sqlite3_syscall_ptr)fchown, 0 },
+#else
+ { "fchown", (sqlite3_syscall_ptr)0, 0 },
+#endif
#define osFchown ((int(*)(int,uid_t,gid_t))aSyscall[20].pCurrent)
{ "geteuid", (sqlite3_syscall_ptr)geteuid, 0 },
#define osGeteuid ((uid_t(*)(void))aSyscall[21].pCurrent)
#if !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0
- { "mmap", (sqlite3_syscall_ptr)mmap, 0 },
+ { "mmap", (sqlite3_syscall_ptr)mmap, 0 },
+#else
+ { "mmap", (sqlite3_syscall_ptr)0, 0 },
+#endif
#define osMmap ((void*(*)(void*,size_t,int,int,int,off_t))aSyscall[22].pCurrent)
+#if !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0
{ "munmap", (sqlite3_syscall_ptr)munmap, 0 },
+#else
+ { "munmap", (sqlite3_syscall_ptr)0, 0 },
+#endif
#define osMunmap ((void*(*)(void*,size_t))aSyscall[23].pCurrent)
-#if HAVE_MREMAP
+#if HAVE_MREMAP && (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0)
{ "mremap", (sqlite3_syscall_ptr)mremap, 0 },
#else
{ "mremap", (sqlite3_syscall_ptr)0, 0 },
#endif
#define osMremap ((void*(*)(void*,size_t,size_t,int,...))aSyscall[24].pCurrent)
+#if !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0
{ "getpagesize", (sqlite3_syscall_ptr)unixGetpagesize, 0 },
+#else
+ { "getpagesize", (sqlite3_syscall_ptr)0, 0 },
+#endif
#define osGetpagesize ((int(*)(void))aSyscall[25].pCurrent)
+#if defined(HAVE_READLINK)
{ "readlink", (sqlite3_syscall_ptr)readlink, 0 },
+#else
+ { "readlink", (sqlite3_syscall_ptr)0, 0 },
+#endif
#define osReadlink ((ssize_t(*)(const char*,char*,size_t))aSyscall[26].pCurrent)
+#if defined(HAVE_LSTAT)
+ { "lstat", (sqlite3_syscall_ptr)lstat, 0 },
+#else
+ { "lstat", (sqlite3_syscall_ptr)0, 0 },
#endif
+#define osLstat ((int(*)(const char*,struct stat*))aSyscall[27].pCurrent)
+
+ { "ioctl", (sqlite3_syscall_ptr)ioctl, 0 },
+#define osIoctl ((int(*)(int,int,...))aSyscall[28].pCurrent)
}; /* End of the overrideable system calls */
@@ -27527,10 +30896,10 @@ static struct unix_syscall {
** we are not running as root.
*/
static int robustFchown(int fd, uid_t uid, gid_t gid){
-#if OS_VXWORKS
- return 0;
-#else
+#if defined(HAVE_FCHOWN)
return osGeteuid() ? 0 : osFchown(fd,uid,gid);
+#else
+ return 0;
#endif
}
@@ -28079,7 +31448,14 @@ struct unixFileId {
#if OS_VXWORKS
struct vxworksFileId *pId; /* Unique file ID for vxworks. */
#else
- ino_t ino; /* Inode number */
+ /* We are told that some versions of Android contain a bug that
+ ** sizes ino_t at only 32-bits instead of 64-bits. (See
+ ** https://android-review.googlesource.com/#/c/115351/3/dist/sqlite3.c)
+ ** To work around this, always allocate 64-bits for the inode number.
+ ** On small machines that only have 32-bit inodes, this wastes 4 bytes,
+ ** but that should not be a big deal. */
+ /* WAS: ino_t ino; */
+ u64 ino; /* Inode number */
#endif
};
@@ -28115,7 +31491,8 @@ struct unixInodeInfo {
/*
** A lists of all unixInodeInfo objects.
*/
-static unixInodeInfo *inodeList = 0;
+static unixInodeInfo *inodeList = 0; /* All unixInodeInfo objects */
+static unsigned int nUnusedFd = 0; /* Total unused file descriptors */
/*
**
@@ -28225,6 +31602,7 @@ static void closePendingFds(unixFile *pFile){
pNext = p->pNext;
robust_close(pFile, p->fd, __LINE__);
sqlite3_free(p);
+ nUnusedFd--;
}
pInode->pUnused = 0;
}
@@ -28257,6 +31635,7 @@ static void releaseInodeInfo(unixFile *pFile){
sqlite3_free(pInode);
}
}
+ assert( inodeList!=0 || nUnusedFd==0 );
}
/*
@@ -28324,8 +31703,9 @@ static int findInodeInfo(
#if OS_VXWORKS
fileId.pId = pFile->pId;
#else
- fileId.ino = statbuf.st_ino;
+ fileId.ino = (u64)statbuf.st_ino;
#endif
+ assert( inodeList!=0 || nUnusedFd==0 );
pInode = inodeList;
while( pInode && memcmp(&fileId, &pInode->fileId, sizeof(fileId)) ){
pInode = pInode->pNext;
@@ -28333,7 +31713,7 @@ static int findInodeInfo(
if( pInode==0 ){
pInode = sqlite3_malloc64( sizeof(*pInode) );
if( pInode==0 ){
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
memset(pInode, 0, sizeof(*pInode));
memcpy(&pInode->fileId, &fileId, sizeof(fileId));
@@ -28358,7 +31738,8 @@ static int fileHasMoved(unixFile *pFile){
#else
struct stat buf;
return pFile->pInode!=0 &&
- (osStat(pFile->zPath, &buf)!=0 || buf.st_ino!=pFile->pInode->fileId.ino);
+ (osStat(pFile->zPath, &buf)!=0
+ || (u64)buf.st_ino!=pFile->pInode->fileId.ino);
#endif
}
@@ -28375,12 +31756,16 @@ static int fileHasMoved(unixFile *pFile){
static void verifyDbFile(unixFile *pFile){
struct stat buf;
int rc;
+
+ /* These verifications occurs for the main database only */
+ if( pFile->ctrlFlags & UNIXFILE_NOLOCK ) return;
+
rc = osFstat(pFile->h, &buf);
if( rc!=0 ){
sqlite3_log(SQLITE_WARNING, "cannot fstat db file %s", pFile->zPath);
return;
}
- if( buf.st_nlink==0 && (pFile->ctrlFlags & UNIXFILE_DELETE)==0 ){
+ if( buf.st_nlink==0 ){
sqlite3_log(SQLITE_WARNING, "file unlinked while open: %s", pFile->zPath);
return;
}
@@ -28516,7 +31901,7 @@ static int unixLock(sqlite3_file *id, int eFileLock){
** lock transitions in terms of the POSIX advisory shared and exclusive
** lock primitives (called read-locks and write-locks below, to avoid
** confusion with SQLite lock names). The algorithms are complicated
- ** slightly in order to be compatible with windows systems simultaneously
+ ** slightly in order to be compatible with Windows95 systems simultaneously
** accessing the same database file, in case that is ever required.
**
** Symbols defined in os.h indentify the 'pending byte' and the 'reserved
@@ -28524,8 +31909,14 @@ static int unixLock(sqlite3_file *id, int eFileLock){
** range', a range of 510 bytes at a well known offset.
**
** To obtain a SHARED lock, a read-lock is obtained on the 'pending
- ** byte'. If this is successful, a random byte from the 'shared byte
- ** range' is read-locked and the lock on the 'pending byte' released.
+ ** byte'. If this is successful, 'shared byte range' is read-locked
+ ** and the lock on the 'pending byte' released. (Legacy note: When
+ ** SQLite was first developed, Windows95 systems were still very common,
+ ** and Widnows95 lacks a shared-lock capability. So on Windows95, a
+ ** single randomly selected by from the 'shared byte range' is locked.
+ ** Windows95 is now pretty much extinct, but this work-around for the
+ ** lack of shared-locks on Windows95 lives on, for backwards
+ ** compatibility.)
**
** A process may only obtain a RESERVED lock after it has a SHARED lock.
** A RESERVED lock is implemented by grabbing a write-lock on the
@@ -28544,11 +31935,6 @@ static int unixLock(sqlite3_file *id, int eFileLock){
** range'. Since all other locks require a read-lock on one of the bytes
** within this range, this ensures that no other locks are held on the
** database.
- **
- ** The reason a single byte cannot be used instead of the 'shared byte
- ** range' is that some versions of windows do not support read-locks. By
- ** locking a random byte from a range, concurrent SHARED locks may exist
- ** even if the locking primitive used is always a write-lock.
*/
int rc = SQLITE_OK;
unixFile *pFile = (unixFile*)id;
@@ -28739,11 +32125,12 @@ end_lock:
*/
static void setPendingFd(unixFile *pFile){
unixInodeInfo *pInode = pFile->pInode;
- UnixUnusedFd *p = pFile->pUnused;
+ UnixUnusedFd *p = pFile->pPreallocatedUnused;
p->pNext = pInode->pUnused;
pInode->pUnused = p;
pFile->h = -1;
- pFile->pUnused = 0;
+ pFile->pPreallocatedUnused = 0;
+ nUnusedFd++;
}
/*
@@ -28968,7 +32355,7 @@ static int closeUnixFile(sqlite3_file *id){
#endif
OSTRACE(("CLOSE %-3d\n", pFile->h));
OpenCounter(-1);
- sqlite3_free(pFile->pUnused);
+ sqlite3_free(pFile->pPreallocatedUnused);
memset(pFile, 0, sizeof(unixFile));
return SQLITE_OK;
}
@@ -29305,7 +32692,7 @@ static int flockCheckReservedLock(sqlite3_file *id, int *pResOut){
OSTRACE(("TEST WR-LOCK %d %d %d (flock)\n", pFile->h, rc, reserved));
#ifdef SQLITE_IGNORE_FLOCK_LOCK_ERRORS
- if( (rc & SQLITE_IOERR) == SQLITE_IOERR ){
+ if( (rc & 0xff) == SQLITE_IOERR ){
rc = SQLITE_OK;
reserved=1;
}
@@ -29372,7 +32759,7 @@ static int flockLock(sqlite3_file *id, int eFileLock) {
OSTRACE(("LOCK %d %s %s (flock)\n", pFile->h, azFileLock(eFileLock),
rc==SQLITE_OK ? "ok" : "failed"));
#ifdef SQLITE_IGNORE_FLOCK_LOCK_ERRORS
- if( (rc & SQLITE_IOERR) == SQLITE_IOERR ){
+ if( (rc & 0xff) == SQLITE_IOERR ){
rc = SQLITE_BUSY;
}
#endif /* SQLITE_IGNORE_FLOCK_LOCK_ERRORS */
@@ -29909,7 +33296,7 @@ static int afpLock(sqlite3_file *id, int eFileLock){
/* Can't reestablish the shared lock. Sqlite can't deal, this is
** a critical I/O error
*/
- rc = ((failed & SQLITE_IOERR) == SQLITE_IOERR) ? failed2 :
+ rc = ((failed & 0xff) == SQLITE_IOERR) ? failed2 :
SQLITE_IOERR_LOCK;
goto afp_end_lock;
}
@@ -30189,7 +33576,7 @@ static int unixRead(
/* If this is a database file (not a journal, master-journal or temp
** file), the bytes in the locking range should never be read or written. */
#if 0
- assert( pFile->pUnused==0
+ assert( pFile->pPreallocatedUnused==0
|| offset>=PENDING_BYTE+512
|| offset+amt<=PENDING_BYTE
);
@@ -30302,7 +33689,7 @@ static int unixWrite(
/* If this is a database file (not a journal, master-journal or temp
** file), the bytes in the locking range should never be read or written. */
#if 0
- assert( pFile->pUnused==0
+ assert( pFile->pPreallocatedUnused==0
|| offset>=PENDING_BYTE+512
|| offset+amt<=PENDING_BYTE
);
@@ -30782,6 +34169,21 @@ static int unixGetTempname(int nBuf, char *zBuf);
static int unixFileControl(sqlite3_file *id, int op, void *pArg){
unixFile *pFile = (unixFile*)id;
switch( op ){
+#if defined(__linux__) && defined(SQLITE_ENABLE_BATCH_ATOMIC_WRITE)
+ case SQLITE_FCNTL_BEGIN_ATOMIC_WRITE: {
+ int rc = osIoctl(pFile->h, F2FS_IOC_START_ATOMIC_WRITE);
+ return rc ? SQLITE_IOERR_BEGIN_ATOMIC : SQLITE_OK;
+ }
+ case SQLITE_FCNTL_COMMIT_ATOMIC_WRITE: {
+ int rc = osIoctl(pFile->h, F2FS_IOC_COMMIT_ATOMIC_WRITE);
+ return rc ? SQLITE_IOERR_COMMIT_ATOMIC : SQLITE_OK;
+ }
+ case SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE: {
+ int rc = osIoctl(pFile->h, F2FS_IOC_ABORT_VOLATILE_WRITE);
+ return rc ? SQLITE_IOERR_ROLLBACK_ATOMIC : SQLITE_OK;
+ }
+#endif /* __linux__ && SQLITE_ENABLE_BATCH_ATOMIC_WRITE */
+
case SQLITE_FCNTL_LOCKSTATE: {
*(int*)pArg = pFile->eFileLock;
return SQLITE_OK;
@@ -30832,6 +34234,14 @@ static int unixFileControl(sqlite3_file *id, int op, void *pArg){
if( newLimit>sqlite3GlobalConfig.mxMmap ){
newLimit = sqlite3GlobalConfig.mxMmap;
}
+
+ /* The value of newLimit may be eventually cast to (size_t) and passed
+ ** to mmap(). Restrict its value to 2GB if (size_t) is not at least a
+ ** 64-bit type. */
+ if( newLimit>0 && sizeof(size_t)<8 ){
+ newLimit = (newLimit & 0x7FFFFFFF);
+ }
+
*(i64*)pArg = pFile->mmapSizeMax;
if( newLimit>=0 && newLimit!=pFile->mmapSizeMax && pFile->nFetchOut==0 ){
pFile->mmapSizeMax = newLimit;
@@ -30865,30 +34275,41 @@ static int unixFileControl(sqlite3_file *id, int op, void *pArg){
}
/*
-** Return the sector size in bytes of the underlying block device for
-** the specified file. This is almost always 512 bytes, but may be
-** larger for some devices.
+** If pFd->sectorSize is non-zero when this function is called, it is a
+** no-op. Otherwise, the values of pFd->sectorSize and
+** pFd->deviceCharacteristics are set according to the file-system
+** characteristics.
**
-** SQLite code assumes this function cannot fail. It also assumes that
-** if two files are created in the same file-system directory (i.e.
-** a database and its journal file) that the sector size will be the
-** same for both.
+** There are two versions of this function. One for QNX and one for all
+** other systems.
*/
-#ifndef __QNXNTO__
-static int unixSectorSize(sqlite3_file *NotUsed){
- UNUSED_PARAMETER(NotUsed);
- return SQLITE_DEFAULT_SECTOR_SIZE;
-}
-#endif
+#ifndef __QNXNTO__
+static void setDeviceCharacteristics(unixFile *pFd){
+ assert( pFd->deviceCharacteristics==0 || pFd->sectorSize!=0 );
+ if( pFd->sectorSize==0 ){
+#if defined(__linux__) && defined(SQLITE_ENABLE_BATCH_ATOMIC_WRITE)
+ int res;
+ u32 f = 0;
-/*
-** The following version of unixSectorSize() is optimized for QNX.
-*/
-#ifdef __QNXNTO__
+ /* Check for support for F2FS atomic batch writes. */
+ res = osIoctl(pFd->h, F2FS_IOC_GET_FEATURES, &f);
+ if( res==0 && (f & F2FS_FEATURE_ATOMIC_WRITE) ){
+ pFd->deviceCharacteristics = SQLITE_IOCAP_BATCH_ATOMIC;
+ }
+#endif /* __linux__ && SQLITE_ENABLE_BATCH_ATOMIC_WRITE */
+
+ /* Set the POWERSAFE_OVERWRITE flag if requested. */
+ if( pFd->ctrlFlags & UNIXFILE_PSOW ){
+ pFd->deviceCharacteristics |= SQLITE_IOCAP_POWERSAFE_OVERWRITE;
+ }
+
+ pFd->sectorSize = SQLITE_DEFAULT_SECTOR_SIZE;
+ }
+}
+#else
#include
#include
-static int unixSectorSize(sqlite3_file *id){
- unixFile *pFile = (unixFile*)id;
+static void setDeviceCharacteristics(unixFile *pFile){
if( pFile->sectorSize == 0 ){
struct statvfs fsInfo;
@@ -30957,9 +34378,24 @@ static int unixSectorSize(sqlite3_file *id){
pFile->deviceCharacteristics = 0;
pFile->sectorSize = SQLITE_DEFAULT_SECTOR_SIZE;
}
- return pFile->sectorSize;
}
-#endif /* __QNXNTO__ */
+#endif
+
+/*
+** Return the sector size in bytes of the underlying block device for
+** the specified file. This is almost always 512 bytes, but may be
+** larger for some devices.
+**
+** SQLite code assumes this function cannot fail. It also assumes that
+** if two files are created in the same file-system directory (i.e.
+** a database and its journal file) that the sector size will be the
+** same for both.
+*/
+static int unixSectorSize(sqlite3_file *id){
+ unixFile *pFd = (unixFile*)id;
+ setDeviceCharacteristics(pFd);
+ return pFd->sectorSize;
+}
/*
** Return the device characteristics for the file.
@@ -30975,16 +34411,9 @@ static int unixSectorSize(sqlite3_file *id){
** available to turn it off and URI query parameter available to turn it off.
*/
static int unixDeviceCharacteristics(sqlite3_file *id){
- unixFile *p = (unixFile*)id;
- int rc = 0;
-#ifdef __QNXNTO__
- if( p->sectorSize==0 ) unixSectorSize(id);
- rc = p->deviceCharacteristics;
-#endif
- if( p->ctrlFlags & UNIXFILE_PSOW ){
- rc |= SQLITE_IOCAP_POWERSAFE_OVERWRITE;
- }
- return rc;
+ unixFile *pFd = (unixFile*)id;
+ setDeviceCharacteristics(pFd);
+ return pFd->deviceCharacteristics;
}
#if !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0
@@ -31253,7 +34682,7 @@ static int unixOpenSharedMemory(unixFile *pDbFd){
/* Allocate space for the new unixShm object. */
p = sqlite3_malloc64( sizeof(*p) );
- if( p==0 ) return SQLITE_NOMEM;
+ if( p==0 ) return SQLITE_NOMEM_BKPT;
memset(p, 0, sizeof(*p));
assert( pDbFd->pShm==0 );
@@ -31285,7 +34714,7 @@ static int unixOpenSharedMemory(unixFile *pDbFd){
#endif
pShmNode = sqlite3_malloc64( sizeof(*pShmNode) + nShmFilename );
if( pShmNode==0 ){
- rc = SQLITE_NOMEM;
+ rc = SQLITE_NOMEM_BKPT;
goto shm_open_err;
}
memset(pShmNode, 0, sizeof(*pShmNode)+nShmFilename);
@@ -31301,10 +34730,12 @@ static int unixOpenSharedMemory(unixFile *pDbFd){
pShmNode->h = -1;
pDbFd->pInode->pShmNode = pShmNode;
pShmNode->pInode = pDbFd->pInode;
- pShmNode->mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_FAST);
- if( pShmNode->mutex==0 ){
- rc = SQLITE_NOMEM;
- goto shm_open_err;
+ if( sqlite3GlobalConfig.bCoreMutex ){
+ pShmNode->mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_FAST);
+ if( pShmNode->mutex==0 ){
+ rc = SQLITE_NOMEM_BKPT;
+ goto shm_open_err;
+ }
}
if( pInode->bProcessLock==0 ){
@@ -31476,7 +34907,7 @@ static int unixShmMap(
pShmNode->apRegion, nReqRegion*sizeof(char *)
);
if( !apNew ){
- rc = SQLITE_IOERR_NOMEM;
+ rc = SQLITE_IOERR_NOMEM_BKPT;
goto shmpage_out;
}
pShmNode->apRegion = apNew;
@@ -31496,7 +34927,7 @@ static int unixShmMap(
}else{
pMem = sqlite3_malloc64(szRegion);
if( pMem==0 ){
- rc = SQLITE_NOMEM;
+ rc = SQLITE_NOMEM_BKPT;
goto shmpage_out;
}
memset(pMem, 0, szRegion);
@@ -32240,17 +35671,6 @@ static int fillInUnixFile(
assert( pNew->pInode==NULL );
- /* Usually the path zFilename should not be a relative pathname. The
- ** exception is when opening the proxy "conch" file in builds that
- ** include the special Apple locking styles.
- */
-#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
- assert( zFilename==0 || zFilename[0]=='/'
- || pVfs->pAppData==(void*)&autolockIoFinder );
-#else
- assert( zFilename==0 || zFilename[0]=='/' );
-#endif
-
/* No locking occurs in temporary files */
assert( zFilename!=0 || (ctrlFlags & UNIXFILE_NOLOCK)!=0 );
@@ -32274,7 +35694,7 @@ static int fillInUnixFile(
pNew->pId = vxworksFindFileId(zFilename);
if( pNew->pId==0 ){
ctrlFlags |= UNIXFILE_NOLOCK;
- rc = SQLITE_NOMEM;
+ rc = SQLITE_NOMEM_BKPT;
}
#endif
@@ -32330,7 +35750,7 @@ static int fillInUnixFile(
afpLockingContext *pCtx;
pNew->lockingContext = pCtx = sqlite3_malloc64( sizeof(*pCtx) );
if( pCtx==0 ){
- rc = SQLITE_NOMEM;
+ rc = SQLITE_NOMEM_BKPT;
}else{
/* NB: zFilename exists and remains valid until the file is closed
** according to requirement F11141. So we do not need to make a
@@ -32360,7 +35780,7 @@ static int fillInUnixFile(
nFilename = (int)strlen(zFilename) + 6;
zLockFile = (char *)sqlite3_malloc64(nFilename);
if( zLockFile==0 ){
- rc = SQLITE_NOMEM;
+ rc = SQLITE_NOMEM_BKPT;
}else{
sqlite3_snprintf(nFilename, zLockFile, "%s" DOTLOCK_SUFFIX, zFilename);
}
@@ -32383,7 +35803,7 @@ static int fillInUnixFile(
if( zSemName[n]=='/' ) zSemName[n] = '_';
pNew->pInode->pSem = sem_open(zSemName, O_CREAT, 0666, 1);
if( pNew->pInode->pSem == SEM_FAILED ){
- rc = SQLITE_NOMEM;
+ rc = SQLITE_NOMEM_BKPT;
pNew->pInode->aSemName[0] = '\0';
}
}
@@ -32423,20 +35843,24 @@ static const char *unixTempFileDir(void){
"/tmp",
"."
};
- unsigned int i;
+ unsigned int i = 0;
struct stat buf;
const char *zDir = sqlite3_temp_directory;
if( !azDirs[0] ) azDirs[0] = getenv("SQLITE_TMPDIR");
if( !azDirs[1] ) azDirs[1] = getenv("TMPDIR");
- for(i=0; i=sizeof(azDirs)/sizeof(azDirs[0]) ) break;
+ zDir = azDirs[i++];
}
- return zDir;
+ return 0;
}
/*
@@ -32452,9 +35876,11 @@ static int unixGetTempname(int nBuf, char *zBuf){
** using the io-error infrastructure to test that SQLite handles this
** function failing.
*/
+ zBuf[0] = 0;
SimulateIOError( return SQLITE_IOERR );
zDir = unixTempFileDir();
+ if( zDir==0 ) return SQLITE_IOERR_GETTEMPPATH;
do{
u64 r;
sqlite3_randomness(sizeof(r), &r);
@@ -32503,6 +35929,8 @@ static UnixUnusedFd *findReusableFd(const char *zPath, int flags){
#if !OS_VXWORKS
struct stat sStat; /* Results of stat() call */
+ unixEnterMutex();
+
/* A stat() call may fail for various reasons. If this happens, it is
** almost certain that an open() call on the same path will also fail.
** For this reason, if an error occurs in the stat() call here, it is
@@ -32511,13 +35939,12 @@ static UnixUnusedFd *findReusableFd(const char *zPath, int flags){
**
** Even if a subsequent open() call does succeed, the consequences of
** not searching for a reusable file descriptor are not dire. */
- if( 0==osStat(zPath, &sStat) ){
+ if( nUnusedFd>0 && 0==osStat(zPath, &sStat) ){
unixInodeInfo *pInode;
- unixEnterMutex();
pInode = inodeList;
while( pInode && (pInode->fileId.dev!=sStat.st_dev
- || pInode->fileId.ino!=sStat.st_ino) ){
+ || pInode->fileId.ino!=(u64)sStat.st_ino) ){
pInode = pInode->pNext;
}
if( pInode ){
@@ -32525,15 +35952,37 @@ static UnixUnusedFd *findReusableFd(const char *zPath, int flags){
for(pp=&pInode->pUnused; *pp && (*pp)->flags!=flags; pp=&((*pp)->pNext));
pUnused = *pp;
if( pUnused ){
+ nUnusedFd--;
*pp = pUnused->pNext;
}
}
- unixLeaveMutex();
}
+ unixLeaveMutex();
#endif /* if !OS_VXWORKS */
return pUnused;
}
+/*
+** Find the mode, uid and gid of file zFile.
+*/
+static int getFileMode(
+ const char *zFile, /* File name */
+ mode_t *pMode, /* OUT: Permissions of zFile */
+ uid_t *pUid, /* OUT: uid of zFile. */
+ gid_t *pGid /* OUT: gid of zFile. */
+){
+ struct stat sStat; /* Output of stat() on database file */
+ int rc = SQLITE_OK;
+ if( 0==osStat(zFile, &sStat) ){
+ *pMode = sStat.st_mode & 0777;
+ *pUid = sStat.st_uid;
+ *pGid = sStat.st_gid;
+ }else{
+ rc = SQLITE_IOERR_FSTAT;
+ }
+ return rc;
+}
+
/*
** This function is called by unixOpen() to determine the unix permissions
** to create new files with. If no error occurs, then SQLITE_OK is returned
@@ -32569,7 +36018,6 @@ static int findCreateFileMode(
if( flags & (SQLITE_OPEN_WAL|SQLITE_OPEN_MAIN_JOURNAL) ){
char zDb[MAX_PATHNAME+1]; /* Database file path */
int nDb; /* Number of valid bytes in zDb */
- struct stat sStat; /* Output of stat() on database file */
/* zPath is a path to a WAL or journal file. The following block derives
** the path to the associated database file from zPath. This block handles
@@ -32585,30 +36033,28 @@ static int findCreateFileMode(
*/
nDb = sqlite3Strlen30(zPath) - 1;
while( zPath[nDb]!='-' ){
-#ifndef SQLITE_ENABLE_8_3_NAMES
- /* In the normal case (8+3 filenames disabled) the journal filename
- ** is guaranteed to contain a '-' character. */
- assert( nDb>0 );
- assert( sqlite3Isalnum(zPath[nDb]) );
-#else
- /* If 8+3 names are possible, then the journal file might not contain
- ** a '-' character. So check for that case and return early. */
+ /* In normal operation, the journal file name will always contain
+ ** a '-' character. However in 8+3 filename mode, or if a corrupt
+ ** rollback journal specifies a master journal with a goofy name, then
+ ** the '-' might be missing. */
if( nDb==0 || zPath[nDb]=='.' ) return SQLITE_OK;
-#endif
nDb--;
}
memcpy(zDb, zPath, nDb);
zDb[nDb] = '\0';
- if( 0==osStat(zDb, &sStat) ){
- *pMode = sStat.st_mode & 0777;
- *pUid = sStat.st_uid;
- *pGid = sStat.st_gid;
- }else{
- rc = SQLITE_IOERR_FSTAT;
- }
+ rc = getFileMode(zDb, pMode, pUid, pGid);
}else if( flags & SQLITE_OPEN_DELETEONCLOSE ){
*pMode = 0600;
+ }else if( flags & SQLITE_OPEN_URI ){
+ /* If this is a main database file and the file was opened using a URI
+ ** filename, check for the "modeof" parameter. If present, interpret
+ ** its value as a filename and try to copy the mode, uid and gid from
+ ** that file. */
+ const char *z = sqlite3_uri_parameter(zPath, "modeof");
+ if( z ){
+ rc = getFileMode(z, pMode, pUid, pGid);
+ }
}
return rc;
}
@@ -32724,10 +36170,10 @@ static int unixOpen(
}else{
pUnused = sqlite3_malloc64(sizeof(*pUnused));
if( !pUnused ){
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
}
- p->pUnused = pUnused;
+ p->pPreallocatedUnused = pUnused;
/* Database filenames are double-zero terminated if they are not
** URIs with parameters. Hence, they can always be passed into
@@ -32764,7 +36210,7 @@ static int unixOpen(
gid_t gid; /* Groupid for the file */
rc = findCreateFileMode(zName, flags, &openMode, &uid, &gid);
if( rc!=SQLITE_OK ){
- assert( !p->pUnused );
+ assert( !p->pPreallocatedUnused );
assert( eType==SQLITE_OPEN_WAL || eType==SQLITE_OPEN_MAIN_JOURNAL );
return rc;
}
@@ -32798,9 +36244,9 @@ static int unixOpen(
*pOutFlags = flags;
}
- if( p->pUnused ){
- p->pUnused->fd = fd;
- p->pUnused->flags = flags;
+ if( p->pPreallocatedUnused ){
+ p->pPreallocatedUnused->fd = fd;
+ p->pPreallocatedUnused->flags = flags;
}
if( isDelete ){
@@ -32810,7 +36256,7 @@ static int unixOpen(
zPath = sqlite3_mprintf("%s", zName);
if( zPath==0 ){
robust_close(p, fd, __LINE__);
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
#else
osUnlink(zName);
@@ -32821,9 +36267,6 @@ static int unixOpen(
p->openFlags = openFlags;
}
#endif
-
- noLock = eType!=SQLITE_OPEN_MAIN_DB;
-
#if defined(__APPLE__) || SQLITE_ENABLE_LOCKING_STYLE
if( fstatfs(fd, &fsInfo) == -1 ){
@@ -32842,6 +36285,7 @@ static int unixOpen(
/* Set up appropriate ctrlFlags */
if( isDelete ) ctrlFlags |= UNIXFILE_DELETE;
if( isReadonly ) ctrlFlags |= UNIXFILE_RDONLY;
+ noLock = eType!=SQLITE_OPEN_MAIN_DB;
if( noLock ) ctrlFlags |= UNIXFILE_NOLOCK;
if( syncDir ) ctrlFlags |= UNIXFILE_DIRSYNC;
if( flags & SQLITE_OPEN_URI ) ctrlFlags |= UNIXFILE_URI;
@@ -32879,11 +36323,14 @@ static int unixOpen(
}
#endif
+ assert( zPath==0 || zPath[0]=='/'
+ || eType==SQLITE_OPEN_MASTER_JOURNAL || eType==SQLITE_OPEN_MAIN_JOURNAL
+ );
rc = fillInUnixFile(pVfs, fd, pFile, zPath, ctrlFlags);
open_finished:
if( rc!=SQLITE_OK ){
- sqlite3_free(p->pUnused);
+ sqlite3_free(p->pPreallocatedUnused);
}
return rc;
}
@@ -32918,12 +36365,7 @@ static int unixDelete(
int fd;
rc = osOpenDirectory(zPath, &fd);
if( rc==SQLITE_OK ){
-#if OS_VXWORKS
- if( fsync(fd)==-1 )
-#else
- if( fsync(fd) )
-#endif
- {
+ if( full_fsync(fd,0,0) ){
rc = unixLogError(SQLITE_IOERR_DIR_FSYNC, "fsync", zPath);
}
robust_close(0, fd, __LINE__);
@@ -32969,6 +36411,32 @@ static int unixAccess(
return SQLITE_OK;
}
+/*
+**
+*/
+static int mkFullPathname(
+ const char *zPath, /* Input path */
+ char *zOut, /* Output buffer */
+ int nOut /* Allocated size of buffer zOut */
+){
+ int nPath = sqlite3Strlen30(zPath);
+ int iOff = 0;
+ if( zPath[0]!='/' ){
+ if( osGetcwd(zOut, nOut-2)==0 ){
+ return unixLogError(SQLITE_CANTOPEN_BKPT, "getcwd", zPath);
+ }
+ iOff = sqlite3Strlen30(zOut);
+ zOut[iOff++] = '/';
+ }
+ if( (iOff+nPath+1)>nOut ){
+ /* SQLite assumes that xFullPathname() nul-terminates the output buffer
+ ** even if it returns an error. */
+ zOut[iOff] = '\0';
+ return SQLITE_CANTOPEN_BKPT;
+ }
+ sqlite3_snprintf(nOut-iOff, &zOut[iOff], "%s", zPath);
+ return SQLITE_OK;
+}
/*
** Turn a relative pathname into a full pathname. The relative path
@@ -32985,7 +36453,17 @@ static int unixFullPathname(
int nOut, /* Size of output buffer in bytes */
char *zOut /* Output buffer */
){
+#if !defined(HAVE_READLINK) || !defined(HAVE_LSTAT)
+ return mkFullPathname(zPath, zOut, nOut);
+#else
+ int rc = SQLITE_OK;
int nByte;
+ int nLink = 1; /* Number of symbolic links followed so far */
+ const char *zIn = zPath; /* Input path for each iteration of loop */
+ char *zDel = 0;
+
+ assert( pVfs->mxPathname==MAX_PATHNAME );
+ UNUSED_PARAMETER(pVfs);
/* It's odd to simulate an io-error here, but really this is just
** using the io-error infrastructure to test that SQLite handles this
@@ -32994,58 +36472,62 @@ static int unixFullPathname(
*/
SimulateIOError( return SQLITE_ERROR );
- assert( pVfs->mxPathname==MAX_PATHNAME );
- UNUSED_PARAMETER(pVfs);
+ do {
- /* Attempt to resolve the path as if it were a symbolic link. If it is
- ** a symbolic link, the resolved path is stored in buffer zOut[]. Or, if
- ** the identified file is not a symbolic link or does not exist, then
- ** zPath is copied directly into zOut. Either way, nByte is left set to
- ** the size of the string copied into zOut[] in bytes. */
- nByte = osReadlink(zPath, zOut, nOut-1);
- if( nByte<0 ){
- if( errno!=EINVAL && errno!=ENOENT ){
- return unixLogError(SQLITE_CANTOPEN_BKPT, "readlink", zPath);
+ /* Call stat() on path zIn. Set bLink to true if the path is a symbolic
+ ** link, or false otherwise. */
+ int bLink = 0;
+ struct stat buf;
+ if( osLstat(zIn, &buf)!=0 ){
+ if( errno!=ENOENT ){
+ rc = unixLogError(SQLITE_CANTOPEN_BKPT, "lstat", zIn);
+ }
+ }else{
+ bLink = S_ISLNK(buf.st_mode);
}
- sqlite3_snprintf(nOut, zOut, "%s", zPath);
- nByte = sqlite3Strlen30(zOut);
- }else{
- zOut[nByte] = '\0';
- }
- /* If buffer zOut[] now contains an absolute path there is nothing more
- ** to do. If it contains a relative path, do the following:
- **
- ** * move the relative path string so that it is at the end of th
- ** zOut[] buffer.
- ** * Call getcwd() to read the path of the current working directory
- ** into the start of the zOut[] buffer.
- ** * Append a '/' character to the cwd string and move the
- ** relative path back within the buffer so that it immediately
- ** follows the '/'.
- **
- ** This code is written so that if the combination of the CWD and relative
- ** path are larger than the allocated size of zOut[] the CWD is silently
- ** truncated to make it fit. This is Ok, as SQLite refuses to open any
- ** file for which this function returns a full path larger than (nOut-8)
- ** bytes in size. */
- testcase( nByte==nOut-5 );
- testcase( nByte==nOut-4 );
- if( zOut[0]!='/' && nByteSQLITE_MAX_SYMLINKS ){
+ rc = SQLITE_CANTOPEN_BKPT;
+ }
+
+ if( rc==SQLITE_OK ){
+ nByte = osReadlink(zIn, zDel, nOut-1);
+ if( nByte<0 ){
+ rc = unixLogError(SQLITE_CANTOPEN_BKPT, "readlink", zIn);
+ }else{
+ if( zDel[0]!='/' ){
+ int n;
+ for(n = sqlite3Strlen30(zIn); n>0 && zIn[n-1]!='/'; n--);
+ if( nByte+n+1>nOut ){
+ rc = SQLITE_CANTOPEN_BKPT;
+ }else{
+ memmove(&zDel[n], zDel, nByte+1);
+ memcpy(zDel, zIn, n);
+ nByte += n;
+ }
+ }
+ zDel[nByte] = '\0';
+ }
+ }
+
+ zIn = zDel;
}
- nCwd = sqlite3Strlen30(zOut);
- assert( nCwd<=nRem-1 );
- zOut[nCwd] = '/';
- memmove(&zOut[nCwd+1], &zOut[nRem], nByte+1);
- }
- return SQLITE_OK;
+ assert( rc!=SQLITE_OK || zIn!=zOut || zIn[0]=='/' );
+ if( rc==SQLITE_OK && zIn!=zOut ){
+ rc = mkFullPathname(zIn, zOut, nOut);
+ }
+ if( bLink==0 ) break;
+ zIn = zOut;
+ }while( rc==SQLITE_OK );
+
+ sqlite3_free(zDel);
+ return rc;
+#endif /* HAVE_READLINK && HAVE_LSTAT */
}
@@ -33227,7 +36709,7 @@ static int unixCurrentTimeInt64(sqlite3_vfs *NotUsed, sqlite3_int64 *piNow){
return rc;
}
-#if 0 /* Not used */
+#ifndef SQLITE_OMIT_DEPRECATED
/*
** Find the current time (in Universal Coordinated Time). Write the
** current time and date as a Julian Day number into *prNow and
@@ -33245,23 +36727,18 @@ static int unixCurrentTime(sqlite3_vfs *NotUsed, double *prNow){
# define unixCurrentTime 0
#endif
-#if 0 /* Not used */
/*
-** We added the xGetLastError() method with the intention of providing
-** better low-level error messages when operating-system problems come up
-** during SQLite operation. But so far, none of that has been implemented
-** in the core. So this routine is never called. For now, it is merely
-** a place-holder.
+** The xGetLastError() method is designed to return a better
+** low-level error message when operating-system problems come up
+** during SQLite operation. Only the integer return code is currently
+** used.
*/
static int unixGetLastError(sqlite3_vfs *NotUsed, int NotUsed2, char *NotUsed3){
UNUSED_PARAMETER(NotUsed);
UNUSED_PARAMETER(NotUsed2);
UNUSED_PARAMETER(NotUsed3);
- return 0;
+ return errno;
}
-#else
-# define unixGetLastError 0
-#endif
/*
@@ -33551,7 +37028,7 @@ static int proxyCreateUnixFile(
}else{
pUnused = sqlite3_malloc64(sizeof(*pUnused));
if( !pUnused ){
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
}
if( fd<0 ){
@@ -33584,7 +37061,7 @@ static int proxyCreateUnixFile(
pNew = (unixFile *)sqlite3_malloc64(sizeof(*pNew));
if( pNew==NULL ){
- rc = SQLITE_NOMEM;
+ rc = SQLITE_NOMEM_BKPT;
goto end_create_proxy;
}
memset(pNew, 0, sizeof(unixFile));
@@ -33594,7 +37071,7 @@ static int proxyCreateUnixFile(
dummyVfs.zName = "dummy";
pUnused->fd = fd;
pUnused->flags = openFlags;
- pNew->pUnused = pUnused;
+ pNew->pPreallocatedUnused = pUnused;
rc = fillInUnixFile(&dummyVfs, fd, (sqlite3_file*)pNew, path, 0);
if( rc==SQLITE_OK ){
@@ -33927,7 +37404,7 @@ static int proxyTakeConch(unixFile *pFile){
writeSize = PROXY_PATHINDEX + strlen(&writeBuffer[PROXY_PATHINDEX]);
robust_ftruncate(conchFile->h, writeSize);
rc = unixWrite((sqlite3_file *)conchFile, writeBuffer, writeSize, 0);
- fsync(conchFile->h);
+ full_fsync(conchFile->h,0,0);
/* If we created a new conch file (not just updated the contents of a
** valid conch file), try to match the permissions of the database
*/
@@ -33997,7 +37474,7 @@ static int proxyTakeConch(unixFile *pFile){
if( tempLockPath ){
pCtx->lockProxyPath = sqlite3DbStrDup(0, tempLockPath);
if( !pCtx->lockProxyPath ){
- rc = SQLITE_NOMEM;
+ rc = SQLITE_NOMEM_BKPT;
}
}
}
@@ -34062,7 +37539,7 @@ static int proxyCreateConchPathname(char *dbPath, char **pConchPath){
** the name of the original database file. */
*pConchPath = conchPath = (char *)sqlite3_malloc64(len + 8);
if( conchPath==0 ){
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
memcpy(conchPath, dbPath, len+1);
@@ -34178,7 +37655,7 @@ static int proxyTransformUnixFile(unixFile *pFile, const char *path) {
pCtx = sqlite3_malloc64( sizeof(*pCtx) );
if( pCtx==0 ){
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
memset(pCtx, 0, sizeof(*pCtx));
@@ -34214,7 +37691,7 @@ static int proxyTransformUnixFile(unixFile *pFile, const char *path) {
if( rc==SQLITE_OK ){
pCtx->dbPath = sqlite3DbStrDup(0, dbPath);
if( pCtx->dbPath==NULL ){
- rc = SQLITE_NOMEM;
+ rc = SQLITE_NOMEM_BKPT;
}
}
if( rc==SQLITE_OK ){
@@ -34461,7 +37938,7 @@ static int proxyClose(sqlite3_file *id) {
** necessarily been initialized when this routine is called, and so they
** should not be used.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){
+SQLITE_API int sqlite3_os_init(void){
/*
** The following macro defines an initializer for an sqlite3_vfs object.
** The name of the VFS is NAME. The pAppData is a pointer to a pointer
@@ -34544,7 +38021,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){
/* Double-check that the aSyscall[] array has been constructed
** correctly. See ticket [bb3a86e890c8e96ab] */
- assert( ArraySize(aSyscall)==27 );
+ assert( ArraySize(aSyscall)==29 );
/* Register all VFSes defined in the aVfs[] array */
for(i=0; i<(sizeof(aVfs)/sizeof(sqlite3_vfs)); i++){
@@ -34560,7 +38037,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){
** to release dynamically allocated objects. But not on unix.
** This routine is a no-op for unix.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){
+SQLITE_API int sqlite3_os_end(void){
return SQLITE_OK;
}
@@ -34627,8 +38104,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){
*/
#ifdef SQLITE_PERFORMANCE_TRACE
-/*
-** hwtime.h contains inline assembler code for implementing
+/*
+** hwtime.h contains inline assembler code for implementing
** high-performance timing routines.
*/
/************** Include hwtime.h in the middle of os_common.h ****************/
@@ -34648,8 +38125,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){
** This file contains inline asm code for retrieving "high-performance"
** counters for x86 class CPUs.
*/
-#ifndef _HWTIME_H_
-#define _HWTIME_H_
+#ifndef SQLITE_HWTIME_H
+#define SQLITE_HWTIME_H
/*
** The following routine only works on pentium-class (or newer) processors.
@@ -34717,7 +38194,7 @@ SQLITE_PRIVATE sqlite_uint64 sqlite3Hwtime(void){ return ((sqlite_uint64)0); }
#endif
-#endif /* !defined(_HWTIME_H_) */
+#endif /* !defined(SQLITE_HWTIME_H) */
/************** End of hwtime.h **********************************************/
/************** Continuing where we left off in os_common.h ******************/
@@ -34738,14 +38215,14 @@ static sqlite_uint64 g_elapsed;
** of code will give us the ability to simulate a disk I/O error. This
** is used for testing the I/O recovery logic.
*/
-#ifdef SQLITE_TEST
-SQLITE_API int sqlite3_io_error_hit = 0; /* Total number of I/O Errors */
-SQLITE_API int sqlite3_io_error_hardhit = 0; /* Number of non-benign errors */
-SQLITE_API int sqlite3_io_error_pending = 0; /* Count down to first I/O error */
-SQLITE_API int sqlite3_io_error_persist = 0; /* True if I/O errors persist */
-SQLITE_API int sqlite3_io_error_benign = 0; /* True if errors are benign */
-SQLITE_API int sqlite3_diskfull_pending = 0;
-SQLITE_API int sqlite3_diskfull = 0;
+#if defined(SQLITE_TEST)
+SQLITE_API extern int sqlite3_io_error_hit;
+SQLITE_API extern int sqlite3_io_error_hardhit;
+SQLITE_API extern int sqlite3_io_error_pending;
+SQLITE_API extern int sqlite3_io_error_persist;
+SQLITE_API extern int sqlite3_io_error_benign;
+SQLITE_API extern int sqlite3_diskfull_pending;
+SQLITE_API extern int sqlite3_diskfull;
#define SimulateIOErrorBenign(X) sqlite3_io_error_benign=(X)
#define SimulateIOError(CODE) \
if( (sqlite3_io_error_persist && sqlite3_io_error_hit) \
@@ -34771,17 +38248,17 @@ static void local_ioerr(){
#define SimulateIOErrorBenign(X)
#define SimulateIOError(A)
#define SimulateDiskfullError(A)
-#endif
+#endif /* defined(SQLITE_TEST) */
/*
** When testing, keep a count of the number of open files.
*/
-#ifdef SQLITE_TEST
-SQLITE_API int sqlite3_open_file_count = 0;
+#if defined(SQLITE_TEST)
+SQLITE_API extern int sqlite3_open_file_count;
#define OpenCounter(X) sqlite3_open_file_count+=(X)
#else
#define OpenCounter(X)
-#endif
+#endif /* defined(SQLITE_TEST) */
#endif /* !defined(_OS_COMMON_H_) */
@@ -34844,6 +38321,10 @@ SQLITE_API int sqlite3_open_file_count = 0;
# define NTDDI_WINBLUE 0x06030000
#endif
+#ifndef NTDDI_WINTHRESHOLD
+# define NTDDI_WINTHRESHOLD 0x06040000
+#endif
+
/*
** Check to see if the GetVersionEx[AW] functions are deprecated on the
** target system. GetVersionEx was first deprecated in Win8.1.
@@ -34856,6 +38337,19 @@ SQLITE_API int sqlite3_open_file_count = 0;
# endif
#endif
+/*
+** Check to see if the CreateFileMappingA function is supported on the
+** target system. It is unavailable when using "mincore.lib" on Win10.
+** When compiling for Windows 10, always assume "mincore.lib" is in use.
+*/
+#ifndef SQLITE_WIN32_CREATEFILEMAPPINGA
+# if defined(NTDDI_VERSION) && NTDDI_VERSION >= NTDDI_WINTHRESHOLD
+# define SQLITE_WIN32_CREATEFILEMAPPINGA 0
+# else
+# define SQLITE_WIN32_CREATEFILEMAPPINGA 1
+# endif
+#endif
+
/*
** This constant should already be defined (in the "WinDef.h" SDK file).
*/
@@ -35041,6 +38535,17 @@ struct winFile {
#endif
};
+/*
+** The winVfsAppData structure is used for the pAppData member for all of the
+** Win32 VFS variants.
+*/
+typedef struct winVfsAppData winVfsAppData;
+struct winVfsAppData {
+ const sqlite3_io_methods *pMethod; /* The file I/O methods to use. */
+ void *pAppData; /* The extra pAppData, if any. */
+ BOOL bNoLock; /* Non-zero if locking is disabled. */
+};
+
/*
** Allowed values for winFile.ctrlFlags
*/
@@ -35092,22 +38597,72 @@ struct winFile {
******************************************************************************
*/
#ifndef SQLITE_WIN32_HEAP_CREATE
-# define SQLITE_WIN32_HEAP_CREATE (TRUE)
+# define SQLITE_WIN32_HEAP_CREATE (TRUE)
+#endif
+
+/*
+ * This is the maximum possible initial size of the Win32-specific heap, in
+ * bytes.
+ */
+#ifndef SQLITE_WIN32_HEAP_MAX_INIT_SIZE
+# define SQLITE_WIN32_HEAP_MAX_INIT_SIZE (4294967295U)
+#endif
+
+/*
+ * This is the extra space for the initial size of the Win32-specific heap,
+ * in bytes. This value may be zero.
+ */
+#ifndef SQLITE_WIN32_HEAP_INIT_EXTRA
+# define SQLITE_WIN32_HEAP_INIT_EXTRA (4194304)
+#endif
+
+/*
+ * Calculate the maximum legal cache size, in pages, based on the maximum
+ * possible initial heap size and the default page size, setting aside the
+ * needed extra space.
+ */
+#ifndef SQLITE_WIN32_MAX_CACHE_SIZE
+# define SQLITE_WIN32_MAX_CACHE_SIZE (((SQLITE_WIN32_HEAP_MAX_INIT_SIZE) - \
+ (SQLITE_WIN32_HEAP_INIT_EXTRA)) / \
+ (SQLITE_DEFAULT_PAGE_SIZE))
+#endif
+
+/*
+ * This is cache size used in the calculation of the initial size of the
+ * Win32-specific heap. It cannot be negative.
+ */
+#ifndef SQLITE_WIN32_CACHE_SIZE
+# if SQLITE_DEFAULT_CACHE_SIZE>=0
+# define SQLITE_WIN32_CACHE_SIZE (SQLITE_DEFAULT_CACHE_SIZE)
+# else
+# define SQLITE_WIN32_CACHE_SIZE (-(SQLITE_DEFAULT_CACHE_SIZE))
+# endif
+#endif
+
+/*
+ * Make sure that the calculated cache size, in pages, cannot cause the
+ * initial size of the Win32-specific heap to exceed the maximum amount
+ * of memory that can be specified in the call to HeapCreate.
+ */
+#if SQLITE_WIN32_CACHE_SIZE>SQLITE_WIN32_MAX_CACHE_SIZE
+# undef SQLITE_WIN32_CACHE_SIZE
+# define SQLITE_WIN32_CACHE_SIZE (2000)
#endif
/*
* The initial size of the Win32-specific heap. This value may be zero.
*/
#ifndef SQLITE_WIN32_HEAP_INIT_SIZE
-# define SQLITE_WIN32_HEAP_INIT_SIZE ((SQLITE_DEFAULT_CACHE_SIZE) * \
- (SQLITE_DEFAULT_PAGE_SIZE) + 4194304)
+# define SQLITE_WIN32_HEAP_INIT_SIZE ((SQLITE_WIN32_CACHE_SIZE) * \
+ (SQLITE_DEFAULT_PAGE_SIZE) + \
+ (SQLITE_WIN32_HEAP_INIT_EXTRA))
#endif
/*
* The maximum size of the Win32-specific heap. This value may be zero.
*/
#ifndef SQLITE_WIN32_HEAP_MAX_SIZE
-# define SQLITE_WIN32_HEAP_MAX_SIZE (0)
+# define SQLITE_WIN32_HEAP_MAX_SIZE (0)
#endif
/*
@@ -35115,7 +38670,7 @@ struct winFile {
* zero for the default behavior.
*/
#ifndef SQLITE_WIN32_HEAP_FLAGS
-# define SQLITE_WIN32_HEAP_FLAGS (0)
+# define SQLITE_WIN32_HEAP_FLAGS (0)
#endif
@@ -35262,8 +38817,9 @@ static struct win_syscall {
#define osCreateFileW ((HANDLE(WINAPI*)(LPCWSTR,DWORD,DWORD, \
LPSECURITY_ATTRIBUTES,DWORD,DWORD,HANDLE))aSyscall[5].pCurrent)
-#if (!SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_ANSI) && \
- (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0))
+#if !SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_ANSI) && \
+ (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0) && \
+ SQLITE_WIN32_CREATEFILEMAPPINGA
{ "CreateFileMappingA", (SYSCALL)CreateFileMappingA, 0 },
#else
{ "CreateFileMappingA", (SYSCALL)0, 0 },
@@ -35493,8 +39049,7 @@ static struct win_syscall {
#define osGetTickCount ((DWORD(WINAPI*)(VOID))aSyscall[33].pCurrent)
-#if defined(SQLITE_WIN32_HAS_ANSI) && defined(SQLITE_WIN32_GETVERSIONEX) && \
- SQLITE_WIN32_GETVERSIONEX
+#if defined(SQLITE_WIN32_HAS_ANSI) && SQLITE_WIN32_GETVERSIONEX
{ "GetVersionExA", (SYSCALL)GetVersionExA, 0 },
#else
{ "GetVersionExA", (SYSCALL)0, 0 },
@@ -35504,7 +39059,7 @@ static struct win_syscall {
LPOSVERSIONINFOA))aSyscall[34].pCurrent)
#if !SQLITE_OS_WINRT && defined(SQLITE_WIN32_HAS_WIDE) && \
- defined(SQLITE_WIN32_GETVERSIONEX) && SQLITE_WIN32_GETVERSIONEX
+ SQLITE_WIN32_GETVERSIONEX
{ "GetVersionExW", (SYSCALL)GetVersionExW, 0 },
#else
{ "GetVersionExW", (SYSCALL)0, 0 },
@@ -35955,7 +39510,7 @@ static const char *winNextSystemCall(sqlite3_vfs *p, const char *zName){
** "pnLargest" argument, if non-zero, will be used to return the size of the
** largest committed free block in the heap, in bytes.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_win32_compact_heap(LPUINT pnLargest){
+SQLITE_API int sqlite3_win32_compact_heap(LPUINT pnLargest){
int rc = SQLITE_OK;
UINT nLargest = 0;
HANDLE hHeap;
@@ -35973,7 +39528,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_win32_compact_heap(LPUINT pnLargest){
if( lastErrno==NO_ERROR ){
sqlite3_log(SQLITE_NOMEM, "failed to HeapCompact (no space), heap=%p",
(void*)hHeap);
- rc = SQLITE_NOMEM;
+ rc = SQLITE_NOMEM_BKPT;
}else{
sqlite3_log(SQLITE_ERROR, "failed to HeapCompact (%lu), heap=%p",
osGetLastError(), (void*)hHeap);
@@ -35995,12 +39550,12 @@ SQLITE_API int SQLITE_STDCALL sqlite3_win32_compact_heap(LPUINT pnLargest){
** the sqlite3_memory_used() function does not return zero, SQLITE_BUSY will
** be returned and no changes will be made to the Win32 native heap.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_win32_reset_heap(){
+SQLITE_API int sqlite3_win32_reset_heap(){
int rc;
MUTEX_LOGIC( sqlite3_mutex *pMaster; ) /* The main static mutex */
MUTEX_LOGIC( sqlite3_mutex *pMem; ) /* The memsys static mutex */
- MUTEX_LOGIC( pMaster = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MASTER); )
- MUTEX_LOGIC( pMem = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MEM); )
+ MUTEX_LOGIC( pMaster = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); )
+ MUTEX_LOGIC( pMem = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM); )
sqlite3_mutex_enter(pMaster);
sqlite3_mutex_enter(pMem);
winMemAssertMagic();
@@ -36040,11 +39595,17 @@ SQLITE_API int SQLITE_STDCALL sqlite3_win32_reset_heap(){
** (if available).
*/
-SQLITE_API void SQLITE_STDCALL sqlite3_win32_write_debug(const char *zBuf, int nBuf){
+SQLITE_API void sqlite3_win32_write_debug(const char *zBuf, int nBuf){
char zDbgBuf[SQLITE_WIN32_DBG_BUF_SIZE];
int nMin = MIN(nBuf, (SQLITE_WIN32_DBG_BUF_SIZE - 1)); /* may be negative. */
if( nMin<-1 ) nMin = -1; /* all negative values become -1. */
assert( nMin==-1 || nMin==0 || nMin0 ){
memset(zDbgBuf, 0, SQLITE_WIN32_DBG_BUF_SIZE);
@@ -36080,7 +39641,7 @@ SQLITE_API void SQLITE_STDCALL sqlite3_win32_write_debug(const char *zBuf, int n
static HANDLE sleepObj = NULL;
#endif
-SQLITE_API void SQLITE_STDCALL sqlite3_win32_sleep(DWORD milliseconds){
+SQLITE_API void sqlite3_win32_sleep(DWORD milliseconds){
#if SQLITE_OS_WINRT
if ( sleepObj==NULL ){
sleepObj = osCreateEventExW(NULL, NULL, CREATE_EVENT_MANUAL_RESET,
@@ -36115,7 +39676,7 @@ SQLITE_PRIVATE DWORD sqlite3Win32Wait(HANDLE hObject){
** the LockFileEx() API.
*/
-#if !defined(SQLITE_WIN32_GETVERSIONEX) || !SQLITE_WIN32_GETVERSIONEX
+#if !SQLITE_WIN32_GETVERSIONEX
# define osIsNT() (1)
#elif SQLITE_OS_WINCE || SQLITE_OS_WINRT || !defined(SQLITE_WIN32_HAS_ANSI)
# define osIsNT() (1)
@@ -36129,14 +39690,14 @@ SQLITE_PRIVATE DWORD sqlite3Win32Wait(HANDLE hObject){
** This function determines if the machine is running a version of Windows
** based on the NT kernel.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_win32_is_nt(void){
+SQLITE_API int sqlite3_win32_is_nt(void){
#if SQLITE_OS_WINRT
/*
** NOTE: The WinRT sub-platform is always assumed to be based on the NT
** kernel.
*/
return 1;
-#elif defined(SQLITE_WIN32_GETVERSIONEX) && SQLITE_WIN32_GETVERSIONEX
+#elif SQLITE_WIN32_GETVERSIONEX
if( osInterlockedCompareExchange(&sqlite3_os_type, 0, 0)==0 ){
#if defined(SQLITE_WIN32_HAS_ANSI)
OSVERSIONINFOA sInfo;
@@ -36293,7 +39854,7 @@ static int winMemInit(void *pAppData){
"failed to HeapCreate (%lu), flags=%u, initSize=%lu, maxSize=%lu",
osGetLastError(), SQLITE_WIN32_HEAP_FLAGS, dwInitialSize,
dwMaximumSize);
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
pWinMemData->bOwned = TRUE;
assert( pWinMemData->bOwned );
@@ -36303,7 +39864,7 @@ static int winMemInit(void *pAppData){
if( !pWinMemData->hHeap ){
sqlite3_log(SQLITE_NOMEM,
"failed to GetProcessHeap (%lu)", osGetLastError());
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
pWinMemData->bOwned = FALSE;
assert( !pWinMemData->bOwned );
@@ -36370,147 +39931,244 @@ SQLITE_PRIVATE void sqlite3MemSetDefault(void){
#endif /* SQLITE_WIN32_MALLOC */
/*
-** Convert a UTF-8 string to Microsoft Unicode (UTF-16?).
+** Convert a UTF-8 string to Microsoft Unicode.
**
-** Space to hold the returned string is obtained from malloc.
+** Space to hold the returned string is obtained from sqlite3_malloc().
*/
-static LPWSTR winUtf8ToUnicode(const char *zFilename){
+static LPWSTR winUtf8ToUnicode(const char *zText){
int nChar;
- LPWSTR zWideFilename;
+ LPWSTR zWideText;
- nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1, NULL, 0);
+ nChar = osMultiByteToWideChar(CP_UTF8, 0, zText, -1, NULL, 0);
if( nChar==0 ){
return 0;
}
- zWideFilename = sqlite3MallocZero( nChar*sizeof(zWideFilename[0]) );
- if( zWideFilename==0 ){
+ zWideText = sqlite3MallocZero( nChar*sizeof(WCHAR) );
+ if( zWideText==0 ){
return 0;
}
- nChar = osMultiByteToWideChar(CP_UTF8, 0, zFilename, -1, zWideFilename,
+ nChar = osMultiByteToWideChar(CP_UTF8, 0, zText, -1, zWideText,
nChar);
if( nChar==0 ){
- sqlite3_free(zWideFilename);
- zWideFilename = 0;
+ sqlite3_free(zWideText);
+ zWideText = 0;
}
- return zWideFilename;
+ return zWideText;
}
/*
-** Convert Microsoft Unicode to UTF-8. Space to hold the returned string is
-** obtained from sqlite3_malloc().
+** Convert a Microsoft Unicode string to UTF-8.
+**
+** Space to hold the returned string is obtained from sqlite3_malloc().
*/
-static char *winUnicodeToUtf8(LPCWSTR zWideFilename){
+static char *winUnicodeToUtf8(LPCWSTR zWideText){
int nByte;
- char *zFilename;
+ char *zText;
- nByte = osWideCharToMultiByte(CP_UTF8, 0, zWideFilename, -1, 0, 0, 0, 0);
+ nByte = osWideCharToMultiByte(CP_UTF8, 0, zWideText, -1, 0, 0, 0, 0);
if( nByte == 0 ){
return 0;
}
- zFilename = sqlite3MallocZero( nByte );
- if( zFilename==0 ){
+ zText = sqlite3MallocZero( nByte );
+ if( zText==0 ){
return 0;
}
- nByte = osWideCharToMultiByte(CP_UTF8, 0, zWideFilename, -1, zFilename, nByte,
+ nByte = osWideCharToMultiByte(CP_UTF8, 0, zWideText, -1, zText, nByte,
0, 0);
if( nByte == 0 ){
- sqlite3_free(zFilename);
- zFilename = 0;
+ sqlite3_free(zText);
+ zText = 0;
}
- return zFilename;
+ return zText;
}
/*
-** Convert an ANSI string to Microsoft Unicode, based on the
-** current codepage settings for file apis.
+** Convert an ANSI string to Microsoft Unicode, using the ANSI or OEM
+** code page.
**
-** Space to hold the returned string is obtained
-** from sqlite3_malloc.
+** Space to hold the returned string is obtained from sqlite3_malloc().
*/
-static LPWSTR winMbcsToUnicode(const char *zFilename){
+static LPWSTR winMbcsToUnicode(const char *zText, int useAnsi){
int nByte;
- LPWSTR zMbcsFilename;
- int codepage = osAreFileApisANSI() ? CP_ACP : CP_OEMCP;
+ LPWSTR zMbcsText;
+ int codepage = useAnsi ? CP_ACP : CP_OEMCP;
- nByte = osMultiByteToWideChar(codepage, 0, zFilename, -1, NULL,
+ nByte = osMultiByteToWideChar(codepage, 0, zText, -1, NULL,
0)*sizeof(WCHAR);
if( nByte==0 ){
return 0;
}
- zMbcsFilename = sqlite3MallocZero( nByte*sizeof(zMbcsFilename[0]) );
- if( zMbcsFilename==0 ){
+ zMbcsText = sqlite3MallocZero( nByte*sizeof(WCHAR) );
+ if( zMbcsText==0 ){
return 0;
}
- nByte = osMultiByteToWideChar(codepage, 0, zFilename, -1, zMbcsFilename,
+ nByte = osMultiByteToWideChar(codepage, 0, zText, -1, zMbcsText,
nByte);
if( nByte==0 ){
- sqlite3_free(zMbcsFilename);
- zMbcsFilename = 0;
+ sqlite3_free(zMbcsText);
+ zMbcsText = 0;
}
- return zMbcsFilename;
+ return zMbcsText;
}
/*
-** Convert Microsoft Unicode to multi-byte character string, based on the
-** user's ANSI codepage.
+** Convert a Microsoft Unicode string to a multi-byte character string,
+** using the ANSI or OEM code page.
**
-** Space to hold the returned string is obtained from
-** sqlite3_malloc().
+** Space to hold the returned string is obtained from sqlite3_malloc().
*/
-static char *winUnicodeToMbcs(LPCWSTR zWideFilename){
+static char *winUnicodeToMbcs(LPCWSTR zWideText, int useAnsi){
int nByte;
- char *zFilename;
- int codepage = osAreFileApisANSI() ? CP_ACP : CP_OEMCP;
+ char *zText;
+ int codepage = useAnsi ? CP_ACP : CP_OEMCP;
- nByte = osWideCharToMultiByte(codepage, 0, zWideFilename, -1, 0, 0, 0, 0);
+ nByte = osWideCharToMultiByte(codepage, 0, zWideText, -1, 0, 0, 0, 0);
if( nByte == 0 ){
return 0;
}
- zFilename = sqlite3MallocZero( nByte );
- if( zFilename==0 ){
+ zText = sqlite3MallocZero( nByte );
+ if( zText==0 ){
return 0;
}
- nByte = osWideCharToMultiByte(codepage, 0, zWideFilename, -1, zFilename,
+ nByte = osWideCharToMultiByte(codepage, 0, zWideText, -1, zText,
nByte, 0, 0);
if( nByte == 0 ){
- sqlite3_free(zFilename);
- zFilename = 0;
+ sqlite3_free(zText);
+ zText = 0;
}
- return zFilename;
+ return zText;
}
/*
-** Convert multibyte character string to UTF-8. Space to hold the
-** returned string is obtained from sqlite3_malloc().
+** Convert a multi-byte character string to UTF-8.
+**
+** Space to hold the returned string is obtained from sqlite3_malloc().
*/
-SQLITE_API char *SQLITE_STDCALL sqlite3_win32_mbcs_to_utf8(const char *zFilename){
- char *zFilenameUtf8;
+static char *winMbcsToUtf8(const char *zText, int useAnsi){
+ char *zTextUtf8;
LPWSTR zTmpWide;
- zTmpWide = winMbcsToUnicode(zFilename);
+ zTmpWide = winMbcsToUnicode(zText, useAnsi);
if( zTmpWide==0 ){
return 0;
}
- zFilenameUtf8 = winUnicodeToUtf8(zTmpWide);
+ zTextUtf8 = winUnicodeToUtf8(zTmpWide);
sqlite3_free(zTmpWide);
- return zFilenameUtf8;
+ return zTextUtf8;
}
/*
-** Convert UTF-8 to multibyte character string. Space to hold the
-** returned string is obtained from sqlite3_malloc().
+** Convert a UTF-8 string to a multi-byte character string.
+**
+** Space to hold the returned string is obtained from sqlite3_malloc().
*/
-SQLITE_API char *SQLITE_STDCALL sqlite3_win32_utf8_to_mbcs(const char *zFilename){
- char *zFilenameMbcs;
+static char *winUtf8ToMbcs(const char *zText, int useAnsi){
+ char *zTextMbcs;
LPWSTR zTmpWide;
- zTmpWide = winUtf8ToUnicode(zFilename);
+ zTmpWide = winUtf8ToUnicode(zText);
if( zTmpWide==0 ){
return 0;
}
- zFilenameMbcs = winUnicodeToMbcs(zTmpWide);
+ zTextMbcs = winUnicodeToMbcs(zTmpWide, useAnsi);
sqlite3_free(zTmpWide);
- return zFilenameMbcs;
+ return zTextMbcs;
+}
+
+/*
+** This is a public wrapper for the winUtf8ToUnicode() function.
+*/
+SQLITE_API LPWSTR sqlite3_win32_utf8_to_unicode(const char *zText){
+#ifdef SQLITE_ENABLE_API_ARMOR
+ if( !zText ){
+ (void)SQLITE_MISUSE_BKPT;
+ return 0;
+ }
+#endif
+#ifndef SQLITE_OMIT_AUTOINIT
+ if( sqlite3_initialize() ) return 0;
+#endif
+ return winUtf8ToUnicode(zText);
+}
+
+/*
+** This is a public wrapper for the winUnicodeToUtf8() function.
+*/
+SQLITE_API char *sqlite3_win32_unicode_to_utf8(LPCWSTR zWideText){
+#ifdef SQLITE_ENABLE_API_ARMOR
+ if( !zWideText ){
+ (void)SQLITE_MISUSE_BKPT;
+ return 0;
+ }
+#endif
+#ifndef SQLITE_OMIT_AUTOINIT
+ if( sqlite3_initialize() ) return 0;
+#endif
+ return winUnicodeToUtf8(zWideText);
+}
+
+/*
+** This is a public wrapper for the winMbcsToUtf8() function.
+*/
+SQLITE_API char *sqlite3_win32_mbcs_to_utf8(const char *zText){
+#ifdef SQLITE_ENABLE_API_ARMOR
+ if( !zText ){
+ (void)SQLITE_MISUSE_BKPT;
+ return 0;
+ }
+#endif
+#ifndef SQLITE_OMIT_AUTOINIT
+ if( sqlite3_initialize() ) return 0;
+#endif
+ return winMbcsToUtf8(zText, osAreFileApisANSI());
+}
+
+/*
+** This is a public wrapper for the winMbcsToUtf8() function.
+*/
+SQLITE_API char *sqlite3_win32_mbcs_to_utf8_v2(const char *zText, int useAnsi){
+#ifdef SQLITE_ENABLE_API_ARMOR
+ if( !zText ){
+ (void)SQLITE_MISUSE_BKPT;
+ return 0;
+ }
+#endif
+#ifndef SQLITE_OMIT_AUTOINIT
+ if( sqlite3_initialize() ) return 0;
+#endif
+ return winMbcsToUtf8(zText, useAnsi);
+}
+
+/*
+** This is a public wrapper for the winUtf8ToMbcs() function.
+*/
+SQLITE_API char *sqlite3_win32_utf8_to_mbcs(const char *zText){
+#ifdef SQLITE_ENABLE_API_ARMOR
+ if( !zText ){
+ (void)SQLITE_MISUSE_BKPT;
+ return 0;
+ }
+#endif
+#ifndef SQLITE_OMIT_AUTOINIT
+ if( sqlite3_initialize() ) return 0;
+#endif
+ return winUtf8ToMbcs(zText, osAreFileApisANSI());
+}
+
+/*
+** This is a public wrapper for the winUtf8ToMbcs() function.
+*/
+SQLITE_API char *sqlite3_win32_utf8_to_mbcs_v2(const char *zText, int useAnsi){
+#ifdef SQLITE_ENABLE_API_ARMOR
+ if( !zText ){
+ (void)SQLITE_MISUSE_BKPT;
+ return 0;
+ }
+#endif
+#ifndef SQLITE_OMIT_AUTOINIT
+ if( sqlite3_initialize() ) return 0;
+#endif
+ return winUtf8ToMbcs(zText, useAnsi);
}
/*
@@ -36520,7 +40178,7 @@ SQLITE_API char *SQLITE_STDCALL sqlite3_win32_utf8_to_mbcs(const char *zFilename
** argument is the name of the directory to use. The return value will be
** SQLITE_OK if successful.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_win32_set_directory(DWORD type, LPCWSTR zValue){
+SQLITE_API int sqlite3_win32_set_directory(DWORD type, LPCWSTR zValue){
char **ppDirectory = 0;
#ifndef SQLITE_OMIT_AUTOINIT
int rc = sqlite3_initialize();
@@ -36540,7 +40198,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_win32_set_directory(DWORD type, LPCWSTR zV
if( zValue && zValue[0] ){
zValueUtf8 = winUnicodeToUtf8(zValue);
if ( zValueUtf8==0 ){
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
}
sqlite3_free(*ppDirectory);
@@ -36612,7 +40270,7 @@ static int winGetLastErrorMsg(DWORD lastErrno, int nBuf, char *zBuf){
if( dwLen > 0 ){
/* allocate a buffer and convert to UTF8 */
sqlite3BeginBenignMalloc();
- zOut = sqlite3_win32_mbcs_to_utf8(zTemp);
+ zOut = winMbcsToUtf8(zTemp, osAreFileApisANSI());
sqlite3EndBenignMalloc();
/* free the system buffer allocated by FormatMessage */
osLocalFree(zTemp);
@@ -36754,16 +40412,17 @@ static void winLogIoerr(int nRetry, int lineno){
}
}
-#if SQLITE_OS_WINCE
-/*************************************************************************
-** This section contains code for WinCE only.
-*/
-#if !defined(SQLITE_MSVC_LOCALTIME_API) || !SQLITE_MSVC_LOCALTIME_API
/*
-** The MSVC CRT on Windows CE may not have a localtime() function. So
-** create a substitute.
+** This #if does not rely on the SQLITE_OS_WINCE define because the
+** corresponding section in "date.c" cannot use it.
*/
-/* #include */
+#if !defined(SQLITE_OMIT_LOCALTIME) && defined(_WIN32_WCE) && \
+ (!defined(SQLITE_MSVC_LOCALTIME_API) || !SQLITE_MSVC_LOCALTIME_API)
+/*
+** The MSVC CRT on Windows CE may not have a localtime() function.
+** So define a substitute.
+*/
+/* # include */
struct tm *__cdecl localtime(const time_t *t)
{
static struct tm y;
@@ -36787,6 +40446,10 @@ struct tm *__cdecl localtime(const time_t *t)
}
#endif
+#if SQLITE_OS_WINCE
+/*************************************************************************
+** This section contains code for WinCE only.
+*/
#define HANDLE_TO_WINFILE(a) (winFile*)&((char*)a)[-(int)offsetof(winFile,h)]
/*
@@ -36817,7 +40480,7 @@ static int winceCreateLock(const char *zFilename, winFile *pFile){
zName = winUtf8ToUnicode(zFilename);
if( zName==0 ){
/* out of memory */
- return SQLITE_IOERR_NOMEM;
+ return SQLITE_IOERR_NOMEM_BKPT;
}
/* Initialize the local lockdata */
@@ -37242,7 +40905,12 @@ static int winClose(sqlite3_file *id){
}while( rc==0 && ++cnt < MX_CLOSE_ATTEMPT && (sqlite3_win32_sleep(100), 1) );
#if SQLITE_OS_WINCE
#define WINCE_DELETION_ATTEMPTS 3
- winceDestroyLock(pFile);
+ {
+ winVfsAppData *pAppData = (winVfsAppData*)pFile->pVfs->pAppData;
+ if( pAppData==NULL || !pAppData->bNoLock ){
+ winceDestroyLock(pFile);
+ }
+ }
if( pFile->zDeleteOnClose ){
int cnt = 0;
while(
@@ -37800,9 +41468,8 @@ static int winLock(sqlite3_file *id, int locktype){
** the PENDING_LOCK byte is temporary.
*/
newLocktype = pFile->locktype;
- if( (pFile->locktype==NO_LOCK)
- || ( (locktype==EXCLUSIVE_LOCK)
- && (pFile->locktype==RESERVED_LOCK))
+ if( pFile->locktype==NO_LOCK
+ || (locktype==EXCLUSIVE_LOCK && pFile->locktype<=RESERVED_LOCK)
){
int cnt = 3;
while( cnt-->0 && (res = winLockFile(&pFile->h, SQLITE_LOCKFILE_FLAGS,
@@ -37975,6 +41642,44 @@ static int winUnlock(sqlite3_file *id, int locktype){
return rc;
}
+/******************************************************************************
+****************************** No-op Locking **********************************
+**
+** Of the various locking implementations available, this is by far the
+** simplest: locking is ignored. No attempt is made to lock the database
+** file for reading or writing.
+**
+** This locking mode is appropriate for use on read-only databases
+** (ex: databases that are burned into CD-ROM, for example.) It can
+** also be used if the application employs some external mechanism to
+** prevent simultaneous access of the same database by two or more
+** database connections. But there is a serious risk of database
+** corruption if this locking mode is used in situations where multiple
+** database connections are accessing the same database file at the same
+** time and one or more of those connections are writing.
+*/
+
+static int winNolockLock(sqlite3_file *id, int locktype){
+ UNUSED_PARAMETER(id);
+ UNUSED_PARAMETER(locktype);
+ return SQLITE_OK;
+}
+
+static int winNolockCheckReservedLock(sqlite3_file *id, int *pResOut){
+ UNUSED_PARAMETER(id);
+ UNUSED_PARAMETER(pResOut);
+ return SQLITE_OK;
+}
+
+static int winNolockUnlock(sqlite3_file *id, int locktype){
+ UNUSED_PARAMETER(id);
+ UNUSED_PARAMETER(locktype);
+ return SQLITE_OK;
+}
+
+/******************* End of the no-op lock implementation *********************
+******************************************************************************/
+
/*
** If *pArg is initially negative then this is a query. Set *pArg to
** 1 or 0 depending on whether or not bit mask of pFile->ctrlFlags is set.
@@ -38008,7 +41713,7 @@ static int winFileControl(sqlite3_file *id, int op, void *pArg){
OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h));
return SQLITE_OK;
}
- case SQLITE_LAST_ERRNO: {
+ case SQLITE_FCNTL_LAST_ERRNO: {
*(int*)pArg = (int)pFile->lastErrno;
OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h));
return SQLITE_OK;
@@ -38066,6 +41771,12 @@ static int winFileControl(sqlite3_file *id, int op, void *pArg){
OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h));
return SQLITE_OK;
}
+ case SQLITE_FCNTL_WIN32_GET_HANDLE: {
+ LPHANDLE phFile = (LPHANDLE)pArg;
+ *phFile = pFile->h;
+ OSTRACE(("FCNTL file=%p, rc=SQLITE_OK\n", pFile->h));
+ return SQLITE_OK;
+ }
#ifdef SQLITE_TEST
case SQLITE_FCNTL_WIN32_SET_HANDLE: {
LPHANDLE phFile = (LPHANDLE)pArg;
@@ -38093,6 +41804,14 @@ static int winFileControl(sqlite3_file *id, int op, void *pArg){
if( newLimit>sqlite3GlobalConfig.mxMmap ){
newLimit = sqlite3GlobalConfig.mxMmap;
}
+
+ /* The value of newLimit may be eventually cast to (SIZE_T) and passed
+ ** to MapViewOfFile(). Restrict its value to 2GB if (SIZE_T) is not at
+ ** least a 64-bit type. */
+ if( newLimit>0 && sizeof(SIZE_T)<8 ){
+ newLimit = (newLimit & 0x7FFFFFFF);
+ }
+
*(i64*)pArg = pFile->mmapSizeMax;
if( newLimit>=0 && newLimit!=pFile->mmapSizeMax && pFile->nFetchOut==0 ){
pFile->mmapSizeMax = newLimit;
@@ -38253,12 +41972,12 @@ struct winShm {
/*
** Apply advisory locks for all n bytes beginning at ofst.
*/
-#define _SHM_UNLCK 1
-#define _SHM_RDLCK 2
-#define _SHM_WRLCK 3
+#define WINSHM_UNLCK 1
+#define WINSHM_RDLCK 2
+#define WINSHM_WRLCK 3
static int winShmSystemLock(
winShmNode *pFile, /* Apply locks to this open shared-memory segment */
- int lockType, /* _SHM_UNLCK, _SHM_RDLCK, or _SHM_WRLCK */
+ int lockType, /* WINSHM_UNLCK, WINSHM_RDLCK, or WINSHM_WRLCK */
int ofst, /* Offset to first byte to be locked/unlocked */
int nByte /* Number of bytes to lock or unlock */
){
@@ -38271,12 +41990,12 @@ static int winShmSystemLock(
pFile->hFile.h, lockType, ofst, nByte));
/* Release/Acquire the system-level lock */
- if( lockType==_SHM_UNLCK ){
+ if( lockType==WINSHM_UNLCK ){
rc = winUnlockFile(&pFile->hFile.h, ofst, 0, nByte, 0);
}else{
/* Initialize the locking parameters */
DWORD dwFlags = LOCKFILE_FAIL_IMMEDIATELY;
- if( lockType == _SHM_WRLCK ) dwFlags |= LOCKFILE_EXCLUSIVE_LOCK;
+ if( lockType == WINSHM_WRLCK ) dwFlags |= LOCKFILE_EXCLUSIVE_LOCK;
rc = winLockFile(&pFile->hFile.h, dwFlags, ofst, 0, nByte, 0);
}
@@ -38288,7 +42007,7 @@ static int winShmSystemLock(
}
OSTRACE(("SHM-LOCK file=%p, func=%s, errno=%lu, rc=%s\n",
- pFile->hFile.h, (lockType == _SHM_UNLCK) ? "winUnlockFile" :
+ pFile->hFile.h, (lockType == WINSHM_UNLCK) ? "winUnlockFile" :
"winLockFile", pFile->lastErrno, sqlite3ErrName(rc)));
return rc;
@@ -38366,12 +42085,12 @@ static int winOpenSharedMemory(winFile *pDbFd){
** allocate space for a new winShmNode and filename.
*/
p = sqlite3MallocZero( sizeof(*p) );
- if( p==0 ) return SQLITE_IOERR_NOMEM;
+ if( p==0 ) return SQLITE_IOERR_NOMEM_BKPT;
nName = sqlite3Strlen30(pDbFd->zPath);
pNew = sqlite3MallocZero( sizeof(*pShmNode) + nName + 17 );
if( pNew==0 ){
sqlite3_free(p);
- return SQLITE_IOERR_NOMEM;
+ return SQLITE_IOERR_NOMEM_BKPT;
}
pNew->zFilename = (char*)&pNew[1];
sqlite3_snprintf(nName+15, pNew->zFilename, "%s-shm", pDbFd->zPath);
@@ -38396,10 +42115,12 @@ static int winOpenSharedMemory(winFile *pDbFd){
pShmNode->pNext = winShmNodeList;
winShmNodeList = pShmNode;
- pShmNode->mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_FAST);
- if( pShmNode->mutex==0 ){
- rc = SQLITE_IOERR_NOMEM;
- goto shm_open_err;
+ if( sqlite3GlobalConfig.bCoreMutex ){
+ pShmNode->mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_FAST);
+ if( pShmNode->mutex==0 ){
+ rc = SQLITE_IOERR_NOMEM_BKPT;
+ goto shm_open_err;
+ }
}
rc = winOpen(pDbFd->pVfs,
@@ -38414,7 +42135,7 @@ static int winOpenSharedMemory(winFile *pDbFd){
/* Check to see if another process is holding the dead-man switch.
** If not, truncate the file to zero length.
*/
- if( winShmSystemLock(pShmNode, _SHM_WRLCK, WIN_SHM_DMS, 1)==SQLITE_OK ){
+ if( winShmSystemLock(pShmNode, WINSHM_WRLCK, WIN_SHM_DMS, 1)==SQLITE_OK ){
rc = winTruncate((sqlite3_file *)&pShmNode->hFile, 0);
if( rc!=SQLITE_OK ){
rc = winLogError(SQLITE_IOERR_SHMOPEN, osGetLastError(),
@@ -38422,8 +42143,8 @@ static int winOpenSharedMemory(winFile *pDbFd){
}
}
if( rc==SQLITE_OK ){
- winShmSystemLock(pShmNode, _SHM_UNLCK, WIN_SHM_DMS, 1);
- rc = winShmSystemLock(pShmNode, _SHM_RDLCK, WIN_SHM_DMS, 1);
+ winShmSystemLock(pShmNode, WINSHM_UNLCK, WIN_SHM_DMS, 1);
+ rc = winShmSystemLock(pShmNode, WINSHM_RDLCK, WIN_SHM_DMS, 1);
}
if( rc ) goto shm_open_err;
}
@@ -38452,7 +42173,7 @@ static int winOpenSharedMemory(winFile *pDbFd){
/* Jump here on any error */
shm_open_err:
- winShmSystemLock(pShmNode, _SHM_UNLCK, WIN_SHM_DMS, 1);
+ winShmSystemLock(pShmNode, WINSHM_UNLCK, WIN_SHM_DMS, 1);
winShmPurge(pDbFd->pVfs, 0); /* This call frees pShmNode if required */
sqlite3_free(p);
sqlite3_free(pNew);
@@ -38541,7 +42262,7 @@ static int winShmLock(
/* Unlock the system-level locks */
if( (mask & allMask)==0 ){
- rc = winShmSystemLock(pShmNode, _SHM_UNLCK, ofst+WIN_SHM_BASE, n);
+ rc = winShmSystemLock(pShmNode, WINSHM_UNLCK, ofst+WIN_SHM_BASE, n);
}else{
rc = SQLITE_OK;
}
@@ -38569,7 +42290,7 @@ static int winShmLock(
/* Get shared locks at the system level, if necessary */
if( rc==SQLITE_OK ){
if( (allShared & mask)==0 ){
- rc = winShmSystemLock(pShmNode, _SHM_RDLCK, ofst+WIN_SHM_BASE, n);
+ rc = winShmSystemLock(pShmNode, WINSHM_RDLCK, ofst+WIN_SHM_BASE, n);
}else{
rc = SQLITE_OK;
}
@@ -38594,7 +42315,7 @@ static int winShmLock(
** also mark the local connection as being locked.
*/
if( rc==SQLITE_OK ){
- rc = winShmSystemLock(pShmNode, _SHM_WRLCK, ofst+WIN_SHM_BASE, n);
+ rc = winShmSystemLock(pShmNode, WINSHM_WRLCK, ofst+WIN_SHM_BASE, n);
if( rc==SQLITE_OK ){
assert( (p->sharedMask & mask)==0 );
p->exclMask |= mask;
@@ -38703,7 +42424,7 @@ static int winShmMap(
pShmNode->aRegion, (iRegion+1)*sizeof(apNew[0])
);
if( !apNew ){
- rc = SQLITE_IOERR_NOMEM;
+ rc = SQLITE_IOERR_NOMEM_BKPT;
goto shmpage_out;
}
pShmNode->aRegion = apNew;
@@ -38720,7 +42441,7 @@ static int winShmMap(
hMap = osCreateFileMappingW(pShmNode->hFile.h,
NULL, PAGE_READWRITE, 0, nByte, NULL
);
-#elif defined(SQLITE_WIN32_HAS_ANSI)
+#elif defined(SQLITE_WIN32_HAS_ANSI) && SQLITE_WIN32_CREATEFILEMAPPINGA
hMap = osCreateFileMappingA(pShmNode->hFile.h,
NULL, PAGE_READWRITE, 0, nByte, NULL
);
@@ -38876,7 +42597,7 @@ static int winMapfile(winFile *pFd, sqlite3_int64 nByte){
pFd->hMap = osCreateFileMappingW(pFd->h, NULL, protect,
(DWORD)((nMap>>32) & 0xffffffff),
(DWORD)(nMap & 0xffffffff), NULL);
-#elif defined(SQLITE_WIN32_HAS_ANSI)
+#elif defined(SQLITE_WIN32_HAS_ANSI) && SQLITE_WIN32_CREATEFILEMAPPINGA
pFd->hMap = osCreateFileMappingA(pFd->h, NULL, protect,
(DWORD)((nMap>>32) & 0xffffffff),
(DWORD)(nMap & 0xffffffff), NULL);
@@ -39037,6 +42758,44 @@ static const sqlite3_io_methods winIoMethod = {
winUnfetch /* xUnfetch */
};
+/*
+** This vector defines all the methods that can operate on an
+** sqlite3_file for win32 without performing any locking.
+*/
+static const sqlite3_io_methods winIoNolockMethod = {
+ 3, /* iVersion */
+ winClose, /* xClose */
+ winRead, /* xRead */
+ winWrite, /* xWrite */
+ winTruncate, /* xTruncate */
+ winSync, /* xSync */
+ winFileSize, /* xFileSize */
+ winNolockLock, /* xLock */
+ winNolockUnlock, /* xUnlock */
+ winNolockCheckReservedLock, /* xCheckReservedLock */
+ winFileControl, /* xFileControl */
+ winSectorSize, /* xSectorSize */
+ winDeviceCharacteristics, /* xDeviceCharacteristics */
+ winShmMap, /* xShmMap */
+ winShmLock, /* xShmLock */
+ winShmBarrier, /* xShmBarrier */
+ winShmUnmap, /* xShmUnmap */
+ winFetch, /* xFetch */
+ winUnfetch /* xUnfetch */
+};
+
+static winVfsAppData winAppData = {
+ &winIoMethod, /* pMethod */
+ 0, /* pAppData */
+ 0 /* bNoLock */
+};
+
+static winVfsAppData winNolockAppData = {
+ &winIoNolockMethod, /* pMethod */
+ 0, /* pAppData */
+ 1 /* bNoLock */
+};
+
/****************************************************************************
**************************** sqlite3_vfs methods ****************************
**
@@ -39057,7 +42816,7 @@ static char *winConvertToUtf8Filename(const void *zFilename){
}
#ifdef SQLITE_WIN32_HAS_ANSI
else{
- zConverted = sqlite3_win32_mbcs_to_utf8(zFilename);
+ zConverted = winMbcsToUtf8(zFilename, osAreFileApisANSI());
}
#endif
/* caller will handle out of memory */
@@ -39078,7 +42837,7 @@ static void *winConvertFromUtf8Filename(const char *zFilename){
}
#ifdef SQLITE_WIN32_HAS_ANSI
else{
- zConverted = sqlite3_win32_utf8_to_mbcs(zFilename);
+ zConverted = winUtf8ToMbcs(zFilename, osAreFileApisANSI());
}
#endif
/* caller will handle out of memory */
@@ -39133,7 +42892,7 @@ static int winGetTempname(sqlite3_vfs *pVfs, char **pzBuf){
zBuf = sqlite3MallocZero( nBuf );
if( !zBuf ){
OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
- return SQLITE_IOERR_NOMEM;
+ return SQLITE_IOERR_NOMEM_BKPT;
}
/* Figure out the effective temporary directory. First, check if one
@@ -39191,7 +42950,7 @@ static int winGetTempname(sqlite3_vfs *pVfs, char **pzBuf){
if( !zConverted ){
sqlite3_free(zBuf);
OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
- return SQLITE_IOERR_NOMEM;
+ return SQLITE_IOERR_NOMEM_BKPT;
}
if( winIsDir(zConverted) ){
sqlite3_snprintf(nMax, zBuf, "%s", zDir);
@@ -39204,7 +42963,7 @@ static int winGetTempname(sqlite3_vfs *pVfs, char **pzBuf){
if( !zConverted ){
sqlite3_free(zBuf);
OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
- return SQLITE_IOERR_NOMEM;
+ return SQLITE_IOERR_NOMEM_BKPT;
}
if( cygwin_conv_path(
osIsNT() ? CCP_POSIX_TO_WIN_W : CCP_POSIX_TO_WIN_A, zDir,
@@ -39225,7 +42984,7 @@ static int winGetTempname(sqlite3_vfs *pVfs, char **pzBuf){
sqlite3_free(zConverted);
sqlite3_free(zBuf);
OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
- return SQLITE_IOERR_NOMEM;
+ return SQLITE_IOERR_NOMEM_BKPT;
}
sqlite3_snprintf(nMax, zBuf, "%s", zUtf8);
sqlite3_free(zUtf8);
@@ -39243,7 +43002,7 @@ static int winGetTempname(sqlite3_vfs *pVfs, char **pzBuf){
if( !zWidePath ){
sqlite3_free(zBuf);
OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
- return SQLITE_IOERR_NOMEM;
+ return SQLITE_IOERR_NOMEM_BKPT;
}
if( osGetTempPathW(nMax, zWidePath)==0 ){
sqlite3_free(zWidePath);
@@ -39261,7 +43020,7 @@ static int winGetTempname(sqlite3_vfs *pVfs, char **pzBuf){
sqlite3_free(zWidePath);
sqlite3_free(zBuf);
OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
- return SQLITE_IOERR_NOMEM;
+ return SQLITE_IOERR_NOMEM_BKPT;
}
}
#ifdef SQLITE_WIN32_HAS_ANSI
@@ -39271,7 +43030,7 @@ static int winGetTempname(sqlite3_vfs *pVfs, char **pzBuf){
if( !zMbcsPath ){
sqlite3_free(zBuf);
OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
- return SQLITE_IOERR_NOMEM;
+ return SQLITE_IOERR_NOMEM_BKPT;
}
if( osGetTempPathA(nMax, zMbcsPath)==0 ){
sqlite3_free(zBuf);
@@ -39279,14 +43038,14 @@ static int winGetTempname(sqlite3_vfs *pVfs, char **pzBuf){
return winLogError(SQLITE_IOERR_GETTEMPPATH, osGetLastError(),
"winGetTempname3", 0);
}
- zUtf8 = sqlite3_win32_mbcs_to_utf8(zMbcsPath);
+ zUtf8 = winMbcsToUtf8(zMbcsPath, osAreFileApisANSI());
if( zUtf8 ){
sqlite3_snprintf(nMax, zBuf, "%s", zUtf8);
sqlite3_free(zUtf8);
}else{
sqlite3_free(zBuf);
OSTRACE(("TEMP-FILENAME rc=SQLITE_IOERR_NOMEM\n"));
- return SQLITE_IOERR_NOMEM;
+ return SQLITE_IOERR_NOMEM_BKPT;
}
}
#endif /* SQLITE_WIN32_HAS_ANSI */
@@ -39365,11 +43124,19 @@ static int winIsDir(const void *zConverted){
return (attr!=INVALID_FILE_ATTRIBUTES) && (attr&FILE_ATTRIBUTE_DIRECTORY);
}
+/* forward reference */
+static int winAccess(
+ sqlite3_vfs *pVfs, /* Not used on win32 */
+ const char *zFilename, /* Name of file to check */
+ int flags, /* Type of test to make on this file */
+ int *pResOut /* OUT: Result */
+);
+
/*
** Open a file.
*/
static int winOpen(
- sqlite3_vfs *pVfs, /* Used to get maximum path name length */
+ sqlite3_vfs *pVfs, /* Used to get maximum path length and AppData */
const char *zName, /* Name of the file (UTF-8) */
sqlite3_file *id, /* Write the SQLite file handle here */
int flags, /* Open mode flags */
@@ -39384,6 +43151,7 @@ static int winOpen(
#if SQLITE_OS_WINCE
int isTemp = 0;
#endif
+ winVfsAppData *pAppData;
winFile *pFile = (winFile*)id;
void *zConverted; /* Filename in OS encoding */
const char *zUtf8Name = zName; /* Filename in UTF-8 encoding */
@@ -39478,7 +43246,7 @@ static int winOpen(
if( zConverted==0 ){
sqlite3_free(zTmpname);
OSTRACE(("OPEN name=%s, rc=SQLITE_IOERR_NOMEM", zUtf8Name));
- return SQLITE_IOERR_NOMEM;
+ return SQLITE_IOERR_NOMEM_BKPT;
}
if( winIsDir(zConverted) ){
@@ -39540,37 +43308,52 @@ static int winOpen(
extendedParameters.dwSecurityQosFlags = SECURITY_ANONYMOUS;
extendedParameters.lpSecurityAttributes = NULL;
extendedParameters.hTemplateFile = NULL;
- while( (h = osCreateFile2((LPCWSTR)zConverted,
- dwDesiredAccess,
- dwShareMode,
- dwCreationDisposition,
- &extendedParameters))==INVALID_HANDLE_VALUE &&
- winRetryIoerr(&cnt, &lastErrno) ){
- /* Noop */
- }
+ do{
+ h = osCreateFile2((LPCWSTR)zConverted,
+ dwDesiredAccess,
+ dwShareMode,
+ dwCreationDisposition,
+ &extendedParameters);
+ if( h!=INVALID_HANDLE_VALUE ) break;
+ if( isReadWrite ){
+ int isRO = 0;
+ int rc2 = winAccess(pVfs, zName, SQLITE_ACCESS_READ, &isRO);
+ if( rc2==SQLITE_OK && isRO ) break;
+ }
+ }while( winRetryIoerr(&cnt, &lastErrno) );
#else
- while( (h = osCreateFileW((LPCWSTR)zConverted,
- dwDesiredAccess,
- dwShareMode, NULL,
- dwCreationDisposition,
- dwFlagsAndAttributes,
- NULL))==INVALID_HANDLE_VALUE &&
- winRetryIoerr(&cnt, &lastErrno) ){
- /* Noop */
- }
+ do{
+ h = osCreateFileW((LPCWSTR)zConverted,
+ dwDesiredAccess,
+ dwShareMode, NULL,
+ dwCreationDisposition,
+ dwFlagsAndAttributes,
+ NULL);
+ if( h!=INVALID_HANDLE_VALUE ) break;
+ if( isReadWrite ){
+ int isRO = 0;
+ int rc2 = winAccess(pVfs, zName, SQLITE_ACCESS_READ, &isRO);
+ if( rc2==SQLITE_OK && isRO ) break;
+ }
+ }while( winRetryIoerr(&cnt, &lastErrno) );
#endif
}
#ifdef SQLITE_WIN32_HAS_ANSI
else{
- while( (h = osCreateFileA((LPCSTR)zConverted,
- dwDesiredAccess,
- dwShareMode, NULL,
- dwCreationDisposition,
- dwFlagsAndAttributes,
- NULL))==INVALID_HANDLE_VALUE &&
- winRetryIoerr(&cnt, &lastErrno) ){
- /* Noop */
- }
+ do{
+ h = osCreateFileA((LPCSTR)zConverted,
+ dwDesiredAccess,
+ dwShareMode, NULL,
+ dwCreationDisposition,
+ dwFlagsAndAttributes,
+ NULL);
+ if( h!=INVALID_HANDLE_VALUE ) break;
+ if( isReadWrite ){
+ int isRO = 0;
+ int rc2 = winAccess(pVfs, zName, SQLITE_ACCESS_READ, &isRO);
+ if( rc2==SQLITE_OK && isRO ) break;
+ }
+ }while( winRetryIoerr(&cnt, &lastErrno) );
}
#endif
winLogIoerr(cnt, __LINE__);
@@ -39579,8 +43362,6 @@ static int winOpen(
dwDesiredAccess, (h==INVALID_HANDLE_VALUE) ? "failed" : "ok"));
if( h==INVALID_HANDLE_VALUE ){
- pFile->lastErrno = lastErrno;
- winLogError(SQLITE_CANTOPEN, pFile->lastErrno, "winOpen", zUtf8Name);
sqlite3_free(zConverted);
sqlite3_free(zTmpname);
if( isReadWrite && !isExclusive ){
@@ -39589,6 +43370,8 @@ static int winOpen(
~(SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE)),
pOutFlags);
}else{
+ pFile->lastErrno = lastErrno;
+ winLogError(SQLITE_CANTOPEN, pFile->lastErrno, "winOpen", zUtf8Name);
return SQLITE_CANTOPEN_BKPT;
}
}
@@ -39605,15 +43388,20 @@ static int winOpen(
"rc=%s\n", h, zUtf8Name, dwDesiredAccess, pOutFlags, pOutFlags ?
*pOutFlags : 0, (h==INVALID_HANDLE_VALUE) ? "failed" : "ok"));
+ pAppData = (winVfsAppData*)pVfs->pAppData;
+
#if SQLITE_OS_WINCE
- if( isReadWrite && eType==SQLITE_OPEN_MAIN_DB
- && (rc = winceCreateLock(zName, pFile))!=SQLITE_OK
- ){
- osCloseHandle(h);
- sqlite3_free(zConverted);
- sqlite3_free(zTmpname);
- OSTRACE(("OPEN-CE-LOCK name=%s, rc=%s\n", zName, sqlite3ErrName(rc)));
- return rc;
+ {
+ if( isReadWrite && eType==SQLITE_OPEN_MAIN_DB
+ && ((pAppData==NULL) || !pAppData->bNoLock)
+ && (rc = winceCreateLock(zName, pFile))!=SQLITE_OK
+ ){
+ osCloseHandle(h);
+ sqlite3_free(zConverted);
+ sqlite3_free(zTmpname);
+ OSTRACE(("OPEN-CE-LOCK name=%s, rc=%s\n", zName, sqlite3ErrName(rc)));
+ return rc;
+ }
}
if( isTemp ){
pFile->zDeleteOnClose = zConverted;
@@ -39624,7 +43412,7 @@ static int winOpen(
}
sqlite3_free(zTmpname);
- pFile->pMethod = &winIoMethod;
+ pFile->pMethod = pAppData ? pAppData->pMethod : &winIoMethod;
pFile->pVfs = pVfs;
pFile->h = h;
if( isReadonly ){
@@ -39678,7 +43466,7 @@ static int winDelete(
zConverted = winConvertFromUtf8Filename(zFilename);
if( zConverted==0 ){
OSTRACE(("DELETE name=%s, rc=SQLITE_IOERR_NOMEM\n", zFilename));
- return SQLITE_IOERR_NOMEM;
+ return SQLITE_IOERR_NOMEM_BKPT;
}
if( osIsNT() ){
do {
@@ -39786,7 +43574,7 @@ static int winAccess(
zConverted = winConvertFromUtf8Filename(zFilename);
if( zConverted==0 ){
OSTRACE(("ACCESS name=%s, rc=SQLITE_IOERR_NOMEM\n", zFilename));
- return SQLITE_IOERR_NOMEM;
+ return SQLITE_IOERR_NOMEM_BKPT;
}
if( osIsNT() ){
int cnt = 0;
@@ -39899,6 +43687,18 @@ static int winFullPathname(
int nFull, /* Size of output buffer in bytes */
char *zFull /* Output buffer */
){
+#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && !defined(__CYGWIN__)
+ DWORD nByte;
+ void *zConverted;
+ char *zOut;
+#endif
+
+ /* If this path name begins with "/X:", where "X" is any alphabetic
+ ** character, discard the initial "/" from the pathname.
+ */
+ if( zRelative[0]=='/' && winIsDriveLetterAndColon(zRelative+1) ){
+ zRelative++;
+ }
#if defined(__CYGWIN__)
SimulateIOError( return SQLITE_ERROR );
@@ -39913,7 +43713,7 @@ static int winFullPathname(
*/
char *zOut = sqlite3MallocZero( pVfs->mxPathname+1 );
if( !zOut ){
- return SQLITE_IOERR_NOMEM;
+ return SQLITE_IOERR_NOMEM_BKPT;
}
if( cygwin_conv_path(
(osIsNT() ? CCP_POSIX_TO_WIN_W : CCP_POSIX_TO_WIN_A) |
@@ -39925,7 +43725,7 @@ static int winFullPathname(
char *zUtf8 = winConvertToUtf8Filename(zOut);
if( !zUtf8 ){
sqlite3_free(zOut);
- return SQLITE_IOERR_NOMEM;
+ return SQLITE_IOERR_NOMEM_BKPT;
}
sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s%c%s",
sqlite3_data_directory, winGetDirSep(), zUtf8);
@@ -39935,7 +43735,7 @@ static int winFullPathname(
}else{
char *zOut = sqlite3MallocZero( pVfs->mxPathname+1 );
if( !zOut ){
- return SQLITE_IOERR_NOMEM;
+ return SQLITE_IOERR_NOMEM_BKPT;
}
if( cygwin_conv_path(
(osIsNT() ? CCP_POSIX_TO_WIN_W : CCP_POSIX_TO_WIN_A),
@@ -39947,7 +43747,7 @@ static int winFullPathname(
char *zUtf8 = winConvertToUtf8Filename(zOut);
if( !zUtf8 ){
sqlite3_free(zOut);
- return SQLITE_IOERR_NOMEM;
+ return SQLITE_IOERR_NOMEM_BKPT;
}
sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s", zUtf8);
sqlite3_free(zUtf8);
@@ -39977,17 +43777,6 @@ static int winFullPathname(
#endif
#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && !defined(__CYGWIN__)
- DWORD nByte;
- void *zConverted;
- char *zOut;
-
- /* If this path name begins with "/X:", where "X" is any alphabetic
- ** character, discard the initial "/" from the pathname.
- */
- if( zRelative[0]=='/' && winIsDriveLetterAndColon(zRelative+1) ){
- zRelative++;
- }
-
/* It's odd to simulate an io-error here, but really this is just
** using the io-error infrastructure to test that SQLite handles this
** function failing. This function could fail if, for example, the
@@ -40007,7 +43796,7 @@ static int winFullPathname(
}
zConverted = winConvertFromUtf8Filename(zRelative);
if( zConverted==0 ){
- return SQLITE_IOERR_NOMEM;
+ return SQLITE_IOERR_NOMEM_BKPT;
}
if( osIsNT() ){
LPWSTR zTemp;
@@ -40021,7 +43810,7 @@ static int winFullPathname(
zTemp = sqlite3MallocZero( nByte*sizeof(zTemp[0]) );
if( zTemp==0 ){
sqlite3_free(zConverted);
- return SQLITE_IOERR_NOMEM;
+ return SQLITE_IOERR_NOMEM_BKPT;
}
nByte = osGetFullPathNameW((LPCWSTR)zConverted, nByte, zTemp, 0);
if( nByte==0 ){
@@ -40047,7 +43836,7 @@ static int winFullPathname(
zTemp = sqlite3MallocZero( nByte*sizeof(zTemp[0]) );
if( zTemp==0 ){
sqlite3_free(zConverted);
- return SQLITE_IOERR_NOMEM;
+ return SQLITE_IOERR_NOMEM_BKPT;
}
nByte = osGetFullPathNameA((char*)zConverted, nByte, zTemp, 0);
if( nByte==0 ){
@@ -40057,7 +43846,7 @@ static int winFullPathname(
"winFullPathname4", zRelative);
}
sqlite3_free(zConverted);
- zOut = sqlite3_win32_mbcs_to_utf8(zTemp);
+ zOut = winMbcsToUtf8(zTemp, osAreFileApisANSI());
sqlite3_free(zTemp);
}
#endif
@@ -40066,7 +43855,7 @@ static int winFullPathname(
sqlite3_free(zOut);
return SQLITE_OK;
}else{
- return SQLITE_IOERR_NOMEM;
+ return SQLITE_IOERR_NOMEM_BKPT;
}
#endif
}
@@ -40141,65 +43930,82 @@ static void winDlClose(sqlite3_vfs *pVfs, void *pHandle){
#define winDlClose 0
#endif
+/* State information for the randomness gatherer. */
+typedef struct EntropyGatherer EntropyGatherer;
+struct EntropyGatherer {
+ unsigned char *a; /* Gather entropy into this buffer */
+ int na; /* Size of a[] in bytes */
+ int i; /* XOR next input into a[i] */
+ int nXor; /* Number of XOR operations done */
+};
+
+#if !defined(SQLITE_TEST) && !defined(SQLITE_OMIT_RANDOMNESS)
+/* Mix sz bytes of entropy into p. */
+static void xorMemory(EntropyGatherer *p, unsigned char *x, int sz){
+ int j, k;
+ for(j=0, k=p->i; ja[k++] ^= x[j];
+ if( k>=p->na ) k = 0;
+ }
+ p->i = k;
+ p->nXor += sz;
+}
+#endif /* !defined(SQLITE_TEST) && !defined(SQLITE_OMIT_RANDOMNESS) */
/*
** Write up to nBuf bytes of randomness into zBuf.
*/
static int winRandomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
- int n = 0;
- UNUSED_PARAMETER(pVfs);
#if defined(SQLITE_TEST) || defined(SQLITE_OMIT_RANDOMNESS)
- n = nBuf;
+ UNUSED_PARAMETER(pVfs);
memset(zBuf, 0, nBuf);
+ return nBuf;
#else
- if( sizeof(SYSTEMTIME)<=nBuf-n ){
+ EntropyGatherer e;
+ UNUSED_PARAMETER(pVfs);
+ memset(zBuf, 0, nBuf);
+ e.a = (unsigned char*)zBuf;
+ e.na = nBuf;
+ e.nXor = 0;
+ e.i = 0;
+ {
SYSTEMTIME x;
osGetSystemTime(&x);
- memcpy(&zBuf[n], &x, sizeof(x));
- n += sizeof(x);
+ xorMemory(&e, (unsigned char*)&x, sizeof(SYSTEMTIME));
}
- if( sizeof(DWORD)<=nBuf-n ){
+ {
DWORD pid = osGetCurrentProcessId();
- memcpy(&zBuf[n], &pid, sizeof(pid));
- n += sizeof(pid);
+ xorMemory(&e, (unsigned char*)&pid, sizeof(DWORD));
}
#if SQLITE_OS_WINRT
- if( sizeof(ULONGLONG)<=nBuf-n ){
+ {
ULONGLONG cnt = osGetTickCount64();
- memcpy(&zBuf[n], &cnt, sizeof(cnt));
- n += sizeof(cnt);
+ xorMemory(&e, (unsigned char*)&cnt, sizeof(ULONGLONG));
}
#else
- if( sizeof(DWORD)<=nBuf-n ){
+ {
DWORD cnt = osGetTickCount();
- memcpy(&zBuf[n], &cnt, sizeof(cnt));
- n += sizeof(cnt);
+ xorMemory(&e, (unsigned char*)&cnt, sizeof(DWORD));
}
-#endif
- if( sizeof(LARGE_INTEGER)<=nBuf-n ){
+#endif /* SQLITE_OS_WINRT */
+ {
LARGE_INTEGER i;
osQueryPerformanceCounter(&i);
- memcpy(&zBuf[n], &i, sizeof(i));
- n += sizeof(i);
+ xorMemory(&e, (unsigned char*)&i, sizeof(LARGE_INTEGER));
}
#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && SQLITE_WIN32_USE_UUID
- if( sizeof(UUID)<=nBuf-n ){
+ {
UUID id;
memset(&id, 0, sizeof(UUID));
osUuidCreate(&id);
- memcpy(&zBuf[n], &id, sizeof(UUID));
- n += sizeof(UUID);
- }
- if( sizeof(UUID)<=nBuf-n ){
- UUID id;
+ xorMemory(&e, (unsigned char*)&id, sizeof(UUID));
memset(&id, 0, sizeof(UUID));
osUuidCreateSequential(&id);
- memcpy(&zBuf[n], &id, sizeof(UUID));
- n += sizeof(UUID);
+ xorMemory(&e, (unsigned char*)&id, sizeof(UUID));
}
-#endif
-#endif /* defined(SQLITE_TEST) || defined(SQLITE_ZERO_PRNG_SEED) */
- return n;
+#endif /* !SQLITE_OS_WINCE && !SQLITE_OS_WINRT && SQLITE_WIN32_USE_UUID */
+ return e.nXor>nBuf ? nBuf : e.nXor;
+#endif /* defined(SQLITE_TEST) || defined(SQLITE_OMIT_RANDOMNESS) */
}
@@ -40315,62 +44121,114 @@ static int winCurrentTime(sqlite3_vfs *pVfs, double *prNow){
** sqlite3_errmsg(), possibly making IO errors easier to debug.
*/
static int winGetLastError(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
+ DWORD e = osGetLastError();
UNUSED_PARAMETER(pVfs);
- return winGetLastErrorMsg(osGetLastError(), nBuf, zBuf);
+ if( nBuf>0 ) winGetLastErrorMsg(e, nBuf, zBuf);
+ return e;
}
/*
** Initialize and deinitialize the operating system interface.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){
+SQLITE_API int sqlite3_os_init(void){
static sqlite3_vfs winVfs = {
- 3, /* iVersion */
- sizeof(winFile), /* szOsFile */
+ 3, /* iVersion */
+ sizeof(winFile), /* szOsFile */
SQLITE_WIN32_MAX_PATH_BYTES, /* mxPathname */
- 0, /* pNext */
- "win32", /* zName */
- 0, /* pAppData */
- winOpen, /* xOpen */
- winDelete, /* xDelete */
- winAccess, /* xAccess */
- winFullPathname, /* xFullPathname */
- winDlOpen, /* xDlOpen */
- winDlError, /* xDlError */
- winDlSym, /* xDlSym */
- winDlClose, /* xDlClose */
- winRandomness, /* xRandomness */
- winSleep, /* xSleep */
- winCurrentTime, /* xCurrentTime */
- winGetLastError, /* xGetLastError */
- winCurrentTimeInt64, /* xCurrentTimeInt64 */
- winSetSystemCall, /* xSetSystemCall */
- winGetSystemCall, /* xGetSystemCall */
- winNextSystemCall, /* xNextSystemCall */
+ 0, /* pNext */
+ "win32", /* zName */
+ &winAppData, /* pAppData */
+ winOpen, /* xOpen */
+ winDelete, /* xDelete */
+ winAccess, /* xAccess */
+ winFullPathname, /* xFullPathname */
+ winDlOpen, /* xDlOpen */
+ winDlError, /* xDlError */
+ winDlSym, /* xDlSym */
+ winDlClose, /* xDlClose */
+ winRandomness, /* xRandomness */
+ winSleep, /* xSleep */
+ winCurrentTime, /* xCurrentTime */
+ winGetLastError, /* xGetLastError */
+ winCurrentTimeInt64, /* xCurrentTimeInt64 */
+ winSetSystemCall, /* xSetSystemCall */
+ winGetSystemCall, /* xGetSystemCall */
+ winNextSystemCall, /* xNextSystemCall */
};
#if defined(SQLITE_WIN32_HAS_WIDE)
static sqlite3_vfs winLongPathVfs = {
- 3, /* iVersion */
- sizeof(winFile), /* szOsFile */
+ 3, /* iVersion */
+ sizeof(winFile), /* szOsFile */
SQLITE_WINNT_MAX_PATH_BYTES, /* mxPathname */
- 0, /* pNext */
- "win32-longpath", /* zName */
- 0, /* pAppData */
- winOpen, /* xOpen */
- winDelete, /* xDelete */
- winAccess, /* xAccess */
- winFullPathname, /* xFullPathname */
- winDlOpen, /* xDlOpen */
- winDlError, /* xDlError */
- winDlSym, /* xDlSym */
- winDlClose, /* xDlClose */
- winRandomness, /* xRandomness */
- winSleep, /* xSleep */
- winCurrentTime, /* xCurrentTime */
- winGetLastError, /* xGetLastError */
- winCurrentTimeInt64, /* xCurrentTimeInt64 */
- winSetSystemCall, /* xSetSystemCall */
- winGetSystemCall, /* xGetSystemCall */
- winNextSystemCall, /* xNextSystemCall */
+ 0, /* pNext */
+ "win32-longpath", /* zName */
+ &winAppData, /* pAppData */
+ winOpen, /* xOpen */
+ winDelete, /* xDelete */
+ winAccess, /* xAccess */
+ winFullPathname, /* xFullPathname */
+ winDlOpen, /* xDlOpen */
+ winDlError, /* xDlError */
+ winDlSym, /* xDlSym */
+ winDlClose, /* xDlClose */
+ winRandomness, /* xRandomness */
+ winSleep, /* xSleep */
+ winCurrentTime, /* xCurrentTime */
+ winGetLastError, /* xGetLastError */
+ winCurrentTimeInt64, /* xCurrentTimeInt64 */
+ winSetSystemCall, /* xSetSystemCall */
+ winGetSystemCall, /* xGetSystemCall */
+ winNextSystemCall, /* xNextSystemCall */
+ };
+#endif
+ static sqlite3_vfs winNolockVfs = {
+ 3, /* iVersion */
+ sizeof(winFile), /* szOsFile */
+ SQLITE_WIN32_MAX_PATH_BYTES, /* mxPathname */
+ 0, /* pNext */
+ "win32-none", /* zName */
+ &winNolockAppData, /* pAppData */
+ winOpen, /* xOpen */
+ winDelete, /* xDelete */
+ winAccess, /* xAccess */
+ winFullPathname, /* xFullPathname */
+ winDlOpen, /* xDlOpen */
+ winDlError, /* xDlError */
+ winDlSym, /* xDlSym */
+ winDlClose, /* xDlClose */
+ winRandomness, /* xRandomness */
+ winSleep, /* xSleep */
+ winCurrentTime, /* xCurrentTime */
+ winGetLastError, /* xGetLastError */
+ winCurrentTimeInt64, /* xCurrentTimeInt64 */
+ winSetSystemCall, /* xSetSystemCall */
+ winGetSystemCall, /* xGetSystemCall */
+ winNextSystemCall, /* xNextSystemCall */
+ };
+#if defined(SQLITE_WIN32_HAS_WIDE)
+ static sqlite3_vfs winLongPathNolockVfs = {
+ 3, /* iVersion */
+ sizeof(winFile), /* szOsFile */
+ SQLITE_WINNT_MAX_PATH_BYTES, /* mxPathname */
+ 0, /* pNext */
+ "win32-longpath-none", /* zName */
+ &winNolockAppData, /* pAppData */
+ winOpen, /* xOpen */
+ winDelete, /* xDelete */
+ winAccess, /* xAccess */
+ winFullPathname, /* xFullPathname */
+ winDlOpen, /* xDlOpen */
+ winDlError, /* xDlError */
+ winDlSym, /* xDlSym */
+ winDlClose, /* xDlClose */
+ winRandomness, /* xRandomness */
+ winSleep, /* xSleep */
+ winCurrentTime, /* xCurrentTime */
+ winGetLastError, /* xGetLastError */
+ winCurrentTimeInt64, /* xCurrentTimeInt64 */
+ winSetSystemCall, /* xSetSystemCall */
+ winGetSystemCall, /* xGetSystemCall */
+ winNextSystemCall, /* xNextSystemCall */
};
#endif
@@ -40394,10 +44252,16 @@ SQLITE_API int SQLITE_STDCALL sqlite3_os_init(void){
sqlite3_vfs_register(&winLongPathVfs, 0);
#endif
+ sqlite3_vfs_register(&winNolockVfs, 0);
+
+#if defined(SQLITE_WIN32_HAS_WIDE)
+ sqlite3_vfs_register(&winLongPathNolockVfs, 0);
+#endif
+
return SQLITE_OK;
}
-SQLITE_API int SQLITE_STDCALL sqlite3_os_end(void){
+SQLITE_API int sqlite3_os_end(void){
#if SQLITE_OS_WINRT
if( sleepObj!=NULL ){
osCloseHandle(sleepObj);
@@ -40590,7 +44454,7 @@ SQLITE_PRIVATE int sqlite3BitvecSet(Bitvec *p, u32 i){
i = i%p->iDivisor;
if( p->u.apSub[bin]==0 ){
p->u.apSub[bin] = sqlite3BitvecCreate( p->iDivisor );
- if( p->u.apSub[bin]==0 ) return SQLITE_NOMEM;
+ if( p->u.apSub[bin]==0 ) return SQLITE_NOMEM_BKPT;
}
p = p->u.apSub[bin];
}
@@ -40625,7 +44489,7 @@ bitvec_set_rehash:
int rc;
u32 *aiValues = sqlite3StackAllocRaw(0, sizeof(p->u.aHash));
if( aiValues==0 ){
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}else{
memcpy(aiValues, p->u.aHash, sizeof(p->u.aHash));
memset(p->u.apSub, 0, sizeof(p->u.apSub));
@@ -40706,7 +44570,7 @@ SQLITE_PRIVATE u32 sqlite3BitvecSize(Bitvec *p){
return p->iSize;
}
-#ifndef SQLITE_OMIT_BUILTIN_TEST
+#ifndef SQLITE_UNTESTABLE
/*
** Let V[] be an array of unsigned characters sufficient to hold
** up to N bits. Let I be an integer between 0 and N. 0<=IpDirtyNext.
+** PCache.pDirty points to the first (newest) element in the list and
+** pDirtyTail to the last (oldest).
+**
+** The PCache.pSynced variable is used to optimize searching for a dirty
+** page to eject from the cache mid-transaction. It is better to eject
+** a page that does not require a journal sync than one that does.
+** Therefore, pSynced is maintained to that it *almost* always points
+** to either the oldest page in the pDirty/pDirtyTail list that has a
+** clear PGHDR_NEED_SYNC flag or to a page that is older than this one
+** (so that the right page to eject can be found by following pDirtyPrev
+** pointers).
*/
struct PCache {
PgHdr *pDirty, *pDirtyTail; /* List of dirty pages in LRU order */
@@ -40858,6 +44744,95 @@ struct PCache {
sqlite3_pcache *pCache; /* Pluggable cache module */
};
+/********************************** Test and Debug Logic **********************/
+/*
+** Debug tracing macros. Enable by by changing the "0" to "1" and
+** recompiling.
+**
+** When sqlite3PcacheTrace is 1, single line trace messages are issued.
+** When sqlite3PcacheTrace is 2, a dump of the pcache showing all cache entries
+** is displayed for many operations, resulting in a lot of output.
+*/
+#if defined(SQLITE_DEBUG) && 0
+ int sqlite3PcacheTrace = 2; /* 0: off 1: simple 2: cache dumps */
+ int sqlite3PcacheMxDump = 9999; /* Max cache entries for pcacheDump() */
+# define pcacheTrace(X) if(sqlite3PcacheTrace){sqlite3DebugPrintf X;}
+ void pcacheDump(PCache *pCache){
+ int N;
+ int i, j;
+ sqlite3_pcache_page *pLower;
+ PgHdr *pPg;
+ unsigned char *a;
+
+ if( sqlite3PcacheTrace<2 ) return;
+ if( pCache->pCache==0 ) return;
+ N = sqlite3PcachePagecount(pCache);
+ if( N>sqlite3PcacheMxDump ) N = sqlite3PcacheMxDump;
+ for(i=1; i<=N; i++){
+ pLower = sqlite3GlobalConfig.pcache2.xFetch(pCache->pCache, i, 0);
+ if( pLower==0 ) continue;
+ pPg = (PgHdr*)pLower->pExtra;
+ printf("%3d: nRef %2d flgs %02x data ", i, pPg->nRef, pPg->flags);
+ a = (unsigned char *)pLower->pBuf;
+ for(j=0; j<12; j++) printf("%02x", a[j]);
+ printf("\n");
+ if( pPg->pPage==0 ){
+ sqlite3GlobalConfig.pcache2.xUnpin(pCache->pCache, pLower, 0);
+ }
+ }
+ }
+ #else
+# define pcacheTrace(X)
+# define pcacheDump(X)
+#endif
+
+/*
+** Check invariants on a PgHdr entry. Return true if everything is OK.
+** Return false if any invariant is violated.
+**
+** This routine is for use inside of assert() statements only. For
+** example:
+**
+** assert( sqlite3PcachePageSanity(pPg) );
+*/
+#ifdef SQLITE_DEBUG
+SQLITE_PRIVATE int sqlite3PcachePageSanity(PgHdr *pPg){
+ PCache *pCache;
+ assert( pPg!=0 );
+ assert( pPg->pgno>0 || pPg->pPager==0 ); /* Page number is 1 or more */
+ pCache = pPg->pCache;
+ assert( pCache!=0 ); /* Every page has an associated PCache */
+ if( pPg->flags & PGHDR_CLEAN ){
+ assert( (pPg->flags & PGHDR_DIRTY)==0 );/* Cannot be both CLEAN and DIRTY */
+ assert( pCache->pDirty!=pPg ); /* CLEAN pages not on dirty list */
+ assert( pCache->pDirtyTail!=pPg );
+ }
+ /* WRITEABLE pages must also be DIRTY */
+ if( pPg->flags & PGHDR_WRITEABLE ){
+ assert( pPg->flags & PGHDR_DIRTY ); /* WRITEABLE implies DIRTY */
+ }
+ /* NEED_SYNC can be set independently of WRITEABLE. This can happen,
+ ** for example, when using the sqlite3PagerDontWrite() optimization:
+ ** (1) Page X is journalled, and gets WRITEABLE and NEED_SEEK.
+ ** (2) Page X moved to freelist, WRITEABLE is cleared
+ ** (3) Page X reused, WRITEABLE is set again
+ ** If NEED_SYNC had been cleared in step 2, then it would not be reset
+ ** in step 3, and page might be written into the database without first
+ ** syncing the rollback journal, which might cause corruption on a power
+ ** loss.
+ **
+ ** Another example is when the database page size is smaller than the
+ ** disk sector size. When any page of a sector is journalled, all pages
+ ** in that sector are marked NEED_SYNC even if they are still CLEAN, just
+ ** in case they are later modified, since all pages in the same sector
+ ** must be journalled and synced before any of those pages can be safely
+ ** written.
+ */
+ return 1;
+}
+#endif /* SQLITE_DEBUG */
+
+
/********************************** Linked List Management ********************/
/* Allowed values for second argument to pcacheManageDirtyList() */
@@ -40874,17 +44849,16 @@ struct PCache {
static void pcacheManageDirtyList(PgHdr *pPage, u8 addRemove){
PCache *p = pPage->pCache;
+ pcacheTrace(("%p.DIRTYLIST.%s %d\n", p,
+ addRemove==1 ? "REMOVE" : addRemove==2 ? "ADD" : "FRONT",
+ pPage->pgno));
if( addRemove & PCACHE_DIRTYLIST_REMOVE ){
assert( pPage->pDirtyNext || pPage==p->pDirtyTail );
assert( pPage->pDirtyPrev || pPage==p->pDirty );
/* Update the PCache1.pSynced variable if necessary. */
if( p->pSynced==pPage ){
- PgHdr *pSynced = pPage->pDirtyPrev;
- while( pSynced && (pSynced->flags&PGHDR_NEED_SYNC) ){
- pSynced = pSynced->pDirtyPrev;
- }
- p->pSynced = pSynced;
+ p->pSynced = pPage->pDirtyPrev;
}
if( pPage->pDirtyNext ){
@@ -40896,19 +44870,21 @@ static void pcacheManageDirtyList(PgHdr *pPage, u8 addRemove){
if( pPage->pDirtyPrev ){
pPage->pDirtyPrev->pDirtyNext = pPage->pDirtyNext;
}else{
+ /* If there are now no dirty pages in the cache, set eCreate to 2.
+ ** This is an optimization that allows sqlite3PcacheFetch() to skip
+ ** searching for a dirty page to eject from the cache when it might
+ ** otherwise have to. */
assert( pPage==p->pDirty );
p->pDirty = pPage->pDirtyNext;
- if( p->pDirty==0 && p->bPurgeable ){
- assert( p->eCreate==1 );
+ assert( p->bPurgeable || p->eCreate==2 );
+ if( p->pDirty==0 ){ /*OPTIMIZATION-IF-TRUE*/
+ assert( p->bPurgeable==0 || p->eCreate==1 );
p->eCreate = 2;
}
}
- pPage->pDirtyNext = 0;
- pPage->pDirtyPrev = 0;
}
if( addRemove & PCACHE_DIRTYLIST_ADD ){
- assert( pPage->pDirtyNext==0 && pPage->pDirtyPrev==0 && p->pDirty!=pPage );
-
+ pPage->pDirtyPrev = 0;
pPage->pDirtyNext = p->pDirty;
if( pPage->pDirtyNext ){
assert( pPage->pDirtyNext->pDirtyPrev==0 );
@@ -40921,10 +44897,19 @@ static void pcacheManageDirtyList(PgHdr *pPage, u8 addRemove){
}
}
p->pDirty = pPage;
- if( !p->pSynced && 0==(pPage->flags&PGHDR_NEED_SYNC) ){
+
+ /* If pSynced is NULL and this page has a clear NEED_SYNC flag, set
+ ** pSynced to point to it. Checking the NEED_SYNC flag is an
+ ** optimization, as if pSynced points to a page with the NEED_SYNC
+ ** flag set sqlite3PcacheFetchStress() searches through all newer
+ ** entries of the dirty-list for a page with NEED_SYNC clear anyway. */
+ if( !p->pSynced
+ && 0==(pPage->flags&PGHDR_NEED_SYNC) /*OPTIMIZATION-IF-FALSE*/
+ ){
p->pSynced = pPage;
}
}
+ pcacheDump(p);
}
/*
@@ -40933,7 +44918,9 @@ static void pcacheManageDirtyList(PgHdr *pPage, u8 addRemove){
*/
static void pcacheUnpin(PgHdr *p){
if( p->pCache->bPurgeable ){
+ pcacheTrace(("%p.UNPIN %d\n", p->pCache, p->pgno));
sqlite3GlobalConfig.pcache2.xUnpin(p->pCache->pCache, p->pPage, 0);
+ pcacheDump(p->pCache);
}
}
@@ -40985,6 +44972,12 @@ SQLITE_PRIVATE int sqlite3PcacheSize(void){ return sizeof(PCache); }
** has already been allocated and is passed in as the p pointer.
** The caller discovers how much space needs to be allocated by
** calling sqlite3PcacheSize().
+**
+** szExtra is some extra space allocated for each page. The first
+** 8 bytes of the extra space will be zeroed as the page is allocated,
+** but remaining content will be uninitialized. Though it is opaque
+** to this module, the extra space really ends up being the MemPage
+** structure in the pager.
*/
SQLITE_PRIVATE int sqlite3PcacheOpen(
int szPage, /* Size of every page */
@@ -40997,12 +44990,14 @@ SQLITE_PRIVATE int sqlite3PcacheOpen(
memset(p, 0, sizeof(PCache));
p->szPage = 1;
p->szExtra = szExtra;
+ assert( szExtra>=8 ); /* First 8 bytes will be zeroed */
p->bPurgeable = bPurgeable;
p->eCreate = 2;
p->xStress = xStress;
p->pStress = pStress;
p->szCache = 100;
p->szSpill = 1;
+ pcacheTrace(("%p.OPEN szPage %d bPurgeable %d\n",p,szPage,bPurgeable));
return sqlite3PcacheSetPageSize(p, szPage);
}
@@ -41018,13 +45013,14 @@ SQLITE_PRIVATE int sqlite3PcacheSetPageSize(PCache *pCache, int szPage){
szPage, pCache->szExtra + ROUND8(sizeof(PgHdr)),
pCache->bPurgeable
);
- if( pNew==0 ) return SQLITE_NOMEM;
+ if( pNew==0 ) return SQLITE_NOMEM_BKPT;
sqlite3GlobalConfig.pcache2.xCachesize(pNew, numberOfCachePages(pCache));
if( pCache->pCache ){
sqlite3GlobalConfig.pcache2.xDestroy(pCache->pCache);
}
pCache->pCache = pNew;
pCache->szPage = szPage;
+ pcacheTrace(("%p.PAGESIZE %d\n",pCache,szPage));
}
return SQLITE_OK;
}
@@ -41059,11 +45055,12 @@ SQLITE_PRIVATE sqlite3_pcache_page *sqlite3PcacheFetch(
int createFlag /* If true, create page if it does not exist already */
){
int eCreate;
+ sqlite3_pcache_page *pRes;
assert( pCache!=0 );
assert( pCache->pCache!=0 );
assert( createFlag==3 || createFlag==0 );
- assert( pgno>0 );
+ assert( pCache->eCreate==((pCache->bPurgeable && pCache->pDirty) ? 1 : 2) );
/* eCreate defines what to do if the page does not exist.
** 0 Do not allocate a new page. (createFlag==0)
@@ -41076,12 +45073,15 @@ SQLITE_PRIVATE sqlite3_pcache_page *sqlite3PcacheFetch(
assert( eCreate==0 || eCreate==1 || eCreate==2 );
assert( createFlag==0 || pCache->eCreate==eCreate );
assert( createFlag==0 || eCreate==1+(!pCache->bPurgeable||!pCache->pDirty) );
- return sqlite3GlobalConfig.pcache2.xFetch(pCache->pCache, pgno, eCreate);
+ pRes = sqlite3GlobalConfig.pcache2.xFetch(pCache->pCache, pgno, eCreate);
+ pcacheTrace(("%p.FETCH %d%s (result: %p)\n",pCache,pgno,
+ createFlag?" create":"",pRes));
+ return pRes;
}
/*
** If the sqlite3PcacheFetch() routine is unable to allocate a new
-** page because new clean pages are available for reuse and the cache
+** page because no clean pages are available for reuse and the cache
** size limit has been reached, then this routine can be invoked to
** try harder to allocate a page. This routine might invoke the stress
** callback to spill dirty pages to the journal. It will then try to
@@ -41103,7 +45103,11 @@ SQLITE_PRIVATE int sqlite3PcacheFetchStress(
** page that does not require a journal-sync (one with PGHDR_NEED_SYNC
** cleared), but if that is not possible settle for any other
** unreferenced dirty page.
- */
+ **
+ ** If the LRU page in the dirty list that has a clear PGHDR_NEED_SYNC
+ ** flag is currently referenced, then the following may leave pSynced
+ ** set incorrectly (pointing to other than the LRU page with NEED_SYNC
+ ** cleared). This is Ok, as pSynced is just an optimization. */
for(pPg=pCache->pSynced;
pPg && (pPg->nRef || (pPg->flags&PGHDR_NEED_SYNC));
pPg=pPg->pDirtyPrev
@@ -41121,14 +45125,16 @@ SQLITE_PRIVATE int sqlite3PcacheFetchStress(
sqlite3GlobalConfig.pcache.xPagecount(pCache->pCache),
numberOfCachePages(pCache));
#endif
+ pcacheTrace(("%p.SPILL %d\n",pCache,pPg->pgno));
rc = pCache->xStress(pCache->pStress, pPg);
+ pcacheDump(pCache);
if( rc!=SQLITE_OK && rc!=SQLITE_BUSY ){
return rc;
}
}
}
*ppPage = sqlite3GlobalConfig.pcache2.xFetch(pCache->pCache, pgno, 2);
- return *ppPage==0 ? SQLITE_NOMEM : SQLITE_OK;
+ return *ppPage==0 ? SQLITE_NOMEM_BKPT : SQLITE_OK;
}
/*
@@ -41149,11 +45155,11 @@ static SQLITE_NOINLINE PgHdr *pcacheFetchFinishWithInit(
assert( pPage!=0 );
pPgHdr = (PgHdr*)pPage->pExtra;
assert( pPgHdr->pPage==0 );
- memset(pPgHdr, 0, sizeof(PgHdr));
+ memset(&pPgHdr->pDirty, 0, sizeof(PgHdr) - offsetof(PgHdr,pDirty));
pPgHdr->pPage = pPage;
pPgHdr->pData = pPage->pBuf;
pPgHdr->pExtra = (void *)&pPgHdr[1];
- memset(pPgHdr->pExtra, 0, pCache->szExtra);
+ memset(pPgHdr->pExtra, 0, 8);
pPgHdr->pCache = pCache;
pPgHdr->pgno = pgno;
pPgHdr->flags = PGHDR_CLEAN;
@@ -41181,6 +45187,7 @@ SQLITE_PRIVATE PgHdr *sqlite3PcacheFetchFinish(
}
pCache->nRefSum++;
pPgHdr->nRef++;
+ assert( sqlite3PcachePageSanity(pPgHdr) );
return pPgHdr;
}
@@ -41194,8 +45201,7 @@ SQLITE_PRIVATE void SQLITE_NOINLINE sqlite3PcacheRelease(PgHdr *p){
if( (--p->nRef)==0 ){
if( p->flags&PGHDR_CLEAN ){
pcacheUnpin(p);
- }else if( p->pDirtyPrev!=0 ){
- /* Move the page to the head of the dirty list. */
+ }else{
pcacheManageDirtyList(p, PCACHE_DIRTYLIST_FRONT);
}
}
@@ -41206,6 +45212,7 @@ SQLITE_PRIVATE void SQLITE_NOINLINE sqlite3PcacheRelease(PgHdr *p){
*/
SQLITE_PRIVATE void sqlite3PcacheRef(PgHdr *p){
assert(p->nRef>0);
+ assert( sqlite3PcachePageSanity(p) );
p->nRef++;
p->pCache->nRefSum++;
}
@@ -41217,6 +45224,7 @@ SQLITE_PRIVATE void sqlite3PcacheRef(PgHdr *p){
*/
SQLITE_PRIVATE void sqlite3PcacheDrop(PgHdr *p){
assert( p->nRef==1 );
+ assert( sqlite3PcachePageSanity(p) );
if( p->flags&PGHDR_DIRTY ){
pcacheManageDirtyList(p, PCACHE_DIRTYLIST_REMOVE);
}
@@ -41230,13 +45238,16 @@ SQLITE_PRIVATE void sqlite3PcacheDrop(PgHdr *p){
*/
SQLITE_PRIVATE void sqlite3PcacheMakeDirty(PgHdr *p){
assert( p->nRef>0 );
- if( p->flags & (PGHDR_CLEAN|PGHDR_DONT_WRITE) ){
+ assert( sqlite3PcachePageSanity(p) );
+ if( p->flags & (PGHDR_CLEAN|PGHDR_DONT_WRITE) ){ /*OPTIMIZATION-IF-FALSE*/
p->flags &= ~PGHDR_DONT_WRITE;
if( p->flags & PGHDR_CLEAN ){
p->flags ^= (PGHDR_DIRTY|PGHDR_CLEAN);
+ pcacheTrace(("%p.DIRTY %d\n",p->pCache,p->pgno));
assert( (p->flags & (PGHDR_DIRTY|PGHDR_CLEAN))==PGHDR_DIRTY );
pcacheManageDirtyList(p, PCACHE_DIRTYLIST_ADD);
}
+ assert( sqlite3PcachePageSanity(p) );
}
}
@@ -41245,11 +45256,14 @@ SQLITE_PRIVATE void sqlite3PcacheMakeDirty(PgHdr *p){
** make it so.
*/
SQLITE_PRIVATE void sqlite3PcacheMakeClean(PgHdr *p){
- if( (p->flags & PGHDR_DIRTY) ){
+ assert( sqlite3PcachePageSanity(p) );
+ if( ALWAYS((p->flags & PGHDR_DIRTY)!=0) ){
assert( (p->flags & PGHDR_CLEAN)==0 );
pcacheManageDirtyList(p, PCACHE_DIRTYLIST_REMOVE);
p->flags &= ~(PGHDR_DIRTY|PGHDR_NEED_SYNC|PGHDR_WRITEABLE);
p->flags |= PGHDR_CLEAN;
+ pcacheTrace(("%p.CLEAN %d\n",p->pCache,p->pgno));
+ assert( sqlite3PcachePageSanity(p) );
if( p->nRef==0 ){
pcacheUnpin(p);
}
@@ -41261,11 +45275,24 @@ SQLITE_PRIVATE void sqlite3PcacheMakeClean(PgHdr *p){
*/
SQLITE_PRIVATE void sqlite3PcacheCleanAll(PCache *pCache){
PgHdr *p;
+ pcacheTrace(("%p.CLEAN-ALL\n",pCache));
while( (p = pCache->pDirty)!=0 ){
sqlite3PcacheMakeClean(p);
}
}
+/*
+** Clear the PGHDR_NEED_SYNC and PGHDR_WRITEABLE flag from all dirty pages.
+*/
+SQLITE_PRIVATE void sqlite3PcacheClearWritable(PCache *pCache){
+ PgHdr *p;
+ pcacheTrace(("%p.CLEAR-WRITEABLE\n",pCache));
+ for(p=pCache->pDirty; p; p=p->pDirtyNext){
+ p->flags &= ~(PGHDR_NEED_SYNC|PGHDR_WRITEABLE);
+ }
+ pCache->pSynced = pCache->pDirtyTail;
+}
+
/*
** Clear the PGHDR_NEED_SYNC flag from all dirty pages.
*/
@@ -41284,6 +45311,8 @@ SQLITE_PRIVATE void sqlite3PcacheMove(PgHdr *p, Pgno newPgno){
PCache *pCache = p->pCache;
assert( p->nRef>0 );
assert( newPgno>0 );
+ assert( sqlite3PcachePageSanity(p) );
+ pcacheTrace(("%p.MOVE %d -> %d\n",pCache,p->pgno,newPgno));
sqlite3GlobalConfig.pcache2.xRekey(pCache->pCache, p->pPage, p->pgno,newPgno);
p->pgno = newPgno;
if( (p->flags&PGHDR_DIRTY) && (p->flags&PGHDR_NEED_SYNC) ){
@@ -41304,6 +45333,7 @@ SQLITE_PRIVATE void sqlite3PcacheTruncate(PCache *pCache, Pgno pgno){
if( pCache->pCache ){
PgHdr *p;
PgHdr *pNext;
+ pcacheTrace(("%p.TRUNCATE %d\n",pCache,pgno));
for(p=pCache->pDirty; p; p=pNext){
pNext = p->pDirtyNext;
/* This routine never gets call with a positive pgno except right
@@ -41311,7 +45341,7 @@ SQLITE_PRIVATE void sqlite3PcacheTruncate(PCache *pCache, Pgno pgno){
** it must be that pgno==0.
*/
assert( p->pgno>0 );
- if( ALWAYS(p->pgno>pgno) ){
+ if( p->pgno>pgno ){
assert( p->flags&PGHDR_DIRTY );
sqlite3PcacheMakeClean(p);
}
@@ -41334,6 +45364,7 @@ SQLITE_PRIVATE void sqlite3PcacheTruncate(PCache *pCache, Pgno pgno){
*/
SQLITE_PRIVATE void sqlite3PcacheClose(PCache *pCache){
assert( pCache->pCache!=0 );
+ pcacheTrace(("%p.CLOSE\n",pCache));
sqlite3GlobalConfig.pcache2.xDestroy(pCache->pCache);
}
@@ -41346,29 +45377,31 @@ SQLITE_PRIVATE void sqlite3PcacheClear(PCache *pCache){
/*
** Merge two lists of pages connected by pDirty and in pgno order.
-** Do not both fixing the pDirtyPrev pointers.
+** Do not bother fixing the pDirtyPrev pointers.
*/
static PgHdr *pcacheMergeDirtyList(PgHdr *pA, PgHdr *pB){
PgHdr result, *pTail;
pTail = &result;
- while( pA && pB ){
+ assert( pA!=0 && pB!=0 );
+ for(;;){
if( pA->pgnopgno ){
pTail->pDirty = pA;
pTail = pA;
pA = pA->pDirty;
+ if( pA==0 ){
+ pTail->pDirty = pB;
+ break;
+ }
}else{
pTail->pDirty = pB;
pTail = pB;
pB = pB->pDirty;
+ if( pB==0 ){
+ pTail->pDirty = pA;
+ break;
+ }
}
}
- if( pA ){
- pTail->pDirty = pA;
- }else if( pB ){
- pTail->pDirty = pB;
- }else{
- pTail->pDirty = 0;
- }
return result.pDirty;
}
@@ -41409,7 +45442,8 @@ static PgHdr *pcacheSortDirtyList(PgHdr *pIn){
}
p = a[0];
for(i=1; ipDirty; pDirty; pDirty=pDirty->pDirtyNext) nDirty++;
+ return nCache ? (int)(((i64)nDirty * 100) / nCache) : 0;
+}
#if defined(SQLITE_CHECK_PAGES) || defined(SQLITE_DEBUG)
/*
@@ -41617,7 +45662,6 @@ typedef struct PGroup PGroup;
struct PgHdr1 {
sqlite3_pcache_page page; /* Base class. Must be first. pBuf & pExtra */
unsigned int iKey; /* Key value (page number) */
- u8 isPinned; /* Page in use, not on the LRU list */
u8 isBulkLocal; /* This page from bulk local storage */
u8 isAnchor; /* This is the PGroup.lru element */
PgHdr1 *pNext; /* Next in hash table chain */
@@ -41626,6 +45670,12 @@ struct PgHdr1 {
PgHdr1 *pLruPrev; /* Previous in LRU list of unpinned pages */
};
+/*
+** A page is pinned if it is no on the LRU list
+*/
+#define PAGE_IS_PINNED(p) ((p)->pLruNext==0)
+#define PAGE_IS_UNPINNED(p) ((p)->pLruNext!=0)
+
/* Each page cache (or PCache) belongs to a PGroup. A PGroup is a set
** of one or more PCaches that are able to recycle each other's unpinned
** pages when they are under memory pressure. A PGroup is an instance of
@@ -41653,7 +45703,7 @@ struct PGroup {
unsigned int nMaxPage; /* Sum of nMax for purgeable caches */
unsigned int nMinPage; /* Sum of nMin for purgeable caches */
unsigned int mxPinned; /* nMaxpage + 10 - nMinPage */
- unsigned int nCurrentPage; /* Number of purgeable pages allocated */
+ unsigned int nPurgeable; /* Number of purgeable pages allocated */
PgHdr1 lru; /* The beginning and end of the LRU list */
};
@@ -41667,11 +45717,13 @@ struct PGroup {
*/
struct PCache1 {
/* Cache configuration parameters. Page size (szPage) and the purgeable
- ** flag (bPurgeable) are set when the cache is created. nMax may be
+ ** flag (bPurgeable) and the pnPurgeable pointer are all set when the
+ ** cache is created and are never changed thereafter. nMax may be
** modified at any time by a call to the pcache1Cachesize() method.
** The PGroup mutex must be held when accessing nMax.
*/
PGroup *pGroup; /* PGroup this cache belongs to */
+ unsigned int *pnPurgeable; /* Pointer to pGroup->nPurgeable */
int szPage; /* Size of database content section */
int szExtra; /* sizeof(MemPage)+sizeof(PgHdr) */
int szAlloc; /* Total size of one pcache line */
@@ -41766,6 +45818,7 @@ SQLITE_PRIVATE void sqlite3PCacheBufferSetup(void *pBuf, int sz, int n){
if( pcache1.isInit ){
PgFreeslot *p;
if( pBuf==0 ) sz = n = 0;
+ if( n==0 ) sz = 0;
sz = ROUNDDOWN8(sz);
pcache1.szSlot = sz;
pcache1.nSlot = pcache1.nFreeSlot = n;
@@ -41800,14 +45853,13 @@ static int pcache1InitBulk(PCache1 *pCache){
szBulk = -1024 * (i64)pcache1.nInitPage;
}
if( szBulk > pCache->szAlloc*(i64)pCache->nMax ){
- szBulk = pCache->szAlloc*pCache->nMax;
+ szBulk = pCache->szAlloc*(i64)pCache->nMax;
}
zBulk = pCache->pBulk = sqlite3Malloc( szBulk );
sqlite3EndBenignMalloc();
if( zBulk ){
int nBulk = sqlite3MallocSize(zBulk)/pCache->szAlloc;
- int i;
- for(i=0; iszPage];
pX->page.pBuf = zBulk;
pX->page.pExtra = &pX[1];
@@ -41816,7 +45868,7 @@ static int pcache1InitBulk(PCache1 *pCache){
pX->pNext = pCache->pFree;
pCache->pFree = pX;
zBulk += pCache->szAlloc;
- }
+ }while( --nBulk );
}
return pCache->pFree!=0;
}
@@ -41869,7 +45921,6 @@ static void *pcache1Alloc(int nByte){
** Free an allocated buffer obtained from pcache1Alloc().
*/
static void pcache1Free(void *p){
- int nFreed = 0;
if( p==0 ) return;
if( SQLITE_WITHIN(p, pcache1.pStart, pcache1.pEnd) ){
PgFreeslot *pSlot;
@@ -41886,10 +45937,13 @@ static void pcache1Free(void *p){
assert( sqlite3MemdebugHasType(p, MEMTYPE_PCACHE) );
sqlite3MemdebugSetType(p, MEMTYPE_HEAP);
#ifndef SQLITE_DISABLE_PAGECACHE_OVERFLOW_STATS
- nFreed = sqlite3MallocSize(p);
- sqlite3_mutex_enter(pcache1.mutex);
- sqlite3StatusDown(SQLITE_STATUS_PAGECACHE_OVERFLOW, nFreed);
- sqlite3_mutex_leave(pcache1.mutex);
+ {
+ int nFreed = 0;
+ nFreed = sqlite3MallocSize(p);
+ sqlite3_mutex_enter(pcache1.mutex);
+ sqlite3StatusDown(SQLITE_STATUS_PAGECACHE_OVERFLOW, nFreed);
+ sqlite3_mutex_leave(pcache1.mutex);
+ }
#endif
sqlite3_free(p);
}
@@ -41957,9 +46011,7 @@ static PgHdr1 *pcache1AllocPage(PCache1 *pCache, int benignMalloc){
p->isBulkLocal = 0;
p->isAnchor = 0;
}
- if( pCache->bPurgeable ){
- pCache->pGroup->nCurrentPage++;
- }
+ (*pCache->pnPurgeable)++;
return p;
}
@@ -41980,9 +46032,7 @@ static void pcache1FreePage(PgHdr1 *p){
sqlite3_free(p);
#endif
}
- if( pCache->bPurgeable ){
- pCache->pGroup->nCurrentPage--;
- }
+ (*pCache->pnPurgeable)--;
}
/*
@@ -42077,22 +46127,18 @@ static void pcache1ResizeHash(PCache1 *p){
** The PGroup mutex must be held when this function is called.
*/
static PgHdr1 *pcache1PinPage(PgHdr1 *pPage){
- PCache1 *pCache;
-
assert( pPage!=0 );
- assert( pPage->isPinned==0 );
- pCache = pPage->pCache;
+ assert( PAGE_IS_UNPINNED(pPage) );
assert( pPage->pLruNext );
assert( pPage->pLruPrev );
- assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
+ assert( sqlite3_mutex_held(pPage->pCache->pGroup->mutex) );
pPage->pLruPrev->pLruNext = pPage->pLruNext;
pPage->pLruNext->pLruPrev = pPage->pLruPrev;
pPage->pLruNext = 0;
pPage->pLruPrev = 0;
- pPage->isPinned = 1;
assert( pPage->isAnchor==0 );
- assert( pCache->pGroup->lru.isAnchor==1 );
- pCache->nRecyclable--;
+ assert( pPage->pCache->pGroup->lru.isAnchor==1 );
+ pPage->pCache->nRecyclable--;
return pPage;
}
@@ -42126,11 +46172,11 @@ static void pcache1EnforceMaxPage(PCache1 *pCache){
PGroup *pGroup = pCache->pGroup;
PgHdr1 *p;
assert( sqlite3_mutex_held(pGroup->mutex) );
- while( pGroup->nCurrentPage>pGroup->nMaxPage
+ while( pGroup->nPurgeable>pGroup->nMaxPage
&& (p=pGroup->lru.pLruPrev)->isAnchor==0
){
assert( p->pCache->pGroup==pGroup );
- assert( p->isPinned==0 );
+ assert( PAGE_IS_UNPINNED(p) );
pcache1PinPage(p);
pcache1RemoveFromHash(p, 1);
}
@@ -42151,25 +46197,45 @@ static void pcache1TruncateUnsafe(
PCache1 *pCache, /* The cache to truncate */
unsigned int iLimit /* Drop pages with this pgno or larger */
){
- TESTONLY( unsigned int nPage = 0; ) /* To assert pCache->nPage is correct */
- unsigned int h;
+ TESTONLY( int nPage = 0; ) /* To assert pCache->nPage is correct */
+ unsigned int h, iStop;
assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
- for(h=0; hnHash; h++){
- PgHdr1 **pp = &pCache->apHash[h];
+ assert( pCache->iMaxKey >= iLimit );
+ assert( pCache->nHash > 0 );
+ if( pCache->iMaxKey - iLimit < pCache->nHash ){
+ /* If we are just shaving the last few pages off the end of the
+ ** cache, then there is no point in scanning the entire hash table.
+ ** Only scan those hash slots that might contain pages that need to
+ ** be removed. */
+ h = iLimit % pCache->nHash;
+ iStop = pCache->iMaxKey % pCache->nHash;
+ TESTONLY( nPage = -10; ) /* Disable the pCache->nPage validity check */
+ }else{
+ /* This is the general case where many pages are being removed.
+ ** It is necessary to scan the entire hash table */
+ h = pCache->nHash/2;
+ iStop = h - 1;
+ }
+ for(;;){
+ PgHdr1 **pp;
PgHdr1 *pPage;
+ assert( hnHash );
+ pp = &pCache->apHash[h];
while( (pPage = *pp)!=0 ){
if( pPage->iKey>=iLimit ){
pCache->nPage--;
*pp = pPage->pNext;
- if( !pPage->isPinned ) pcache1PinPage(pPage);
+ if( PAGE_IS_UNPINNED(pPage) ) pcache1PinPage(pPage);
pcache1FreePage(pPage);
}else{
pp = &pPage->pNext;
- TESTONLY( nPage++; )
+ TESTONLY( if( nPage>=0 ) nPage++; )
}
}
+ if( h==iStop ) break;
+ h = (h+1) % pCache->nHash;
}
- assert( pCache->nPage==nPage );
+ assert( nPage<0 || pCache->nPage==(unsigned)nPage );
}
/******************************************************************************/
@@ -42209,8 +46275,8 @@ static int pcache1Init(void *NotUsed){
#if SQLITE_THREADSAFE
if( sqlite3GlobalConfig.bCoreMutex ){
- pcache1.grp.mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_LRU);
- pcache1.mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_PMEM);
+ pcache1.grp.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_LRU);
+ pcache1.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_PMEM);
}
#endif
if( pcache1.separateCache
@@ -42277,6 +46343,10 @@ static sqlite3_pcache *pcache1Create(int szPage, int szExtra, int bPurgeable){
pCache->nMin = 10;
pGroup->nMinPage += pCache->nMin;
pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
+ pCache->pnPurgeable = &pGroup->nPurgeable;
+ }else{
+ static unsigned int dummyCurrentPage;
+ pCache->pnPurgeable = &dummyCurrentPage;
}
pcache1LeaveMutex(pGroup);
if( pCache->nHash==0 ){
@@ -42378,7 +46448,7 @@ static SQLITE_NOINLINE PgHdr1 *pcache1FetchStage2(
){
PCache1 *pOther;
pPage = pGroup->lru.pLruPrev;
- assert( pPage->isPinned==0 );
+ assert( PAGE_IS_UNPINNED(pPage) );
pcache1RemoveFromHash(pPage, 0);
pcache1PinPage(pPage);
pOther = pPage->pCache;
@@ -42386,7 +46456,7 @@ static SQLITE_NOINLINE PgHdr1 *pcache1FetchStage2(
pcache1FreePage(pPage);
pPage = 0;
}else{
- pGroup->nCurrentPage -= (pOther->bPurgeable - pCache->bPurgeable);
+ pGroup->nPurgeable -= (pOther->bPurgeable - pCache->bPurgeable);
}
}
@@ -42405,7 +46475,6 @@ static SQLITE_NOINLINE PgHdr1 *pcache1FetchStage2(
pPage->pCache = pCache;
pPage->pLruPrev = 0;
pPage->pLruNext = 0;
- pPage->isPinned = 1;
*(void **)pPage->page.pExtra = 0;
pCache->apHash[h] = pPage;
if( iKey>pCache->iMaxKey ){
@@ -42491,7 +46560,7 @@ static PgHdr1 *pcache1FetchNoMutex(
** Otherwise (page not in hash and createFlag!=0) continue with
** subsequent steps to try to create the page. */
if( pPage ){
- if( !pPage->isPinned ){
+ if( PAGE_IS_UNPINNED(pPage) ){
return pcache1PinPage(pPage);
}else{
return pPage;
@@ -42566,9 +46635,9 @@ static void pcache1Unpin(
** part of the PGroup LRU list.
*/
assert( pPage->pLruPrev==0 && pPage->pLruNext==0 );
- assert( pPage->isPinned==1 );
+ assert( PAGE_IS_PINNED(pPage) );
- if( reuseUnlikely || pGroup->nCurrentPage>pGroup->nMaxPage ){
+ if( reuseUnlikely || pGroup->nPurgeable>pGroup->nMaxPage ){
pcache1RemoveFromHash(pPage, 1);
}else{
/* Add the page to the PGroup LRU list. */
@@ -42577,7 +46646,6 @@ static void pcache1Unpin(
(pPage->pLruNext = *ppFirst)->pLruPrev = pPage;
*ppFirst = pPage;
pCache->nRecyclable++;
- pPage->isPinned = 0;
}
pcache1LeaveMutex(pCache->pGroup);
@@ -42646,7 +46714,7 @@ static void pcache1Destroy(sqlite3_pcache *p){
PGroup *pGroup = pCache->pGroup;
assert( pCache->bPurgeable || (pCache->nMax==0 && pCache->nMin==0) );
pcache1EnterMutex(pGroup);
- pcache1TruncateUnsafe(pCache, 0);
+ if( pCache->nPage ) pcache1TruncateUnsafe(pCache, 0);
assert( pGroup->nMaxPage >= pCache->nMax );
pGroup->nMaxPage -= pCache->nMax;
assert( pGroup->nMinPage >= pCache->nMin );
@@ -42710,7 +46778,7 @@ SQLITE_PRIVATE int sqlite3PcacheReleaseMemory(int nReq){
int nFree = 0;
assert( sqlite3_mutex_notheld(pcache1.grp.mutex) );
assert( sqlite3_mutex_notheld(pcache1.mutex) );
- if( sqlite3GlobalConfig.nPage==0 ){
+ if( sqlite3GlobalConfig.pPage==0 ){
PgHdr1 *p;
pcache1EnterMutex(&pcache1.grp);
while( (nReq<0 || nFreeisPinned==0 );
+ assert( PAGE_IS_UNPINNED(p) );
pcache1PinPage(p);
pcache1RemoveFromHash(p, 1);
}
@@ -42745,10 +46813,10 @@ SQLITE_PRIVATE void sqlite3PcacheStats(
PgHdr1 *p;
int nRecyclable = 0;
for(p=pcache1.grp.lru.pLruNext; p && !p->isAnchor; p=p->pLruNext){
- assert( p->isPinned==0 );
+ assert( PAGE_IS_UNPINNED(p) );
nRecyclable++;
}
- *pnCurrent = pcache1.grp.nCurrentPage;
+ *pnCurrent = pcache1.grp.nPurgeable;
*pnMax = (int)pcache1.grp.nMaxPage;
*pnMin = (int)pcache1.grp.nMinPage;
*pnRecyclable = nRecyclable;
@@ -42816,8 +46884,9 @@ SQLITE_PRIVATE void sqlite3PcacheStats(
** of the first SMALLEST is O(NlogN). Second and subsequent SMALLEST
** primitives are constant time. The cost of DESTROY is O(N).
**
-** There is an added cost of O(N) when switching between TEST and
-** SMALLEST primitives.
+** TEST and SMALLEST may not be used by the same RowSet. This used to
+** be possible, but the feature was not used, so it was removed in order
+** to simplify the code.
*/
/* #include "sqliteInt.h" */
@@ -42938,9 +47007,11 @@ SQLITE_PRIVATE void sqlite3RowSetClear(RowSet *p){
*/
static struct RowSetEntry *rowSetEntryAlloc(RowSet *p){
assert( p!=0 );
- if( p->nFresh==0 ){
+ if( p->nFresh==0 ){ /*OPTIMIZATION-IF-FALSE*/
+ /* We could allocate a fresh RowSetEntry each time one is needed, but it
+ ** is more efficient to pull a preallocated entry from the pool */
struct RowSetChunk *pNew;
- pNew = sqlite3DbMallocRaw(p->db, sizeof(*pNew));
+ pNew = sqlite3DbMallocRawNN(p->db, sizeof(*pNew));
if( pNew==0 ){
return 0;
}
@@ -42972,7 +47043,9 @@ SQLITE_PRIVATE void sqlite3RowSetInsert(RowSet *p, i64 rowid){
pEntry->pRight = 0;
pLast = p->pLast;
if( pLast ){
- if( (p->rsFlags & ROWSET_SORTED)!=0 && rowid<=pLast->v ){
+ if( rowid<=pLast->v ){ /*OPTIMIZATION-IF-FALSE*/
+ /* Avoid unnecessary sorts by preserving the ROWSET_SORTED flags
+ ** where possible */
p->rsFlags &= ~ROWSET_SORTED;
}
pLast->pRight = pEntry;
@@ -42996,28 +47069,26 @@ static struct RowSetEntry *rowSetEntryMerge(
struct RowSetEntry *pTail;
pTail = &head;
- while( pA && pB ){
+ assert( pA!=0 && pB!=0 );
+ for(;;){
assert( pA->pRight==0 || pA->v<=pA->pRight->v );
assert( pB->pRight==0 || pB->v<=pB->pRight->v );
- if( pA->vv ){
- pTail->pRight = pA;
+ if( pA->v<=pB->v ){
+ if( pA->vv ) pTail = pTail->pRight = pA;
pA = pA->pRight;
- pTail = pTail->pRight;
- }else if( pB->vv ){
- pTail->pRight = pB;
- pB = pB->pRight;
- pTail = pTail->pRight;
+ if( pA==0 ){
+ pTail->pRight = pB;
+ break;
+ }
}else{
- pA = pA->pRight;
+ pTail = pTail->pRight = pB;
+ pB = pB->pRight;
+ if( pB==0 ){
+ pTail->pRight = pA;
+ break;
+ }
}
}
- if( pA ){
- assert( pA->pRight==0 || pA->v<=pA->pRight->v );
- pTail->pRight = pA;
- }else{
- assert( pB==0 || pB->pRight==0 || pB->v<=pB->pRight->v );
- pTail->pRight = pB;
- }
return head.pRight;
}
@@ -43040,9 +47111,10 @@ static struct RowSetEntry *rowSetEntrySort(struct RowSetEntry *pIn){
aBucket[i] = pIn;
pIn = pNext;
}
- pIn = 0;
- for(i=0; i1 ){ /*OPTIMIZATION-IF-TRUE*/
+ /* This branch causes a *balanced* tree to be generated. A valid tree
+ ** is still generated without this branch, but the tree is wildly
+ ** unbalanced and inefficient. */
+ pLeft = rowSetNDeepTree(ppList, iDepth-1);
+ p = *ppList;
+ if( p==0 ){ /*OPTIMIZATION-IF-FALSE*/
+ /* It is safe to always return here, but the resulting tree
+ ** would be unbalanced */
+ return pLeft;
+ }
+ p->pLeft = pLeft;
+ *ppList = p->pRight;
+ p->pRight = rowSetNDeepTree(ppList, iDepth-1);
+ }else{
p = *ppList;
*ppList = p->pRight;
p->pLeft = p->pRight = 0;
- return p;
}
- pLeft = rowSetNDeepTree(ppList, iDepth-1);
- p = *ppList;
- if( p==0 ){
- return pLeft;
- }
- p->pLeft = pLeft;
- *ppList = p->pRight;
- p->pRight = rowSetNDeepTree(ppList, iDepth-1);
return p;
}
@@ -43137,59 +47215,37 @@ static struct RowSetEntry *rowSetListToTree(struct RowSetEntry *pList){
return p;
}
-/*
-** Take all the entries on p->pEntry and on the trees in p->pForest and
-** sort them all together into one big ordered list on p->pEntry.
-**
-** This routine should only be called once in the life of a RowSet.
-*/
-static void rowSetToList(RowSet *p){
-
- /* This routine is called only once */
- assert( p!=0 && (p->rsFlags & ROWSET_NEXT)==0 );
-
- if( (p->rsFlags & ROWSET_SORTED)==0 ){
- p->pEntry = rowSetEntrySort(p->pEntry);
- }
-
- /* While this module could theoretically support it, sqlite3RowSetNext()
- ** is never called after sqlite3RowSetText() for the same RowSet. So
- ** there is never a forest to deal with. Should this change, simply
- ** remove the assert() and the #if 0. */
- assert( p->pForest==0 );
-#if 0
- while( p->pForest ){
- struct RowSetEntry *pTree = p->pForest->pLeft;
- if( pTree ){
- struct RowSetEntry *pHead, *pTail;
- rowSetTreeToList(pTree, &pHead, &pTail);
- p->pEntry = rowSetEntryMerge(p->pEntry, pHead);
- }
- p->pForest = p->pForest->pRight;
- }
-#endif
- p->rsFlags |= ROWSET_NEXT; /* Verify this routine is never called again */
-}
-
/*
** Extract the smallest element from the RowSet.
** Write the element into *pRowid. Return 1 on success. Return
** 0 if the RowSet is already empty.
**
** After this routine has been called, the sqlite3RowSetInsert()
-** routine may not be called again.
+** routine may not be called again.
+**
+** This routine may not be called after sqlite3RowSetTest() has
+** been used. Older versions of RowSet allowed that, but as the
+** capability was not used by the code generator, it was removed
+** for code economy.
*/
SQLITE_PRIVATE int sqlite3RowSetNext(RowSet *p, i64 *pRowid){
assert( p!=0 );
+ assert( p->pForest==0 ); /* Cannot be used with sqlite3RowSetText() */
/* Merge the forest into a single sorted list on first call */
- if( (p->rsFlags & ROWSET_NEXT)==0 ) rowSetToList(p);
+ if( (p->rsFlags & ROWSET_NEXT)==0 ){ /*OPTIMIZATION-IF-FALSE*/
+ if( (p->rsFlags & ROWSET_SORTED)==0 ){ /*OPTIMIZATION-IF-FALSE*/
+ p->pEntry = rowSetEntrySort(p->pEntry);
+ }
+ p->rsFlags |= ROWSET_SORTED|ROWSET_NEXT;
+ }
/* Return the next entry on the list */
if( p->pEntry ){
*pRowid = p->pEntry->v;
p->pEntry = p->pEntry->pRight;
- if( p->pEntry==0 ){
+ if( p->pEntry==0 ){ /*OPTIMIZATION-IF-TRUE*/
+ /* Free memory immediately, rather than waiting on sqlite3_finalize() */
sqlite3RowSetClear(p);
}
return 1;
@@ -43212,13 +47268,15 @@ SQLITE_PRIVATE int sqlite3RowSetTest(RowSet *pRowSet, int iBatch, sqlite3_int64
/* This routine is never called after sqlite3RowSetNext() */
assert( pRowSet!=0 && (pRowSet->rsFlags & ROWSET_NEXT)==0 );
- /* Sort entries into the forest on the first test of a new batch
+ /* Sort entries into the forest on the first test of a new batch.
+ ** To save unnecessary work, only do this when the batch number changes.
*/
- if( iBatch!=pRowSet->iBatch ){
+ if( iBatch!=pRowSet->iBatch ){ /*OPTIMIZATION-IF-FALSE*/
p = pRowSet->pEntry;
if( p ){
struct RowSetEntry **ppPrevTree = &pRowSet->pForest;
- if( (pRowSet->rsFlags & ROWSET_SORTED)==0 ){
+ if( (pRowSet->rsFlags & ROWSET_SORTED)==0 ){ /*OPTIMIZATION-IF-FALSE*/
+ /* Only sort the current set of entiries if they need it */
p = rowSetEntrySort(p);
}
for(pTree = pRowSet->pForest; pTree; pTree=pTree->pRight){
@@ -43308,21 +47366,21 @@ SQLITE_PRIVATE int sqlite3RowSetTest(RowSet *pRowSet, int iBatch, sqlite3_int64
** the implementation of each function in log.c for further details.
*/
-#ifndef _WAL_H_
-#define _WAL_H_
+#ifndef SQLITE_WAL_H
+#define SQLITE_WAL_H
/* #include "sqliteInt.h" */
-/* Additional values that can be added to the sync_flags argument of
-** sqlite3WalFrames():
+/* Macros for extracting appropriate sync flags for either transaction
+** commits (WAL_SYNC_FLAGS(X)) or for checkpoint ops (CKPT_SYNC_FLAGS(X)):
*/
-#define WAL_SYNC_TRANSACTIONS 0x20 /* Sync at the end of each transaction */
-#define SQLITE_SYNC_MASK 0x13 /* Mask off the SQLITE_SYNC_* values */
+#define WAL_SYNC_FLAGS(X) ((X)&0x03)
+#define CKPT_SYNC_FLAGS(X) (((X)>>2)&0x03)
#ifdef SQLITE_OMIT_WAL
# define sqlite3WalOpen(x,y,z) 0
# define sqlite3WalLimit(x,y)
-# define sqlite3WalClose(w,x,y,z) 0
+# define sqlite3WalClose(v,w,x,y,z) 0
# define sqlite3WalBeginReadTransaction(y,z) 0
# define sqlite3WalEndReadTransaction(z)
# define sqlite3WalDbsize(y) 0
@@ -43332,7 +47390,7 @@ SQLITE_PRIVATE int sqlite3RowSetTest(RowSet *pRowSet, int iBatch, sqlite3_int64
# define sqlite3WalSavepoint(y,z)
# define sqlite3WalSavepointUndo(y,z) 0
# define sqlite3WalFrames(u,v,w,x,y,z) 0
-# define sqlite3WalCheckpoint(r,s,t,u,v,w,x,y,z) 0
+# define sqlite3WalCheckpoint(q,r,s,t,u,v,w,x,y,z) 0
# define sqlite3WalCallback(z) 0
# define sqlite3WalExclusiveMode(y,z) 0
# define sqlite3WalHeapMemory(z) 0
@@ -43350,7 +47408,7 @@ typedef struct Wal Wal;
/* Open and close a connection to a write-ahead log. */
SQLITE_PRIVATE int sqlite3WalOpen(sqlite3_vfs*, sqlite3_file*, const char *, int, i64, Wal**);
-SQLITE_PRIVATE int sqlite3WalClose(Wal *pWal, int sync_flags, int, u8 *);
+SQLITE_PRIVATE int sqlite3WalClose(Wal *pWal, sqlite3*, int sync_flags, int, u8 *);
/* Set the limiting size of a WAL file. */
SQLITE_PRIVATE void sqlite3WalLimit(Wal*, i64);
@@ -43393,6 +47451,7 @@ SQLITE_PRIVATE int sqlite3WalFrames(Wal *pWal, int, PgHdr *, Pgno, int, int);
/* Copy pages from the log to the database file */
SQLITE_PRIVATE int sqlite3WalCheckpoint(
Wal *pWal, /* Write-ahead log connection */
+ sqlite3 *db, /* Check this handle's interrupt flag */
int eMode, /* One of PASSIVE, FULL and RESTART */
int (*xBusy)(void*), /* Function to call when busy */
void *pBusyArg, /* Context argument for xBusyHandler */
@@ -43424,6 +47483,7 @@ SQLITE_PRIVATE int sqlite3WalHeapMemory(Wal *pWal);
#ifdef SQLITE_ENABLE_SNAPSHOT
SQLITE_PRIVATE int sqlite3WalSnapshotGet(Wal *pWal, sqlite3_snapshot **ppSnapshot);
SQLITE_PRIVATE void sqlite3WalSnapshotOpen(Wal *pWal, sqlite3_snapshot *pSnapshot);
+SQLITE_PRIVATE int sqlite3WalSnapshotRecover(Wal *pWal);
#endif
#ifdef SQLITE_ENABLE_ZIPVFS
@@ -43437,7 +47497,7 @@ SQLITE_PRIVATE int sqlite3WalFramesize(Wal *pWal);
SQLITE_PRIVATE sqlite3_file *sqlite3WalFile(Wal *pWal);
#endif /* ifndef SQLITE_OMIT_WAL */
-#endif /* _WAL_H_ */
+#endif /* SQLITE_WAL_H */
/************** End of wal.h *************************************************/
/************** Continuing where we left off in pager.c **********************/
@@ -43548,8 +47608,8 @@ int sqlite3PagerTrace=1; /* True to enable tracing */
** associated file-descriptor is returned. FILEHANDLEID() takes an sqlite3_file
** struct as its argument.
*/
-#define PAGERID(p) ((int)(p->fd))
-#define FILEHANDLEID(fd) ((int)fd)
+#define PAGERID(p) (SQLITE_PTR_TO_INT(p->fd))
+#define FILEHANDLEID(fd) (SQLITE_PTR_TO_INT(fd))
/*
** The Pager.eState variable stores the current 'state' of a pager. A
@@ -43848,6 +47908,7 @@ int sqlite3PagerTrace=1; /* True to enable tracing */
*/
#define MAX_SECTOR_SIZE 0x10000
+
/*
** An instance of the following structure is allocated for each active
** savepoint and statement transaction in the system. All such structures
@@ -44035,6 +48096,18 @@ struct PagerSavepoint {
** is set to zero in all other states. In PAGER_ERROR state, Pager.errCode
** is always set to SQLITE_FULL, SQLITE_IOERR or one of the SQLITE_IOERR_XXX
** sub-codes.
+**
+** syncFlags, walSyncFlags
+**
+** syncFlags is either SQLITE_SYNC_NORMAL (0x02) or SQLITE_SYNC_FULL (0x03).
+** syncFlags is used for rollback mode. walSyncFlags is used for WAL mode
+** and contains the flags used to sync the checkpoint operations in the
+** lower two bits, and sync flags used for transaction commits in the WAL
+** file in bits 0x04 and 0x08. In other words, to get the correct sync flags
+** for checkpoint operations, use (walSyncFlags&0x03) and to get the correct
+** sync flags for transaction commit, use ((walSyncFlags>>2)&0x03). Note
+** that with synchronous=NORMAL in WAL mode, transaction commit is not synced
+** meaning that the 0x04 and 0x08 bits are both zero.
*/
struct Pager {
sqlite3_vfs *pVfs; /* OS functions to use for IO */
@@ -44043,9 +48116,9 @@ struct Pager {
u8 useJournal; /* Use a rollback journal on this file */
u8 noSync; /* Do not sync the journal if true */
u8 fullSync; /* Do extra syncs of the journal for robustness */
- u8 ckptSyncFlags; /* SYNC_NORMAL or SYNC_FULL for checkpoint */
- u8 walSyncFlags; /* SYNC_NORMAL or SYNC_FULL for wal writes */
+ u8 extraSync; /* sync directory after journal delete */
u8 syncFlags; /* SYNC_NORMAL or SYNC_FULL otherwise */
+ u8 walSyncFlags; /* See description above */
u8 tempFile; /* zFilename is a temporary or immutable file */
u8 noLock; /* Do not lock (except in WAL mode) */
u8 readOnly; /* True for a read-only database */
@@ -44111,6 +48184,7 @@ struct Pager {
int nRead; /* Database pages read */
#endif
void (*xReiniter)(DbPage*); /* Call this routine when reloading pages */
+ int (*xGet)(Pager*,Pgno,DbPage**,int); /* Routine to fetch a patch */
#ifdef SQLITE_HAS_CODEC
void *(*xCodec)(void*,void*,Pgno,int); /* Routine for en/decoding data */
void (*xCodecSizeChng)(void*,int,int); /* Notify of page size changes */
@@ -44231,13 +48305,20 @@ static const unsigned char aJournalMagic[] = {
#define isOpen(pFd) ((pFd)->pMethods!=0)
/*
-** Return true if this pager uses a write-ahead log instead of the usual
-** rollback journal. Otherwise false.
+** Return true if this pager uses a write-ahead log to read page pgno.
+** Return false if the pager reads pgno directly from the database.
*/
-#ifndef SQLITE_OMIT_WAL
-static int pagerUseWal(Pager *pPager){
- return (pPager->pWal!=0);
+#if !defined(SQLITE_OMIT_WAL) && defined(SQLITE_DIRECT_OVERFLOW_READ)
+SQLITE_PRIVATE int sqlite3PagerUseWal(Pager *pPager, Pgno pgno){
+ u32 iRead = 0;
+ int rc;
+ if( pPager->pWal==0 ) return 0;
+ rc = sqlite3WalFindFrame(pPager->pWal, pgno, &iRead);
+ return rc || iRead;
}
+#endif
+#ifndef SQLITE_OMIT_WAL
+# define pagerUseWal(x) ((x)->pWal!=0)
#else
# define pagerUseWal(x) 0
# define pagerRollbackWal(x) 0
@@ -44290,6 +48371,7 @@ static int assert_pager_state(Pager *p){
** state.
*/
if( MEMDB ){
+ assert( !isOpen(p->fd) );
assert( p->noSync );
assert( p->journalMode==PAGER_JOURNALMODE_OFF
|| p->journalMode==PAGER_JOURNALMODE_MEMORY
@@ -44356,6 +48438,7 @@ static int assert_pager_state(Pager *p){
assert( isOpen(p->jfd)
|| p->journalMode==PAGER_JOURNALMODE_OFF
|| p->journalMode==PAGER_JOURNALMODE_WAL
+ || (sqlite3OsDeviceCharacteristics(p->fd)&SQLITE_IOCAP_BATCH_ATOMIC)
);
assert( pPager->dbOrigSize<=pPager->dbHintSize );
break;
@@ -44367,6 +48450,7 @@ static int assert_pager_state(Pager *p){
assert( isOpen(p->jfd)
|| p->journalMode==PAGER_JOURNALMODE_OFF
|| p->journalMode==PAGER_JOURNALMODE_WAL
+ || (sqlite3OsDeviceCharacteristics(p->fd)&SQLITE_IOCAP_BATCH_ATOMIC)
);
break;
@@ -44376,7 +48460,7 @@ static int assert_pager_state(Pager *p){
** back to OPEN state.
*/
assert( pPager->errCode!=SQLITE_OK );
- assert( sqlite3PcacheRefCount(pPager->pPCache)>0 );
+ assert( sqlite3PcacheRefCount(pPager->pPCache)>0 || pPager->tempFile );
break;
}
@@ -44435,6 +48519,33 @@ static char *print_pager_state(Pager *p){
}
#endif
+/* Forward references to the various page getters */
+static int getPageNormal(Pager*,Pgno,DbPage**,int);
+static int getPageError(Pager*,Pgno,DbPage**,int);
+#if SQLITE_MAX_MMAP_SIZE>0
+static int getPageMMap(Pager*,Pgno,DbPage**,int);
+#endif
+
+/*
+** Set the Pager.xGet method for the appropriate routine used to fetch
+** content from the pager.
+*/
+static void setGetterMethod(Pager *pPager){
+ if( pPager->errCode ){
+ pPager->xGet = getPageError;
+#if SQLITE_MAX_MMAP_SIZE>0
+ }else if( USEFETCH(pPager)
+#ifdef SQLITE_HAS_CODEC
+ && pPager->xCodec==0
+#endif
+ ){
+ pPager->xGet = getPageMMap;
+#endif /* SQLITE_MAX_MMAP_SIZE>0 */
+ }else{
+ pPager->xGet = getPageNormal;
+ }
+}
+
/*
** Return true if it is necessary to write page *pPg into the sub-journal.
** A page needs to be written into the sub-journal if there exists one
@@ -44550,34 +48661,47 @@ static int pagerLockDb(Pager *pPager, int eLock){
}
/*
-** This function determines whether or not the atomic-write optimization
-** can be used with this pager. The optimization can be used if:
+** This function determines whether or not the atomic-write or
+** atomic-batch-write optimizations can be used with this pager. The
+** atomic-write optimization can be used if:
**
** (a) the value returned by OsDeviceCharacteristics() indicates that
** a database page may be written atomically, and
** (b) the value returned by OsSectorSize() is less than or equal
** to the page size.
**
-** The optimization is also always enabled for temporary files. It is
-** an error to call this function if pPager is opened on an in-memory
-** database.
+** If it can be used, then the value returned is the size of the journal
+** file when it contains rollback data for exactly one page.
**
-** If the optimization cannot be used, 0 is returned. If it can be used,
-** then the value returned is the size of the journal file when it
-** contains rollback data for exactly one page.
+** The atomic-batch-write optimization can be used if OsDeviceCharacteristics()
+** returns a value with the SQLITE_IOCAP_BATCH_ATOMIC bit set. -1 is
+** returned in this case.
+**
+** If neither optimization can be used, 0 is returned.
*/
-#ifdef SQLITE_ENABLE_ATOMIC_WRITE
static int jrnlBufferSize(Pager *pPager){
assert( !MEMDB );
- if( !pPager->tempFile ){
- int dc; /* Device characteristics */
- int nSector; /* Sector size */
- int szPage; /* Page size */
- assert( isOpen(pPager->fd) );
- dc = sqlite3OsDeviceCharacteristics(pPager->fd);
- nSector = pPager->sectorSize;
- szPage = pPager->pageSize;
+#if defined(SQLITE_ENABLE_ATOMIC_WRITE) \
+ || defined(SQLITE_ENABLE_BATCH_ATOMIC_WRITE)
+ int dc; /* Device characteristics */
+
+ assert( isOpen(pPager->fd) );
+ dc = sqlite3OsDeviceCharacteristics(pPager->fd);
+#else
+ UNUSED_PARAMETER(pPager);
+#endif
+
+#ifdef SQLITE_ENABLE_BATCH_ATOMIC_WRITE
+ if( dc&SQLITE_IOCAP_BATCH_ATOMIC ){
+ return -1;
+ }
+#endif
+
+#ifdef SQLITE_ENABLE_ATOMIC_WRITE
+ {
+ int nSector = pPager->sectorSize;
+ int szPage = pPager->pageSize;
assert(SQLITE_IOCAP_ATOMIC512==(512>>8));
assert(SQLITE_IOCAP_ATOMIC64K==(65536>>8));
@@ -44587,9 +48711,11 @@ static int jrnlBufferSize(Pager *pPager){
}
return JOURNAL_HDR_SZ(pPager) + JOURNAL_PG_SZ(pPager);
-}
#endif
+ return 0;
+}
+
/*
** If SQLITE_CHECK_PAGES is defined then we do some sanity checking
** on the cache using a hash function. This is used for testing
@@ -44671,6 +48797,7 @@ static int readMasterJournal(sqlite3_file *pJrnl, char *zMaster, u32 nMaster){
|| szJ<16
|| SQLITE_OK!=(rc = read32bits(pJrnl, szJ-16, &len))
|| len>=nMaster
+ || len>szJ-16
|| len==0
|| SQLITE_OK!=(rc = read32bits(pJrnl, szJ-12, &cksum))
|| SQLITE_OK!=(rc = sqlite3OsRead(pJrnl, aMagic, 8, szJ-8))
@@ -44748,6 +48875,7 @@ static i64 journalHdrOffset(Pager *pPager){
static int zeroJournalHdr(Pager *pPager, int doTruncate){
int rc = SQLITE_OK; /* Return code */
assert( isOpen(pPager->jfd) );
+ assert( !sqlite3JournalIsInMemory(pPager->jfd) );
if( pPager->journalOff ){
const i64 iLimit = pPager->journalSizeLimit; /* Local cache of jsl */
@@ -45129,7 +49257,7 @@ static void releaseAllSavepoints(Pager *pPager){
for(ii=0; iinSavepoint; ii++){
sqlite3BitvecDestroy(pPager->aSavepoint[ii].pInSavepoint);
}
- if( !pPager->exclusiveMode || sqlite3IsMemJournal(pPager->sjfd) ){
+ if( !pPager->exclusiveMode || sqlite3JournalIsInMemory(pPager->sjfd) ){
sqlite3OsClose(pPager->sjfd);
}
sqlite3_free(pPager->aSavepoint);
@@ -45235,13 +49363,18 @@ static void pager_unlock(Pager *pPager){
** it can safely move back to PAGER_OPEN state. This happens in both
** normal and exclusive-locking mode.
*/
+ assert( pPager->errCode==SQLITE_OK || !MEMDB );
if( pPager->errCode ){
- assert( !MEMDB );
- pager_reset(pPager);
- pPager->changeCountDone = pPager->tempFile;
- pPager->eState = PAGER_OPEN;
- pPager->errCode = SQLITE_OK;
+ if( pPager->tempFile==0 ){
+ pager_reset(pPager);
+ pPager->changeCountDone = 0;
+ pPager->eState = PAGER_OPEN;
+ }else{
+ pPager->eState = (isOpen(pPager->jfd) ? PAGER_OPEN : PAGER_READER);
+ }
if( USEFETCH(pPager) ) sqlite3OsUnfetch(pPager->fd, 0, 0);
+ pPager->errCode = SQLITE_OK;
+ setGetterMethod(pPager);
}
pPager->journalOff = 0;
@@ -45279,12 +49412,36 @@ static int pager_error(Pager *pPager, int rc){
if( rc2==SQLITE_FULL || rc2==SQLITE_IOERR ){
pPager->errCode = rc;
pPager->eState = PAGER_ERROR;
+ setGetterMethod(pPager);
}
return rc;
}
static int pager_truncate(Pager *pPager, Pgno nPage);
+/*
+** The write transaction open on pPager is being committed (bCommit==1)
+** or rolled back (bCommit==0).
+**
+** Return TRUE if and only if all dirty pages should be flushed to disk.
+**
+** Rules:
+**
+** * For non-TEMP databases, always sync to disk. This is necessary
+** for transactions to be durable.
+**
+** * Sync TEMP database only on a COMMIT (not a ROLLBACK) when the backing
+** file has been created already (via a spill on pagerStress()) and
+** when the number of dirty pages in memory exceeds 25% of the total
+** cache size.
+*/
+static int pagerFlushOnCommit(Pager *pPager, int bCommit){
+ if( pPager->tempFile==0 ) return 1;
+ if( !bCommit ) return 0;
+ if( !isOpen(pPager->fd) ) return 0;
+ return (sqlite3PCachePercentDirty(pPager->pPCache)>=25);
+}
+
/*
** This routine ends a transaction. A transaction is usually ended by
** either a COMMIT or a ROLLBACK operation. This routine may be called
@@ -45362,13 +49519,15 @@ static int pager_end_transaction(Pager *pPager, int hasMaster, int bCommit){
}
releaseAllSavepoints(pPager);
- assert( isOpen(pPager->jfd) || pPager->pInJournal==0 );
+ assert( isOpen(pPager->jfd) || pPager->pInJournal==0
+ || (sqlite3OsDeviceCharacteristics(pPager->fd)&SQLITE_IOCAP_BATCH_ATOMIC)
+ );
if( isOpen(pPager->jfd) ){
assert( !pagerUseWal(pPager) );
/* Finalize the journal file. */
- if( sqlite3IsMemJournal(pPager->jfd) ){
- assert( pPager->journalMode==PAGER_JOURNALMODE_MEMORY );
+ if( sqlite3JournalIsInMemory(pPager->jfd) ){
+ /* assert( pPager->journalMode==PAGER_JOURNALMODE_MEMORY ); */
sqlite3OsClose(pPager->jfd);
}else if( pPager->journalMode==PAGER_JOURNALMODE_TRUNCATE ){
if( pPager->journalOff==0 ){
@@ -45388,22 +49547,23 @@ static int pager_end_transaction(Pager *pPager, int hasMaster, int bCommit){
}else if( pPager->journalMode==PAGER_JOURNALMODE_PERSIST
|| (pPager->exclusiveMode && pPager->journalMode!=PAGER_JOURNALMODE_WAL)
){
- rc = zeroJournalHdr(pPager, hasMaster);
+ rc = zeroJournalHdr(pPager, hasMaster||pPager->tempFile);
pPager->journalOff = 0;
}else{
/* This branch may be executed with Pager.journalMode==MEMORY if
** a hot-journal was just rolled back. In this case the journal
** file should be closed and deleted. If this connection writes to
- ** the database file, it will do so using an in-memory journal.
+ ** the database file, it will do so using an in-memory journal.
*/
- int bDelete = (!pPager->tempFile && sqlite3JournalExists(pPager->jfd));
+ int bDelete = !pPager->tempFile;
+ assert( sqlite3JournalIsInMemory(pPager->jfd)==0 );
assert( pPager->journalMode==PAGER_JOURNALMODE_DELETE
|| pPager->journalMode==PAGER_JOURNALMODE_MEMORY
|| pPager->journalMode==PAGER_JOURNALMODE_WAL
);
sqlite3OsClose(pPager->jfd);
if( bDelete ){
- rc = sqlite3OsDelete(pPager->pVfs, pPager->zJournal, 0);
+ rc = sqlite3OsDelete(pPager->pVfs, pPager->zJournal, pPager->extraSync);
}
}
}
@@ -45422,8 +49582,14 @@ static int pager_end_transaction(Pager *pPager, int hasMaster, int bCommit){
sqlite3BitvecDestroy(pPager->pInJournal);
pPager->pInJournal = 0;
pPager->nRec = 0;
- sqlite3PcacheCleanAll(pPager->pPCache);
- sqlite3PcacheTruncate(pPager->pPCache, pPager->dbSize);
+ if( rc==SQLITE_OK ){
+ if( MEMDB || pagerFlushOnCommit(pPager, bCommit) ){
+ sqlite3PcacheCleanAll(pPager->pPCache);
+ }else{
+ sqlite3PcacheClearWritable(pPager->pPCache);
+ }
+ sqlite3PcacheTruncate(pPager->pPCache, pPager->dbSize);
+ }
if( pagerUseWal(pPager) ){
/* Drop the WAL write-lock, if any. Also, if the connection was in
@@ -45601,6 +49767,11 @@ static int pager_playback_one_page(
char *aData; /* Temporary storage for the page */
sqlite3_file *jfd; /* The file descriptor for the journal file */
int isSynced; /* True if journal page is synced */
+#ifdef SQLITE_HAS_CODEC
+ /* The jrnlEnc flag is true if Journal pages should be passed through
+ ** the codec. It is false for pure in-memory journals. */
+ const int jrnlEnc = (isMainJrnl || pPager->subjInMemory==0);
+#endif
assert( (isMainJrnl&~1)==0 ); /* isMainJrnl is 0 or 1 */
assert( (isSavepnt&~1)==0 ); /* isSavepnt is 0 or 1 */
@@ -45707,7 +49878,7 @@ static int pager_playback_one_page(
pPg = sqlite3PagerLookup(pPager, pgno);
}
assert( pPg || !MEMDB );
- assert( pPager->eState!=PAGER_OPEN || pPg==0 );
+ assert( pPager->eState!=PAGER_OPEN || pPg==0 || pPager->tempFile );
PAGERTRACE(("PLAYBACK %d page %d hash(%08x) %s\n",
PAGERID(pPager), pgno, pager_datahash(pPager->pageSize, (u8*)aData),
(isMainJrnl?"main-journal":"sub-journal")
@@ -45724,14 +49895,34 @@ static int pager_playback_one_page(
i64 ofst = (pgno-1)*(i64)pPager->pageSize;
testcase( !isSavepnt && pPg!=0 && (pPg->flags&PGHDR_NEED_SYNC)!=0 );
assert( !pagerUseWal(pPager) );
+
+ /* Write the data read from the journal back into the database file.
+ ** This is usually safe even for an encrypted database - as the data
+ ** was encrypted before it was written to the journal file. The exception
+ ** is if the data was just read from an in-memory sub-journal. In that
+ ** case it must be encrypted here before it is copied into the database
+ ** file. */
+#ifdef SQLITE_HAS_CODEC
+ if( !jrnlEnc ){
+ CODEC2(pPager, aData, pgno, 7, rc=SQLITE_NOMEM_BKPT, aData);
+ rc = sqlite3OsWrite(pPager->fd, (u8 *)aData, pPager->pageSize, ofst);
+ CODEC1(pPager, aData, pgno, 3, rc=SQLITE_NOMEM_BKPT);
+ }else
+#endif
rc = sqlite3OsWrite(pPager->fd, (u8 *)aData, pPager->pageSize, ofst);
+
if( pgno>pPager->dbFileSize ){
pPager->dbFileSize = pgno;
}
if( pPager->pBackup ){
- CODEC1(pPager, aData, pgno, 3, rc=SQLITE_NOMEM);
+#ifdef SQLITE_HAS_CODEC
+ if( jrnlEnc ){
+ CODEC1(pPager, aData, pgno, 3, rc=SQLITE_NOMEM_BKPT);
+ sqlite3BackupUpdate(pPager->pBackup, pgno, (u8*)aData);
+ CODEC2(pPager, aData, pgno, 7, rc=SQLITE_NOMEM_BKPT,aData);
+ }else
+#endif
sqlite3BackupUpdate(pPager->pBackup, pgno, (u8*)aData);
- CODEC2(pPager, aData, pgno, 7, rc=SQLITE_NOMEM, aData);
}
}else if( !isMainJrnl && pPg==0 ){
/* If this is a rollback of a savepoint and data was not written to
@@ -45757,7 +49948,6 @@ static int pager_playback_one_page(
assert( (pPager->doNotSpill & SPILLFLAG_ROLLBACK)!=0 );
pPager->doNotSpill &= ~SPILLFLAG_ROLLBACK;
if( rc!=SQLITE_OK ) return rc;
- pPg->flags &= ~PGHDR_NEED_READ;
sqlite3PcacheMakeDirty(pPg);
}
if( pPg ){
@@ -45771,29 +49961,10 @@ static int pager_playback_one_page(
pData = pPg->pData;
memcpy(pData, (u8*)aData, pPager->pageSize);
pPager->xReiniter(pPg);
- if( isMainJrnl && (!isSavepnt || *pOffset<=pPager->journalHdr) ){
- /* If the contents of this page were just restored from the main
- ** journal file, then its content must be as they were when the
- ** transaction was first opened. In this case we can mark the page
- ** as clean, since there will be no need to write it out to the
- ** database.
- **
- ** There is one exception to this rule. If the page is being rolled
- ** back as part of a savepoint (or statement) rollback from an
- ** unsynced portion of the main journal file, then it is not safe
- ** to mark the page as clean. This is because marking the page as
- ** clean will clear the PGHDR_NEED_SYNC flag. Since the page is
- ** already in the journal file (recorded in Pager.pInJournal) and
- ** the PGHDR_NEED_SYNC flag is cleared, if the page is written to
- ** again within this transaction, it will be marked as dirty but
- ** the PGHDR_NEED_SYNC flag will not be set. It could then potentially
- ** be written out into the database file before its journal file
- ** segment is synced. If a crash occurs during or following this,
- ** database corruption may ensue.
- */
- assert( !pagerUseWal(pPager) );
- sqlite3PcacheMakeClean(pPg);
- }
+ /* It used to be that sqlite3PcacheMakeClean(pPg) was called here. But
+ ** that call was dangerous and had no detectable benefit since the cache
+ ** is normally cleaned by sqlite3PcacheCleanAll() after rollback and so
+ ** has been removed. */
pager_set_pagehash(pPg);
/* If this was page 1, then restore the value of Pager.dbFileVers.
@@ -45803,7 +49974,9 @@ static int pager_playback_one_page(
}
/* Decode the page just read from disk */
- CODEC1(pPager, pData, pPg->pgno, 3, rc=SQLITE_NOMEM);
+#if SQLITE_HAS_CODEC
+ if( jrnlEnc ){ CODEC1(pPager, pData, pPg->pgno, 3, rc=SQLITE_NOMEM_BKPT); }
+#endif
sqlite3PcacheRelease(pPg);
}
return rc;
@@ -45869,7 +50042,7 @@ static int pager_delmaster(Pager *pPager, const char *zMaster){
pMaster = (sqlite3_file *)sqlite3MallocZero(pVfs->szOsFile * 2);
pJournal = (sqlite3_file *)(((u8 *)pMaster) + pVfs->szOsFile);
if( !pMaster ){
- rc = SQLITE_NOMEM;
+ rc = SQLITE_NOMEM_BKPT;
}else{
const int flags = (SQLITE_OPEN_READONLY|SQLITE_OPEN_MASTER_JOURNAL);
rc = sqlite3OsOpen(pVfs, zMaster, pMaster, flags, 0);
@@ -45886,7 +50059,7 @@ static int pager_delmaster(Pager *pPager, const char *zMaster){
nMasterPtr = pVfs->mxPathname+1;
zMasterJournal = sqlite3Malloc(nMasterJournal + nMasterPtr + 1);
if( !zMasterJournal ){
- rc = SQLITE_NOMEM;
+ rc = SQLITE_NOMEM_BKPT;
goto delmaster_out;
}
zMasterPtr = &zMasterJournal[nMasterJournal+1];
@@ -46116,6 +50289,7 @@ static int pager_playback(Pager *pPager, int isHot){
char *zMaster = 0; /* Name of master journal file if any */
int needPagerReset; /* True to reset page prior to first page rollback */
int nPlayback = 0; /* Total number of pages restored from journal */
+ u32 savedPageSize = pPager->pageSize;
/* Figure out how many records are in the journal. Abort early if
** the journal is empty.
@@ -46134,7 +50308,7 @@ static int pager_playback(Pager *pPager, int isHot){
** TODO: Technically the following is an error because it assumes that
** buffer Pager.pTmpSpace is (mxPathname+1) bytes or larger. i.e. that
** (pPager->pageSize >= pPager->pVfs->mxPathname+1). Using os_unix.c,
- ** mxPathname is 512, which is the same as the minimum allowable value
+ ** mxPathname is 512, which is the same as the minimum allowable value
** for pageSize.
*/
zMaster = pPager->pTmpSpace;
@@ -46245,6 +50419,9 @@ static int pager_playback(Pager *pPager, int isHot){
assert( 0 );
end_playback:
+ if( rc==SQLITE_OK ){
+ rc = sqlite3PagerSetPagesize(pPager, &savedPageSize, -1);
+ }
/* Following a rollback, the database file should be back in its original
** state prior to the start of the transaction, so invoke the
** SQLITE_FCNTL_DB_UNCHANGED file-control method to disable the
@@ -46303,7 +50480,8 @@ end_playback:
/*
-** Read the content for page pPg out of the database file and into
+** Read the content for page pPg out of the database file (or out of
+** the WAL if that is where the most recent copy if found) into
** pPg->pData. A shared lock or greater must be held on the database
** file before this function is called.
**
@@ -46313,30 +50491,33 @@ end_playback:
** If an IO error occurs, then the IO error is returned to the caller.
** Otherwise, SQLITE_OK is returned.
*/
-static int readDbPage(PgHdr *pPg, u32 iFrame){
+static int readDbPage(PgHdr *pPg){
Pager *pPager = pPg->pPager; /* Pager object associated with page pPg */
- Pgno pgno = pPg->pgno; /* Page number to read */
int rc = SQLITE_OK; /* Return code */
- int pgsz = pPager->pageSize; /* Number of bytes to read */
+
+#ifndef SQLITE_OMIT_WAL
+ u32 iFrame = 0; /* Frame of WAL containing pgno */
assert( pPager->eState>=PAGER_READER && !MEMDB );
assert( isOpen(pPager->fd) );
-#ifndef SQLITE_OMIT_WAL
+ if( pagerUseWal(pPager) ){
+ rc = sqlite3WalFindFrame(pPager->pWal, pPg->pgno, &iFrame);
+ if( rc ) return rc;
+ }
if( iFrame ){
- /* Try to pull the page from the write-ahead log. */
- rc = sqlite3WalReadFrame(pPager->pWal, iFrame, pgsz, pPg->pData);
+ rc = sqlite3WalReadFrame(pPager->pWal, iFrame,pPager->pageSize,pPg->pData);
}else
#endif
{
- i64 iOffset = (pgno-1)*(i64)pPager->pageSize;
- rc = sqlite3OsRead(pPager->fd, pPg->pData, pgsz, iOffset);
+ i64 iOffset = (pPg->pgno-1)*(i64)pPager->pageSize;
+ rc = sqlite3OsRead(pPager->fd, pPg->pData, pPager->pageSize, iOffset);
if( rc==SQLITE_IOERR_SHORT_READ ){
rc = SQLITE_OK;
}
}
- if( pgno==1 ){
+ if( pPg->pgno==1 ){
if( rc ){
/* If the read is unsuccessful, set the dbFileVers[] to something
** that will never be a valid file version. dbFileVers[] is a copy
@@ -46356,13 +50537,13 @@ static int readDbPage(PgHdr *pPg, u32 iFrame){
memcpy(&pPager->dbFileVers, dbFileVers, sizeof(pPager->dbFileVers));
}
}
- CODEC1(pPager, pPg->pData, pgno, 3, rc = SQLITE_NOMEM);
+ CODEC1(pPager, pPg->pData, pPg->pgno, 3, rc = SQLITE_NOMEM_BKPT);
PAGER_INCR(sqlite3_pager_readdb_count);
PAGER_INCR(pPager->nRead);
- IOTRACE(("PGIN %p %d\n", pPager, pgno));
+ IOTRACE(("PGIN %p %d\n", pPager, pPg->pgno));
PAGERTRACE(("FETCH %d page %d hash(%08x)\n",
- PAGERID(pPager), pgno, pager_pagehash(pPg)));
+ PAGERID(pPager), pPg->pgno, pager_pagehash(pPg)));
return rc;
}
@@ -46413,11 +50594,7 @@ static int pagerUndoCallback(void *pCtx, Pgno iPg){
if( sqlite3PcachePageRefcount(pPg)==1 ){
sqlite3PcacheDrop(pPg);
}else{
- u32 iFrame = 0;
- rc = sqlite3WalFindFrame(pPager->pWal, pPg->pgno, &iFrame);
- if( rc==SQLITE_OK ){
- rc = readDbPage(pPg, iFrame);
- }
+ rc = readDbPage(pPg);
if( rc==SQLITE_OK ){
pPager->xReiniter(pPg);
}
@@ -46584,21 +50761,20 @@ static int pagerPagecount(Pager *pPager, Pgno *pnPage){
*/
assert( pPager->eState==PAGER_OPEN );
assert( pPager->eLock>=SHARED_LOCK );
+ assert( isOpen(pPager->fd) );
+ assert( pPager->tempFile==0 );
nPage = sqlite3WalDbsize(pPager->pWal);
/* If the number of pages in the database is not available from the
- ** WAL sub-system, determine the page counte based on the size of
+ ** WAL sub-system, determine the page count based on the size of
** the database file. If the size of the database file is not an
** integer multiple of the page-size, round up the result.
*/
- if( nPage==0 ){
+ if( nPage==0 && ALWAYS(isOpen(pPager->fd)) ){
i64 n = 0; /* Size of db file in bytes */
- assert( isOpen(pPager->fd) || pPager->tempFile );
- if( isOpen(pPager->fd) ){
- int rc = sqlite3OsFileSize(pPager->fd, &n);
- if( rc!=SQLITE_OK ){
- return rc;
- }
+ int rc = sqlite3OsFileSize(pPager->fd, &n);
+ if( rc!=SQLITE_OK ){
+ return rc;
}
nPage = (Pgno)((n+pPager->pageSize-1) / pPager->pageSize);
}
@@ -46641,23 +50817,21 @@ static int pagerOpenWalIfPresent(Pager *pPager){
if( !pPager->tempFile ){
int isWal; /* True if WAL file exists */
- Pgno nPage; /* Size of the database file */
-
- rc = pagerPagecount(pPager, &nPage);
- if( rc ) return rc;
- if( nPage==0 ){
- rc = sqlite3OsDelete(pPager->pVfs, pPager->zWal, 0);
- if( rc==SQLITE_IOERR_DELETE_NOENT ) rc = SQLITE_OK;
- isWal = 0;
- }else{
- rc = sqlite3OsAccess(
- pPager->pVfs, pPager->zWal, SQLITE_ACCESS_EXISTS, &isWal
- );
- }
+ rc = sqlite3OsAccess(
+ pPager->pVfs, pPager->zWal, SQLITE_ACCESS_EXISTS, &isWal
+ );
if( rc==SQLITE_OK ){
if( isWal ){
- testcase( sqlite3PcachePagecount(pPager->pPCache)==0 );
- rc = sqlite3PagerOpenWal(pPager, 0);
+ Pgno nPage; /* Size of the database file */
+
+ rc = pagerPagecount(pPager, &nPage);
+ if( rc ) return rc;
+ if( nPage==0 ){
+ rc = sqlite3OsDelete(pPager->pVfs, pPager->zWal, 0);
+ }else{
+ testcase( sqlite3PcachePagecount(pPager->pPCache)==0 );
+ rc = sqlite3PagerOpenWal(pPager, 0);
+ }
}else if( pPager->journalMode==PAGER_JOURNALMODE_WAL ){
pPager->journalMode = PAGER_JOURNALMODE_DELETE;
}
@@ -46716,7 +50890,7 @@ static int pagerPlaybackSavepoint(Pager *pPager, PagerSavepoint *pSavepoint){
if( pSavepoint ){
pDone = sqlite3BitvecCreate(pSavepoint->nOrig);
if( !pDone ){
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
}
@@ -46837,6 +51011,7 @@ static void pagerFixMaplimit(Pager *pPager){
sqlite3_int64 sz;
sz = pPager->szMmap;
pPager->bUseFetch = (sz>0);
+ setGetterMethod(pPager);
sqlite3OsFileControlHint(pPager->fd, SQLITE_FCNTL_MMAP_SIZE, &sz);
}
#endif
@@ -46863,7 +51038,7 @@ SQLITE_PRIVATE void sqlite3PagerShrink(Pager *pPager){
** The "level" in pgFlags & PAGER_SYNCHRONOUS_MASK sets the robustness
** of the database to damage due to OS crashes or power failures by
** changing the number of syncs()s when writing the journals.
-** There are three levels:
+** There are four levels:
**
** OFF sqlite3OsSync() is never called. This is the default
** for temporary and transient files.
@@ -46883,6 +51058,10 @@ SQLITE_PRIVATE void sqlite3PagerShrink(Pager *pPager){
** assurance that the journal will not be corrupted to the
** point of causing damage to the database during rollback.
**
+** EXTRA This is like FULL except that is also syncs the directory
+** that contains the rollback journal after the rollback
+** journal is unlinked.
+**
** The above is for a rollback-journal mode. For WAL mode, OFF continues
** to mean that no syncs ever occur. NORMAL means that the WAL is synced
** prior to the start of checkpoint and that the database file is synced
@@ -46890,7 +51069,8 @@ SQLITE_PRIVATE void sqlite3PagerShrink(Pager *pPager){
** was written back into the database. But no sync operations occur for
** an ordinary commit in NORMAL mode with WAL. FULL means that the WAL
** file is synced following each commit operation, in addition to the
-** syncs associated with NORMAL.
+** syncs associated with NORMAL. There is no difference between FULL
+** and EXTRA for WAL mode.
**
** Do not confuse synchronous=FULL with SQLITE_SYNC_FULL. The
** SQLITE_SYNC_FULL macro means to use the MacOSX-style full-fsync
@@ -46909,25 +51089,28 @@ SQLITE_PRIVATE void sqlite3PagerSetFlags(
unsigned pgFlags /* Various flags */
){
unsigned level = pgFlags & PAGER_SYNCHRONOUS_MASK;
- assert( level>=1 && level<=3 );
- pPager->noSync = (level==1 || pPager->tempFile) ?1:0;
- pPager->fullSync = (level==3 && !pPager->tempFile) ?1:0;
+ if( pPager->tempFile ){
+ pPager->noSync = 1;
+ pPager->fullSync = 0;
+ pPager->extraSync = 0;
+ }else{
+ pPager->noSync = level==PAGER_SYNCHRONOUS_OFF ?1:0;
+ pPager->fullSync = level>=PAGER_SYNCHRONOUS_FULL ?1:0;
+ pPager->extraSync = level==PAGER_SYNCHRONOUS_EXTRA ?1:0;
+ }
if( pPager->noSync ){
pPager->syncFlags = 0;
- pPager->ckptSyncFlags = 0;
}else if( pgFlags & PAGER_FULLFSYNC ){
pPager->syncFlags = SQLITE_SYNC_FULL;
- pPager->ckptSyncFlags = SQLITE_SYNC_FULL;
- }else if( pgFlags & PAGER_CKPT_FULLFSYNC ){
- pPager->syncFlags = SQLITE_SYNC_NORMAL;
- pPager->ckptSyncFlags = SQLITE_SYNC_FULL;
}else{
pPager->syncFlags = SQLITE_SYNC_NORMAL;
- pPager->ckptSyncFlags = SQLITE_SYNC_NORMAL;
}
- pPager->walSyncFlags = pPager->syncFlags;
+ pPager->walSyncFlags = (pPager->syncFlags<<2);
if( pPager->fullSync ){
- pPager->walSyncFlags |= WAL_SYNC_TRANSACTIONS;
+ pPager->walSyncFlags |= pPager->syncFlags;
+ }
+ if( (pgFlags & PAGER_CKPT_FULLFSYNC) && !pPager->noSync ){
+ pPager->walSyncFlags |= (SQLITE_SYNC_FULL<<2);
}
if( pgFlags & PAGER_CACHESPILL ){
pPager->doNotSpill &= ~SPILLFLAG_OFF;
@@ -47073,7 +51256,7 @@ SQLITE_PRIVATE int sqlite3PagerSetPagesize(Pager *pPager, u32 *pPageSize, int nR
}
if( rc==SQLITE_OK ){
pNew = (char *)sqlite3PageMalloc(pageSize);
- if( !pNew ) rc = SQLITE_NOMEM;
+ if( !pNew ) rc = SQLITE_NOMEM_BKPT;
}
if( rc==SQLITE_OK ){
@@ -47322,6 +51505,7 @@ static int pagerSyncHotJournal(Pager *pPager){
return rc;
}
+#if SQLITE_MAX_MMAP_SIZE>0
/*
** Obtain a reference to a memory mapped page object for page number pgno.
** The new object will use the pointer pData, obtained from xFetch().
@@ -47344,12 +51528,13 @@ static int pagerAcquireMapPage(
*ppPage = p = pPager->pMmapFreelist;
pPager->pMmapFreelist = p->pDirty;
p->pDirty = 0;
- memset(p->pExtra, 0, pPager->nExtra);
+ assert( pPager->nExtra>=8 );
+ memset(p->pExtra, 0, 8);
}else{
*ppPage = p = (PgHdr *)sqlite3MallocZero(sizeof(PgHdr) + pPager->nExtra);
if( p==0 ){
sqlite3OsUnfetch(pPager->fd, (i64)(pgno-1) * pPager->pageSize, pData);
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
p->pExtra = (void *)&p[1];
p->flags = PGHDR_MMAP;
@@ -47369,6 +51554,7 @@ static int pagerAcquireMapPage(
return SQLITE_OK;
}
+#endif
/*
** Release a reference to page pPg. pPg must have been returned by an
@@ -47411,9 +51597,10 @@ static void pagerFreeMapHdrs(Pager *pPager){
** a hot journal may be left in the filesystem but no error is returned
** to the caller.
*/
-SQLITE_PRIVATE int sqlite3PagerClose(Pager *pPager){
+SQLITE_PRIVATE int sqlite3PagerClose(Pager *pPager, sqlite3 *db){
u8 *pTmp = (u8 *)pPager->pTmpSpace;
+ assert( db || pagerUseWal(pPager)==0 );
assert( assert_pager_state(pPager) );
disable_simulated_io_errors();
sqlite3BeginBenignMalloc();
@@ -47421,7 +51608,10 @@ SQLITE_PRIVATE int sqlite3PagerClose(Pager *pPager){
/* pPager->errCode = 0; */
pPager->exclusiveMode = 0;
#ifndef SQLITE_OMIT_WAL
- sqlite3WalClose(pPager->pWal, pPager->ckptSyncFlags, pPager->pageSize, pTmp);
+ assert( db || pPager->pWal==0 );
+ sqlite3WalClose(pPager->pWal, db, pPager->walSyncFlags, pPager->pageSize,
+ (db && (db->flags & SQLITE_NoCkptOnClose) ? 0 : pTmp)
+ );
pPager->pWal = 0;
#endif
pager_reset(pPager);
@@ -47663,8 +51853,9 @@ static int pager_write_pagelist(Pager *pPager, PgHdr *pList){
/* This function is only called for rollback pagers in WRITER_DBMOD state. */
assert( !pagerUseWal(pPager) );
- assert( pPager->eState==PAGER_WRITER_DBMOD );
+ assert( pPager->tempFile || pPager->eState==PAGER_WRITER_DBMOD );
assert( pPager->eLock==EXCLUSIVE_LOCK );
+ assert( isOpen(pPager->fd) || pList->pDirty==0 );
/* If the file is a temp-file has not yet been opened, open it now. It
** is not possible for rc to be other than SQLITE_OK if this branch
@@ -47707,7 +51898,7 @@ static int pager_write_pagelist(Pager *pPager, PgHdr *pList){
if( pList->pgno==1 ) pager_write_changecounter(pList);
/* Encode the database */
- CODEC2(pPager, pList->pData, pgno, 6, return SQLITE_NOMEM, pData);
+ CODEC2(pPager, pList->pData, pgno, 6, return SQLITE_NOMEM_BKPT, pData);
/* Write out the page data. */
rc = sqlite3OsWrite(pPager->fd, pData, pPager->pageSize, offset);
@@ -47752,11 +51943,14 @@ static int pager_write_pagelist(Pager *pPager, PgHdr *pList){
static int openSubJournal(Pager *pPager){
int rc = SQLITE_OK;
if( !isOpen(pPager->sjfd) ){
+ const int flags = SQLITE_OPEN_SUBJOURNAL | SQLITE_OPEN_READWRITE
+ | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE
+ | SQLITE_OPEN_DELETEONCLOSE;
+ int nStmtSpill = sqlite3Config.nStmtSpill;
if( pPager->journalMode==PAGER_JOURNALMODE_MEMORY || pPager->subjInMemory ){
- sqlite3MemJournalOpen(pPager->sjfd);
- }else{
- rc = pagerOpentemp(pPager, pPager->sjfd, SQLITE_OPEN_SUBJOURNAL);
+ nStmtSpill = -1;
}
+ rc = sqlite3JournalOpen(pPager->pVfs, 0, pPager->sjfd, flags, nStmtSpill);
}
return rc;
}
@@ -47793,8 +51987,13 @@ static int subjournalPage(PgHdr *pPg){
void *pData = pPg->pData;
i64 offset = (i64)pPager->nSubRec*(4+pPager->pageSize);
char *pData2;
-
- CODEC2(pPager, pData, pPg->pgno, 7, return SQLITE_NOMEM, pData2);
+
+#if SQLITE_HAS_CODEC
+ if( !pPager->subjInMemory ){
+ CODEC2(pPager, pData, pPg->pgno, 7, return SQLITE_NOMEM_BKPT, pData2);
+ }else
+#endif
+ pData2 = pData;
PAGERTRACE(("STMT-JOURNAL %d page %d\n", PAGERID(pPager), pPg->pgno));
rc = write32bits(pPager->sjfd, offset, pPg->pgno);
if( rc==SQLITE_OK ){
@@ -47878,6 +52077,13 @@ static int pagerStress(void *p, PgHdr *pPg){
rc = pagerWalFrames(pPager, pPg, 0, 0);
}
}else{
+
+#ifdef SQLITE_ENABLE_BATCH_ATOMIC_WRITE
+ if( pPager->tempFile==0 ){
+ rc = sqlite3JournalCreate(pPager->jfd);
+ if( rc!=SQLITE_OK ) return pager_error(pPager, rc);
+ }
+#endif
/* Sync the journal file if required. */
if( pPg->flags&PGHDR_NEED_SYNC
@@ -47936,7 +52142,9 @@ SQLITE_PRIVATE int sqlite3PagerFlush(Pager *pPager){
**
** The nExtra parameter specifies the number of bytes of space allocated
** along with each page reference. This space is available to the user
-** via the sqlite3PagerGetExtra() API.
+** via the sqlite3PagerGetExtra() API. When a new page is allocated, the
+** first 8 bytes of this space are zeroed but the remainder is uninitialized.
+** (The extra space is used by btree as the MemPage object.)
**
** The flags argument is used to specify properties that affect the
** operation of the pager. It should be passed some bitwise combination
@@ -47977,18 +52185,8 @@ SQLITE_PRIVATE int sqlite3PagerOpen(
int nUri = 0; /* Number of bytes of URI args at *zUri */
/* Figure out how much space is required for each journal file-handle
- ** (there are two of them, the main journal and the sub-journal). This
- ** is the maximum space required for an in-memory journal file handle
- ** and a regular journal file-handle. Note that a "regular journal-handle"
- ** may be a wrapper capable of caching the first portion of the journal
- ** file in memory to implement the atomic-write optimization (see
- ** source file journal.c).
- */
- if( sqlite3JournalSize(pVfs)>sqlite3MemJournalSize() ){
- journalFileSize = ROUND8(sqlite3JournalSize(pVfs));
- }else{
- journalFileSize = ROUND8(sqlite3MemJournalSize());
- }
+ ** (there are two of them, the main journal and the sub-journal). */
+ journalFileSize = ROUND8(sqlite3JournalSize(pVfs));
/* Set the output variable to NULL in case an error occurs. */
*ppPager = 0;
@@ -47998,7 +52196,7 @@ SQLITE_PRIVATE int sqlite3PagerOpen(
memDb = 1;
if( zFilename && zFilename[0] ){
zPathname = sqlite3DbStrDup(0, zFilename);
- if( zPathname==0 ) return SQLITE_NOMEM;
+ if( zPathname==0 ) return SQLITE_NOMEM_BKPT;
nPathname = sqlite3Strlen30(zPathname);
zFilename = 0;
}
@@ -48014,7 +52212,7 @@ SQLITE_PRIVATE int sqlite3PagerOpen(
nPathname = pVfs->mxPathname+1;
zPathname = sqlite3DbMallocRaw(0, nPathname*2);
if( zPathname==0 ){
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
zPathname[0] = 0; /* Make sure initialized even if FullPathname() fails */
rc = sqlite3OsFullPathname(pVfs, zFilename, nPathname, zPathname);
@@ -48067,7 +52265,7 @@ SQLITE_PRIVATE int sqlite3PagerOpen(
assert( EIGHT_BYTE_ALIGNMENT(SQLITE_INT_TO_PTR(journalFileSize)) );
if( !pPtr ){
sqlite3DbFree(0, zPathname);
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
pPager = (Pager*)(pPtr);
pPager->pPCache = (PCache*)(pPtr += ROUND8(sizeof(*pPager)));
@@ -48176,8 +52374,8 @@ act_like_temp_file:
/* Initialize the PCache object. */
if( rc==SQLITE_OK ){
- assert( nExtra<1000 );
nExtra = ROUND8(nExtra);
+ assert( nExtra>=8 && nExtra<1000 );
rc = sqlite3PcacheOpen(szPageDflt, nExtra, !memDb,
!memDb?pagerStress:0, (void *)pPager, pPager->pPCache);
}
@@ -48216,14 +52414,14 @@ act_like_temp_file:
pPager->noSync = pPager->tempFile;
if( pPager->noSync ){
assert( pPager->fullSync==0 );
+ assert( pPager->extraSync==0 );
assert( pPager->syncFlags==0 );
assert( pPager->walSyncFlags==0 );
- assert( pPager->ckptSyncFlags==0 );
}else{
pPager->fullSync = 1;
+ pPager->extraSync = 0;
pPager->syncFlags = SQLITE_SYNC_NORMAL;
- pPager->walSyncFlags = SQLITE_SYNC_NORMAL | WAL_SYNC_TRANSACTIONS;
- pPager->ckptSyncFlags = SQLITE_SYNC_NORMAL;
+ pPager->walSyncFlags = SQLITE_SYNC_NORMAL | (SQLITE_SYNC_NORMAL<<2);
}
/* pPager->pFirst = 0; */
/* pPager->pFirstSynced = 0; */
@@ -48240,6 +52438,7 @@ act_like_temp_file:
/* pPager->xBusyHandler = 0; */
/* pPager->pBusyHandlerArg = 0; */
pPager->xReiniter = xReinit;
+ setGetterMethod(pPager);
/* memset(pPager->aHash, 0, sizeof(pPager->aHash)); */
/* pPager->szMmap = SQLITE_DEFAULT_MMAP_SIZE // will be set by btree.c */
@@ -48337,6 +52536,7 @@ static int hasHotJournal(Pager *pPager, int *pExists){
if( rc==SQLITE_OK && !locked ){
Pgno nPage; /* Number of pages in database file */
+ assert( pPager->tempFile==0 );
rc = pagerPagecount(pPager, &nPage);
if( rc==SQLITE_OK ){
/* If the database is zero pages in size, that means that either (1) the
@@ -48429,17 +52629,17 @@ SQLITE_PRIVATE int sqlite3PagerSharedLock(Pager *pPager){
/* This routine is only called from b-tree and only when there are no
** outstanding pages. This implies that the pager state should either
** be OPEN or READER. READER is only possible if the pager is or was in
- ** exclusive access mode.
- */
+ ** exclusive access mode. */
assert( sqlite3PcacheRefCount(pPager->pPCache)==0 );
assert( assert_pager_state(pPager) );
assert( pPager->eState==PAGER_OPEN || pPager->eState==PAGER_READER );
- if( NEVER(MEMDB && pPager->errCode) ){ return pPager->errCode; }
+ assert( pPager->errCode==SQLITE_OK );
if( !pagerUseWal(pPager) && pPager->eState==PAGER_OPEN ){
int bHotJournal = 1; /* True if there exists a hot journal-file */
assert( !MEMDB );
+ assert( pPager->tempFile==0 || pPager->eLock==EXCLUSIVE_LOCK );
rc = pager_wait_on_lock(pPager, SHARED_LOCK);
if( rc!=SQLITE_OK ){
@@ -48525,7 +52725,7 @@ SQLITE_PRIVATE int sqlite3PagerSharedLock(Pager *pPager){
assert( rc==SQLITE_OK );
rc = pagerSyncHotJournal(pPager);
if( rc==SQLITE_OK ){
- rc = pager_playback(pPager, 1);
+ rc = pager_playback(pPager, !pPager->tempFile);
pPager->eState = PAGER_OPEN;
}
}else if( !pPager->exclusiveMode ){
@@ -48576,19 +52776,14 @@ SQLITE_PRIVATE int sqlite3PagerSharedLock(Pager *pPager){
** detected. The chance of an undetected change is so small that
** it can be neglected.
*/
- Pgno nPage = 0;
char dbFileVers[sizeof(pPager->dbFileVers)];
- rc = pagerPagecount(pPager, &nPage);
- if( rc ) goto failed;
-
- if( nPage>0 ){
- IOTRACE(("CKVERS %p %d\n", pPager, sizeof(dbFileVers)));
- rc = sqlite3OsRead(pPager->fd, &dbFileVers, sizeof(dbFileVers), 24);
- if( rc!=SQLITE_OK && rc!=SQLITE_IOERR_SHORT_READ ){
+ IOTRACE(("CKVERS %p %d\n", pPager, sizeof(dbFileVers)));
+ rc = sqlite3OsRead(pPager->fd, &dbFileVers, sizeof(dbFileVers), 24);
+ if( rc!=SQLITE_OK ){
+ if( rc!=SQLITE_IOERR_SHORT_READ ){
goto failed;
}
- }else{
memset(dbFileVers, 0, sizeof(dbFileVers));
}
@@ -48621,7 +52816,7 @@ SQLITE_PRIVATE int sqlite3PagerSharedLock(Pager *pPager){
rc = pagerBeginReadTransaction(pPager);
}
- if( pPager->eState==PAGER_OPEN && rc==SQLITE_OK ){
+ if( pPager->tempFile==0 && pPager->eState==PAGER_OPEN && rc==SQLITE_OK ){
rc = pagerPagecount(pPager, &pPager->dbSize);
}
@@ -48646,16 +52841,24 @@ SQLITE_PRIVATE int sqlite3PagerSharedLock(Pager *pPager){
** nothing to rollback, so this routine is a no-op.
*/
static void pagerUnlockIfUnused(Pager *pPager){
- if( pPager->nMmapOut==0 && (sqlite3PcacheRefCount(pPager->pPCache)==0) ){
+ if( sqlite3PcacheRefCount(pPager->pPCache)==0 ){
+ assert( pPager->nMmapOut==0 ); /* because page1 is never memory mapped */
pagerUnlockAndRollback(pPager);
}
}
/*
-** Acquire a reference to page number pgno in pager pPager (a page
-** reference has type DbPage*). If the requested reference is
+** The page getter methods each try to acquire a reference to a
+** page with page number pgno. If the requested reference is
** successfully obtained, it is copied to *ppPage and SQLITE_OK returned.
**
+** There are different implementations of the getter method depending
+** on the current state of the pager.
+**
+** getPageNormal() -- The normal getter
+** getPageError() -- Used if the pager is in an error state
+** getPageMmap() -- Used if memory-mapped I/O is enabled
+**
** If the requested page is already in the cache, it is returned.
** Otherwise, a new page object is allocated and populated with data
** read from the database file. In some cases, the pcache module may
@@ -48667,14 +52870,14 @@ static void pagerUnlockIfUnused(Pager *pPager){
** already in the cache when this function is called, then the extra
** data is left as it was when the page object was last used.
**
-** If the database image is smaller than the requested page or if a
-** non-zero value is passed as the noContent parameter and the
+** If the database image is smaller than the requested page or if
+** the flags parameter contains the PAGER_GET_NOCONTENT bit and the
** requested page is not already stored in the cache, then no
** actual disk read occurs. In this case the memory image of the
** page is initialized to all zeros.
**
-** If noContent is true, it means that we do not care about the contents
-** of the page. This occurs in two scenarios:
+** If PAGER_GET_NOCONTENT is true, it means that we do not care about
+** the contents of the page. This occurs in two scenarios:
**
** a) When reading a free-list leaf page from the database, and
**
@@ -48682,8 +52885,8 @@ static void pagerUnlockIfUnused(Pager *pPager){
** a new page into the cache to be filled with the data read
** from the savepoint journal.
**
-** If noContent is true, then the data returned is zeroed instead of
-** being read from the database. Additionally, the bits corresponding
+** If PAGER_GET_NOCONTENT is true, then the data returned is zeroed instead
+** of being read from the database. Additionally, the bits corresponding
** to pgno in Pager.pInJournal (bitvec of pages already written to the
** journal file) and the PagerSavepoint.pInSavepoint bitvecs of any open
** savepoints are set. This means if the page is made writable at any
@@ -48701,106 +52904,39 @@ static void pagerUnlockIfUnused(Pager *pPager){
** Since Lookup() never goes to disk, it never has to deal with locks
** or journal files.
*/
-SQLITE_PRIVATE int sqlite3PagerGet(
+static int getPageNormal(
Pager *pPager, /* The pager open on the database file */
Pgno pgno, /* Page number to fetch */
DbPage **ppPage, /* Write a pointer to the page here */
int flags /* PAGER_GET_XXX flags */
){
int rc = SQLITE_OK;
- PgHdr *pPg = 0;
- u32 iFrame = 0; /* Frame to read from WAL file */
- const int noContent = (flags & PAGER_GET_NOCONTENT);
+ PgHdr *pPg;
+ u8 noContent; /* True if PAGER_GET_NOCONTENT is set */
+ sqlite3_pcache_page *pBase;
- /* It is acceptable to use a read-only (mmap) page for any page except
- ** page 1 if there is no write-transaction open or the ACQUIRE_READONLY
- ** flag was specified by the caller. And so long as the db is not a
- ** temporary or in-memory database. */
- const int bMmapOk = (pgno>1 && USEFETCH(pPager)
- && (pPager->eState==PAGER_READER || (flags & PAGER_GET_READONLY))
-#ifdef SQLITE_HAS_CODEC
- && pPager->xCodec==0
-#endif
- );
-
- /* Optimization note: Adding the "pgno<=1" term before "pgno==0" here
- ** allows the compiler optimizer to reuse the results of the "pgno>1"
- ** test in the previous statement, and avoid testing pgno==0 in the
- ** common case where pgno is large. */
- if( pgno<=1 && pgno==0 ){
- return SQLITE_CORRUPT_BKPT;
- }
+ assert( pPager->errCode==SQLITE_OK );
assert( pPager->eState>=PAGER_READER );
assert( assert_pager_state(pPager) );
- assert( noContent==0 || bMmapOk==0 );
-
assert( pPager->hasHeldSharedLock==1 );
- /* If the pager is in the error state, return an error immediately.
- ** Otherwise, request the page from the PCache layer. */
- if( pPager->errCode!=SQLITE_OK ){
- rc = pPager->errCode;
- }else{
- if( bMmapOk && pagerUseWal(pPager) ){
- rc = sqlite3WalFindFrame(pPager->pWal, pgno, &iFrame);
- if( rc!=SQLITE_OK ) goto pager_acquire_err;
- }
-
- if( bMmapOk && iFrame==0 ){
- void *pData = 0;
-
- rc = sqlite3OsFetch(pPager->fd,
- (i64)(pgno-1) * pPager->pageSize, pPager->pageSize, &pData
- );
-
- if( rc==SQLITE_OK && pData ){
- if( pPager->eState>PAGER_READER ){
- pPg = sqlite3PagerLookup(pPager, pgno);
- }
- if( pPg==0 ){
- rc = pagerAcquireMapPage(pPager, pgno, pData, &pPg);
- }else{
- sqlite3OsUnfetch(pPager->fd, (i64)(pgno-1)*pPager->pageSize, pData);
- }
- if( pPg ){
- assert( rc==SQLITE_OK );
- *ppPage = pPg;
- return SQLITE_OK;
- }
- }
- if( rc!=SQLITE_OK ){
- goto pager_acquire_err;
- }
- }
-
- {
- sqlite3_pcache_page *pBase;
- pBase = sqlite3PcacheFetch(pPager->pPCache, pgno, 3);
- if( pBase==0 ){
- rc = sqlite3PcacheFetchStress(pPager->pPCache, pgno, &pBase);
- if( rc!=SQLITE_OK ) goto pager_acquire_err;
- if( pBase==0 ){
- pPg = *ppPage = 0;
- rc = SQLITE_NOMEM;
- goto pager_acquire_err;
- }
- }
- pPg = *ppPage = sqlite3PcacheFetchFinish(pPager->pPCache, pgno, pBase);
- assert( pPg!=0 );
- }
- }
-
- if( rc!=SQLITE_OK ){
- /* Either the call to sqlite3PcacheFetch() returned an error or the
- ** pager was already in the error-state when this function was called.
- ** Set pPg to 0 and jump to the exception handler. */
+ if( pgno==0 ) return SQLITE_CORRUPT_BKPT;
+ pBase = sqlite3PcacheFetch(pPager->pPCache, pgno, 3);
+ if( pBase==0 ){
pPg = 0;
- goto pager_acquire_err;
+ rc = sqlite3PcacheFetchStress(pPager->pPCache, pgno, &pBase);
+ if( rc!=SQLITE_OK ) goto pager_acquire_err;
+ if( pBase==0 ){
+ rc = SQLITE_NOMEM_BKPT;
+ goto pager_acquire_err;
+ }
}
+ pPg = *ppPage = sqlite3PcacheFetchFinish(pPager->pPCache, pgno, pBase);
assert( pPg==(*ppPage) );
assert( pPg->pgno==pgno );
assert( pPg->pPager==pPager || pPg->pPager==0 );
+ noContent = (flags & PAGER_GET_NOCONTENT)!=0;
if( pPg->pPager && !noContent ){
/* In this case the pcache already contains an initialized copy of
** the page. Return without further ado. */
@@ -48810,18 +52946,20 @@ SQLITE_PRIVATE int sqlite3PagerGet(
}else{
/* The pager cache has created a new page. Its content needs to
- ** be initialized. */
-
- pPg->pPager = pPager;
-
- /* The maximum page number is 2^31. Return SQLITE_CORRUPT if a page
- ** number greater than this, or the unused locking-page, is requested. */
+ ** be initialized. But first some error checks:
+ **
+ ** (1) The maximum page number is 2^31
+ ** (2) Never try to fetch the locking page
+ */
if( pgno>PAGER_MAX_PGNO || pgno==PAGER_MJ_PGNO(pPager) ){
rc = SQLITE_CORRUPT_BKPT;
goto pager_acquire_err;
}
- if( MEMDB || pPager->dbSizefd) ){
+ pPg->pPager = pPager;
+
+ assert( !isOpen(pPager->fd) || !MEMDB );
+ if( !isOpen(pPager->fd) || pPager->dbSizepPager->mxPgno ){
rc = SQLITE_FULL;
goto pager_acquire_err;
@@ -48845,20 +52983,15 @@ SQLITE_PRIVATE int sqlite3PagerGet(
memset(pPg->pData, 0, pPager->pageSize);
IOTRACE(("ZERO %p %d\n", pPager, pgno));
}else{
- if( pagerUseWal(pPager) && bMmapOk==0 ){
- rc = sqlite3WalFindFrame(pPager->pWal, pgno, &iFrame);
- if( rc!=SQLITE_OK ) goto pager_acquire_err;
- }
assert( pPg->pPager==pPager );
pPager->aStat[PAGER_STAT_MISS]++;
- rc = readDbPage(pPg, iFrame);
+ rc = readDbPage(pPg);
if( rc!=SQLITE_OK ){
goto pager_acquire_err;
}
}
pager_set_pagehash(pPg);
}
-
return SQLITE_OK;
pager_acquire_err:
@@ -48867,11 +53000,109 @@ pager_acquire_err:
sqlite3PcacheDrop(pPg);
}
pagerUnlockIfUnused(pPager);
-
*ppPage = 0;
return rc;
}
+#if SQLITE_MAX_MMAP_SIZE>0
+/* The page getter for when memory-mapped I/O is enabled */
+static int getPageMMap(
+ Pager *pPager, /* The pager open on the database file */
+ Pgno pgno, /* Page number to fetch */
+ DbPage **ppPage, /* Write a pointer to the page here */
+ int flags /* PAGER_GET_XXX flags */
+){
+ int rc = SQLITE_OK;
+ PgHdr *pPg = 0;
+ u32 iFrame = 0; /* Frame to read from WAL file */
+
+ /* It is acceptable to use a read-only (mmap) page for any page except
+ ** page 1 if there is no write-transaction open or the ACQUIRE_READONLY
+ ** flag was specified by the caller. And so long as the db is not a
+ ** temporary or in-memory database. */
+ const int bMmapOk = (pgno>1
+ && (pPager->eState==PAGER_READER || (flags & PAGER_GET_READONLY))
+ );
+
+ assert( USEFETCH(pPager) );
+#ifdef SQLITE_HAS_CODEC
+ assert( pPager->xCodec==0 );
+#endif
+
+ /* Optimization note: Adding the "pgno<=1" term before "pgno==0" here
+ ** allows the compiler optimizer to reuse the results of the "pgno>1"
+ ** test in the previous statement, and avoid testing pgno==0 in the
+ ** common case where pgno is large. */
+ if( pgno<=1 && pgno==0 ){
+ return SQLITE_CORRUPT_BKPT;
+ }
+ assert( pPager->eState>=PAGER_READER );
+ assert( assert_pager_state(pPager) );
+ assert( pPager->hasHeldSharedLock==1 );
+ assert( pPager->errCode==SQLITE_OK );
+
+ if( bMmapOk && pagerUseWal(pPager) ){
+ rc = sqlite3WalFindFrame(pPager->pWal, pgno, &iFrame);
+ if( rc!=SQLITE_OK ){
+ *ppPage = 0;
+ return rc;
+ }
+ }
+ if( bMmapOk && iFrame==0 ){
+ void *pData = 0;
+ rc = sqlite3OsFetch(pPager->fd,
+ (i64)(pgno-1) * pPager->pageSize, pPager->pageSize, &pData
+ );
+ if( rc==SQLITE_OK && pData ){
+ if( pPager->eState>PAGER_READER || pPager->tempFile ){
+ pPg = sqlite3PagerLookup(pPager, pgno);
+ }
+ if( pPg==0 ){
+ rc = pagerAcquireMapPage(pPager, pgno, pData, &pPg);
+ }else{
+ sqlite3OsUnfetch(pPager->fd, (i64)(pgno-1)*pPager->pageSize, pData);
+ }
+ if( pPg ){
+ assert( rc==SQLITE_OK );
+ *ppPage = pPg;
+ return SQLITE_OK;
+ }
+ }
+ if( rc!=SQLITE_OK ){
+ *ppPage = 0;
+ return rc;
+ }
+ }
+ return getPageNormal(pPager, pgno, ppPage, flags);
+}
+#endif /* SQLITE_MAX_MMAP_SIZE>0 */
+
+/* The page getter method for when the pager is an error state */
+static int getPageError(
+ Pager *pPager, /* The pager open on the database file */
+ Pgno pgno, /* Page number to fetch */
+ DbPage **ppPage, /* Write a pointer to the page here */
+ int flags /* PAGER_GET_XXX flags */
+){
+ UNUSED_PARAMETER(pgno);
+ UNUSED_PARAMETER(flags);
+ assert( pPager->errCode!=SQLITE_OK );
+ *ppPage = 0;
+ return pPager->errCode;
+}
+
+
+/* Dispatch all page fetch requests to the appropriate getter method.
+*/
+SQLITE_PRIVATE int sqlite3PagerGet(
+ Pager *pPager, /* The pager open on the database file */
+ Pgno pgno, /* Page number to fetch */
+ DbPage **ppPage, /* Write a pointer to the page here */
+ int flags /* PAGER_GET_XXX flags */
+){
+ return pPager->xGet(pPager, pgno, ppPage, flags);
+}
+
/*
** Acquire a page if it is already in the in-memory cache. Do
** not read the page from disk. Return a pointer to the page,
@@ -48897,25 +53128,39 @@ SQLITE_PRIVATE DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno){
/*
** Release a page reference.
**
-** If the number of references to the page drop to zero, then the
-** page is added to the LRU list. When all references to all pages
-** are released, a rollback occurs and the lock on the database is
-** removed.
+** The sqlite3PagerUnref() and sqlite3PagerUnrefNotNull() may only be
+** used if we know that the page being released is not the last page.
+** The btree layer always holds page1 open until the end, so these first
+** to routines can be used to release any page other than BtShared.pPage1.
+**
+** Use sqlite3PagerUnrefPageOne() to release page1. This latter routine
+** checks the total number of outstanding pages and if the number of
+** pages reaches zero it drops the database lock.
*/
SQLITE_PRIVATE void sqlite3PagerUnrefNotNull(DbPage *pPg){
- Pager *pPager;
+ TESTONLY( Pager *pPager = pPg->pPager; )
assert( pPg!=0 );
- pPager = pPg->pPager;
if( pPg->flags & PGHDR_MMAP ){
+ assert( pPg->pgno!=1 ); /* Page1 is never memory mapped */
pagerReleaseMapPage(pPg);
}else{
sqlite3PcacheRelease(pPg);
}
- pagerUnlockIfUnused(pPager);
+ /* Do not use this routine to release the last reference to page1 */
+ assert( sqlite3PcacheRefCount(pPager->pPCache)>0 );
}
SQLITE_PRIVATE void sqlite3PagerUnref(DbPage *pPg){
if( pPg ) sqlite3PagerUnrefNotNull(pPg);
}
+SQLITE_PRIVATE void sqlite3PagerUnrefPageOne(DbPage *pPg){
+ Pager *pPager;
+ assert( pPg!=0 );
+ assert( pPg->pgno==1 );
+ assert( (pPg->flags & PGHDR_MMAP)==0 ); /* Page1 is never memory mapped */
+ pPager = pPg->pPager;
+ sqlite3PcacheRelease(pPg);
+ pagerUnlockIfUnused(pPager);
+}
/*
** This function is called at the start of every write transaction.
@@ -48955,7 +53200,7 @@ static int pager_open_journal(Pager *pPager){
if( !pagerUseWal(pPager) && pPager->journalMode!=PAGER_JOURNALMODE_OFF ){
pPager->pInJournal = sqlite3BitvecCreate(pPager->dbSize);
if( pPager->pInJournal==0 ){
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
/* Open the journal file if it is not already open. */
@@ -48963,24 +53208,24 @@ static int pager_open_journal(Pager *pPager){
if( pPager->journalMode==PAGER_JOURNALMODE_MEMORY ){
sqlite3MemJournalOpen(pPager->jfd);
}else{
- const int flags = /* VFS flags to open journal file */
- SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|
- (pPager->tempFile ?
- (SQLITE_OPEN_DELETEONCLOSE|SQLITE_OPEN_TEMP_JOURNAL):
- (SQLITE_OPEN_MAIN_JOURNAL)
- );
+ int flags = SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE;
+ int nSpill;
+ if( pPager->tempFile ){
+ flags |= (SQLITE_OPEN_DELETEONCLOSE|SQLITE_OPEN_TEMP_JOURNAL);
+ nSpill = sqlite3Config.nStmtSpill;
+ }else{
+ flags |= SQLITE_OPEN_MAIN_JOURNAL;
+ nSpill = jrnlBufferSize(pPager);
+ }
+
/* Verify that the database still has the same name as it did when
** it was originally opened. */
rc = databaseIsUnmoved(pPager);
if( rc==SQLITE_OK ){
-#ifdef SQLITE_ENABLE_ATOMIC_WRITE
- rc = sqlite3JournalOpen(
- pVfs, pPager->zJournal, pPager->jfd, flags, jrnlBufferSize(pPager)
+ rc = sqlite3JournalOpen (
+ pVfs, pPager->zJournal, pPager->jfd, flags, nSpill
);
-#else
- rc = sqlite3OsOpen(pVfs, pPager->zJournal, pPager->jfd, flags, 0);
-#endif
}
}
assert( rc!=SQLITE_OK || isOpen(pPager->jfd) );
@@ -49110,7 +53355,7 @@ static SQLITE_NOINLINE int pagerAddPageToRollbackJournal(PgHdr *pPg){
assert( pPg->pgno!=PAGER_MJ_PGNO(pPager) );
assert( pPager->journalHdr<=pPager->journalOff );
- CODEC2(pPager, pPg->pData, pPg->pgno, 7, return SQLITE_NOMEM, pData2);
+ CODEC2(pPager, pPg->pData, pPg->pgno, 7, return SQLITE_NOMEM_BKPT, pData2);
cksum = pager_cksum(pPager, (u8*)pData2);
/* Even if an IO or diskfull error occurs while journalling the
@@ -49345,12 +53590,13 @@ SQLITE_PRIVATE int sqlite3PagerWrite(PgHdr *pPg){
assert( (pPg->flags & PGHDR_MMAP)==0 );
assert( pPager->eState>=PAGER_WRITER_LOCKED );
assert( assert_pager_state(pPager) );
- if( pPager->errCode ){
- return pPager->errCode;
- }else if( (pPg->flags & PGHDR_WRITEABLE)!=0 && pPager->dbSize>=pPg->pgno ){
+ if( (pPg->flags & PGHDR_WRITEABLE)!=0 && pPager->dbSize>=pPg->pgno ){
if( pPager->nSavepoint ) return subjournalPageIfRequired(pPg);
return SQLITE_OK;
+ }else if( pPager->errCode ){
+ return pPager->errCode;
}else if( pPager->sectorSize > (u32)pPager->pageSize ){
+ assert( pPager->tempFile==0 );
return pagerWriteLargeSector(pPg);
}else{
return pager_write(pPg);
@@ -49381,14 +53627,21 @@ SQLITE_PRIVATE int sqlite3PagerIswriteable(DbPage *pPg){
**
** Tests show that this optimization can quadruple the speed of large
** DELETE operations.
+**
+** This optimization cannot be used with a temp-file, as the page may
+** have been dirty at the start of the transaction. In that case, if
+** memory pressure forces page pPg out of the cache, the data does need
+** to be written out to disk so that it may be read back in if the
+** current transaction is rolled back.
*/
SQLITE_PRIVATE void sqlite3PagerDontWrite(PgHdr *pPg){
Pager *pPager = pPg->pPager;
- if( (pPg->flags&PGHDR_DIRTY) && pPager->nSavepoint==0 ){
+ if( !pPager->tempFile && (pPg->flags&PGHDR_DIRTY) && pPager->nSavepoint==0 ){
PAGERTRACE(("DONT_WRITE page %d of %d\n", pPg->pgno, PAGERID(pPager)));
IOTRACE(("CLEAN %p %d\n", pPager, pPg->pgno))
pPg->flags |= PGHDR_DONT_WRITE;
pPg->flags &= ~PGHDR_WRITEABLE;
+ testcase( pPg->flags & PGHDR_NEED_SYNC );
pager_set_pagehash(pPg);
}
}
@@ -49467,7 +53720,7 @@ static int pager_incr_changecounter(Pager *pPager, int isDirectMode){
if( DIRECT_MODE ){
const void *zBuf;
assert( pPager->dbFileSize>0 );
- CODEC2(pPager, pPgHdr->pData, 1, 6, rc=SQLITE_NOMEM, zBuf);
+ CODEC2(pPager, pPgHdr->pData, 1, 6, rc=SQLITE_NOMEM_BKPT, zBuf);
if( rc==SQLITE_OK ){
rc = sqlite3OsWrite(pPager->fd, zBuf, pPager->pageSize, 0);
pPager->aStat[PAGER_STAT_WRITE]++;
@@ -49583,17 +53836,21 @@ SQLITE_PRIVATE int sqlite3PagerCommitPhaseOne(
/* If a prior error occurred, report that error again. */
if( NEVER(pPager->errCode) ) return pPager->errCode;
+ /* Provide the ability to easily simulate an I/O error during testing */
+ if( sqlite3FaultSim(400) ) return SQLITE_IOERR;
+
PAGERTRACE(("DATABASE SYNC: File=%s zMaster=%s nSize=%d\n",
pPager->zFilename, zMaster, pPager->dbSize));
/* If no database changes have been made, return early. */
if( pPager->eStatetempFile );
+ assert( isOpen(pPager->fd) || pPager->tempFile );
+ if( 0==pagerFlushOnCommit(pPager, 1) ){
/* If this is an in-memory db, or no pages have been written to, or this
** function has already been called, it is mostly a no-op. However, any
- ** backup in progress needs to be restarted.
- */
+ ** backup in progress needs to be restarted. */
sqlite3BackupRestart(pPager->pBackup);
}else{
if( pagerUseWal(pPager) ){
@@ -49615,6 +53872,21 @@ SQLITE_PRIVATE int sqlite3PagerCommitPhaseOne(
sqlite3PcacheCleanAll(pPager->pPCache);
}
}else{
+ /* The bBatch boolean is true if the batch-atomic-write commit method
+ ** should be used. No rollback journal is created if batch-atomic-write
+ ** is enabled.
+ */
+ sqlite3_file *fd = pPager->fd;
+#ifdef SQLITE_ENABLE_BATCH_ATOMIC_WRITE
+ const int bBatch = zMaster==0 /* An SQLITE_IOCAP_BATCH_ATOMIC commit */
+ && (sqlite3OsDeviceCharacteristics(fd) & SQLITE_IOCAP_BATCH_ATOMIC)
+ && !pPager->noSync
+ && sqlite3JournalIsInMemory(pPager->jfd);
+#else
+# define bBatch 0
+#endif
+
+#ifdef SQLITE_ENABLE_ATOMIC_WRITE
/* The following block updates the change-counter. Exactly how it
** does this depends on whether or not the atomic-update optimization
** was enabled at compile time, and if this transaction meets the
@@ -49638,33 +53910,40 @@ SQLITE_PRIVATE int sqlite3PagerCommitPhaseOne(
** in 'direct' mode. In this case the journal file will never be
** created for this transaction.
*/
- #ifdef SQLITE_ENABLE_ATOMIC_WRITE
- PgHdr *pPg;
- assert( isOpen(pPager->jfd)
- || pPager->journalMode==PAGER_JOURNALMODE_OFF
- || pPager->journalMode==PAGER_JOURNALMODE_WAL
- );
- if( !zMaster && isOpen(pPager->jfd)
- && pPager->journalOff==jrnlBufferSize(pPager)
- && pPager->dbSize>=pPager->dbOrigSize
- && (0==(pPg = sqlite3PcacheDirtyList(pPager->pPCache)) || 0==pPg->pDirty)
- ){
- /* Update the db file change counter via the direct-write method. The
- ** following call will modify the in-memory representation of page 1
- ** to include the updated change counter and then write page 1
- ** directly to the database file. Because of the atomic-write
- ** property of the host file-system, this is safe.
- */
- rc = pager_incr_changecounter(pPager, 1);
- }else{
- rc = sqlite3JournalCreate(pPager->jfd);
- if( rc==SQLITE_OK ){
- rc = pager_incr_changecounter(pPager, 0);
+ if( bBatch==0 ){
+ PgHdr *pPg;
+ assert( isOpen(pPager->jfd)
+ || pPager->journalMode==PAGER_JOURNALMODE_OFF
+ || pPager->journalMode==PAGER_JOURNALMODE_WAL
+ );
+ if( !zMaster && isOpen(pPager->jfd)
+ && pPager->journalOff==jrnlBufferSize(pPager)
+ && pPager->dbSize>=pPager->dbOrigSize
+ && (!(pPg = sqlite3PcacheDirtyList(pPager->pPCache)) || 0==pPg->pDirty)
+ ){
+ /* Update the db file change counter via the direct-write method. The
+ ** following call will modify the in-memory representation of page 1
+ ** to include the updated change counter and then write page 1
+ ** directly to the database file. Because of the atomic-write
+ ** property of the host file-system, this is safe.
+ */
+ rc = pager_incr_changecounter(pPager, 1);
+ }else{
+ rc = sqlite3JournalCreate(pPager->jfd);
+ if( rc==SQLITE_OK ){
+ rc = pager_incr_changecounter(pPager, 0);
+ }
}
}
- #else
+#else
+#ifdef SQLITE_ENABLE_BATCH_ATOMIC_WRITE
+ if( zMaster ){
+ rc = sqlite3JournalCreate(pPager->jfd);
+ if( rc!=SQLITE_OK ) goto commit_phase_one_exit;
+ }
+#endif
rc = pager_incr_changecounter(pPager, 0);
- #endif
+#endif
if( rc!=SQLITE_OK ) goto commit_phase_one_exit;
/* Write the master journal name into the journal file. If a master
@@ -49687,8 +53966,24 @@ SQLITE_PRIVATE int sqlite3PagerCommitPhaseOne(
*/
rc = syncJournal(pPager, 0);
if( rc!=SQLITE_OK ) goto commit_phase_one_exit;
-
+
+ if( bBatch ){
+ /* The pager is now in DBMOD state. But regardless of what happens
+ ** next, attempting to play the journal back into the database would
+ ** be unsafe. Close it now to make sure that does not happen. */
+ sqlite3OsClose(pPager->jfd);
+ rc = sqlite3OsFileControl(fd, SQLITE_FCNTL_BEGIN_ATOMIC_WRITE, 0);
+ if( rc!=SQLITE_OK ) goto commit_phase_one_exit;
+ }
rc = pager_write_pagelist(pPager,sqlite3PcacheDirtyList(pPager->pPCache));
+ if( bBatch ){
+ if( rc==SQLITE_OK ){
+ rc = sqlite3OsFileControl(fd, SQLITE_FCNTL_COMMIT_ATOMIC_WRITE, 0);
+ }else{
+ sqlite3OsFileControl(fd, SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE, 0);
+ }
+ }
+
if( rc!=SQLITE_OK ){
assert( rc!=SQLITE_IOERR_BLOCKED );
goto commit_phase_one_exit;
@@ -49832,6 +54127,7 @@ SQLITE_PRIVATE int sqlite3PagerRollback(Pager *pPager){
*/
pPager->errCode = SQLITE_ABORT;
pPager->eState = PAGER_ERROR;
+ setGetterMethod(pPager);
return rc;
}
}else{
@@ -49932,10 +54228,10 @@ SQLITE_PRIVATE void sqlite3PagerCacheStat(Pager *pPager, int eStat, int reset, i
}
/*
-** Return true if this is an in-memory pager.
+** Return true if this is an in-memory or temp-file backed pager.
*/
SQLITE_PRIVATE int sqlite3PagerIsMemdb(Pager *pPager){
- return MEMDB;
+ return pPager->tempFile;
}
/*
@@ -49966,7 +54262,7 @@ static SQLITE_NOINLINE int pagerOpenSavepoint(Pager *pPager, int nSavepoint){
pPager->aSavepoint, sizeof(PagerSavepoint)*nSavepoint
);
if( !aNew ){
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
memset(&aNew[nCurrent], 0, (nSavepoint-nCurrent) * sizeof(PagerSavepoint));
pPager->aSavepoint = aNew;
@@ -49982,7 +54278,7 @@ static SQLITE_NOINLINE int pagerOpenSavepoint(Pager *pPager, int nSavepoint){
aNew[ii].iSubRec = pPager->nSubRec;
aNew[ii].pInSavepoint = sqlite3BitvecCreate(pPager->dbSize);
if( !aNew[ii].pInSavepoint ){
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
if( pagerUseWal(pPager) ){
sqlite3WalSavepoint(pPager->pWal, aNew[ii].aWalData);
@@ -50036,7 +54332,11 @@ SQLITE_PRIVATE int sqlite3PagerOpenSavepoint(Pager *pPager, int nSavepoint){
** savepoint. If no errors occur, SQLITE_OK is returned.
*/
SQLITE_PRIVATE int sqlite3PagerSavepoint(Pager *pPager, int op, int iSavepoint){
- int rc = pPager->errCode; /* Return code */
+ int rc = pPager->errCode;
+
+#ifdef SQLITE_ENABLE_ZIPVFS
+ if( op==SAVEPOINT_RELEASE ) rc = SQLITE_OK;
+#endif
assert( op==SAVEPOINT_RELEASE || op==SAVEPOINT_ROLLBACK );
assert( iSavepoint>=0 || op==SAVEPOINT_ROLLBACK );
@@ -50060,7 +54360,7 @@ SQLITE_PRIVATE int sqlite3PagerSavepoint(Pager *pPager, int op, int iSavepoint){
if( op==SAVEPOINT_RELEASE ){
if( nNew==0 && isOpen(pPager->sjfd) ){
/* Only truncate if it is an in-memory sub-journal. */
- if( sqlite3IsMemJournal(pPager->sjfd) ){
+ if( sqlite3JournalIsInMemory(pPager->sjfd) ){
rc = sqlite3OsTruncate(pPager->sjfd, 0);
assert( rc==SQLITE_OK );
}
@@ -50077,6 +54377,21 @@ SQLITE_PRIVATE int sqlite3PagerSavepoint(Pager *pPager, int op, int iSavepoint){
rc = pagerPlaybackSavepoint(pPager, pSavepoint);
assert(rc!=SQLITE_DONE);
}
+
+#ifdef SQLITE_ENABLE_ZIPVFS
+ /* If the cache has been modified but the savepoint cannot be rolled
+ ** back journal_mode=off, put the pager in the error state. This way,
+ ** if the VFS used by this pager includes ZipVFS, the entire transaction
+ ** can be rolled back at the ZipVFS level. */
+ else if(
+ pPager->journalMode==PAGER_JOURNALMODE_OFF
+ && pPager->eState>=PAGER_WRITER_CACHEMOD
+ ){
+ pPager->errCode = SQLITE_ABORT;
+ pPager->eState = PAGER_ERROR;
+ setGetterMethod(pPager);
+ }
+#endif
}
return rc;
@@ -50131,14 +54446,6 @@ SQLITE_PRIVATE const char *sqlite3PagerJournalname(Pager *pPager){
return pPager->zJournal;
}
-/*
-** Return true if fsync() calls are disabled for this pager. Return FALSE
-** if fsync()s are executed normally.
-*/
-SQLITE_PRIVATE int sqlite3PagerNosync(Pager *pPager){
- return pPager->noSync;
-}
-
#ifdef SQLITE_HAS_CODEC
/*
** Set or retrieve the codec for this pager
@@ -50155,6 +54462,7 @@ SQLITE_PRIVATE void sqlite3PagerSetCodec(
pPager->xCodecSizeChng = xCodecSizeChng;
pPager->xCodecFree = xCodecFree;
pPager->pCodec = pCodec;
+ setGetterMethod(pPager);
pagerReportSize(pPager);
}
SQLITE_PRIVATE void *sqlite3PagerGetCodec(Pager *pPager){
@@ -50223,7 +54531,8 @@ SQLITE_PRIVATE int sqlite3PagerMovepage(Pager *pPager, DbPage *pPg, Pgno pgno, i
/* In order to be able to rollback, an in-memory database must journal
** the page we are moving from.
*/
- if( MEMDB ){
+ assert( pPager->tempFile || !MEMDB );
+ if( pPager->tempFile ){
rc = sqlite3PagerWrite(pPg);
if( rc ) return rc;
}
@@ -50280,7 +54589,7 @@ SQLITE_PRIVATE int sqlite3PagerMovepage(Pager *pPager, DbPage *pPg, Pgno pgno, i
assert( !pPgOld || pPgOld->nRef==1 );
if( pPgOld ){
pPg->flags |= (pPgOld->flags&PGHDR_NEED_SYNC);
- if( MEMDB ){
+ if( pPager->tempFile ){
/* Do not discard pages from an in-memory database since we might
** need to rollback later. Just move the page out of the way. */
sqlite3PcacheMove(pPgOld, pPager->dbSize+1);
@@ -50297,8 +54606,7 @@ SQLITE_PRIVATE int sqlite3PagerMovepage(Pager *pPager, DbPage *pPg, Pgno pgno, i
** to exist, in case the transaction needs to roll back. Use pPgOld
** as the original page since it has already been allocated.
*/
- if( MEMDB ){
- assert( pPgOld );
+ if( pPager->tempFile && pPgOld ){
sqlite3PcacheMove(pPgOld, origPgno);
sqlite3PagerUnrefNotNull(pPgOld);
}
@@ -50550,10 +54858,12 @@ SQLITE_PRIVATE sqlite3_backup **sqlite3PagerBackupPtr(Pager *pPager){
** Unless this is an in-memory or temporary database, clear the pager cache.
*/
SQLITE_PRIVATE void sqlite3PagerClearCache(Pager *pPager){
- if( !MEMDB && pPager->tempFile==0 ) pager_reset(pPager);
+ assert( MEMDB==0 || pPager->tempFile );
+ if( pPager->tempFile==0 ) pager_reset(pPager);
}
#endif
+
#ifndef SQLITE_OMIT_WAL
/*
** This function is called when the user invokes "PRAGMA wal_checkpoint",
@@ -50562,13 +54872,19 @@ SQLITE_PRIVATE void sqlite3PagerClearCache(Pager *pPager){
**
** Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART.
*/
-SQLITE_PRIVATE int sqlite3PagerCheckpoint(Pager *pPager, int eMode, int *pnLog, int *pnCkpt){
+SQLITE_PRIVATE int sqlite3PagerCheckpoint(
+ Pager *pPager, /* Checkpoint on this pager */
+ sqlite3 *db, /* Db handle used to check for interrupts */
+ int eMode, /* Type of checkpoint */
+ int *pnLog, /* OUT: Final number of frames in log */
+ int *pnCkpt /* OUT: Final number of checkpointed frames */
+){
int rc = SQLITE_OK;
if( pPager->pWal ){
- rc = sqlite3WalCheckpoint(pPager->pWal, eMode,
+ rc = sqlite3WalCheckpoint(pPager->pWal, db, eMode,
(eMode==SQLITE_CHECKPOINT_PASSIVE ? 0 : pPager->xBusyHandler),
pPager->pBusyHandlerArg,
- pPager->ckptSyncFlags, pPager->pageSize, (u8 *)pPager->pTmpSpace,
+ pPager->walSyncFlags, pPager->pageSize, (u8 *)pPager->pTmpSpace,
pnLog, pnCkpt
);
}
@@ -50585,6 +54901,7 @@ SQLITE_PRIVATE int sqlite3PagerWalCallback(Pager *pPager){
*/
SQLITE_PRIVATE int sqlite3PagerWalSupported(Pager *pPager){
const sqlite3_io_methods *pMethods = pPager->fd->pMethods;
+ if( pPager->noLock ) return 0;
return pPager->exclusiveMode || (pMethods->iVersion>=2 && pMethods->xShmMap);
}
@@ -50696,7 +55013,7 @@ SQLITE_PRIVATE int sqlite3PagerOpenWal(
** error (SQLITE_BUSY) is returned and the log connection is not closed.
** If successful, the EXCLUSIVE lock is not released before returning.
*/
-SQLITE_PRIVATE int sqlite3PagerCloseWal(Pager *pPager){
+SQLITE_PRIVATE int sqlite3PagerCloseWal(Pager *pPager, sqlite3 *db){
int rc = SQLITE_OK;
assert( pPager->journalMode==PAGER_JOURNALMODE_WAL );
@@ -50724,10 +55041,11 @@ SQLITE_PRIVATE int sqlite3PagerCloseWal(Pager *pPager){
if( rc==SQLITE_OK && pPager->pWal ){
rc = pagerExclusiveLock(pPager);
if( rc==SQLITE_OK ){
- rc = sqlite3WalClose(pPager->pWal, pPager->ckptSyncFlags,
+ rc = sqlite3WalClose(pPager->pWal, db, pPager->walSyncFlags,
pPager->pageSize, (u8*)pPager->pTmpSpace);
pPager->pWal = 0;
pagerFixMaplimit(pPager);
+ if( rc && !pPager->exclusiveMode ) pagerUnlockDb(pPager, SHARED_LOCK);
}
}
return rc;
@@ -50760,6 +55078,20 @@ SQLITE_PRIVATE int sqlite3PagerSnapshotOpen(Pager *pPager, sqlite3_snapshot *pSn
}
return rc;
}
+
+/*
+** If this is a WAL database, call sqlite3WalSnapshotRecover(). If this
+** is not a WAL database, return an error.
+*/
+SQLITE_PRIVATE int sqlite3PagerSnapshotRecover(Pager *pPager){
+ int rc;
+ if( pPager->pWal ){
+ rc = sqlite3WalSnapshotRecover(pPager->pWal);
+ }else{
+ rc = SQLITE_ERROR;
+ }
+ return rc;
+}
#endif /* SQLITE_ENABLE_SNAPSHOT */
#endif /* !SQLITE_OMIT_WAL */
@@ -50777,7 +55109,6 @@ SQLITE_PRIVATE int sqlite3PagerWalFramesize(Pager *pPager){
}
#endif
-
#endif /* SQLITE_OMIT_DISKIO */
/************** End of pager.c ***********************************************/
@@ -51229,6 +55560,7 @@ struct Wal {
u8 padToSectorBoundary; /* Pad transactions out to the next sector */
WalIndexHdr hdr; /* Wal-index header for current transaction */
u32 minFrame; /* Ignore wal frames before this one */
+ u32 iReCksum; /* On commit, recalculate checksums from here */
const char *zWalName; /* Name of WAL file */
u32 nCkpt; /* Checkpoint sequence counter in the wal-header */
#ifdef SQLITE_DEBUG
@@ -51329,7 +55661,7 @@ static int walIndexPage(Wal *pWal, int iPage, volatile u32 **ppPage){
apNew = (volatile u32 **)sqlite3_realloc64((void *)pWal->apWiData, nByte);
if( !apNew ){
*ppPage = 0;
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
memset((void*)&apNew[pWal->nWiData], 0,
sizeof(u32*)*(iPage+1-pWal->nWiData));
@@ -51341,7 +55673,7 @@ static int walIndexPage(Wal *pWal, int iPage, volatile u32 **ppPage){
if( pWal->apWiData[iPage]==0 ){
if( pWal->exclusiveMode==WAL_HEAPMEMORY_MODE ){
pWal->apWiData[iPage] = (u32 volatile *)sqlite3MallocZero(WALINDEX_PGSZ);
- if( !pWal->apWiData[iPage] ) rc = SQLITE_NOMEM;
+ if( !pWal->apWiData[iPage] ) rc = SQLITE_NOMEM_BKPT;
}else{
rc = sqlite3OsShmMap(pWal->pDbFd, iPage, WALINDEX_PGSZ,
pWal->writeLock, (void volatile **)&pWal->apWiData[iPage]
@@ -51482,14 +55814,18 @@ static void walEncodeFrame(
assert( WAL_FRAME_HDRSIZE==24 );
sqlite3Put4byte(&aFrame[0], iPage);
sqlite3Put4byte(&aFrame[4], nTruncate);
- memcpy(&aFrame[8], pWal->hdr.aSalt, 8);
+ if( pWal->iReCksum==0 ){
+ memcpy(&aFrame[8], pWal->hdr.aSalt, 8);
- nativeCksum = (pWal->hdr.bigEndCksum==SQLITE_BIGENDIAN);
- walChecksumBytes(nativeCksum, aFrame, 8, aCksum, aCksum);
- walChecksumBytes(nativeCksum, aData, pWal->szPage, aCksum, aCksum);
+ nativeCksum = (pWal->hdr.bigEndCksum==SQLITE_BIGENDIAN);
+ walChecksumBytes(nativeCksum, aFrame, 8, aCksum, aCksum);
+ walChecksumBytes(nativeCksum, aData, pWal->szPage, aCksum, aCksum);
- sqlite3Put4byte(&aFrame[16], aCksum[0]);
- sqlite3Put4byte(&aFrame[20], aCksum[1]);
+ sqlite3Put4byte(&aFrame[16], aCksum[0]);
+ sqlite3Put4byte(&aFrame[20], aCksum[1]);
+ }else{
+ memset(&aFrame[8], 0, 16);
+ }
}
/*
@@ -51952,7 +56288,7 @@ static int walIndexRecover(Wal *pWal){
szFrame = szPage + WAL_FRAME_HDRSIZE;
aFrame = (u8 *)sqlite3_malloc64(szFrame);
if( !aFrame ){
- rc = SQLITE_NOMEM;
+ rc = SQLITE_NOMEM_BKPT;
goto recovery_error;
}
aData = &aFrame[WAL_FRAME_HDRSIZE];
@@ -52090,7 +56426,7 @@ SQLITE_PRIVATE int sqlite3WalOpen(
*ppWal = 0;
pRet = (Wal*)sqlite3MallocZero(sizeof(Wal) + pVfs->szOsFile);
if( !pRet ){
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
pRet->pVfs = pVfs;
@@ -52354,7 +56690,7 @@ static int walIteratorInit(Wal *pWal, WalIterator **pp){
+ iLast*sizeof(ht_slot);
p = (WalIterator *)sqlite3_malloc64(nByte);
if( !p ){
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
memset(p, 0, nByte);
p->nSegment = nSegment;
@@ -52366,7 +56702,7 @@ static int walIteratorInit(Wal *pWal, WalIterator **pp){
sizeof(ht_slot) * (iLast>HASHTABLE_NPAGE?HASHTABLE_NPAGE:iLast)
);
if( !aTmp ){
- rc = SQLITE_NOMEM;
+ rc = SQLITE_NOMEM_BKPT;
}
for(i=0; rc==SQLITE_OK && inBackfillAttempted = mxSafeFrame;
/* Sync the WAL to disk */
- if( sync_flags ){
- rc = sqlite3OsSync(pWal->pWalFd, sync_flags);
- }
+ rc = sqlite3OsSync(pWal->pWalFd, CKPT_SYNC_FLAGS(sync_flags));
/* If the database may grow as a result of this checkpoint, hint
** about the eventual size of the db file to the VFS layer.
@@ -52596,6 +56931,10 @@ static int walCheckpoint(
while( rc==SQLITE_OK && 0==walIteratorNext(pIter, &iDbpage, &iFrame) ){
i64 iOffset;
assert( walFramePgno(pWal, iFrame)==iDbpage );
+ if( db->u1.isInterrupted ){
+ rc = db->mallocFailed ? SQLITE_NOMEM_BKPT : SQLITE_INTERRUPT;
+ break;
+ }
if( iFrame<=nBackfill || iFrame>mxSafeFrame || iDbpage>mxPage ){
continue;
}
@@ -52615,8 +56954,8 @@ static int walCheckpoint(
i64 szDb = pWal->hdr.nPage*(i64)szPage;
testcase( IS_BIG_INT(szDb) );
rc = sqlite3OsTruncate(pWal->pDbFd, szDb);
- if( rc==SQLITE_OK && sync_flags ){
- rc = sqlite3OsSync(pWal->pDbFd, sync_flags);
+ if( rc==SQLITE_OK ){
+ rc = sqlite3OsSync(pWal->pDbFd, CKPT_SYNC_FLAGS(sync_flags));
}
}
if( rc==SQLITE_OK ){
@@ -52700,6 +57039,7 @@ static void walLimitSize(Wal *pWal, i64 nMax){
*/
SQLITE_PRIVATE int sqlite3WalClose(
Wal *pWal, /* Wal to close */
+ sqlite3 *db, /* For interrupt flag */
int sync_flags, /* Flags to pass to OsSync() (or 0) */
int nBuf,
u8 *zBuf /* Buffer of at least nBuf bytes */
@@ -52716,13 +57056,14 @@ SQLITE_PRIVATE int sqlite3WalClose(
**
** The EXCLUSIVE lock is not released before returning.
*/
- rc = sqlite3OsLock(pWal->pDbFd, SQLITE_LOCK_EXCLUSIVE);
- if( rc==SQLITE_OK ){
+ if( zBuf!=0
+ && SQLITE_OK==(rc = sqlite3OsLock(pWal->pDbFd, SQLITE_LOCK_EXCLUSIVE))
+ ){
if( pWal->exclusiveMode==WAL_NORMAL_MODE ){
pWal->exclusiveMode = WAL_EXCLUSIVE_MODE;
}
- rc = sqlite3WalCheckpoint(
- pWal, SQLITE_CHECKPOINT_PASSIVE, 0, 0, sync_flags, nBuf, zBuf, 0, 0
+ rc = sqlite3WalCheckpoint(pWal, db,
+ SQLITE_CHECKPOINT_PASSIVE, 0, 0, sync_flags, nBuf, zBuf, 0, 0
);
if( rc==SQLITE_OK ){
int bPersist = -1;
@@ -53151,6 +57492,84 @@ static int walTryBeginRead(Wal *pWal, int *pChanged, int useWal, int cnt){
return rc;
}
+#ifdef SQLITE_ENABLE_SNAPSHOT
+/*
+** Attempt to reduce the value of the WalCkptInfo.nBackfillAttempted
+** variable so that older snapshots can be accessed. To do this, loop
+** through all wal frames from nBackfillAttempted to (nBackfill+1),
+** comparing their content to the corresponding page with the database
+** file, if any. Set nBackfillAttempted to the frame number of the
+** first frame for which the wal file content matches the db file.
+**
+** This is only really safe if the file-system is such that any page
+** writes made by earlier checkpointers were atomic operations, which
+** is not always true. It is also possible that nBackfillAttempted
+** may be left set to a value larger than expected, if a wal frame
+** contains content that duplicate of an earlier version of the same
+** page.
+**
+** SQLITE_OK is returned if successful, or an SQLite error code if an
+** error occurs. It is not an error if nBackfillAttempted cannot be
+** decreased at all.
+*/
+SQLITE_PRIVATE int sqlite3WalSnapshotRecover(Wal *pWal){
+ int rc;
+
+ assert( pWal->readLock>=0 );
+ rc = walLockExclusive(pWal, WAL_CKPT_LOCK, 1);
+ if( rc==SQLITE_OK ){
+ volatile WalCkptInfo *pInfo = walCkptInfo(pWal);
+ int szPage = (int)pWal->szPage;
+ i64 szDb; /* Size of db file in bytes */
+
+ rc = sqlite3OsFileSize(pWal->pDbFd, &szDb);
+ if( rc==SQLITE_OK ){
+ void *pBuf1 = sqlite3_malloc(szPage);
+ void *pBuf2 = sqlite3_malloc(szPage);
+ if( pBuf1==0 || pBuf2==0 ){
+ rc = SQLITE_NOMEM;
+ }else{
+ u32 i = pInfo->nBackfillAttempted;
+ for(i=pInfo->nBackfillAttempted; i>pInfo->nBackfill; i--){
+ volatile ht_slot *dummy;
+ volatile u32 *aPgno; /* Array of page numbers */
+ u32 iZero; /* Frame corresponding to aPgno[0] */
+ u32 pgno; /* Page number in db file */
+ i64 iDbOff; /* Offset of db file entry */
+ i64 iWalOff; /* Offset of wal file entry */
+
+ rc = walHashGet(pWal, walFramePage(i), &dummy, &aPgno, &iZero);
+ if( rc!=SQLITE_OK ) break;
+ pgno = aPgno[i-iZero];
+ iDbOff = (i64)(pgno-1) * szPage;
+
+ if( iDbOff+szPage<=szDb ){
+ iWalOff = walFrameOffset(i, szPage) + WAL_FRAME_HDRSIZE;
+ rc = sqlite3OsRead(pWal->pWalFd, pBuf1, szPage, iWalOff);
+
+ if( rc==SQLITE_OK ){
+ rc = sqlite3OsRead(pWal->pDbFd, pBuf2, szPage, iDbOff);
+ }
+
+ if( rc!=SQLITE_OK || 0==memcmp(pBuf1, pBuf2, szPage) ){
+ break;
+ }
+ }
+
+ pInfo->nBackfillAttempted = i-1;
+ }
+ }
+
+ sqlite3_free(pBuf1);
+ sqlite3_free(pBuf2);
+ }
+ walUnlockExclusive(pWal, WAL_CKPT_LOCK, 1);
+ }
+
+ return rc;
+}
+#endif /* SQLITE_ENABLE_SNAPSHOT */
+
/*
** Begin a read transaction on the database.
**
@@ -53213,7 +57632,11 @@ SQLITE_PRIVATE int sqlite3WalBeginReadTransaction(Wal *pWal, int *pChanged){
** has not yet set the pInfo->nBackfillAttempted variable to indicate
** its intent. To avoid the race condition this leads to, ensure that
** there is no checkpointer process by taking a shared CKPT lock
- ** before checking pInfo->nBackfillAttempted. */
+ ** before checking pInfo->nBackfillAttempted.
+ **
+ ** TODO: Does the aReadMark[] lock prevent a checkpointer from doing
+ ** this already?
+ */
rc = walLockShared(pWal, WAL_CKPT_LOCK);
if( rc==SQLITE_OK ){
@@ -53416,6 +57839,7 @@ SQLITE_PRIVATE int sqlite3WalBeginWriteTransaction(Wal *pWal){
/* Cannot start a write transaction without first holding a read
** transaction. */
assert( pWal->readLock>=0 );
+ assert( pWal->writeLock==0 && pWal->iReCksum==0 );
if( pWal->readOnly ){
return SQLITE_READONLY;
@@ -53451,6 +57875,7 @@ SQLITE_PRIVATE int sqlite3WalEndWriteTransaction(Wal *pWal){
if( pWal->writeLock ){
walUnlockExclusive(pWal, WAL_WRITE_LOCK, 1);
pWal->writeLock = 0;
+ pWal->iReCksum = 0;
pWal->truncateOnCommit = 0;
}
return SQLITE_OK;
@@ -53636,8 +58061,8 @@ static int walWriteToLog(
iOffset += iFirstAmt;
iAmt -= iFirstAmt;
pContent = (void*)(iFirstAmt + (char*)pContent);
- assert( p->syncFlags & (SQLITE_SYNC_NORMAL|SQLITE_SYNC_FULL) );
- rc = sqlite3OsSync(p->pFd, p->syncFlags & SQLITE_SYNC_MASK);
+ assert( WAL_SYNC_FLAGS(p->syncFlags)!=0 );
+ rc = sqlite3OsSync(p->pFd, WAL_SYNC_FLAGS(p->syncFlags));
if( iAmt==0 || rc ) return rc;
}
rc = sqlite3OsWrite(p->pFd, pContent, iAmt, iOffset);
@@ -53657,7 +58082,7 @@ static int walWriteOneFrame(
void *pData; /* Data actually written */
u8 aFrame[WAL_FRAME_HDRSIZE]; /* Buffer to assemble frame-header in */
#if defined(SQLITE_HAS_CODEC)
- if( (pData = sqlite3PagerCodec(pPage))==0 ) return SQLITE_NOMEM;
+ if( (pData = sqlite3PagerCodec(pPage))==0 ) return SQLITE_NOMEM_BKPT;
#else
pData = pPage->pData;
#endif
@@ -53669,6 +58094,59 @@ static int walWriteOneFrame(
return rc;
}
+/*
+** This function is called as part of committing a transaction within which
+** one or more frames have been overwritten. It updates the checksums for
+** all frames written to the wal file by the current transaction starting
+** with the earliest to have been overwritten.
+**
+** SQLITE_OK is returned if successful, or an SQLite error code otherwise.
+*/
+static int walRewriteChecksums(Wal *pWal, u32 iLast){
+ const int szPage = pWal->szPage;/* Database page size */
+ int rc = SQLITE_OK; /* Return code */
+ u8 *aBuf; /* Buffer to load data from wal file into */
+ u8 aFrame[WAL_FRAME_HDRSIZE]; /* Buffer to assemble frame-headers in */
+ u32 iRead; /* Next frame to read from wal file */
+ i64 iCksumOff;
+
+ aBuf = sqlite3_malloc(szPage + WAL_FRAME_HDRSIZE);
+ if( aBuf==0 ) return SQLITE_NOMEM_BKPT;
+
+ /* Find the checksum values to use as input for the recalculating the
+ ** first checksum. If the first frame is frame 1 (implying that the current
+ ** transaction restarted the wal file), these values must be read from the
+ ** wal-file header. Otherwise, read them from the frame header of the
+ ** previous frame. */
+ assert( pWal->iReCksum>0 );
+ if( pWal->iReCksum==1 ){
+ iCksumOff = 24;
+ }else{
+ iCksumOff = walFrameOffset(pWal->iReCksum-1, szPage) + 16;
+ }
+ rc = sqlite3OsRead(pWal->pWalFd, aBuf, sizeof(u32)*2, iCksumOff);
+ pWal->hdr.aFrameCksum[0] = sqlite3Get4byte(aBuf);
+ pWal->hdr.aFrameCksum[1] = sqlite3Get4byte(&aBuf[sizeof(u32)]);
+
+ iRead = pWal->iReCksum;
+ pWal->iReCksum = 0;
+ for(; rc==SQLITE_OK && iRead<=iLast; iRead++){
+ i64 iOff = walFrameOffset(iRead, szPage);
+ rc = sqlite3OsRead(pWal->pWalFd, aBuf, szPage+WAL_FRAME_HDRSIZE, iOff);
+ if( rc==SQLITE_OK ){
+ u32 iPgno, nDbSize;
+ iPgno = sqlite3Get4byte(aBuf);
+ nDbSize = sqlite3Get4byte(&aBuf[4]);
+
+ walEncodeFrame(pWal, iPgno, nDbSize, &aBuf[WAL_FRAME_HDRSIZE], aFrame);
+ rc = sqlite3OsWrite(pWal->pWalFd, aFrame, sizeof(aFrame), iOff);
+ }
+ }
+
+ sqlite3_free(aBuf);
+ return rc;
+}
+
/*
** Write a set of frames to the log. The caller must hold the write-lock
** on the log file (obtained using sqlite3WalBeginWriteTransaction()).
@@ -53689,6 +58167,8 @@ SQLITE_PRIVATE int sqlite3WalFrames(
int szFrame; /* The size of a single frame */
i64 iOffset; /* Next byte to write in WAL file */
WalWriter w; /* The writer */
+ u32 iFirst = 0; /* First frame that may be overwritten */
+ WalIndexHdr *pLive; /* Pointer to shared header */
assert( pList );
assert( pWal->writeLock );
@@ -53704,6 +58184,11 @@ SQLITE_PRIVATE int sqlite3WalFrames(
}
#endif
+ pLive = (WalIndexHdr*)walIndexHdr(pWal);
+ if( memcmp(&pWal->hdr, (void *)pLive, sizeof(WalIndexHdr))!=0 ){
+ iFirst = pLive->mxFrame+1;
+ }
+
/* See if it is possible to write these frames into the start of the
** log file, instead of appending to it at pWal->hdr.mxFrame.
*/
@@ -53747,10 +58232,10 @@ SQLITE_PRIVATE int sqlite3WalFrames(
** an out-of-order write following a WAL restart could result in
** database corruption. See the ticket:
**
- ** http://localhost:591/sqlite/info/ff5be73dee
+ ** https://sqlite.org/src/info/ff5be73dee
*/
- if( pWal->syncHeader && sync_flags ){
- rc = sqlite3OsSync(pWal->pWalFd, sync_flags & SQLITE_SYNC_MASK);
+ if( pWal->syncHeader ){
+ rc = sqlite3OsSync(pWal->pWalFd, CKPT_SYNC_FLAGS(sync_flags));
if( rc ) return rc;
}
}
@@ -53768,6 +58253,33 @@ SQLITE_PRIVATE int sqlite3WalFrames(
/* Write all frames into the log file exactly once */
for(p=pList; p; p=p->pDirty){
int nDbSize; /* 0 normally. Positive == commit flag */
+
+ /* Check if this page has already been written into the wal file by
+ ** the current transaction. If so, overwrite the existing frame and
+ ** set Wal.writeLock to WAL_WRITELOCK_RECKSUM - indicating that
+ ** checksums must be recomputed when the transaction is committed. */
+ if( iFirst && (p->pDirty || isCommit==0) ){
+ u32 iWrite = 0;
+ VVA_ONLY(rc =) sqlite3WalFindFrame(pWal, p->pgno, &iWrite);
+ assert( rc==SQLITE_OK || iWrite==0 );
+ if( iWrite>=iFirst ){
+ i64 iOff = walFrameOffset(iWrite, szPage) + WAL_FRAME_HDRSIZE;
+ void *pData;
+ if( pWal->iReCksum==0 || iWriteiReCksum ){
+ pWal->iReCksum = iWrite;
+ }
+#if defined(SQLITE_HAS_CODEC)
+ if( (pData = sqlite3PagerCodec(p))==0 ) return SQLITE_NOMEM;
+#else
+ pData = p->pData;
+#endif
+ rc = sqlite3OsWrite(pWal->pWalFd, pData, szPage, iOff);
+ if( rc ) return rc;
+ p->flags &= ~PGHDR_WAL_APPEND;
+ continue;
+ }
+ }
+
iFrame++;
assert( iOffset==walFrameOffset(iFrame, szPage) );
nDbSize = (isCommit && p->pDirty==0) ? nTruncate : 0;
@@ -53775,6 +58287,13 @@ SQLITE_PRIVATE int sqlite3WalFrames(
if( rc ) return rc;
pLast = p;
iOffset += szFrame;
+ p->flags |= PGHDR_WAL_APPEND;
+ }
+
+ /* Recalculate checksums within the wal file if required. */
+ if( isCommit && pWal->iReCksum ){
+ rc = walRewriteChecksums(pWal, iFrame);
+ if( rc ) return rc;
}
/* If this is the end of a transaction, then we might need to pad
@@ -53791,18 +58310,23 @@ SQLITE_PRIVATE int sqlite3WalFrames(
** sector boundary is synced; the part of the last frame that extends
** past the sector boundary is written after the sync.
*/
- if( isCommit && (sync_flags & WAL_SYNC_TRANSACTIONS)!=0 ){
+ if( isCommit && WAL_SYNC_FLAGS(sync_flags)!=0 ){
+ int bSync = 1;
if( pWal->padToSectorBoundary ){
int sectorSize = sqlite3SectorSize(pWal->pWalFd);
w.iSyncPoint = ((iOffset+sectorSize-1)/sectorSize)*sectorSize;
+ bSync = (w.iSyncPoint==iOffset);
+ testcase( bSync );
while( iOffsethdr.mxFrame;
for(p=pList; p && rc==SQLITE_OK; p=p->pDirty){
+ if( (p->flags & PGHDR_WAL_APPEND)==0 ) continue;
iFrame++;
rc = walIndexAppend(pWal, iFrame, p->pgno);
}
@@ -53868,6 +58393,7 @@ SQLITE_PRIVATE int sqlite3WalFrames(
*/
SQLITE_PRIVATE int sqlite3WalCheckpoint(
Wal *pWal, /* Wal connection */
+ sqlite3 *db, /* Check this handle's interrupt flag */
int eMode, /* PASSIVE, FULL, RESTART, or TRUNCATE */
int (*xBusy)(void*), /* Function to call when busy */
void *pBusyArg, /* Context argument for xBusyHandler */
@@ -53938,10 +58464,11 @@ SQLITE_PRIVATE int sqlite3WalCheckpoint(
/* Copy data from the log to the database file. */
if( rc==SQLITE_OK ){
+
if( pWal->hdr.mxFrame && walPagesize(pWal)!=nBuf ){
rc = SQLITE_CORRUPT_BKPT;
}else{
- rc = walCheckpoint(pWal, eMode2, xBusy2, pBusyArg, sync_flags, zBuf);
+ rc = walCheckpoint(pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf);
}
/* If no error occurred, set the output variables. */
@@ -54061,12 +58588,17 @@ SQLITE_PRIVATE int sqlite3WalHeapMemory(Wal *pWal){
SQLITE_PRIVATE int sqlite3WalSnapshotGet(Wal *pWal, sqlite3_snapshot **ppSnapshot){
int rc = SQLITE_OK;
WalIndexHdr *pRet;
+ static const u32 aZero[4] = { 0, 0, 0, 0 };
assert( pWal->readLock>=0 && pWal->writeLock==0 );
+ if( memcmp(&pWal->hdr.aFrameCksum[0],aZero,16)==0 ){
+ *ppSnapshot = 0;
+ return SQLITE_ERROR;
+ }
pRet = (WalIndexHdr*)sqlite3_malloc(sizeof(WalIndexHdr));
if( pRet==0 ){
- rc = SQLITE_NOMEM;
+ rc = SQLITE_NOMEM_BKPT;
}else{
memcpy(pRet, &pWal->hdr, sizeof(WalIndexHdr));
*ppSnapshot = (sqlite3_snapshot*)pRet;
@@ -54080,6 +58612,23 @@ SQLITE_PRIVATE int sqlite3WalSnapshotGet(Wal *pWal, sqlite3_snapshot **ppSnapsho
SQLITE_PRIVATE void sqlite3WalSnapshotOpen(Wal *pWal, sqlite3_snapshot *pSnapshot){
pWal->pSnapshot = (WalIndexHdr*)pSnapshot;
}
+
+/*
+** Return a +ve value if snapshot p1 is newer than p2. A -ve value if
+** p1 is older than p2 and zero if p1 and p2 are the same snapshot.
+*/
+SQLITE_API int sqlite3_snapshot_cmp(sqlite3_snapshot *p1, sqlite3_snapshot *p2){
+ WalIndexHdr *pHdr1 = (WalIndexHdr*)p1;
+ WalIndexHdr *pHdr2 = (WalIndexHdr*)p2;
+
+ /* aSalt[0] is a copy of the value stored in the wal file header. It
+ ** is incremented each time the wal file is restarted. */
+ if( pHdr1->aSalt[0]aSalt[0] ) return -1;
+ if( pHdr1->aSalt[0]>pHdr2->aSalt[0] ) return +1;
+ if( pHdr1->mxFramemxFrame ) return -1;
+ if( pHdr1->mxFrame>pHdr2->mxFrame ) return +1;
+ return 0;
+}
#endif /* SQLITE_ENABLE_SNAPSHOT */
#ifdef SQLITE_ENABLE_ZIPVFS
@@ -54384,38 +58933,39 @@ typedef struct CellInfo CellInfo;
#define PTF_LEAF 0x08
/*
-** As each page of the file is loaded into memory, an instance of the following
-** structure is appended and initialized to zero. This structure stores
-** information about the page that is decoded from the raw file page.
+** An instance of this object stores information about each a single database
+** page that has been loaded into memory. The information in this object
+** is derived from the raw on-disk page content.
**
-** The pParent field points back to the parent page. This allows us to
-** walk up the BTree from any leaf to the root. Care must be taken to
-** unref() the parent page pointer when this page is no longer referenced.
-** The pageDestructor() routine handles that chore.
+** As each database page is loaded into memory, the pager allocats an
+** instance of this object and zeros the first 8 bytes. (This is the
+** "extra" information associated with each page of the pager.)
**
** Access to all fields of this structure is controlled by the mutex
** stored in MemPage.pBt->mutex.
*/
struct MemPage {
u8 isInit; /* True if previously initialized. MUST BE FIRST! */
- u8 nOverflow; /* Number of overflow cell bodies in aCell[] */
+ u8 bBusy; /* Prevent endless loops on corrupt database files */
u8 intKey; /* True if table b-trees. False for index b-trees */
u8 intKeyLeaf; /* True if the leaf of an intKey table */
- u8 noPayload; /* True if internal intKey page (thus w/o data) */
+ Pgno pgno; /* Page number for this page */
+ /* Only the first 8 bytes (above) are zeroed by pager.c when a new page
+ ** is allocated. All fields that follow must be initialized before use */
u8 leaf; /* True if a leaf page */
u8 hdrOffset; /* 100 for page 1. 0 otherwise */
u8 childPtrSize; /* 0 if leaf==1. 4 if leaf==0 */
u8 max1bytePayload; /* min(maxLocal,127) */
- u8 bBusy; /* Prevent endless loops on corrupt database files */
+ u8 nOverflow; /* Number of overflow cell bodies in aCell[] */
u16 maxLocal; /* Copy of BtShared.maxLocal or BtShared.maxLeaf */
u16 minLocal; /* Copy of BtShared.minLocal or BtShared.minLeaf */
u16 cellOffset; /* Index in aData of first cell pointer */
u16 nFree; /* Number of free bytes on the page */
u16 nCell; /* Number of cells on this page, local and ovfl */
u16 maskPage; /* Mask for page offset */
- u16 aiOvfl[5]; /* Insert the i-th overflow cell before the aiOvfl-th
+ u16 aiOvfl[4]; /* Insert the i-th overflow cell before the aiOvfl-th
** non-overflow cell */
- u8 *apOvfl[5]; /* Pointers to the body of overflow cells */
+ u8 *apOvfl[4]; /* Pointers to the body of overflow cells */
BtShared *pBt; /* Pointer to BtShared that this page is part of */
u8 *aData; /* Pointer to disk image of the page data */
u8 *aDataEnd; /* One byte past the end of usable data */
@@ -54424,16 +58974,8 @@ struct MemPage {
DbPage *pDbPage; /* Pager page handle */
u16 (*xCellSize)(MemPage*,u8*); /* cellSizePtr method */
void (*xParseCell)(MemPage*,u8*,CellInfo*); /* btreeParseCell method */
- Pgno pgno; /* Page number for this page */
};
-/*
-** The in-memory image of a disk page has the auxiliary information appended
-** to the end. EXTRA_SIZE is the number of bytes of space needed to hold
-** that extra information.
-*/
-#define EXTRA_SIZE sizeof(MemPage)
-
/*
** A linked list of the following structures is stored at BtShared.pLock.
** Locks are added (or upgraded from READ_LOCK to WRITE_LOCK) when a cursor
@@ -54580,10 +59122,12 @@ struct BtShared {
#define BTS_READ_ONLY 0x0001 /* Underlying file is readonly */
#define BTS_PAGESIZE_FIXED 0x0002 /* Page size can no longer be changed */
#define BTS_SECURE_DELETE 0x0004 /* PRAGMA secure_delete is enabled */
-#define BTS_INITIALLY_EMPTY 0x0008 /* Database was empty at trans start */
-#define BTS_NO_WAL 0x0010 /* Do not open write-ahead-log files */
-#define BTS_EXCLUSIVE 0x0020 /* pWriter has an exclusive lock */
-#define BTS_PENDING 0x0040 /* Waiting for read-locks to clear */
+#define BTS_OVERWRITE 0x0008 /* Overwrite deleted content with zeros */
+#define BTS_FAST_SECURE 0x000c /* Combination of the previous two */
+#define BTS_INITIALLY_EMPTY 0x0010 /* Database was empty at trans start */
+#define BTS_NO_WAL 0x0020 /* Do not open write-ahead-log files */
+#define BTS_EXCLUSIVE 0x0040 /* pWriter has an exclusive lock */
+#define BTS_PENDING 0x0080 /* Waiting for read-locks to clear */
/*
** An instance of the following structure is used to hold information
@@ -54629,6 +59173,11 @@ struct CellInfo {
** eState==FAULT: Cursor fault with skipNext as error code.
*/
struct BtCursor {
+ u8 eState; /* One of the CURSOR_XXX constants (see below) */
+ u8 curFlags; /* zero or more BTCF_* flags defined below */
+ u8 curPagerFlags; /* Flags to send to sqlite3PagerGet() */
+ u8 hints; /* As configured by CursorSetHints() */
+ int nOvflAlloc; /* Allocated size of aOverflow[] array */
Btree *pBtree; /* The Btree to which this cursor belongs */
BtShared *pBt; /* The BtShared this cursor points to */
BtCursor *pNext; /* Forms a linked list of all cursors */
@@ -54637,22 +59186,18 @@ struct BtCursor {
i64 nKey; /* Size of pKey, or last integer key */
void *pKey; /* Saved key that was cursor last known position */
Pgno pgnoRoot; /* The root page of this tree */
- int nOvflAlloc; /* Allocated size of aOverflow[] array */
int skipNext; /* Prev() is noop if negative. Next() is noop if positive.
** Error code if eState==CURSOR_FAULT */
- u8 curFlags; /* zero or more BTCF_* flags defined below */
- u8 curPagerFlags; /* Flags to send to sqlite3PagerGet() */
- u8 eState; /* One of the CURSOR_XXX constants (see below) */
- u8 hints; /* As configured by CursorSetHints() */
/* All fields above are zeroed when the cursor is allocated. See
** sqlite3BtreeCursorZero(). Fields that follow must be manually
** initialized. */
i8 iPage; /* Index of current page in apPage */
u8 curIntKey; /* Value of apPage[0]->intKey */
- struct KeyInfo *pKeyInfo; /* Argument passed to comparison function */
- void *padding1; /* Make object size a multiple of 16 */
- u16 aiIdx[BTCURSOR_MAX_DEPTH]; /* Current index in apPage[i] */
- MemPage *apPage[BTCURSOR_MAX_DEPTH]; /* Pages from root to current page */
+ u16 ix; /* Current index for apPage[iPage] */
+ u16 aiIdx[BTCURSOR_MAX_DEPTH-1]; /* Current index in apPage[i] */
+ struct KeyInfo *pKeyInfo; /* Arg passed to comparison function */
+ MemPage *pPage; /* Current page */
+ MemPage *apPage[BTCURSOR_MAX_DEPTH-1]; /* Stack of parents of current page */
};
/*
@@ -54824,11 +59369,9 @@ struct IntegrityCk {
*/
#if SQLITE_BYTEORDER==4321
# define get2byteAligned(x) (*(u16*)(x))
-#elif SQLITE_BYTEORDER==1234 && !defined(SQLITE_DISABLE_INTRINSIC) \
- && GCC_VERSION>=4008000
+#elif SQLITE_BYTEORDER==1234 && GCC_VERSION>=4008000
# define get2byteAligned(x) __builtin_bswap16(*(u16*)(x))
-#elif SQLITE_BYTEORDER==1234 && !defined(SQLITE_DISABLE_INTRINSIC) \
- && defined(_MSC_VER) && _MSC_VER>=1300
+#elif SQLITE_BYTEORDER==1234 && MSVC_VERSION>=1300
# define get2byteAligned(x) _byteswap_ushort(*(u16*)(x))
#else
# define get2byteAligned(x) ((x)[0]<<8 | (x)[1])
@@ -54989,21 +59532,6 @@ SQLITE_PRIVATE int sqlite3BtreeHoldsMutex(Btree *p){
#endif
-#ifndef SQLITE_OMIT_INCRBLOB
-/*
-** Enter and leave a mutex on a Btree given a cursor owned by that
-** Btree. These entry points are used by incremental I/O and can be
-** omitted if that module is not used.
-*/
-SQLITE_PRIVATE void sqlite3BtreeEnterCursor(BtCursor *pCur){
- sqlite3BtreeEnter(pCur->pBtree);
-}
-SQLITE_PRIVATE void sqlite3BtreeLeaveCursor(BtCursor *pCur){
- sqlite3BtreeLeave(pCur->pBtree);
-}
-#endif /* SQLITE_OMIT_INCRBLOB */
-
-
/*
** Enter the mutex on every Btree associated with a database
** connection. This is needed (for example) prior to parsing
@@ -55018,16 +59546,24 @@ SQLITE_PRIVATE void sqlite3BtreeLeaveCursor(BtCursor *pCur){
** two or more btrees in common both try to lock all their btrees
** at the same instant.
*/
-SQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3 *db){
+static void SQLITE_NOINLINE btreeEnterAll(sqlite3 *db){
int i;
+ int skipOk = 1;
Btree *p;
assert( sqlite3_mutex_held(db->mutex) );
for(i=0; inDb; i++){
p = db->aDb[i].pBt;
- if( p ) sqlite3BtreeEnter(p);
+ if( p && p->sharable ){
+ sqlite3BtreeEnter(p);
+ skipOk = 0;
+ }
}
+ db->skipBtreeMutex = skipOk;
}
-SQLITE_PRIVATE void sqlite3BtreeLeaveAll(sqlite3 *db){
+SQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3 *db){
+ if( db->skipBtreeMutex==0 ) btreeEnterAll(db);
+}
+static void SQLITE_NOINLINE btreeLeaveAll(sqlite3 *db){
int i;
Btree *p;
assert( sqlite3_mutex_held(db->mutex) );
@@ -55036,13 +59572,8 @@ SQLITE_PRIVATE void sqlite3BtreeLeaveAll(sqlite3 *db){
if( p ) sqlite3BtreeLeave(p);
}
}
-
-/*
-** Return true if a particular Btree requires a lock. Return FALSE if
-** no lock is ever required since it is not sharable.
-*/
-SQLITE_PRIVATE int sqlite3BtreeSharable(Btree *p){
- return p->sharable;
+SQLITE_PRIVATE void sqlite3BtreeLeaveAll(sqlite3 *db){
+ if( db->skipBtreeMutex==0 ) btreeLeaveAll(db);
}
#ifndef NDEBUG
@@ -55118,6 +59649,25 @@ SQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3 *db){
}
}
#endif /* if SQLITE_THREADSAFE */
+
+#ifndef SQLITE_OMIT_INCRBLOB
+/*
+** Enter a mutex on a Btree given a cursor owned by that Btree.
+**
+** These entry points are used by incremental I/O only. Enter() is required
+** any time OMIT_SHARED_CACHE is not defined, regardless of whether or not
+** the build is threadsafe. Leave() is only required by threadsafe builds.
+*/
+SQLITE_PRIVATE void sqlite3BtreeEnterCursor(BtCursor *pCur){
+ sqlite3BtreeEnter(pCur->pBtree);
+}
+# if SQLITE_THREADSAFE
+SQLITE_PRIVATE void sqlite3BtreeLeaveCursor(BtCursor *pCur){
+ sqlite3BtreeLeave(pCur->pBtree);
+}
+# endif
+#endif /* ifndef SQLITE_OMIT_INCRBLOB */
+
#endif /* ifndef SQLITE_OMIT_SHARED_CACHE */
/************** End of btmutex.c *********************************************/
@@ -55210,7 +59760,7 @@ static BtShared *SQLITE_WSD sqlite3SharedCacheList = 0;
** The shared cache setting effects only future calls to
** sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2().
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_enable_shared_cache(int enable){
+SQLITE_API int sqlite3_enable_shared_cache(int enable){
sqlite3GlobalConfig.sharedCacheEnabled = enable;
return SQLITE_OK;
}
@@ -55276,7 +59826,7 @@ static int hasSharedCacheTableLock(
** Return true immediately.
*/
if( (pBtree->sharable==0)
- || (eLockType==READ_LOCK && (pBtree->db->flags & SQLITE_ReadUncommitted))
+ || (eLockType==READ_LOCK && (pBtree->db->flags & SQLITE_ReadUncommit))
){
return 1;
}
@@ -55353,7 +59903,7 @@ static int hasReadConflicts(Btree *pBtree, Pgno iRoot){
for(p=pBtree->pBt->pCursor; p; p=p->pNext){
if( p->pgnoRoot==iRoot
&& p->pBtree!=pBtree
- && 0==(p->pBtree->db->flags & SQLITE_ReadUncommitted)
+ && 0==(p->pBtree->db->flags & SQLITE_ReadUncommit)
){
return 1;
}
@@ -55375,7 +59925,7 @@ static int querySharedCacheTableLock(Btree *p, Pgno iTab, u8 eLock){
assert( sqlite3BtreeHoldsMutex(p) );
assert( eLock==READ_LOCK || eLock==WRITE_LOCK );
assert( p->db!=0 );
- assert( !(p->db->flags&SQLITE_ReadUncommitted)||eLock==WRITE_LOCK||iTab==1 );
+ assert( !(p->db->flags&SQLITE_ReadUncommit)||eLock==WRITE_LOCK||iTab==1 );
/* If requesting a write-lock, then the Btree must have an open write
** transaction on this file. And, obviously, for this to be so there
@@ -55453,7 +60003,7 @@ static int setSharedCacheTableLock(Btree *p, Pgno iTable, u8 eLock){
** obtain a read-lock using this function. The only read-lock obtained
** by a connection in read-uncommitted mode is on the sqlite_master
** table, and that lock is obtained in BtreeBeginTrans(). */
- assert( 0==(p->db->flags&SQLITE_ReadUncommitted) || eLock==WRITE_LOCK );
+ assert( 0==(p->db->flags&SQLITE_ReadUncommit) || eLock==WRITE_LOCK );
/* This function should only be called on a sharable b-tree after it
** has been determined that no other b-tree holds a conflicting lock. */
@@ -55474,7 +60024,7 @@ static int setSharedCacheTableLock(Btree *p, Pgno iTable, u8 eLock){
if( !pLock ){
pLock = (BtLock *)sqlite3MallocZero(sizeof(BtLock));
if( !pLock ){
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
pLock->iTable = iTable;
pLock->pBtree = p;
@@ -55563,7 +60113,9 @@ static void downgradeAllSharedCacheTableLocks(Btree *p){
#endif /* SQLITE_OMIT_SHARED_CACHE */
-static void releasePage(MemPage *pPage); /* Forward reference */
+static void releasePage(MemPage *pPage); /* Forward reference */
+static void releasePageOne(MemPage *pPage); /* Forward reference */
+static void releasePageNotNull(MemPage *pPage); /* Forward reference */
/*
***** This routine is used inside of assert() only ****
@@ -55574,6 +60126,19 @@ static void releasePage(MemPage *pPage); /* Forward reference */
static int cursorHoldsMutex(BtCursor *p){
return sqlite3_mutex_held(p->pBt->mutex);
}
+
+/* Verify that the cursor and the BtShared agree about what is the current
+** database connetion. This is important in shared-cache mode. If the database
+** connection pointers get out-of-sync, it is possible for routines like
+** btreeInitPage() to reference an stale connection pointer that references a
+** a connection that has already closed. This routine is used inside assert()
+** statements only and for the purpose of double-checking that the btree code
+** does keep the database connection pointers up-to-date.
+*/
+static int cursorOwnsBtShared(BtCursor *p){
+ assert( cursorHoldsMutex(p) );
+ return (p->pBtree->db==p->pBt->db);
+}
#endif
/*
@@ -55610,6 +60175,7 @@ static void invalidateAllOverflowCache(BtShared *pBt){
*/
static void invalidateIncrblobCursors(
Btree *pBtree, /* The database file to check */
+ Pgno pgnoRoot, /* The table that might be changing */
i64 iRow, /* The rowid that might be changing */
int isClearTable /* True if all rows are being deleted */
){
@@ -55620,7 +60186,7 @@ static void invalidateIncrblobCursors(
for(p=pBtree->pBt->pCursor; p; p=p->pNext){
if( (p->curFlags & BTCF_Incrblob)!=0 ){
pBtree->hasIncrblobCur = 1;
- if( isClearTable || p->info.nKey==iRow ){
+ if( p->pgnoRoot==pgnoRoot && (isClearTable || p->info.nKey==iRow) ){
p->eState = CURSOR_INVALID;
}
}
@@ -55629,7 +60195,7 @@ static void invalidateIncrblobCursors(
#else
/* Stub function when INCRBLOB is omitted */
- #define invalidateIncrblobCursors(x,y,z)
+ #define invalidateIncrblobCursors(w,x,y,z)
#endif /* SQLITE_OMIT_INCRBLOB */
/*
@@ -55673,7 +60239,7 @@ static int btreeSetHasContent(BtShared *pBt, Pgno pgno){
assert( pgno<=pBt->nPage );
pBt->pHasContent = sqlite3BitvecCreate(pBt->nPage);
if( !pBt->pHasContent ){
- rc = SQLITE_NOMEM;
+ rc = SQLITE_NOMEM_BKPT;
}
}
if( rc==SQLITE_OK && pgno<=sqlite3BitvecSize(pBt->pHasContent) ){
@@ -55708,11 +60274,13 @@ static void btreeClearHasContent(BtShared *pBt){
*/
static void btreeReleaseAllCursorPages(BtCursor *pCur){
int i;
- for(i=0; i<=pCur->iPage; i++){
- releasePage(pCur->apPage[i]);
- pCur->apPage[i] = 0;
+ if( pCur->iPage>=0 ){
+ for(i=0; iiPage; i++){
+ releasePageNotNull(pCur->apPage[i]);
+ }
+ releasePageNotNull(pCur->pPage);
+ pCur->iPage = -1;
}
- pCur->iPage = -1;
}
/*
@@ -55729,30 +60297,28 @@ static void btreeReleaseAllCursorPages(BtCursor *pCur){
** the key.
*/
static int saveCursorKey(BtCursor *pCur){
- int rc;
+ int rc = SQLITE_OK;
assert( CURSOR_VALID==pCur->eState );
assert( 0==pCur->pKey );
assert( cursorHoldsMutex(pCur) );
- rc = sqlite3BtreeKeySize(pCur, &pCur->nKey);
- assert( rc==SQLITE_OK ); /* KeySize() cannot fail */
-
- /* If this is an intKey table, then the above call to BtreeKeySize()
- ** stores the integer key in pCur->nKey. In this case this value is
- ** all that is required. Otherwise, if pCur is not open on an intKey
- ** table, then malloc space for and store the pCur->nKey bytes of key
- ** data. */
- if( 0==pCur->curIntKey ){
- void *pKey = sqlite3Malloc( pCur->nKey );
+ if( pCur->curIntKey ){
+ /* Only the rowid is required for a table btree */
+ pCur->nKey = sqlite3BtreeIntegerKey(pCur);
+ }else{
+ /* For an index btree, save the complete key content */
+ void *pKey;
+ pCur->nKey = sqlite3BtreePayloadSize(pCur);
+ pKey = sqlite3Malloc( pCur->nKey );
if( pKey ){
- rc = sqlite3BtreeKey(pCur, 0, (int)pCur->nKey, pKey);
+ rc = sqlite3BtreePayload(pCur, 0, (int)pCur->nKey, pKey);
if( rc==SQLITE_OK ){
pCur->pKey = pKey;
}else{
sqlite3_free(pKey);
}
}else{
- rc = SQLITE_NOMEM;
+ rc = SQLITE_NOMEM_BKPT;
}
}
assert( !pCur->curIntKey || !pCur->pKey );
@@ -55843,7 +60409,7 @@ static int SQLITE_NOINLINE saveCursorsOnList(
return rc;
}
}else{
- testcase( p->iPage>0 );
+ testcase( p->iPage>=0 );
btreeReleaseAllCursorPages(p);
}
}
@@ -55876,26 +60442,23 @@ static int btreeMoveto(
){
int rc; /* Status code */
UnpackedRecord *pIdxKey; /* Unpacked index key */
- char aSpace[200]; /* Temp space for pIdxKey - to avoid a malloc */
- char *pFree = 0;
if( pKey ){
assert( nKey==(i64)(int)nKey );
- pIdxKey = sqlite3VdbeAllocUnpackedRecord(
- pCur->pKeyInfo, aSpace, sizeof(aSpace), &pFree
- );
- if( pIdxKey==0 ) return SQLITE_NOMEM;
+ pIdxKey = sqlite3VdbeAllocUnpackedRecord(pCur->pKeyInfo);
+ if( pIdxKey==0 ) return SQLITE_NOMEM_BKPT;
sqlite3VdbeRecordUnpack(pCur->pKeyInfo, (int)nKey, pKey, pIdxKey);
if( pIdxKey->nField==0 ){
- sqlite3DbFree(pCur->pKeyInfo->db, pFree);
- return SQLITE_CORRUPT_BKPT;
+ rc = SQLITE_CORRUPT_BKPT;
+ goto moveto_done;
}
}else{
pIdxKey = 0;
}
rc = sqlite3BtreeMovetoUnpacked(pCur, pIdxKey, nKey, bias, pRes);
- if( pFree ){
- sqlite3DbFree(pCur->pKeyInfo->db, pFree);
+moveto_done:
+ if( pIdxKey ){
+ sqlite3DbFree(pCur->pKeyInfo->db, pIdxKey);
}
return rc;
}
@@ -55910,7 +60473,7 @@ static int btreeMoveto(
static int btreeRestoreCursorPosition(BtCursor *pCur){
int rc;
int skipNext;
- assert( cursorHoldsMutex(pCur) );
+ assert( cursorOwnsBtShared(pCur) );
assert( pCur->eState>=CURSOR_REQUIRESEEK );
if( pCur->eState==CURSOR_FAULT ){
return pCur->skipNext;
@@ -55950,6 +60513,17 @@ SQLITE_PRIVATE int sqlite3BtreeCursorHasMoved(BtCursor *pCur){
return pCur->eState!=CURSOR_VALID;
}
+/*
+** Return a pointer to a fake BtCursor object that will always answer
+** false to the sqlite3BtreeCursorHasMoved() routine above. The fake
+** cursor returned must not be used with any other Btree interface.
+*/
+SQLITE_PRIVATE BtCursor *sqlite3BtreeFakeValidCursor(void){
+ static u8 fakeCursor = CURSOR_VALID;
+ assert( offsetof(BtCursor, eState)==0 );
+ return (BtCursor*)&fakeCursor;
+}
+
/*
** This routine restores a cursor back to its original position after it
** has been moved by some outside activity (such as a btree rebalance or
@@ -56115,7 +60689,7 @@ static int ptrmapGet(BtShared *pBt, Pgno key, u8 *pEType, Pgno *pPgno){
if( pPgno ) *pPgno = get4byte(&pPtrmap[offset+1]);
sqlite3PagerUnref(pDbPage);
- if( *pEType<1 || *pEType>5 ) return SQLITE_CORRUPT_BKPT;
+ if( *pEType<1 || *pEType>5 ) return SQLITE_CORRUPT_PGNO(iPtrmap);
return SQLITE_OK;
}
@@ -56199,7 +60773,6 @@ static void btreeParseCellPtrNoPayload(
){
assert( sqlite3_mutex_held(pPage->pBt->mutex) );
assert( pPage->leaf==0 );
- assert( pPage->noPayload );
assert( pPage->childPtrSize==4 );
#ifndef SQLITE_DEBUG
UNUSED_PARAMETER(pPage);
@@ -56221,8 +60794,6 @@ static void btreeParseCellPtr(
assert( sqlite3_mutex_held(pPage->pBt->mutex) );
assert( pPage->leaf==0 || pPage->leaf==1 );
- assert( pPage->intKeyLeaf || pPage->noPayload );
- assert( pPage->noPayload==0 );
assert( pPage->intKeyLeaf );
assert( pPage->childPtrSize==0 );
pIter = pCell;
@@ -56291,7 +60862,6 @@ static void btreeParseCellPtrIndex(
assert( sqlite3_mutex_held(pPage->pBt->mutex) );
assert( pPage->leaf==0 || pPage->leaf==1 );
assert( pPage->intKeyLeaf==0 );
- assert( pPage->noPayload==0 );
pIter = pCell + pPage->childPtrSize;
nPayload = *pIter;
if( nPayload>=0x80 ){
@@ -56352,7 +60922,6 @@ static u16 cellSizePtr(MemPage *pPage, u8 *pCell){
pPage->xParseCell(pPage, pCell, &debuginfo);
#endif
- assert( pPage->noPayload==0 );
nSize = *pIter;
if( nSize>=0x80 ){
pEnd = &pIter[8];
@@ -56438,17 +61007,18 @@ static void ptrmapPutOvflPtr(MemPage *pPage, u8 *pCell, int *pRC){
/*
-** Defragment the page given. All Cells are moved to the
-** end of the page and all free space is collected into one
-** big FreeBlk that occurs in between the header and cell
-** pointer array and the cell content area.
+** Defragment the page given. This routine reorganizes cells within the
+** page so that there are no free-blocks on the free-block list.
+**
+** Parameter nMaxFrag is the maximum amount of fragmented space that may be
+** present in the page after this routine returns.
**
** EVIDENCE-OF: R-44582-60138 SQLite may from time to time reorganize a
** b-tree page so that there are no freeblocks or fragment bytes, all
** unused bytes are contained in the unallocated space region, and all
** cells are packed tightly at the end of the page.
*/
-static int defragmentPage(MemPage *pPage){
+static int defragmentPage(MemPage *pPage, int nMaxFrag){
int i; /* Loop counter */
int pc; /* Address of the i-th cell */
int hdr; /* Offset to the page header */
@@ -56463,7 +61033,6 @@ static int defragmentPage(MemPage *pPage){
int iCellFirst; /* First allowable cell index */
int iCellLast; /* Last possible cell index */
-
assert( sqlite3PagerIswriteable(pPage->pDbPage) );
assert( pPage->pBt!=0 );
assert( pPage->pBt->usableSize <= SQLITE_MAX_PAGE_SIZE );
@@ -56475,9 +61044,59 @@ static int defragmentPage(MemPage *pPage){
cellOffset = pPage->cellOffset;
nCell = pPage->nCell;
assert( nCell==get2byte(&data[hdr+3]) );
- usableSize = pPage->pBt->usableSize;
- cbrk = usableSize;
iCellFirst = cellOffset + 2*nCell;
+ usableSize = pPage->pBt->usableSize;
+
+ /* This block handles pages with two or fewer free blocks and nMaxFrag
+ ** or fewer fragmented bytes. In this case it is faster to move the
+ ** two (or one) blocks of cells using memmove() and add the required
+ ** offsets to each pointer in the cell-pointer array than it is to
+ ** reconstruct the entire page. */
+ if( (int)data[hdr+7]<=nMaxFrag ){
+ int iFree = get2byte(&data[hdr+1]);
+ if( iFree ){
+ int iFree2 = get2byte(&data[iFree]);
+
+ /* pageFindSlot() has already verified that free blocks are sorted
+ ** in order of offset within the page, and that no block extends
+ ** past the end of the page. Provided the two free slots do not
+ ** overlap, this guarantees that the memmove() calls below will not
+ ** overwrite the usableSize byte buffer, even if the database page
+ ** is corrupt. */
+ assert( iFree2==0 || iFree2>iFree );
+ assert( iFree+get2byte(&data[iFree+2]) <= usableSize );
+ assert( iFree2==0 || iFree2+get2byte(&data[iFree2+2]) <= usableSize );
+
+ if( 0==iFree2 || (data[iFree2]==0 && data[iFree2+1]==0) ){
+ u8 *pEnd = &data[cellOffset + nCell*2];
+ u8 *pAddr;
+ int sz2 = 0;
+ int sz = get2byte(&data[iFree+2]);
+ int top = get2byte(&data[hdr+5]);
+ if( top>=iFree ){
+ return SQLITE_CORRUPT_PGNO(pPage->pgno);
+ }
+ if( iFree2 ){
+ assert( iFree+sz<=iFree2 ); /* Verified by pageFindSlot() */
+ sz2 = get2byte(&data[iFree2+2]);
+ assert( iFree+sz+sz2+iFree2-(iFree+sz) <= usableSize );
+ memmove(&data[iFree+sz+sz2], &data[iFree+sz], iFree2-(iFree+sz));
+ sz += sz2;
+ }
+ cbrk = top+sz;
+ assert( cbrk+(iFree-top) <= usableSize );
+ memmove(&data[cbrk], &data[top], iFree-top);
+ for(pAddr=&data[cellOffset]; pAddriCellLast ){
- return SQLITE_CORRUPT_BKPT;
+ return SQLITE_CORRUPT_PGNO(pPage->pgno);
}
assert( pc>=iCellFirst && pc<=iCellLast );
size = pPage->xCellSize(pPage, &src[pc]);
cbrk -= size;
if( cbrkusableSize ){
- return SQLITE_CORRUPT_BKPT;
+ return SQLITE_CORRUPT_PGNO(pPage->pgno);
}
assert( cbrk+size<=usableSize && cbrk>=iCellFirst );
testcase( cbrk+size==usableSize );
@@ -56511,16 +61130,18 @@ static int defragmentPage(MemPage *pPage){
}
memcpy(&data[cbrk], &src[pc], size);
}
+ data[hdr+7] = 0;
+
+ defragment_out:
+ if( data[hdr+7]+cbrk-iCellFirst!=pPage->nFree ){
+ return SQLITE_CORRUPT_PGNO(pPage->pgno);
+ }
assert( cbrk>=iCellFirst );
put2byte(&data[hdr+5], cbrk);
data[hdr+1] = 0;
data[hdr+2] = 0;
- data[hdr+7] = 0;
memset(&data[iCellFirst], 0, cbrk-iCellFirst);
assert( sqlite3PagerIswriteable(pPage->pDbPage) );
- if( cbrk-iCellFirst!=pPage->nFree ){
- return SQLITE_CORRUPT_BKPT;
- }
return SQLITE_OK;
}
@@ -56545,16 +61166,10 @@ static u8 *pageFindSlot(MemPage *pPg, int nByte, int *pRc){
int pc = get2byte(&aData[iAddr]);
int x;
int usableSize = pPg->pBt->usableSize;
+ int size; /* Size of the free slot */
assert( pc>0 );
- do{
- int size; /* Size of the free slot */
- /* EVIDENCE-OF: R-06866-39125 Freeblocks are always connected in order of
- ** increasing offset. */
- if( pc>usableSize-4 || pc=0 ){
testcase( x==4 );
testcase( x==3 );
- if( pc < pPg->cellOffset+2*pPg->nCell || size+pc > usableSize ){
- *pRc = SQLITE_CORRUPT_BKPT;
+ if( size+pc > usableSize ){
+ *pRc = SQLITE_CORRUPT_PGNO(pPg->pgno);
return 0;
}else if( x<4 ){
/* EVIDENCE-OF: R-11498-58022 In a well-formed b-tree page, the total
@@ -56583,7 +61198,11 @@ static u8 *pageFindSlot(MemPage *pPg, int nByte, int *pRc){
}
iAddr = pc;
pc = get2byte(&aData[pc]);
- }while( pc );
+ if( pcpgno);
+ }
return 0;
}
@@ -56630,7 +61249,7 @@ static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){
if( top==0 && pPage->pBt->usableSize==65536 ){
top = 65536;
}else{
- return SQLITE_CORRUPT_BKPT;
+ return SQLITE_CORRUPT_PGNO(pPage->pgno);
}
}
@@ -56658,10 +61277,10 @@ static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){
testcase( gap+2+nByte==top );
if( gap+2+nByte>top ){
assert( pPage->nCell>0 || CORRUPT_DB );
- rc = defragmentPage(pPage);
+ rc = defragmentPage(pPage, MIN(4, pPage->nFree - (2+nByte)));
if( rc ) return rc;
top = get2byteNotZero(&data[hdr+5]);
- assert( gap+nByte<=top );
+ assert( gap+2+nByte<=top );
}
@@ -56697,7 +61316,7 @@ static int freeSpace(MemPage *pPage, u16 iStart, u16 iSize){
u8 hdr; /* Page header size. 0 or 100 */
u8 nFrag = 0; /* Reduction in fragmentation */
u16 iOrigSize = iSize; /* Original value of iSize */
- u32 iLast = pPage->pBt->usableSize-4; /* Largest possible freeblock offset */
+ u16 x; /* Offset to cell content area */
u32 iEnd = iStart + iSize; /* First byte past the iStart buffer */
unsigned char *data = pPage->aData; /* Page content */
@@ -56707,13 +61326,7 @@ static int freeSpace(MemPage *pPage, u16 iStart, u16 iSize){
assert( CORRUPT_DB || iEnd <= pPage->pBt->usableSize );
assert( sqlite3_mutex_held(pPage->pBt->mutex) );
assert( iSize>=4 ); /* Minimum cell size is 4 */
- assert( iStart<=iLast );
-
- /* Overwrite deleted information with zeros when the secure_delete
- ** option is enabled */
- if( pPage->pBt->btsFlags & BTS_SECURE_DELETE ){
- memset(&data[iStart], 0, iSize);
- }
+ assert( iStart<=pPage->pBt->usableSize-4 );
/* The list of freeblocks must be in ascending order. Find the
** spot on the list where iStart should be inserted.
@@ -56723,11 +61336,16 @@ static int freeSpace(MemPage *pPage, u16 iStart, u16 iSize){
if( data[iPtr+1]==0 && data[iPtr]==0 ){
iFreeBlk = 0; /* Shortcut for the case when the freelist is empty */
}else{
- while( (iFreeBlk = get2byte(&data[iPtr]))>0 && iFreeBlkpgno);
+ }
iPtr = iFreeBlk;
}
- if( iFreeBlk>iLast ) return SQLITE_CORRUPT_BKPT;
+ if( iFreeBlk>pPage->pBt->usableSize-4 ){
+ return SQLITE_CORRUPT_PGNO(pPage->pgno);
+ }
assert( iFreeBlk>iPtr || iFreeBlk==0 );
/* At this point:
@@ -56738,9 +61356,11 @@ static int freeSpace(MemPage *pPage, u16 iStart, u16 iSize){
*/
if( iFreeBlk && iEnd+3>=iFreeBlk ){
nFrag = iFreeBlk - iEnd;
- if( iEnd>iFreeBlk ) return SQLITE_CORRUPT_BKPT;
+ if( iEnd>iFreeBlk ) return SQLITE_CORRUPT_PGNO(pPage->pgno);
iEnd = iFreeBlk + get2byte(&data[iFreeBlk+2]);
- if( iEnd > pPage->pBt->usableSize ) return SQLITE_CORRUPT_BKPT;
+ if( iEnd > pPage->pBt->usableSize ){
+ return SQLITE_CORRUPT_PGNO(pPage->pgno);
+ }
iSize = iEnd - iStart;
iFreeBlk = get2byte(&data[iFreeBlk]);
}
@@ -56752,28 +61372,34 @@ static int freeSpace(MemPage *pPage, u16 iStart, u16 iSize){
if( iPtr>hdr+1 ){
int iPtrEnd = iPtr + get2byte(&data[iPtr+2]);
if( iPtrEnd+3>=iStart ){
- if( iPtrEnd>iStart ) return SQLITE_CORRUPT_BKPT;
+ if( iPtrEnd>iStart ) return SQLITE_CORRUPT_PGNO(pPage->pgno);
nFrag += iStart - iPtrEnd;
iSize = iEnd - iPtr;
iStart = iPtr;
}
}
- if( nFrag>data[hdr+7] ) return SQLITE_CORRUPT_BKPT;
+ if( nFrag>data[hdr+7] ) return SQLITE_CORRUPT_PGNO(pPage->pgno);
data[hdr+7] -= nFrag;
}
- if( iStart==get2byte(&data[hdr+5]) ){
+ x = get2byte(&data[hdr+5]);
+ if( iStart<=x ){
/* The new freeblock is at the beginning of the cell content area,
** so just extend the cell content area rather than create another
** freelist entry */
- if( iPtr!=hdr+1 ) return SQLITE_CORRUPT_BKPT;
+ if( iStartpgno);
put2byte(&data[hdr+1], iFreeBlk);
put2byte(&data[hdr+5], iEnd);
}else{
/* Insert the new freeblock into the freelist */
put2byte(&data[iPtr], iStart);
- put2byte(&data[iStart], iFreeBlk);
- put2byte(&data[iStart+2], iSize);
}
+ if( pPage->pBt->btsFlags & BTS_FAST_SECURE ){
+ /* Overwrite deleted information with zeros when the secure_delete
+ ** option is enabled */
+ memset(&data[iStart], 0, iSize);
+ }
+ put2byte(&data[iStart], iFreeBlk);
+ put2byte(&data[iStart+2], iSize);
pPage->nFree += iOrigSize;
return SQLITE_OK;
}
@@ -56801,42 +61427,39 @@ static int decodeFlags(MemPage *pPage, int flagByte){
pPage->xCellSize = cellSizePtr;
pBt = pPage->pBt;
if( flagByte==(PTF_LEAFDATA | PTF_INTKEY) ){
- /* EVIDENCE-OF: R-03640-13415 A value of 5 means the page is an interior
- ** table b-tree page. */
+ /* EVIDENCE-OF: R-07291-35328 A value of 5 (0x05) means the page is an
+ ** interior table b-tree page. */
assert( (PTF_LEAFDATA|PTF_INTKEY)==5 );
- /* EVIDENCE-OF: R-20501-61796 A value of 13 means the page is a leaf
- ** table b-tree page. */
+ /* EVIDENCE-OF: R-26900-09176 A value of 13 (0x0d) means the page is a
+ ** leaf table b-tree page. */
assert( (PTF_LEAFDATA|PTF_INTKEY|PTF_LEAF)==13 );
pPage->intKey = 1;
if( pPage->leaf ){
pPage->intKeyLeaf = 1;
- pPage->noPayload = 0;
pPage->xParseCell = btreeParseCellPtr;
}else{
pPage->intKeyLeaf = 0;
- pPage->noPayload = 1;
pPage->xCellSize = cellSizePtrNoPayload;
pPage->xParseCell = btreeParseCellPtrNoPayload;
}
pPage->maxLocal = pBt->maxLeaf;
pPage->minLocal = pBt->minLeaf;
}else if( flagByte==PTF_ZERODATA ){
- /* EVIDENCE-OF: R-27225-53936 A value of 2 means the page is an interior
- ** index b-tree page. */
+ /* EVIDENCE-OF: R-43316-37308 A value of 2 (0x02) means the page is an
+ ** interior index b-tree page. */
assert( (PTF_ZERODATA)==2 );
- /* EVIDENCE-OF: R-16571-11615 A value of 10 means the page is a leaf
- ** index b-tree page. */
+ /* EVIDENCE-OF: R-59615-42828 A value of 10 (0x0a) means the page is a
+ ** leaf index b-tree page. */
assert( (PTF_ZERODATA|PTF_LEAF)==10 );
pPage->intKey = 0;
pPage->intKeyLeaf = 0;
- pPage->noPayload = 0;
pPage->xParseCell = btreeParseCellPtrIndex;
pPage->maxLocal = pBt->maxLocal;
pPage->minLocal = pBt->minLocal;
}else{
/* EVIDENCE-OF: R-47608-56469 Any other value for the b-tree page type is
** an error. */
- return SQLITE_CORRUPT_BKPT;
+ return SQLITE_CORRUPT_PGNO(pPage->pgno);
}
pPage->max1bytePayload = pBt->max1bytePayload;
return SQLITE_OK;
@@ -56852,6 +61475,16 @@ static int decodeFlags(MemPage *pPage, int flagByte){
** we failed to detect any corruption.
*/
static int btreeInitPage(MemPage *pPage){
+ int pc; /* Address of a freeblock within pPage->aData[] */
+ u8 hdr; /* Offset to beginning of page header */
+ u8 *data; /* Equal to pPage->aData */
+ BtShared *pBt; /* The main btree structure */
+ int usableSize; /* Amount of usable space on each page */
+ u16 cellOffset; /* Offset from start of page to first cell pointer */
+ int nFree; /* Number of unused bytes on the page */
+ int top; /* First byte of the cell content area */
+ int iCellFirst; /* First allowable cell or freeblock offset */
+ int iCellLast; /* Last possible cell or freeblock offset */
assert( pPage->pBt!=0 );
assert( pPage->pBt->db!=0 );
@@ -56859,122 +61492,119 @@ static int btreeInitPage(MemPage *pPage){
assert( pPage->pgno==sqlite3PagerPagenumber(pPage->pDbPage) );
assert( pPage == sqlite3PagerGetExtra(pPage->pDbPage) );
assert( pPage->aData == sqlite3PagerGetData(pPage->pDbPage) );
+ assert( pPage->isInit==0 );
- if( !pPage->isInit ){
- u16 pc; /* Address of a freeblock within pPage->aData[] */
- u8 hdr; /* Offset to beginning of page header */
- u8 *data; /* Equal to pPage->aData */
- BtShared *pBt; /* The main btree structure */
- int usableSize; /* Amount of usable space on each page */
- u16 cellOffset; /* Offset from start of page to first cell pointer */
- int nFree; /* Number of unused bytes on the page */
- int top; /* First byte of the cell content area */
- int iCellFirst; /* First allowable cell or freeblock offset */
- int iCellLast; /* Last possible cell or freeblock offset */
+ pBt = pPage->pBt;
+ hdr = pPage->hdrOffset;
+ data = pPage->aData;
+ /* EVIDENCE-OF: R-28594-02890 The one-byte flag at offset 0 indicating
+ ** the b-tree page type. */
+ if( decodeFlags(pPage, data[hdr]) ){
+ return SQLITE_CORRUPT_PGNO(pPage->pgno);
+ }
+ assert( pBt->pageSize>=512 && pBt->pageSize<=65536 );
+ pPage->maskPage = (u16)(pBt->pageSize - 1);
+ pPage->nOverflow = 0;
+ usableSize = pBt->usableSize;
+ pPage->cellOffset = cellOffset = hdr + 8 + pPage->childPtrSize;
+ pPage->aDataEnd = &data[usableSize];
+ pPage->aCellIdx = &data[cellOffset];
+ pPage->aDataOfst = &data[pPage->childPtrSize];
+ /* EVIDENCE-OF: R-58015-48175 The two-byte integer at offset 5 designates
+ ** the start of the cell content area. A zero value for this integer is
+ ** interpreted as 65536. */
+ top = get2byteNotZero(&data[hdr+5]);
+ /* EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the
+ ** number of cells on the page. */
+ pPage->nCell = get2byte(&data[hdr+3]);
+ if( pPage->nCell>MX_CELL(pBt) ){
+ /* To many cells for a single page. The page must be corrupt */
+ return SQLITE_CORRUPT_PGNO(pPage->pgno);
+ }
+ testcase( pPage->nCell==MX_CELL(pBt) );
+ /* EVIDENCE-OF: R-24089-57979 If a page contains no cells (which is only
+ ** possible for a root page of a table that contains no rows) then the
+ ** offset to the cell content area will equal the page size minus the
+ ** bytes of reserved space. */
+ assert( pPage->nCell>0 || top==usableSize || CORRUPT_DB );
- pBt = pPage->pBt;
+ /* A malformed database page might cause us to read past the end
+ ** of page when parsing a cell.
+ **
+ ** The following block of code checks early to see if a cell extends
+ ** past the end of a page boundary and causes SQLITE_CORRUPT to be
+ ** returned if it does.
+ */
+ iCellFirst = cellOffset + 2*pPage->nCell;
+ iCellLast = usableSize - 4;
+ if( pBt->db->flags & SQLITE_CellSizeCk ){
+ int i; /* Index into the cell pointer array */
+ int sz; /* Size of a cell */
- hdr = pPage->hdrOffset;
- data = pPage->aData;
- /* EVIDENCE-OF: R-28594-02890 The one-byte flag at offset 0 indicating
- ** the b-tree page type. */
- if( decodeFlags(pPage, data[hdr]) ) return SQLITE_CORRUPT_BKPT;
- assert( pBt->pageSize>=512 && pBt->pageSize<=65536 );
- pPage->maskPage = (u16)(pBt->pageSize - 1);
- pPage->nOverflow = 0;
- usableSize = pBt->usableSize;
- pPage->cellOffset = cellOffset = hdr + 8 + pPage->childPtrSize;
- pPage->aDataEnd = &data[usableSize];
- pPage->aCellIdx = &data[cellOffset];
- pPage->aDataOfst = &data[pPage->childPtrSize];
- /* EVIDENCE-OF: R-58015-48175 The two-byte integer at offset 5 designates
- ** the start of the cell content area. A zero value for this integer is
- ** interpreted as 65536. */
- top = get2byteNotZero(&data[hdr+5]);
- /* EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the
- ** number of cells on the page. */
- pPage->nCell = get2byte(&data[hdr+3]);
- if( pPage->nCell>MX_CELL(pBt) ){
- /* To many cells for a single page. The page must be corrupt */
- return SQLITE_CORRUPT_BKPT;
- }
- testcase( pPage->nCell==MX_CELL(pBt) );
- /* EVIDENCE-OF: R-24089-57979 If a page contains no cells (which is only
- ** possible for a root page of a table that contains no rows) then the
- ** offset to the cell content area will equal the page size minus the
- ** bytes of reserved space. */
- assert( pPage->nCell>0 || top==usableSize || CORRUPT_DB );
-
- /* A malformed database page might cause us to read past the end
- ** of page when parsing a cell.
- **
- ** The following block of code checks early to see if a cell extends
- ** past the end of a page boundary and causes SQLITE_CORRUPT to be
- ** returned if it does.
- */
- iCellFirst = cellOffset + 2*pPage->nCell;
- iCellLast = usableSize - 4;
- if( pBt->db->flags & SQLITE_CellSizeCk ){
- int i; /* Index into the cell pointer array */
- int sz; /* Size of a cell */
-
- if( !pPage->leaf ) iCellLast--;
- for(i=0; inCell; i++){
- pc = get2byteAligned(&data[cellOffset+i*2]);
- testcase( pc==iCellFirst );
- testcase( pc==iCellLast );
- if( pciCellLast ){
- return SQLITE_CORRUPT_BKPT;
- }
- sz = pPage->xCellSize(pPage, &data[pc]);
- testcase( pc+sz==usableSize );
- if( pc+sz>usableSize ){
- return SQLITE_CORRUPT_BKPT;
- }
- }
- if( !pPage->leaf ) iCellLast++;
- }
-
- /* Compute the total free space on the page
- ** EVIDENCE-OF: R-23588-34450 The two-byte integer at offset 1 gives the
- ** start of the first freeblock on the page, or is zero if there are no
- ** freeblocks. */
- pc = get2byte(&data[hdr+1]);
- nFree = data[hdr+7] + top; /* Init nFree to non-freeblock free space */
- while( pc>0 ){
- u16 next, size;
+ if( !pPage->leaf ) iCellLast--;
+ for(i=0; inCell; i++){
+ pc = get2byteAligned(&data[cellOffset+i*2]);
+ testcase( pc==iCellFirst );
+ testcase( pc==iCellLast );
if( pciCellLast ){
- /* EVIDENCE-OF: R-55530-52930 In a well-formed b-tree page, there will
- ** always be at least one cell before the first freeblock.
- **
- ** Or, the freeblock is off the end of the page
- */
- return SQLITE_CORRUPT_BKPT;
+ return SQLITE_CORRUPT_PGNO(pPage->pgno);
+ }
+ sz = pPage->xCellSize(pPage, &data[pc]);
+ testcase( pc+sz==usableSize );
+ if( pc+sz>usableSize ){
+ return SQLITE_CORRUPT_PGNO(pPage->pgno);
+ }
+ }
+ if( !pPage->leaf ) iCellLast++;
+ }
+
+ /* Compute the total free space on the page
+ ** EVIDENCE-OF: R-23588-34450 The two-byte integer at offset 1 gives the
+ ** start of the first freeblock on the page, or is zero if there are no
+ ** freeblocks. */
+ pc = get2byte(&data[hdr+1]);
+ nFree = data[hdr+7] + top; /* Init nFree to non-freeblock free space */
+ if( pc>0 ){
+ u32 next, size;
+ if( pcpgno);
+ }
+ while( 1 ){
+ if( pc>iCellLast ){
+ /* Freeblock off the end of the page */
+ return SQLITE_CORRUPT_PGNO(pPage->pgno);
}
next = get2byte(&data[pc]);
size = get2byte(&data[pc+2]);
- if( (next>0 && next<=pc+size+3) || pc+size>usableSize ){
- /* Free blocks must be in ascending order. And the last byte of
- ** the free-block must lie on the database page. */
- return SQLITE_CORRUPT_BKPT;
- }
nFree = nFree + size;
+ if( next<=pc+size+3 ) break;
pc = next;
}
-
- /* At this point, nFree contains the sum of the offset to the start
- ** of the cell-content area plus the number of free bytes within
- ** the cell-content area. If this is greater than the usable-size
- ** of the page, then the page must be corrupted. This check also
- ** serves to verify that the offset to the start of the cell-content
- ** area, according to the page header, lies within the page.
- */
- if( nFree>usableSize ){
- return SQLITE_CORRUPT_BKPT;
+ if( next>0 ){
+ /* Freeblock not in ascending order */
+ return SQLITE_CORRUPT_PGNO(pPage->pgno);
+ }
+ if( pc+size>(unsigned int)usableSize ){
+ /* Last freeblock extends past page end */
+ return SQLITE_CORRUPT_PGNO(pPage->pgno);
}
- pPage->nFree = (u16)(nFree - iCellFirst);
- pPage->isInit = 1;
}
+
+ /* At this point, nFree contains the sum of the offset to the start
+ ** of the cell-content area plus the number of free bytes within
+ ** the cell-content area. If this is greater than the usable-size
+ ** of the page, then the page must be corrupted. This check also
+ ** serves to verify that the offset to the start of the cell-content
+ ** area, according to the page header, lies within the page.
+ */
+ if( nFree>usableSize ){
+ return SQLITE_CORRUPT_PGNO(pPage->pgno);
+ }
+ pPage->nFree = (u16)(nFree - iCellFirst);
+ pPage->isInit = 1;
return SQLITE_OK;
}
@@ -56993,7 +61623,7 @@ static void zeroPage(MemPage *pPage, int flags){
assert( sqlite3PagerGetData(pPage->pDbPage) == data );
assert( sqlite3PagerIswriteable(pPage->pDbPage) );
assert( sqlite3_mutex_held(pBt->mutex) );
- if( pBt->btsFlags & BTS_SECURE_DELETE ){
+ if( pBt->btsFlags & BTS_FAST_SECURE ){
memset(&data[hdr], 0, pBt->usableSize - hdr);
}
data[hdr] = (char)flags;
@@ -57084,7 +61714,7 @@ static Pgno btreePagecount(BtShared *pBt){
}
SQLITE_PRIVATE u32 sqlite3BtreeLastPage(Btree *p){
assert( sqlite3BtreeHoldsMutex(p) );
- assert( ((p->pBt->nPage)&0x8000000)==0 );
+ assert( ((p->pBt->nPage)&0x80000000)==0 );
return btreePagecount(p->pBt);
}
@@ -57111,7 +61741,7 @@ static int getAndInitPage(
int rc;
DbPage *pDbPage;
assert( sqlite3_mutex_held(pBt->mutex) );
- assert( pCur==0 || ppPage==&pCur->apPage[pCur->iPage] );
+ assert( pCur==0 || ppPage==&pCur->pPage );
assert( pCur==0 || bReadOnly==pCur->curPagerFlags );
assert( pCur==0 || pCur->iPage>0 );
@@ -57138,14 +61768,17 @@ static int getAndInitPage(
/* If obtaining a child page for a cursor, we must verify that the page is
** compatible with the root page. */
if( pCur && ((*ppPage)->nCell<1 || (*ppPage)->intKey!=pCur->curIntKey) ){
- rc = SQLITE_CORRUPT_BKPT;
+ rc = SQLITE_CORRUPT_PGNO(pgno);
releasePage(*ppPage);
goto getAndInitPage_error;
}
return SQLITE_OK;
getAndInitPage_error:
- if( pCur ) pCur->iPage--;
+ if( pCur ){
+ pCur->iPage--;
+ pCur->pPage = pCur->apPage[pCur->iPage];
+ }
testcase( pgno==0 );
assert( pgno!=0 || rc==SQLITE_CORRUPT );
return rc;
@@ -57154,6 +61787,8 @@ getAndInitPage_error:
/*
** Release a MemPage. This should be called once for each prior
** call to btreeGetPage.
+**
+** Page1 is a special case and must be released using releasePageOne().
*/
static void releasePageNotNull(MemPage *pPage){
assert( pPage->aData );
@@ -57167,6 +61802,16 @@ static void releasePageNotNull(MemPage *pPage){
static void releasePage(MemPage *pPage){
if( pPage ) releasePageNotNull(pPage);
}
+static void releasePageOne(MemPage *pPage){
+ assert( pPage!=0 );
+ assert( pPage->aData );
+ assert( pPage->pBt );
+ assert( pPage->pDbPage!=0 );
+ assert( sqlite3PagerGetExtra(pPage->pDbPage) == (void*)pPage );
+ assert( sqlite3PagerGetData(pPage->pDbPage)==pPage->aData );
+ assert( sqlite3_mutex_held(pPage->pBt->mutex) );
+ sqlite3PagerUnrefPageOne(pPage->pDbPage);
+}
/*
** Get an unused page.
@@ -57304,7 +61949,7 @@ SQLITE_PRIVATE int sqlite3BtreeOpen(
}
p = sqlite3MallocZero(sizeof(Btree));
if( !p ){
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
p->inTrans = TRANS_NONE;
p->db = db;
@@ -57328,7 +61973,7 @@ SQLITE_PRIVATE int sqlite3BtreeOpen(
p->sharable = 1;
if( !zFullPathname ){
sqlite3_free(p);
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
if( isMemdb ){
memcpy(zFullPathname, zFilename, nFilename);
@@ -57396,11 +62041,11 @@ SQLITE_PRIVATE int sqlite3BtreeOpen(
pBt = sqlite3MallocZero( sizeof(*pBt) );
if( pBt==0 ){
- rc = SQLITE_NOMEM;
+ rc = SQLITE_NOMEM_BKPT;
goto btree_open_out;
}
rc = sqlite3PagerOpen(pVfs, &pBt->pPager, zFilename,
- EXTRA_SIZE, flags, vfsFlags, pageReinit);
+ sizeof(MemPage), flags, vfsFlags, pageReinit);
if( rc==SQLITE_OK ){
sqlite3PagerSetMmapLimit(pBt->pPager, db->szMmap);
rc = sqlite3PagerReadFileheader(pBt->pPager,sizeof(zDbHeader),zDbHeader);
@@ -57416,8 +62061,10 @@ SQLITE_PRIVATE int sqlite3BtreeOpen(
pBt->pCursor = 0;
pBt->pPage1 = 0;
if( sqlite3PagerIsreadonly(pBt->pPager) ) pBt->btsFlags |= BTS_READ_ONLY;
-#ifdef SQLITE_SECURE_DELETE
+#if defined(SQLITE_SECURE_DELETE)
pBt->btsFlags |= BTS_SECURE_DELETE;
+#elif defined(SQLITE_FAST_SECURE_DELETE)
+ pBt->btsFlags |= BTS_OVERWRITE;
#endif
/* EVIDENCE-OF: R-51873-39618 The page size for a database file is
** determined by the 2-byte integer located at an offset of 16 bytes from
@@ -57458,15 +62105,14 @@ SQLITE_PRIVATE int sqlite3BtreeOpen(
#if !defined(SQLITE_OMIT_SHARED_CACHE) && !defined(SQLITE_OMIT_DISKIO)
/* Add the new BtShared object to the linked list sharable BtShareds.
*/
+ pBt->nRef = 1;
if( p->sharable ){
MUTEX_LOGIC( sqlite3_mutex *mutexShared; )
- pBt->nRef = 1;
MUTEX_LOGIC( mutexShared = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);)
if( SQLITE_THREADSAFE && sqlite3GlobalConfig.bCoreMutex ){
pBt->mutex = sqlite3MutexAlloc(SQLITE_MUTEX_FAST);
if( pBt->mutex==0 ){
- rc = SQLITE_NOMEM;
- db->mallocFailed = 0;
+ rc = SQLITE_NOMEM_BKPT;
goto btree_open_out;
}
}
@@ -57489,12 +62135,12 @@ SQLITE_PRIVATE int sqlite3BtreeOpen(
for(i=0; inDb; i++){
if( (pSib = db->aDb[i].pBt)!=0 && pSib->sharable ){
while( pSib->pPrev ){ pSib = pSib->pPrev; }
- if( p->pBtpBt ){
+ if( (uptr)p->pBt<(uptr)pSib->pBt ){
p->pNext = pSib;
p->pPrev = 0;
pSib->pPrev = p;
}else{
- while( pSib->pNext && pSib->pNext->pBtpBt ){
+ while( pSib->pNext && (uptr)pSib->pNext->pBt<(uptr)p->pBt ){
pSib = pSib->pNext;
}
p->pNext = pSib->pNext;
@@ -57514,12 +62160,14 @@ SQLITE_PRIVATE int sqlite3BtreeOpen(
btree_open_out:
if( rc!=SQLITE_OK ){
if( pBt && pBt->pPager ){
- sqlite3PagerClose(pBt->pPager);
+ sqlite3PagerClose(pBt->pPager, 0);
}
sqlite3_free(pBt);
sqlite3_free(p);
*ppBtree = 0;
}else{
+ sqlite3_file *pFile;
+
/* If the B-Tree was successfully opened, set the pager-cache size to the
** default value. Except, when opening on an existing shared pager-cache,
** do not change the pager-cache size.
@@ -57527,11 +62175,17 @@ btree_open_out:
if( sqlite3BtreeSchema(p, 0, 0)==0 ){
sqlite3PagerSetCachesize(p->pBt->pPager, SQLITE_DEFAULT_CACHE_SIZE);
}
+
+ pFile = sqlite3PagerFile(pBt->pPager);
+ if( pFile->pMethods ){
+ sqlite3OsFileControlHint(pFile, SQLITE_FCNTL_PDB, (void*)&pBt->db);
+ }
}
if( mutexOpen ){
assert( sqlite3_mutex_held(mutexOpen) );
sqlite3_mutex_leave(mutexOpen);
}
+ assert( rc!=SQLITE_OK || sqlite3BtreeConnectionCount(*ppBtree)>0 );
return rc;
}
@@ -57655,7 +62309,7 @@ SQLITE_PRIVATE int sqlite3BtreeClose(Btree *p){
** Clean out and delete the BtShared object.
*/
assert( !pBt->pCursor );
- sqlite3PagerClose(pBt->pPager);
+ sqlite3PagerClose(pBt->pPager, p->db);
if( pBt->xFreeSchema && pBt->pSchema ){
pBt->xFreeSchema(pBt->pSchema);
}
@@ -57748,21 +62402,6 @@ SQLITE_PRIVATE int sqlite3BtreeSetPagerFlags(
}
#endif
-/*
-** Return TRUE if the given btree is set to safety level 1. In other
-** words, return TRUE if no sync() occurs on the disk files.
-*/
-SQLITE_PRIVATE int sqlite3BtreeSyncDisabled(Btree *p){
- BtShared *pBt = p->pBt;
- int rc;
- assert( sqlite3_mutex_held(p->db->mutex) );
- sqlite3BtreeEnter(p);
- assert( pBt && pBt->pPager );
- rc = sqlite3PagerNosync(pBt->pPager);
- sqlite3BtreeLeave(p);
- return rc;
-}
-
/*
** Change the default pages size and the number of reserved bytes per page.
** Or, if the page size has already been fixed, return SQLITE_READONLY
@@ -57873,19 +62512,34 @@ SQLITE_PRIVATE int sqlite3BtreeMaxPageCount(Btree *p, int mxPage){
}
/*
-** Set the BTS_SECURE_DELETE flag if newFlag is 0 or 1. If newFlag is -1,
-** then make no changes. Always return the value of the BTS_SECURE_DELETE
-** setting after the change.
+** Change the values for the BTS_SECURE_DELETE and BTS_OVERWRITE flags:
+**
+** newFlag==0 Both BTS_SECURE_DELETE and BTS_OVERWRITE are cleared
+** newFlag==1 BTS_SECURE_DELETE set and BTS_OVERWRITE is cleared
+** newFlag==2 BTS_SECURE_DELETE cleared and BTS_OVERWRITE is set
+** newFlag==(-1) No changes
+**
+** This routine acts as a query if newFlag is less than zero
+**
+** With BTS_OVERWRITE set, deleted content is overwritten by zeros, but
+** freelist leaf pages are not written back to the database. Thus in-page
+** deleted content is cleared, but freelist deleted content is not.
+**
+** With BTS_SECURE_DELETE, operation is like BTS_OVERWRITE with the addition
+** that freelist leaf pages are written back into the database, increasing
+** the amount of disk I/O.
*/
SQLITE_PRIVATE int sqlite3BtreeSecureDelete(Btree *p, int newFlag){
int b;
if( p==0 ) return 0;
sqlite3BtreeEnter(p);
+ assert( BTS_OVERWRITE==BTS_SECURE_DELETE*2 );
+ assert( BTS_FAST_SECURE==(BTS_OVERWRITE|BTS_SECURE_DELETE) );
if( newFlag>=0 ){
- p->pBt->btsFlags &= ~BTS_SECURE_DELETE;
- if( newFlag ) p->pBt->btsFlags |= BTS_SECURE_DELETE;
- }
- b = (p->pBt->btsFlags & BTS_SECURE_DELETE)!=0;
+ p->pBt->btsFlags &= ~BTS_FAST_SECURE;
+ p->pBt->btsFlags |= BTS_SECURE_DELETE*newFlag;
+ }
+ b = (p->pBt->btsFlags & BTS_FAST_SECURE)/BTS_SECURE_DELETE;
sqlite3BtreeLeave(p);
return b;
}
@@ -57936,6 +62590,32 @@ SQLITE_PRIVATE int sqlite3BtreeGetAutoVacuum(Btree *p){
#endif
}
+/*
+** If the user has not set the safety-level for this database connection
+** using "PRAGMA synchronous", and if the safety-level is not already
+** set to the value passed to this function as the second parameter,
+** set it so.
+*/
+#if SQLITE_DEFAULT_SYNCHRONOUS!=SQLITE_DEFAULT_WAL_SYNCHRONOUS \
+ && !defined(SQLITE_OMIT_WAL)
+static void setDefaultSyncFlag(BtShared *pBt, u8 safety_level){
+ sqlite3 *db;
+ Db *pDb;
+ if( (db=pBt->db)!=0 && (pDb=db->aDb)!=0 ){
+ while( pDb->pBt==0 || pDb->pBt->pBt!=pBt ){ pDb++; }
+ if( pDb->bSyncSet==0
+ && pDb->safety_level!=safety_level
+ && pDb!=&db->aDb[1]
+ ){
+ pDb->safety_level = safety_level;
+ sqlite3PagerSetFlags(pBt->pPager,
+ pDb->safety_level | (db->flags & PAGER_FLAGS_MASK));
+ }
+ }
+}
+#else
+# define setDefaultSyncFlag(pBt,safety_level)
+#endif
/*
** Get a reference to pPage1 of the database file. This will
@@ -58008,11 +62688,16 @@ static int lockBtree(BtShared *pBt){
rc = sqlite3PagerOpenWal(pBt->pPager, &isOpen);
if( rc!=SQLITE_OK ){
goto page1_init_failed;
- }else if( isOpen==0 ){
- releasePage(pPage1);
- return SQLITE_OK;
+ }else{
+ setDefaultSyncFlag(pBt, SQLITE_DEFAULT_WAL_SYNCHRONOUS+1);
+ if( isOpen==0 ){
+ releasePageOne(pPage1);
+ return SQLITE_OK;
+ }
}
rc = SQLITE_NOTADB;
+ }else{
+ setDefaultSyncFlag(pBt, SQLITE_DEFAULT_SYNCHRONOUS+1);
}
#endif
@@ -58053,7 +62738,7 @@ static int lockBtree(BtShared *pBt){
** zero and return SQLITE_OK. The caller will call this function
** again with the correct page-size.
*/
- releasePage(pPage1);
+ releasePageOne(pPage1);
pBt->usableSize = usableSize;
pBt->pageSize = pageSize;
freeTempSpace(pBt);
@@ -58061,7 +62746,7 @@ static int lockBtree(BtShared *pBt){
pageSize-usableSize);
return rc;
}
- if( (pBt->db->flags & SQLITE_RecoveryMode)==0 && nPage>nPageFile ){
+ if( (pBt->db->flags & SQLITE_WriteSchema)==0 && nPage>nPageFile ){
rc = SQLITE_CORRUPT_BKPT;
goto page1_init_failed;
}
@@ -58107,7 +62792,7 @@ static int lockBtree(BtShared *pBt){
return SQLITE_OK;
page1_init_failed:
- releasePage(pPage1);
+ releasePageOne(pPage1);
pBt->pPage1 = 0;
return rc;
}
@@ -58152,7 +62837,7 @@ static void unlockBtreeIfUnused(BtShared *pBt){
assert( pPage1->aData );
assert( sqlite3PagerRefcount(pBt->pPager)==1 );
pBt->pPage1 = 0;
- releasePageNotNull(pPage1);
+ releasePageOne(pPage1);
}
}
@@ -58250,7 +62935,6 @@ SQLITE_PRIVATE int sqlite3BtreeNewDb(Btree *p){
** proceed.
*/
SQLITE_PRIVATE int sqlite3BtreeBeginTrans(Btree *p, int wrflag){
- sqlite3 *pBlock = 0;
BtShared *pBt = p->pBt;
int rc = SQLITE_OK;
@@ -58273,27 +62957,30 @@ SQLITE_PRIVATE int sqlite3BtreeBeginTrans(Btree *p, int wrflag){
}
#ifndef SQLITE_OMIT_SHARED_CACHE
- /* If another database handle has already opened a write transaction
- ** on this shared-btree structure and a second write transaction is
- ** requested, return SQLITE_LOCKED.
- */
- if( (wrflag && pBt->inTransaction==TRANS_WRITE)
- || (pBt->btsFlags & BTS_PENDING)!=0
- ){
- pBlock = pBt->pWriter->db;
- }else if( wrflag>1 ){
- BtLock *pIter;
- for(pIter=pBt->pLock; pIter; pIter=pIter->pNext){
- if( pIter->pBtree!=p ){
- pBlock = pIter->pBtree->db;
- break;
+ {
+ sqlite3 *pBlock = 0;
+ /* If another database handle has already opened a write transaction
+ ** on this shared-btree structure and a second write transaction is
+ ** requested, return SQLITE_LOCKED.
+ */
+ if( (wrflag && pBt->inTransaction==TRANS_WRITE)
+ || (pBt->btsFlags & BTS_PENDING)!=0
+ ){
+ pBlock = pBt->pWriter->db;
+ }else if( wrflag>1 ){
+ BtLock *pIter;
+ for(pIter=pBt->pLock; pIter; pIter=pIter->pNext){
+ if( pIter->pBtree!=p ){
+ pBlock = pIter->pBtree->db;
+ break;
+ }
}
}
- }
- if( pBlock ){
- sqlite3ConnectionBlocked(p->db, pBlock);
- rc = SQLITE_LOCKED_SHAREDCACHE;
- goto trans_begun;
+ if( pBlock ){
+ sqlite3ConnectionBlocked(p->db, pBlock);
+ rc = SQLITE_LOCKED_SHAREDCACHE;
+ goto trans_begun;
+ }
}
#endif
@@ -58399,14 +63086,11 @@ static int setChildPtrmaps(MemPage *pPage){
int nCell; /* Number of cells in page pPage */
int rc; /* Return code */
BtShared *pBt = pPage->pBt;
- u8 isInitOrig = pPage->isInit;
Pgno pgno = pPage->pgno;
assert( sqlite3_mutex_held(pPage->pBt->mutex) );
- rc = btreeInitPage(pPage);
- if( rc!=SQLITE_OK ){
- goto set_child_ptrmaps_out;
- }
+ rc = pPage->isInit ? SQLITE_OK : btreeInitPage(pPage);
+ if( rc!=SQLITE_OK ) return rc;
nCell = pPage->nCell;
for(i=0; iisInit = isInitOrig;
return rc;
}
@@ -58450,16 +63132,15 @@ static int modifyPagePointer(MemPage *pPage, Pgno iFrom, Pgno iTo, u8 eType){
if( eType==PTRMAP_OVERFLOW2 ){
/* The pointer is always the first 4 bytes of the page in this case. */
if( get4byte(pPage->aData)!=iFrom ){
- return SQLITE_CORRUPT_BKPT;
+ return SQLITE_CORRUPT_PGNO(pPage->pgno);
}
put4byte(pPage->aData, iTo);
}else{
- u8 isInitOrig = pPage->isInit;
int i;
int nCell;
int rc;
- rc = btreeInitPage(pPage);
+ rc = pPage->isInit ? SQLITE_OK : btreeInitPage(pPage);
if( rc ) return rc;
nCell = pPage->nCell;
@@ -58468,12 +63149,14 @@ static int modifyPagePointer(MemPage *pPage, Pgno iFrom, Pgno iTo, u8 eType){
if( eType==PTRMAP_OVERFLOW1 ){
CellInfo info;
pPage->xParseCell(pPage, pCell, &info);
- if( info.nLocalaData+pPage->maskPage
- && iFrom==get4byte(pCell+info.nSize-4)
- ){
- put4byte(pCell+info.nSize-4, iTo);
- break;
+ if( info.nLocal pPage->aData+pPage->pBt->usableSize ){
+ return SQLITE_CORRUPT_PGNO(pPage->pgno);
+ }
+ if( iFrom==get4byte(pCell+info.nSize-4) ){
+ put4byte(pCell+info.nSize-4, iTo);
+ break;
+ }
}
}else{
if( get4byte(pCell)==iFrom ){
@@ -58486,12 +63169,10 @@ static int modifyPagePointer(MemPage *pPage, Pgno iFrom, Pgno iTo, u8 eType){
if( i==nCell ){
if( eType!=PTRMAP_BTREE ||
get4byte(&pPage->aData[pPage->hdrOffset+8])!=iFrom ){
- return SQLITE_CORRUPT_BKPT;
+ return SQLITE_CORRUPT_PGNO(pPage->pgno);
}
put4byte(&pPage->aData[pPage->hdrOffset+8], iTo);
}
-
- pPage->isInit = isInitOrig;
}
return SQLITE_OK;
}
@@ -59008,7 +63689,6 @@ SQLITE_PRIVATE int sqlite3BtreeTripAllCursors(Btree *pBtree, int errCode, int wr
if( pBtree ){
sqlite3BtreeEnter(pBtree);
for(p=pBtree->pBt->pCursor; p; p=p->pNext){
- int i;
if( writeOnly && (p->curFlags & BTCF_WriteFlag)==0 ){
if( p->eState==CURSOR_VALID || p->eState==CURSOR_SKIPNEXT ){
rc = saveCursorPosition(p);
@@ -59022,10 +63702,7 @@ SQLITE_PRIVATE int sqlite3BtreeTripAllCursors(Btree *pBtree, int errCode, int wr
p->eState = CURSOR_FAULT;
p->skipNext = errCode;
}
- for(i=0; i<=p->iPage; i++){
- releasePage(p->apPage[i]);
- p->apPage[i] = 0;
- }
+ btreeReleaseAllCursorPages(p);
}
sqlite3BtreeLeave(pBtree);
}
@@ -59082,7 +63759,7 @@ SQLITE_PRIVATE int sqlite3BtreeRollback(Btree *p, int tripCode, int writeOnly){
if( nPage==0 ) sqlite3PagerPagecount(pBt->pPager, &nPage);
testcase( pBt->nPage!=nPage );
pBt->nPage = nPage;
- releasePage(pPage1);
+ releasePageOne(pPage1);
}
assert( countValidCursors(pBt, 1)==0 );
pBt->inTransaction = TRANS_READ;
@@ -59150,7 +63827,12 @@ SQLITE_PRIVATE int sqlite3BtreeSavepoint(Btree *p, int op, int iSavepoint){
assert( op==SAVEPOINT_RELEASE || op==SAVEPOINT_ROLLBACK );
assert( iSavepoint>=0 || (iSavepoint==-1 && op==SAVEPOINT_ROLLBACK) );
sqlite3BtreeEnter(p);
- rc = sqlite3PagerSavepoint(pBt->pPager, op, iSavepoint);
+ if( op==SAVEPOINT_ROLLBACK ){
+ rc = saveAllCursors(pBt, 0, 0);
+ }
+ if( rc==SQLITE_OK ){
+ rc = sqlite3PagerSavepoint(pBt->pPager, op, iSavepoint);
+ }
if( rc==SQLITE_OK ){
if( iSavepoint<0 && (pBt->btsFlags & BTS_INITIALLY_EMPTY)!=0 ){
pBt->nPage = 0;
@@ -59175,13 +63857,13 @@ SQLITE_PRIVATE int sqlite3BtreeSavepoint(Btree *p, int op, int iSavepoint){
** on the database already. If a write-cursor is requested, then
** the caller is assumed to have an open write transaction.
**
-** If wrFlag==0, then the cursor can only be used for reading.
-** If wrFlag==1, then the cursor can be used for reading or for
-** writing if other conditions for writing are also met. These
-** are the conditions that must be met in order for writing to
-** be allowed:
+** If the BTREE_WRCSR bit of wrFlag is clear, then the cursor can only
+** be used for reading. If the BTREE_WRCSR bit is set, then the cursor
+** can be used for reading or for writing if other conditions for writing
+** are also met. These are the conditions that must be met in order
+** for writing to be allowed:
**
-** 1: The cursor must have been opened with wrFlag==1
+** 1: The cursor must have been opened with wrFlag containing BTREE_WRCSR
**
** 2: Other database connections that share the same pager cache
** but which are not in the READ_UNCOMMITTED state may not have
@@ -59193,6 +63875,16 @@ SQLITE_PRIVATE int sqlite3BtreeSavepoint(Btree *p, int op, int iSavepoint){
**
** 4: There must be an active transaction.
**
+** The BTREE_FORDELETE bit of wrFlag may optionally be set if BTREE_WRCSR
+** is set. If FORDELETE is set, that is a hint to the implementation that
+** this cursor will only be used to seek to and delete entries of an index
+** as part of a larger DELETE statement. The FORDELETE hint is not used by
+** this implementation. But in a hypothetical alternative storage engine
+** in which index entries are automatically deleted when corresponding table
+** rows are deleted, the FORDELETE flag is a hint that all SEEK and DELETE
+** operations on this cursor can be no-ops and all READ operations can
+** return a null row (2-bytes: 0x01 0x00).
+**
** No checking is done to make sure that page iTable really is the
** root page of a b-tree. If it is not, then the cursor acquired
** will not work correctly.
@@ -59231,7 +63923,7 @@ static int btreeCursor(
if( wrFlag ){
allocateTempSpace(pBt);
- if( pBt->pTmpSpace==0 ) return SQLITE_NOMEM;
+ if( pBt->pTmpSpace==0 ) return SQLITE_NOMEM_BKPT;
}
if( iTable==1 && btreePagecount(pBt)==0 ){
assert( wrFlag==0 );
@@ -59309,10 +64001,8 @@ SQLITE_PRIVATE void sqlite3BtreeCursorZero(BtCursor *p){
SQLITE_PRIVATE int sqlite3BtreeCloseCursor(BtCursor *pCur){
Btree *pBtree = pCur->pBtree;
if( pBtree ){
- int i;
BtShared *pBt = pCur->pBt;
sqlite3BtreeEnter(pBtree);
- sqlite3BtreeClearCursor(pCur);
assert( pBt->pCursor!=0 );
if( pBt->pCursor==pCur ){
pBt->pCursor = pCur->pNext;
@@ -59326,12 +64016,10 @@ SQLITE_PRIVATE int sqlite3BtreeCloseCursor(BtCursor *pCur){
pPrev = pPrev->pNext;
}while( ALWAYS(pPrev) );
}
- for(i=0; i<=pCur->iPage; i++){
- releasePage(pCur->apPage[i]);
- }
+ btreeReleaseAllCursorPages(pCur);
unlockBtreeIfUnused(pBt);
sqlite3_free(pCur->aOverflow);
- /* sqlite3_free(pCur); */
+ sqlite3_free(pCur->pKey);
sqlite3BtreeLeave(pBtree);
}
return SQLITE_OK;
@@ -59348,9 +64036,8 @@ SQLITE_PRIVATE int sqlite3BtreeCloseCursor(BtCursor *pCur){
#ifndef NDEBUG
static void assertCellInfo(BtCursor *pCur){
CellInfo info;
- int iPage = pCur->iPage;
memset(&info, 0, sizeof(info));
- btreeParseCell(pCur->apPage[iPage], pCur->aiIdx[iPage], &info);
+ btreeParseCell(pCur->pPage, pCur->ix, &info);
assert( CORRUPT_DB || memcmp(&info, &pCur->info, sizeof(info))==0 );
}
#else
@@ -59358,9 +64045,8 @@ SQLITE_PRIVATE int sqlite3BtreeCloseCursor(BtCursor *pCur){
#endif
static SQLITE_NOINLINE void getCellInfo(BtCursor *pCur){
if( pCur->info.nSize==0 ){
- int iPage = pCur->iPage;
pCur->curFlags |= BTCF_ValidNKey;
- btreeParseCell(pCur->apPage[iPage],pCur->aiIdx[iPage],&pCur->info);
+ btreeParseCell(pCur->pPage,pCur->ix,&pCur->info);
}else{
assertCellInfo(pCur);
}
@@ -59376,48 +64062,39 @@ SQLITE_PRIVATE int sqlite3BtreeCursorIsValid(BtCursor *pCur){
return pCur && pCur->eState==CURSOR_VALID;
}
#endif /* NDEBUG */
-
-/*
-** Set *pSize to the size of the buffer needed to hold the value of
-** the key for the current entry. If the cursor is not pointing
-** to a valid entry, *pSize is set to 0.
-**
-** For a table with the INTKEY flag set, this routine returns the key
-** itself, not the number of bytes in the key.
-**
-** The caller must position the cursor prior to invoking this routine.
-**
-** This routine cannot fail. It always returns SQLITE_OK.
-*/
-SQLITE_PRIVATE int sqlite3BtreeKeySize(BtCursor *pCur, i64 *pSize){
- assert( cursorHoldsMutex(pCur) );
- assert( pCur->eState==CURSOR_VALID );
- getCellInfo(pCur);
- *pSize = pCur->info.nKey;
- return SQLITE_OK;
+SQLITE_PRIVATE int sqlite3BtreeCursorIsValidNN(BtCursor *pCur){
+ assert( pCur!=0 );
+ return pCur->eState==CURSOR_VALID;
}
/*
-** Set *pSize to the number of bytes of data in the entry the
-** cursor currently points to.
+** Return the value of the integer key or "rowid" for a table btree.
+** This routine is only valid for a cursor that is pointing into a
+** ordinary table btree. If the cursor points to an index btree or
+** is invalid, the result of this routine is undefined.
+*/
+SQLITE_PRIVATE i64 sqlite3BtreeIntegerKey(BtCursor *pCur){
+ assert( cursorHoldsMutex(pCur) );
+ assert( pCur->eState==CURSOR_VALID );
+ assert( pCur->curIntKey );
+ getCellInfo(pCur);
+ return pCur->info.nKey;
+}
+
+/*
+** Return the number of bytes of payload for the entry that pCur is
+** currently pointing to. For table btrees, this will be the amount
+** of data. For index btrees, this will be the size of the key.
**
** The caller must guarantee that the cursor is pointing to a non-NULL
** valid entry. In other words, the calling procedure must guarantee
** that the cursor has Cursor.eState==CURSOR_VALID.
-**
-** Failure is not possible. This function always returns SQLITE_OK.
-** It might just as well be a procedure (returning void) but we continue
-** to return an integer result code for historical reasons.
*/
-SQLITE_PRIVATE int sqlite3BtreeDataSize(BtCursor *pCur, u32 *pSize){
+SQLITE_PRIVATE u32 sqlite3BtreePayloadSize(BtCursor *pCur){
assert( cursorHoldsMutex(pCur) );
assert( pCur->eState==CURSOR_VALID );
- assert( pCur->iPage>=0 );
- assert( pCur->iPageapPage[pCur->iPage]->intKeyLeaf==1 );
getCellInfo(pCur);
- *pSize = pCur->info.nPayload;
- return SQLITE_OK;
+ return pCur->info.nPayload;
}
/*
@@ -59535,7 +64212,6 @@ static int copyPayload(
**
** 0: The operation is a read. Populate the overflow cache.
** 1: The operation is a write. Populate the overflow cache.
-** 2: The operation is a read. Do not populate the overflow cache.
**
** A total of "amt" bytes are read or written beginning at "offset".
** Data is read to or from the buffer pBuf.
@@ -59543,13 +64219,13 @@ static int copyPayload(
** The content being read or written might appear on the main page
** or be scattered out on multiple overflow pages.
**
-** If the current cursor entry uses one or more overflow pages and the
-** eOp argument is not 2, this function may allocate space for and lazily
-** populates the overflow page-list cache array (BtCursor.aOverflow).
+** If the current cursor entry uses one or more overflow pages
+** this function may allocate space for and lazily populate
+** the overflow page-list cache array (BtCursor.aOverflow).
** Subsequent calls use this cache to make seeking to the supplied offset
** more efficient.
**
-** Once an overflow page-list cache has been allocated, it may be
+** Once an overflow page-list cache has been allocated, it must be
** invalidated if some other cursor writes to the same table, or if
** the cursor is moved to a different row. Additionally, in auto-vacuum
** mode, the following events may invalidate an overflow page-list cache.
@@ -59568,29 +64244,30 @@ static int accessPayload(
unsigned char *aPayload;
int rc = SQLITE_OK;
int iIdx = 0;
- MemPage *pPage = pCur->apPage[pCur->iPage]; /* Btree page of current entry */
+ MemPage *pPage = pCur->pPage; /* Btree page of current entry */
BtShared *pBt = pCur->pBt; /* Btree this cursor belongs to */
#ifdef SQLITE_DIRECT_OVERFLOW_READ
- unsigned char * const pBufStart = pBuf;
- int bEnd; /* True if reading to end of data */
+ unsigned char * const pBufStart = pBuf; /* Start of original out buffer */
#endif
assert( pPage );
+ assert( eOp==0 || eOp==1 );
assert( pCur->eState==CURSOR_VALID );
- assert( pCur->aiIdx[pCur->iPage]nCell );
+ assert( pCur->ixnCell );
assert( cursorHoldsMutex(pCur) );
- assert( eOp!=2 || offset==0 ); /* Always start from beginning for eOp==2 */
getCellInfo(pCur);
aPayload = pCur->info.pPayload;
-#ifdef SQLITE_DIRECT_OVERFLOW_READ
- bEnd = offset+amt==pCur->info.nPayload;
-#endif
assert( offset+amt <= pCur->info.nPayload );
- if( &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize] ){
- /* Trying to read or write past the end of the data is an error */
- return SQLITE_CORRUPT_BKPT;
+ assert( aPayload > pPage->aData );
+ if( (uptr)(aPayload - pPage->aData) > (pBt->usableSize - pCur->info.nLocal) ){
+ /* Trying to read or write past the end of the data is an error. The
+ ** conditional above is really:
+ ** &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize]
+ ** but is recast into its current form to avoid integer overflow problems
+ */
+ return SQLITE_CORRUPT_PGNO(pPage->pgno);
}
/* Check if data must be read/written to/from the btree page itself. */
@@ -59599,7 +64276,7 @@ static int accessPayload(
if( a+offset>pCur->info.nLocal ){
a = pCur->info.nLocal - offset;
}
- rc = copyPayload(&aPayload[offset], pBuf, a, (eOp & 0x01), pPage->pDbPage);
+ rc = copyPayload(&aPayload[offset], pBuf, a, eOp, pPage->pDbPage);
offset = 0;
pBuf += a;
amt -= a;
@@ -59615,53 +64292,46 @@ static int accessPayload(
nextPage = get4byte(&aPayload[pCur->info.nLocal]);
/* If the BtCursor.aOverflow[] has not been allocated, allocate it now.
- ** Except, do not allocate aOverflow[] for eOp==2.
**
** The aOverflow[] array is sized at one entry for each overflow page
** in the overflow chain. The page number of the first overflow page is
** stored in aOverflow[0], etc. A value of 0 in the aOverflow[] array
** means "not yet known" (the cache is lazily populated).
*/
- if( eOp!=2 && (pCur->curFlags & BTCF_ValidOvfl)==0 ){
+ if( (pCur->curFlags & BTCF_ValidOvfl)==0 ){
int nOvfl = (pCur->info.nPayload-pCur->info.nLocal+ovflSize-1)/ovflSize;
if( nOvfl>pCur->nOvflAlloc ){
Pgno *aNew = (Pgno*)sqlite3Realloc(
pCur->aOverflow, nOvfl*2*sizeof(Pgno)
);
if( aNew==0 ){
- rc = SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}else{
pCur->nOvflAlloc = nOvfl*2;
pCur->aOverflow = aNew;
}
}
- if( rc==SQLITE_OK ){
- memset(pCur->aOverflow, 0, nOvfl*sizeof(Pgno));
- pCur->curFlags |= BTCF_ValidOvfl;
+ memset(pCur->aOverflow, 0, nOvfl*sizeof(Pgno));
+ pCur->curFlags |= BTCF_ValidOvfl;
+ }else{
+ /* If the overflow page-list cache has been allocated and the
+ ** entry for the first required overflow page is valid, skip
+ ** directly to it.
+ */
+ if( pCur->aOverflow[offset/ovflSize] ){
+ iIdx = (offset/ovflSize);
+ nextPage = pCur->aOverflow[iIdx];
+ offset = (offset%ovflSize);
}
}
- /* If the overflow page-list cache has been allocated and the
- ** entry for the first required overflow page is valid, skip
- ** directly to it.
- */
- if( (pCur->curFlags & BTCF_ValidOvfl)!=0
- && pCur->aOverflow[offset/ovflSize]
- ){
- iIdx = (offset/ovflSize);
- nextPage = pCur->aOverflow[iIdx];
- offset = (offset%ovflSize);
- }
-
- for( ; rc==SQLITE_OK && amt>0 && nextPage; iIdx++){
-
+ assert( rc==SQLITE_OK && amt>0 );
+ while( nextPage ){
/* If required, populate the overflow page-list cache. */
- if( (pCur->curFlags & BTCF_ValidOvfl)!=0 ){
- assert( pCur->aOverflow[iIdx]==0
- || pCur->aOverflow[iIdx]==nextPage
- || CORRUPT_DB );
- pCur->aOverflow[iIdx] = nextPage;
- }
+ assert( pCur->aOverflow[iIdx]==0
+ || pCur->aOverflow[iIdx]==nextPage
+ || CORRUPT_DB );
+ pCur->aOverflow[iIdx] = nextPage;
if( offset>=ovflSize ){
/* The only reason to read this page is to obtain the page
@@ -59669,11 +64339,7 @@ static int accessPayload(
** data is not required. So first try to lookup the overflow
** page-list cache, if any, then fall back to the getOverflowPage()
** function.
- **
- ** Note that the aOverflow[] array must be allocated because eOp!=2
- ** here. If eOp==2, then offset==0 and this branch is never taken.
*/
- assert( eOp!=2 );
assert( pCur->curFlags & BTCF_ValidOvfl );
assert( pCur->pBtree->db==pBt->db );
if( pCur->aOverflow[iIdx+1] ){
@@ -59687,7 +64353,7 @@ static int accessPayload(
** range of data that is being read (eOp==0) or written (eOp!=0).
*/
#ifdef SQLITE_DIRECT_OVERFLOW_READ
- sqlite3_file *fd;
+ sqlite3_file *fd; /* File from which to do direct overflow read */
#endif
int a = amt;
if( a + offset > ovflSize ){
@@ -59699,27 +64365,25 @@ static int accessPayload(
**
** 1) this is a read operation, and
** 2) data is required from the start of this overflow page, and
- ** 3) the database is file-backed, and
- ** 4) there is no open write-transaction, and
- ** 5) the database is not a WAL database,
- ** 6) all data from the page is being read.
- ** 7) at least 4 bytes have already been read into the output buffer
+ ** 3) there is no open write-transaction, and
+ ** 4) the database is file-backed, and
+ ** 5) the page is not in the WAL file
+ ** 6) at least 4 bytes have already been read into the output buffer
**
** then data can be read directly from the database file into the
** output buffer, bypassing the page-cache altogether. This speeds
** up loading large records that span many overflow pages.
*/
- if( (eOp&0x01)==0 /* (1) */
+ if( eOp==0 /* (1) */
&& offset==0 /* (2) */
- && (bEnd || a==ovflSize) /* (6) */
- && pBt->inTransaction==TRANS_READ /* (4) */
- && (fd = sqlite3PagerFile(pBt->pPager))->pMethods /* (3) */
- && pBt->pPage1->aData[19]==0x01 /* (5) */
- && &pBuf[-4]>=pBufStart /* (7) */
+ && pBt->inTransaction==TRANS_READ /* (3) */
+ && (fd = sqlite3PagerFile(pBt->pPager))->pMethods /* (4) */
+ && 0==sqlite3PagerUseWal(pBt->pPager, nextPage) /* (5) */
+ && &pBuf[-4]>=pBufStart /* (6) */
){
u8 aSave[4];
u8 *aWrite = &pBuf[-4];
- assert( aWrite>=pBufStart ); /* hence (7) */
+ assert( aWrite>=pBufStart ); /* due to (6) */
memcpy(aSave, aWrite, 4);
rc = sqlite3OsRead(fd, aWrite, a+4, (i64)pBt->pageSize*(nextPage-1));
nextPage = get4byte(aWrite);
@@ -59730,76 +64394,86 @@ static int accessPayload(
{
DbPage *pDbPage;
rc = sqlite3PagerGet(pBt->pPager, nextPage, &pDbPage,
- ((eOp&0x01)==0 ? PAGER_GET_READONLY : 0)
+ (eOp==0 ? PAGER_GET_READONLY : 0)
);
if( rc==SQLITE_OK ){
aPayload = sqlite3PagerGetData(pDbPage);
nextPage = get4byte(aPayload);
- rc = copyPayload(&aPayload[offset+4], pBuf, a, (eOp&0x01), pDbPage);
+ rc = copyPayload(&aPayload[offset+4], pBuf, a, eOp, pDbPage);
sqlite3PagerUnref(pDbPage);
offset = 0;
}
}
amt -= a;
+ if( amt==0 ) return rc;
pBuf += a;
}
+ if( rc ) break;
+ iIdx++;
}
}
if( rc==SQLITE_OK && amt>0 ){
- return SQLITE_CORRUPT_BKPT;
+ /* Overflow chain ends prematurely */
+ return SQLITE_CORRUPT_PGNO(pPage->pgno);
}
return rc;
}
/*
-** Read part of the key associated with cursor pCur. Exactly
-** "amt" bytes will be transferred into pBuf[]. The transfer
+** Read part of the payload for the row at which that cursor pCur is currently
+** pointing. "amt" bytes will be transferred into pBuf[]. The transfer
** begins at "offset".
**
-** The caller must ensure that pCur is pointing to a valid row
-** in the table.
+** pCur can be pointing to either a table or an index b-tree.
+** If pointing to a table btree, then the content section is read. If
+** pCur is pointing to an index b-tree then the key section is read.
+**
+** For sqlite3BtreePayload(), the caller must ensure that pCur is pointing
+** to a valid row in the table. For sqlite3BtreePayloadChecked(), the
+** cursor might be invalid or might need to be restored before being read.
**
** Return SQLITE_OK on success or an error code if anything goes
** wrong. An error is returned if "offset+amt" is larger than
** the available payload.
*/
-SQLITE_PRIVATE int sqlite3BtreeKey(BtCursor *pCur, u32 offset, u32 amt, void *pBuf){
+SQLITE_PRIVATE int sqlite3BtreePayload(BtCursor *pCur, u32 offset, u32 amt, void *pBuf){
assert( cursorHoldsMutex(pCur) );
assert( pCur->eState==CURSOR_VALID );
- assert( pCur->iPage>=0 && pCur->apPage[pCur->iPage] );
- assert( pCur->aiIdx[pCur->iPage]apPage[pCur->iPage]->nCell );
+ assert( pCur->iPage>=0 && pCur->pPage );
+ assert( pCur->ixpPage->nCell );
return accessPayload(pCur, offset, amt, (unsigned char*)pBuf, 0);
}
/*
-** Read part of the data associated with cursor pCur. Exactly
-** "amt" bytes will be transfered into pBuf[]. The transfer
-** begins at "offset".
-**
-** Return SQLITE_OK on success or an error code if anything goes
-** wrong. An error is returned if "offset+amt" is larger than
-** the available payload.
+** This variant of sqlite3BtreePayload() works even if the cursor has not
+** in the CURSOR_VALID state. It is only used by the sqlite3_blob_read()
+** interface.
*/
-SQLITE_PRIVATE int sqlite3BtreeData(BtCursor *pCur, u32 offset, u32 amt, void *pBuf){
- int rc;
-
#ifndef SQLITE_OMIT_INCRBLOB
+static SQLITE_NOINLINE int accessPayloadChecked(
+ BtCursor *pCur,
+ u32 offset,
+ u32 amt,
+ void *pBuf
+){
+ int rc;
if ( pCur->eState==CURSOR_INVALID ){
return SQLITE_ABORT;
}
-#endif
-
- assert( cursorHoldsMutex(pCur) );
- rc = restoreCursorPosition(pCur);
- if( rc==SQLITE_OK ){
- assert( pCur->eState==CURSOR_VALID );
- assert( pCur->iPage>=0 && pCur->apPage[pCur->iPage] );
- assert( pCur->aiIdx[pCur->iPage]apPage[pCur->iPage]->nCell );
- rc = accessPayload(pCur, offset, amt, pBuf, 0);
- }
- return rc;
+ assert( cursorOwnsBtShared(pCur) );
+ rc = btreeRestoreCursorPosition(pCur);
+ return rc ? rc : accessPayload(pCur, offset, amt, pBuf, 0);
}
+SQLITE_PRIVATE int sqlite3BtreePayloadChecked(BtCursor *pCur, u32 offset, u32 amt, void *pBuf){
+ if( pCur->eState==CURSOR_VALID ){
+ assert( cursorOwnsBtShared(pCur) );
+ return accessPayload(pCur, offset, amt, pBuf, 0);
+ }else{
+ return accessPayloadChecked(pCur, offset, amt, pBuf);
+ }
+}
+#endif /* SQLITE_OMIT_INCRBLOB */
/*
** Return a pointer to payload information from the entry that the
@@ -59824,18 +64498,23 @@ static const void *fetchPayload(
BtCursor *pCur, /* Cursor pointing to entry to read from */
u32 *pAmt /* Write the number of available bytes here */
){
- u32 amt;
- assert( pCur!=0 && pCur->iPage>=0 && pCur->apPage[pCur->iPage]);
+ int amt;
+ assert( pCur!=0 && pCur->iPage>=0 && pCur->pPage);
assert( pCur->eState==CURSOR_VALID );
assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
- assert( cursorHoldsMutex(pCur) );
- assert( pCur->aiIdx[pCur->iPage]apPage[pCur->iPage]->nCell );
+ assert( cursorOwnsBtShared(pCur) );
+ assert( pCur->ixpPage->nCell );
assert( pCur->info.nSize>0 );
- assert( pCur->info.pPayload>pCur->apPage[pCur->iPage]->aData || CORRUPT_DB );
- assert( pCur->info.pPayloadapPage[pCur->iPage]->aDataEnd ||CORRUPT_DB);
- amt = (int)(pCur->apPage[pCur->iPage]->aDataEnd - pCur->info.pPayload);
- if( pCur->info.nLocalinfo.nLocal;
- *pAmt = amt;
+ assert( pCur->info.pPayload>pCur->pPage->aData || CORRUPT_DB );
+ assert( pCur->info.pPayloadpPage->aDataEnd ||CORRUPT_DB);
+ amt = pCur->info.nLocal;
+ if( amt>(int)(pCur->pPage->aDataEnd - pCur->info.pPayload) ){
+ /* There is too little space on the page for the expected amount
+ ** of local content. Database must be corrupt. */
+ assert( CORRUPT_DB );
+ amt = MAX(0, (int)(pCur->pPage->aDataEnd - pCur->info.pPayload));
+ }
+ *pAmt = (u32)amt;
return (void*)pCur->info.pPayload;
}
@@ -59854,10 +64533,7 @@ static const void *fetchPayload(
** These routines is used to get quick access to key and data
** in the common case where no overflow pages are used.
*/
-SQLITE_PRIVATE const void *sqlite3BtreeKeyFetch(BtCursor *pCur, u32 *pAmt){
- return fetchPayload(pCur, pAmt);
-}
-SQLITE_PRIVATE const void *sqlite3BtreeDataFetch(BtCursor *pCur, u32 *pAmt){
+SQLITE_PRIVATE const void *sqlite3BtreePayloadFetch(BtCursor *pCur, u32 *pAmt){
return fetchPayload(pCur, pAmt);
}
@@ -59874,7 +64550,7 @@ SQLITE_PRIVATE const void *sqlite3BtreeDataFetch(BtCursor *pCur, u32 *pAmt){
static int moveToChild(BtCursor *pCur, u32 newPgno){
BtShared *pBt = pCur->pBt;
- assert( cursorHoldsMutex(pCur) );
+ assert( cursorOwnsBtShared(pCur) );
assert( pCur->eState==CURSOR_VALID );
assert( pCur->iPageiPage>=0 );
@@ -59883,13 +64559,14 @@ static int moveToChild(BtCursor *pCur, u32 newPgno){
}
pCur->info.nSize = 0;
pCur->curFlags &= ~(BTCF_ValidNKey|BTCF_ValidOvfl);
+ pCur->aiIdx[pCur->iPage] = pCur->ix;
+ pCur->apPage[pCur->iPage] = pCur->pPage;
+ pCur->ix = 0;
pCur->iPage++;
- pCur->aiIdx[pCur->iPage] = 0;
- return getAndInitPage(pBt, newPgno, &pCur->apPage[pCur->iPage],
- pCur, pCur->curPagerFlags);
+ return getAndInitPage(pBt, newPgno, &pCur->pPage, pCur, pCur->curPagerFlags);
}
-#if SQLITE_DEBUG
+#ifdef SQLITE_DEBUG
/*
** Page pParent is an internal (non-leaf) tree page. This function
** asserts that page number iChild is the left-child if the iIdx'th
@@ -59920,19 +64597,23 @@ static void assertParentIndex(MemPage *pParent, int iIdx, Pgno iChild){
** the largest cell index.
*/
static void moveToParent(BtCursor *pCur){
- assert( cursorHoldsMutex(pCur) );
+ MemPage *pLeaf;
+ assert( cursorOwnsBtShared(pCur) );
assert( pCur->eState==CURSOR_VALID );
assert( pCur->iPage>0 );
- assert( pCur->apPage[pCur->iPage] );
+ assert( pCur->pPage );
assertParentIndex(
pCur->apPage[pCur->iPage-1],
pCur->aiIdx[pCur->iPage-1],
- pCur->apPage[pCur->iPage]->pgno
+ pCur->pPage->pgno
);
testcase( pCur->aiIdx[pCur->iPage-1] > pCur->apPage[pCur->iPage-1]->nCell );
pCur->info.nSize = 0;
pCur->curFlags &= ~(BTCF_ValidNKey|BTCF_ValidOvfl);
- releasePageNotNull(pCur->apPage[pCur->iPage--]);
+ pCur->ix = pCur->aiIdx[pCur->iPage-1];
+ pLeaf = pCur->pPage;
+ pCur->pPage = pCur->apPage[--pCur->iPage];
+ releasePageNotNull(pLeaf);
}
/*
@@ -59944,9 +64625,9 @@ static void moveToParent(BtCursor *pCur){
** single child page. This can only happen with the table rooted at page 1.
**
** If the b-tree structure is empty, the cursor state is set to
-** CURSOR_INVALID. Otherwise, the cursor is set to point to the first
-** cell located on the root (or virtual root) page and the cursor state
-** is set to CURSOR_VALID.
+** CURSOR_INVALID and this routine returns SQLITE_EMPTY. Otherwise,
+** the cursor is set to point to the first cell located on the root
+** (or virtual root) page and the cursor state is set to CURSOR_VALID.
**
** If this function returns successfully, it may be assumed that the
** page-header flags indicate that the [virtual] root-page is the expected
@@ -59960,38 +64641,44 @@ static int moveToRoot(BtCursor *pCur){
MemPage *pRoot;
int rc = SQLITE_OK;
- assert( cursorHoldsMutex(pCur) );
+ assert( cursorOwnsBtShared(pCur) );
assert( CURSOR_INVALID < CURSOR_REQUIRESEEK );
assert( CURSOR_VALID < CURSOR_REQUIRESEEK );
assert( CURSOR_FAULT > CURSOR_REQUIRESEEK );
- if( pCur->eState>=CURSOR_REQUIRESEEK ){
- if( pCur->eState==CURSOR_FAULT ){
- assert( pCur->skipNext!=SQLITE_OK );
- return pCur->skipNext;
- }
- sqlite3BtreeClearCursor(pCur);
- }
+ assert( pCur->eState < CURSOR_REQUIRESEEK || pCur->iPage<0 );
+ assert( pCur->pgnoRoot>0 || pCur->iPage<0 );
if( pCur->iPage>=0 ){
- while( pCur->iPage ){
- assert( pCur->apPage[pCur->iPage]!=0 );
- releasePageNotNull(pCur->apPage[pCur->iPage--]);
+ if( pCur->iPage ){
+ releasePageNotNull(pCur->pPage);
+ while( --pCur->iPage ){
+ releasePageNotNull(pCur->apPage[pCur->iPage]);
+ }
+ pCur->pPage = pCur->apPage[0];
+ goto skip_init;
}
}else if( pCur->pgnoRoot==0 ){
pCur->eState = CURSOR_INVALID;
- return SQLITE_OK;
+ return SQLITE_EMPTY;
}else{
assert( pCur->iPage==(-1) );
- rc = getAndInitPage(pCur->pBtree->pBt, pCur->pgnoRoot, &pCur->apPage[0],
+ if( pCur->eState>=CURSOR_REQUIRESEEK ){
+ if( pCur->eState==CURSOR_FAULT ){
+ assert( pCur->skipNext!=SQLITE_OK );
+ return pCur->skipNext;
+ }
+ sqlite3BtreeClearCursor(pCur);
+ }
+ rc = getAndInitPage(pCur->pBtree->pBt, pCur->pgnoRoot, &pCur->pPage,
0, pCur->curPagerFlags);
if( rc!=SQLITE_OK ){
pCur->eState = CURSOR_INVALID;
return rc;
}
pCur->iPage = 0;
- pCur->curIntKey = pCur->apPage[0]->intKey;
+ pCur->curIntKey = pCur->pPage->intKey;
}
- pRoot = pCur->apPage[0];
+ pRoot = pCur->pPage;
assert( pRoot->pgno==pCur->pgnoRoot );
/* If pCur->pKeyInfo is not NULL, then the caller that opened this cursor
@@ -60006,13 +64693,15 @@ static int moveToRoot(BtCursor *pCur){
** (or the freelist). */
assert( pRoot->intKey==1 || pRoot->intKey==0 );
if( pRoot->isInit==0 || (pCur->pKeyInfo==0)!=pRoot->intKey ){
- return SQLITE_CORRUPT_BKPT;
+ return SQLITE_CORRUPT_PGNO(pCur->pPage->pgno);
}
- pCur->aiIdx[0] = 0;
+skip_init:
+ pCur->ix = 0;
pCur->info.nSize = 0;
pCur->curFlags &= ~(BTCF_AtLast|BTCF_ValidNKey|BTCF_ValidOvfl);
+ pRoot = pCur->pPage;
if( pRoot->nCell>0 ){
pCur->eState = CURSOR_VALID;
}else if( !pRoot->leaf ){
@@ -60023,6 +64712,7 @@ static int moveToRoot(BtCursor *pCur){
rc = moveToChild(pCur, subpage);
}else{
pCur->eState = CURSOR_INVALID;
+ rc = SQLITE_EMPTY;
}
return rc;
}
@@ -60039,11 +64729,11 @@ static int moveToLeftmost(BtCursor *pCur){
int rc = SQLITE_OK;
MemPage *pPage;
- assert( cursorHoldsMutex(pCur) );
+ assert( cursorOwnsBtShared(pCur) );
assert( pCur->eState==CURSOR_VALID );
- while( rc==SQLITE_OK && !(pPage = pCur->apPage[pCur->iPage])->leaf ){
- assert( pCur->aiIdx[pCur->iPage]nCell );
- pgno = get4byte(findCell(pPage, pCur->aiIdx[pCur->iPage]));
+ while( rc==SQLITE_OK && !(pPage = pCur->pPage)->leaf ){
+ assert( pCur->ixnCell );
+ pgno = get4byte(findCell(pPage, pCur->ix));
rc = moveToChild(pCur, pgno);
}
return rc;
@@ -60064,15 +64754,15 @@ static int moveToRightmost(BtCursor *pCur){
int rc = SQLITE_OK;
MemPage *pPage = 0;
- assert( cursorHoldsMutex(pCur) );
+ assert( cursorOwnsBtShared(pCur) );
assert( pCur->eState==CURSOR_VALID );
- while( !(pPage = pCur->apPage[pCur->iPage])->leaf ){
+ while( !(pPage = pCur->pPage)->leaf ){
pgno = get4byte(&pPage->aData[pPage->hdrOffset+8]);
- pCur->aiIdx[pCur->iPage] = pPage->nCell;
+ pCur->ix = pPage->nCell;
rc = moveToChild(pCur, pgno);
if( rc ) return rc;
}
- pCur->aiIdx[pCur->iPage] = pPage->nCell-1;
+ pCur->ix = pPage->nCell-1;
assert( pCur->info.nSize==0 );
assert( (pCur->curFlags & BTCF_ValidNKey)==0 );
return SQLITE_OK;
@@ -60085,18 +64775,17 @@ static int moveToRightmost(BtCursor *pCur){
SQLITE_PRIVATE int sqlite3BtreeFirst(BtCursor *pCur, int *pRes){
int rc;
- assert( cursorHoldsMutex(pCur) );
+ assert( cursorOwnsBtShared(pCur) );
assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
rc = moveToRoot(pCur);
if( rc==SQLITE_OK ){
- if( pCur->eState==CURSOR_INVALID ){
- assert( pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->nCell==0 );
- *pRes = 1;
- }else{
- assert( pCur->apPage[pCur->iPage]->nCell>0 );
- *pRes = 0;
- rc = moveToLeftmost(pCur);
- }
+ assert( pCur->pPage->nCell>0 );
+ *pRes = 0;
+ rc = moveToLeftmost(pCur);
+ }else if( rc==SQLITE_EMPTY ){
+ assert( pCur->pgnoRoot==0 || pCur->pPage->nCell==0 );
+ *pRes = 1;
+ rc = SQLITE_OK;
}
return rc;
}
@@ -60108,7 +64797,7 @@ SQLITE_PRIVATE int sqlite3BtreeFirst(BtCursor *pCur, int *pRes){
SQLITE_PRIVATE int sqlite3BtreeLast(BtCursor *pCur, int *pRes){
int rc;
- assert( cursorHoldsMutex(pCur) );
+ assert( cursorOwnsBtShared(pCur) );
assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
/* If the cursor already points to the last entry, this is a no-op. */
@@ -60120,28 +64809,26 @@ SQLITE_PRIVATE int sqlite3BtreeLast(BtCursor *pCur, int *pRes){
for(ii=0; iiiPage; ii++){
assert( pCur->aiIdx[ii]==pCur->apPage[ii]->nCell );
}
- assert( pCur->aiIdx[pCur->iPage]==pCur->apPage[pCur->iPage]->nCell-1 );
- assert( pCur->apPage[pCur->iPage]->leaf );
+ assert( pCur->ix==pCur->pPage->nCell-1 );
+ assert( pCur->pPage->leaf );
#endif
return SQLITE_OK;
}
rc = moveToRoot(pCur);
if( rc==SQLITE_OK ){
- if( CURSOR_INVALID==pCur->eState ){
- assert( pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->nCell==0 );
- *pRes = 1;
+ assert( pCur->eState==CURSOR_VALID );
+ *pRes = 0;
+ rc = moveToRightmost(pCur);
+ if( rc==SQLITE_OK ){
+ pCur->curFlags |= BTCF_AtLast;
}else{
- assert( pCur->eState==CURSOR_VALID );
- *pRes = 0;
- rc = moveToRightmost(pCur);
- if( rc==SQLITE_OK ){
- pCur->curFlags |= BTCF_AtLast;
- }else{
- pCur->curFlags &= ~BTCF_AtLast;
- }
-
+ pCur->curFlags &= ~BTCF_AtLast;
}
+ }else if( rc==SQLITE_EMPTY ){
+ assert( pCur->pgnoRoot==0 || pCur->pPage->nCell==0 );
+ *pRes = 1;
+ rc = SQLITE_OK;
}
return rc;
}
@@ -60186,23 +64873,44 @@ SQLITE_PRIVATE int sqlite3BtreeMovetoUnpacked(
int rc;
RecordCompare xRecordCompare;
- assert( cursorHoldsMutex(pCur) );
+ assert( cursorOwnsBtShared(pCur) );
assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
assert( pRes );
assert( (pIdxKey==0)==(pCur->pKeyInfo==0) );
+ assert( pCur->eState!=CURSOR_VALID || (pIdxKey==0)==(pCur->curIntKey!=0) );
/* If the cursor is already positioned at the point we are trying
** to move to, then just return without doing any work */
- if( pCur->eState==CURSOR_VALID && (pCur->curFlags & BTCF_ValidNKey)!=0
- && pCur->curIntKey
+ if( pIdxKey==0
+ && pCur->eState==CURSOR_VALID && (pCur->curFlags & BTCF_ValidNKey)!=0
){
if( pCur->info.nKey==intKey ){
*pRes = 0;
return SQLITE_OK;
}
- if( (pCur->curFlags & BTCF_AtLast)!=0 && pCur->info.nKeyinfo.nKeycurFlags & BTCF_AtLast)!=0 ){
+ *pRes = -1;
+ return SQLITE_OK;
+ }
+ /* If the requested key is one more than the previous key, then
+ ** try to get there using sqlite3BtreeNext() rather than a full
+ ** binary search. This is an optimization only. The correct answer
+ ** is still obtained without this case, only a little more slowely */
+ if( pCur->info.nKey+1==intKey && !pCur->skipNext ){
+ *pRes = 0;
+ rc = sqlite3BtreeNext(pCur, 0);
+ if( rc==SQLITE_OK ){
+ getCellInfo(pCur);
+ if( pCur->info.nKey==intKey ){
+ return SQLITE_OK;
+ }
+ }else if( rc==SQLITE_DONE ){
+ rc = SQLITE_OK;
+ }else{
+ return rc;
+ }
+ }
}
}
@@ -60219,22 +64927,23 @@ SQLITE_PRIVATE int sqlite3BtreeMovetoUnpacked(
rc = moveToRoot(pCur);
if( rc ){
+ if( rc==SQLITE_EMPTY ){
+ assert( pCur->pgnoRoot==0 || pCur->pPage->nCell==0 );
+ *pRes = -1;
+ return SQLITE_OK;
+ }
return rc;
}
- assert( pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage] );
- assert( pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->isInit );
- assert( pCur->eState==CURSOR_INVALID || pCur->apPage[pCur->iPage]->nCell>0 );
- if( pCur->eState==CURSOR_INVALID ){
- *pRes = -1;
- assert( pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->nCell==0 );
- return SQLITE_OK;
- }
- assert( pCur->apPage[0]->intKey==pCur->curIntKey );
+ assert( pCur->pPage );
+ assert( pCur->pPage->isInit );
+ assert( pCur->eState==CURSOR_VALID );
+ assert( pCur->pPage->nCell > 0 );
+ assert( pCur->iPage==0 || pCur->apPage[0]->intKey==pCur->curIntKey );
assert( pCur->curIntKey || pIdxKey );
for(;;){
int lwr, upr, idx, c;
Pgno chldPg;
- MemPage *pPage = pCur->apPage[pCur->iPage];
+ MemPage *pPage = pCur->pPage;
u8 *pCell; /* Pointer to current cell in pPage */
/* pPage->nCell must be greater than zero. If this is the root-page
@@ -60249,14 +64958,16 @@ SQLITE_PRIVATE int sqlite3BtreeMovetoUnpacked(
upr = pPage->nCell-1;
assert( biasRight==0 || biasRight==1 );
idx = upr>>(1-biasRight); /* idx = biasRight ? upr : (lwr+upr)/2; */
- pCur->aiIdx[pCur->iPage] = (u16)idx;
+ pCur->ix = (u16)idx;
if( xRecordCompare==0 ){
for(;;){
i64 nCellKey;
pCell = findCellPastPtr(pPage, idx);
if( pPage->intKeyLeaf ){
while( 0x80 <= *(pCell++) ){
- if( pCell>=pPage->aDataEnd ) return SQLITE_CORRUPT_BKPT;
+ if( pCell>=pPage->aDataEnd ){
+ return SQLITE_CORRUPT_PGNO(pPage->pgno);
+ }
}
}
getVarint(pCell, (u64*)&nCellKey);
@@ -60268,16 +64979,16 @@ SQLITE_PRIVATE int sqlite3BtreeMovetoUnpacked(
if( lwr>upr ){ c = +1; break; }
}else{
assert( nCellKey==intKey );
- pCur->curFlags |= BTCF_ValidNKey;
- pCur->info.nKey = nCellKey;
- pCur->aiIdx[pCur->iPage] = (u16)idx;
+ pCur->ix = (u16)idx;
if( !pPage->leaf ){
lwr = idx;
goto moveto_next_layer;
}else{
+ pCur->curFlags |= BTCF_ValidNKey;
+ pCur->info.nKey = nCellKey;
+ pCur->info.nSize = 0;
*pRes = 0;
- rc = SQLITE_OK;
- goto moveto_finish;
+ return SQLITE_OK;
}
}
assert( lwr+upr>=0 );
@@ -60329,16 +65040,17 @@ SQLITE_PRIVATE int sqlite3BtreeMovetoUnpacked(
testcase( nCell==1 ); /* Invalid key size: 0x80 0x80 0x01 */
testcase( nCell==2 ); /* Minimum legal index key size */
if( nCell<2 ){
- rc = SQLITE_CORRUPT_BKPT;
+ rc = SQLITE_CORRUPT_PGNO(pPage->pgno);
goto moveto_finish;
}
pCellKey = sqlite3Malloc( nCell+18 );
if( pCellKey==0 ){
- rc = SQLITE_NOMEM;
+ rc = SQLITE_NOMEM_BKPT;
goto moveto_finish;
}
- pCur->aiIdx[pCur->iPage] = (u16)idx;
- rc = accessPayload(pCur, 0, nCell, (unsigned char*)pCellKey, 2);
+ pCur->ix = (u16)idx;
+ rc = accessPayload(pCur, 0, nCell, (unsigned char*)pCellKey, 0);
+ pCur->curFlags &= ~BTCF_ValidOvfl;
if( rc ){
sqlite3_free(pCellKey);
goto moveto_finish;
@@ -60358,8 +65070,8 @@ SQLITE_PRIVATE int sqlite3BtreeMovetoUnpacked(
assert( c==0 );
*pRes = 0;
rc = SQLITE_OK;
- pCur->aiIdx[pCur->iPage] = (u16)idx;
- if( pIdxKey->errCode ) rc = SQLITE_CORRUPT;
+ pCur->ix = (u16)idx;
+ if( pIdxKey->errCode ) rc = SQLITE_CORRUPT_BKPT;
goto moveto_finish;
}
if( lwr>upr ) break;
@@ -60370,8 +65082,8 @@ SQLITE_PRIVATE int sqlite3BtreeMovetoUnpacked(
assert( lwr==upr+1 || (pPage->intKey && !pPage->leaf) );
assert( pPage->isInit );
if( pPage->leaf ){
- assert( pCur->aiIdx[pCur->iPage]apPage[pCur->iPage]->nCell );
- pCur->aiIdx[pCur->iPage] = (u16)idx;
+ assert( pCur->ixpPage->nCell );
+ pCur->ix = (u16)idx;
*pRes = c;
rc = SQLITE_OK;
goto moveto_finish;
@@ -60382,13 +65094,13 @@ moveto_next_layer:
}else{
chldPg = get4byte(findCell(pPage, lwr));
}
- pCur->aiIdx[pCur->iPage] = (u16)lwr;
+ pCur->ix = (u16)lwr;
rc = moveToChild(pCur, chldPg);
if( rc ) break;
}
moveto_finish:
pCur->info.nSize = 0;
- pCur->curFlags &= ~(BTCF_ValidNKey|BTCF_ValidOvfl);
+ assert( (pCur->curFlags & BTCF_ValidOvfl)==0 );
return rc;
}
@@ -60409,10 +65121,37 @@ SQLITE_PRIVATE int sqlite3BtreeEof(BtCursor *pCur){
}
/*
-** Advance the cursor to the next entry in the database. If
-** successful then set *pRes=0. If the cursor
-** was already pointing to the last entry in the database before
-** this routine was called, then set *pRes=1.
+** Return an estimate for the number of rows in the table that pCur is
+** pointing to. Return a negative number if no estimate is currently
+** available.
+*/
+SQLITE_PRIVATE i64 sqlite3BtreeRowCountEst(BtCursor *pCur){
+ i64 n;
+ u8 i;
+
+ assert( cursorOwnsBtShared(pCur) );
+ assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
+
+ /* Currently this interface is only called by the OP_IfSmaller
+ ** opcode, and it that case the cursor will always be valid and
+ ** will always point to a leaf node. */
+ if( NEVER(pCur->eState!=CURSOR_VALID) ) return -1;
+ if( NEVER(pCur->pPage->leaf==0) ) return -1;
+
+ n = pCur->pPage->nCell;
+ for(i=0; iiPage; i++){
+ n *= pCur->apPage[i]->nCell;
+ }
+ return n;
+}
+
+/*
+** Advance the cursor to the next entry in the database.
+** Return value:
+**
+** SQLITE_OK success
+** SQLITE_DONE cursor is already pointing at the last element
+** otherwise some kind of error occurred
**
** The main entry point is sqlite3BtreeNext(). That routine is optimized
** for the common case of merely incrementing the cell counter BtCursor.aiIdx
@@ -60420,23 +65159,19 @@ SQLITE_PRIVATE int sqlite3BtreeEof(BtCursor *pCur){
** routine is called when it is necessary to move to a different page or
** to restore the cursor.
**
-** The calling function will set *pRes to 0 or 1. The initial *pRes value
-** will be 1 if the cursor being stepped corresponds to an SQL index and
-** if this routine could have been skipped if that SQL index had been
-** a unique index. Otherwise the caller will have set *pRes to zero.
-** Zero is the common case. The btree implementation is free to use the
-** initial *pRes value as a hint to improve performance, but the current
-** SQLite btree implementation does not. (Note that the comdb2 btree
-** implementation does use this hint, however.)
+** If bit 0x01 of the F argument in sqlite3BtreeNext(C,F) is 1, then the
+** cursor corresponds to an SQL index and this routine could have been
+** skipped if the SQL index had been a unique index. The F argument
+** is a hint to the implement. SQLite btree implementation does not use
+** this hint, but COMDB2 does.
*/
-static SQLITE_NOINLINE int btreeNext(BtCursor *pCur, int *pRes){
+static SQLITE_NOINLINE int btreeNext(BtCursor *pCur){
int rc;
int idx;
MemPage *pPage;
- assert( cursorHoldsMutex(pCur) );
+ assert( cursorOwnsBtShared(pCur) );
assert( pCur->skipNext==0 || pCur->eState!=CURSOR_VALID );
- assert( *pRes==0 );
if( pCur->eState!=CURSOR_VALID ){
assert( (pCur->curFlags & BTCF_ValidOvfl)==0 );
rc = restoreCursorPosition(pCur);
@@ -60444,8 +65179,7 @@ static SQLITE_NOINLINE int btreeNext(BtCursor *pCur, int *pRes){
return rc;
}
if( CURSOR_INVALID==pCur->eState ){
- *pRes = 1;
- return SQLITE_OK;
+ return SQLITE_DONE;
}
if( pCur->skipNext ){
assert( pCur->eState==CURSOR_VALID || pCur->eState==CURSOR_SKIPNEXT );
@@ -60458,8 +65192,8 @@ static SQLITE_NOINLINE int btreeNext(BtCursor *pCur, int *pRes){
}
}
- pPage = pCur->apPage[pCur->iPage];
- idx = ++pCur->aiIdx[pCur->iPage];
+ pPage = pCur->pPage;
+ idx = ++pCur->ix;
assert( pPage->isInit );
/* If the database file is corrupt, it is possible for the value of idx
@@ -60477,15 +65211,14 @@ static SQLITE_NOINLINE int btreeNext(BtCursor *pCur, int *pRes){
}
do{
if( pCur->iPage==0 ){
- *pRes = 1;
pCur->eState = CURSOR_INVALID;
- return SQLITE_OK;
+ return SQLITE_DONE;
}
moveToParent(pCur);
- pPage = pCur->apPage[pCur->iPage];
- }while( pCur->aiIdx[pCur->iPage]>=pPage->nCell );
+ pPage = pCur->pPage;
+ }while( pCur->ix>=pPage->nCell );
if( pPage->intKey ){
- return sqlite3BtreeNext(pCur, pRes);
+ return sqlite3BtreeNext(pCur, 0);
}else{
return SQLITE_OK;
}
@@ -60496,20 +65229,19 @@ static SQLITE_NOINLINE int btreeNext(BtCursor *pCur, int *pRes){
return moveToLeftmost(pCur);
}
}
-SQLITE_PRIVATE int sqlite3BtreeNext(BtCursor *pCur, int *pRes){
+SQLITE_PRIVATE int sqlite3BtreeNext(BtCursor *pCur, int flags){
MemPage *pPage;
- assert( cursorHoldsMutex(pCur) );
- assert( pRes!=0 );
- assert( *pRes==0 || *pRes==1 );
+ UNUSED_PARAMETER( flags ); /* Used in COMDB2 but not native SQLite */
+ assert( cursorOwnsBtShared(pCur) );
+ assert( flags==0 || flags==1 );
assert( pCur->skipNext==0 || pCur->eState!=CURSOR_VALID );
pCur->info.nSize = 0;
pCur->curFlags &= ~(BTCF_ValidNKey|BTCF_ValidOvfl);
- *pRes = 0;
- if( pCur->eState!=CURSOR_VALID ) return btreeNext(pCur, pRes);
- pPage = pCur->apPage[pCur->iPage];
- if( (++pCur->aiIdx[pCur->iPage])>=pPage->nCell ){
- pCur->aiIdx[pCur->iPage]--;
- return btreeNext(pCur, pRes);
+ if( pCur->eState!=CURSOR_VALID ) return btreeNext(pCur);
+ pPage = pCur->pPage;
+ if( (++pCur->ix)>=pPage->nCell ){
+ pCur->ix--;
+ return btreeNext(pCur);
}
if( pPage->leaf ){
return SQLITE_OK;
@@ -60519,10 +65251,12 @@ SQLITE_PRIVATE int sqlite3BtreeNext(BtCursor *pCur, int *pRes){
}
/*
-** Step the cursor to the back to the previous entry in the database. If
-** successful then set *pRes=0. If the cursor
-** was already pointing to the first entry in the database before
-** this routine was called, then set *pRes=1.
+** Step the cursor to the back to the previous entry in the database.
+** Return values:
+**
+** SQLITE_OK success
+** SQLITE_DONE the cursor is already on the first element of the table
+** otherwise some kind of error occurred
**
** The main entry point is sqlite3BtreePrevious(). That routine is optimized
** for the common case of merely decrementing the cell counter BtCursor.aiIdx
@@ -60530,22 +65264,17 @@ SQLITE_PRIVATE int sqlite3BtreeNext(BtCursor *pCur, int *pRes){
** helper routine is called when it is necessary to move to a different page
** or to restore the cursor.
**
-** The calling function will set *pRes to 0 or 1. The initial *pRes value
-** will be 1 if the cursor being stepped corresponds to an SQL index and
-** if this routine could have been skipped if that SQL index had been
-** a unique index. Otherwise the caller will have set *pRes to zero.
-** Zero is the common case. The btree implementation is free to use the
-** initial *pRes value as a hint to improve performance, but the current
-** SQLite btree implementation does not. (Note that the comdb2 btree
-** implementation does use this hint, however.)
+** If bit 0x01 of the F argument to sqlite3BtreePrevious(C,F) is 1, then
+** the cursor corresponds to an SQL index and this routine could have been
+** skipped if the SQL index had been a unique index. The F argument is a
+** hint to the implement. The native SQLite btree implementation does not
+** use this hint, but COMDB2 does.
*/
-static SQLITE_NOINLINE int btreePrevious(BtCursor *pCur, int *pRes){
+static SQLITE_NOINLINE int btreePrevious(BtCursor *pCur){
int rc;
MemPage *pPage;
- assert( cursorHoldsMutex(pCur) );
- assert( pRes!=0 );
- assert( *pRes==0 );
+ assert( cursorOwnsBtShared(pCur) );
assert( pCur->skipNext==0 || pCur->eState!=CURSOR_VALID );
assert( (pCur->curFlags & (BTCF_AtLast|BTCF_ValidOvfl|BTCF_ValidNKey))==0 );
assert( pCur->info.nSize==0 );
@@ -60555,8 +65284,7 @@ static SQLITE_NOINLINE int btreePrevious(BtCursor *pCur, int *pRes){
return rc;
}
if( CURSOR_INVALID==pCur->eState ){
- *pRes = 1;
- return SQLITE_OK;
+ return SQLITE_DONE;
}
if( pCur->skipNext ){
assert( pCur->eState==CURSOR_VALID || pCur->eState==CURSOR_SKIPNEXT );
@@ -60569,50 +65297,48 @@ static SQLITE_NOINLINE int btreePrevious(BtCursor *pCur, int *pRes){
}
}
- pPage = pCur->apPage[pCur->iPage];
+ pPage = pCur->pPage;
assert( pPage->isInit );
if( !pPage->leaf ){
- int idx = pCur->aiIdx[pCur->iPage];
+ int idx = pCur->ix;
rc = moveToChild(pCur, get4byte(findCell(pPage, idx)));
if( rc ) return rc;
rc = moveToRightmost(pCur);
}else{
- while( pCur->aiIdx[pCur->iPage]==0 ){
+ while( pCur->ix==0 ){
if( pCur->iPage==0 ){
pCur->eState = CURSOR_INVALID;
- *pRes = 1;
- return SQLITE_OK;
+ return SQLITE_DONE;
}
moveToParent(pCur);
}
assert( pCur->info.nSize==0 );
- assert( (pCur->curFlags & (BTCF_ValidNKey|BTCF_ValidOvfl))==0 );
+ assert( (pCur->curFlags & (BTCF_ValidOvfl))==0 );
- pCur->aiIdx[pCur->iPage]--;
- pPage = pCur->apPage[pCur->iPage];
+ pCur->ix--;
+ pPage = pCur->pPage;
if( pPage->intKey && !pPage->leaf ){
- rc = sqlite3BtreePrevious(pCur, pRes);
+ rc = sqlite3BtreePrevious(pCur, 0);
}else{
rc = SQLITE_OK;
}
}
return rc;
}
-SQLITE_PRIVATE int sqlite3BtreePrevious(BtCursor *pCur, int *pRes){
- assert( cursorHoldsMutex(pCur) );
- assert( pRes!=0 );
- assert( *pRes==0 || *pRes==1 );
+SQLITE_PRIVATE int sqlite3BtreePrevious(BtCursor *pCur, int flags){
+ assert( cursorOwnsBtShared(pCur) );
+ assert( flags==0 || flags==1 );
assert( pCur->skipNext==0 || pCur->eState!=CURSOR_VALID );
- *pRes = 0;
+ UNUSED_PARAMETER( flags ); /* Used in COMDB2 but not native SQLite */
pCur->curFlags &= ~(BTCF_AtLast|BTCF_ValidOvfl|BTCF_ValidNKey);
pCur->info.nSize = 0;
if( pCur->eState!=CURSOR_VALID
- || pCur->aiIdx[pCur->iPage]==0
- || pCur->apPage[pCur->iPage]->leaf==0
+ || pCur->ix==0
+ || pCur->pPage->leaf==0
){
- return btreePrevious(pCur, pRes);
+ return btreePrevious(pCur);
}
- pCur->aiIdx[pCur->iPage]--;
+ pCur->ix--;
return SQLITE_OK;
}
@@ -60718,7 +65444,7 @@ static int allocateBtreePage(
}
testcase( iTrunk==mxPage );
if( iTrunk>mxPage || nSearch++ > n ){
- rc = SQLITE_CORRUPT_BKPT;
+ rc = SQLITE_CORRUPT_PGNO(pPrevTrunk ? pPrevTrunk->pgno : 1);
}else{
rc = btreeGetUnusedPage(pBt, iTrunk, &pTrunk, 0);
}
@@ -60747,7 +65473,7 @@ static int allocateBtreePage(
TRACE(("ALLOCATE: %d trunk - %d free pages left\n", *pPgno, n-1));
}else if( k>(u32)(pBt->usableSize/4 - 2) ){
/* Value of k is out of range. Database corruption */
- rc = SQLITE_CORRUPT_BKPT;
+ rc = SQLITE_CORRUPT_PGNO(iTrunk);
goto end_allocate_page;
#ifndef SQLITE_OMIT_AUTOVACUUM
}else if( searchList
@@ -60781,7 +65507,7 @@ static int allocateBtreePage(
MemPage *pNewTrunk;
Pgno iNewTrunk = get4byte(&pTrunk->aData[8]);
if( iNewTrunk>mxPage ){
- rc = SQLITE_CORRUPT_BKPT;
+ rc = SQLITE_CORRUPT_PGNO(iTrunk);
goto end_allocate_page;
}
testcase( iNewTrunk==mxPage );
@@ -60846,7 +65572,7 @@ static int allocateBtreePage(
iPage = get4byte(&aData[8+closest*4]);
testcase( iPage==mxPage );
if( iPage>mxPage ){
- rc = SQLITE_CORRUPT_BKPT;
+ rc = SQLITE_CORRUPT_PGNO(iTrunk);
goto end_allocate_page;
}
testcase( iPage==mxPage );
@@ -61102,30 +65828,30 @@ static void freePage(MemPage *pPage, int *pRC){
static int clearCell(
MemPage *pPage, /* The page that contains the Cell */
unsigned char *pCell, /* First byte of the Cell */
- u16 *pnSize /* Write the size of the Cell here */
+ CellInfo *pInfo /* Size information about the cell */
){
- BtShared *pBt = pPage->pBt;
- CellInfo info;
+ BtShared *pBt;
Pgno ovflPgno;
int rc;
int nOvfl;
u32 ovflPageSize;
assert( sqlite3_mutex_held(pPage->pBt->mutex) );
- pPage->xParseCell(pPage, pCell, &info);
- *pnSize = info.nSize;
- if( info.nLocal==info.nPayload ){
+ pPage->xParseCell(pPage, pCell, pInfo);
+ if( pInfo->nLocal==pInfo->nPayload ){
return SQLITE_OK; /* No overflow pages. Return without doing anything */
}
- if( pCell+info.nSize-1 > pPage->aData+pPage->maskPage ){
- return SQLITE_CORRUPT_BKPT; /* Cell extends past end of page */
+ if( pCell+pInfo->nSize-1 > pPage->aData+pPage->maskPage ){
+ /* Cell extends past end of page */
+ return SQLITE_CORRUPT_PGNO(pPage->pgno);
}
- ovflPgno = get4byte(pCell + info.nSize - 4);
+ ovflPgno = get4byte(pCell + pInfo->nSize - 4);
+ pBt = pPage->pBt;
assert( pBt->usableSize > 4 );
ovflPageSize = pBt->usableSize - 4;
- nOvfl = (info.nPayload - info.nLocal + ovflPageSize - 1)/ovflPageSize;
+ nOvfl = (pInfo->nPayload - pInfo->nLocal + ovflPageSize - 1)/ovflPageSize;
assert( nOvfl>0 ||
- (CORRUPT_DB && (info.nPayload + ovflPageSize)nPayload + ovflPageSize)pBt;
- Pgno pgnoOvfl = 0;
+ BtShared *pBt;
+ Pgno pgnoOvfl;
int nHeader;
assert( sqlite3_mutex_held(pPage->pBt->mutex) );
/* pPage is not necessarily writeable since pCell might be auxiliary
** buffer space that is separate from the pPage buffer area */
- assert( pCellaData || pCell>=&pPage->aData[pBt->pageSize]
+ assert( pCellaData || pCell>=&pPage->aData[pPage->pBt->pageSize]
|| sqlite3PagerIswriteable(pPage->pDbPage) );
/* Fill in the header. */
nHeader = pPage->childPtrSize;
- nPayload = nData + nZero;
- if( pPage->intKeyLeaf ){
- nHeader += putVarint32(&pCell[nHeader], nPayload);
- }else{
- assert( nData==0 );
- assert( nZero==0 );
- }
- nHeader += putVarint(&pCell[nHeader], *(u64*)&nKey);
-
- /* Fill in the payload size */
if( pPage->intKey ){
- pSrc = pData;
- nSrc = nData;
- nData = 0;
- }else{
- assert( nKey<=0x7fffffff && pKey!=0 );
- nPayload = (int)nKey;
- pSrc = pKey;
- nSrc = (int)nKey;
+ nPayload = pX->nData + pX->nZero;
+ pSrc = pX->pData;
+ nSrc = pX->nData;
+ assert( pPage->intKeyLeaf ); /* fillInCell() only called for leaves */
+ nHeader += putVarint32(&pCell[nHeader], nPayload);
+ nHeader += putVarint(&pCell[nHeader], *(u64*)&pX->nKey);
+ }else{
+ assert( pX->nKey<=0x7fffffff && pX->pKey!=0 );
+ nSrc = nPayload = (int)pX->nKey;
+ pSrc = pX->pKey;
+ nHeader += putVarint32(&pCell[nHeader], nPayload);
}
+
+ /* Fill in the payload */
+ pPayload = &pCell[nHeader];
if( nPayload<=pPage->maxLocal ){
+ /* This is the common case where everything fits on the btree page
+ ** and no overflow pages are required. */
n = nHeader + nPayload;
testcase( n==3 );
testcase( n==4 );
if( n<4 ) n = 4;
*pnSize = n;
- spaceLeft = nPayload;
- pPrior = pCell;
- }else{
- int mn = pPage->minLocal;
- n = mn + (nPayload - mn) % (pPage->pBt->usableSize - 4);
- testcase( n==pPage->maxLocal );
- testcase( n==pPage->maxLocal+1 );
- if( n > pPage->maxLocal ) n = mn;
- spaceLeft = n;
- *pnSize = n + nHeader + 4;
- pPrior = &pCell[nHeader+n];
+ assert( nSrc<=nPayload );
+ testcase( nSrcminLocal;
+ n = mn + (nPayload - mn) % (pPage->pBt->usableSize - 4);
+ testcase( n==pPage->maxLocal );
+ testcase( n==pPage->maxLocal+1 );
+ if( n > pPage->maxLocal ) n = mn;
+ spaceLeft = n;
+ *pnSize = n + nHeader + 4;
+ pPrior = &pCell[nHeader+n];
+ pToRelease = 0;
+ pgnoOvfl = 0;
+ pBt = pPage->pBt;
/* At this point variables should be set as follows:
**
@@ -61261,20 +65990,47 @@ static int fillInCell(
** Use a call to btreeParseCellPtr() to verify that the values above
** were computed correctly.
*/
-#if SQLITE_DEBUG
+#ifdef SQLITE_DEBUG
{
CellInfo info;
pPage->xParseCell(pPage, pCell, &info);
- assert( nHeader=(int)(info.pPayload - pCell) );
- assert( info.nKey==nKey );
+ assert( nHeader==(int)(info.pPayload - pCell) );
+ assert( info.nKey==pX->nKey );
assert( *pnSize == info.nSize );
assert( spaceLeft == info.nLocal );
}
#endif
/* Write the payload into the local Cell and any extra into overflow pages */
- while( nPayload>0 ){
+ while( 1 ){
+ n = nPayload;
+ if( n>spaceLeft ) n = spaceLeft;
+
+ /* If pToRelease is not zero than pPayload points into the data area
+ ** of pToRelease. Make sure pToRelease is still writeable. */
+ assert( pToRelease==0 || sqlite3PagerIswriteable(pToRelease->pDbPage) );
+
+ /* If pPayload is part of the data area of pPage, then make sure pPage
+ ** is still writeable */
+ assert( pPayloadaData || pPayload>=&pPage->aData[pBt->pageSize]
+ || sqlite3PagerIswriteable(pPage->pDbPage) );
+
+ if( nSrc>=n ){
+ memcpy(pPayload, pSrc, n);
+ }else if( nSrc>0 ){
+ n = nSrc;
+ memcpy(pPayload, pSrc, n);
+ }else{
+ memset(pPayload, 0, n);
+ }
+ nPayload -= n;
+ if( nPayload<=0 ) break;
+ pPayload += n;
+ pSrc += n;
+ nSrc -= n;
+ spaceLeft -= n;
if( spaceLeft==0 ){
+ MemPage *pOvfl = 0;
#ifndef SQLITE_OMIT_AUTOVACUUM
Pgno pgnoPtrmap = pgnoOvfl; /* Overflow page pointer-map entry page */
if( pBt->autoVacuum ){
@@ -61327,34 +66083,6 @@ static int fillInCell(
pPayload = &pOvfl->aData[4];
spaceLeft = pBt->usableSize - 4;
}
- n = nPayload;
- if( n>spaceLeft ) n = spaceLeft;
-
- /* If pToRelease is not zero than pPayload points into the data area
- ** of pToRelease. Make sure pToRelease is still writeable. */
- assert( pToRelease==0 || sqlite3PagerIswriteable(pToRelease->pDbPage) );
-
- /* If pPayload is part of the data area of pPage, then make sure pPage
- ** is still writeable */
- assert( pPayloadaData || pPayload>=&pPage->aData[pBt->pageSize]
- || sqlite3PagerIswriteable(pPage->pDbPage) );
-
- if( nSrc>0 ){
- if( n>nSrc ) n = nSrc;
- assert( pSrc );
- memcpy(pPayload, pSrc, n);
- }else{
- memset(pPayload, 0, n);
- }
- nPayload -= n;
- pPayload += n;
- pSrc += n;
- nSrc -= n;
- spaceLeft -= n;
- if( nSrc==0 ){
- nSrc = nData;
- pSrc = pData;
- }
}
releasePage(pToRelease);
return SQLITE_OK;
@@ -61376,7 +66104,6 @@ static void dropCell(MemPage *pPage, int idx, int sz, int *pRC){
int hdr; /* Beginning of the header. 0 most pages. 100 page 1 */
if( *pRC ) return;
-
assert( idx>=0 && idxnCell );
assert( CORRUPT_DB || sz==cellSize(pPage, idx) );
assert( sqlite3PagerIswriteable(pPage->pDbPage) );
@@ -61387,7 +66114,7 @@ static void dropCell(MemPage *pPage, int idx, int sz, int *pRC){
hdr = pPage->hdrOffset;
testcase( pc==get2byte(&data[hdr+5]) );
testcase( pc+sz==pPage->pBt->usableSize );
- if( pc < (u32)get2byte(&data[hdr+5]) || pc+sz > pPage->pBt->usableSize ){
+ if( pc+sz > pPage->pBt->usableSize ){
*pRC = SQLITE_CORRUPT_BKPT;
return;
}
@@ -61421,6 +66148,8 @@ static void dropCell(MemPage *pPage, int idx, int sz, int *pRC){
** in pTemp or the original pCell) and also record its index.
** Allocating a new entry in pPage->aCell[] implies that
** pPage->nOverflow is incremented.
+**
+** *pRC must be SQLITE_OK when this routine is called.
*/
static void insertCell(
MemPage *pPage, /* Page into which we are copying */
@@ -61436,8 +66165,7 @@ static void insertCell(
u8 *data; /* The content of the whole page */
u8 *pIns; /* The point in pPage->aCellIdx[] where no cell inserted */
- if( *pRC ) return;
-
+ assert( *pRC==SQLITE_OK );
assert( i>=0 && i<=pPage->nCell+pPage->nOverflow );
assert( MX_CELL(pPage->pBt)<=10921 );
assert( pPage->nCell<=MX_CELL(pPage->pBt) || CORRUPT_DB );
@@ -61459,7 +66187,10 @@ static void insertCell(
put4byte(pCell, iChild);
}
j = pPage->nOverflow++;
- assert( j<(int)(sizeof(pPage->apOvfl)/sizeof(pPage->apOvfl[0])) );
+ /* Comparison against ArraySize-1 since we hold back one extra slot
+ ** as a contingency. In other words, never need more than 3 overflow
+ ** slots but 4 are allocated, just to be safe. */
+ assert( j < ArraySize(pPage->apOvfl)-1 );
pPage->apOvfl[j] = pCell;
pPage->aiOvfl[j] = (u16)i;
@@ -61511,7 +66242,7 @@ static void insertCell(
/*
** A CellArray object contains a cache of pointers and sizes for a
-** consecutive sequence of cells that might be held multiple pages.
+** consecutive sequence of cells that might be held on multiple pages.
*/
typedef struct CellArray CellArray;
struct CellArray {
@@ -61656,8 +66387,8 @@ static int pageInsertArray(
u8 *pSlot;
sz = cachedCellSize(pCArray, i);
if( (aData[1]==0 && aData[2]==0) || (pSlot = pageFindSlot(pPg,sz,&rc))==0 ){
+ if( (pData - pBegin)apCell[i] will never overlap on a well-formed
@@ -61819,7 +66550,7 @@ static int editPage(
for(i=0; iapCell[i+iNew];
int iOff = get2byteAligned(&pPg->aCellIdx[i*2]);
- if( pCell>=aData && pCell<&aData[pPg->pBt->usableSize] ){
+ if( SQLITE_WITHIN(pCell, aData, &aData[pPg->pBt->usableSize]) ){
pCell = &pTmp[pCell - aData];
}
assert( 0==memcmp(pCell, &aData[iOff],
@@ -61943,8 +66674,10 @@ static int balance_quick(MemPage *pParent, MemPage *pPage, u8 *pSpace){
while( ((*(pOut++) = *(pCell++))&0x80) && pCellnCell, pSpace, (int)(pOut-pSpace),
- 0, pPage->pgno, &rc);
+ if( rc==SQLITE_OK ){
+ insertCell(pParent, pParent->nCell, pSpace, (int)(pOut-pSpace),
+ 0, pPage->pgno, &rc);
+ }
/* Set the right-child pointer of pParent to point to the new page. */
put4byte(&pParent->aData[pParent->hdrOffset+8], pgnoNew);
@@ -62153,7 +66886,7 @@ static int balance_nonroot(
assert( pParent->nOverflow==0 || pParent->aiOvfl[0]==iParentIdx );
if( !aOvflSpace ){
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
/* Find the sibling pages to balance. Also locate the cells in pParent
@@ -62197,7 +66930,7 @@ static int balance_nonroot(
nMaxCells += 1+apOld[i]->nCell+apOld[i]->nOverflow;
if( (i--)==0 ) break;
- if( i+nxDiv==pParent->aiOvfl[0] && pParent->nOverflow ){
+ if( pParent->nOverflow && i+nxDiv==pParent->aiOvfl[0] ){
apDiv[i] = pParent->apOvfl[0];
pgno = get4byte(apDiv[i]);
szNew[i] = pParent->xCellSize(pParent, apDiv[i]);
@@ -62219,7 +66952,7 @@ static int balance_nonroot(
** In this case, temporarily copy the cell into the aOvflSpace[]
** buffer. It will be copied out again as soon as the aSpace[] buffer
** is allocated. */
- if( pBt->btsFlags & BTS_SECURE_DELETE ){
+ if( pBt->btsFlags & BTS_FAST_SECURE ){
int iOff;
iOff = SQLITE_PTR_TO_INT(apDiv[i]) - SQLITE_PTR_TO_INT(pParent->aData);
@@ -62248,12 +66981,10 @@ static int balance_nonroot(
+ nMaxCells*sizeof(u16) /* b.szCell */
+ pBt->pageSize; /* aSpace1 */
- /* EVIDENCE-OF: R-28375-38319 SQLite will never request a scratch buffer
- ** that is more than 6 times the database page size. */
assert( szScratch<=6*(int)pBt->pageSize );
- b.apCell = sqlite3ScratchMalloc( szScratch );
+ b.apCell = sqlite3StackAllocRaw(0, szScratch );
if( b.apCell==0 ){
- rc = SQLITE_NOMEM;
+ rc = SQLITE_NOMEM_BKPT;
goto balance_cleanup;
}
b.szCell = (u16*)&b.apCell[nMaxCells];
@@ -62312,9 +67043,8 @@ static int balance_nonroot(
** long be able to find the cells if a pointer to each cell is not saved
** first.
*/
- memset(&b.szCell[b.nCell], 0, sizeof(b.szCell[0])*limit);
+ memset(&b.szCell[b.nCell], 0, sizeof(b.szCell[0])*(limit+pOld->nOverflow));
if( pOld->nOverflow>0 ){
- memset(&b.szCell[b.nCell+limit], 0, sizeof(b.szCell[0])*pOld->nOverflow);
limit = pOld->aiOvfl[0];
for(j=0; jnFree;
- if( szNew[i]<0 ){ rc = SQLITE_CORRUPT_BKPT; goto balance_cleanup; }
for(j=0; jnOverflow; j++){
szNew[i] += 2 + p->xCellSize(p, p->apOvfl[j]);
}
@@ -62465,7 +67194,7 @@ static int balance_nonroot(
assert( r szLeft-(b.szCell[r]+2)) ){
+ && (bBulk || szRight+b.szCell[d]+2 > szLeft-(b.szCell[r]+(i==k-1?0:2)))){
break;
}
szRight += b.szCell[d] + 2;
@@ -62689,9 +67418,9 @@ static int balance_nonroot(
** any cell). But it is important to pass the correct size to
** insertCell(), so reparse the cell now.
**
- ** Note that this can never happen in an SQLite data file, as all
- ** cells are at least 4 bytes. It only happens in b-trees used
- ** to evaluate "IN (SELECT ...)" and similar clauses.
+ ** This can only happen for b-trees used to evaluate "IN (SELECT ...)"
+ ** and WITHOUT ROWID tables with exactly one column which is the
+ ** primary key.
*/
if( b.szCell[j]==4 ){
assert(leafCorrection==4);
@@ -62788,7 +67517,7 @@ static int balance_nonroot(
** free space needs to be up front.
*/
assert( nNew==1 || CORRUPT_DB );
- rc = defragmentPage(apNew[0]);
+ rc = defragmentPage(apNew[0], -1);
testcase( rc!=SQLITE_OK );
assert( apNew[0]->nFree ==
(get2byte(&apNew[0]->aData[5])-apNew[0]->cellOffset-apNew[0]->nCell*2)
@@ -62831,7 +67560,7 @@ static int balance_nonroot(
** Cleanup before returning.
*/
balance_cleanup:
- sqlite3ScratchFree(b.apCell);
+ sqlite3StackFree(0, b.apCell);
for(i=0; iiPage;
- MemPage *pPage = pCur->apPage[iPage];
+ MemPage *pPage = pCur->pPage;
if( iPage==0 ){
if( pPage->nOverflow ){
@@ -62939,13 +67668,16 @@ static int balance(BtCursor *pCur){
** and copy the current contents of the root-page to it. The
** next iteration of the do-loop will balance the child page.
*/
- assert( (balance_deeper_called++)==0 );
+ assert( balance_deeper_called==0 );
+ VVA_ONLY( balance_deeper_called++ );
rc = balance_deeper(pPage, &pCur->apPage[1]);
if( rc==SQLITE_OK ){
pCur->iPage = 1;
+ pCur->ix = 0;
pCur->aiIdx[0] = 0;
- pCur->aiIdx[1] = 0;
- assert( pCur->apPage[1]->nOverflow );
+ pCur->apPage[0] = pPage;
+ pCur->pPage = pCur->apPage[1];
+ assert( pCur->pPage->nOverflow );
}
}else{
break;
@@ -62978,7 +67710,8 @@ static int balance(BtCursor *pCur){
** function. If this were not verified, a subtle bug involving reuse
** of the aBalanceQuickSpace[] might sneak in.
*/
- assert( (balance_quick_called++)==0 );
+ assert( balance_quick_called==0 );
+ VVA_ONLY( balance_quick_called++ );
rc = balance_quick(pParent, pPage, aBalanceQuickSpace);
}else
#endif
@@ -63024,6 +67757,7 @@ static int balance(BtCursor *pCur){
releasePage(pPage);
pCur->iPage--;
assert( pCur->iPage>=0 );
+ pCur->pPage = pCur->apPage[pCur->iPage];
}
}while( rc==SQLITE_OK );
@@ -63035,33 +67769,39 @@ static int balance(BtCursor *pCur){
/*
-** Insert a new record into the BTree. The key is given by (pKey,nKey)
-** and the data is given by (pData,nData). The cursor is used only to
-** define what table the record should be inserted into. The cursor
-** is left pointing at a random location.
+** Insert a new record into the BTree. The content of the new record
+** is described by the pX object. The pCur cursor is used only to
+** define what table the record should be inserted into, and is left
+** pointing at a random location.
**
-** For an INTKEY table, only the nKey value of the key is used. pKey is
-** ignored. For a ZERODATA table, the pData and nData are both ignored.
+** For a table btree (used for rowid tables), only the pX.nKey value of
+** the key is used. The pX.pKey value must be NULL. The pX.nKey is the
+** rowid or INTEGER PRIMARY KEY of the row. The pX.nData,pData,nZero fields
+** hold the content of the row.
+**
+** For an index btree (used for indexes and WITHOUT ROWID tables), the
+** key is an arbitrary byte sequence stored in pX.pKey,nKey. The
+** pX.pData,nData,nZero fields must be zero.
**
** If the seekResult parameter is non-zero, then a successful call to
-** MovetoUnpacked() to seek cursor pCur to (pKey, nKey) has already
-** been performed. seekResult is the search result returned (a negative
-** number if pCur points at an entry that is smaller than (pKey, nKey), or
-** a positive value if pCur points at an entry that is larger than
-** (pKey, nKey)).
+** MovetoUnpacked() to seek cursor pCur to (pKey,nKey) has already
+** been performed. In other words, if seekResult!=0 then the cursor
+** is currently pointing to a cell that will be adjacent to the cell
+** to be inserted. If seekResult<0 then pCur points to a cell that is
+** smaller then (pKey,nKey). If seekResult>0 then pCur points to a cell
+** that is larger than (pKey,nKey).
**
-** If the seekResult parameter is non-zero, then the caller guarantees that
-** cursor pCur is pointing at the existing copy of a row that is to be
-** overwritten. If the seekResult parameter is 0, then cursor pCur may
-** point to any entry or to no entry at all and so this function has to seek
-** the cursor before the new key can be inserted.
+** If seekResult==0, that means pCur is pointing at some unknown location.
+** In that case, this routine must seek the cursor to the correct insertion
+** point for (pKey,nKey) before doing the insertion. For index btrees,
+** if pX->nMem is non-zero, then pX->aMem contains pointers to the unpacked
+** key values and pX->aMem can be used instead of pX->pKey to avoid having
+** to decode the key.
*/
SQLITE_PRIVATE int sqlite3BtreeInsert(
BtCursor *pCur, /* Insert data into the table of this cursor */
- const void *pKey, i64 nKey, /* The key of the new record */
- const void *pData, int nData, /* The data of the new record */
- int nZero, /* Number of extra 0 bytes to append to data */
- int appendBias, /* True if this is likely an append */
+ const BtreePayload *pX, /* Content of the row to be inserted */
+ int flags, /* True if this is likely an append */
int seekResult /* Result of prior MovetoUnpacked() call */
){
int rc;
@@ -63074,12 +67814,14 @@ SQLITE_PRIVATE int sqlite3BtreeInsert(
unsigned char *oldCell;
unsigned char *newCell = 0;
+ assert( (flags & (BTREE_SAVEPOSITION|BTREE_APPEND))==flags );
+
if( pCur->eState==CURSOR_FAULT ){
assert( pCur->skipNext!=SQLITE_OK );
return pCur->skipNext;
}
- assert( cursorHoldsMutex(pCur) );
+ assert( cursorOwnsBtShared(pCur) );
assert( (pCur->curFlags & BTCF_WriteFlag)!=0
&& pBt->inTransaction==TRANS_WRITE
&& (pBt->btsFlags & BTS_READ_ONLY)==0 );
@@ -63090,7 +67832,7 @@ SQLITE_PRIVATE int sqlite3BtreeInsert(
** keys with no associated data. If the cursor was opened expecting an
** intkey table, the caller should be inserting integer keys with a
** blob of associated data. */
- assert( (pKey==0)==(pCur->pKeyInfo==0) );
+ assert( (pX->pKey==0)==(pCur->pKeyInfo==0) );
/* Save the positions of any other cursors open on this table.
**
@@ -63109,44 +67851,61 @@ SQLITE_PRIVATE int sqlite3BtreeInsert(
}
if( pCur->pKeyInfo==0 ){
- assert( pKey==0 );
+ assert( pX->pKey==0 );
/* If this is an insert into a table b-tree, invalidate any incrblob
** cursors open on the row being replaced */
- invalidateIncrblobCursors(p, nKey, 0);
+ invalidateIncrblobCursors(p, pCur->pgnoRoot, pX->nKey, 0);
+
+ /* If BTREE_SAVEPOSITION is set, the cursor must already be pointing
+ ** to a row with the same key as the new entry being inserted. */
+ assert( (flags & BTREE_SAVEPOSITION)==0 ||
+ ((pCur->curFlags&BTCF_ValidNKey)!=0 && pX->nKey==pCur->info.nKey) );
/* If the cursor is currently on the last row and we are appending a
** new row onto the end, set the "loc" to avoid an unnecessary
** btreeMoveto() call */
- if( (pCur->curFlags&BTCF_ValidNKey)!=0 && nKey>0
- && pCur->info.nKey==nKey-1 ){
- loc = -1;
+ if( (pCur->curFlags&BTCF_ValidNKey)!=0 && pX->nKey==pCur->info.nKey ){
+ loc = 0;
}else if( loc==0 ){
- rc = sqlite3BtreeMovetoUnpacked(pCur, 0, nKey, appendBias, &loc);
+ rc = sqlite3BtreeMovetoUnpacked(pCur, 0, pX->nKey, flags!=0, &loc);
if( rc ) return rc;
}
- }else if( loc==0 ){
- rc = btreeMoveto(pCur, pKey, nKey, appendBias, &loc);
+ }else if( loc==0 && (flags & BTREE_SAVEPOSITION)==0 ){
+ if( pX->nMem ){
+ UnpackedRecord r;
+ r.pKeyInfo = pCur->pKeyInfo;
+ r.aMem = pX->aMem;
+ r.nField = pX->nMem;
+ r.default_rc = 0;
+ r.errCode = 0;
+ r.r1 = 0;
+ r.r2 = 0;
+ r.eqSeen = 0;
+ rc = sqlite3BtreeMovetoUnpacked(pCur, &r, 0, flags!=0, &loc);
+ }else{
+ rc = btreeMoveto(pCur, pX->pKey, pX->nKey, flags!=0, &loc);
+ }
if( rc ) return rc;
}
assert( pCur->eState==CURSOR_VALID || (pCur->eState==CURSOR_INVALID && loc) );
- pPage = pCur->apPage[pCur->iPage];
- assert( pPage->intKey || nKey>=0 );
+ pPage = pCur->pPage;
+ assert( pPage->intKey || pX->nKey>=0 );
assert( pPage->leaf || !pPage->intKey );
TRACE(("INSERT: table=%d nkey=%lld ndata=%d page=%d %s\n",
- pCur->pgnoRoot, nKey, nData, pPage->pgno,
+ pCur->pgnoRoot, pX->nKey, pX->nData, pPage->pgno,
loc==0 ? "overwrite" : "new entry"));
assert( pPage->isInit );
newCell = pBt->pTmpSpace;
assert( newCell!=0 );
- rc = fillInCell(pPage, newCell, pKey, nKey, pData, nData, nZero, &szNew);
+ rc = fillInCell(pPage, newCell, pX, &szNew);
if( rc ) goto end_insert;
assert( szNew==pPage->xCellSize(pPage, newCell) );
assert( szNew <= MX_CELL_SIZE(pBt) );
- idx = pCur->aiIdx[pCur->iPage];
+ idx = pCur->ix;
if( loc==0 ){
- u16 szOld;
+ CellInfo info;
assert( idxnCell );
rc = sqlite3PagerWrite(pPage->pDbPage);
if( rc ){
@@ -63156,16 +67915,35 @@ SQLITE_PRIVATE int sqlite3BtreeInsert(
if( !pPage->leaf ){
memcpy(newCell, oldCell, 4);
}
- rc = clearCell(pPage, oldCell, &szOld);
- dropCell(pPage, idx, szOld, &rc);
+ rc = clearCell(pPage, oldCell, &info);
+ if( info.nSize==szNew && info.nLocal==info.nPayload
+ && (!ISAUTOVACUUM || szNewminLocal)
+ ){
+ /* Overwrite the old cell with the new if they are the same size.
+ ** We could also try to do this if the old cell is smaller, then add
+ ** the leftover space to the free list. But experiments show that
+ ** doing that is no faster then skipping this optimization and just
+ ** calling dropCell() and insertCell().
+ **
+ ** This optimization cannot be used on an autovacuum database if the
+ ** new entry uses overflow pages, as the insertCell() call below is
+ ** necessary to add the PTRMAP_OVERFLOW1 pointer-map entry. */
+ assert( rc==SQLITE_OK ); /* clearCell never fails when nLocal==nPayload */
+ if( oldCell+szNew > pPage->aDataEnd ) return SQLITE_CORRUPT_BKPT;
+ memcpy(oldCell, newCell, szNew);
+ return SQLITE_OK;
+ }
+ dropCell(pPage, idx, info.nSize, &rc);
if( rc ) goto end_insert;
}else if( loc<0 && pPage->nCell>0 ){
assert( pPage->leaf );
- idx = ++pCur->aiIdx[pCur->iPage];
+ idx = ++pCur->ix;
+ pCur->curFlags &= ~BTCF_ValidNKey;
}else{
assert( pPage->leaf );
}
insertCell(pPage, idx, newCell, szNew, 0, 0, &rc);
+ assert( pPage->nOverflow==0 || rc==SQLITE_OK );
assert( rc!=SQLITE_OK || pPage->nCell>0 || pPage->nOverflow>0 );
/* If no error has occurred and pPage has an overflow cell, call balance()
@@ -63189,7 +67967,8 @@ SQLITE_PRIVATE int sqlite3BtreeInsert(
** row without seeking the cursor. This can be a big performance boost.
*/
pCur->info.nSize = 0;
- if( rc==SQLITE_OK && pPage->nOverflow ){
+ if( pPage->nOverflow ){
+ assert( rc==SQLITE_OK );
pCur->curFlags &= ~(BTCF_ValidNKey);
rc = balance(pCur);
@@ -63197,10 +67976,24 @@ SQLITE_PRIVATE int sqlite3BtreeInsert(
** fails. Internal data structure corruption will result otherwise.
** Also, set the cursor state to invalid. This stops saveCursorPosition()
** from trying to save the current position of the cursor. */
- pCur->apPage[pCur->iPage]->nOverflow = 0;
+ pCur->pPage->nOverflow = 0;
pCur->eState = CURSOR_INVALID;
+ if( (flags & BTREE_SAVEPOSITION) && rc==SQLITE_OK ){
+ btreeReleaseAllCursorPages(pCur);
+ if( pCur->pKeyInfo ){
+ assert( pCur->pKey==0 );
+ pCur->pKey = sqlite3Malloc( pX->nKey );
+ if( pCur->pKey==0 ){
+ rc = SQLITE_NOMEM;
+ }else{
+ memcpy(pCur->pKey, pX->pKey, pX->nKey);
+ }
+ }
+ pCur->eState = CURSOR_REQUIRESEEK;
+ pCur->nKey = pX->nKey;
+ }
}
- assert( pCur->apPage[pCur->iPage]->nOverflow==0 );
+ assert( pCur->iPage<0 || pCur->pPage->nOverflow==0 );
end_insert:
return rc;
@@ -63209,13 +68002,21 @@ end_insert:
/*
** Delete the entry that the cursor is pointing to.
**
-** If the second parameter is zero, then the cursor is left pointing at an
-** arbitrary location after the delete. If it is non-zero, then the cursor
-** is left in a state such that the next call to BtreeNext() or BtreePrev()
-** moves it to the same row as it would if the call to BtreeDelete() had
-** been omitted.
+** If the BTREE_SAVEPOSITION bit of the flags parameter is zero, then
+** the cursor is left pointing at an arbitrary location after the delete.
+** But if that bit is set, then the cursor is left in a state such that
+** the next call to BtreeNext() or BtreePrev() moves it to the same row
+** as it would have been on if the call to BtreeDelete() had been omitted.
+**
+** The BTREE_AUXDELETE bit of flags indicates that is one of several deletes
+** associated with a single table entry and its indexes. Only one of those
+** deletes is considered the "primary" delete. The primary delete occurs
+** on a cursor that is not a BTREE_FORDELETE cursor. All but one delete
+** operation on non-FORDELETE cursors is tagged with the AUXDELETE flag.
+** The BTREE_AUXDELETE bit is a hint that is not used by this implementation,
+** but which might be used by alternative storage engines.
*/
-SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor *pCur, int bPreserve){
+SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor *pCur, u8 flags){
Btree *p = pCur->pBtree;
BtShared *pBt = p->pBt;
int rc; /* Return code */
@@ -63223,49 +68024,25 @@ SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor *pCur, int bPreserve){
unsigned char *pCell; /* Pointer to cell to delete */
int iCellIdx; /* Index of cell to delete */
int iCellDepth; /* Depth of node containing pCell */
- u16 szCell; /* Size of the cell being deleted */
+ CellInfo info; /* Size of the cell being deleted */
int bSkipnext = 0; /* Leaf cursor in SKIPNEXT state */
+ u8 bPreserve = flags & BTREE_SAVEPOSITION; /* Keep cursor valid */
- assert( cursorHoldsMutex(pCur) );
+ assert( cursorOwnsBtShared(pCur) );
assert( pBt->inTransaction==TRANS_WRITE );
assert( (pBt->btsFlags & BTS_READ_ONLY)==0 );
assert( pCur->curFlags & BTCF_WriteFlag );
assert( hasSharedCacheTableLock(p, pCur->pgnoRoot, pCur->pKeyInfo!=0, 2) );
assert( !hasReadConflicts(p, pCur->pgnoRoot) );
- assert( pCur->aiIdx[pCur->iPage]apPage[pCur->iPage]->nCell );
+ assert( pCur->ixpPage->nCell );
assert( pCur->eState==CURSOR_VALID );
+ assert( (flags & ~(BTREE_SAVEPOSITION | BTREE_AUXDELETE))==0 );
iCellDepth = pCur->iPage;
- iCellIdx = pCur->aiIdx[iCellDepth];
- pPage = pCur->apPage[iCellDepth];
+ iCellIdx = pCur->ix;
+ pPage = pCur->pPage;
pCell = findCell(pPage, iCellIdx);
- /* If the page containing the entry to delete is not a leaf page, move
- ** the cursor to the largest entry in the tree that is smaller than
- ** the entry being deleted. This cell will replace the cell being deleted
- ** from the internal node. The 'previous' entry is used for this instead
- ** of the 'next' entry, as the previous entry is always a part of the
- ** sub-tree headed by the child page of the cell being deleted. This makes
- ** balancing the tree following the delete operation easier. */
- if( !pPage->leaf ){
- int notUsed = 0;
- rc = sqlite3BtreePrevious(pCur, ¬Used);
- if( rc ) return rc;
- }
-
- /* Save the positions of any other cursors open on this table before
- ** making any modifications. */
- if( pCur->curFlags & BTCF_Multiple ){
- rc = saveAllCursors(pBt, pCur->pgnoRoot, pCur);
- if( rc ) return rc;
- }
-
- /* If this is a delete operation to remove a row from a table b-tree,
- ** invalidate any incrblob cursors open on the row being deleted. */
- if( pCur->pKeyInfo==0 ){
- invalidateIncrblobCursors(p, pCur->info.nKey, 0);
- }
-
/* If the bPreserve flag is set to true, then the cursor position must
** be preserved following this delete operation. If the current delete
** will cause a b-tree rebalance, then this is done by saving the cursor
@@ -63288,13 +68065,39 @@ SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor *pCur, int bPreserve){
}
}
+ /* If the page containing the entry to delete is not a leaf page, move
+ ** the cursor to the largest entry in the tree that is smaller than
+ ** the entry being deleted. This cell will replace the cell being deleted
+ ** from the internal node. The 'previous' entry is used for this instead
+ ** of the 'next' entry, as the previous entry is always a part of the
+ ** sub-tree headed by the child page of the cell being deleted. This makes
+ ** balancing the tree following the delete operation easier. */
+ if( !pPage->leaf ){
+ rc = sqlite3BtreePrevious(pCur, 0);
+ assert( rc!=SQLITE_DONE );
+ if( rc ) return rc;
+ }
+
+ /* Save the positions of any other cursors open on this table before
+ ** making any modifications. */
+ if( pCur->curFlags & BTCF_Multiple ){
+ rc = saveAllCursors(pBt, pCur->pgnoRoot, pCur);
+ if( rc ) return rc;
+ }
+
+ /* If this is a delete operation to remove a row from a table b-tree,
+ ** invalidate any incrblob cursors open on the row being deleted. */
+ if( pCur->pKeyInfo==0 ){
+ invalidateIncrblobCursors(p, pCur->pgnoRoot, pCur->info.nKey, 0);
+ }
+
/* Make the page containing the entry to be deleted writable. Then free any
** overflow pages associated with the entry and finally remove the cell
** itself from within the page. */
rc = sqlite3PagerWrite(pPage->pDbPage);
if( rc ) return rc;
- rc = clearCell(pPage, pCell, &szCell);
- dropCell(pPage, iCellIdx, szCell, &rc);
+ rc = clearCell(pPage, pCell, &info);
+ dropCell(pPage, iCellIdx, info.nSize, &rc);
if( rc ) return rc;
/* If the cell deleted was not located on a leaf page, then the cursor
@@ -63303,11 +68106,16 @@ SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor *pCur, int bPreserve){
** node. The cell from the leaf node needs to be moved to the internal
** node to replace the deleted cell. */
if( !pPage->leaf ){
- MemPage *pLeaf = pCur->apPage[pCur->iPage];
+ MemPage *pLeaf = pCur->pPage;
int nCell;
- Pgno n = pCur->apPage[iCellDepth+1]->pgno;
+ Pgno n;
unsigned char *pTmp;
+ if( iCellDepthiPage-1 ){
+ n = pCur->apPage[iCellDepth+1]->pgno;
+ }else{
+ n = pCur->pPage->pgno;
+ }
pCell = findCell(pLeaf, pLeaf->nCell-1);
if( pCell<&pLeaf->aData[4] ) return SQLITE_CORRUPT_BKPT;
nCell = pLeaf->xCellSize(pLeaf, pCell);
@@ -63315,7 +68123,9 @@ SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor *pCur, int bPreserve){
pTmp = pBt->pTmpSpace;
assert( pTmp!=0 );
rc = sqlite3PagerWrite(pLeaf->pDbPage);
- insertCell(pPage, iCellIdx, pCell-4, nCell+4, pTmp, n, &rc);
+ if( rc==SQLITE_OK ){
+ insertCell(pPage, iCellIdx, pCell-4, nCell+4, pTmp, n, &rc);
+ }
dropCell(pLeaf, pLeaf->nCell-1, nCell, &rc);
if( rc ) return rc;
}
@@ -63337,29 +68147,34 @@ SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor *pCur, int bPreserve){
** well. */
rc = balance(pCur);
if( rc==SQLITE_OK && pCur->iPage>iCellDepth ){
+ releasePageNotNull(pCur->pPage);
+ pCur->iPage--;
while( pCur->iPage>iCellDepth ){
releasePage(pCur->apPage[pCur->iPage--]);
}
+ pCur->pPage = pCur->apPage[pCur->iPage];
rc = balance(pCur);
}
if( rc==SQLITE_OK ){
if( bSkipnext ){
assert( bPreserve && (pCur->iPage==iCellDepth || CORRUPT_DB) );
- assert( pPage==pCur->apPage[pCur->iPage] );
+ assert( pPage==pCur->pPage || CORRUPT_DB );
assert( (pPage->nCell>0 || CORRUPT_DB) && iCellIdx<=pPage->nCell );
pCur->eState = CURSOR_SKIPNEXT;
if( iCellIdx>=pPage->nCell ){
pCur->skipNext = -1;
- pCur->aiIdx[iCellDepth] = pPage->nCell-1;
+ pCur->ix = pPage->nCell-1;
}else{
pCur->skipNext = 1;
}
}else{
rc = moveToRoot(pCur);
if( bPreserve ){
+ btreeReleaseAllCursorPages(pCur);
pCur->eState = CURSOR_REQUIRESEEK;
}
+ if( rc==SQLITE_EMPTY ) rc = SQLITE_OK;
}
}
return rc;
@@ -63542,7 +68357,7 @@ static int clearDatabasePage(
unsigned char *pCell;
int i;
int hdr;
- u16 szCell;
+ CellInfo info;
assert( sqlite3_mutex_held(pBt->mutex) );
if( pgno>btreePagecount(pBt) ){
@@ -63562,7 +68377,7 @@ static int clearDatabasePage(
rc = clearDatabasePage(pBt, get4byte(pCell), 1, pnChange);
if( rc ) goto cleardatabasepage_out;
}
- rc = clearCell(pPage, pCell, &szCell);
+ rc = clearCell(pPage, pCell, &info);
if( rc ) goto cleardatabasepage_out;
}
if( !pPage->leaf ){
@@ -63610,7 +68425,7 @@ SQLITE_PRIVATE int sqlite3BtreeClearTable(Btree *p, int iTable, int *pnChange){
/* Invalidate all incrblob cursors open on table iTable (assuming iTable
** is the root of a table b-tree - if it is not, the following call is
** a no-op). */
- invalidateIncrblobCursors(p, 0, 1);
+ invalidateIncrblobCursors(p, (Pgno)iTable, 0, 1);
rc = clearDatabasePage(pBt, (Pgno)iTable, 0, pnChange);
}
sqlite3BtreeLeave(p);
@@ -63653,19 +68468,7 @@ static int btreeDropTable(Btree *p, Pgno iTable, int *piMoved){
assert( sqlite3BtreeHoldsMutex(p) );
assert( p->inTrans==TRANS_WRITE );
-
- /* It is illegal to drop a table if any cursors are open on the
- ** database. This is because in auto-vacuum mode the backend may
- ** need to move another root-page to fill a gap left by the deleted
- ** root page. If an open cursor was using this page a problem would
- ** occur.
- **
- ** This error is caught long before control reaches this point.
- */
- if( NEVER(pBt->pCursor) ){
- sqlite3ConnectionBlocked(p->db, pBt->pCursor->pBtree->db);
- return SQLITE_LOCKED_SHAREDCACHE;
- }
+ assert( iTable>=2 );
rc = btreeGetPage(pBt, (Pgno)iTable, &pPage, 0);
if( rc ) return rc;
@@ -63677,76 +68480,67 @@ static int btreeDropTable(Btree *p, Pgno iTable, int *piMoved){
*piMoved = 0;
- if( iTable>1 ){
#ifdef SQLITE_OMIT_AUTOVACUUM
- freePage(pPage, &rc);
- releasePage(pPage);
+ freePage(pPage, &rc);
+ releasePage(pPage);
#else
- if( pBt->autoVacuum ){
- Pgno maxRootPgno;
- sqlite3BtreeGetMeta(p, BTREE_LARGEST_ROOT_PAGE, &maxRootPgno);
+ if( pBt->autoVacuum ){
+ Pgno maxRootPgno;
+ sqlite3BtreeGetMeta(p, BTREE_LARGEST_ROOT_PAGE, &maxRootPgno);
- if( iTable==maxRootPgno ){
- /* If the table being dropped is the table with the largest root-page
- ** number in the database, put the root page on the free list.
- */
- freePage(pPage, &rc);
- releasePage(pPage);
- if( rc!=SQLITE_OK ){
- return rc;
- }
- }else{
- /* The table being dropped does not have the largest root-page
- ** number in the database. So move the page that does into the
- ** gap left by the deleted root-page.
- */
- MemPage *pMove;
- releasePage(pPage);
- rc = btreeGetPage(pBt, maxRootPgno, &pMove, 0);
- if( rc!=SQLITE_OK ){
- return rc;
- }
- rc = relocatePage(pBt, pMove, PTRMAP_ROOTPAGE, 0, iTable, 0);
- releasePage(pMove);
- if( rc!=SQLITE_OK ){
- return rc;
- }
- pMove = 0;
- rc = btreeGetPage(pBt, maxRootPgno, &pMove, 0);
- freePage(pMove, &rc);
- releasePage(pMove);
- if( rc!=SQLITE_OK ){
- return rc;
- }
- *piMoved = maxRootPgno;
- }
-
- /* Set the new 'max-root-page' value in the database header. This
- ** is the old value less one, less one more if that happens to
- ** be a root-page number, less one again if that is the
- ** PENDING_BYTE_PAGE.
+ if( iTable==maxRootPgno ){
+ /* If the table being dropped is the table with the largest root-page
+ ** number in the database, put the root page on the free list.
*/
- maxRootPgno--;
- while( maxRootPgno==PENDING_BYTE_PAGE(pBt)
- || PTRMAP_ISPAGE(pBt, maxRootPgno) ){
- maxRootPgno--;
- }
- assert( maxRootPgno!=PENDING_BYTE_PAGE(pBt) );
-
- rc = sqlite3BtreeUpdateMeta(p, 4, maxRootPgno);
- }else{
freePage(pPage, &rc);
releasePage(pPage);
+ if( rc!=SQLITE_OK ){
+ return rc;
+ }
+ }else{
+ /* The table being dropped does not have the largest root-page
+ ** number in the database. So move the page that does into the
+ ** gap left by the deleted root-page.
+ */
+ MemPage *pMove;
+ releasePage(pPage);
+ rc = btreeGetPage(pBt, maxRootPgno, &pMove, 0);
+ if( rc!=SQLITE_OK ){
+ return rc;
+ }
+ rc = relocatePage(pBt, pMove, PTRMAP_ROOTPAGE, 0, iTable, 0);
+ releasePage(pMove);
+ if( rc!=SQLITE_OK ){
+ return rc;
+ }
+ pMove = 0;
+ rc = btreeGetPage(pBt, maxRootPgno, &pMove, 0);
+ freePage(pMove, &rc);
+ releasePage(pMove);
+ if( rc!=SQLITE_OK ){
+ return rc;
+ }
+ *piMoved = maxRootPgno;
}
-#endif
- }else{
- /* If sqlite3BtreeDropTable was called on page 1.
- ** This really never should happen except in a corrupt
- ** database.
+
+ /* Set the new 'max-root-page' value in the database header. This
+ ** is the old value less one, less one more if that happens to
+ ** be a root-page number, less one again if that is the
+ ** PENDING_BYTE_PAGE.
*/
- zeroPage(pPage, PTF_INTKEY|PTF_LEAF );
+ maxRootPgno--;
+ while( maxRootPgno==PENDING_BYTE_PAGE(pBt)
+ || PTRMAP_ISPAGE(pBt, maxRootPgno) ){
+ maxRootPgno--;
+ }
+ assert( maxRootPgno!=PENDING_BYTE_PAGE(pBt) );
+
+ rc = sqlite3BtreeUpdateMeta(p, 4, maxRootPgno);
+ }else{
+ freePage(pPage, &rc);
releasePage(pPage);
}
+#endif
return rc;
}
SQLITE_PRIVATE int sqlite3BtreeDropTable(Btree *p, int iTable, int *piMoved){
@@ -63845,11 +68639,11 @@ SQLITE_PRIVATE int sqlite3BtreeCount(BtCursor *pCur, i64 *pnEntry){
i64 nEntry = 0; /* Value to return in *pnEntry */
int rc; /* Return code */
- if( pCur->pgnoRoot==0 ){
+ rc = moveToRoot(pCur);
+ if( rc==SQLITE_EMPTY ){
*pnEntry = 0;
return SQLITE_OK;
}
- rc = moveToRoot(pCur);
/* Unless an error occurs, the following loop runs one iteration for each
** page in the B-Tree structure (not including overflow pages).
@@ -63862,7 +68656,7 @@ SQLITE_PRIVATE int sqlite3BtreeCount(BtCursor *pCur, i64 *pnEntry){
** this page contains countable entries. Increment the entry counter
** accordingly.
*/
- pPage = pCur->apPage[pCur->iPage];
+ pPage = pCur->pPage;
if( pPage->leaf || !pPage->intKey ){
nEntry += pPage->nCell;
}
@@ -63885,16 +68679,16 @@ SQLITE_PRIVATE int sqlite3BtreeCount(BtCursor *pCur, i64 *pnEntry){
return moveToRoot(pCur);
}
moveToParent(pCur);
- }while ( pCur->aiIdx[pCur->iPage]>=pCur->apPage[pCur->iPage]->nCell );
+ }while ( pCur->ix>=pCur->pPage->nCell );
- pCur->aiIdx[pCur->iPage]++;
- pPage = pCur->apPage[pCur->iPage];
+ pCur->ix++;
+ pPage = pCur->pPage;
}
/* Descend to the child node of the cell that the cursor currently
** points at. This is the right-child if (iIdx==pPage->nCell).
*/
- iIdx = pCur->aiIdx[pCur->iPage];
+ iIdx = pCur->ix;
if( iIdx==pPage->nCell ){
rc = moveToChild(pCur, get4byte(&pPage->aData[pPage->hdrOffset+8]));
}else{
@@ -63933,9 +68727,9 @@ static void checkAppendMsg(
sqlite3StrAccumAppend(&pCheck->errMsg, "\n", 1);
}
if( pCheck->zPfx ){
- sqlite3XPrintf(&pCheck->errMsg, 0, pCheck->zPfx, pCheck->v1, pCheck->v2);
+ sqlite3XPrintf(&pCheck->errMsg, pCheck->zPfx, pCheck->v1, pCheck->v2);
}
- sqlite3VXPrintf(&pCheck->errMsg, 1, zFormat, ap);
+ sqlite3VXPrintf(&pCheck->errMsg, zFormat, ap);
va_end(ap);
if( pCheck->errMsg.accError==STRACCUM_NOMEM ){
pCheck->mallocFailed = 1;
@@ -64279,6 +69073,7 @@ static int checkTreePage(
checkAppendMsg(pCheck, "Rowid %lld out of order", info.nKey);
}
maxKey = info.nKey;
+ keyCanBeEqual = 0; /* Only the first key on the page may ==maxKey */
}
/* Check the content overflow list */
@@ -64436,7 +69231,8 @@ SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck(
sqlite3BtreeEnter(p);
assert( p->inTrans>TRANS_NONE && pBt->inTransaction>TRANS_NONE );
- assert( (nRef = sqlite3PagerRefcount(pBt->pPager))>=0 );
+ VVA_ONLY( nRef = sqlite3PagerRefcount(pBt->pPager) );
+ assert( nRef>=0 );
sCheck.pBt = pBt;
sCheck.pPager = pBt->pPager;
sCheck.nPage = btreePagecount(sCheck.pBt);
@@ -64449,6 +69245,7 @@ SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck(
sCheck.aPgRef = 0;
sCheck.heap = 0;
sqlite3StrAccumInit(&sCheck.errMsg, 0, zErr, sizeof(zErr), SQLITE_MAX_LENGTH);
+ sCheck.errMsg.printfFlags = SQLITE_PRINTF_INTERNAL;
if( sCheck.nPage==0 ){
goto integrity_ck_cleanup;
}
@@ -64580,7 +69377,7 @@ SQLITE_PRIVATE int sqlite3BtreeCheckpoint(Btree *p, int eMode, int *pnLog, int *
if( pBt->inTransaction!=TRANS_NONE ){
rc = SQLITE_LOCKED;
}else{
- rc = sqlite3PagerCheckpoint(pBt->pPager, eMode, pnLog, pnCkpt);
+ rc = sqlite3PagerCheckpoint(pBt->pPager, p->db, eMode, pnLog, pnCkpt);
}
sqlite3BtreeLeave(p);
}
@@ -64688,7 +69485,7 @@ SQLITE_PRIVATE int sqlite3BtreeLockTable(Btree *p, int iTab, u8 isWriteLock){
*/
SQLITE_PRIVATE int sqlite3BtreePutData(BtCursor *pCsr, u32 offset, u32 amt, void *z){
int rc;
- assert( cursorHoldsMutex(pCsr) );
+ assert( cursorOwnsBtShared(pCsr) );
assert( sqlite3_mutex_held(pCsr->pBtree->db->mutex) );
assert( pCsr->curFlags & BTCF_Incrblob );
@@ -64726,7 +69523,7 @@ SQLITE_PRIVATE int sqlite3BtreePutData(BtCursor *pCsr, u32 offset, u32 amt, void
&& pCsr->pBt->inTransaction==TRANS_WRITE );
assert( hasSharedCacheTableLock(pCsr->pBtree, pCsr->pgnoRoot, 0, 2) );
assert( !hasReadConflicts(pCsr->pBtree, pCsr->pgnoRoot) );
- assert( pCsr->apPage[pCsr->iPage]->intKey );
+ assert( pCsr->pPage->intKey );
return accessPayload(pCsr, offset, amt, (unsigned char *)z, 1);
}
@@ -64796,6 +69593,25 @@ SQLITE_PRIVATE int sqlite3BtreeIsReadonly(Btree *p){
*/
SQLITE_PRIVATE int sqlite3HeaderSizeBtree(void){ return ROUND8(sizeof(MemPage)); }
+#if !defined(SQLITE_OMIT_SHARED_CACHE)
+/*
+** Return true if the Btree passed as the only argument is sharable.
+*/
+SQLITE_PRIVATE int sqlite3BtreeSharable(Btree *p){
+ return p->sharable;
+}
+
+/*
+** Return the number of connections to the BtShared object accessed by
+** the Btree handle passed as the only argument. For private caches
+** this is always 1. For shared caches it may be 1 or greater.
+*/
+SQLITE_PRIVATE int sqlite3BtreeConnectionCount(Btree *p){
+ testcase( p->sharable );
+ return p->pBt->nRef;
+}
+#endif
+
/************** End of btree.c ***********************************************/
/************** Begin file backup.c ******************************************/
/*
@@ -64883,22 +69699,16 @@ static Btree *findBtree(sqlite3 *pErrorDb, sqlite3 *pDb, const char *zDb){
int i = sqlite3FindDbName(pDb, zDb);
if( i==1 ){
- Parse *pParse;
+ Parse sParse;
int rc = 0;
- pParse = sqlite3StackAllocZero(pErrorDb, sizeof(*pParse));
- if( pParse==0 ){
- sqlite3ErrorWithMsg(pErrorDb, SQLITE_NOMEM, "out of memory");
- rc = SQLITE_NOMEM;
- }else{
- pParse->db = pDb;
- if( sqlite3OpenTempDatabase(pParse) ){
- sqlite3ErrorWithMsg(pErrorDb, pParse->rc, "%s", pParse->zErrMsg);
- rc = SQLITE_ERROR;
- }
- sqlite3DbFree(pErrorDb, pParse->zErrMsg);
- sqlite3ParserReset(pParse);
- sqlite3StackFree(pErrorDb, pParse);
+ memset(&sParse, 0, sizeof(sParse));
+ sParse.db = pDb;
+ if( sqlite3OpenTempDatabase(&sParse) ){
+ sqlite3ErrorWithMsg(pErrorDb, sParse.rc, "%s", sParse.zErrMsg);
+ rc = SQLITE_ERROR;
}
+ sqlite3DbFree(pErrorDb, sParse.zErrMsg);
+ sqlite3ParserReset(&sParse);
if( rc ){
return 0;
}
@@ -64944,7 +69754,7 @@ static int checkReadTransaction(sqlite3 *db, Btree *p){
** If an error occurs, NULL is returned and an error code and error message
** stored in database handle pDestDb.
*/
-SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init(
+SQLITE_API sqlite3_backup *sqlite3_backup_init(
sqlite3* pDestDb, /* Database to write to */
const char *zDestDb, /* Name of database within pDestDb */
sqlite3* pSrcDb, /* Database connection to read from */
@@ -64982,7 +69792,7 @@ SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init(
** sqlite3_backup_finish(). */
p = (sqlite3_backup *)sqlite3MallocZero(sizeof(sqlite3_backup));
if( !p ){
- sqlite3Error(pDestDb, SQLITE_NOMEM);
+ sqlite3Error(pDestDb, SQLITE_NOMEM_BKPT);
}
}
@@ -64996,7 +69806,6 @@ SQLITE_API sqlite3_backup *SQLITE_STDCALL sqlite3_backup_init(
p->isAttached = 0;
if( 0==p->pSrc || 0==p->pDest
- || setDestPgsz(p)==SQLITE_NOMEM
|| checkReadTransaction(pDestDb, p->pDest)!=SQLITE_OK
){
/* One (or both) of the named databases did not exist or an OOM
@@ -65152,7 +69961,7 @@ static void attachBackupObject(sqlite3_backup *p){
/*
** Copy nPage pages from the source b-tree to the destination.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage){
+SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage){
int rc;
int destMode; /* Destination journal mode */
int pgszSrc = 0; /* Source page size */
@@ -65184,14 +69993,6 @@ SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage){
rc = SQLITE_OK;
}
- /* Lock the destination database, if it is not locked already. */
- if( SQLITE_OK==rc && p->bDestLocked==0
- && SQLITE_OK==(rc = sqlite3BtreeBeginTrans(p->pDest, 2))
- ){
- p->bDestLocked = 1;
- sqlite3BtreeGetMeta(p->pDest, BTREE_SCHEMA_VERSION, &p->iDestSchema);
- }
-
/* If there is no open read-transaction on the source database, open
** one now. If a transaction is opened here, then it will be closed
** before this function exits.
@@ -65201,6 +70002,24 @@ SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage){
bCloseTrans = 1;
}
+ /* If the destination database has not yet been locked (i.e. if this
+ ** is the first call to backup_step() for the current backup operation),
+ ** try to set its page size to the same as the source database. This
+ ** is especially important on ZipVFS systems, as in that case it is
+ ** not possible to create a database file that uses one page size by
+ ** writing to it with another. */
+ if( p->bDestLocked==0 && rc==SQLITE_OK && setDestPgsz(p)==SQLITE_NOMEM ){
+ rc = SQLITE_NOMEM;
+ }
+
+ /* Lock the destination database, if it is not locked already. */
+ if( SQLITE_OK==rc && p->bDestLocked==0
+ && SQLITE_OK==(rc = sqlite3BtreeBeginTrans(p->pDest, 2))
+ ){
+ p->bDestLocked = 1;
+ sqlite3BtreeGetMeta(p->pDest, BTREE_SCHEMA_VERSION, &p->iDestSchema);
+ }
+
/* Do not allow backup if the destination database is in WAL mode
** and the page sizes are different between source and destination */
pgszSrc = sqlite3BtreeGetPageSize(p->pSrc);
@@ -65381,7 +70200,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage){
}
if( rc==SQLITE_IOERR_NOMEM ){
- rc = SQLITE_NOMEM;
+ rc = SQLITE_NOMEM_BKPT;
}
p->rc = rc;
}
@@ -65396,7 +70215,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_backup_step(sqlite3_backup *p, int nPage){
/*
** Release all resources associated with an sqlite3_backup* handle.
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p){
+SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p){
sqlite3_backup **pp; /* Ptr to head of pagers backup list */
sqlite3 *pSrcDb; /* Source database connection */
int rc; /* Value to return */
@@ -65448,7 +70267,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_backup_finish(sqlite3_backup *p){
** Return the number of pages still to be backed up as of the most recent
** call to sqlite3_backup_step().
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p){
+SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p){
#ifdef SQLITE_ENABLE_API_ARMOR
if( p==0 ){
(void)SQLITE_MISUSE_BKPT;
@@ -65462,7 +70281,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_backup_remaining(sqlite3_backup *p){
** Return the total number of pages in the source database as of the most
** recent call to sqlite3_backup_step().
*/
-SQLITE_API int SQLITE_STDCALL sqlite3_backup_pagecount(sqlite3_backup *p){
+SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p){
#ifdef SQLITE_ENABLE_API_ARMOR
if( p==0 ){
(void)SQLITE_MISUSE_BKPT;
@@ -65577,10 +70396,10 @@ SQLITE_PRIVATE int sqlite3BtreeCopyFile(Btree *pTo, Btree *pFrom){
** sqlite3_backup_step(), we can guarantee that the copy finishes
** within a single call (unless an error occurs). The assert() statement
** checks this assumption - (p->rc) should be set to either SQLITE_DONE
- ** or an error code.
- */
+ ** or an error code. */
sqlite3_backup_step(&b, 0x7FFFFFFF);
assert( b.rc!=SQLITE_OK );
+
rc = sqlite3_backup_finish(&b);
if( rc==SQLITE_OK ){
pTo->pBt->btsFlags &= ~BTS_PAGESIZE_FIXED;
@@ -65627,7 +70446,7 @@ copy_finished:
*/
SQLITE_PRIVATE int sqlite3VdbeCheckMemInvariants(Mem *p){
/* If MEM_Dyn is set then Mem.xDel!=0.
- ** Mem.xDel is might not be initialized if MEM_Dyn is clear.
+ ** Mem.xDel might not be initialized if MEM_Dyn is clear.
*/
assert( (p->flags & MEM_Dyn)==0 || p->xDel!=0 );
@@ -65640,6 +70459,35 @@ SQLITE_PRIVATE int sqlite3VdbeCheckMemInvariants(Mem *p){
/* Cannot be both MEM_Int and MEM_Real at the same time */
assert( (p->flags & (MEM_Int|MEM_Real))!=(MEM_Int|MEM_Real) );
+ if( p->flags & MEM_Null ){
+ /* Cannot be both MEM_Null and some other type */
+ assert( (p->flags & (MEM_Int|MEM_Real|MEM_Str|MEM_Blob
+ |MEM_RowSet|MEM_Frame|MEM_Agg|MEM_Zero))==0 );
+
+ /* If MEM_Null is set, then either the value is a pure NULL (the usual
+ ** case) or it is a pointer set using sqlite3_bind_pointer() or
+ ** sqlite3_result_pointer(). If a pointer, then MEM_Term must also be
+ ** set.
+ */
+ if( (p->flags & (MEM_Term|MEM_Subtype))==(MEM_Term|MEM_Subtype) ){
+ /* This is a pointer type. There may be a flag to indicate what to
+ ** do with the pointer. */
+ assert( ((p->flags&MEM_Dyn)!=0 ? 1 : 0) +
+ ((p->flags&MEM_Ephem)!=0 ? 1 : 0) +
+ ((p->flags&MEM_Static)!=0 ? 1 : 0) <= 1 );
+
+ /* No other bits set */
+ assert( (p->flags & ~(MEM_Null|MEM_Term|MEM_Subtype
+ |MEM_Dyn|MEM_Ephem|MEM_Static))==0 );
+ }else{
+ /* A pure NULL might have other flags, such as MEM_Static, MEM_Dyn,
+ ** MEM_Ephem, MEM_Cleared, or MEM_Subtype */
+ }
+ }else{
+ /* The MEM_Cleared bit is only allowed on NULLs */
+ assert( (p->flags & MEM_Cleared)==0 );
+ }
+
/* The szMalloc field holds the correct memory allocation size */
assert( p->szMalloc==0
|| p->szMalloc==sqlite3DbMallocSize(p->db,p->zMalloc) );
@@ -65716,6 +70564,7 @@ SQLITE_PRIVATE int sqlite3VdbeChangeEncoding(Mem *pMem, int desiredEnc){
SQLITE_PRIVATE SQLITE_NOINLINE int sqlite3VdbeMemGrow(Mem *pMem, int n, int bPreserve){
assert( sqlite3VdbeCheckMemInvariants(pMem) );
assert( (pMem->flags&MEM_RowSet)==0 );
+ testcase( pMem->db==0 );
/* If the bPreserve flag is set to true, then the memory cell must already
** contain a valid string or blob value. */
@@ -65724,26 +70573,25 @@ SQLITE_PRIVATE SQLITE_NOINLINE int sqlite3VdbeMemGrow(Mem *pMem, int n, int bPre
assert( pMem->szMalloc==0
|| pMem->szMalloc==sqlite3DbMallocSize(pMem->db, pMem->zMalloc) );
- if( pMem->szMallocszMalloc>0 && pMem->z==pMem->zMalloc ){
- pMem->z = pMem->zMalloc = sqlite3DbReallocOrFree(pMem->db, pMem->z, n);
- bPreserve = 0;
- }else{
- if( pMem->szMalloc>0 ) sqlite3DbFree(pMem->db, pMem->zMalloc);
- pMem->zMalloc = sqlite3DbMallocRaw(pMem->db, n);
- }
- if( pMem->zMalloc==0 ){
- sqlite3VdbeMemSetNull(pMem);
- pMem->z = 0;
- pMem->szMalloc = 0;
- return SQLITE_NOMEM;
- }else{
- pMem->szMalloc = sqlite3DbMallocSize(pMem->db, pMem->zMalloc);
- }
+ if( n<32 ) n = 32;
+ if( pMem->szMalloc>0 && bPreserve && pMem->z==pMem->zMalloc ){
+ pMem->z = pMem->zMalloc = sqlite3DbReallocOrFree(pMem->db, pMem->z, n);
+ bPreserve = 0;
+ }else{
+ if( pMem->szMalloc>0 ) sqlite3DbFreeNN(pMem->db, pMem->zMalloc);
+ pMem->zMalloc = sqlite3DbMallocRaw(pMem->db, n);
+ }
+ if( pMem->zMalloc==0 ){
+ sqlite3VdbeMemSetNull(pMem);
+ pMem->z = 0;
+ pMem->szMalloc = 0;
+ return SQLITE_NOMEM_BKPT;
+ }else{
+ pMem->szMalloc = sqlite3DbMallocSize(pMem->db, pMem->zMalloc);
}
- if( bPreserve && pMem->z && pMem->z!=pMem->zMalloc ){
+ if( bPreserve && pMem->z ){
+ assert( pMem->z!=pMem->zMalloc );
memcpy(pMem->zMalloc, pMem->z, pMem->n);
}
if( (pMem->flags&MEM_Dyn)!=0 ){
@@ -65781,6 +70629,20 @@ SQLITE_PRIVATE int sqlite3VdbeMemClearAndResize(Mem *pMem, int szNew){
return SQLITE_OK;
}
+/*
+** It is already known that pMem contains an unterminated string.
+** Add the zero terminator.
+*/
+static SQLITE_NOINLINE int vdbeMemAddTerminator(Mem *pMem){
+ if( sqlite3VdbeMemGrow(pMem, pMem->n+2, 1) ){
+ return SQLITE_NOMEM_BKPT;
+ }
+ pMem->z[pMem->n] = 0;
+ pMem->z[pMem->n+1] = 0;
+ pMem->flags |= MEM_Term;
+ return SQLITE_OK;
+}
+
/*
** Change pMem so that its MEM_Str or MEM_Blob value is stored in
** MEM.zMalloc, where it can be safely written.
@@ -65788,18 +70650,14 @@ SQLITE_PRIVATE int sqlite3VdbeMemClearAndResize(Mem *pMem, int szNew){
** Return SQLITE_OK on success or SQLITE_NOMEM if malloc fails.
*/
SQLITE_PRIVATE int sqlite3VdbeMemMakeWriteable(Mem *pMem){
- int f;
assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
assert( (pMem->flags&MEM_RowSet)==0 );
- ExpandBlob(pMem);
- f = pMem->flags;
- if( (f&(MEM_Str|MEM_Blob)) && (pMem->szMalloc==0 || pMem->z!=pMem->zMalloc) ){
- if( sqlite3VdbeMemGrow(pMem, pMem->n + 2, 1) ){
- return SQLITE_NOMEM;
+ if( (pMem->flags & (MEM_Str|MEM_Blob))!=0 ){
+ if( ExpandBlob(pMem) ) return SQLITE_NOMEM;
+ if( pMem->szMalloc==0 || pMem->z!=pMem->zMalloc ){
+ int rc = vdbeMemAddTerminator(pMem);
+ if( rc ) return rc;
}
- pMem->z[pMem->n] = 0;
- pMem->z[pMem->n+1] = 0;
- pMem->flags |= MEM_Term;
}
pMem->flags &= ~MEM_Ephem;
#ifdef SQLITE_DEBUG
@@ -65815,43 +70673,28 @@ SQLITE_PRIVATE int sqlite3VdbeMemMakeWriteable(Mem *pMem){
*/
#ifndef SQLITE_OMIT_INCRBLOB
SQLITE_PRIVATE int sqlite3VdbeMemExpandBlob(Mem *pMem){
- if( pMem->flags & MEM_Zero ){
- int nByte;
- assert( pMem->flags&MEM_Blob );
- assert( (pMem->flags&MEM_RowSet)==0 );
- assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
+ int nByte;
+ assert( pMem->flags & MEM_Zero );
+ assert( pMem->flags&MEM_Blob );
+ assert( (pMem->flags&MEM_RowSet)==0 );
+ assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
- /* Set nByte to the number of bytes required to store the expanded blob. */
- nByte = pMem->n + pMem->u.nZero;
- if( nByte<=0 ){
- nByte = 1;
- }
- if( sqlite3VdbeMemGrow(pMem, nByte, 1) ){
- return SQLITE_NOMEM;
- }
-
- memset(&pMem->z[pMem->n], 0, pMem->u.nZero);
- pMem->n += pMem->u.nZero;
- pMem->flags &= ~(MEM_Zero|MEM_Term);
+ /* Set nByte to the number of bytes required to store the expanded blob. */
+ nByte = pMem->n + pMem->u.nZero;
+ if( nByte<=0 ){
+ nByte = 1;
}
+ if( sqlite3VdbeMemGrow(pMem, nByte, 1) ){
+ return SQLITE_NOMEM_BKPT;
+ }
+
+ memset(&pMem->z[pMem->n], 0, pMem->u.nZero);
+ pMem->n += pMem->u.nZero;
+ pMem->flags &= ~(MEM_Zero|MEM_Term);
return SQLITE_OK;
}
#endif
-/*
-** It is already known that pMem contains an unterminated string.
-** Add the zero terminator.
-*/
-static SQLITE_NOINLINE int vdbeMemAddTerminator(Mem *pMem){
- if( sqlite3VdbeMemGrow(pMem, pMem->n+2, 1) ){
- return SQLITE_NOMEM;
- }
- pMem->z[pMem->n] = 0;
- pMem->z[pMem->n+1] = 0;
- pMem->flags |= MEM_Term;
- return SQLITE_OK;
-}
-
/*
** Make sure the given Mem is \u0000 terminated.
*/
@@ -65893,7 +70736,8 @@ SQLITE_PRIVATE int sqlite3VdbeMemStringify(Mem *pMem, u8 enc, u8 bForce){
if( sqlite3VdbeMemClearAndResize(pMem, nByte) ){
- return SQLITE_NOMEM;
+ pMem->enc = 0;
+ return SQLITE_NOMEM_BKPT;
}
/* For a Real or Integer, use sqlite3_snprintf() to produce the UTF-8
@@ -65940,7 +70784,7 @@ SQLITE_PRIVATE int sqlite3VdbeMemFinalize(Mem *pMem, FuncDef *pFunc){
ctx.pFunc = pFunc;
pFunc->xFinalize(&ctx); /* IMP: R-24505-23230 */
assert( (pMem->flags & MEM_Dyn)==0 );
- if( pMem->szMalloc>0 ) sqlite3DbFree(pMem->db, pMem->zMalloc);
+ if( pMem->szMalloc>0 ) sqlite3DbFreeNN(pMem->db, pMem->zMalloc);
memcpy(pMem, &t, sizeof(t));
rc = ctx.isError;
}
@@ -65991,7 +70835,7 @@ static SQLITE_NOINLINE void vdbeMemClear(Mem *p){
vdbeMemClearExternAndSetNull(p);
}
if( p->szMalloc ){
- sqlite3DbFree(p->db, p->zMalloc);
+ sqlite3DbFreeNN(p->db, p->zMalloc);
p->szMalloc = 0;
}
p->z = 0;
@@ -66019,7 +70863,7 @@ SQLITE_PRIVATE void sqlite3VdbeMemRelease(Mem *p){
** If the double is out of range of a 64-bit signed integer then
** return the closest available 64-bit signed integer.
*/
-static i64 doubleToInt64(double r){
+static SQLITE_NOINLINE i64 doubleToInt64(double r){
#ifdef SQLITE_OMIT_FLOATING_POINT
/* When floating-point is omitted, double and int64 are the same thing */
return r;
@@ -66055,6 +70899,11 @@ static i64 doubleToInt64(double r){
**
** If pMem represents a string value, its encoding might be changed.
*/
+static SQLITE_NOINLINE i64 memIntValue(Mem *pMem){
+ i64 value = 0;
+ sqlite3Atoi64(pMem->z, &value, pMem->n, pMem->enc);
+ return value;
+}
SQLITE_PRIVATE i64 sqlite3VdbeIntValue(Mem *pMem){
int flags;
assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
@@ -66065,10 +70914,8 @@ SQLITE_PRIVATE i64 sqlite3VdbeIntValue(Mem *pMem){
}else if( flags & MEM_Real ){
return doubleToInt64(pMem->u.r);
}else if( flags & (MEM_Str|MEM_Blob) ){
- i64 value = 0;
assert( pMem->z || pMem->n==0 );
- sqlite3Atoi64(pMem->z, &value, pMem->n, pMem->enc);
- return value;
+ return memIntValue(pMem);
}else{
return 0;
}
@@ -66080,6 +70927,12 @@ SQLITE_PRIVATE i64 sqlite3VdbeIntValue(Mem *pMem){
** value. If it is a string or blob, try to convert it to a double.
** If it is a NULL, return 0.0.
*/
+static SQLITE_NOINLINE double memRealValue(Mem *pMem){
+ /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */
+ double val = (double)0;
+ sqlite3AtoF(pMem->z, &val, pMem->n, pMem->enc);
+ return val;
+}
SQLITE_PRIVATE double sqlite3VdbeRealValue(Mem *pMem){
assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
assert( EIGHT_BYTE_ALIGNMENT(pMem) );
@@ -66088,10 +70941,7 @@ SQLITE_PRIVATE double sqlite3VdbeRealValue(Mem *pMem){
}else if( pMem->flags & MEM_Int ){
return (double)pMem->u.i;
}else if( pMem->flags & (MEM_Str|MEM_Blob) ){
- /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */
- double val = (double)0;
- sqlite3AtoF(pMem->z, &val, pMem->n, pMem->enc);
- return val;
+ return memRealValue(pMem);
}else{
/* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */
return (double)0;
@@ -66163,18 +71013,25 @@ SQLITE_PRIVATE int sqlite3VdbeMemRealify(Mem *pMem){
*/
SQLITE_PRIVATE int sqlite3VdbeMemNumerify(Mem *pMem){
if( (pMem->flags & (MEM_Int|MEM_Real|MEM_Null))==0 ){
+ int rc;
assert( (pMem->flags & (MEM_Blob|MEM_Str))!=0 );
assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
- if( 0==sqlite3Atoi64(pMem->z, &pMem->u.i, pMem->n, pMem->enc) ){
+ rc = sqlite3Atoi64(pMem->z, &pMem->u.i, pMem->n, pMem->enc);
+ if( rc==0 ){
MemSetTypeFlag(pMem, MEM_Int);
}else{
- pMem->u.r = sqlite3VdbeRealValue(pMem);
- MemSetTypeFlag(pMem, MEM_Real);
- sqlite3VdbeIntegerAffinity(pMem);
+ i64 i = pMem->u.i;
+ sqlite3AtoF(pMem->z, &pMem->u.r, pMem->n, pMem->enc);
+ if( rc==1 && pMem->u.r==(double)i ){
+ pMem->u.i = i;
+ MemSetTypeFlag(pMem, MEM_Int);
+ }else{
+ MemSetTypeFlag(pMem, MEM_Real);
+ }
}
}
assert( (pMem->flags & (MEM_Int|MEM_Real|MEM_Null))!=0 );
- pMem->flags &= ~(MEM_Str|MEM_Blob);
+ pMem->flags &= ~(MEM_Str|MEM_Blob|MEM_Zero);
return SQLITE_OK;
}
@@ -66192,7 +71049,7 @@ SQLITE_PRIVATE void sqlite3VdbeMemCast(Mem *pMem, u8 aff, u8 encoding){
if( (pMem->flags & MEM_Blob)==0 ){
sqlite3ValueApplyAffinity(pMem, SQLITE_AFF_TEXT, encoding);
assert( pMem->flags & MEM_Str || pMem->db->mallocFailed );
- MemSetTypeFlag(pMem, MEM_Blob);
+ if( pMem->flags & MEM_Str ) MemSetTypeFlag(pMem, MEM_Blob);
}else{
pMem->flags &= ~(MEM_TypeMask&~MEM_Blob);
}
@@ -66296,6 +71153,27 @@ SQLITE_PRIVATE void sqlite3VdbeMemSetInt64(Mem *pMem, i64 val){
}
}
+/* A no-op destructor */
+static void sqlite3NoopDestructor(void *p){ UNUSED_PARAMETER(p); }
+
+/*
+** Set the value stored in *pMem should already be a NULL.
+** Also store a pointer to go with it.
+*/
+SQLITE_PRIVATE void sqlite3VdbeMemSetPointer(
+ Mem *pMem,
+ void *pPtr,
+ const char *zPType,
+ void (*xDestructor)(void*)
+){
+ assert( pMem->flags==MEM_Null );
+ pMem->u.zPType = zPType ? zPType : "";
+ pMem->z = pPtr;
+ pMem->flags = MEM_Null|MEM_Dyn|MEM_Subtype|MEM_Term;
+ pMem->eSubtype = 'p';
+ pMem->xDel = xDestructor ? xDestructor : sqlite3NoopDestructor;
+}
+
#ifndef SQLITE_OMIT_FLOATING_POINT
/*
** Delete any previous value and set the value stored in *pMem to val,
@@ -66319,7 +71197,7 @@ SQLITE_PRIVATE void sqlite3VdbeMemSetRowSet(Mem *pMem){
assert( db!=0 );
assert( (pMem->flags & MEM_RowSet)==0 );
sqlite3VdbeMemRelease(pMem);
- pMem->zMalloc = sqlite3DbMallocRaw(db, 64);
+ pMem->zMalloc = sqlite3DbMallocRawNN(db, 64);
if( db->mallocFailed ){
pMem->flags = MEM_Null;
pMem->szMalloc = 0;
@@ -66360,7 +71238,7 @@ SQLITE_PRIVATE int sqlite3VdbeMemTooBig(Mem *p){
SQLITE_PRIVATE void sqlite3VdbeMemAboutToChange(Vdbe *pVdbe, Mem *pMem){
int i;
Mem *pX;
- for(i=1, pX=&pVdbe->aMem[1]; i<=pVdbe->nMem; i++, pX++){
+ for(i=0, pX=pVdbe->aMem; inMem; i++, pX++){
if( pX->pScopyFrom==pMem ){
pX->flags |= MEM_Undefined;
pX->pScopyFrom = 0;
@@ -66401,10 +71279,6 @@ SQLITE_PRIVATE void sqlite3VdbeMemShallowCopy(Mem *pTo, const Mem *pFrom, int sr
SQLITE_PRIVATE int sqlite3VdbeMemCopy(Mem *pTo, const Mem *pFrom){
int rc = SQLITE_OK;
- /* The pFrom==0 case in the following assert() is when an sqlite3_value
- ** from sqlite3_value_dup() is used as the argument
- ** to sqlite3_result_value(). */
- assert( pTo->db==pFrom->db || pFrom->db==0 );
assert( (pFrom->flags & MEM_RowSet)==0 );
if( VdbeMemDynamic(pTo) ) vdbeMemClearExternAndSetNull(pTo);
memcpy(pTo, pFrom, MEMCELLSIZE);
@@ -66480,7 +71354,7 @@ SQLITE_PRIVATE int sqlite3VdbeMemSetStr(
if( nByte<0 ){
assert( enc!=0 );
if( enc==SQLITE_UTF8 ){
- nByte = sqlite3Strlen30(z);
+ nByte = 0x7fffffff & (int)strlen(z);
if( nByte>iLimit ) nByte = iLimit+1;
}else{
for(nByte=0; nByte<=iLimit && (z[nByte] | z[nByte+1]); nByte+=2){}
@@ -66504,7 +71378,7 @@ SQLITE_PRIVATE int sqlite3VdbeMemSetStr(
testcase( nAlloc==31 );
testcase( nAlloc==32 );
if( sqlite3VdbeMemClearAndResize(pMem, MAX(nAlloc,32)) ){
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
memcpy(pMem->z, z, nAlloc);
}else if( xDel==SQLITE_DYNAMIC ){
@@ -66524,7 +71398,7 @@ SQLITE_PRIVATE int sqlite3VdbeMemSetStr(
#ifndef SQLITE_OMIT_UTF16
if( pMem->enc!=SQLITE_UTF8 && sqlite3VdbeMemHandleBom(pMem) ){
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
#endif
@@ -66537,10 +71411,9 @@ SQLITE_PRIVATE int sqlite3VdbeMemSetStr(
/*
** Move data out of a btree key or data field and into a Mem structure.
-** The data or key is taken from the entry that pCur is currently pointing
+** The data is payload from the entry that pCur is currently pointing
** to. offset and amt determine what portion of the data or key to retrieve.
-** key is true to get the key or false to get data. The result is written
-** into the pMem element.
+** The result is written into the pMem element.
**
** The pMem object must have been initialized. This routine will use
** pMem->zMalloc to hold the content from the btree, if possible. New
@@ -66555,21 +71428,15 @@ static SQLITE_NOINLINE int vdbeMemFromBtreeResize(
BtCursor *pCur, /* Cursor pointing at record to retrieve. */
u32 offset, /* Offset from the start of data to return bytes from. */
u32 amt, /* Number of bytes to return. */
- int key, /* If true, retrieve from the btree key, not data. */
Mem *pMem /* OUT: Return data in this Mem structure. */
){
int rc;
pMem->flags = MEM_Null;
- if( SQLITE_OK==(rc = sqlite3VdbeMemClearAndResize(pMem, amt+2)) ){
- if( key ){
- rc = sqlite3BtreeKey(pCur, offset, amt, pMem->z);
- }else{
- rc = sqlite3BtreeData(pCur, offset, amt, pMem->z);
- }
+ if( SQLITE_OK==(rc = sqlite3VdbeMemClearAndResize(pMem, amt+1)) ){
+ rc = sqlite3BtreePayload(pCur, offset, amt, pMem->z);
if( rc==SQLITE_OK ){
- pMem->z[amt] = 0;
- pMem->z[amt+1] = 0;
- pMem->flags = MEM_Blob|MEM_Term;
+ pMem->z[amt] = 0; /* Overrun area used when reading malformed records */
+ pMem->flags = MEM_Blob;
pMem->n = (int)amt;
}else{
sqlite3VdbeMemRelease(pMem);
@@ -66581,7 +71448,6 @@ SQLITE_PRIVATE int sqlite3VdbeMemFromBtree(
BtCursor *pCur, /* Cursor pointing at record to retrieve. */
u32 offset, /* Offset from the start of data to return bytes from. */
u32 amt, /* Number of bytes to return. */
- int key, /* If true, retrieve from the btree key, not data. */
Mem *pMem /* OUT: Return data in this Mem structure. */
){
char *zData; /* Data from the btree layer */
@@ -66594,11 +71460,7 @@ SQLITE_PRIVATE int sqlite3VdbeMemFromBtree(
/* Note: the calls to BtreeKeyFetch() and DataFetch() below assert()
** that both the BtShared and database handle mutexes are held. */
assert( (pMem->flags & MEM_RowSet)==0 );
- if( key ){
- zData = (char *)sqlite3BtreeKeyFetch(pCur, &available);
- }else{
- zData = (char *)sqlite3BtreeDataFetch(pCur, &available);
- }
+ zData = (char *)sqlite3BtreePayloadFetch(pCur, &available);
assert( zData!=0 );
if( offset+amt<=available ){
@@ -66606,7 +71468,7 @@ SQLITE_PRIVATE int sqlite3VdbeMemFromBtree(
pMem->flags = MEM_Blob|MEM_Ephem;
pMem->n = (int)amt;
}else{
- rc = vdbeMemFromBtreeResize(pCur, offset, amt, key, pMem);
+ rc = vdbeMemFromBtreeResize(pCur, offset, amt, pMem);
}
return rc;
@@ -66624,10 +71486,8 @@ static SQLITE_NOINLINE const void *valueToText(sqlite3_value* pVal, u8 enc){
assert( (pVal->flags & MEM_RowSet)==0 );
assert( (pVal->flags & (MEM_Null))==0 );
if( pVal->flags & (MEM_Blob|MEM_Str) ){
+ if( ExpandBlob(pVal) ) return 0;
pVal->flags |= MEM_Str;
- if( pVal->flags & MEM_Zero ){
- sqlite3VdbeMemExpandBlob(pVal);
- }
if( pVal->enc != (enc & ~SQLITE_UTF16_ALIGNED) ){
sqlite3VdbeChangeEncoding(pVal, enc & ~SQLITE_UTF16_ALIGNED);
}
@@ -66725,7 +71585,7 @@ static sqlite3_value *valueNew(sqlite3 *db, struct ValueNewStat4Ctx *p){
if( pRec ){
pRec->pKeyInfo = sqlite3KeyInfoOfIndex(p->pParse, pIdx);
if( pRec->pKeyInfo ){
- assert( pRec->pKeyInfo->nField+pRec->pKeyInfo->nXField==nCol );
+ assert( pRec->pKeyInfo->nAllField==nCol );
assert( pRec->pKeyInfo->enc==ENC(db) );
pRec->aMem = (Mem *)((u8*)pRec + ROUND8(sizeof(UnpackedRecord)));
for(i=0; iaMem[i].db = db;
}
}else{
- sqlite3DbFree(db, pRec);
+ sqlite3DbFreeNN(db, pRec);
pRec = 0;
}
}
@@ -66785,7 +71645,6 @@ static int valueFromFunction(
FuncDef *pFunc = 0; /* Function definition */
sqlite3_value *pVal = 0; /* New value */
int rc = SQLITE_OK; /* Return code */
- int nName; /* Size of function name in bytes */
ExprList *pList = 0; /* Function arguments */
int i; /* Iterator variable */
@@ -66793,8 +71652,7 @@ static int valueFromFunction(
assert( (p->flags & EP_TokenOnly)==0 );
pList = p->x.pList;
if( pList ) nVal = pList->nExpr;
- nName = sqlite3Strlen30(p->u.zToken);
- pFunc = sqlite3FindFunction(db, p->u.zToken, nName, nVal, enc, 0);
+ pFunc = sqlite3FindFunction(db, p->u.zToken, nVal, enc, 0);
assert( pFunc );
if( (pFunc->funcFlags & (SQLITE_FUNC_CONSTANT|SQLITE_FUNC_SLOCHNG))==0
|| (pFunc->funcFlags & SQLITE_FUNC_NEEDCOLL)
@@ -66805,7 +71663,7 @@ static int valueFromFunction(
if( pList ){
apVal = (sqlite3_value**)sqlite3DbMallocZero(db, sizeof(apVal[0]) * nVal);
if( apVal==0 ){
- rc = SQLITE_NOMEM;
+ rc = SQLITE_NOMEM_BKPT;
goto value_from_function_out;
}
for(i=0; ixFunc(&ctx, nVal, apVal);
+ pFunc->xSFunc(&ctx, nVal, apVal);
if( ctx.isError ){
rc = ctx.isError;
sqlite3ErrorMsg(pCtx->pParse, "%s", sqlite3_value_text(pVal));
@@ -66847,7 +71705,7 @@ static int valueFromFunction(
for(i=0; iop)==TK_UPLUS ) pExpr = pExpr->pLeft;
+ assert( pExpr!=0 );
+ while( (op = pExpr->op)==TK_UPLUS || op==TK_SPAN ) pExpr = pExpr->pLeft;
if( NEVER(op==TK_REGISTER) ) op = pExpr->op2;
/* Compressed expressions only appear when parsing the DEFAULT clause
@@ -66938,7 +71793,7 @@ static int valueFromExpr(
}
}else if( op==TK_UMINUS ) {
/* This branch happens for multiple negative signs. Ex: -(-5) */
- if( SQLITE_OK==sqlite3ValueFromExpr(db,pExpr->pLeft,enc,affinity,&pVal)
+ if( SQLITE_OK==valueFromExpr(db,pExpr->pLeft,enc,affinity,&pVal,pCtx)
&& pVal!=0
){
sqlite3VdbeMemNumerify(pVal);
@@ -66955,6 +71810,7 @@ static int valueFromExpr(
}else if( op==TK_NULL ){
pVal = valueNew(db, pCtx);
if( pVal==0 ) goto no_mem;
+ sqlite3VdbeMemNumerify(pVal);
}
#ifndef SQLITE_OMIT_BLOB_LITERAL
else if( op==TK_BLOB ){
@@ -66981,7 +71837,7 @@ static int valueFromExpr(
return rc;
no_mem:
- db->mallocFailed = 1;
+ sqlite3OomFault(db);
sqlite3DbFree(db, zVal);
assert( *ppVal==0 );
#ifdef SQLITE_ENABLE_STAT3_OR_STAT4
@@ -66989,7 +71845,7 @@ no_mem:
#else
assert( pCtx==0 ); sqlite3ValueFree(pVal);
#endif
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
/*
@@ -67009,7 +71865,7 @@ SQLITE_PRIVATE int sqlite3ValueFromExpr(
u8 affinity, /* Affinity to use */
sqlite3_value **ppVal /* Write the new value here */
){
- return valueFromExpr(db, pExpr, enc, affinity, ppVal, 0);
+ return pExpr ? valueFromExpr(db, pExpr, enc, affinity, ppVal, 0) : 0;
}
#ifdef SQLITE_ENABLE_STAT3_OR_STAT4
@@ -67040,7 +71896,7 @@ static void recordFunc(
db = sqlite3_context_db_handle(context);
nRet = 1 + nSerial + nVal;
- aRet = sqlite3DbMallocRaw(db, nRet);
+ aRet = sqlite3DbMallocRawNN(db, nRet);
if( aRet==0 ){
sqlite3_result_error_nomem(context);
}else{
@@ -67048,7 +71904,7 @@ static void recordFunc(
putVarint32(&aRet[1], iSerial);
sqlite3VdbeSerialPut(&aRet[1+nSerial], argv[0], iSerial);
sqlite3_result_blob(context, aRet, nRet, SQLITE_TRANSIENT);
- sqlite3DbFree(db, aRet);
+ sqlite3DbFreeNN(db, aRet);
}
}
@@ -67056,15 +71912,10 @@ static void recordFunc(
** Register built-in functions used to help read ANALYZE data.
*/
SQLITE_PRIVATE void sqlite3AnalyzeFunctions(void){
- static SQLITE_WSD FuncDef aAnalyzeTableFuncs[] = {
+ static FuncDef aAnalyzeTableFuncs[] = {
FUNCTION(sqlite_record, 1, 0, 0, recordFunc),
};
- int i;
- FuncDefHash *pHash = &GLOBAL(FuncDefHash, sqlite3GlobalFunctions);
- FuncDef *aFunc = (FuncDef*)&GLOBAL(FuncDef, aAnalyzeTableFuncs);
- for(i=0; iop!=TK_REGISTER || pExpr->op2!=TK_VARIABLE );
if( !pExpr ){
pVal = valueNew(db, pAlloc);
if( pVal ){
sqlite3VdbeMemSetNull((Mem*)pVal);
}
- }else if( pExpr->op==TK_VARIABLE
- || NEVER(pExpr->op==TK_REGISTER && pExpr->op2==TK_VARIABLE)
- ){
+ }else if( pExpr->op==TK_VARIABLE && (db->flags & SQLITE_EnableQPSG)==0 ){
Vdbe *v;
int iBindVar = pExpr->iColumn;
sqlite3VdbeSetVarmask(pParse->pVdbe, iBindVar);
@@ -67114,9 +71964,7 @@ static int stat4ValueFromExpr(
pVal = valueNew(db, pAlloc);
if( pVal ){
rc = sqlite3VdbeMemCopy((Mem*)pVal, &v->aVar[iBindVar-1]);
- if( rc==SQLITE_OK ){
- sqlite3ValueApplyAffinity(pVal, affinity, ENC(db));
- }
+ sqlite3ValueApplyAffinity(pVal, affinity, ENC(db));
pVal->db = pParse->db;
}
}
@@ -67134,9 +71982,9 @@ static int stat4ValueFromExpr(
** structures intended to be compared against sample index keys stored
** in the sqlite_stat4 table.
**
-** A single call to this function attempts to populates field iVal (leftmost
-** is 0 etc.) of the unpacked record with a value extracted from expression
-** pExpr. Extraction of values is possible if:
+** A single call to this function populates zero or more fields of the
+** record starting with field iVal (fields are numbered from left to
+** right starting with 0). A single field is populated if:
**
** * (pExpr==0). In this case the value is assumed to be an SQL NULL,
**
@@ -67145,10 +71993,14 @@ static int stat4ValueFromExpr(
** * The sqlite3ValueFromExpr() function is able to extract a value
** from the expression (i.e. the expression is a literal value).
**
-** If a value can be extracted, the affinity passed as the 5th argument
-** is applied to it before it is copied into the UnpackedRecord. Output
-** parameter *pbOk is set to true if a value is extracted, or false
-** otherwise.
+** Or, if pExpr is a TK_VECTOR, one field is populated for each of the
+** vector components that match either of the two latter criteria listed
+** above.
+**
+** Before any value is appended to the record, the affinity of the
+** corresponding column within index pIdx is applied to it. Before
+** this function returns, output parameter *pnExtract is set to the
+** number of values appended to the record.
**
** When this function is called, *ppRec must either point to an object
** allocated by an earlier call to this function, or must be NULL. If it
@@ -67164,22 +72016,33 @@ SQLITE_PRIVATE int sqlite3Stat4ProbeSetValue(
Index *pIdx, /* Index being probed */
UnpackedRecord **ppRec, /* IN/OUT: Probe record */
Expr *pExpr, /* The expression to extract a value from */
- u8 affinity, /* Affinity to use */
+ int nElem, /* Maximum number of values to append */
int iVal, /* Array element to populate */
- int *pbOk /* OUT: True if value was extracted */
+ int *pnExtract /* OUT: Values appended to the record */
){
- int rc;
- sqlite3_value *pVal = 0;
- struct ValueNewStat4Ctx alloc;
+ int rc = SQLITE_OK;
+ int nExtract = 0;
- alloc.pParse = pParse;
- alloc.pIdx = pIdx;
- alloc.ppRec = ppRec;
- alloc.iVal = iVal;
+ if( pExpr==0 || pExpr->op!=TK_SELECT ){
+ int i;
+ struct ValueNewStat4Ctx alloc;
- rc = stat4ValueFromExpr(pParse, pExpr, affinity, &alloc, &pVal);
- assert( pVal==0 || pVal->db==pParse->db );
- *pbOk = (pVal!=0);
+ alloc.pParse = pParse;
+ alloc.pIdx = pIdx;
+ alloc.ppRec = ppRec;
+
+ for(i=0; idb, pIdx, iVal+i);
+ alloc.iVal = iVal+i;
+ rc = stat4ValueFromExpr(pParse, pElem, aff, &alloc, &pVal);
+ if( !pVal ) break;
+ nExtract++;
+ }
+ }
+
+ *pnExtract = nExtract;
return rc;
}
@@ -67243,7 +72106,7 @@ SQLITE_PRIVATE int sqlite3Stat4Column(
if( iField>nRec ) return SQLITE_CORRUPT_BKPT;
if( pMem==0 ){
pMem = *ppVal = sqlite3ValueNew(db);
- if( pMem==0 ) return SQLITE_NOMEM;
+ if( pMem==0 ) return SQLITE_NOMEM_BKPT;
}
sqlite3VdbeSerialGet(&a[iField-szField], t, pMem);
pMem->enc = ENC(db);
@@ -67258,14 +72121,14 @@ SQLITE_PRIVATE int sqlite3Stat4Column(
SQLITE_PRIVATE void sqlite3Stat4ProbeFree(UnpackedRecord *pRec){
if( pRec ){
int i;
- int nCol = pRec->pKeyInfo->nField+pRec->pKeyInfo->nXField;
+ int nCol = pRec->pKeyInfo->nAllField;
Mem *aMem = pRec->aMem;
sqlite3 *db = aMem[0].db;
for(i=0; ipKeyInfo);
- sqlite3DbFree(db, pRec);
+ sqlite3DbFreeNN(db, pRec);
}
}
#endif /* ifdef SQLITE_ENABLE_STAT4 */
@@ -67289,7 +72152,7 @@ SQLITE_PRIVATE void sqlite3ValueSetStr(
SQLITE_PRIVATE void sqlite3ValueFree(sqlite3_value *v){
if( !v ) return;
sqlite3VdbeMemRelease((Mem *)v);
- sqlite3DbFree(((Mem*)v)->db, v);
+ sqlite3DbFreeNN(((Mem*)v)->db, v);
}
/*
@@ -67342,8 +72205,9 @@ SQLITE_PRIVATE int sqlite3ValueBytes(sqlite3_value *pVal, u8 enc){
SQLITE_PRIVATE Vdbe *sqlite3VdbeCreate(Parse *pParse){
sqlite3 *db = pParse->db;
Vdbe *p;
- p = sqlite3DbMallocZero(db, sizeof(Vdbe) );
+ p = sqlite3DbMallocRawNN(db, sizeof(Vdbe) );
if( p==0 ) return 0;
+ memset(&p->aOp, 0, sizeof(Vdbe)-offsetof(Vdbe,aOp));
p->db = db;
if( db->pVdbe ){
db->pVdbe->pPrev = p;
@@ -67353,10 +72217,12 @@ SQLITE_PRIVATE Vdbe *sqlite3VdbeCreate(Parse *pParse){
db->pVdbe = p;
p->magic = VDBE_MAGIC_INIT;
p->pParse = pParse;
+ pParse->pVdbe = p;
assert( pParse->aLabel==0 );
assert( pParse->nLabel==0 );
assert( pParse->nOpAlloc==0 );
assert( pParse->szOpAlloc==0 );
+ sqlite3VdbeAddOp2(p, OP_Init, 0, 1);
return p;
}
@@ -67374,23 +72240,14 @@ SQLITE_PRIVATE void sqlite3VdbeError(Vdbe *p, const char *zFormat, ...){
/*
** Remember the SQL string for a prepared statement.
*/
-SQLITE_PRIVATE void sqlite3VdbeSetSql(Vdbe *p, const char *z, int n, int isPrepareV2){
- assert( isPrepareV2==1 || isPrepareV2==0 );
+SQLITE_PRIVATE void sqlite3VdbeSetSql(Vdbe *p, const char *z, int n, u8 prepFlags){
if( p==0 ) return;
-#if defined(SQLITE_OMIT_TRACE) && !defined(SQLITE_ENABLE_SQLLOG)
- if( !isPrepareV2 ) return;
-#endif
+ p->prepFlags = prepFlags;
+ if( (prepFlags & SQLITE_PREPARE_SAVESQL)==0 ){
+ p->expmask = 0;
+ }
assert( p->zSql==0 );
p->zSql = sqlite3DbStrNDup(p->db, z, n);
- p->isPrepareV2 = (u8)isPrepareV2;
-}
-
-/*
-** Return the SQL associated with a prepared statement
-*/
-SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt){
- Vdbe *p = (Vdbe *)pStmt;
- return p ? p->zSql : 0;
}
/*
@@ -67399,6 +72256,7 @@ SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt){
SQLITE_PRIVATE void sqlite3VdbeSwap(Vdbe *pA, Vdbe *pB){
Vdbe tmp, *pTmp;
char *zTmp;
+ assert( pA->db==pB->db );
tmp = *pA;
*pA = *pB;
*pB = tmp;
@@ -67411,7 +72269,10 @@ SQLITE_PRIVATE void sqlite3VdbeSwap(Vdbe *pA, Vdbe *pB){
zTmp = pA->zSql;
pA->zSql = pB->zSql;
pB->zSql = zTmp;
- pB->isPrepareV2 = pA->isPrepareV2;
+ pB->expmask = pA->expmask;
+ pB->prepFlags = pA->prepFlags;
+ memcpy(pB->aCounter, pA->aCounter, sizeof(pB->aCounter));
+ pB->aCounter[SQLITE_STMTSTATUS_REPREPARE]++;
}
/*
@@ -67442,6 +72303,12 @@ static int growOpArray(Vdbe *v, int nOp){
UNUSED_PARAMETER(nOp);
#endif
+ /* Ensure that the size of a VDBE does not grow too large */
+ if( nNew > p->db->aLimit[SQLITE_LIMIT_VDBE_OP] ){
+ sqlite3OomFault(p->db);
+ return SQLITE_NOMEM;
+ }
+
assert( nOp<=(1024/sizeof(Op)) );
assert( nNew>=(p->nOpAlloc+nOp) );
pNew = sqlite3DbRealloc(p->db, v->aOp, nNew*sizeof(Op));
@@ -67450,7 +72317,7 @@ static int growOpArray(Vdbe *v, int nOp){
p->nOpAlloc = p->szOpAlloc/sizeof(Op);
v->aOp = pNew;
}
- return (pNew ? SQLITE_OK : SQLITE_NOMEM);
+ return (pNew ? SQLITE_OK : SQLITE_NOMEM_BKPT);
}
#ifdef SQLITE_DEBUG
@@ -67492,7 +72359,7 @@ SQLITE_PRIVATE int sqlite3VdbeAddOp3(Vdbe *p, int op, int p1, int p2, int p3){
i = p->nOp;
assert( p->magic==VDBE_MAGIC_INIT );
- assert( op>0 && op<0xff );
+ assert( op>=0 && op<0xff );
if( p->pParse->nOpAlloc<=i ){
return growOp3(p, op, p1, p2, p3);
}
@@ -67512,9 +72379,8 @@ SQLITE_PRIVATE int sqlite3VdbeAddOp3(Vdbe *p, int op, int p1, int p2, int p3){
if( p->db->flags & SQLITE_VdbeAddopTrace ){
int jj, kk;
Parse *pParse = p->pParse;
- for(jj=kk=0; jjnColCache; jj++){
struct yColCache *x = pParse->aColCache + jj;
- if( x->iLevel>pParse->iCacheLevel || x->iReg==0 ) continue;
printf(" r[%d]={%d:%d}", x->iReg, x->iTable, x->iColumn);
kk++;
}
@@ -67562,6 +72428,9 @@ SQLITE_PRIVATE int sqlite3VdbeLoadString(Vdbe *p, int iDest, const char *zStr){
** "s" character in zTypes[], the register is a string if the argument is
** not NULL, or OP_Null if the value is a null pointer. For each "i" character
** in zTypes[], the register is initialized to an integer.
+**
+** If the input string does not end with "X" then an OP_ResultRow instruction
+** is generated for the values inserted.
*/
SQLITE_PRIVATE void sqlite3VdbeMultiLoad(Vdbe *p, int iDest, const char *zTypes, ...){
va_list ap;
@@ -67571,13 +72440,15 @@ SQLITE_PRIVATE void sqlite3VdbeMultiLoad(Vdbe *p, int iDest, const char *zTypes,
for(i=0; (c = zTypes[i])!=0; i++){
if( c=='s' ){
const char *z = va_arg(ap, const char*);
- int addr = sqlite3VdbeAddOp2(p, z==0 ? OP_Null : OP_String8, 0, iDest++);
- if( z ) sqlite3VdbeChangeP4(p, addr, z, 0);
+ sqlite3VdbeAddOp4(p, z==0 ? OP_Null : OP_String8, 0, iDest+i, 0, z, 0);
+ }else if( c=='i' ){
+ sqlite3VdbeAddOp2(p, OP_Integer, va_arg(ap, int), iDest+i);
}else{
- assert( c=='i' );
- sqlite3VdbeAddOp2(p, OP_Integer, va_arg(ap, int), iDest++);
+ goto skip_op_resultrow;
}
}
+ sqlite3VdbeAddOp2(p, OP_ResultRow, iDest, i);
+skip_op_resultrow:
va_end(ap);
}
@@ -67611,7 +72482,7 @@ SQLITE_PRIVATE int sqlite3VdbeAddOp4Dup8(
const u8 *zP4, /* The P4 operand */
int p4type /* P4 operand type */
){
- char *p4copy = sqlite3DbMallocRaw(sqlite3VdbeDb(p), 8);
+ char *p4copy = sqlite3DbMallocRawNN(sqlite3VdbeDb(p), 8);
if( p4copy ) memcpy(p4copy, zP4, 8);
return sqlite3VdbeAddOp4(p, op, p1, p2, p3, p4copy, p4type);
}
@@ -67626,8 +72497,7 @@ SQLITE_PRIVATE int sqlite3VdbeAddOp4Dup8(
*/
SQLITE_PRIVATE void sqlite3VdbeAddParseSchemaOp(Vdbe *p, int iDb, char *zWhere){
int j;
- int addr = sqlite3VdbeAddOp3(p, OP_ParseSchema, iDb, 0, 0);
- sqlite3VdbeChangeP4(p, addr, zWhere, P4_DYNAMIC);
+ sqlite3VdbeAddOp4(p, OP_ParseSchema, iDb, 0, 0, zWhere, P4_DYNAMIC);
for(j=0; jdb->nDb; j++) sqlite3VdbeUsesBtree(p, j);
}
@@ -67643,10 +72513,29 @@ SQLITE_PRIVATE int sqlite3VdbeAddOp4Int(
int p4 /* The P4 operand as an integer */
){
int addr = sqlite3VdbeAddOp3(p, op, p1, p2, p3);
- sqlite3VdbeChangeP4(p, addr, SQLITE_INT_TO_PTR(p4), P4_INT32);
+ if( p->db->mallocFailed==0 ){
+ VdbeOp *pOp = &p->aOp[addr];
+ pOp->p4type = P4_INT32;
+ pOp->p4.i = p4;
+ }
return addr;
}
+/* Insert the end of a co-routine
+*/
+SQLITE_PRIVATE void sqlite3VdbeEndCoroutine(Vdbe *v, int regYield){
+ sqlite3VdbeAddOp1(v, OP_EndCoroutine, regYield);
+
+ /* Clear the temporary register cache, thereby ensuring that each
+ ** co-routine has its own independent set of registers, because co-routines
+ ** might expect their registers to be preserved across an OP_Yield, and
+ ** that could cause problems if two or more co-routines are using the same
+ ** temporary register.
+ */
+ v->pParse->nTempReg = 0;
+ v->pParse->nRangeReg = 0;
+}
+
/*
** Create a new symbolic label for an instruction that has yet to be
** coded. The symbolic label is really just a negative number. The
@@ -67689,7 +72578,6 @@ SQLITE_PRIVATE void sqlite3VdbeResolveLabel(Vdbe *v, int x){
if( p->aLabel ){
p->aLabel[j] = v->nOp;
}
- p->iFixedOp = v->nOp - 1;
}
/*
@@ -67699,6 +72587,13 @@ SQLITE_PRIVATE void sqlite3VdbeRunOnlyOnce(Vdbe *p){
p->runOnlyOnce = 1;
}
+/*
+** Mark the VDBE as one that can only be run multiple times.
+*/
+SQLITE_PRIVATE void sqlite3VdbeReusable(Vdbe *p){
+ p->runOnlyOnce = 0;
+}
+
#ifdef SQLITE_DEBUG /* sqlite3AssertMayAbort() logic */
/*
@@ -67781,7 +72676,8 @@ static Op *opIterNext(VdbeOpIter *p){
** * OP_VUpdate
** * OP_VRename
** * OP_FkCounter with P2==0 (immediate foreign key constraint)
-** * OP_CreateTable and OP_InitCoroutine (for CREATE TABLE AS SELECT ...)
+** * OP_CreateBtree/BTREE_INTKEY and OP_InitCoroutine
+** (for CREATE TABLE AS SELECT ...)
**
** Then check that the value of Parse.mayAbort is true if an
** ABORT may be thrown, or false otherwise. Return true if it does
@@ -67809,7 +72705,7 @@ SQLITE_PRIVATE int sqlite3VdbeAssertMayAbort(Vdbe *v, int mayAbort){
hasAbort = 1;
break;
}
- if( opcode==OP_CreateTable ) hasCreateTable = 1;
+ if( opcode==OP_CreateBtree && pOp->p3==BTREE_INTKEY ) hasCreateTable = 1;
if( opcode==OP_InitCoroutine ) hasInitCoroutine = 1;
#ifndef SQLITE_OMIT_FOREIGN_KEY
if( opcode==OP_FkCounter && pOp->p1==0 && pOp->p2==1 ){
@@ -67845,73 +72741,103 @@ SQLITE_PRIVATE int sqlite3VdbeAssertMayAbort(Vdbe *v, int mayAbort){
** (4) Initialize the p4.xAdvance pointer on opcodes that use it.
**
** (5) Reclaim the memory allocated for storing labels.
+**
+** This routine will only function correctly if the mkopcodeh.tcl generator
+** script numbers the opcodes correctly. Changes to this routine must be
+** coordinated with changes to mkopcodeh.tcl.
*/
static void resolveP2Values(Vdbe *p, int *pMaxFuncArgs){
- int i;
int nMaxArgs = *pMaxFuncArgs;
Op *pOp;
Parse *pParse = p->pParse;
int *aLabel = pParse->aLabel;
p->readOnly = 1;
p->bIsReader = 0;
- for(pOp=p->aOp, i=p->nOp-1; i>=0; i--, pOp++){
- u8 opcode = pOp->opcode;
+ pOp = &p->aOp[p->nOp-1];
+ while(1){
- /* NOTE: Be sure to update mkopcodeh.awk when adding or removing
- ** cases from this switch! */
- switch( opcode ){
- case OP_Transaction: {
- if( pOp->p2!=0 ) p->readOnly = 0;
- /* fall thru */
- }
- case OP_AutoCommit:
- case OP_Savepoint: {
- p->bIsReader = 1;
- break;
- }
+ /* Only JUMP opcodes and the short list of special opcodes in the switch
+ ** below need to be considered. The mkopcodeh.tcl generator script groups
+ ** all these opcodes together near the front of the opcode list. Skip
+ ** any opcode that does not need processing by virtual of the fact that
+ ** it is larger than SQLITE_MX_JUMP_OPCODE, as a performance optimization.
+ */
+ if( pOp->opcode<=SQLITE_MX_JUMP_OPCODE ){
+ /* NOTE: Be sure to update mkopcodeh.tcl when adding or removing
+ ** cases from this switch! */
+ switch( pOp->opcode ){
+ case OP_Transaction: {
+ if( pOp->p2!=0 ) p->readOnly = 0;
+ /* fall thru */
+ }
+ case OP_AutoCommit:
+ case OP_Savepoint: {
+ p->bIsReader = 1;
+ break;
+ }
#ifndef SQLITE_OMIT_WAL
- case OP_Checkpoint:
+ case OP_Checkpoint:
#endif
- case OP_Vacuum:
- case OP_JournalMode: {
- p->readOnly = 0;
- p->bIsReader = 1;
- break;
- }
+ case OP_Vacuum:
+ case OP_JournalMode: {
+ p->readOnly = 0;
+ p->bIsReader = 1;
+ break;
+ }
+ case OP_Next:
+ case OP_NextIfOpen:
+ case OP_SorterNext: {
+ pOp->p4.xAdvance = sqlite3BtreeNext;
+ pOp->p4type = P4_ADVANCE;
+ /* The code generator never codes any of these opcodes as a jump
+ ** to a label. They are always coded as a jump backwards to a
+ ** known address */
+ assert( pOp->p2>=0 );
+ break;
+ }
+ case OP_Prev:
+ case OP_PrevIfOpen: {
+ pOp->p4.xAdvance = sqlite3BtreePrevious;
+ pOp->p4type = P4_ADVANCE;
+ /* The code generator never codes any of these opcodes as a jump
+ ** to a label. They are always coded as a jump backwards to a
+ ** known address */
+ assert( pOp->p2>=0 );
+ break;
+ }
#ifndef SQLITE_OMIT_VIRTUALTABLE
- case OP_VUpdate: {
- if( pOp->p2>nMaxArgs ) nMaxArgs = pOp->p2;
- break;
- }
- case OP_VFilter: {
- int n;
- assert( p->nOp - i >= 3 );
- assert( pOp[-1].opcode==OP_Integer );
- n = pOp[-1].p1;
- if( n>nMaxArgs ) nMaxArgs = n;
- break;
- }
+ case OP_VUpdate: {
+ if( pOp->p2>nMaxArgs ) nMaxArgs = pOp->p2;
+ break;
+ }
+ case OP_VFilter: {
+ int n;
+ assert( (pOp - p->aOp) >= 3 );
+ assert( pOp[-1].opcode==OP_Integer );
+ n = pOp[-1].p1;
+ if( n>nMaxArgs ) nMaxArgs = n;
+ /* Fall through into the default case */
+ }
#endif
- case OP_Next:
- case OP_NextIfOpen:
- case OP_SorterNext: {
- pOp->p4.xAdvance = sqlite3BtreeNext;
- pOp->p4type = P4_ADVANCE;
- break;
- }
- case OP_Prev:
- case OP_PrevIfOpen: {
- pOp->p4.xAdvance = sqlite3BtreePrevious;
- pOp->p4type = P4_ADVANCE;
- break;
+ default: {
+ if( pOp->p2<0 ){
+ /* The mkopcodeh.tcl script has so arranged things that the only
+ ** non-jump opcodes less than SQLITE_MX_JUMP_CODE are guaranteed to
+ ** have non-negative values for P2. */
+ assert( (sqlite3OpcodeProperty[pOp->opcode] & OPFLG_JUMP)!=0 );
+ assert( ADDR(pOp->p2)nLabel );
+ pOp->p2 = aLabel[ADDR(pOp->p2)];
+ }
+ break;
+ }
}
+ /* The mkopcodeh.tcl script has so arranged things that the only
+ ** non-jump opcodes less than SQLITE_MX_JUMP_CODE are guaranteed to
+ ** have non-negative values for P2. */
+ assert( (sqlite3OpcodeProperty[pOp->opcode]&OPFLG_JUMP)==0 || pOp->p2>=0);
}
-
- pOp->opflags = sqlite3OpcodeProperty[opcode];
- if( (pOp->opflags & OPFLG_JUMP)!=0 && pOp->p2<0 ){
- assert( ADDR(pOp->p2)nLabel );
- pOp->p2 = aLabel[ADDR(pOp->p2)];
- }
+ if( pOp==p->aOp ) break;
+ pOp--;
}
sqlite3DbFree(p->db, pParse->aLabel);
pParse->aLabel = 0;
@@ -67928,6 +72854,36 @@ SQLITE_PRIVATE int sqlite3VdbeCurrentAddr(Vdbe *p){
return p->nOp;
}
+/*
+** Verify that at least N opcode slots are available in p without
+** having to malloc for more space (except when compiled using
+** SQLITE_TEST_REALLOC_STRESS). This interface is used during testing
+** to verify that certain calls to sqlite3VdbeAddOpList() can never
+** fail due to a OOM fault and hence that the return value from
+** sqlite3VdbeAddOpList() will always be non-NULL.
+*/
+#if defined(SQLITE_DEBUG) && !defined(SQLITE_TEST_REALLOC_STRESS)
+SQLITE_PRIVATE void sqlite3VdbeVerifyNoMallocRequired(Vdbe *p, int N){
+ assert( p->nOp + N <= p->pParse->nOpAlloc );
+}
+#endif
+
+/*
+** Verify that the VM passed as the only argument does not contain
+** an OP_ResultRow opcode. Fail an assert() if it does. This is used
+** by code in pragma.c to ensure that the implementation of certain
+** pragmas comports with the flags specified in the mkpragmatab.tcl
+** script.
+*/
+#if defined(SQLITE_DEBUG) && !defined(SQLITE_TEST_REALLOC_STRESS)
+SQLITE_PRIVATE void sqlite3VdbeVerifyNoResultRow(Vdbe *p){
+ int i;
+ for(i=0; inOp; i++){
+ assert( p->aOp[i].opcode!=OP_ResultRow );
+ }
+}
+#endif
+
/*
** This function returns a pointer to the array of opcodes associated with
** the Vdbe passed as the first argument. It is the callers responsibility
@@ -67953,24 +72909,34 @@ SQLITE_PRIVATE VdbeOp *sqlite3VdbeTakeOpArray(Vdbe *p, int *pnOp, int *pnMaxArg)
}
/*
-** Add a whole list of operations to the operation stack. Return the
-** address of the first operation added.
+** Add a whole list of operations to the operation stack. Return a
+** pointer to the first operation inserted.
+**
+** Non-zero P2 arguments to jump instructions are automatically adjusted
+** so that the jump target is relative to the first operation inserted.
*/
-SQLITE_PRIVATE int sqlite3VdbeAddOpList(Vdbe *p, int nOp, VdbeOpList const *aOp, int iLineno){
- int addr, i;
- VdbeOp *pOut;
+SQLITE_PRIVATE VdbeOp *sqlite3VdbeAddOpList(
+ Vdbe *p, /* Add opcodes to the prepared statement */
+ int nOp, /* Number of opcodes to add */
+ VdbeOpList const *aOp, /* The opcodes to be added */
+ int iLineno /* Source-file line number of first opcode */
+){
+ int i;
+ VdbeOp *pOut, *pFirst;
assert( nOp>0 );
assert( p->magic==VDBE_MAGIC_INIT );
if( p->nOp + nOp > p->pParse->nOpAlloc && growOpArray(p, nOp) ){
return 0;
}
- addr = p->nOp;
- pOut = &p->aOp[addr];
+ pFirst = pOut = &p->aOp[p->nOp];
for(i=0; iopcode = aOp->opcode;
pOut->p1 = aOp->p1;
pOut->p2 = aOp->p2;
assert( aOp->p2>=0 );
+ if( (sqlite3OpcodeProperty[aOp->opcode] & OPFLG_JUMP)!=0 && aOp->p2>0 ){
+ pOut->p2 += p->nOp;
+ }
pOut->p3 = aOp->p3;
pOut->p4type = P4_NOTUSED;
pOut->p4.p = 0;
@@ -67985,12 +72951,12 @@ SQLITE_PRIVATE int sqlite3VdbeAddOpList(Vdbe *p, int nOp, VdbeOpList const *aOp,
#endif
#ifdef SQLITE_DEBUG
if( p->db->flags & SQLITE_VdbeAddopTrace ){
- sqlite3VdbePrintOp(0, i+addr, &p->aOp[i+addr]);
+ sqlite3VdbePrintOp(0, i+p->nOp, &p->aOp[i+p->nOp]);
}
#endif
}
p->nOp += nOp;
- return addr;
+ return pFirst;
}
#if defined(SQLITE_ENABLE_STMT_SCANSTATUS)
@@ -68037,8 +73003,9 @@ SQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe *p, u32 addr, int val){
SQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe *p, u32 addr, int val){
sqlite3VdbeGetOp(p,addr)->p3 = val;
}
-SQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe *p, u8 p5){
- sqlite3VdbeGetOp(p,-1)->p5 = p5;
+SQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe *p, u16 p5){
+ assert( p->nOp>0 || p->db->mallocFailed );
+ if( p->nOp>0 ) p->aOp[p->nOp-1].p5 = p5;
}
/*
@@ -68046,7 +73013,6 @@ SQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe *p, u8 p5){
** the address of the next instruction to be coded.
*/
SQLITE_PRIVATE void sqlite3VdbeJumpHere(Vdbe *p, int addr){
- p->pParse->iFixedOp = p->nOp - 1;
sqlite3VdbeChangeP2(p, addr, p->nOp);
}
@@ -68056,8 +73022,8 @@ SQLITE_PRIVATE void sqlite3VdbeJumpHere(Vdbe *p, int addr){
** the FuncDef is not ephermal, then do nothing.
*/
static void freeEphemeralFunction(sqlite3 *db, FuncDef *pDef){
- if( ALWAYS(pDef) && (pDef->funcFlags & SQLITE_FUNC_EPHEM)!=0 ){
- sqlite3DbFree(db, pDef);
+ if( (pDef->funcFlags & SQLITE_FUNC_EPHEM)!=0 ){
+ sqlite3DbFreeNN(db, pDef);
}
}
@@ -68066,53 +73032,53 @@ static void vdbeFreeOpArray(sqlite3 *, Op *, int);
/*
** Delete a P4 value if necessary.
*/
+static SQLITE_NOINLINE void freeP4Mem(sqlite3 *db, Mem *p){
+ if( p->szMalloc ) sqlite3DbFree(db, p->zMalloc);
+ sqlite3DbFreeNN(db, p);
+}
+static SQLITE_NOINLINE void freeP4FuncCtx(sqlite3 *db, sqlite3_context *p){
+ freeEphemeralFunction(db, p->pFunc);
+ sqlite3DbFreeNN(db, p);
+}
static void freeP4(sqlite3 *db, int p4type, void *p4){
- if( p4 ){
- assert( db );
- switch( p4type ){
- case P4_FUNCCTX: {
- freeEphemeralFunction(db, ((sqlite3_context*)p4)->pFunc);
- /* Fall through into the next case */
- }
- case P4_REAL:
- case P4_INT64:
- case P4_DYNAMIC:
- case P4_INTARRAY: {
- sqlite3DbFree(db, p4);
- break;
- }
- case P4_KEYINFO: {
- if( db->pnBytesFreed==0 ) sqlite3KeyInfoUnref((KeyInfo*)p4);
- break;
- }
+ assert( db );
+ switch( p4type ){
+ case P4_FUNCCTX: {
+ freeP4FuncCtx(db, (sqlite3_context*)p4);
+ break;
+ }
+ case P4_REAL:
+ case P4_INT64:
+ case P4_DYNAMIC:
+ case P4_INTARRAY: {
+ sqlite3DbFree(db, p4);
+ break;
+ }
+ case P4_KEYINFO: {
+ if( db->pnBytesFreed==0 ) sqlite3KeyInfoUnref((KeyInfo*)p4);
+ break;
+ }
#ifdef SQLITE_ENABLE_CURSOR_HINTS
- case P4_EXPR: {
- sqlite3ExprDelete(db, (Expr*)p4);
- break;
- }
+ case P4_EXPR: {
+ sqlite3ExprDelete(db, (Expr*)p4);
+ break;
+ }
#endif
- case P4_MPRINTF: {
- if( db->pnBytesFreed==0 ) sqlite3_free(p4);
- break;
- }
- case P4_FUNCDEF: {
- freeEphemeralFunction(db, (FuncDef*)p4);
- break;
- }
- case P4_MEM: {
- if( db->pnBytesFreed==0 ){
- sqlite3ValueFree((sqlite3_value*)p4);
- }else{
- Mem *p = (Mem*)p4;
- if( p->szMalloc ) sqlite3DbFree(db, p->zMalloc);
- sqlite3DbFree(db, p);
- }
- break;
- }
- case P4_VTAB : {
- if( db->pnBytesFreed==0 ) sqlite3VtabUnlock((VTable *)p4);
- break;
+ case P4_FUNCDEF: {
+ freeEphemeralFunction(db, (FuncDef*)p4);
+ break;
+ }
+ case P4_MEM: {
+ if( db->pnBytesFreed==0 ){
+ sqlite3ValueFree((sqlite3_value*)p4);
+ }else{
+ freeP4Mem(db, (Mem*)p4);
}
+ break;
+ }
+ case P4_VTAB : {
+ if( db->pnBytesFreed==0 ) sqlite3VtabUnlock((VTable *)p4);
+ break;
}
}
}
@@ -68125,14 +73091,14 @@ static void freeP4(sqlite3 *db, int p4type, void *p4){
static void vdbeFreeOpArray(sqlite3 *db, Op *aOp, int nOp){
if( aOp ){
Op *pOp;
- for(pOp=aOp; pOp<&aOp[nOp]; pOp++){
- freeP4(db, pOp->p4type, pOp->p4.p);
+ for(pOp=&aOp[nOp-1]; pOp>=aOp; pOp--){
+ if( pOp->p4type <= P4_FREE_IF_LE ) freeP4(db, pOp->p4type, pOp->p4.p);
#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS
sqlite3DbFree(db, pOp->zComment);
#endif
}
+ sqlite3DbFreeNN(db, aOp);
}
- sqlite3DbFree(db, aOp);
}
/*
@@ -68148,14 +73114,16 @@ SQLITE_PRIVATE void sqlite3VdbeLinkSubProgram(Vdbe *pVdbe, SubProgram *p){
/*
** Change the opcode at addr into OP_Noop
*/
-SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe *p, int addr){
- if( addrnOp ){
- VdbeOp *pOp = &p->aOp[addr];
- sqlite3 *db = p->db;
- freeP4(db, pOp->p4type, pOp->p4.p);
- memset(pOp, 0, sizeof(pOp[0]));
- pOp->opcode = OP_Noop;
- }
+SQLITE_PRIVATE int sqlite3VdbeChangeToNoop(Vdbe *p, int addr){
+ VdbeOp *pOp;
+ if( p->db->mallocFailed ) return 0;
+ assert( addr>=0 && addrnOp );
+ pOp = &p->aOp[addr];
+ freeP4(p->db, pOp->p4type, pOp->p4.p);
+ pOp->p4type = P4_NOTUSED;
+ pOp->p4.z = 0;
+ pOp->opcode = OP_Noop;
+ return 1;
}
/*
@@ -68163,9 +73131,8 @@ SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe *p, int addr){
** then remove it. Return true if and only if an opcode was removed.
*/
SQLITE_PRIVATE int sqlite3VdbeDeletePriorOpcode(Vdbe *p, u8 op){
- if( (p->nOp-1)>(p->pParse->iFixedOp) && p->aOp[p->nOp-1].opcode==op ){
- sqlite3VdbeChangeToNoop(p, p->nOp-1);
- return 1;
+ if( p->nOp>0 && p->aOp[p->nOp-1].opcode==op ){
+ return sqlite3VdbeChangeToNoop(p, p->nOp-1);
}else{
return 0;
}
@@ -68188,16 +73155,34 @@ SQLITE_PRIVATE int sqlite3VdbeDeletePriorOpcode(Vdbe *p, u8 op){
**
** If addr<0 then change P4 on the most recently inserted instruction.
*/
+static void SQLITE_NOINLINE vdbeChangeP4Full(
+ Vdbe *p,
+ Op *pOp,
+ const char *zP4,
+ int n
+){
+ if( pOp->p4type ){
+ freeP4(p->db, pOp->p4type, pOp->p4.p);
+ pOp->p4type = 0;
+ pOp->p4.p = 0;
+ }
+ if( n<0 ){
+ sqlite3VdbeChangeP4(p, (int)(pOp - p->aOp), zP4, n);
+ }else{
+ if( n==0 ) n = sqlite3Strlen30(zP4);
+ pOp->p4.z = sqlite3DbStrNDup(p->db, zP4, n);
+ pOp->p4type = P4_DYNAMIC;
+ }
+}
SQLITE_PRIVATE void sqlite3VdbeChangeP4(Vdbe *p, int addr, const char *zP4, int n){
Op *pOp;
sqlite3 *db;
assert( p!=0 );
db = p->db;
assert( p->magic==VDBE_MAGIC_INIT );
- if( p->aOp==0 || db->mallocFailed ){
- if( n!=P4_VTAB ){
- freeP4(db, n, (void*)*(char**)&zP4);
- }
+ assert( p->aOp!=0 || db->mallocFailed );
+ if( db->mallocFailed ){
+ if( n!=P4_VTAB ) freeP4(db, n, (void*)*(char**)&zP4);
return;
}
assert( p->nOp>0 );
@@ -68206,43 +73191,45 @@ SQLITE_PRIVATE void sqlite3VdbeChangeP4(Vdbe *p, int addr, const char *zP4, int
addr = p->nOp - 1;
}
pOp = &p->aOp[addr];
- assert( pOp->p4type==P4_NOTUSED
- || pOp->p4type==P4_INT32
- || pOp->p4type==P4_KEYINFO );
- freeP4(db, pOp->p4type, pOp->p4.p);
- pOp->p4.p = 0;
+ if( n>=0 || pOp->p4type ){
+ vdbeChangeP4Full(p, pOp, zP4, n);
+ return;
+ }
if( n==P4_INT32 ){
/* Note: this cast is safe, because the origin data point was an int
** that was cast to a (const char *). */
pOp->p4.i = SQLITE_PTR_TO_INT(zP4);
pOp->p4type = P4_INT32;
- }else if( zP4==0 ){
- pOp->p4.p = 0;
- pOp->p4type = P4_NOTUSED;
- }else if( n==P4_KEYINFO ){
- pOp->p4.p = (void*)zP4;
- pOp->p4type = P4_KEYINFO;
-#ifdef SQLITE_ENABLE_CURSOR_HINTS
- }else if( n==P4_EXPR ){
- /* Responsibility for deleting the Expr tree is handed over to the
- ** VDBE by this operation. The caller should have already invoked
- ** sqlite3ExprDup() or whatever other routine is needed to make a
- ** private copy of the tree. */
- pOp->p4.pExpr = (Expr*)zP4;
- pOp->p4type = P4_EXPR;
-#endif
- }else if( n==P4_VTAB ){
- pOp->p4.p = (void*)zP4;
- pOp->p4type = P4_VTAB;
- sqlite3VtabLock((VTable *)zP4);
- assert( ((VTable *)zP4)->db==p->db );
- }else if( n<0 ){
+ }else if( zP4!=0 ){
+ assert( n<0 );
pOp->p4.p = (void*)zP4;
pOp->p4type = (signed char)n;
+ if( n==P4_VTAB ) sqlite3VtabLock((VTable*)zP4);
+ }
+}
+
+/*
+** Change the P4 operand of the most recently coded instruction
+** to the value defined by the arguments. This is a high-speed
+** version of sqlite3VdbeChangeP4().
+**
+** The P4 operand must not have been previously defined. And the new
+** P4 must not be P4_INT32. Use sqlite3VdbeChangeP4() in either of
+** those cases.
+*/
+SQLITE_PRIVATE void sqlite3VdbeAppendP4(Vdbe *p, void *pP4, int n){
+ VdbeOp *pOp;
+ assert( n!=P4_INT32 && n!=P4_VTAB );
+ assert( n<=0 );
+ if( p->db->mallocFailed ){
+ freeP4(p->db, n, pP4);
}else{
- if( n==0 ) n = sqlite3Strlen30(zP4);
- pOp->p4.z = sqlite3DbStrNDup(p->db, zP4, n);
- pOp->p4type = P4_DYNAMIC;
+ assert( pP4!=0 );
+ assert( p->nOp>0 );
+ pOp = &p->aOp[p->nOp-1];
+ assert( pOp->p4type==P4_NOTUSED );
+ pOp->p4type = n;
+ pOp->p4.p = pP4;
}
}
@@ -68252,10 +73239,11 @@ SQLITE_PRIVATE void sqlite3VdbeChangeP4(Vdbe *p, int addr, const char *zP4, int
*/
SQLITE_PRIVATE void sqlite3VdbeSetP4KeyInfo(Parse *pParse, Index *pIdx){
Vdbe *v = pParse->pVdbe;
+ KeyInfo *pKeyInfo;
assert( v!=0 );
assert( pIdx!=0 );
- sqlite3VdbeChangeP4(v, -1, (char*)sqlite3KeyInfoOfIndex(pParse, pIdx),
- P4_KEYINFO);
+ pKeyInfo = sqlite3KeyInfoOfIndex(pParse, pIdx);
+ if( pKeyInfo ) sqlite3VdbeAppendP4(v, pKeyInfo, P4_KEYINFO);
}
#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS
@@ -68367,12 +73355,21 @@ static int displayComment(
const char *zSynopsis;
int nOpName;
int ii, jj;
+ char zAlt[50];
zOpName = sqlite3OpcodeName(pOp->opcode);
nOpName = sqlite3Strlen30(zOpName);
if( zOpName[nOpName+1] ){
int seenCom = 0;
char c;
zSynopsis = zOpName += nOpName + 1;
+ if( strncmp(zSynopsis,"IF ",3)==0 ){
+ if( pOp->p5 & SQLITE_STOREP2 ){
+ sqlite3_snprintf(sizeof(zAlt), zAlt, "r[P2] = (%s)", zSynopsis+3);
+ }else{
+ sqlite3_snprintf(sizeof(zAlt), zAlt, "if %s goto P2", zSynopsis+3);
+ }
+ zSynopsis = zAlt;
+ }
for(ii=jj=0; jjop ){
case TK_STRING:
- sqlite3_snprintf(nTemp, zTemp, "%Q", pExpr->u.zToken);
+ sqlite3XPrintf(p, "%Q", pExpr->u.zToken);
break;
case TK_INTEGER:
- sqlite3_snprintf(nTemp, zTemp, "%d", pExpr->u.iValue);
+ sqlite3XPrintf(p, "%d", pExpr->u.iValue);
break;
case TK_NULL:
- sqlite3_snprintf(nTemp, zTemp, "NULL");
+ sqlite3XPrintf(p, "NULL");
break;
case TK_REGISTER: {
- sqlite3_snprintf(nTemp, zTemp, "r[%d]", pExpr->iTable);
+ sqlite3XPrintf(p, "r[%d]", pExpr->iTable);
break;
}
case TK_COLUMN: {
if( pExpr->iColumn<0 ){
- sqlite3_snprintf(nTemp, zTemp, "rowid");
+ sqlite3XPrintf(p, "rowid");
}else{
- sqlite3_snprintf(nTemp, zTemp, "c%d", (int)pExpr->iColumn);
+ sqlite3XPrintf(p, "c%d", (int)pExpr->iColumn);
}
break;
}
@@ -68479,21 +73475,19 @@ static int displayP4Expr(int nTemp, char *zTemp, Expr *pExpr){
case TK_NOTNULL: zOp = "NOTNULL"; break;
default:
- sqlite3_snprintf(nTemp, zTemp, "%s", "expr");
+ sqlite3XPrintf(p, "%s", "expr");
break;
}
if( zOp ){
- sqlite3_snprintf(nTemp, zTemp, "%s(", zOp);
- n = sqlite3Strlen30(zTemp);
- n += displayP4Expr(nTemp-n, zTemp+n, pExpr->pLeft);
- if( npRight ){
- zTemp[n++] = ',';
- n += displayP4Expr(nTemp-n, zTemp+n, pExpr->pRight);
+ sqlite3XPrintf(p, "%s(", zOp);
+ displayP4Expr(p, pExpr->pLeft);
+ if( pExpr->pRight ){
+ sqlite3StrAccumAppend(p, ",", 1);
+ displayP4Expr(p, pExpr->pRight);
}
- sqlite3_snprintf(nTemp-n, zTemp+n, ")");
+ sqlite3StrAccumAppend(p, ")", 1);
}
- return sqlite3Strlen30(zTemp);
}
#endif /* VDBE_DISPLAY_P4 && defined(SQLITE_ENABLE_CURSOR_HINTS) */
@@ -68505,72 +73499,57 @@ static int displayP4Expr(int nTemp, char *zTemp, Expr *pExpr){
*/
static char *displayP4(Op *pOp, char *zTemp, int nTemp){
char *zP4 = zTemp;
+ StrAccum x;
assert( nTemp>=20 );
+ sqlite3StrAccumInit(&x, 0, zTemp, nTemp, 0);
switch( pOp->p4type ){
case P4_KEYINFO: {
- int i, j;
+ int j;
KeyInfo *pKeyInfo = pOp->p4.pKeyInfo;
assert( pKeyInfo->aSortOrder!=0 );
- sqlite3_snprintf(nTemp, zTemp, "k(%d", pKeyInfo->nField);
- i = sqlite3Strlen30(zTemp);
- for(j=0; jnField; j++){
+ sqlite3XPrintf(&x, "k(%d", pKeyInfo->nKeyField);
+ for(j=0; jnKeyField; j++){
CollSeq *pColl = pKeyInfo->aColl[j];
- const char *zColl = pColl ? pColl->zName : "nil";
- int n = sqlite3Strlen30(zColl);
- if( n==6 && memcmp(zColl,"BINARY",6)==0 ){
- zColl = "B";
- n = 1;
- }
- if( i+n>nTemp-7 ){
- memcpy(&zTemp[i],",...",4);
- i += 4;
- break;
- }
- zTemp[i++] = ',';
- if( pKeyInfo->aSortOrder[j] ){
- zTemp[i++] = '-';
- }
- memcpy(&zTemp[i], zColl, n+1);
- i += n;
+ const char *zColl = pColl ? pColl->zName : "";
+ if( strcmp(zColl, "BINARY")==0 ) zColl = "B";
+ sqlite3XPrintf(&x, ",%s%s", pKeyInfo->aSortOrder[j] ? "-" : "", zColl);
}
- zTemp[i++] = ')';
- zTemp[i] = 0;
- assert( ip4.pExpr);
+ displayP4Expr(&x, pOp->p4.pExpr);
break;
}
#endif
case P4_COLLSEQ: {
CollSeq *pColl = pOp->p4.pColl;
- sqlite3_snprintf(nTemp, zTemp, "(%.20s)", pColl->zName);
+ sqlite3XPrintf(&x, "(%.20s)", pColl->zName);
break;
}
case P4_FUNCDEF: {
FuncDef *pDef = pOp->p4.pFunc;
- sqlite3_snprintf(nTemp, zTemp, "%s(%d)", pDef->zName, pDef->nArg);
+ sqlite3XPrintf(&x, "%s(%d)", pDef->zName, pDef->nArg);
break;
}
-#ifdef SQLITE_DEBUG
+#if defined(SQLITE_DEBUG) || defined(VDBE_PROFILE)
case P4_FUNCCTX: {
FuncDef *pDef = pOp->p4.pCtx->pFunc;
- sqlite3_snprintf(nTemp, zTemp, "%s(%d)", pDef->zName, pDef->nArg);
+ sqlite3XPrintf(&x, "%s(%d)", pDef->zName, pDef->nArg);
break;
}
#endif
case P4_INT64: {
- sqlite3_snprintf(nTemp, zTemp, "%lld", *pOp->p4.pI64);
+ sqlite3XPrintf(&x, "%lld", *pOp->p4.pI64);
break;
}
case P4_INT32: {
- sqlite3_snprintf(nTemp, zTemp, "%d", pOp->p4.i);
+ sqlite3XPrintf(&x, "%d", pOp->p4.i);
break;
}
case P4_REAL: {
- sqlite3_snprintf(nTemp, zTemp, "%.16g", *pOp->p4.pReal);
+ sqlite3XPrintf(&x, "%.16g", *pOp->p4.pReal);
break;
}
case P4_MEM: {
@@ -68578,11 +73557,11 @@ static char *displayP4(Op *pOp, char *zTemp, int nTemp){
if( pMem->flags & MEM_Str ){
zP4 = pMem->z;
}else if( pMem->flags & MEM_Int ){
- sqlite3_snprintf(nTemp, zTemp, "%lld", pMem->u.i);
+ sqlite3XPrintf(&x, "%lld", pMem->u.i);
}else if( pMem->flags & MEM_Real ){
- sqlite3_snprintf(nTemp, zTemp, "%.16g", pMem->u.r);
+ sqlite3XPrintf(&x, "%.16g", pMem->u.r);
}else if( pMem->flags & MEM_Null ){
- sqlite3_snprintf(nTemp, zTemp, "NULL");
+ zP4 = "NULL";
}else{
assert( pMem->flags & MEM_Blob );
zP4 = "(blob)";
@@ -68592,22 +73571,34 @@ static char *displayP4(Op *pOp, char *zTemp, int nTemp){
#ifndef SQLITE_OMIT_VIRTUALTABLE
case P4_VTAB: {
sqlite3_vtab *pVtab = pOp->p4.pVtab->pVtab;
- sqlite3_snprintf(nTemp, zTemp, "vtab:%p", pVtab);
+ sqlite3XPrintf(&x, "vtab:%p", pVtab);
break;
}
#endif
case P4_INTARRAY: {
- sqlite3_snprintf(nTemp, zTemp, "intarray");
+ int i;
+ int *ai = pOp->p4.ai;
+ int n = ai[0]; /* The first element of an INTARRAY is always the
+ ** count of the number of elements to follow */
+ for(i=1; i<=n; i++){
+ sqlite3XPrintf(&x, ",%d", ai[i]);
+ }
+ zTemp[0] = '[';
+ sqlite3StrAccumAppend(&x, "]", 1);
break;
}
case P4_SUBPROGRAM: {
- sqlite3_snprintf(nTemp, zTemp, "program");
+ sqlite3XPrintf(&x, "program");
break;
}
case P4_ADVANCE: {
zTemp[0] = 0;
break;
}
+ case P4_TABLE: {
+ sqlite3XPrintf(&x, "%s", pOp->p4.pTab->zName);
+ break;
+ }
default: {
zP4 = pOp->p4.z;
if( zP4==0 ){
@@ -68616,6 +73607,7 @@ static char *displayP4(Op *pOp, char *zTemp, int nTemp){
}
}
}
+ sqlite3StrAccumFinish(&x);
assert( zP4!=0 );
return zP4;
}
@@ -68638,7 +73630,7 @@ SQLITE_PRIVATE void sqlite3VdbeUsesBtree(Vdbe *p, int i){
}
}
-#if !defined(SQLITE_OMIT_SHARED_CACHE) && SQLITE_THREADSAFE>0
+#if !defined(SQLITE_OMIT_SHARED_CACHE)
/*
** If SQLite is compiled to support shared-cache mode and to be threadsafe,
** this routine obtains the mutex associated with each BtShared structure
@@ -68728,6 +73720,21 @@ SQLITE_PRIVATE void sqlite3VdbePrintOp(FILE *pOut, int pc, Op *pOp){
}
#endif
+/*
+** Initialize an array of N Mem element.
+*/
+static void initMemArray(Mem *p, int N, sqlite3 *db, u16 flags){
+ while( (N--)>0 ){
+ p->db = db;
+ p->flags = flags;
+ p->szMalloc = 0;
+#ifdef SQLITE_DEBUG
+ p->pScopyFrom = 0;
+#endif
+ p++;
+ }
+}
+
/*
** Release an array of N Mem elements
*/
@@ -68735,7 +73742,6 @@ static void releaseMemArray(Mem *p, int N){
if( p && N ){
Mem *pEnd = &p[N];
sqlite3 *db = p->db;
- u8 malloc_failed = db->mallocFailed;
if( db->pnBytesFreed ){
do{
if( p->szMalloc ) sqlite3DbFree(db, p->zMalloc);
@@ -68765,13 +73771,12 @@ static void releaseMemArray(Mem *p, int N){
if( p->flags&(MEM_Agg|MEM_Dyn|MEM_Frame|MEM_RowSet) ){
sqlite3VdbeMemRelease(p);
}else if( p->szMalloc ){
- sqlite3DbFree(db, p->zMalloc);
+ sqlite3DbFreeNN(db, p->zMalloc);
p->szMalloc = 0;
}
p->flags = MEM_Undefined;
}while( (++p)mallocFailed = malloc_failed;
}
}
@@ -68787,6 +73792,7 @@ SQLITE_PRIVATE void sqlite3VdbeFrameDelete(VdbeFrame *p){
sqlite3VdbeFreeCursor(p->v, apCsr[i]);
}
releaseMemArray(aMem, p->nChildMem);
+ sqlite3VdbeDeleteAuxData(p->v->db, &p->pAuxData, -1, 0);
sqlite3DbFree(p->v->db, p);
}
@@ -68829,10 +73835,10 @@ SQLITE_PRIVATE int sqlite3VdbeList(
releaseMemArray(pMem, 8);
p->pResultSet = 0;
- if( p->rc==SQLITE_NOMEM ){
+ if( p->rc==SQLITE_NOMEM_BKPT ){
/* This happens if a malloc() inside a call to sqlite3_column_text() or
** sqlite3_column_text16() failed. */
- db->mallocFailed = 1;
+ sqlite3OomFault(db);
return SQLITE_ERROR;
}
@@ -68940,6 +73946,7 @@ SQLITE_PRIVATE int sqlite3VdbeList(
pMem->flags = MEM_Str|MEM_Term;
zP4 = displayP4(pOp, pMem->z, pMem->szMalloc);
if( zP4!=pMem->z ){
+ pMem->n = 0;
sqlite3VdbeMemSetStr(pMem, zP4, -1, SQLITE_UTF8, 0);
}else{
assert( pMem->z!=0 );
@@ -69030,41 +74037,43 @@ SQLITE_PRIVATE void sqlite3VdbeIOTraceSql(Vdbe *p){
}
#endif /* !SQLITE_OMIT_TRACE && SQLITE_ENABLE_IOTRACE */
-/*
-** Allocate space from a fixed size buffer and return a pointer to
-** that space. If insufficient space is available, return NULL.
+/* An instance of this object describes bulk memory available for use
+** by subcomponents of a prepared statement. Space is allocated out
+** of a ReusableSpace object by the allocSpace() routine below.
+*/
+struct ReusableSpace {
+ u8 *pSpace; /* Available memory */
+ int nFree; /* Bytes of available memory */
+ int nNeeded; /* Total bytes that could not be allocated */
+};
+
+/* Try to allocate nByte bytes of 8-byte aligned bulk memory for pBuf
+** from the ReusableSpace object. Return a pointer to the allocated
+** memory on success. If insufficient memory is available in the
+** ReusableSpace object, increase the ReusableSpace.nNeeded
+** value by the amount needed and return NULL.
**
-** The pBuf parameter is the initial value of a pointer which will
-** receive the new memory. pBuf is normally NULL. If pBuf is not
-** NULL, it means that memory space has already been allocated and that
-** this routine should not allocate any new memory. When pBuf is not
-** NULL simply return pBuf. Only allocate new memory space when pBuf
-** is NULL.
+** If pBuf is not initially NULL, that means that the memory has already
+** been allocated by a prior call to this routine, so just return a copy
+** of pBuf and leave ReusableSpace unchanged.
**
-** nByte is the number of bytes of space needed.
-**
-** pFrom points to *pnFrom bytes of available space. New space is allocated
-** from the end of the pFrom buffer and *pnFrom is decremented.
-**
-** *pnNeeded is a counter of the number of bytes of space that have failed
-** to allocate. If there is insufficient space in pFrom to satisfy the
-** request, then increment *pnNeeded by the amount of the request.
+** This allocator is employed to repurpose unused slots at the end of the
+** opcode array of prepared state for other memory needs of the prepared
+** statement.
*/
static void *allocSpace(
- void *pBuf, /* Where return pointer will be stored */
- int nByte, /* Number of bytes to allocate */
- u8 *pFrom, /* Memory available for allocation */
- int *pnFrom, /* IN/OUT: Space available at pFrom */
- int *pnNeeded /* If allocation cannot be made, increment *pnByte */
+ struct ReusableSpace *p, /* Bulk memory available for allocation */
+ void *pBuf, /* Pointer to a prior allocation */
+ int nByte /* Bytes of memory needed */
){
- assert( EIGHT_BYTE_ALIGNMENT(pFrom) );
+ assert( EIGHT_BYTE_ALIGNMENT(p->pSpace) );
if( pBuf==0 ){
nByte = ROUND8(nByte);
- if( nByte <= *pnFrom ){
- *pnFrom -= nByte;
- pBuf = &pFrom[*pnFrom];
+ if( nByte <= p->nFree ){
+ p->nFree -= nByte;
+ pBuf = &p->pSpace[p->nFree];
}else{
- *pnNeeded += nByte;
+ p->nNeeded += nByte;
}
}
assert( EIGHT_BYTE_ALIGNMENT(pBuf) );
@@ -69080,7 +74089,7 @@ SQLITE_PRIVATE void sqlite3VdbeRewind(Vdbe *p){
int i;
#endif
assert( p!=0 );
- assert( p->magic==VDBE_MAGIC_INIT );
+ assert( p->magic==VDBE_MAGIC_INIT || p->magic==VDBE_MAGIC_RESET );
/* There should be at least one opcode.
*/
@@ -69090,14 +74099,13 @@ SQLITE_PRIVATE void sqlite3VdbeRewind(Vdbe *p){
p->magic = VDBE_MAGIC_RUN;
#ifdef SQLITE_DEBUG
- for(i=1; inMem; i++){
+ for(i=0; inMem; i++){
assert( p->aMem[i].db==p->db );
}
#endif
p->pc = -1;
p->rc = SQLITE_OK;
p->errorAction = OE_Abort;
- p->magic = VDBE_MAGIC_RUN;
p->nChange = 0;
p->cacheCtr = 1;
p->minWriteFileFormat = 255;
@@ -69138,11 +74146,8 @@ SQLITE_PRIVATE void sqlite3VdbeMakeReady(
int nMem; /* Number of VM memory registers */
int nCursor; /* Number of cursors required */
int nArg; /* Number of arguments in subprograms */
- int nOnce; /* Number of OP_Once instructions */
int n; /* Loop counter */
- int nFree; /* Available free space */
- u8 *zCsr; /* Memory available for allocation */
- int nByte; /* How much extra memory is needed */
+ struct ReusableSpace x; /* Reusable bulk memory */
assert( p!=0 );
assert( p->nOp>0 );
@@ -69155,35 +74160,25 @@ SQLITE_PRIVATE void sqlite3VdbeMakeReady(
nMem = pParse->nMem;
nCursor = pParse->nTab;
nArg = pParse->nMaxArg;
- nOnce = pParse->nOnce;
- if( nOnce==0 ) nOnce = 1; /* Ensure at least one byte in p->aOnceFlag[] */
- /* For each cursor required, also allocate a memory cell. Memory
- ** cells (nMem+1-nCursor)..nMem, inclusive, will never be used by
- ** the vdbe program. Instead they are used to allocate space for
- ** VdbeCursor/BtCursor structures. The blob of memory associated with
- ** cursor 0 is stored in memory cell nMem. Memory cell (nMem-1)
- ** stores the blob of memory associated with cursor 1, etc.
- **
+ /* Each cursor uses a memory cell. The first cursor (cursor 0) can
+ ** use aMem[0] which is not otherwise used by the VDBE program. Allocate
+ ** space at the end of aMem[] for cursors 1 and greater.
** See also: allocateCursor().
*/
nMem += nCursor;
+ if( nCursor==0 && nMem>0 ) nMem++; /* Space for aMem[0] even if not used */
- /* zCsr will initially point to nFree bytes of unused space at the
- ** end of the opcode array, p->aOp. The computation of nFree is
- ** conservative - it might be smaller than the true number of free
- ** bytes, but never larger. nFree must be a multiple of 8 - it is
- ** rounded down if is not.
+ /* Figure out how much reusable memory is available at the end of the
+ ** opcode array. This extra memory will be reallocated for other elements
+ ** of the prepared statement.
*/
- n = ROUND8(sizeof(Op)*p->nOp); /* Bytes of opcode space used */
- zCsr = &((u8*)p->aOp)[n]; /* Unused opcode space */
- assert( EIGHT_BYTE_ALIGNMENT(zCsr) );
- nFree = ROUNDDOWN8(pParse->szOpAlloc - n); /* Bytes of unused space */
- assert( nFree>=0 );
- if( nFree>0 ){
- memset(zCsr, 0, nFree);
- assert( EIGHT_BYTE_ALIGNMENT(&zCsr[nFree]) );
- }
+ n = ROUND8(sizeof(Op)*p->nOp); /* Bytes of opcode memory used */
+ x.pSpace = &((u8*)p->aOp)[n]; /* Unused opcode memory */
+ assert( EIGHT_BYTE_ALIGNMENT(x.pSpace) );
+ x.nFree = ROUNDDOWN8(pParse->szOpAlloc - n); /* Bytes of unused memory */
+ assert( x.nFree>=0 );
+ assert( EIGHT_BYTE_ALIGNMENT(&x.pSpace[x.nFree]) );
resolveP2Values(p, &nArg);
p->usesStmtJournal = (u8)(pParse->isMultiWrite && pParse->mayAbort);
@@ -69192,58 +74187,48 @@ SQLITE_PRIVATE void sqlite3VdbeMakeReady(
}
p->expired = 0;
- /* Memory for registers, parameters, cursor, etc, is allocated in two
- ** passes. On the first pass, we try to reuse unused space at the
+ /* Memory for registers, parameters, cursor, etc, is allocated in one or two
+ ** passes. On the first pass, we try to reuse unused memory at the
** end of the opcode array. If we are unable to satisfy all memory
** requirements by reusing the opcode array tail, then the second
- ** pass will fill in the rest using a fresh allocation.
+ ** pass will fill in the remainder using a fresh memory allocation.
**
** This two-pass approach that reuses as much memory as possible from
- ** the leftover space at the end of the opcode array can significantly
+ ** the leftover memory at the end of the opcode array. This can significantly
** reduce the amount of memory held by a prepared statement.
*/
do {
- nByte = 0;
- p->aMem = allocSpace(p->aMem, nMem*sizeof(Mem), zCsr, &nFree, &nByte);
- p->aVar = allocSpace(p->aVar, nVar*sizeof(Mem), zCsr, &nFree, &nByte);
- p->apArg = allocSpace(p->apArg, nArg*sizeof(Mem*), zCsr, &nFree, &nByte);
- p->azVar = allocSpace(p->azVar, nVar*sizeof(char*), zCsr, &nFree, &nByte);
- p->apCsr = allocSpace(p->apCsr, nCursor*sizeof(VdbeCursor*),
- zCsr, &nFree, &nByte);
- p->aOnceFlag = allocSpace(p->aOnceFlag, nOnce, zCsr, &nFree, &nByte);
+ x.nNeeded = 0;
+ p->aMem = allocSpace(&x, p->aMem, nMem*sizeof(Mem));
+ p->aVar = allocSpace(&x, p->aVar, nVar*sizeof(Mem));
+ p->apArg = allocSpace(&x, p->apArg, nArg*sizeof(Mem*));
+ p->apCsr = allocSpace(&x, p->apCsr, nCursor*sizeof(VdbeCursor*));
#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
- p->anExec = allocSpace(p->anExec, p->nOp*sizeof(i64), zCsr, &nFree, &nByte);
+ p->anExec = allocSpace(&x, p->anExec, p->nOp*sizeof(i64));
#endif
- if( nByte ){
- p->pFree = sqlite3DbMallocZero(db, nByte);
- }
- zCsr = p->pFree;
- nFree = nByte;
- }while( nByte && !db->mallocFailed );
+ if( x.nNeeded==0 ) break;
+ x.pSpace = p->pFree = sqlite3DbMallocRawNN(db, x.nNeeded);
+ x.nFree = x.nNeeded;
+ }while( !db->mallocFailed );
- p->nCursor = nCursor;
- p->nOnceFlag = nOnce;
- if( p->aVar ){
- p->nVar = (ynVar)nVar;
- for(n=0; naVar[n].flags = MEM_Null;
- p->aVar[n].db = db;
- }
- }
- if( p->azVar && pParse->nzVar>0 ){
- p->nzVar = pParse->nzVar;
- memcpy(p->azVar, pParse->azVar, p->nzVar*sizeof(p->azVar[0]));
- memset(pParse->azVar, 0, pParse->nzVar*sizeof(pParse->azVar[0]));
- }
- if( p->aMem ){
- p->aMem--; /* aMem[] goes from 1..nMem */
- p->nMem = nMem; /* not from 0..nMem-1 */
- for(n=1; n<=nMem; n++){
- p->aMem[n].flags = MEM_Undefined;
- p->aMem[n].db = db;
- }
- }
+ p->pVList = pParse->pVList;
+ pParse->pVList = 0;
p->explain = pParse->explain;
+ if( db->mallocFailed ){
+ p->nVar = 0;
+ p->nCursor = 0;
+ p->nMem = 0;
+ }else{
+ p->nCursor = nCursor;
+ p->nVar = (ynVar)nVar;
+ initMemArray(p->aVar, nVar, db, MEM_Null);
+ p->nMem = nMem;
+ initMemArray(p->aMem, nMem, db, MEM_Undefined);
+ memset(p->apCsr, 0, nCursor*sizeof(VdbeCursor*));
+#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
+ memset(p->anExec, 0, p->nOp*sizeof(i64));
+#endif
+ }
sqlite3VdbeRewind(p);
}
@@ -69255,15 +74240,15 @@ SQLITE_PRIVATE void sqlite3VdbeFreeCursor(Vdbe *p, VdbeCursor *pCx){
if( pCx==0 ){
return;
}
- assert( pCx->pBt==0 || pCx->eCurType==CURTYPE_BTREE );
+ assert( pCx->pBtx==0 || pCx->eCurType==CURTYPE_BTREE );
switch( pCx->eCurType ){
case CURTYPE_SORTER: {
sqlite3VdbeSorterClose(p->db, pCx);
break;
}
case CURTYPE_BTREE: {
- if( pCx->pBt ){
- sqlite3BtreeClose(pCx->pBt);
+ if( pCx->isEphemeral ){
+ if( pCx->pBtx ) sqlite3BtreeClose(pCx->pBtx);
/* The pCx->pCursor will be close automatically, if it exists, by
** the call above. */
}else{
@@ -69312,8 +74297,6 @@ SQLITE_PRIVATE int sqlite3VdbeFrameRestore(VdbeFrame *pFrame){
#ifdef SQLITE_ENABLE_STMT_SCANSTATUS
v->anExec = pFrame->anExec;
#endif
- v->aOnceFlag = pFrame->aOnceFlag;
- v->nOnceFlag = pFrame->nOnceFlag;
v->aOp = pFrame->aOp;
v->nOp = pFrame->nOp;
v->aMem = pFrame->aMem;
@@ -69323,6 +74306,9 @@ SQLITE_PRIVATE int sqlite3VdbeFrameRestore(VdbeFrame *pFrame){
v->db->lastRowid = pFrame->lastRowid;
v->nChange = pFrame->nChange;
v->db->nChange = pFrame->nDbChange;
+ sqlite3VdbeDeleteAuxData(v->db, &v->pAuxData, -1, 0);
+ v->pAuxData = pFrame->pAuxData;
+ pFrame->pAuxData = 0;
return pFrame->pc;
}
@@ -69345,7 +74331,7 @@ static void closeAllCursors(Vdbe *p){
assert( p->nFrame==0 );
closeCursorsInFrame(p);
if( p->aMem ){
- releaseMemArray(&p->aMem[1], p->nMem);
+ releaseMemArray(p->aMem, p->nMem);
}
while( p->pDelFrame ){
VdbeFrame *pDel = p->pDelFrame;
@@ -69354,31 +74340,10 @@ static void closeAllCursors(Vdbe *p){
}
/* Delete any auxdata allocations made by the VM */
- if( p->pAuxData ) sqlite3VdbeDeleteAuxData(p, -1, 0);
+ if( p->pAuxData ) sqlite3VdbeDeleteAuxData(p->db, &p->pAuxData, -1, 0);
assert( p->pAuxData==0 );
}
-/*
-** Clean up the VM after a single run.
-*/
-static void Cleanup(Vdbe *p){
- sqlite3 *db = p->db;
-
-#ifdef SQLITE_DEBUG
- /* Execute assert() statements to ensure that the Vdbe.apCsr[] and
- ** Vdbe.aMem[] arrays have already been cleaned up. */
- int i;
- if( p->apCsr ) for(i=0; inCursor; i++) assert( p->apCsr[i]==0 );
- if( p->aMem ){
- for(i=1; i<=p->nMem; i++) assert( p->aMem[i].flags==MEM_Undefined );
- }
-#endif
-
- sqlite3DbFree(db, p->zErrMsg);
- p->zErrMsg = 0;
- p->pResultSet = 0;
-}
-
/*
** Set the number of result columns that will be returned by this SQL
** statement. This is now set at compile time, rather than during
@@ -69386,21 +74351,18 @@ static void Cleanup(Vdbe *p){
** be called on an SQL statement before sqlite3_step().
*/
SQLITE_PRIVATE void sqlite3VdbeSetNumCols(Vdbe *p, int nResColumn){
- Mem *pColName;
int n;
sqlite3 *db = p->db;
- releaseMemArray(p->aColName, p->nResColumn*COLNAME_N);
- sqlite3DbFree(db, p->aColName);
+ if( p->nResColumn ){
+ releaseMemArray(p->aColName, p->nResColumn*COLNAME_N);
+ sqlite3DbFree(db, p->aColName);
+ }
n = nResColumn*COLNAME_N;
p->nResColumn = (u16)nResColumn;
- p->aColName = pColName = (Mem*)sqlite3DbMallocZero(db, sizeof(Mem)*n );
+ p->aColName = (Mem*)sqlite3DbMallocRawNN(db, sizeof(Mem)*n );
if( p->aColName==0 ) return;
- while( n-- > 0 ){
- pColName->flags = MEM_Null;
- pColName->db = p->db;
- pColName++;
- }
+ initMemArray(p->aColName, n, db, MEM_Null);
}
/*
@@ -69426,7 +74388,7 @@ SQLITE_PRIVATE int sqlite3VdbeSetColName(
assert( vardb->mallocFailed ){
assert( !zName || xDel!=SQLITE_DYNAMIC );
- return SQLITE_NOMEM;
+ return SQLITE_NOMEM_BKPT;
}
assert( p->aColName!=0 );
pColName = &(p->aColName[idx+var*p->nResColumn]);
@@ -69443,7 +74405,9 @@ SQLITE_PRIVATE int sqlite3VdbeSetColName(
*/
static int vdbeCommit(sqlite3 *db, Vdbe *p){
int i;
- int nTrans = 0; /* Number of databases with an active write-transaction */
+ int nTrans = 0; /* Number of databases with an active write-transaction
+ ** that are candidates for a two-phase commit using a
+ ** master-journal */
int rc = SQLITE_OK;
int needXcommit = 0;
@@ -69471,10 +74435,28 @@ static int vdbeCommit(sqlite3 *db, Vdbe *p){
for(i=0; rc==SQLITE_OK && inDb; i++){
Btree *pBt = db->aDb[i].pBt;
if( sqlite3BtreeIsInTrans(pBt) ){
+ /* Whether or not a database might need a master journal depends upon
+ ** its journal mode (among other things). This matrix determines which
+ ** journal modes use a master journal and which do not */
+ static const u8 aMJNeeded[] = {
+ /* DELETE */ 1,
+ /* PERSIST */ 1,
+ /* OFF */ 0,
+ /* TRUNCATE */ 1,
+ /* MEMORY */ 0,
+ /* WAL */ 0
+ };
+ Pager *pPager; /* Pager associated with pBt */
needXcommit = 1;
- if( i!=1 ) nTrans++;
sqlite3BtreeEnter(pBt);
- rc = sqlite3PagerExclusiveLock(sqlite3BtreePager(pBt));
+ pPager = sqlite3BtreePager(pBt);
+ if( db->aDb[i].safety_level!=PAGER_SYNCHRONOUS_OFF
+ && aMJNeeded[sqlite3PagerGetJournalMode(pPager)]
+ ){
+ assert( i!=1 );
+ nTrans++;
+ }
+ rc = sqlite3PagerExclusiveLock(pPager);
sqlite3BtreeLeave(pBt);
}
}
@@ -69532,7 +74514,6 @@ static int vdbeCommit(sqlite3 *db, Vdbe *p){
#ifndef SQLITE_OMIT_DISKIO
else{
sqlite3_vfs *pVfs = db->pVfs;
- int needSync = 0;
char *zMaster = 0; /* File-name for the master journal */
char const *zMainFile = sqlite3BtreeGetFilename(db->aDb[0].pBt);
sqlite3_file *pMaster = 0;
@@ -69544,7 +74525,7 @@ static int vdbeCommit(sqlite3 *db, Vdbe *p){
/* Select a master journal file name */
nMainFile = sqlite3Strlen30(zMainFile);
zMaster = sqlite3MPrintf(db, "%s-mjXXXXXX9XXz", zMainFile);
- if( zMaster==0 ) return SQLITE_NOMEM;
+ if( zMaster==0 ) return SQLITE_NOMEM_BKPT;
do {
u32 iRandom;
if( retryCount ){
@@ -69592,9 +74573,6 @@ static int vdbeCommit(sqlite3 *db, Vdbe *p){
continue; /* Ignore TEMP and :memory: databases */
}
assert( zFile[0]!=0 );
- if( !needSync && !sqlite3BtreeSyncDisabled(pBt) ){
- needSync = 1;
- }
rc = sqlite3OsWrite(pMaster, zFile, sqlite3Strlen30(zFile)+1, offset);
offset += sqlite3Strlen30(zFile)+1;
if( rc!=SQLITE_OK ){
@@ -69609,8 +74587,7 @@ static int vdbeCommit(sqlite3 *db, Vdbe *p){
/* Sync the master journal file. If the IOCAP_SEQUENTIAL device
** flag is set this is not required.
*/
- if( needSync
- && 0==(sqlite3OsDeviceCharacteristics(pMaster)&SQLITE_IOCAP_SEQUENTIAL)
+ if( 0==(sqlite3OsDeviceCharacteristics(pMaster)&SQLITE_IOCAP_SEQUENTIAL)
&& SQLITE_OK!=(rc = sqlite3OsSync(pMaster, SQLITE_SYNC_NORMAL))
){
sqlite3OsCloseFree(pMaster);
@@ -69646,7 +74623,7 @@ static int vdbeCommit(sqlite3 *db, Vdbe *p){
** doing this the directory is synced again before any individual
** transaction files are deleted.
*/
- rc = sqlite3OsDelete(pVfs, zMaster, needSync);
+ rc = sqlite3OsDelete(pVfs, zMaster, 1);
sqlite3DbFree(db, zMaster);
zMaster = 0;
if( rc ){
@@ -69720,60 +74697,59 @@ static void checkActiveVdbeCnt(sqlite3 *db){
** If an IO error occurs, an SQLITE_IOERR_XXX error code is returned.
** Otherwise SQLITE_OK.
*/
-SQLITE_PRIVATE int sqlite3VdbeCloseStatement(Vdbe *p, int eOp){
+static SQLITE_NOINLINE int vdbeCloseStatement(Vdbe *p, int eOp){
sqlite3 *const db = p->db;
int rc = SQLITE_OK;
+ int i;
+ const int iSavepoint = p->iStatement-1;
- /* If p->iStatement is greater than zero, then this Vdbe opened a
- ** statement transaction that should be closed here. The only exception
- ** is that an IO error may have occurred, causing an emergency rollback.
- ** In this case (db->nStatement==0), and there is nothing to do.
- */
- if( db->nStatement && p->iStatement ){
- int i;
- const int iSavepoint = p->iStatement-1;
+ assert( eOp==SAVEPOINT_ROLLBACK || eOp==SAVEPOINT_RELEASE);
+ assert( db->nStatement>0 );
+ assert( p->iStatement==(db->nStatement+db->nSavepoint) );
- assert( eOp==SAVEPOINT_ROLLBACK || eOp==SAVEPOINT_RELEASE);
- assert( db->nStatement>0 );
- assert( p->iStatement==(db->nStatement+db->nSavepoint) );
-
- for(i=0; inDb; i++){
- int rc2 = SQLITE_OK;
- Btree *pBt = db->aDb[i].pBt;
- if( pBt ){
- if( eOp==SAVEPOINT_ROLLBACK ){
- rc2 = sqlite3BtreeSavepoint(pBt, SAVEPOINT_ROLLBACK, iSavepoint);
- }
- if( rc2==SQLITE_OK ){
- rc2 = sqlite3BtreeSavepoint(pBt, SAVEPOINT_RELEASE, iSavepoint);
- }
- if( rc==SQLITE_OK ){
- rc = rc2;
- }
- }
- }
- db->nStatement--;
- p->iStatement = 0;
-
- if( rc==SQLITE_OK ){
+ for(i=0; inDb; i++){
+ int rc2 = SQLITE_OK;
+ Btree *pBt = db->aDb[i].pBt;
+ if( pBt ){
if( eOp==SAVEPOINT_ROLLBACK ){
- rc = sqlite3VtabSavepoint(db, SAVEPOINT_ROLLBACK, iSavepoint);
+ rc2 = sqlite3BtreeSavepoint(pBt, SAVEPOINT_ROLLBACK, iSavepoint);
+ }
+ if( rc2==SQLITE_OK ){
+ rc2 = sqlite3BtreeSavepoint(pBt, SAVEPOINT_RELEASE, iSavepoint);
}
if( rc==SQLITE_OK ){
- rc = sqlite3VtabSavepoint(db, SAVEPOINT_RELEASE, iSavepoint);
+ rc = rc2;
}
}
+ }
+ db->nStatement--;
+ p->iStatement = 0;
- /* If the statement transaction is being rolled back, also restore the
- ** database handles deferred constraint counter to the value it had when
- ** the statement transaction was opened. */
+ if( rc==SQLITE_OK ){
if( eOp==SAVEPOINT_ROLLBACK ){
- db->nDeferredCons = p->nStmtDefCons;
- db->nDeferredImmCons = p->nStmtDefImmCons;
+ rc = sqlite3VtabSavepoint(db, SAVEPOINT_ROLLBACK, iSavepoint);
}
+ if( rc==SQLITE_OK ){
+ rc = sqlite3VtabSavepoint(db, SAVEPOINT_RELEASE, iSavepoint);
+ }
+ }
+
+ /* If the statement transaction is being rolled back, also restore the
+ ** database handles deferred constraint counter to the value it had when
+ ** the statement transaction was opened. */
+ if( eOp==SAVEPOINT_ROLLBACK ){
+ db->nDeferredCons = p->nStmtDefCons;
+ db->nDeferredImmCons = p->nStmtDefImmCons;
}
return rc;
}
+SQLITE_PRIVATE int sqlite3VdbeCloseStatement(Vdbe *p, int eOp){
+ if( p->db->nStatement && p->iStatement ){
+ return vdbeCloseStatement(p, eOp);
+ }
+ return SQLITE_OK;
+}
+
/*
** This function is called when a transaction opened by the database
@@ -69833,14 +74809,13 @@ SQLITE_PRIVATE int sqlite3VdbeHalt(Vdbe *p){
** one, or the complete transaction if there is no statement transaction.
*/
- if( p->db->mallocFailed ){
- p->rc = SQLITE_NOMEM;
- }
- if( p->aOnceFlag ) memset(p->aOnceFlag, 0, p->nOnceFlag);
- closeAllCursors(p);
if( p->magic!=VDBE_MAGIC_RUN ){
return SQLITE_OK;
}
+ if( db->mallocFailed ){
+ p->rc = SQLITE_NOMEM_BKPT;
+ }
+ closeAllCursors(p);
checkActiveVdbeCnt(db);
/* No commit or rollback needed if the program never started or if the
@@ -69994,8 +74969,8 @@ SQLITE_PRIVATE int sqlite3VdbeHalt(Vdbe *p){
}
p->magic = VDBE_MAGIC_HALT;
checkActiveVdbeCnt(db);
- if( p->db->mallocFailed ){
- p->rc = SQLITE_NOMEM;
+ if( db->mallocFailed ){
+ p->rc = SQLITE_NOMEM_BKPT;
}
/* If the auto-commit flag is set to true, then any locks that were held
@@ -70031,16 +75006,16 @@ SQLITE_PRIVATE int sqlite3VdbeTransferError(Vdbe *p){
sqlite3 *db = p->db;
int rc = p->rc;
if( p->zErrMsg ){
- u8 mallocFailed = db->mallocFailed;
+ db->bBenignMalloc++;
sqlite3BeginBenignMalloc();
if( db->pErr==0 ) db->pErr = sqlite3ValueNew(db);
sqlite3ValueSetStr(db->pErr, -1, p->zErrMsg, SQLITE_UTF8, SQLITE_TRANSIENT);
sqlite3EndBenignMalloc();
- db->mallocFailed = mallocFailed;
- db->errCode = rc;
- }else{
- sqlite3Error(db, rc);
+ db->bBenignMalloc--;
+ }else if( db->pErr ){
+ sqlite3ValueSetNull(db->pErr);
}
+ db->errCode = rc;
return rc;
}
@@ -70077,6 +75052,10 @@ static void vdbeInvokeSqllog(Vdbe *v){
** VDBE_MAGIC_INIT.
*/
SQLITE_PRIVATE int sqlite3VdbeReset(Vdbe *p){
+#if defined(SQLITE_DEBUG) || defined(VDBE_PROFILE)
+ int i;
+#endif
+
sqlite3 *db;
db = p->db;
@@ -70094,8 +75073,6 @@ SQLITE_PRIVATE int sqlite3VdbeReset(Vdbe *p){
if( p->pc>=0 ){
vdbeInvokeSqllog(p);
sqlite3VdbeTransferError(p);
- sqlite3DbFree(db, p->zErrMsg);
- p->zErrMsg = 0;
if( p->runOnlyOnce ) p->expired = 1;
}else if( p->rc && p->expired ){
/* The expired flag was set on the VDBE before the first call
@@ -70103,13 +75080,21 @@ SQLITE_PRIVATE int sqlite3VdbeReset(Vdbe *p){
** called), set the database error in this case as well.
*/
sqlite3ErrorWithMsg(db, p->rc, p->zErrMsg ? "%s" : 0, p->zErrMsg);
- sqlite3DbFree(db, p->zErrMsg);
- p->zErrMsg = 0;
}
- /* Reclaim all memory used by the VDBE
+ /* Reset register contents and reclaim error message memory.
*/
- Cleanup(p);
+#ifdef SQLITE_DEBUG
+ /* Execute assert() statements to ensure that the Vdbe.apCsr[] and
+ ** Vdbe.aMem[] arrays have already been cleaned up. */
+ if( p->apCsr ) for(i=0; inCursor; i++) assert( p->apCsr[i]==0 );
+ if( p->aMem ){
+ for(i=0; i