From 349d6d8ad81965fdfef0773df6a6f4b74782be4a Mon Sep 17 00:00:00 2001 From: zhexuany Date: Sun, 10 Dec 2017 16:52:02 -0600 Subject: [PATCH 01/43] change golide to dep --- Gopkg.lock | 267 + Gopkg.toml | 89 + Makefile | 20 +- .../go-grpc-middleware/tags/context.go | 49 - .../go-grpc-middleware/tags/doc.go | 25 - .../go-grpc-middleware/tags/fieldextractor.go | 85 - .../go-grpc-middleware/tags/interceptors.go | 83 - .../go-grpc-middleware/tags/options.go | 44 - .../github.com/pingcap/mysqlx-driver/LICENSE | 373 -- .../pingcap/mysqlx-driver/appengine.go | 19 - .../pingcap/mysqlx-driver/buffer.go | 99 - .../pingcap/mysqlx-driver/capability.go | 130 - .../pingcap/mysqlx-driver/collations.go | 250 - .../pingcap/mysqlx-driver/config.go | 36 - .../pingcap/mysqlx-driver/connection.go | 397 -- .../github.com/pingcap/mysqlx-driver/const.go | 157 - .../pingcap/mysqlx-driver/convert.go | 110 - .../pingcap/mysqlx-driver/datatypes.go | 69 - .../pingcap/mysqlx-driver/driver.go | 64 - .../pingcap/mysqlx-driver/errors.go | 28 - .../pingcap/mysqlx-driver/mysql41.go | 110 - .../pingcap/mysqlx-driver/protocol.go | 672 -- .../pingcap/mysqlx-driver/result.go | 24 - .../github.com/pingcap/mysqlx-driver/rows.go | 268 - .../github.com/pingcap/mysqlx-driver/state.go | 91 - .../github.com/pingcap/mysqlx-driver/utils.go | 997 --- .../pingcap/mysqlx-driver/xconfig.go | 46 - .../Connection/mysqlx_connection.pb.go | 923 --- .../tipb/go-mysqlx/Crud/mysqlx_crud.pb.go | 4902 -------------- .../Datatypes/mysqlx_datatypes.pb.go | 1928 ------ .../tipb/go-mysqlx/Expect/mysqlx_expect.pb.go | 807 --- .../tipb/go-mysqlx/Expr/mysqlx_expr.pb.go | 2669 -------- .../tipb/go-mysqlx/Notice/mysqlx_notice.pb.go | 1281 ---- .../Resultset/mysqlx_resultset.pb.go | 1650 ----- .../go-mysqlx/Session/mysqlx_session.pb.go | 971 --- .../tipb/go-mysqlx/Sql/mysqlx_sql.pb.go | 619 -- .../pingcap/tipb/go-mysqlx/mysqlx.pb.go | 1045 --- vendor/github.com/BurntSushi/toml/.gitignore | 5 + vendor/github.com/BurntSushi/toml/.travis.yml | 15 + vendor/github.com/BurntSushi/toml/COMPATIBLE | 3 + .../github.com/BurntSushi/toml/COPYING | 0 vendor/github.com/BurntSushi/toml/Makefile | 19 + vendor/github.com/BurntSushi/toml/README.md | 218 + .../github.com/BurntSushi/toml/decode.go | 0 .../github.com/BurntSushi/toml/decode_meta.go | 0 .../github.com/BurntSushi/toml/decode_test.go | 1461 +++++ .../github.com/BurntSushi/toml/doc.go | 0 .../github.com/BurntSushi/toml/encode.go | 0 .../github.com/BurntSushi/toml/encode_test.go | 615 ++ .../BurntSushi/toml/encoding_types.go | 0 .../BurntSushi/toml/encoding_types_1.1.go | 0 .../github.com/BurntSushi/toml/lex.go | 0 .../github.com/BurntSushi/toml/parse.go | 0 vendor/github.com/BurntSushi/toml/session.vim | 1 + .../github.com/BurntSushi/toml/type_check.go | 0 .../github.com/BurntSushi/toml/type_fields.go | 0 vendor/github.com/Sirupsen/logrus/.gitignore | 1 + vendor/github.com/Sirupsen/logrus/.travis.yml | 8 + .../github.com/Sirupsen/logrus/CHANGELOG.md | 94 + .../github.com/Sirupsen/logrus/LICENSE | 0 vendor/github.com/Sirupsen/logrus/README.md | 476 ++ .../github.com/Sirupsen/logrus/alt_exit.go | 0 .../Sirupsen/logrus/alt_exit_test.go | 74 + .../github.com/Sirupsen/logrus/doc.go | 0 .../github.com/Sirupsen/logrus/entry.go | 0 .../github.com/Sirupsen/logrus/entry_test.go | 77 + .../github.com/Sirupsen/logrus/exported.go | 0 .../github.com/Sirupsen/logrus/formatter.go | 0 .../Sirupsen/logrus/formatter_bench_test.go | 101 + .../github.com/Sirupsen/logrus/hook_test.go | 122 + .../github.com/Sirupsen/logrus/hooks.go | 0 .../Sirupsen/logrus/json_formatter.go | 0 .../Sirupsen/logrus/json_formatter_test.go | 199 + .../github.com/Sirupsen/logrus/logger.go | 0 .../Sirupsen/logrus/logger_bench_test.go | 61 + .../github.com/Sirupsen/logrus/logrus.go | 0 .../github.com/Sirupsen/logrus/logrus_test.go | 386 ++ .../Sirupsen/logrus/terminal_appengine.go | 0 .../Sirupsen/logrus/terminal_bsd.go | 0 .../Sirupsen/logrus/terminal_linux.go | 0 .../Sirupsen/logrus/terminal_notwindows.go | 0 .../Sirupsen/logrus/terminal_solaris.go | 0 .../Sirupsen/logrus/terminal_windows.go | 0 .../Sirupsen/logrus/text_formatter.go | 0 .../Sirupsen/logrus/text_formatter_test.go | 87 + .../github.com/Sirupsen/logrus/writer.go | 0 vendor/github.com/apache/thrift/.clang-format | 56 + vendor/github.com/apache/thrift/.dockerignore | 1 + vendor/github.com/apache/thrift/.editorconfig | 112 + .../github.com/apache/thrift/.gitattributes | 1 + vendor/github.com/apache/thrift/.gitignore | 326 + vendor/github.com/apache/thrift/.travis.yml | 199 + vendor/github.com/apache/thrift/CHANGES | 2366 +++++++ .../github.com/apache/thrift/CMakeLists.txt | 117 + .../github.com/apache/thrift/CONTRIBUTING.md | 49 + vendor/github.com/apache/thrift/Dockerfile | 61 + .../github.com/apache/thrift/LICENSE | 0 vendor/github.com/apache/thrift/Makefile.am | 131 + .../github.com/apache/thrift/NOTICE | 0 vendor/github.com/apache/thrift/README.md | 166 + .../github.com/apache/thrift/Thrift.podspec | 18 + vendor/github.com/apache/thrift/appveyor.yml | 93 + vendor/github.com/apache/thrift/bootstrap.sh | 54 + vendor/github.com/apache/thrift/bower.json | 16 + vendor/github.com/apache/thrift/cleanup.sh | 89 + vendor/github.com/apache/thrift/composer.json | 30 + vendor/github.com/apache/thrift/configure.ac | 959 +++ vendor/github.com/apache/thrift/doap.rdf | 132 + .../github.com/apache/thrift/lib/Makefile.am | 109 + .../apache/thrift/lib/go/Makefile.am | 42 + .../github.com/apache/thrift/lib/go/README.md | 81 + .../apache/thrift/lib/go/coding_standards.md | 1 + .../lib/go/thrift/application_exception.go | 0 .../go/thrift/application_exception_test.go | 41 + .../thrift/lib/go/thrift/binary_protocol.go | 0 .../lib/go/thrift/binary_protocol_test.go | 28 + .../lib/go/thrift/buffered_transport.go | 0 .../lib/go/thrift/buffered_transport_test.go | 29 + .../thrift/lib/go/thrift/compact_protocol.go | 0 .../lib/go/thrift/compact_protocol_test.go | 53 + .../thrift/lib/go/thrift/debug_protocol.go | 0 .../thrift/lib/go/thrift/deserializer.go | 0 .../apache/thrift/lib/go/thrift/exception.go | 0 .../thrift/lib/go/thrift/exception_test.go | 69 + .../apache/thrift/lib/go/thrift/field.go | 0 .../thrift/lib/go/thrift/framed_transport.go | 0 .../lib/go/thrift/framed_transport_test.go | 29 + .../thrift/lib/go/thrift/http_client.go | 0 .../thrift/lib/go/thrift/http_client_test.go | 106 + .../thrift/lib/go/thrift/http_transport.go | 0 .../lib/go/thrift/iostream_transport.go | 0 .../lib/go/thrift/iostream_transport_test.go | 52 + .../thrift/lib/go/thrift/json_protocol.go | 0 .../lib/go/thrift/json_protocol_test.go | 649 ++ .../lib/go/thrift/lowlevel_benchmarks_test.go | 396 ++ .../thrift/lib/go/thrift/memory_buffer.go | 0 .../lib/go/thrift/memory_buffer_test.go | 29 + .../thrift/lib/go/thrift/messagetype.go | 0 .../lib/go/thrift/multiplexed_protocol.go | 0 .../apache/thrift/lib/go/thrift/numeric.go | 0 .../apache/thrift/lib/go/thrift/pointerize.go | 0 .../apache/thrift/lib/go/thrift/processor.go | 0 .../thrift/lib/go/thrift/processor_factory.go | 0 .../apache/thrift/lib/go/thrift/protocol.go | 0 .../lib/go/thrift/protocol_exception.go | 0 .../thrift/lib/go/thrift/protocol_factory.go | 0 .../thrift/lib/go/thrift/protocol_test.go | 479 ++ .../thrift/lib/go/thrift/rich_transport.go | 0 .../lib/go/thrift/rich_transport_test.go | 85 + .../apache/thrift/lib/go/thrift/serializer.go | 0 .../thrift/lib/go/thrift/serializer_test.go | 169 + .../lib/go/thrift/serializer_types_test.go | 633 ++ .../apache/thrift/lib/go/thrift/server.go | 0 .../thrift/lib/go/thrift/server_socket.go | 0 .../lib/go/thrift/server_socket_test.go | 50 + .../thrift/lib/go/thrift/server_test.go | 28 + .../thrift/lib/go/thrift/server_transport.go | 0 .../lib/go/thrift/simple_json_protocol.go | 0 .../go/thrift/simple_json_protocol_test.go | 715 ++ .../thrift/lib/go/thrift/simple_server.go | 0 .../apache/thrift/lib/go/thrift/socket.go | 0 .../thrift/lib/go/thrift/ssl_server_socket.go | 0 .../apache/thrift/lib/go/thrift/ssl_socket.go | 0 .../apache/thrift/lib/go/thrift/transport.go | 0 .../lib/go/thrift/transport_exception.go | 0 .../lib/go/thrift/transport_exception_test.go | 60 + .../thrift/lib/go/thrift/transport_factory.go | 0 .../thrift/lib/go/thrift/transport_test.go | 176 + .../apache/thrift/lib/go/thrift/type.go | 0 .../thrift/lib/go/thrift/zlib_transport.go | 0 .../lib/go/thrift/zlib_transport_test.go | 33 + vendor/github.com/apache/thrift/package.json | 54 + .../apache/thrift/sonar-project.properties | 140 + vendor/github.com/beorn7/perks/.gitignore | 2 + .../github.com/beorn7/perks/LICENSE | 0 vendor/github.com/beorn7/perks/README.md | 31 + .../beorn7/perks/quantile/bench_test.go | 63 + .../beorn7/perks/quantile/example_test.go | 121 + .../beorn7/perks/quantile/exampledata.txt | 2388 +++++++ .../beorn7/perks/quantile/stream.go | 0 .../beorn7/perks/quantile/stream_test.go | 188 + .../blacktear23/go-proxyprotocol/.travis.yml | 12 + .../blacktear23/go-proxyprotocol/LICENSE | 0 .../blacktear23/go-proxyprotocol/README.md | 37 + .../go-proxyprotocol/proxy_protocol.go | 0 .../go-proxyprotocol/proxy_protocol_test.go | 0 .../codahale/hdrhistogram/.travis.yml | 5 + .../github.com/codahale/hdrhistogram/LICENSE | 0 .../codahale/hdrhistogram/README.md | 15 + .../github.com/codahale/hdrhistogram/hdr.go | 0 .../codahale/hdrhistogram/hdr_test.go | 388 ++ .../codahale/hdrhistogram/window.go | 0 .../codahale/hdrhistogram/window_test.go | 64 + vendor/github.com/coreos/etcd/.dockerignore | 1 + vendor/github.com/coreos/etcd/.gitignore | 15 + vendor/github.com/coreos/etcd/.godir | 1 + vendor/github.com/coreos/etcd/.header | 13 + vendor/github.com/coreos/etcd/.travis.yml | 83 + vendor/github.com/coreos/etcd/CONTRIBUTING.md | 62 + vendor/github.com/coreos/etcd/DCO | 36 + vendor/github.com/coreos/etcd/Dockerfile | 6 + .../github.com/coreos/etcd/Dockerfile-release | 17 + .../coreos/etcd/Dockerfile-release.arm64 | 11 + .../coreos/etcd/Dockerfile-release.ppc64le | 11 + .../github.com/coreos/etcd/LICENSE | 0 vendor/github.com/coreos/etcd/MAINTAINERS | 8 + vendor/github.com/coreos/etcd/NEWS | 106 + .../github.com/coreos/etcd/NOTICE | 0 vendor/github.com/coreos/etcd/Procfile | 6 + vendor/github.com/coreos/etcd/README.md | 135 + vendor/github.com/coreos/etcd/ROADMAP.md | 23 + vendor/github.com/coreos/etcd/V2Procfile | 5 + .../coreos/etcd/auth/authpb/auth.pb.go | 0 .../coreos/etcd/auth/authpb/auth.proto | 37 + vendor/github.com/coreos/etcd/auth/doc.go | 16 + vendor/github.com/coreos/etcd/auth/jwt.go | 137 + .../coreos/etcd/auth/range_perm_cache.go | 133 + .../coreos/etcd/auth/range_perm_cache_test.go | 59 + .../coreos/etcd/auth/simple_token.go | 220 + vendor/github.com/coreos/etcd/auth/store.go | 1059 +++ .../github.com/coreos/etcd/auth/store_test.go | 655 ++ .../coreos/etcd/bill-of-materials.json | 379 ++ .../etcd/bill-of-materials.override.json | 26 + vendor/github.com/coreos/etcd/build | 64 + vendor/github.com/coreos/etcd/build.bat | 1 + vendor/github.com/coreos/etcd/build.ps1 | 81 + .../github.com/coreos/etcd/client/README.md | 117 + .../coreos/etcd/client/auth_role.go | 237 + .../coreos/etcd/client/auth_user.go | 320 + .../coreos/etcd/client/cancelreq.go | 18 + .../github.com/coreos/etcd/client/client.go | 703 ++ .../coreos/etcd/client/client_test.go | 1053 +++ .../coreos/etcd/client/cluster_error.go | 37 + vendor/github.com/coreos/etcd/client/curl.go | 70 + .../github.com/coreos/etcd/client/discover.go | 40 + vendor/github.com/coreos/etcd/client/doc.go | 73 + .../coreos/etcd/client/fake_transport_test.go | 40 + .../coreos/etcd/client/keys.generated.go | 1087 ++++ vendor/github.com/coreos/etcd/client/keys.go | 682 ++ .../coreos/etcd/client/keys_bench_test.go | 87 + .../coreos/etcd/client/keys_test.go | 1429 ++++ .../github.com/coreos/etcd/client/members.go | 304 + .../coreos/etcd/client/members_test.go | 599 ++ vendor/github.com/coreos/etcd/client/util.go | 53 + .../github.com/coreos/etcd/clientv3/README.md | 85 + .../github.com/coreos/etcd/clientv3/auth.go | 0 .../coreos/etcd/clientv3/balancer.go | 0 .../coreos/etcd/clientv3/balancer_test.go | 239 + .../github.com/coreos/etcd/clientv3/client.go | 0 .../coreos/etcd/clientv3/client_test.go | 154 + .../coreos/etcd/clientv3/cluster.go | 0 .../coreos/etcd/clientv3/compact_op.go | 0 .../coreos/etcd/clientv3/compact_op_test.go | 30 + .../coreos/etcd/clientv3/compare.go | 0 .../coreos/etcd/clientv3/concurrency/doc.go | 0 .../etcd/clientv3/concurrency/election.go | 0 .../coreos/etcd/clientv3/concurrency/key.go | 0 .../coreos/etcd/clientv3/concurrency/mutex.go | 0 .../etcd/clientv3/concurrency/session.go | 0 .../coreos/etcd/clientv3/concurrency/stm.go | 0 .../github.com/coreos/etcd/clientv3/config.go | 0 .../github.com/coreos/etcd/clientv3/doc.go | 0 .../coreos/etcd/clientv3/example_auth_test.go | 113 + .../etcd/clientv3/example_cluster_test.go | 103 + .../coreos/etcd/clientv3/example_kv_test.go | 279 + .../etcd/clientv3/example_lease_test.go | 141 + .../etcd/clientv3/example_maintenence_test.go | 68 + .../etcd/clientv3/example_metrics_test.go | 84 + .../coreos/etcd/clientv3/example_test.go | 76 + .../etcd/clientv3/example_watch_test.go | 100 + .../github.com/coreos/etcd/clientv3/kv.go | 0 .../github.com/coreos/etcd/clientv3/lease.go | 0 .../github.com/coreos/etcd/clientv3/logger.go | 0 .../coreos/etcd/clientv3/main_test.go | 67 + .../coreos/etcd/clientv3/maintenance.go | 0 .../github.com/coreos/etcd/clientv3/op.go | 0 .../coreos/etcd/clientv3/op_test.go | 38 + .../github.com/coreos/etcd/clientv3/retry.go | 0 .../github.com/coreos/etcd/clientv3/sort.go | 0 .../github.com/coreos/etcd/clientv3/txn.go | 0 .../coreos/etcd/clientv3/txn_test.go | 105 + .../github.com/coreos/etcd/clientv3/watch.go | 0 .../coreos/etcd/clientv3/watch_test.go | 55 + vendor/github.com/coreos/etcd/cover | 31 + .../coreos/etcd/etcd.conf.yml.sample | 141 + .../coreos/etcd/etcdserver/api/capability.go | 86 + .../coreos/etcd/etcdserver/api/cluster.go | 41 + .../coreos/etcd/etcdserver/api/doc.go | 16 + .../coreos/etcd/etcdserver/api/v3rpc/auth.go | 157 + .../coreos/etcd/etcdserver/api/v3rpc/codec.go | 34 + .../coreos/etcd/etcdserver/api/v3rpc/grpc.go | 53 + .../etcd/etcdserver/api/v3rpc/header.go | 46 + .../etcd/etcdserver/api/v3rpc/interceptor.go | 144 + .../coreos/etcd/etcdserver/api/v3rpc/key.go | 259 + .../coreos/etcd/etcdserver/api/v3rpc/lease.go | 123 + .../etcd/etcdserver/api/v3rpc/maintenance.go | 190 + .../etcd/etcdserver/api/v3rpc/member.go | 103 + .../etcd/etcdserver/api/v3rpc/metrics.go | 38 + .../coreos/etcd/etcdserver/api/v3rpc/quota.go | 89 + .../etcd/etcdserver/api/v3rpc/rpctypes/doc.go | 0 .../etcdserver/api/v3rpc/rpctypes/error.go | 0 .../api/v3rpc/rpctypes/error_test.go | 42 + .../etcd/etcdserver/api/v3rpc/rpctypes/md.go | 0 .../coreos/etcd/etcdserver/api/v3rpc/util.go | 103 + .../coreos/etcd/etcdserver/api/v3rpc/watch.go | 426 ++ .../coreos/etcd/etcdserver/apply.go | 878 +++ .../coreos/etcd/etcdserver/apply_auth.go | 196 + .../coreos/etcd/etcdserver/apply_v2.go | 140 + .../coreos/etcd/etcdserver/backend.go | 81 + .../coreos/etcd/etcdserver/cluster_util.go | 258 + .../etcd/etcdserver/cluster_util_test.go | 131 + .../coreos/etcd/etcdserver/config.go | 204 + .../coreos/etcd/etcdserver/config_test.go | 196 + .../etcd/etcdserver/consistent_index.go | 33 + .../etcd/etcdserver/consistent_index_test.go | 25 + .../github.com/coreos/etcd/etcdserver/doc.go | 16 + .../coreos/etcd/etcdserver/errors.go | 46 + .../etcdserver/etcdserverpb/etcdserver.pb.go | 0 .../etcdserver/etcdserverpb/etcdserver.proto | 34 + .../etcdserverpb/raft_internal.pb.go | 0 .../etcdserverpb/raft_internal.proto | 74 + .../etcd/etcdserver/etcdserverpb/rpc.pb.go | 0 .../etcd/etcdserver/etcdserverpb/rpc.proto | 984 +++ .../coreos/etcd/etcdserver/metrics.go | 102 + .../coreos/etcd/etcdserver/quota.go | 121 + .../github.com/coreos/etcd/etcdserver/raft.go | 594 ++ .../coreos/etcd/etcdserver/raft_test.go | 221 + .../coreos/etcd/etcdserver/server.go | 1660 +++++ .../coreos/etcd/etcdserver/server_test.go | 1662 +++++ .../coreos/etcd/etcdserver/snapshot_merge.go | 73 + .../coreos/etcd/etcdserver/storage.go | 98 + .../github.com/coreos/etcd/etcdserver/util.go | 97 + .../coreos/etcd/etcdserver/util_test.go | 89 + .../coreos/etcd/etcdserver/v2_server.go | 125 + .../coreos/etcd/etcdserver/v3_server.go | 754 +++ vendor/github.com/coreos/etcd/glide.lock | 158 + vendor/github.com/coreos/etcd/glide.yaml | 115 + vendor/github.com/coreos/etcd/main.go | 29 + vendor/github.com/coreos/etcd/main_test.go | 35 + vendor/github.com/coreos/etcd/mvcc/doc.go | 16 + vendor/github.com/coreos/etcd/mvcc/index.go | 219 + .../github.com/coreos/etcd/mvcc/index_test.go | 286 + .../github.com/coreos/etcd/mvcc/key_index.go | 332 + .../coreos/etcd/mvcc/key_index_test.go | 654 ++ vendor/github.com/coreos/etcd/mvcc/kv.go | 147 + vendor/github.com/coreos/etcd/mvcc/kv_test.go | 831 +++ vendor/github.com/coreos/etcd/mvcc/kv_view.go | 53 + vendor/github.com/coreos/etcd/mvcc/kvstore.go | 459 ++ .../coreos/etcd/mvcc/kvstore_bench_test.go | 124 + .../coreos/etcd/mvcc/kvstore_compaction.go | 66 + .../etcd/mvcc/kvstore_compaction_test.go | 135 + .../coreos/etcd/mvcc/kvstore_test.go | 717 +++ .../coreos/etcd/mvcc/kvstore_txn.go | 253 + vendor/github.com/coreos/etcd/mvcc/metrics.go | 174 + .../coreos/etcd/mvcc/metrics_txn.go | 67 + .../coreos/etcd/mvcc/mvccpb/kv.pb.go | 0 .../coreos/etcd/mvcc/mvccpb/kv.proto | 49 + .../github.com/coreos/etcd/mvcc/revision.go | 67 + .../coreos/etcd/mvcc/revision_test.go | 53 + vendor/github.com/coreos/etcd/mvcc/util.go | 56 + .../coreos/etcd/mvcc/watchable_store.go | 522 ++ .../etcd/mvcc/watchable_store_bench_test.go | 200 + .../coreos/etcd/mvcc/watchable_store_test.go | 459 ++ .../coreos/etcd/mvcc/watchable_store_txn.go | 53 + vendor/github.com/coreos/etcd/mvcc/watcher.go | 171 + .../coreos/etcd/mvcc/watcher_bench_test.go | 38 + .../coreos/etcd/mvcc/watcher_group.go | 283 + .../coreos/etcd/mvcc/watcher_test.go | 344 + vendor/github.com/coreos/etcd/test | 454 ++ vendor/github.com/coreos/gofail/.travis.yml | 17 + .../github.com/coreos/gofail/LICENSE | 0 vendor/github.com/coreos/gofail/Makefile | 21 + vendor/github.com/coreos/gofail/README.md | 113 + vendor/github.com/coreos/gofail/gofail.go | 195 + .../coreos/gofail/runtime/failpoint.go | 0 .../github.com/coreos/gofail/runtime/http.go | 0 .../coreos/gofail/runtime/runtime.go | 0 .../github.com/coreos/gofail/runtime/terms.go | 0 .../coreos/gofail/runtime/terms_test.go | 76 + vendor/github.com/cznic/golex/AUTHORS | 12 + vendor/github.com/cznic/golex/CONTRIBUTORS | 10 + .../github.com/cznic/golex/LICENSE | 0 vendor/github.com/cznic/golex/Makefile | 29 + vendor/github.com/cznic/golex/README | 8 + vendor/github.com/cznic/golex/all_test.go | 13 + vendor/github.com/cznic/golex/doc.go | 250 + vendor/github.com/cznic/golex/lex/Makefile | 53 + vendor/github.com/cznic/golex/lex/all_test.go | 47 + .../github.com/cznic/golex/lex/api.go | 0 vendor/github.com/cznic/golex/lex/dfa | 35 + .../github.com/cznic/golex/lex/doc.go | 0 vendor/github.com/cznic/golex/lex/example.l | 175 + .../cznic/golex/lex/example_test.go | 291 + vendor/github.com/cznic/golex/main.go | 152 + vendor/github.com/cznic/golex/render.go | 280 + vendor/github.com/cznic/mathutil/AUTHORS | 12 + vendor/github.com/cznic/mathutil/CONTRIBUTORS | 10 + .../github.com/cznic/mathutil/LICENSE | 0 vendor/github.com/cznic/mathutil/Makefile | 31 + vendor/github.com/cznic/mathutil/README | 10 + vendor/github.com/cznic/mathutil/all_test.go | 3530 ++++++++++ .../github.com/cznic/mathutil/bits.go | 0 .../github.com/cznic/mathutil/envelope.go | 0 .../github.com/cznic/mathutil/mathutil.go | 0 .../cznic/mathutil/nist-sts-2-1-1-report | 267 + .../github.com/cznic/mathutil/permute.go | 0 .../github.com/cznic/mathutil/primes.go | 0 .../github.com/cznic/mathutil/rat.go | 0 .../github.com/cznic/mathutil/rnd.go | 0 .../github.com/cznic/mathutil/tables.go | 0 .../github.com/cznic/mathutil/test_deps.go | 0 vendor/github.com/cznic/parser/README.md | 7 + vendor/github.com/cznic/parser/yacc/AUTHORS | 11 + .../github.com/cznic/parser/yacc/CONTRIBUTORS | 9 + .../github.com/cznic/parser/yacc/LICENSE | 0 vendor/github.com/cznic/parser/yacc/Makefile | 58 + .../github.com/cznic/parser/yacc/all_test.go | 108 + .../github.com/cznic/parser/yacc/api.go | 0 .../github.com/cznic/parser/yacc/ast.go | 0 .../github.com/cznic/parser/yacc/ast_test.go | 447 ++ .../github.com/cznic/parser/yacc/generate.go | 0 vendor/github.com/cznic/parser/yacc/go.l | 65 + .../github.com/cznic/parser/yacc/goscanner.go | 0 .../github.com/cznic/parser/yacc/lexer.go | 0 .../github.com/cznic/parser/yacc/parser.go | 0 vendor/github.com/cznic/parser/yacc/parser.y | 456 ++ vendor/github.com/cznic/parser/yacc/parser.yy | 203 + .../github.com/cznic/parser/yacc/scanner.go | 0 vendor/github.com/cznic/parser/yacc/xerrors | 0 vendor/github.com/cznic/parser/yacc/y.l | 65 + vendor/github.com/cznic/sortutil/AUTHORS | 11 + vendor/github.com/cznic/sortutil/CONTRIBUTORS | 10 + .../github.com/cznic/sortutil/LICENSE | 0 vendor/github.com/cznic/sortutil/Makefile | 35 + vendor/github.com/cznic/sortutil/README | 4 + vendor/github.com/cznic/sortutil/all_test.go | 407 ++ .../github.com/cznic/sortutil/sortutil.go | 0 vendor/github.com/cznic/strutil/AUTHORS | 12 + vendor/github.com/cznic/strutil/CONTRIBUTORS | 9 + .../github.com/cznic/strutil/LICENSE | 0 vendor/github.com/cznic/strutil/Makefile | 50 + vendor/github.com/cznic/strutil/README | 8 + vendor/github.com/cznic/strutil/all_test.go | 227 + .../github.com/cznic/strutil/strutil.go | 0 vendor/github.com/cznic/y/AUTHORS | 11 + vendor/github.com/cznic/y/CONTRIBUTORS | 9 + .../src => vendor}/github.com/cznic/y/LICENSE | 0 vendor/github.com/cznic/y/Makefile | 55 + vendor/github.com/cznic/y/README.md | 10 + vendor/github.com/cznic/y/all_test.go | 780 +++ .../src => vendor}/github.com/cznic/y/api.go | 0 .../src => vendor}/github.com/cznic/y/y.go | 0 .../github.com/go-sql-driver/mysql/.gitignore | 9 + .../go-sql-driver/mysql/.travis.yml | 89 + vendor/github.com/go-sql-driver/mysql/AUTHORS | 73 + .../go-sql-driver/mysql/CHANGELOG.md | 119 + .../go-sql-driver/mysql/CONTRIBUTING.md | 23 + .../github.com/go-sql-driver/mysql/LICENSE | 0 .../github.com/go-sql-driver/mysql/README.md | 478 ++ .../go-sql-driver/mysql/appengine.go | 0 .../mysql/benchmark_go18_test.go | 93 + .../go-sql-driver/mysql/benchmark_test.go | 246 + .../github.com/go-sql-driver/mysql/buffer.go | 0 .../go-sql-driver/mysql/collations.go | 0 .../go-sql-driver/mysql/connection.go | 0 .../go-sql-driver/mysql/connection_go18.go | 0 .../go-sql-driver/mysql/connection_test.go | 67 + .../github.com/go-sql-driver/mysql/const.go | 0 .../github.com/go-sql-driver/mysql/driver.go | 0 .../go-sql-driver/mysql/driver_go18_test.go | 522 ++ .../go-sql-driver/mysql/driver_test.go | 2001 ++++++ .../github.com/go-sql-driver/mysql/dsn.go | 0 .../go-sql-driver/mysql/dsn_test.go | 249 + .../github.com/go-sql-driver/mysql/errors.go | 0 .../go-sql-driver/mysql/errors_test.go | 42 + .../github.com/go-sql-driver/mysql/infile.go | 0 .../github.com/go-sql-driver/mysql/packets.go | 0 .../go-sql-driver/mysql/packets_test.go | 283 + .../github.com/go-sql-driver/mysql/result.go | 0 .../github.com/go-sql-driver/mysql/rows.go | 0 .../go-sql-driver/mysql/statement.go | 0 .../go-sql-driver/mysql/transaction.go | 0 .../github.com/go-sql-driver/mysql/utils.go | 0 .../go-sql-driver/mysql/utils_go17.go | 0 .../go-sql-driver/mysql/utils_go18.go | 0 .../go-sql-driver/mysql/utils_go18_test.go | 54 + .../go-sql-driver/mysql/utils_legacy.go | 0 .../go-sql-driver/mysql/utils_test.go | 277 + vendor/github.com/golang/protobuf/.gitignore | 16 + vendor/github.com/golang/protobuf/AUTHORS | 3 + .../github.com/golang/protobuf/CONTRIBUTORS | 3 + .../github.com/golang/protobuf/LICENSE | 0 .../github.com/golang/protobuf/Make.protobuf | 40 + vendor/github.com/golang/protobuf/Makefile | 55 + vendor/github.com/golang/protobuf/README.md | 241 + .../github.com/golang/protobuf/proto/Makefile | 43 + .../golang/protobuf/proto/all_test.go | 2278 +++++++ .../golang/protobuf/proto/any_test.go | 300 + .../github.com/golang/protobuf/proto/clone.go | 0 .../golang/protobuf/proto/clone_test.go | 300 + .../golang/protobuf/proto/decode.go | 0 .../golang/protobuf/proto/decode_test.go | 256 + .../golang/protobuf/proto/encode.go | 0 .../golang/protobuf/proto/encode_test.go | 83 + .../github.com/golang/protobuf/proto/equal.go | 0 .../golang/protobuf/proto/equal_test.go | 224 + .../golang/protobuf/proto/extensions.go | 0 .../golang/protobuf/proto/extensions_test.go | 536 ++ .../github.com/golang/protobuf/proto/lib.go | 0 .../golang/protobuf/proto/map_test.go | 46 + .../golang/protobuf/proto/message_set.go | 0 .../golang/protobuf/proto/message_set_test.go | 66 + .../golang/protobuf/proto/pointer_reflect.go | 0 .../golang/protobuf/proto/pointer_unsafe.go | 0 .../golang/protobuf/proto/properties.go | 0 .../golang/protobuf/proto/proto3_test.go | 135 + .../golang/protobuf/proto/size2_test.go | 63 + .../golang/protobuf/proto/size_test.go | 164 + .../github.com/golang/protobuf/proto/text.go | 0 .../golang/protobuf/proto/text_parser.go | 0 .../golang/protobuf/proto/text_parser_test.go | 673 ++ .../golang/protobuf/proto/text_test.go | 474 ++ .../github.com/golang/protobuf/ptypes/any.go | 136 + .../golang/protobuf/ptypes/any/any.pb.go | 0 .../golang/protobuf/ptypes/any/any.proto | 140 + .../golang/protobuf/ptypes/any_test.go | 113 + .../github.com/golang/protobuf/ptypes/doc.go | 35 + .../golang/protobuf/ptypes/duration.go | 102 + .../golang/protobuf/ptypes/duration_test.go | 121 + .../golang/protobuf/ptypes/regen.sh | 66 + .../golang/protobuf/ptypes/timestamp.go | 125 + .../golang/protobuf/ptypes/timestamp_test.go | 138 + vendor/github.com/golang/snappy/AUTHORS | 14 + vendor/github.com/golang/snappy/CONTRIBUTORS | 36 + .../github.com/golang/snappy/LICENSE | 0 vendor/github.com/golang/snappy/README | 7 + .../github.com/golang/snappy/decode.go | 0 .../github.com/golang/snappy/encode.go | 0 .../github.com/golang/snappy/snappy.go | 0 .../github.com/golang/snappy/snappy_test.go | 377 ++ vendor/github.com/google/btree/.travis.yml | 1 + .../github.com/google/btree/LICENSE | 0 vendor/github.com/google/btree/README.md | 12 + .../github.com/google/btree/btree.go | 0 .../github.com/google/btree/btree_mem.go | 0 vendor/github.com/google/btree/btree_test.go | 689 ++ vendor/github.com/gorilla/context/.travis.yml | 19 + .../github.com/gorilla/context/LICENSE | 0 vendor/github.com/gorilla/context/README.md | 7 + .../github.com/gorilla/context/context.go | 0 .../gorilla/context/context_test.go | 161 + .../github.com/gorilla/context/doc.go | 0 vendor/github.com/gorilla/mux/.travis.yml | 22 + .../github.com/gorilla/mux/LICENSE | 0 vendor/github.com/gorilla/mux/README.md | 340 + vendor/github.com/gorilla/mux/bench_test.go | 49 + .../github.com/gorilla/mux/context_gorilla.go | 0 .../gorilla/mux/context_gorilla_test.go | 40 + .../github.com/gorilla/mux/context_native.go | 0 .../gorilla/mux/context_native_test.go | 32 + .../github.com/gorilla/mux/doc.go | 0 .../github.com/gorilla/mux/mux.go | 0 vendor/github.com/gorilla/mux/mux_test.go | 1655 +++++ vendor/github.com/gorilla/mux/old_test.go | 710 ++ .../github.com/gorilla/mux/regexp.go | 0 .../github.com/gorilla/mux/route.go | 0 .../go-grpc-middleware/.gitignore | 199 + .../go-grpc-middleware/.travis.yml | 26 + .../grpc-ecosystem/go-grpc-middleware/DOC.md | 164 + .../grpc-ecosystem/go-grpc-middleware/LICENSE | 0 .../go-grpc-middleware/README.md | 86 + .../go-grpc-middleware/chain.go | 0 .../go-grpc-middleware/chain_test.go | 172 + .../go-grpc-middleware/checkup.sh | 21 + .../grpc-ecosystem/go-grpc-middleware/doc.go | 0 .../go-grpc-middleware/fixup.sh | 36 + .../go-grpc-middleware/test_all.sh | 14 + .../tracing/opentracing/DOC.md | 109 + .../tracing/opentracing/README.md | 1 + .../opentracing/client_interceptors.go | 0 .../tracing/opentracing/doc.go | 0 .../tracing/opentracing/id_extract.go | 0 .../tracing/opentracing/interceptors_test.go | 186 + .../tracing/opentracing/metadata.go | 0 .../tracing/opentracing/options.go | 0 .../opentracing/server_interceptors.go | 0 .../go-grpc-middleware/util/metautils/DOC.md | 114 + .../util/metautils/README.md | 1 + .../go-grpc-middleware/util/metautils/doc.go | 0 .../util/metautils/nicemd.go | 0 .../util/metautils/nicemd_test.go | 86 + .../util/metautils/single_key.go | 0 .../go-grpc-middleware/wrappers.go | 0 .../go-grpc-middleware/wrappers_test.go | 52 + .../go-grpc-prometheus/.gitignore | 197 + .../go-grpc-prometheus/.travis.yml | 13 + .../grpc-ecosystem/go-grpc-prometheus/LICENSE | 0 .../go-grpc-prometheus/README.md | 245 + .../go-grpc-prometheus/client.go | 0 .../go-grpc-prometheus/client_reporter.go | 0 .../go-grpc-prometheus/client_test.go | 212 + .../go-grpc-prometheus/server.go | 0 .../go-grpc-prometheus/server_reporter.go | 0 .../go-grpc-prometheus/server_test.go | 307 + .../grpc-ecosystem/go-grpc-prometheus/util.go | 0 vendor/github.com/juju/errors/.gitignore | 23 + .../github.com/juju/errors/LICENSE | 0 vendor/github.com/juju/errors/Makefile | 11 + vendor/github.com/juju/errors/README.md | 536 ++ .../github.com/juju/errors/doc.go | 0 .../github.com/juju/errors/error.go | 0 vendor/github.com/juju/errors/error_test.go | 178 + .../github.com/juju/errors/errortypes.go | 0 .../github.com/juju/errors/errortypes_test.go | 173 + vendor/github.com/juju/errors/example_test.go | 23 + vendor/github.com/juju/errors/export_test.go | 12 + .../github.com/juju/errors/functions.go | 0 .../github.com/juju/errors/functions_test.go | 305 + vendor/github.com/juju/errors/package_test.go | 95 + .../github.com/juju/errors/path.go | 0 vendor/github.com/juju/errors/path_test.go | 29 + .../golang_protobuf_extensions/.travis.yml | 8 + .../golang_protobuf_extensions/LICENSE | 0 .../Makefile.TRAVIS | 15 + .../golang_protobuf_extensions/NOTICE | 0 .../golang_protobuf_extensions/README.md | 20 + .../pbutil/.gitignore | 1 + .../pbutil/Makefile | 7 + .../pbutil/all_test.go | 178 + .../pbutil/decode.go | 0 .../pbutil/decode_test.go | 99 + .../golang_protobuf_extensions/pbutil/doc.go | 0 .../pbutil/encode.go | 0 .../pbutil/encode_test.go | 67 + .../github.com/ngaut/pools/id_pool.go | 0 vendor/github.com/ngaut/pools/id_pool_test.go | 118 + .../github.com/ngaut/pools/numbered.go | 0 .../github.com/ngaut/pools/numbered_test.go | 84 + .../github.com/ngaut/pools/resource_pool.go | 0 .../ngaut/pools/resource_pool_test.go | 487 ++ .../github.com/ngaut/pools/roundrobin.go | 0 .../github.com/ngaut/pools/roundrobin_test.go | 126 + vendor/github.com/ngaut/pools/vitess_license | 28 + .../github.com/ngaut/sync2/atomic.go | 0 vendor/github.com/ngaut/sync2/atomic_test.go | 32 + .../github.com/ngaut/sync2/cond.go | 0 vendor/github.com/ngaut/sync2/cond_test.go | 276 + .../github.com/ngaut/sync2/semaphore.go | 0 .../github.com/ngaut/sync2/semaphore_test.go | 41 + .../github.com/ngaut/sync2/service_manager.go | 0 .../ngaut/sync2/service_manager_test.go | 176 + vendor/github.com/ngaut/sync2/vitess_license | 28 + .../opentracing/opentracing-go/.gitignore | 13 + .../opentracing/opentracing-go/.travis.yml | 14 + .../opentracing/opentracing-go/CHANGELOG.md | 14 + .../opentracing/opentracing-go/LICENSE | 0 .../opentracing/opentracing-go/Makefile | 32 + .../opentracing/opentracing-go/README.md | 147 + .../opentracing/opentracing-go/ext/tags.go | 0 .../opentracing-go/ext/tags_test.go | 148 + .../opentracing-go/globaltracer.go | 0 .../opentracing/opentracing-go/gocontext.go | 0 .../opentracing-go/gocontext_test.go | 81 + .../opentracing/opentracing-go/log/field.go | 0 .../opentracing-go/log/field_test.go | 39 + .../opentracing/opentracing-go/log/util.go | 0 .../opentracing/opentracing-go/noop.go | 0 .../opentracing-go/options_test.go | 31 + .../opentracing/opentracing-go/propagation.go | 0 .../opentracing-go/propagation_test.go | 93 + .../opentracing/opentracing-go/span.go | 0 .../opentracing-go/testtracer_test.go | 138 + .../opentracing/opentracing-go/tracer.go | 0 vendor/github.com/petar/GoLLRB/.gitignore | 23 + vendor/github.com/petar/GoLLRB/AUTHORS | 4 + vendor/github.com/petar/GoLLRB/LICENSE | 27 + vendor/github.com/petar/GoLLRB/README.md | 66 + vendor/github.com/petar/GoLLRB/llrb/avgvar.go | 39 + .../github.com/petar/GoLLRB/llrb/iterator.go | 93 + .../petar/GoLLRB/llrb/iterator_test.go | 76 + .../petar/GoLLRB/llrb/llrb-stats.go | 46 + vendor/github.com/petar/GoLLRB/llrb/llrb.go | 456 ++ .../github.com/petar/GoLLRB/llrb/llrb_test.go | 239 + vendor/github.com/petar/GoLLRB/llrb/util.go | 17 + vendor/github.com/pingcap/check/.gitignore | 4 + vendor/github.com/pingcap/check/README.md | 13 + vendor/github.com/pingcap/check/TODO | 2 + .../github.com/pingcap/check/benchmark.go | 0 .../pingcap/check/benchmark_test.go | 92 + .../pingcap/check/bootstrap_test.go | 83 + .../github.com/pingcap/check/check.go | 0 .../github.com/pingcap/check/check.v1_license | 25 + vendor/github.com/pingcap/check/check_test.go | 207 + .../github.com/pingcap/check/checkers.go | 2 +- .../github.com/pingcap/check/checkers2.go | 0 .../pingcap/check/checkers2_test.go | 46 + .../github.com/pingcap/check/checkers_test.go | 273 + .../github.com/pingcap/check/compare.go | 0 .../github.com/pingcap/check/export_test.go | 9 + .../github.com/pingcap/check/fixture_test.go | 484 ++ .../pingcap/check/foundation_test.go | 336 + .../pingcap/check/godropbox_license | 27 + .../github.com/pingcap/check/helpers.go | 0 .../github.com/pingcap/check/helpers_test.go | 520 ++ .../github.com/pingcap/check/printer.go | 0 .../github.com/pingcap/check/printer_test.go | 94 + .../github.com/pingcap/check/run.go | 0 vendor/github.com/pingcap/check/run_test.go | 470 ++ .../github.com/pingcap/goleveldb/.travis.yml | 12 + .../github.com/pingcap/goleveldb/LICENSE | 0 vendor/github.com/pingcap/goleveldb/README.md | 107 + .../pingcap/goleveldb/leveldb/batch.go | 0 .../pingcap/goleveldb/leveldb/batch_test.go | 147 + .../pingcap/goleveldb/leveldb/bench_test.go | 507 ++ .../goleveldb/leveldb/cache/bench_test.go | 29 + .../pingcap/goleveldb/leveldb/cache/cache.go | 0 .../goleveldb/leveldb/cache/cache_test.go | 563 ++ .../pingcap/goleveldb/leveldb/cache/lru.go | 0 .../pingcap/goleveldb/leveldb/comparer.go | 0 .../leveldb/comparer/bytes_comparer.go | 0 .../goleveldb/leveldb/comparer/comparer.go | 0 .../pingcap/goleveldb/leveldb/corrupt_test.go | 496 ++ .../pingcap/goleveldb/leveldb/db.go | 0 .../goleveldb/leveldb/db_compaction.go | 0 .../pingcap/goleveldb/leveldb/db_iter.go | 0 .../pingcap/goleveldb/leveldb/db_snapshot.go | 0 .../pingcap/goleveldb/leveldb/db_state.go | 0 .../pingcap/goleveldb/leveldb/db_test.go | 2925 +++++++++ .../goleveldb/leveldb/db_transaction.go | 0 .../pingcap/goleveldb/leveldb/db_util.go | 0 .../pingcap/goleveldb/leveldb/db_write.go | 0 .../pingcap/goleveldb/leveldb/doc.go | 0 .../pingcap/goleveldb/leveldb/errors.go | 0 .../goleveldb/leveldb/errors/errors.go | 0 .../goleveldb/leveldb/external_test.go | 117 + .../pingcap/goleveldb/leveldb/filter.go | 0 .../pingcap/goleveldb/leveldb/filter/bloom.go | 0 .../goleveldb/leveldb/filter/bloom_test.go | 142 + .../goleveldb/leveldb/filter/filter.go | 0 .../goleveldb/leveldb/iterator/array_iter.go | 0 .../leveldb/iterator/array_iter_test.go | 30 + .../leveldb/iterator/indexed_iter.go | 0 .../leveldb/iterator/indexed_iter_test.go | 83 + .../goleveldb/leveldb/iterator/iter.go | 0 .../leveldb/iterator/iter_suite_test.go | 11 + .../goleveldb/leveldb/iterator/merged_iter.go | 0 .../leveldb/iterator/merged_iter_test.go | 60 + .../goleveldb/leveldb/journal/journal.go | 0 .../goleveldb/leveldb/journal/journal_test.go | 818 +++ .../pingcap/goleveldb/leveldb/key.go | 0 .../pingcap/goleveldb/leveldb/key_test.go | 133 + .../goleveldb/leveldb/leveldb_suite_test.go | 11 + .../goleveldb/leveldb/memdb/bench_test.go | 98 + .../pingcap/goleveldb/leveldb/memdb/memdb.go | 0 .../leveldb/memdb/memdb_suite_test.go | 57 + .../goleveldb/leveldb/memdb/memdb_test.go | 135 + .../pingcap/goleveldb/leveldb/opt/options.go | 0 .../pingcap/goleveldb/leveldb/options.go | 0 .../pingcap/goleveldb/leveldb/session.go | 0 .../goleveldb/leveldb/session_compaction.go | 0 .../goleveldb/leveldb/session_record.go | 0 .../goleveldb/leveldb/session_record_test.go | 62 + .../pingcap/goleveldb/leveldb/session_util.go | 0 .../goleveldb/leveldb/storage/file_storage.go | 0 .../leveldb/storage/file_storage_nacl.go | 0 .../leveldb/storage/file_storage_plan9.go | 0 .../leveldb/storage/file_storage_solaris.go | 0 .../leveldb/storage/file_storage_test.go | 176 + .../leveldb/storage/file_storage_unix.go | 0 .../leveldb/storage/file_storage_windows.go | 0 .../goleveldb/leveldb/storage/mem_storage.go | 0 .../leveldb/storage/mem_storage_test.go | 65 + .../goleveldb/leveldb/storage/storage.go | 0 .../pingcap/goleveldb/leveldb/table.go | 0 .../goleveldb/leveldb/table/block_test.go | 139 + .../pingcap/goleveldb/leveldb/table/reader.go | 0 .../pingcap/goleveldb/leveldb/table/table.go | 0 .../leveldb/table/table_suite_test.go | 11 + .../goleveldb/leveldb/table/table_test.go | 123 + .../pingcap/goleveldb/leveldb/table/writer.go | 0 .../goleveldb/leveldb/testutil_test.go | 91 + .../pingcap/goleveldb/leveldb/util.go | 0 .../pingcap/goleveldb/leveldb/util/buffer.go | 0 .../goleveldb/leveldb/util/buffer_pool.go | 0 .../goleveldb/leveldb/util/buffer_test.go | 369 ++ .../pingcap/goleveldb/leveldb/util/crc32.go | 0 .../pingcap/goleveldb/leveldb/util/hash.go | 0 .../goleveldb/leveldb/util/hash_test.go | 46 + .../pingcap/goleveldb/leveldb/util/range.go | 0 .../pingcap/goleveldb/leveldb/util/util.go | 0 .../pingcap/goleveldb/leveldb/version.go | 0 .../pingcap/goleveldb/leveldb/version_test.go | 181 + vendor/github.com/pingcap/kvproto/.gitignore | 12 + vendor/github.com/pingcap/kvproto/Cargo.toml | 12 + vendor/github.com/pingcap/kvproto/Makefile | 39 + vendor/github.com/pingcap/kvproto/README.md | 10 + vendor/github.com/pingcap/kvproto/circle.yml | 51 + vendor/github.com/pingcap/kvproto/common.sh | 27 + .../github.com/pingcap/kvproto/generate_go.sh | 68 + .../pingcap/kvproto/generate_rust.sh | 61 + vendor/github.com/pingcap/kvproto/glide.lock | 104 + vendor/github.com/pingcap/kvproto/glide.yaml | 81 + .../kvproto/pkg/coprocessor/coprocessor.pb.go | 21 +- .../pingcap/kvproto/pkg/eraftpb/eraftpb.pb.go | 71 +- .../pingcap/kvproto/pkg/errorpb/errorpb.pb.go | 21 +- .../pingcap/kvproto/pkg/kvrpcpb/kvrpcpb.pb.go | 21 +- .../pingcap/kvproto/pkg/metapb/metapb.pb.go | 21 +- .../pingcap/kvproto/pkg/pdpb/pdpb.pb.go | 57 +- .../pkg/raft_serverpb/raft_serverpb.pb.go | 21 +- .../pingcap/kvproto/pkg/tikvpb/tikvpb.pb.go | 3 +- vendor/github.com/pingcap/pd/.gitignore | 11 + vendor/github.com/pingcap/pd/.travis.yml | 19 + vendor/github.com/pingcap/pd/Dockerfile | 14 + vendor/github.com/pingcap/pd/Jenkinsfile | 11 + .../github.com/pingcap/pd/LICENSE | 0 vendor/github.com/pingcap/pd/Makefile | 73 + vendor/github.com/pingcap/pd/README.md | 111 + vendor/github.com/pingcap/pd/circle.yml | 12 + vendor/github.com/pingcap/pd/glide.lock | 287 + vendor/github.com/pingcap/pd/glide.yaml | 241 + .../github.com/pingcap/pd/pd-client/client.go | 0 .../pingcap/pd/pd-client/client_test.go | 221 + .../pd/pd-client/leader_change_test.go | 238 + .../pingcap/pd/pd-client/metrics.go | 0 vendor/github.com/pingcap/tipb/.gitignore | 2 + vendor/github.com/pingcap/tipb/Cargo.toml | 10 + .../github.com/pingcap/tipb/LICENSE | 0 vendor/github.com/pingcap/tipb/Makefile | 13 + vendor/github.com/pingcap/tipb/README.md | 26 + .../pingcap/tipb/generate-binlog.sh | 13 + vendor/github.com/pingcap/tipb/generate-go.sh | 10 + .../pingcap/tipb/generate-mysqlx.sh | 12 + .../github.com/pingcap/tipb/generate-rust.sh | 22 + .../pingcap/tipb/go-binlog/binlog.pb.go | 18 - .../pingcap/tipb/go-binlog/cistern.pb.go | 18 - .../pingcap/tipb/go-binlog/pump.pb.go | 18 - .../pingcap/tipb/go-tipb/analyze.pb.go | 0 .../pingcap/tipb/go-tipb/executor.pb.go | 0 .../pingcap/tipb/go-tipb/expression.pb.go | 0 .../pingcap/tipb/go-tipb/schema.pb.go | 0 .../pingcap/tipb/go-tipb/select.pb.go | 0 .../pingcap/tipb/sharedbytes/sharedbytes.go | 0 .../tipb/sharedbytes/sharedbytes_test.go | 30 + .../prometheus/client_golang/.gitignore | 26 + .../prometheus/client_golang/.travis.yml | 9 + .../prometheus/client_golang/AUTHORS.md | 18 + .../prometheus/client_golang/CHANGELOG.md | 109 + .../prometheus/client_golang/CONTRIBUTING.md | 18 + .../prometheus/client_golang/LICENSE | 0 .../prometheus/client_golang/NOTICE | 0 .../prometheus/client_golang/README.md | 45 + .../prometheus/client_golang/VERSION | 1 + .../client_golang/prometheus/.gitignore | 1 + .../client_golang/prometheus/README.md | 1 + .../prometheus/benchmark_test.go | 183 + .../client_golang/prometheus/collector.go | 0 .../client_golang/prometheus/counter.go | 0 .../client_golang/prometheus/counter_test.go | 58 + .../client_golang/prometheus/desc.go | 0 .../client_golang/prometheus/doc.go | 0 .../prometheus/example_clustermanager_test.go | 118 + .../client_golang/prometheus/examples_test.go | 751 +++ .../prometheus/expvar_collector.go | 0 .../prometheus/expvar_collector_test.go | 97 + .../client_golang/prometheus/fnv.go | 0 .../client_golang/prometheus/gauge.go | 0 .../client_golang/prometheus/gauge_test.go | 182 + .../client_golang/prometheus/go_collector.go | 0 .../prometheus/go_collector_test.go | 123 + .../client_golang/prometheus/histogram.go | 0 .../prometheus/histogram_test.go | 326 + .../client_golang/prometheus/http.go | 0 .../client_golang/prometheus/http_test.go | 121 + .../client_golang/prometheus/metric.go | 0 .../client_golang/prometheus/metric_test.go | 35 + .../prometheus/process_collector.go | 0 .../prometheus/process_collector_test.go | 58 + .../prometheus/push/examples_test.go | 56 + .../client_golang/prometheus/push/push.go | 0 .../prometheus/push/push_test.go | 176 + .../client_golang/prometheus/registry.go | 0 .../client_golang/prometheus/registry_test.go | 545 ++ .../client_golang/prometheus/summary.go | 0 .../client_golang/prometheus/summary_test.go | 347 + .../client_golang/prometheus/untyped.go | 0 .../client_golang/prometheus/value.go | 0 .../client_golang/prometheus/vec.go | 0 .../client_golang/prometheus/vec_test.go | 312 + .../prometheus/client_model/.gitignore | 1 + .../prometheus/client_model/AUTHORS.md | 13 + .../prometheus/client_model/CONTRIBUTING.md | 18 + .../prometheus/client_model/LICENSE | 0 .../prometheus/client_model/Makefile | 61 + .../github.com/prometheus/client_model/NOTICE | 0 .../prometheus/client_model/README.md | 26 + .../prometheus/client_model/go/metrics.pb.go | 0 .../prometheus/client_model/metrics.proto | 81 + .../prometheus/client_model/pom.xml | 130 + .../prometheus/client_model/setup.py | 23 + .../github.com/prometheus/common/.travis.yml | 7 + .../github.com/prometheus/common/AUTHORS.md | 11 + .../prometheus/common/CONTRIBUTING.md | 18 + .../github.com/prometheus/common/LICENSE | 0 .../github.com/prometheus/common/NOTICE | 0 vendor/github.com/prometheus/common/README.md | 12 + .../prometheus/common/expfmt/bench_test.go | 171 + .../prometheus/common/expfmt/decode.go | 0 .../prometheus/common/expfmt/decode_test.go | 367 ++ .../prometheus/common/expfmt/encode.go | 0 .../prometheus/common/expfmt/expfmt.go | 0 .../prometheus/common/expfmt/fuzz.go | 0 .../prometheus/common/expfmt/text_create.go | 0 .../common/expfmt/text_create_test.go | 443 ++ .../prometheus/common/expfmt/text_parse.go | 0 .../common/expfmt/text_parse_test.go | 588 ++ .../bitbucket.org/ww/goautoneg/README.txt | 67 + .../bitbucket.org/ww/goautoneg/autoneg.go | 0 .../ww/goautoneg/autoneg_test.go | 33 + .../prometheus/common/model/alert.go | 0 .../prometheus/common/model/alert_test.go | 118 + .../prometheus/common/model/fingerprinting.go | 0 .../github.com/prometheus/common/model/fnv.go | 0 .../prometheus/common/model/labels.go | 0 .../prometheus/common/model/labels_test.go | 129 + .../prometheus/common/model/labelset.go | 0 .../prometheus/common/model/metric.go | 0 .../prometheus/common/model/metric_test.go | 121 + .../prometheus/common/model/model.go | 0 .../prometheus/common/model/signature.go | 0 .../prometheus/common/model/signature_test.go | 314 + .../prometheus/common/model/silence.go | 0 .../prometheus/common/model/silence_test.go | 228 + .../prometheus/common/model/time.go | 0 .../prometheus/common/model/time_test.go | 129 + .../prometheus/common/model/value.go | 0 .../prometheus/common/model/value_test.go | 417 ++ .../github.com/prometheus/procfs/.travis.yml | 5 + .../github.com/prometheus/procfs/AUTHORS.md | 20 + .../prometheus/procfs/CONTRIBUTING.md | 18 + .../github.com/prometheus/procfs/LICENSE | 0 vendor/github.com/prometheus/procfs/Makefile | 6 + .../github.com/prometheus/procfs/NOTICE | 0 vendor/github.com/prometheus/procfs/README.md | 10 + .../github.com/prometheus/procfs/doc.go | 0 .../github.com/prometheus/procfs/fs.go | 0 .../github.com/prometheus/procfs/fs_test.go | 13 + .../github.com/prometheus/procfs/ipvs.go | 0 .../github.com/prometheus/procfs/ipvs_test.go | 190 + .../github.com/prometheus/procfs/mdstat.go | 0 .../prometheus/procfs/mdstat_test.go | 31 + .../github.com/prometheus/procfs/proc.go | 0 .../github.com/prometheus/procfs/proc_io.go | 0 .../prometheus/procfs/proc_io_test.go | 33 + .../prometheus/procfs/proc_limits.go | 0 .../prometheus/procfs/proc_limits_test.go | 31 + .../github.com/prometheus/procfs/proc_stat.go | 0 .../prometheus/procfs/proc_stat_test.go | 110 + .../github.com/prometheus/procfs/proc_test.go | 160 + .../github.com/prometheus/procfs/stat.go | 0 .../github.com/prometheus/procfs/stat_test.go | 14 + .../github.com/spaolacci/murmur3/.gitignore | 22 + .../github.com/spaolacci/murmur3/LICENSE | 0 vendor/github.com/spaolacci/murmur3/README.md | 84 + .../github.com/spaolacci/murmur3/murmur.go | 0 .../github.com/spaolacci/murmur3/murmur128.go | 0 .../github.com/spaolacci/murmur3/murmur32.go | 0 .../github.com/spaolacci/murmur3/murmur64.go | 0 .../spaolacci/murmur3/murmur_test.go | 251 + vendor/github.com/twinj/uuid/.gitignore | 1 + vendor/github.com/twinj/uuid/.travis.yml | 8 + .../github.com/twinj/uuid/LICENSE | 0 vendor/github.com/twinj/uuid/README.md | 86 + .../github.com/twinj/uuid/array.go | 0 vendor/github.com/twinj/uuid/array_test.go | 31 + .../github.com/twinj/uuid/rfc4122.go | 0 vendor/github.com/twinj/uuid/rfc4122_test.go | 209 + .../github.com/twinj/uuid/saver.go | 0 vendor/github.com/twinj/uuid/saver_test.go | 100 + .../github.com/twinj/uuid/state.go | 0 vendor/github.com/twinj/uuid/state_test.go | 92 + .../github.com/twinj/uuid/struct.go | 0 vendor/github.com/twinj/uuid/struct_test.go | 32 + .../github.com/twinj/uuid/timestamp.go | 0 .../github.com/twinj/uuid/timestamp_test.go | 20 + vendor/github.com/twinj/uuid/uuid_test.go | 119 + .../github.com/twinj/uuid/uuids.go | 0 vendor/github.com/twinj/uuid/uuids_test.go | 449 ++ .../uber/jaeger-client-go/.gitignore | 14 + .../uber/jaeger-client-go/.gitmodules | 3 + .../uber/jaeger-client-go/.travis.yml | 40 + .../uber/jaeger-client-go/CHANGELOG.md | 118 + .../uber/jaeger-client-go/CONTRIBUTING.md | 75 + .../github.com/uber/jaeger-client-go/LICENSE | 0 .../github.com/uber/jaeger-client-go/Makefile | 103 + .../uber/jaeger-client-go/README.md | 182 + .../uber/jaeger-client-go/config/config.go | 0 .../jaeger-client-go/config/config_test.go | 182 + .../jaeger-client-go/config/example_test.go | 86 + .../uber/jaeger-client-go/config/options.go | 0 .../jaeger-client-go/config/options_test.go | 67 + .../uber/jaeger-client-go/constants.go | 0 .../uber/jaeger-client-go/constants_test.go | 35 + .../uber/jaeger-client-go/context.go | 0 .../uber/jaeger-client-go/context_test.go | 116 + .../github.com/uber/jaeger-client-go/doc.go | 0 .../uber/jaeger-client-go/glide.lock | 70 + .../uber/jaeger-client-go/glide.yaml | 33 + .../jaeger-client-go/internal/spanlog/json.go | 0 .../uber/jaeger-client-go/interop.go | 0 .../uber/jaeger-client-go/jaeger_tag.go | 0 .../jaeger-client-go/jaeger_thrift_span.go | 0 .../jaeger_thrift_span_test.go | 394 ++ .../uber/jaeger-client-go/log/logger.go | 0 .../uber/jaeger-client-go/log/logger_test.go | 32 + .../uber/jaeger-client-go/logger.go | 0 .../uber/jaeger-client-go/logger_test.go | 46 + .../uber/jaeger-client-go/metrics.go | 0 .../uber/jaeger-client-go/metrics_test.go | 56 + .../uber/jaeger-client-go/observer.go | 0 .../uber/jaeger-client-go/observer_test.go | 115 + .../uber/jaeger-client-go/propagation.go | 0 .../uber/jaeger-client-go/propagation_test.go | 270 + .../uber/jaeger-client-go/reference.go | 0 .../uber/jaeger-client-go/reporter.go | 0 .../uber/jaeger-client-go/reporter_options.go | 0 .../uber/jaeger-client-go/reporter_test.go | 278 + .../jaeger-client-go/rpcmetrics/README.md | 5 + .../uber/jaeger-client-go/rpcmetrics/doc.go | 0 .../jaeger-client-go/rpcmetrics/endpoints.go | 0 .../rpcmetrics/endpoints_test.go | 49 + .../jaeger-client-go/rpcmetrics/metrics.go | 0 .../rpcmetrics/metrics_test.go | 67 + .../jaeger-client-go/rpcmetrics/normalizer.go | 0 .../rpcmetrics/normalizer_test.go | 40 + .../jaeger-client-go/rpcmetrics/observer.go | 0 .../rpcmetrics/observer_test.go | 183 + .../uber/jaeger-client-go/sampler.go | 0 .../uber/jaeger-client-go/sampler_options.go | 0 .../uber/jaeger-client-go/sampler_test.go | 709 ++ .../github.com/uber/jaeger-client-go/span.go | 0 .../uber/jaeger-client-go/span_test.go | 96 + .../thrift-gen/agent/agent.go | 0 .../thrift-gen/agent/constants.go | 0 .../thrift-gen/agent/ttypes.go | 0 .../thrift-gen/jaeger/agent.go | 0 .../thrift-gen/jaeger/constants.go | 0 .../thrift-gen/jaeger/ttypes.go | 0 .../thrift-gen/sampling/constants.go | 0 .../thrift-gen/sampling/samplingmanager.go | 0 .../thrift-gen/sampling/ttypes.go | 0 .../thrift-gen/zipkincore/constants.go | 0 .../thrift-gen/zipkincore/ttypes.go | 0 .../thrift-gen/zipkincore/zipkincollector.go | 0 .../uber/jaeger-client-go/thrift/.nocover | 0 .../uber/jaeger-client-go/tracer.go | 0 .../uber/jaeger-client-go/tracer_options.go | 0 .../uber/jaeger-client-go/tracer_test.go | 358 + .../uber/jaeger-client-go/transport.go | 0 .../uber/jaeger-client-go/transport_udp.go | 0 .../jaeger-client-go/transport_udp_test.go | 227 + .../uber/jaeger-client-go/utils/http_json.go | 0 .../jaeger-client-go/utils/http_json_test.go | 64 + .../uber/jaeger-client-go/utils/localip.go | 0 .../uber/jaeger-client-go/utils/rand.go | 0 .../jaeger-client-go/utils/rate_limiter.go | 0 .../utils/rate_limiter_test.go | 81 + .../uber/jaeger-client-go/utils/udp_client.go | 0 .../uber/jaeger-client-go/utils/utils.go | 0 .../uber/jaeger-client-go/utils/utils_test.go | 97 + .../uber/jaeger-client-go/zipkin.go | 0 .../uber/jaeger-client-go/zipkin_test.go | 74 + .../jaeger-client-go/zipkin_thrift_span.go | 0 .../zipkin_thrift_span_test.go | 335 + vendor/github.com/uber/jaeger-lib/.gitignore | 11 + vendor/github.com/uber/jaeger-lib/.travis.yml | 20 + .../uber/jaeger-lib/CONTRIBUTING.md | 56 + .../github.com/uber/jaeger-lib/LICENSE | 0 vendor/github.com/uber/jaeger-lib/Makefile | 83 + vendor/github.com/uber/jaeger-lib/README.md | 16 + vendor/github.com/uber/jaeger-lib/glide.lock | 63 + vendor/github.com/uber/jaeger-lib/glide.yaml | 11 + .../uber/jaeger-lib/metrics/counter.go | 0 .../uber/jaeger-lib/metrics/factory.go | 0 .../uber/jaeger-lib/metrics/gauge.go | 0 .../uber/jaeger-lib/metrics/local.go | 0 .../uber/jaeger-lib/metrics/local_test.go | 116 + .../uber/jaeger-lib/metrics/metrics.go | 0 .../uber/jaeger-lib/metrics/metrics_test.go | 89 + .../uber/jaeger-lib/metrics/stopwatch.go | 0 .../uber/jaeger-lib/metrics/timer.go | 0 vendor/golang.org/x/net/.gitattributes | 10 + vendor/golang.org/x/net/.gitignore | 2 + vendor/golang.org/x/net/AUTHORS | 3 + vendor/golang.org/x/net/CONTRIBUTING.md | 31 + vendor/golang.org/x/net/CONTRIBUTORS | 3 + .../src => vendor}/golang.org/x/net/LICENSE | 0 .../src => vendor}/golang.org/x/net/PATENTS | 0 vendor/golang.org/x/net/README | 3 + vendor/golang.org/x/net/codereview.cfg | 1 + .../golang.org/x/net/context/context.go | 0 .../golang.org/x/net/context/context_test.go | 583 ++ .../golang.org/x/net/context/go17.go | 0 .../golang.org/x/net/context/pre_go17.go | 0 .../x/net/context/withtimeout_test.go | 26 + vendor/golang.org/x/net/http2/.gitignore | 2 + vendor/golang.org/x/net/http2/Dockerfile | 51 + vendor/golang.org/x/net/http2/Makefile | 3 + vendor/golang.org/x/net/http2/README | 20 + .../x/net/http2/client_conn_pool.go | 0 .../x/net/http2/configure_transport.go | 0 .../golang.org/x/net/http2/databuffer.go | 0 .../golang.org/x/net/http2/databuffer_test.go | 155 + .../golang.org/x/net/http2/errors.go | 0 vendor/golang.org/x/net/http2/errors_test.go | 24 + .../golang.org/x/net/http2/flow.go | 0 vendor/golang.org/x/net/http2/flow_test.go | 53 + .../golang.org/x/net/http2/frame.go | 0 vendor/golang.org/x/net/http2/frame_test.go | 1191 ++++ .../golang.org/x/net/http2/go16.go | 0 .../golang.org/x/net/http2/go17.go | 0 .../golang.org/x/net/http2/go17_not18.go | 0 .../golang.org/x/net/http2/go18.go | 0 vendor/golang.org/x/net/http2/go18_test.go | 79 + .../golang.org/x/net/http2/gotrack.go | 0 vendor/golang.org/x/net/http2/gotrack_test.go | 33 + .../golang.org/x/net/http2/headermap.go | 0 .../golang.org/x/net/http2/hpack/encode.go | 0 .../x/net/http2/hpack/encode_test.go | 386 ++ .../golang.org/x/net/http2/hpack/hpack.go | 0 .../x/net/http2/hpack/hpack_test.go | 718 +++ .../golang.org/x/net/http2/hpack/huffman.go | 0 .../golang.org/x/net/http2/hpack/tables.go | 0 .../x/net/http2/hpack/tables_test.go | 214 + .../golang.org/x/net/http2/http2.go | 0 vendor/golang.org/x/net/http2/http2_test.go | 199 + .../golang.org/x/net/http2/not_go16.go | 0 .../golang.org/x/net/http2/not_go17.go | 0 .../golang.org/x/net/http2/not_go18.go | 0 .../golang.org/x/net/http2/pipe.go | 0 vendor/golang.org/x/net/http2/pipe_test.go | 109 + .../golang.org/x/net/http2/server.go | 0 .../x/net/http2/server_push_test.go | 521 ++ vendor/golang.org/x/net/http2/server_test.go | 3731 +++++++++++ .../golang.org/x/net/http2/transport.go | 0 .../golang.org/x/net/http2/transport_test.go | 2916 +++++++++ .../golang.org/x/net/http2/write.go | 0 .../golang.org/x/net/http2/writesched.go | 0 .../x/net/http2/writesched_priority.go | 0 .../x/net/http2/writesched_priority_test.go | 541 ++ .../x/net/http2/writesched_random.go | 0 .../x/net/http2/writesched_random_test.go | 44 + .../golang.org/x/net/http2/writesched_test.go | 125 + vendor/golang.org/x/net/http2/z_spec_test.go | 356 + vendor/golang.org/x/net/idna/example_test.go | 65 + .../golang.org/x/net/idna/idna.go | 0 vendor/golang.org/x/net/idna/idna_test.go | 43 + .../golang.org/x/net/idna/punycode.go | 0 vendor/golang.org/x/net/idna/punycode_test.go | 198 + .../golang.org/x/net/idna/tables.go | 0 .../golang.org/x/net/idna/trie.go | 0 .../golang.org/x/net/idna/trieval.go | 0 .../x/net/internal/timeseries/timeseries.go | 0 .../internal/timeseries/timeseries_test.go | 170 + .../golang.org/x/net/lex/httplex/httplex.go | 0 .../x/net/lex/httplex/httplex_test.go | 119 + .../golang.org/x/net/trace/events.go | 0 .../golang.org/x/net/trace/histogram.go | 0 .../golang.org/x/net/trace/histogram_test.go | 325 + .../golang.org/x/net/trace/trace.go | 0 vendor/golang.org/x/net/trace/trace_test.go | 178 + vendor/golang.org/x/sys/.gitattributes | 10 + vendor/golang.org/x/sys/.gitignore | 2 + vendor/golang.org/x/sys/AUTHORS | 3 + vendor/golang.org/x/sys/CONTRIBUTING.md | 31 + vendor/golang.org/x/sys/CONTRIBUTORS | 3 + .../src => vendor}/golang.org/x/sys/LICENSE | 0 .../src => vendor}/golang.org/x/sys/PATENTS | 0 vendor/golang.org/x/sys/README | 3 + vendor/golang.org/x/sys/codereview.cfg | 1 + vendor/golang.org/x/sys/unix/.gitignore | 1 + .../golang.org/x/sys/unix/asm.s | 0 .../golang.org/x/sys/unix/asm_darwin_386.s | 0 .../golang.org/x/sys/unix/asm_darwin_amd64.s | 0 .../golang.org/x/sys/unix/asm_darwin_arm.s | 0 .../golang.org/x/sys/unix/asm_darwin_arm64.s | 0 .../x/sys/unix/asm_dragonfly_amd64.s | 0 .../golang.org/x/sys/unix/asm_freebsd_386.s | 0 .../golang.org/x/sys/unix/asm_freebsd_amd64.s | 0 .../golang.org/x/sys/unix/asm_freebsd_arm.s | 0 .../golang.org/x/sys/unix/asm_linux_386.s | 0 .../golang.org/x/sys/unix/asm_linux_amd64.s | 0 .../golang.org/x/sys/unix/asm_linux_arm.s | 0 .../golang.org/x/sys/unix/asm_linux_arm64.s | 0 .../golang.org/x/sys/unix/asm_linux_mips64x.s | 0 .../golang.org/x/sys/unix/asm_linux_ppc64x.s | 0 .../golang.org/x/sys/unix/asm_linux_s390x.s | 0 .../golang.org/x/sys/unix/asm_netbsd_386.s | 0 .../golang.org/x/sys/unix/asm_netbsd_amd64.s | 0 .../golang.org/x/sys/unix/asm_netbsd_arm.s | 0 .../golang.org/x/sys/unix/asm_openbsd_386.s | 0 .../golang.org/x/sys/unix/asm_openbsd_amd64.s | 0 .../golang.org/x/sys/unix/asm_solaris_amd64.s | 0 .../golang.org/x/sys/unix/bluetooth_linux.go | 0 .../golang.org/x/sys/unix/constants.go | 0 vendor/golang.org/x/sys/unix/creds_test.go | 121 + .../golang.org/x/sys/unix/env_unix.go | 0 .../golang.org/x/sys/unix/env_unset.go | 0 vendor/golang.org/x/sys/unix/export_test.go | 9 + .../golang.org/x/sys/unix/flock.go | 0 .../x/sys/unix/flock_linux_32bit.go | 0 .../golang.org/x/sys/unix/gccgo.go | 0 .../golang.org/x/sys/unix/gccgo_c.c | 0 .../x/sys/unix/gccgo_linux_amd64.go | 0 vendor/golang.org/x/sys/unix/mkall.sh | 285 + vendor/golang.org/x/sys/unix/mkerrors.sh | 476 ++ .../golang.org/x/sys/unix/mkpost.go | 0 vendor/golang.org/x/sys/unix/mksyscall.pl | 323 + .../x/sys/unix/mksyscall_solaris.pl | 294 + .../golang.org/x/sys/unix/mksysctl_openbsd.pl | 264 + .../golang.org/x/sys/unix/mksysnum_darwin.pl | 39 + .../x/sys/unix/mksysnum_dragonfly.pl | 50 + .../golang.org/x/sys/unix/mksysnum_freebsd.pl | 63 + .../golang.org/x/sys/unix/mksysnum_linux.pl | 58 + .../golang.org/x/sys/unix/mksysnum_netbsd.pl | 58 + .../golang.org/x/sys/unix/mksysnum_openbsd.pl | 50 + .../golang.org/x/sys/unix/mmap_unix_test.go | 23 + .../golang.org/x/sys/unix/race.go | 0 .../golang.org/x/sys/unix/race0.go | 0 .../golang.org/x/sys/unix/sockcmsg_linux.go | 0 .../golang.org/x/sys/unix/sockcmsg_unix.go | 0 .../golang.org/x/sys/unix/str.go | 0 .../golang.org/x/sys/unix/syscall.go | 0 .../golang.org/x/sys/unix/syscall_bsd.go | 0 .../golang.org/x/sys/unix/syscall_bsd_test.go | 47 + .../golang.org/x/sys/unix/syscall_darwin.go | 0 .../x/sys/unix/syscall_darwin_386.go | 0 .../x/sys/unix/syscall_darwin_amd64.go | 0 .../x/sys/unix/syscall_darwin_arm.go | 0 .../x/sys/unix/syscall_darwin_arm64.go | 0 .../x/sys/unix/syscall_dragonfly.go | 0 .../x/sys/unix/syscall_dragonfly_amd64.go | 0 .../golang.org/x/sys/unix/syscall_freebsd.go | 0 .../x/sys/unix/syscall_freebsd_386.go | 0 .../x/sys/unix/syscall_freebsd_amd64.go | 0 .../x/sys/unix/syscall_freebsd_arm.go | 0 .../x/sys/unix/syscall_freebsd_test.go | 24 + .../golang.org/x/sys/unix/syscall_linux.go | 0 .../x/sys/unix/syscall_linux_386.go | 0 .../x/sys/unix/syscall_linux_amd64.go | 0 .../x/sys/unix/syscall_linux_arm.go | 0 .../x/sys/unix/syscall_linux_arm64.go | 0 .../x/sys/unix/syscall_linux_mips64x.go | 0 .../x/sys/unix/syscall_linux_ppc64x.go | 0 .../x/sys/unix/syscall_linux_s390x.go | 0 .../x/sys/unix/syscall_linux_test.go | 186 + .../golang.org/x/sys/unix/syscall_netbsd.go | 0 .../x/sys/unix/syscall_netbsd_386.go | 0 .../x/sys/unix/syscall_netbsd_amd64.go | 0 .../x/sys/unix/syscall_netbsd_arm.go | 0 .../golang.org/x/sys/unix/syscall_no_getwd.go | 0 .../golang.org/x/sys/unix/syscall_openbsd.go | 0 .../x/sys/unix/syscall_openbsd_386.go | 0 .../x/sys/unix/syscall_openbsd_amd64.go | 0 .../golang.org/x/sys/unix/syscall_solaris.go | 0 .../x/sys/unix/syscall_solaris_amd64.go | 0 vendor/golang.org/x/sys/unix/syscall_test.go | 50 + .../golang.org/x/sys/unix/syscall_unix.go | 0 .../x/sys/unix/syscall_unix_test.go | 353 + .../golang.org/x/sys/unix/types_darwin.go | 0 .../golang.org/x/sys/unix/types_dragonfly.go | 0 .../golang.org/x/sys/unix/types_freebsd.go | 0 .../golang.org/x/sys/unix/types_linux.go | 0 .../golang.org/x/sys/unix/types_netbsd.go | 0 .../golang.org/x/sys/unix/types_openbsd.go | 0 .../golang.org/x/sys/unix/types_solaris.go | 0 .../x/sys/unix/zerrors_darwin_386.go | 0 .../x/sys/unix/zerrors_darwin_amd64.go | 0 .../x/sys/unix/zerrors_darwin_arm.go | 0 .../x/sys/unix/zerrors_darwin_arm64.go | 0 .../x/sys/unix/zerrors_dragonfly_amd64.go | 0 .../x/sys/unix/zerrors_freebsd_386.go | 0 .../x/sys/unix/zerrors_freebsd_amd64.go | 0 .../x/sys/unix/zerrors_freebsd_arm.go | 0 .../x/sys/unix/zerrors_linux_386.go | 0 .../x/sys/unix/zerrors_linux_amd64.go | 0 .../x/sys/unix/zerrors_linux_arm.go | 0 .../x/sys/unix/zerrors_linux_arm64.go | 0 .../x/sys/unix/zerrors_linux_mips64.go | 0 .../x/sys/unix/zerrors_linux_mips64le.go | 0 .../x/sys/unix/zerrors_linux_ppc64.go | 0 .../x/sys/unix/zerrors_linux_ppc64le.go | 0 .../x/sys/unix/zerrors_linux_s390x.go | 0 .../x/sys/unix/zerrors_netbsd_386.go | 0 .../x/sys/unix/zerrors_netbsd_amd64.go | 0 .../x/sys/unix/zerrors_netbsd_arm.go | 0 .../x/sys/unix/zerrors_openbsd_386.go | 0 .../x/sys/unix/zerrors_openbsd_amd64.go | 0 .../x/sys/unix/zerrors_solaris_amd64.go | 0 .../x/sys/unix/zsyscall_darwin_386.go | 0 .../x/sys/unix/zsyscall_darwin_amd64.go | 0 .../x/sys/unix/zsyscall_darwin_arm.go | 0 .../x/sys/unix/zsyscall_darwin_arm64.go | 0 .../x/sys/unix/zsyscall_dragonfly_amd64.go | 0 .../x/sys/unix/zsyscall_freebsd_386.go | 0 .../x/sys/unix/zsyscall_freebsd_amd64.go | 0 .../x/sys/unix/zsyscall_freebsd_arm.go | 0 .../x/sys/unix/zsyscall_linux_386.go | 0 .../x/sys/unix/zsyscall_linux_amd64.go | 0 .../x/sys/unix/zsyscall_linux_arm.go | 0 .../x/sys/unix/zsyscall_linux_arm64.go | 0 .../x/sys/unix/zsyscall_linux_mips64.go | 0 .../x/sys/unix/zsyscall_linux_mips64le.go | 0 .../x/sys/unix/zsyscall_linux_ppc64.go | 0 .../x/sys/unix/zsyscall_linux_ppc64le.go | 0 .../x/sys/unix/zsyscall_linux_s390x.go | 0 .../x/sys/unix/zsyscall_netbsd_386.go | 0 .../x/sys/unix/zsyscall_netbsd_amd64.go | 0 .../x/sys/unix/zsyscall_netbsd_arm.go | 0 .../x/sys/unix/zsyscall_openbsd_386.go | 0 .../x/sys/unix/zsyscall_openbsd_amd64.go | 0 .../x/sys/unix/zsyscall_solaris_amd64.go | 0 .../golang.org/x/sys/unix/zsysctl_openbsd.go | 0 .../x/sys/unix/zsysnum_darwin_386.go | 0 .../x/sys/unix/zsysnum_darwin_amd64.go | 0 .../x/sys/unix/zsysnum_darwin_arm.go | 0 .../x/sys/unix/zsysnum_darwin_arm64.go | 0 .../x/sys/unix/zsysnum_dragonfly_amd64.go | 0 .../x/sys/unix/zsysnum_freebsd_386.go | 0 .../x/sys/unix/zsysnum_freebsd_amd64.go | 0 .../x/sys/unix/zsysnum_freebsd_arm.go | 0 .../x/sys/unix/zsysnum_linux_386.go | 0 .../x/sys/unix/zsysnum_linux_amd64.go | 0 .../x/sys/unix/zsysnum_linux_arm.go | 0 .../x/sys/unix/zsysnum_linux_arm64.go | 0 .../x/sys/unix/zsysnum_linux_mips64.go | 0 .../x/sys/unix/zsysnum_linux_mips64le.go | 0 .../x/sys/unix/zsysnum_linux_ppc64.go | 0 .../x/sys/unix/zsysnum_linux_ppc64le.go | 0 .../x/sys/unix/zsysnum_linux_s390x.go | 0 .../x/sys/unix/zsysnum_netbsd_386.go | 0 .../x/sys/unix/zsysnum_netbsd_amd64.go | 0 .../x/sys/unix/zsysnum_netbsd_arm.go | 0 .../x/sys/unix/zsysnum_openbsd_386.go | 0 .../x/sys/unix/zsysnum_openbsd_amd64.go | 0 .../x/sys/unix/zsysnum_solaris_amd64.go | 0 .../x/sys/unix/ztypes_darwin_386.go | 0 .../x/sys/unix/ztypes_darwin_amd64.go | 0 .../x/sys/unix/ztypes_darwin_arm.go | 0 .../x/sys/unix/ztypes_darwin_arm64.go | 0 .../x/sys/unix/ztypes_dragonfly_amd64.go | 0 .../x/sys/unix/ztypes_freebsd_386.go | 0 .../x/sys/unix/ztypes_freebsd_amd64.go | 0 .../x/sys/unix/ztypes_freebsd_arm.go | 0 .../golang.org/x/sys/unix/ztypes_linux_386.go | 0 .../x/sys/unix/ztypes_linux_amd64.go | 0 .../golang.org/x/sys/unix/ztypes_linux_arm.go | 0 .../x/sys/unix/ztypes_linux_arm64.go | 0 .../x/sys/unix/ztypes_linux_mips64.go | 0 .../x/sys/unix/ztypes_linux_mips64le.go | 0 .../x/sys/unix/ztypes_linux_ppc64.go | 0 .../x/sys/unix/ztypes_linux_ppc64le.go | 0 .../x/sys/unix/ztypes_linux_s390x.go | 0 .../x/sys/unix/ztypes_netbsd_386.go | 0 .../x/sys/unix/ztypes_netbsd_amd64.go | 0 .../x/sys/unix/ztypes_netbsd_arm.go | 0 .../x/sys/unix/ztypes_openbsd_386.go | 0 .../x/sys/unix/ztypes_openbsd_amd64.go | 0 .../x/sys/unix/ztypes_solaris_amd64.go | 0 vendor/golang.org/x/text/.gitattributes | 10 + vendor/golang.org/x/text/.gitignore | 6 + vendor/golang.org/x/text/AUTHORS | 3 + vendor/golang.org/x/text/CONTRIBUTING.md | 31 + vendor/golang.org/x/text/CONTRIBUTORS | 3 + .../src => vendor}/golang.org/x/text/LICENSE | 0 .../src => vendor}/golang.org/x/text/PATENTS | 0 vendor/golang.org/x/text/README | 23 + vendor/golang.org/x/text/codereview.cfg | 1 + vendor/golang.org/x/text/doc.go | 13 + .../x/text/encoding/charmap/charmap.go | 0 .../x/text/encoding/charmap/charmap_test.go | 258 + .../x/text/encoding/charmap/maketables.go | 0 .../x/text/encoding/charmap/tables.go | 0 .../golang.org/x/text/encoding/encoding.go | 0 .../x/text/encoding/encoding_test.go | 290 + .../x/text/encoding/example_test.go | 42 + .../text/encoding/internal/identifier/gen.go | 0 .../internal/identifier/identifier.go | 0 .../text/encoding/internal/identifier/mib.go | 0 .../x/text/encoding/internal/internal.go | 0 .../x/text/encoding/japanese/all.go | 0 .../x/text/encoding/japanese/all_test.go | 248 + .../x/text/encoding/japanese/eucjp.go | 0 .../x/text/encoding/japanese/iso2022jp.go | 0 .../x/text/encoding/japanese/maketables.go | 0 .../x/text/encoding/japanese/shiftjis.go | 0 .../x/text/encoding/japanese/tables.go | 0 .../x/text/encoding/korean/all_test.go | 94 + .../x/text/encoding/korean/euckr.go | 0 .../x/text/encoding/korean/maketables.go | 0 .../x/text/encoding/korean/tables.go | 0 .../x/text/encoding/simplifiedchinese/all.go | 0 .../encoding/simplifiedchinese/all_test.go | 143 + .../x/text/encoding/simplifiedchinese/gbk.go | 0 .../encoding/simplifiedchinese/hzgb2312.go | 0 .../encoding/simplifiedchinese/maketables.go | 0 .../text/encoding/simplifiedchinese/tables.go | 0 .../encoding/traditionalchinese/all_test.go | 114 + .../text/encoding/traditionalchinese/big5.go | 0 .../encoding/traditionalchinese/maketables.go | 0 .../encoding/traditionalchinese/tables.go | 0 .../x/text/encoding/unicode/override.go | 0 .../x/text/encoding/unicode/unicode.go | 0 .../x/text/encoding/unicode/unicode_test.go | 499 ++ vendor/golang.org/x/text/gen.go | 292 + vendor/golang.org/x/text/internal/gen.go | 52 + vendor/golang.org/x/text/internal/gen/code.go | 351 + vendor/golang.org/x/text/internal/gen/gen.go | 281 + vendor/golang.org/x/text/internal/gen_test.go | 38 + vendor/golang.org/x/text/internal/internal.go | 51 + .../x/text/internal/internal_test.go | 38 + vendor/golang.org/x/text/internal/match.go | 67 + .../golang.org/x/text/internal/match_test.go | 56 + vendor/golang.org/x/text/internal/tables.go | 116 + .../x/text/internal/triegen/compact.go | 58 + .../x/text/internal/triegen/data_test.go | 875 +++ .../internal/triegen/example_compact_test.go | 71 + .../x/text/internal/triegen/example_test.go | 148 + .../x/text/internal/triegen/gen_test.go | 68 + .../x/text/internal/triegen/print.go | 251 + .../x/text/internal/triegen/triegen.go | 494 ++ .../x/text/internal/ucd/example_test.go | 81 + vendor/golang.org/x/text/internal/ucd/ucd.go | 376 ++ .../x/text/internal/ucd/ucd_test.go | 105 + .../internal/utf8internal/utf8internal.go | 0 .../golang.org/x/text/runes/cond.go | 0 vendor/golang.org/x/text/runes/cond_test.go | 282 + .../golang.org/x/text/runes/example_test.go | 60 + .../golang.org/x/text/runes/runes.go | 0 vendor/golang.org/x/text/runes/runes_test.go | 664 ++ .../x/text/secure/bidirule/bench_test.go | 54 + .../x/text/secure/bidirule/bidirule.go | 0 .../x/text/secure/bidirule/bidirule_test.go | 825 +++ vendor/golang.org/x/text/secure/doc.go | 6 + .../x/text/transform/examples_test.go | 37 + .../golang.org/x/text/transform/transform.go | 0 .../x/text/transform/transform_test.go | 1317 ++++ .../golang.org/x/text/unicode/bidi/bidi.go | 0 .../golang.org/x/text/unicode/bidi/bracket.go | 0 .../golang.org/x/text/unicode/bidi/core.go | 0 .../x/text/unicode/bidi/core_test.go | 224 + .../golang.org/x/text/unicode/bidi/gen.go | 0 .../x/text/unicode/bidi/gen_ranges.go | 0 .../x/text/unicode/bidi/gen_trieval.go | 0 .../golang.org/x/text/unicode/bidi/prop.go | 0 .../x/text/unicode/bidi/ranges_test.go | 53 + .../golang.org/x/text/unicode/bidi/tables.go | 0 .../x/text/unicode/bidi/tables_test.go | 82 + .../golang.org/x/text/unicode/bidi/trieval.go | 0 vendor/golang.org/x/text/unicode/cldr/base.go | 100 + vendor/golang.org/x/text/unicode/cldr/cldr.go | 130 + .../x/text/unicode/cldr/cldr_test.go | 27 + .../golang.org/x/text/unicode/cldr/collate.go | 359 ++ .../x/text/unicode/cldr/collate_test.go | 275 + .../x/text/unicode/cldr/data_test.go | 186 + .../golang.org/x/text/unicode/cldr/decode.go | 171 + .../x/text/unicode/cldr/examples_test.go | 21 + .../golang.org/x/text/unicode/cldr/makexml.go | 400 ++ .../golang.org/x/text/unicode/cldr/resolve.go | 602 ++ .../x/text/unicode/cldr/resolve_test.go | 368 ++ .../golang.org/x/text/unicode/cldr/slice.go | 144 + .../x/text/unicode/cldr/slice_test.go | 175 + vendor/golang.org/x/text/unicode/cldr/xml.go | 1456 +++++ vendor/golang.org/x/text/unicode/doc.go | 8 + .../x/text/unicode/norm/composition.go | 0 .../x/text/unicode/norm/composition_test.go | 130 + .../x/text/unicode/norm/example_iter_test.go | 82 + .../x/text/unicode/norm/example_test.go | 27 + .../x/text/unicode/norm/forminfo.go | 0 .../x/text/unicode/norm/forminfo_test.go | 54 + .../golang.org/x/text/unicode/norm/input.go | 0 .../golang.org/x/text/unicode/norm/iter.go | 0 .../x/text/unicode/norm/iter_test.go | 98 + .../x/text/unicode/norm/maketables.go | 0 .../x/text/unicode/norm/norm_test.go | 14 + .../x/text/unicode/norm/normalize.go | 0 .../x/text/unicode/norm/normalize_test.go | 1287 ++++ .../x/text/unicode/norm/readwriter.go | 0 .../x/text/unicode/norm/readwriter_test.go | 56 + .../golang.org/x/text/unicode/norm/tables.go | 0 .../x/text/unicode/norm/transform.go | 0 .../x/text/unicode/norm/transform_test.go | 101 + .../golang.org/x/text/unicode/norm/trie.go | 0 .../golang.org/x/text/unicode/norm/triegen.go | 0 .../x/text/unicode/norm/ucd_test.go | 275 + .../x/text/unicode/rangetable/gen.go | 113 + .../x/text/unicode/rangetable/merge.go | 260 + .../x/text/unicode/rangetable/merge_test.go | 184 + .../x/text/unicode/rangetable/rangetable.go | 70 + .../unicode/rangetable/rangetable_test.go | 55 + .../x/text/unicode/rangetable/tables.go | 5735 +++++++++++++++++ vendor/google.golang.org/genproto/.travis.yml | 12 + .../genproto/CONTRIBUTING.md | 27 + .../google.golang.org/genproto/LICENSE | 0 vendor/google.golang.org/genproto/README.md | 28 + .../googleapis/rpc/status/status.pb.go | 0 vendor/google.golang.org/genproto/regen.go | 123 + vendor/google.golang.org/genproto/regen.sh | 77 + vendor/google.golang.org/grpc/.travis.yml | 20 + vendor/google.golang.org/grpc/CONTRIBUTING.md | 46 + .../google.golang.org/grpc/LICENSE | 0 vendor/google.golang.org/grpc/Makefile | 52 + .../google.golang.org/grpc/PATENTS | 0 vendor/google.golang.org/grpc/README.md | 45 + .../google.golang.org/grpc/backoff.go | 0 vendor/google.golang.org/grpc/backoff_test.go | 11 + .../google.golang.org/grpc/balancer.go | 0 .../google.golang.org/grpc/balancer_test.go | 438 ++ .../google.golang.org/grpc/call.go | 0 vendor/google.golang.org/grpc/call_test.go | 299 + .../google.golang.org/grpc/clientconn.go | 0 .../google.golang.org/grpc/clientconn_test.go | 340 + .../google.golang.org/grpc/codec.go | 0 .../grpc/codec_benchmark_test.go | 115 + vendor/google.golang.org/grpc/codec_test.go | 143 + vendor/google.golang.org/grpc/codegen.sh | 17 + .../grpc/codes/code_string.go | 0 .../google.golang.org/grpc/codes/codes.go | 0 vendor/google.golang.org/grpc/coverage.sh | 48 + .../grpc/credentials/credentials.go | 0 .../grpc/credentials/credentials_test.go | 222 + .../grpc/credentials/credentials_util_go17.go | 0 .../grpc/credentials/credentials_util_go18.go | 0 .../credentials/credentials_util_pre_go17.go | 0 .../google.golang.org/grpc/doc.go | 0 .../google.golang.org/grpc/go16.go | 0 .../google.golang.org/grpc/go17.go | 0 .../google.golang.org/grpc/grpclb.go | 0 .../grpc/grpclb/grpc_lb_v1/grpclb.pb.go | 0 .../grpc/grpclb/grpc_lb_v1/grpclb.proto | 179 + .../grpc/grpclb/grpclb_server_generated.go | 54 + .../grpc/grpclb/grpclb_test.go | 933 +++ .../google.golang.org/grpc/grpclog/logger.go | 0 .../google.golang.org/grpc/interceptor.go | 0 .../grpc/internal/internal.go | 0 .../grpc/keepalive/keepalive.go | 0 .../grpc/metadata/metadata.go | 0 .../grpc/metadata/metadata_test.go | 86 + .../google.golang.org/grpc/naming/naming.go | 0 .../google.golang.org/grpc/peer/peer.go | 0 .../google.golang.org/grpc/proxy.go | 0 vendor/google.golang.org/grpc/proxy_test.go | 192 + .../google.golang.org/grpc/rpc_util.go | 0 .../google.golang.org/grpc/rpc_util_test.go | 241 + .../google.golang.org/grpc/server.go | 0 vendor/google.golang.org/grpc/server_test.go | 113 + .../google.golang.org/grpc/stats/handlers.go | 0 .../google.golang.org/grpc/stats/stats.go | 0 .../grpc/stats/stats_test.go | 1260 ++++ .../google.golang.org/grpc/status/status.go | 0 .../grpc/status/status_test.go | 129 + .../google.golang.org/grpc/stream.go | 0 .../google.golang.org/grpc/tap/tap.go | 0 .../google.golang.org/grpc/trace.go | 0 .../grpc/transport/control.go | 0 .../google.golang.org/grpc/transport/go16.go | 0 .../google.golang.org/grpc/transport/go17.go | 0 .../grpc/transport/handler_server.go | 0 .../grpc/transport/handler_server_test.go | 399 ++ .../grpc/transport/http2_client.go | 0 .../grpc/transport/http2_server.go | 0 .../grpc/transport/http_util.go | 0 .../grpc/transport/http_util_test.go | 190 + .../grpc/transport/transport.go | 0 .../grpc/transport/transport_test.go | 1609 +++++ .../natefinch/lumberjack.v2/.gitignore | 23 + .../gopkg.in/natefinch/lumberjack.v2/LICENSE | 0 .../natefinch/lumberjack.v2/README.md | 174 + .../gopkg.in/natefinch/lumberjack.v2/chown.go | 0 .../natefinch/lumberjack.v2/chown_linux.go | 0 .../natefinch/lumberjack.v2/example_test.go | 18 + .../natefinch/lumberjack.v2/linux_test.go | 104 + .../natefinch/lumberjack.v2/lumberjack.go | 0 .../lumberjack.v2/lumberjack_test.go | 690 ++ .../natefinch/lumberjack.v2/rotate_test.go | 27 + .../natefinch/lumberjack.v2/testing_test.go | 91 + 1585 files changed, 153188 insertions(+), 21272 deletions(-) create mode 100644 Gopkg.lock create mode 100644 Gopkg.toml delete mode 100644 _vendor/src/github.com/grpc-ecosystem/go-grpc-middleware/tags/context.go delete mode 100644 _vendor/src/github.com/grpc-ecosystem/go-grpc-middleware/tags/doc.go delete mode 100644 _vendor/src/github.com/grpc-ecosystem/go-grpc-middleware/tags/fieldextractor.go delete mode 100644 _vendor/src/github.com/grpc-ecosystem/go-grpc-middleware/tags/interceptors.go delete mode 100644 _vendor/src/github.com/grpc-ecosystem/go-grpc-middleware/tags/options.go delete mode 100644 _vendor/src/github.com/pingcap/mysqlx-driver/LICENSE delete mode 100644 _vendor/src/github.com/pingcap/mysqlx-driver/appengine.go delete mode 100644 _vendor/src/github.com/pingcap/mysqlx-driver/buffer.go delete mode 100644 _vendor/src/github.com/pingcap/mysqlx-driver/capability.go delete mode 100644 _vendor/src/github.com/pingcap/mysqlx-driver/collations.go delete mode 100644 _vendor/src/github.com/pingcap/mysqlx-driver/config.go delete mode 100644 _vendor/src/github.com/pingcap/mysqlx-driver/connection.go delete mode 100644 _vendor/src/github.com/pingcap/mysqlx-driver/const.go delete mode 100644 _vendor/src/github.com/pingcap/mysqlx-driver/convert.go delete mode 100644 _vendor/src/github.com/pingcap/mysqlx-driver/datatypes.go delete mode 100644 _vendor/src/github.com/pingcap/mysqlx-driver/driver.go delete mode 100644 _vendor/src/github.com/pingcap/mysqlx-driver/errors.go delete mode 100644 _vendor/src/github.com/pingcap/mysqlx-driver/mysql41.go delete mode 100644 _vendor/src/github.com/pingcap/mysqlx-driver/protocol.go delete mode 100644 _vendor/src/github.com/pingcap/mysqlx-driver/result.go delete mode 100644 _vendor/src/github.com/pingcap/mysqlx-driver/rows.go delete mode 100644 _vendor/src/github.com/pingcap/mysqlx-driver/state.go delete mode 100644 _vendor/src/github.com/pingcap/mysqlx-driver/utils.go delete mode 100644 _vendor/src/github.com/pingcap/mysqlx-driver/xconfig.go delete mode 100644 _vendor/src/github.com/pingcap/tipb/go-mysqlx/Connection/mysqlx_connection.pb.go delete mode 100644 _vendor/src/github.com/pingcap/tipb/go-mysqlx/Crud/mysqlx_crud.pb.go delete mode 100644 _vendor/src/github.com/pingcap/tipb/go-mysqlx/Datatypes/mysqlx_datatypes.pb.go delete mode 100644 _vendor/src/github.com/pingcap/tipb/go-mysqlx/Expect/mysqlx_expect.pb.go delete mode 100644 _vendor/src/github.com/pingcap/tipb/go-mysqlx/Expr/mysqlx_expr.pb.go delete mode 100644 _vendor/src/github.com/pingcap/tipb/go-mysqlx/Notice/mysqlx_notice.pb.go delete mode 100644 _vendor/src/github.com/pingcap/tipb/go-mysqlx/Resultset/mysqlx_resultset.pb.go delete mode 100644 _vendor/src/github.com/pingcap/tipb/go-mysqlx/Session/mysqlx_session.pb.go delete mode 100644 _vendor/src/github.com/pingcap/tipb/go-mysqlx/Sql/mysqlx_sql.pb.go delete mode 100644 _vendor/src/github.com/pingcap/tipb/go-mysqlx/mysqlx.pb.go create mode 100644 vendor/github.com/BurntSushi/toml/.gitignore create mode 100644 vendor/github.com/BurntSushi/toml/.travis.yml create mode 100644 vendor/github.com/BurntSushi/toml/COMPATIBLE rename {_vendor/src => vendor}/github.com/BurntSushi/toml/COPYING (100%) create mode 100644 vendor/github.com/BurntSushi/toml/Makefile create mode 100644 vendor/github.com/BurntSushi/toml/README.md rename {_vendor/src => vendor}/github.com/BurntSushi/toml/decode.go (100%) rename {_vendor/src => vendor}/github.com/BurntSushi/toml/decode_meta.go (100%) create mode 100644 vendor/github.com/BurntSushi/toml/decode_test.go rename {_vendor/src => vendor}/github.com/BurntSushi/toml/doc.go (100%) rename {_vendor/src => vendor}/github.com/BurntSushi/toml/encode.go (100%) create mode 100644 vendor/github.com/BurntSushi/toml/encode_test.go rename {_vendor/src => vendor}/github.com/BurntSushi/toml/encoding_types.go (100%) rename {_vendor/src => vendor}/github.com/BurntSushi/toml/encoding_types_1.1.go (100%) rename {_vendor/src => vendor}/github.com/BurntSushi/toml/lex.go (100%) rename {_vendor/src => vendor}/github.com/BurntSushi/toml/parse.go (100%) create mode 100644 vendor/github.com/BurntSushi/toml/session.vim rename {_vendor/src => vendor}/github.com/BurntSushi/toml/type_check.go (100%) rename {_vendor/src => vendor}/github.com/BurntSushi/toml/type_fields.go (100%) create mode 100644 vendor/github.com/Sirupsen/logrus/.gitignore create mode 100644 vendor/github.com/Sirupsen/logrus/.travis.yml create mode 100644 vendor/github.com/Sirupsen/logrus/CHANGELOG.md rename {_vendor/src => vendor}/github.com/Sirupsen/logrus/LICENSE (100%) create mode 100644 vendor/github.com/Sirupsen/logrus/README.md rename {_vendor/src => vendor}/github.com/Sirupsen/logrus/alt_exit.go (100%) create mode 100644 vendor/github.com/Sirupsen/logrus/alt_exit_test.go rename {_vendor/src => vendor}/github.com/Sirupsen/logrus/doc.go (100%) rename {_vendor/src => vendor}/github.com/Sirupsen/logrus/entry.go (100%) create mode 100644 vendor/github.com/Sirupsen/logrus/entry_test.go rename {_vendor/src => vendor}/github.com/Sirupsen/logrus/exported.go (100%) rename {_vendor/src => vendor}/github.com/Sirupsen/logrus/formatter.go (100%) create mode 100644 vendor/github.com/Sirupsen/logrus/formatter_bench_test.go create mode 100644 vendor/github.com/Sirupsen/logrus/hook_test.go rename {_vendor/src => vendor}/github.com/Sirupsen/logrus/hooks.go (100%) rename {_vendor/src => vendor}/github.com/Sirupsen/logrus/json_formatter.go (100%) create mode 100644 vendor/github.com/Sirupsen/logrus/json_formatter_test.go rename {_vendor/src => vendor}/github.com/Sirupsen/logrus/logger.go (100%) create mode 100644 vendor/github.com/Sirupsen/logrus/logger_bench_test.go rename {_vendor/src => vendor}/github.com/Sirupsen/logrus/logrus.go (100%) create mode 100644 vendor/github.com/Sirupsen/logrus/logrus_test.go rename {_vendor/src => vendor}/github.com/Sirupsen/logrus/terminal_appengine.go (100%) rename {_vendor/src => vendor}/github.com/Sirupsen/logrus/terminal_bsd.go (100%) rename {_vendor/src => vendor}/github.com/Sirupsen/logrus/terminal_linux.go (100%) rename {_vendor/src => vendor}/github.com/Sirupsen/logrus/terminal_notwindows.go (100%) rename {_vendor/src => vendor}/github.com/Sirupsen/logrus/terminal_solaris.go (100%) rename {_vendor/src => vendor}/github.com/Sirupsen/logrus/terminal_windows.go (100%) rename {_vendor/src => vendor}/github.com/Sirupsen/logrus/text_formatter.go (100%) create mode 100644 vendor/github.com/Sirupsen/logrus/text_formatter_test.go rename {_vendor/src => vendor}/github.com/Sirupsen/logrus/writer.go (100%) create mode 100644 vendor/github.com/apache/thrift/.clang-format create mode 100644 vendor/github.com/apache/thrift/.dockerignore create mode 100755 vendor/github.com/apache/thrift/.editorconfig create mode 100644 vendor/github.com/apache/thrift/.gitattributes create mode 100644 vendor/github.com/apache/thrift/.gitignore create mode 100644 vendor/github.com/apache/thrift/.travis.yml create mode 100644 vendor/github.com/apache/thrift/CHANGES create mode 100644 vendor/github.com/apache/thrift/CMakeLists.txt create mode 100644 vendor/github.com/apache/thrift/CONTRIBUTING.md create mode 100644 vendor/github.com/apache/thrift/Dockerfile rename {_vendor/src => vendor}/github.com/apache/thrift/LICENSE (100%) create mode 100755 vendor/github.com/apache/thrift/Makefile.am rename {_vendor/src => vendor}/github.com/apache/thrift/NOTICE (100%) create mode 100644 vendor/github.com/apache/thrift/README.md create mode 100644 vendor/github.com/apache/thrift/Thrift.podspec create mode 100755 vendor/github.com/apache/thrift/appveyor.yml create mode 100755 vendor/github.com/apache/thrift/bootstrap.sh create mode 100644 vendor/github.com/apache/thrift/bower.json create mode 100755 vendor/github.com/apache/thrift/cleanup.sh create mode 100644 vendor/github.com/apache/thrift/composer.json create mode 100755 vendor/github.com/apache/thrift/configure.ac create mode 100755 vendor/github.com/apache/thrift/doap.rdf create mode 100644 vendor/github.com/apache/thrift/lib/Makefile.am create mode 100644 vendor/github.com/apache/thrift/lib/go/Makefile.am create mode 100644 vendor/github.com/apache/thrift/lib/go/README.md create mode 100644 vendor/github.com/apache/thrift/lib/go/coding_standards.md rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/application_exception.go (100%) create mode 100644 vendor/github.com/apache/thrift/lib/go/thrift/application_exception_test.go rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/binary_protocol.go (100%) create mode 100644 vendor/github.com/apache/thrift/lib/go/thrift/binary_protocol_test.go rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/buffered_transport.go (100%) create mode 100644 vendor/github.com/apache/thrift/lib/go/thrift/buffered_transport_test.go rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/compact_protocol.go (100%) create mode 100644 vendor/github.com/apache/thrift/lib/go/thrift/compact_protocol_test.go rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/debug_protocol.go (100%) rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/deserializer.go (100%) rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/exception.go (100%) create mode 100644 vendor/github.com/apache/thrift/lib/go/thrift/exception_test.go rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/field.go (100%) rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/framed_transport.go (100%) create mode 100644 vendor/github.com/apache/thrift/lib/go/thrift/framed_transport_test.go rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/http_client.go (100%) create mode 100644 vendor/github.com/apache/thrift/lib/go/thrift/http_client_test.go rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/http_transport.go (100%) rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/iostream_transport.go (100%) create mode 100644 vendor/github.com/apache/thrift/lib/go/thrift/iostream_transport_test.go rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/json_protocol.go (100%) create mode 100644 vendor/github.com/apache/thrift/lib/go/thrift/json_protocol_test.go create mode 100644 vendor/github.com/apache/thrift/lib/go/thrift/lowlevel_benchmarks_test.go rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/memory_buffer.go (100%) create mode 100644 vendor/github.com/apache/thrift/lib/go/thrift/memory_buffer_test.go rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/messagetype.go (100%) rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/multiplexed_protocol.go (100%) rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/numeric.go (100%) rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/pointerize.go (100%) rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/processor.go (100%) rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/processor_factory.go (100%) rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/protocol.go (100%) rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/protocol_exception.go (100%) rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/protocol_factory.go (100%) create mode 100644 vendor/github.com/apache/thrift/lib/go/thrift/protocol_test.go rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/rich_transport.go (100%) create mode 100644 vendor/github.com/apache/thrift/lib/go/thrift/rich_transport_test.go rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/serializer.go (100%) create mode 100644 vendor/github.com/apache/thrift/lib/go/thrift/serializer_test.go create mode 100644 vendor/github.com/apache/thrift/lib/go/thrift/serializer_types_test.go rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/server.go (100%) rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/server_socket.go (100%) create mode 100644 vendor/github.com/apache/thrift/lib/go/thrift/server_socket_test.go create mode 100644 vendor/github.com/apache/thrift/lib/go/thrift/server_test.go rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/server_transport.go (100%) rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/simple_json_protocol.go (100%) create mode 100644 vendor/github.com/apache/thrift/lib/go/thrift/simple_json_protocol_test.go rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/simple_server.go (100%) rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/socket.go (100%) rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/ssl_server_socket.go (100%) rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/ssl_socket.go (100%) rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/transport.go (100%) rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/transport_exception.go (100%) create mode 100644 vendor/github.com/apache/thrift/lib/go/thrift/transport_exception_test.go rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/transport_factory.go (100%) create mode 100644 vendor/github.com/apache/thrift/lib/go/thrift/transport_test.go rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/type.go (100%) rename {_vendor/src => vendor}/github.com/apache/thrift/lib/go/thrift/zlib_transport.go (100%) create mode 100644 vendor/github.com/apache/thrift/lib/go/thrift/zlib_transport_test.go create mode 100644 vendor/github.com/apache/thrift/package.json create mode 100755 vendor/github.com/apache/thrift/sonar-project.properties create mode 100644 vendor/github.com/beorn7/perks/.gitignore rename {_vendor/src => vendor}/github.com/beorn7/perks/LICENSE (100%) create mode 100644 vendor/github.com/beorn7/perks/README.md create mode 100644 vendor/github.com/beorn7/perks/quantile/bench_test.go create mode 100644 vendor/github.com/beorn7/perks/quantile/example_test.go create mode 100644 vendor/github.com/beorn7/perks/quantile/exampledata.txt rename {_vendor/src => vendor}/github.com/beorn7/perks/quantile/stream.go (100%) create mode 100644 vendor/github.com/beorn7/perks/quantile/stream_test.go create mode 100644 vendor/github.com/blacktear23/go-proxyprotocol/.travis.yml rename {_vendor/src => vendor}/github.com/blacktear23/go-proxyprotocol/LICENSE (100%) create mode 100644 vendor/github.com/blacktear23/go-proxyprotocol/README.md rename {_vendor/src => vendor}/github.com/blacktear23/go-proxyprotocol/proxy_protocol.go (100%) rename {_vendor/src => vendor}/github.com/blacktear23/go-proxyprotocol/proxy_protocol_test.go (100%) create mode 100644 vendor/github.com/codahale/hdrhistogram/.travis.yml rename {_vendor/src => vendor}/github.com/codahale/hdrhistogram/LICENSE (100%) create mode 100644 vendor/github.com/codahale/hdrhistogram/README.md rename {_vendor/src => vendor}/github.com/codahale/hdrhistogram/hdr.go (100%) create mode 100644 vendor/github.com/codahale/hdrhistogram/hdr_test.go rename {_vendor/src => vendor}/github.com/codahale/hdrhistogram/window.go (100%) create mode 100644 vendor/github.com/codahale/hdrhistogram/window_test.go create mode 100644 vendor/github.com/coreos/etcd/.dockerignore create mode 100644 vendor/github.com/coreos/etcd/.gitignore create mode 100644 vendor/github.com/coreos/etcd/.godir create mode 100644 vendor/github.com/coreos/etcd/.header create mode 100644 vendor/github.com/coreos/etcd/.travis.yml create mode 100644 vendor/github.com/coreos/etcd/CONTRIBUTING.md create mode 100644 vendor/github.com/coreos/etcd/DCO create mode 100644 vendor/github.com/coreos/etcd/Dockerfile create mode 100644 vendor/github.com/coreos/etcd/Dockerfile-release create mode 100644 vendor/github.com/coreos/etcd/Dockerfile-release.arm64 create mode 100644 vendor/github.com/coreos/etcd/Dockerfile-release.ppc64le rename {_vendor/src => vendor}/github.com/coreos/etcd/LICENSE (100%) create mode 100644 vendor/github.com/coreos/etcd/MAINTAINERS create mode 100644 vendor/github.com/coreos/etcd/NEWS rename {_vendor/src => vendor}/github.com/coreos/etcd/NOTICE (100%) create mode 100644 vendor/github.com/coreos/etcd/Procfile create mode 100644 vendor/github.com/coreos/etcd/README.md create mode 100644 vendor/github.com/coreos/etcd/ROADMAP.md create mode 100644 vendor/github.com/coreos/etcd/V2Procfile rename {_vendor/src => vendor}/github.com/coreos/etcd/auth/authpb/auth.pb.go (100%) create mode 100644 vendor/github.com/coreos/etcd/auth/authpb/auth.proto create mode 100644 vendor/github.com/coreos/etcd/auth/doc.go create mode 100644 vendor/github.com/coreos/etcd/auth/jwt.go create mode 100644 vendor/github.com/coreos/etcd/auth/range_perm_cache.go create mode 100644 vendor/github.com/coreos/etcd/auth/range_perm_cache_test.go create mode 100644 vendor/github.com/coreos/etcd/auth/simple_token.go create mode 100644 vendor/github.com/coreos/etcd/auth/store.go create mode 100644 vendor/github.com/coreos/etcd/auth/store_test.go create mode 100644 vendor/github.com/coreos/etcd/bill-of-materials.json create mode 100644 vendor/github.com/coreos/etcd/bill-of-materials.override.json create mode 100755 vendor/github.com/coreos/etcd/build create mode 100755 vendor/github.com/coreos/etcd/build.bat create mode 100644 vendor/github.com/coreos/etcd/build.ps1 create mode 100644 vendor/github.com/coreos/etcd/client/README.md create mode 100644 vendor/github.com/coreos/etcd/client/auth_role.go create mode 100644 vendor/github.com/coreos/etcd/client/auth_user.go create mode 100644 vendor/github.com/coreos/etcd/client/cancelreq.go create mode 100644 vendor/github.com/coreos/etcd/client/client.go create mode 100644 vendor/github.com/coreos/etcd/client/client_test.go create mode 100644 vendor/github.com/coreos/etcd/client/cluster_error.go create mode 100644 vendor/github.com/coreos/etcd/client/curl.go create mode 100644 vendor/github.com/coreos/etcd/client/discover.go create mode 100644 vendor/github.com/coreos/etcd/client/doc.go create mode 100644 vendor/github.com/coreos/etcd/client/fake_transport_test.go create mode 100644 vendor/github.com/coreos/etcd/client/keys.generated.go create mode 100644 vendor/github.com/coreos/etcd/client/keys.go create mode 100644 vendor/github.com/coreos/etcd/client/keys_bench_test.go create mode 100644 vendor/github.com/coreos/etcd/client/keys_test.go create mode 100644 vendor/github.com/coreos/etcd/client/members.go create mode 100644 vendor/github.com/coreos/etcd/client/members_test.go create mode 100644 vendor/github.com/coreos/etcd/client/util.go create mode 100644 vendor/github.com/coreos/etcd/clientv3/README.md rename {_vendor/src => vendor}/github.com/coreos/etcd/clientv3/auth.go (100%) rename {_vendor/src => vendor}/github.com/coreos/etcd/clientv3/balancer.go (100%) create mode 100644 vendor/github.com/coreos/etcd/clientv3/balancer_test.go rename {_vendor/src => vendor}/github.com/coreos/etcd/clientv3/client.go (100%) create mode 100644 vendor/github.com/coreos/etcd/clientv3/client_test.go rename {_vendor/src => vendor}/github.com/coreos/etcd/clientv3/cluster.go (100%) rename {_vendor/src => vendor}/github.com/coreos/etcd/clientv3/compact_op.go (100%) create mode 100644 vendor/github.com/coreos/etcd/clientv3/compact_op_test.go rename {_vendor/src => vendor}/github.com/coreos/etcd/clientv3/compare.go (100%) rename {_vendor/src => vendor}/github.com/coreos/etcd/clientv3/concurrency/doc.go (100%) rename {_vendor/src => vendor}/github.com/coreos/etcd/clientv3/concurrency/election.go (100%) rename {_vendor/src => vendor}/github.com/coreos/etcd/clientv3/concurrency/key.go (100%) rename {_vendor/src => vendor}/github.com/coreos/etcd/clientv3/concurrency/mutex.go (100%) rename {_vendor/src => vendor}/github.com/coreos/etcd/clientv3/concurrency/session.go (100%) rename {_vendor/src => vendor}/github.com/coreos/etcd/clientv3/concurrency/stm.go (100%) rename {_vendor/src => vendor}/github.com/coreos/etcd/clientv3/config.go (100%) rename {_vendor/src => vendor}/github.com/coreos/etcd/clientv3/doc.go (100%) create mode 100644 vendor/github.com/coreos/etcd/clientv3/example_auth_test.go create mode 100644 vendor/github.com/coreos/etcd/clientv3/example_cluster_test.go create mode 100644 vendor/github.com/coreos/etcd/clientv3/example_kv_test.go create mode 100644 vendor/github.com/coreos/etcd/clientv3/example_lease_test.go create mode 100644 vendor/github.com/coreos/etcd/clientv3/example_maintenence_test.go create mode 100644 vendor/github.com/coreos/etcd/clientv3/example_metrics_test.go create mode 100644 vendor/github.com/coreos/etcd/clientv3/example_test.go create mode 100644 vendor/github.com/coreos/etcd/clientv3/example_watch_test.go rename {_vendor/src => vendor}/github.com/coreos/etcd/clientv3/kv.go (100%) rename {_vendor/src => vendor}/github.com/coreos/etcd/clientv3/lease.go (100%) rename {_vendor/src => vendor}/github.com/coreos/etcd/clientv3/logger.go (100%) create mode 100644 vendor/github.com/coreos/etcd/clientv3/main_test.go rename {_vendor/src => vendor}/github.com/coreos/etcd/clientv3/maintenance.go (100%) rename {_vendor/src => vendor}/github.com/coreos/etcd/clientv3/op.go (100%) create mode 100644 vendor/github.com/coreos/etcd/clientv3/op_test.go rename {_vendor/src => vendor}/github.com/coreos/etcd/clientv3/retry.go (100%) rename {_vendor/src => vendor}/github.com/coreos/etcd/clientv3/sort.go (100%) rename {_vendor/src => vendor}/github.com/coreos/etcd/clientv3/txn.go (100%) create mode 100644 vendor/github.com/coreos/etcd/clientv3/txn_test.go rename {_vendor/src => vendor}/github.com/coreos/etcd/clientv3/watch.go (100%) create mode 100644 vendor/github.com/coreos/etcd/clientv3/watch_test.go create mode 100755 vendor/github.com/coreos/etcd/cover create mode 100644 vendor/github.com/coreos/etcd/etcd.conf.yml.sample create mode 100644 vendor/github.com/coreos/etcd/etcdserver/api/capability.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/api/cluster.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/api/doc.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/auth.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/codec.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/grpc.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/header.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/interceptor.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/key.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/lease.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/maintenance.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/member.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/metrics.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/quota.go rename {_vendor/src => vendor}/github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes/doc.go (100%) rename {_vendor/src => vendor}/github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes/error.go (100%) create mode 100644 vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes/error_test.go rename {_vendor/src => vendor}/github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes/md.go (100%) create mode 100644 vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/util.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/watch.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/apply.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/apply_auth.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/apply_v2.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/backend.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/cluster_util.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/cluster_util_test.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/config.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/config_test.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/consistent_index.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/consistent_index_test.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/doc.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/errors.go rename {_vendor/src => vendor}/github.com/coreos/etcd/etcdserver/etcdserverpb/etcdserver.pb.go (100%) create mode 100644 vendor/github.com/coreos/etcd/etcdserver/etcdserverpb/etcdserver.proto rename {_vendor/src => vendor}/github.com/coreos/etcd/etcdserver/etcdserverpb/raft_internal.pb.go (100%) create mode 100644 vendor/github.com/coreos/etcd/etcdserver/etcdserverpb/raft_internal.proto rename {_vendor/src => vendor}/github.com/coreos/etcd/etcdserver/etcdserverpb/rpc.pb.go (100%) create mode 100644 vendor/github.com/coreos/etcd/etcdserver/etcdserverpb/rpc.proto create mode 100644 vendor/github.com/coreos/etcd/etcdserver/metrics.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/quota.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/raft.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/raft_test.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/server.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/server_test.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/snapshot_merge.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/storage.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/util.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/util_test.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/v2_server.go create mode 100644 vendor/github.com/coreos/etcd/etcdserver/v3_server.go create mode 100644 vendor/github.com/coreos/etcd/glide.lock create mode 100644 vendor/github.com/coreos/etcd/glide.yaml create mode 100644 vendor/github.com/coreos/etcd/main.go create mode 100644 vendor/github.com/coreos/etcd/main_test.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/doc.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/index.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/index_test.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/key_index.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/key_index_test.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/kv.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/kv_test.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/kv_view.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/kvstore.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/kvstore_bench_test.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/kvstore_compaction.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/kvstore_compaction_test.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/kvstore_test.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/kvstore_txn.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/metrics.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/metrics_txn.go rename {_vendor/src => vendor}/github.com/coreos/etcd/mvcc/mvccpb/kv.pb.go (100%) create mode 100644 vendor/github.com/coreos/etcd/mvcc/mvccpb/kv.proto create mode 100644 vendor/github.com/coreos/etcd/mvcc/revision.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/revision_test.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/util.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/watchable_store.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/watchable_store_bench_test.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/watchable_store_test.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/watchable_store_txn.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/watcher.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/watcher_bench_test.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/watcher_group.go create mode 100644 vendor/github.com/coreos/etcd/mvcc/watcher_test.go create mode 100755 vendor/github.com/coreos/etcd/test create mode 100644 vendor/github.com/coreos/gofail/.travis.yml rename {_vendor/src => vendor}/github.com/coreos/gofail/LICENSE (100%) create mode 100644 vendor/github.com/coreos/gofail/Makefile create mode 100644 vendor/github.com/coreos/gofail/README.md create mode 100644 vendor/github.com/coreos/gofail/gofail.go rename {_vendor/src => vendor}/github.com/coreos/gofail/runtime/failpoint.go (100%) rename {_vendor/src => vendor}/github.com/coreos/gofail/runtime/http.go (100%) rename {_vendor/src => vendor}/github.com/coreos/gofail/runtime/runtime.go (100%) rename {_vendor/src => vendor}/github.com/coreos/gofail/runtime/terms.go (100%) create mode 100644 vendor/github.com/coreos/gofail/runtime/terms_test.go create mode 100644 vendor/github.com/cznic/golex/AUTHORS create mode 100644 vendor/github.com/cznic/golex/CONTRIBUTORS rename {_vendor/src => vendor}/github.com/cznic/golex/LICENSE (100%) create mode 100644 vendor/github.com/cznic/golex/Makefile create mode 100644 vendor/github.com/cznic/golex/README create mode 100644 vendor/github.com/cznic/golex/all_test.go create mode 100644 vendor/github.com/cznic/golex/doc.go create mode 100644 vendor/github.com/cznic/golex/lex/Makefile create mode 100644 vendor/github.com/cznic/golex/lex/all_test.go rename {_vendor/src => vendor}/github.com/cznic/golex/lex/api.go (100%) create mode 100644 vendor/github.com/cznic/golex/lex/dfa rename {_vendor/src => vendor}/github.com/cznic/golex/lex/doc.go (100%) create mode 100644 vendor/github.com/cznic/golex/lex/example.l create mode 100644 vendor/github.com/cznic/golex/lex/example_test.go create mode 100644 vendor/github.com/cznic/golex/main.go create mode 100644 vendor/github.com/cznic/golex/render.go create mode 100644 vendor/github.com/cznic/mathutil/AUTHORS create mode 100644 vendor/github.com/cznic/mathutil/CONTRIBUTORS rename {_vendor/src => vendor}/github.com/cznic/mathutil/LICENSE (100%) create mode 100644 vendor/github.com/cznic/mathutil/Makefile create mode 100644 vendor/github.com/cznic/mathutil/README create mode 100644 vendor/github.com/cznic/mathutil/all_test.go rename {_vendor/src => vendor}/github.com/cznic/mathutil/bits.go (100%) rename {_vendor/src => vendor}/github.com/cznic/mathutil/envelope.go (100%) rename {_vendor/src => vendor}/github.com/cznic/mathutil/mathutil.go (100%) create mode 100644 vendor/github.com/cznic/mathutil/nist-sts-2-1-1-report rename {_vendor/src => vendor}/github.com/cznic/mathutil/permute.go (100%) rename {_vendor/src => vendor}/github.com/cznic/mathutil/primes.go (100%) rename {_vendor/src => vendor}/github.com/cznic/mathutil/rat.go (100%) rename {_vendor/src => vendor}/github.com/cznic/mathutil/rnd.go (100%) rename {_vendor/src => vendor}/github.com/cznic/mathutil/tables.go (100%) rename {_vendor/src => vendor}/github.com/cznic/mathutil/test_deps.go (100%) create mode 100644 vendor/github.com/cznic/parser/README.md create mode 100644 vendor/github.com/cznic/parser/yacc/AUTHORS create mode 100644 vendor/github.com/cznic/parser/yacc/CONTRIBUTORS rename {_vendor/src => vendor}/github.com/cznic/parser/yacc/LICENSE (100%) create mode 100644 vendor/github.com/cznic/parser/yacc/Makefile create mode 100644 vendor/github.com/cznic/parser/yacc/all_test.go rename {_vendor/src => vendor}/github.com/cznic/parser/yacc/api.go (100%) rename {_vendor/src => vendor}/github.com/cznic/parser/yacc/ast.go (100%) create mode 100644 vendor/github.com/cznic/parser/yacc/ast_test.go rename {_vendor/src => vendor}/github.com/cznic/parser/yacc/generate.go (100%) create mode 100644 vendor/github.com/cznic/parser/yacc/go.l rename {_vendor/src => vendor}/github.com/cznic/parser/yacc/goscanner.go (100%) rename {_vendor/src => vendor}/github.com/cznic/parser/yacc/lexer.go (100%) rename {_vendor/src => vendor}/github.com/cznic/parser/yacc/parser.go (100%) create mode 100644 vendor/github.com/cznic/parser/yacc/parser.y create mode 100644 vendor/github.com/cznic/parser/yacc/parser.yy rename {_vendor/src => vendor}/github.com/cznic/parser/yacc/scanner.go (100%) create mode 100644 vendor/github.com/cznic/parser/yacc/xerrors create mode 100644 vendor/github.com/cznic/parser/yacc/y.l create mode 100644 vendor/github.com/cznic/sortutil/AUTHORS create mode 100644 vendor/github.com/cznic/sortutil/CONTRIBUTORS rename {_vendor/src => vendor}/github.com/cznic/sortutil/LICENSE (100%) create mode 100644 vendor/github.com/cznic/sortutil/Makefile create mode 100644 vendor/github.com/cznic/sortutil/README create mode 100644 vendor/github.com/cznic/sortutil/all_test.go rename {_vendor/src => vendor}/github.com/cznic/sortutil/sortutil.go (100%) create mode 100644 vendor/github.com/cznic/strutil/AUTHORS create mode 100644 vendor/github.com/cznic/strutil/CONTRIBUTORS rename {_vendor/src => vendor}/github.com/cznic/strutil/LICENSE (100%) create mode 100644 vendor/github.com/cznic/strutil/Makefile create mode 100644 vendor/github.com/cznic/strutil/README create mode 100644 vendor/github.com/cznic/strutil/all_test.go rename {_vendor/src => vendor}/github.com/cznic/strutil/strutil.go (100%) create mode 100644 vendor/github.com/cznic/y/AUTHORS create mode 100644 vendor/github.com/cznic/y/CONTRIBUTORS rename {_vendor/src => vendor}/github.com/cznic/y/LICENSE (100%) create mode 100644 vendor/github.com/cznic/y/Makefile create mode 100644 vendor/github.com/cznic/y/README.md create mode 100644 vendor/github.com/cznic/y/all_test.go rename {_vendor/src => vendor}/github.com/cznic/y/api.go (100%) rename {_vendor/src => vendor}/github.com/cznic/y/y.go (100%) create mode 100644 vendor/github.com/go-sql-driver/mysql/.gitignore create mode 100644 vendor/github.com/go-sql-driver/mysql/.travis.yml create mode 100644 vendor/github.com/go-sql-driver/mysql/AUTHORS create mode 100644 vendor/github.com/go-sql-driver/mysql/CHANGELOG.md create mode 100644 vendor/github.com/go-sql-driver/mysql/CONTRIBUTING.md rename {_vendor/src => vendor}/github.com/go-sql-driver/mysql/LICENSE (100%) create mode 100644 vendor/github.com/go-sql-driver/mysql/README.md rename {_vendor/src => vendor}/github.com/go-sql-driver/mysql/appengine.go (100%) create mode 100644 vendor/github.com/go-sql-driver/mysql/benchmark_go18_test.go create mode 100644 vendor/github.com/go-sql-driver/mysql/benchmark_test.go rename {_vendor/src => vendor}/github.com/go-sql-driver/mysql/buffer.go (100%) rename {_vendor/src => vendor}/github.com/go-sql-driver/mysql/collations.go (100%) rename {_vendor/src => vendor}/github.com/go-sql-driver/mysql/connection.go (100%) rename {_vendor/src => vendor}/github.com/go-sql-driver/mysql/connection_go18.go (100%) create mode 100644 vendor/github.com/go-sql-driver/mysql/connection_test.go rename {_vendor/src => vendor}/github.com/go-sql-driver/mysql/const.go (100%) rename {_vendor/src => vendor}/github.com/go-sql-driver/mysql/driver.go (100%) create mode 100644 vendor/github.com/go-sql-driver/mysql/driver_go18_test.go create mode 100644 vendor/github.com/go-sql-driver/mysql/driver_test.go rename {_vendor/src => vendor}/github.com/go-sql-driver/mysql/dsn.go (100%) create mode 100644 vendor/github.com/go-sql-driver/mysql/dsn_test.go rename {_vendor/src => vendor}/github.com/go-sql-driver/mysql/errors.go (100%) create mode 100644 vendor/github.com/go-sql-driver/mysql/errors_test.go rename {_vendor/src => vendor}/github.com/go-sql-driver/mysql/infile.go (100%) rename {_vendor/src => vendor}/github.com/go-sql-driver/mysql/packets.go (100%) create mode 100644 vendor/github.com/go-sql-driver/mysql/packets_test.go rename {_vendor/src => vendor}/github.com/go-sql-driver/mysql/result.go (100%) rename {_vendor/src => vendor}/github.com/go-sql-driver/mysql/rows.go (100%) rename {_vendor/src => vendor}/github.com/go-sql-driver/mysql/statement.go (100%) rename {_vendor/src => vendor}/github.com/go-sql-driver/mysql/transaction.go (100%) rename {_vendor/src => vendor}/github.com/go-sql-driver/mysql/utils.go (100%) rename {_vendor/src => vendor}/github.com/go-sql-driver/mysql/utils_go17.go (100%) rename {_vendor/src => vendor}/github.com/go-sql-driver/mysql/utils_go18.go (100%) create mode 100644 vendor/github.com/go-sql-driver/mysql/utils_go18_test.go rename {_vendor/src => vendor}/github.com/go-sql-driver/mysql/utils_legacy.go (100%) create mode 100644 vendor/github.com/go-sql-driver/mysql/utils_test.go create mode 100644 vendor/github.com/golang/protobuf/.gitignore create mode 100644 vendor/github.com/golang/protobuf/AUTHORS create mode 100644 vendor/github.com/golang/protobuf/CONTRIBUTORS rename {_vendor/src => vendor}/github.com/golang/protobuf/LICENSE (100%) create mode 100644 vendor/github.com/golang/protobuf/Make.protobuf create mode 100644 vendor/github.com/golang/protobuf/Makefile create mode 100644 vendor/github.com/golang/protobuf/README.md create mode 100644 vendor/github.com/golang/protobuf/proto/Makefile create mode 100644 vendor/github.com/golang/protobuf/proto/all_test.go create mode 100644 vendor/github.com/golang/protobuf/proto/any_test.go rename {_vendor/src => vendor}/github.com/golang/protobuf/proto/clone.go (100%) create mode 100644 vendor/github.com/golang/protobuf/proto/clone_test.go rename {_vendor/src => vendor}/github.com/golang/protobuf/proto/decode.go (100%) create mode 100644 vendor/github.com/golang/protobuf/proto/decode_test.go rename {_vendor/src => vendor}/github.com/golang/protobuf/proto/encode.go (100%) create mode 100644 vendor/github.com/golang/protobuf/proto/encode_test.go rename {_vendor/src => vendor}/github.com/golang/protobuf/proto/equal.go (100%) create mode 100644 vendor/github.com/golang/protobuf/proto/equal_test.go rename {_vendor/src => vendor}/github.com/golang/protobuf/proto/extensions.go (100%) create mode 100644 vendor/github.com/golang/protobuf/proto/extensions_test.go rename {_vendor/src => vendor}/github.com/golang/protobuf/proto/lib.go (100%) create mode 100644 vendor/github.com/golang/protobuf/proto/map_test.go rename {_vendor/src => vendor}/github.com/golang/protobuf/proto/message_set.go (100%) create mode 100644 vendor/github.com/golang/protobuf/proto/message_set_test.go rename {_vendor/src => vendor}/github.com/golang/protobuf/proto/pointer_reflect.go (100%) rename {_vendor/src => vendor}/github.com/golang/protobuf/proto/pointer_unsafe.go (100%) rename {_vendor/src => vendor}/github.com/golang/protobuf/proto/properties.go (100%) create mode 100644 vendor/github.com/golang/protobuf/proto/proto3_test.go create mode 100644 vendor/github.com/golang/protobuf/proto/size2_test.go create mode 100644 vendor/github.com/golang/protobuf/proto/size_test.go rename {_vendor/src => vendor}/github.com/golang/protobuf/proto/text.go (100%) rename {_vendor/src => vendor}/github.com/golang/protobuf/proto/text_parser.go (100%) create mode 100644 vendor/github.com/golang/protobuf/proto/text_parser_test.go create mode 100644 vendor/github.com/golang/protobuf/proto/text_test.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/any.go rename {_vendor/src => vendor}/github.com/golang/protobuf/ptypes/any/any.pb.go (100%) create mode 100644 vendor/github.com/golang/protobuf/ptypes/any/any.proto create mode 100644 vendor/github.com/golang/protobuf/ptypes/any_test.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/doc.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/duration.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/duration_test.go create mode 100755 vendor/github.com/golang/protobuf/ptypes/regen.sh create mode 100644 vendor/github.com/golang/protobuf/ptypes/timestamp.go create mode 100644 vendor/github.com/golang/protobuf/ptypes/timestamp_test.go create mode 100644 vendor/github.com/golang/snappy/AUTHORS create mode 100644 vendor/github.com/golang/snappy/CONTRIBUTORS rename {_vendor/src => vendor}/github.com/golang/snappy/LICENSE (100%) create mode 100644 vendor/github.com/golang/snappy/README rename {_vendor/src => vendor}/github.com/golang/snappy/decode.go (100%) rename {_vendor/src => vendor}/github.com/golang/snappy/encode.go (100%) rename {_vendor/src => vendor}/github.com/golang/snappy/snappy.go (100%) create mode 100644 vendor/github.com/golang/snappy/snappy_test.go create mode 100644 vendor/github.com/google/btree/.travis.yml rename {_vendor/src => vendor}/github.com/google/btree/LICENSE (100%) create mode 100644 vendor/github.com/google/btree/README.md rename {_vendor/src => vendor}/github.com/google/btree/btree.go (100%) rename {_vendor/src => vendor}/github.com/google/btree/btree_mem.go (100%) create mode 100644 vendor/github.com/google/btree/btree_test.go create mode 100644 vendor/github.com/gorilla/context/.travis.yml rename {_vendor/src => vendor}/github.com/gorilla/context/LICENSE (100%) create mode 100644 vendor/github.com/gorilla/context/README.md rename {_vendor/src => vendor}/github.com/gorilla/context/context.go (100%) create mode 100644 vendor/github.com/gorilla/context/context_test.go rename {_vendor/src => vendor}/github.com/gorilla/context/doc.go (100%) create mode 100644 vendor/github.com/gorilla/mux/.travis.yml rename {_vendor/src => vendor}/github.com/gorilla/mux/LICENSE (100%) create mode 100644 vendor/github.com/gorilla/mux/README.md create mode 100644 vendor/github.com/gorilla/mux/bench_test.go rename {_vendor/src => vendor}/github.com/gorilla/mux/context_gorilla.go (100%) create mode 100644 vendor/github.com/gorilla/mux/context_gorilla_test.go rename {_vendor/src => vendor}/github.com/gorilla/mux/context_native.go (100%) create mode 100644 vendor/github.com/gorilla/mux/context_native_test.go rename {_vendor/src => vendor}/github.com/gorilla/mux/doc.go (100%) rename {_vendor/src => vendor}/github.com/gorilla/mux/mux.go (100%) create mode 100644 vendor/github.com/gorilla/mux/mux_test.go create mode 100644 vendor/github.com/gorilla/mux/old_test.go rename {_vendor/src => vendor}/github.com/gorilla/mux/regexp.go (100%) rename {_vendor/src => vendor}/github.com/gorilla/mux/route.go (100%) create mode 100644 vendor/github.com/grpc-ecosystem/go-grpc-middleware/.gitignore create mode 100644 vendor/github.com/grpc-ecosystem/go-grpc-middleware/.travis.yml create mode 100644 vendor/github.com/grpc-ecosystem/go-grpc-middleware/DOC.md rename {_vendor/src => vendor}/github.com/grpc-ecosystem/go-grpc-middleware/LICENSE (100%) create mode 100644 vendor/github.com/grpc-ecosystem/go-grpc-middleware/README.md rename {_vendor/src => vendor}/github.com/grpc-ecosystem/go-grpc-middleware/chain.go (100%) create mode 100644 vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain_test.go create mode 100755 vendor/github.com/grpc-ecosystem/go-grpc-middleware/checkup.sh rename {_vendor/src => vendor}/github.com/grpc-ecosystem/go-grpc-middleware/doc.go (100%) create mode 100755 vendor/github.com/grpc-ecosystem/go-grpc-middleware/fixup.sh create mode 100755 vendor/github.com/grpc-ecosystem/go-grpc-middleware/test_all.sh create mode 100644 vendor/github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing/DOC.md create mode 120000 vendor/github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing/README.md rename {_vendor/src => vendor}/github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing/client_interceptors.go (100%) rename {_vendor/src => vendor}/github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing/doc.go (100%) rename {_vendor/src => vendor}/github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing/id_extract.go (100%) create mode 100644 vendor/github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing/interceptors_test.go rename {_vendor/src => vendor}/github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing/metadata.go (100%) rename {_vendor/src => vendor}/github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing/options.go (100%) rename {_vendor/src => vendor}/github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing/server_interceptors.go (100%) create mode 100644 vendor/github.com/grpc-ecosystem/go-grpc-middleware/util/metautils/DOC.md create mode 120000 vendor/github.com/grpc-ecosystem/go-grpc-middleware/util/metautils/README.md rename {_vendor/src => vendor}/github.com/grpc-ecosystem/go-grpc-middleware/util/metautils/doc.go (100%) rename {_vendor/src => vendor}/github.com/grpc-ecosystem/go-grpc-middleware/util/metautils/nicemd.go (100%) create mode 100644 vendor/github.com/grpc-ecosystem/go-grpc-middleware/util/metautils/nicemd_test.go rename {_vendor/src => vendor}/github.com/grpc-ecosystem/go-grpc-middleware/util/metautils/single_key.go (100%) rename {_vendor/src => vendor}/github.com/grpc-ecosystem/go-grpc-middleware/wrappers.go (100%) create mode 100644 vendor/github.com/grpc-ecosystem/go-grpc-middleware/wrappers_test.go create mode 100644 vendor/github.com/grpc-ecosystem/go-grpc-prometheus/.gitignore create mode 100644 vendor/github.com/grpc-ecosystem/go-grpc-prometheus/.travis.yml rename {_vendor/src => vendor}/github.com/grpc-ecosystem/go-grpc-prometheus/LICENSE (100%) create mode 100644 vendor/github.com/grpc-ecosystem/go-grpc-prometheus/README.md rename {_vendor/src => vendor}/github.com/grpc-ecosystem/go-grpc-prometheus/client.go (100%) rename {_vendor/src => vendor}/github.com/grpc-ecosystem/go-grpc-prometheus/client_reporter.go (100%) create mode 100644 vendor/github.com/grpc-ecosystem/go-grpc-prometheus/client_test.go rename {_vendor/src => vendor}/github.com/grpc-ecosystem/go-grpc-prometheus/server.go (100%) rename {_vendor/src => vendor}/github.com/grpc-ecosystem/go-grpc-prometheus/server_reporter.go (100%) create mode 100644 vendor/github.com/grpc-ecosystem/go-grpc-prometheus/server_test.go rename {_vendor/src => vendor}/github.com/grpc-ecosystem/go-grpc-prometheus/util.go (100%) create mode 100644 vendor/github.com/juju/errors/.gitignore rename {_vendor/src => vendor}/github.com/juju/errors/LICENSE (100%) create mode 100644 vendor/github.com/juju/errors/Makefile create mode 100644 vendor/github.com/juju/errors/README.md rename {_vendor/src => vendor}/github.com/juju/errors/doc.go (100%) rename {_vendor/src => vendor}/github.com/juju/errors/error.go (100%) create mode 100644 vendor/github.com/juju/errors/error_test.go rename {_vendor/src => vendor}/github.com/juju/errors/errortypes.go (100%) create mode 100644 vendor/github.com/juju/errors/errortypes_test.go create mode 100644 vendor/github.com/juju/errors/example_test.go create mode 100644 vendor/github.com/juju/errors/export_test.go rename {_vendor/src => vendor}/github.com/juju/errors/functions.go (100%) create mode 100644 vendor/github.com/juju/errors/functions_test.go create mode 100644 vendor/github.com/juju/errors/package_test.go rename {_vendor/src => vendor}/github.com/juju/errors/path.go (100%) create mode 100644 vendor/github.com/juju/errors/path_test.go create mode 100644 vendor/github.com/matttproud/golang_protobuf_extensions/.travis.yml rename {_vendor/src => vendor}/github.com/matttproud/golang_protobuf_extensions/LICENSE (100%) create mode 100644 vendor/github.com/matttproud/golang_protobuf_extensions/Makefile.TRAVIS rename {_vendor/src => vendor}/github.com/matttproud/golang_protobuf_extensions/NOTICE (100%) create mode 100644 vendor/github.com/matttproud/golang_protobuf_extensions/README.md create mode 100644 vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/.gitignore create mode 100644 vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/Makefile create mode 100644 vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/all_test.go rename {_vendor/src => vendor}/github.com/matttproud/golang_protobuf_extensions/pbutil/decode.go (100%) create mode 100644 vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/decode_test.go rename {_vendor/src => vendor}/github.com/matttproud/golang_protobuf_extensions/pbutil/doc.go (100%) rename {_vendor/src => vendor}/github.com/matttproud/golang_protobuf_extensions/pbutil/encode.go (100%) create mode 100644 vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/encode_test.go rename {_vendor/src => vendor}/github.com/ngaut/pools/id_pool.go (100%) create mode 100644 vendor/github.com/ngaut/pools/id_pool_test.go rename {_vendor/src => vendor}/github.com/ngaut/pools/numbered.go (100%) create mode 100644 vendor/github.com/ngaut/pools/numbered_test.go rename {_vendor/src => vendor}/github.com/ngaut/pools/resource_pool.go (100%) create mode 100644 vendor/github.com/ngaut/pools/resource_pool_test.go rename {_vendor/src => vendor}/github.com/ngaut/pools/roundrobin.go (100%) create mode 100644 vendor/github.com/ngaut/pools/roundrobin_test.go create mode 100644 vendor/github.com/ngaut/pools/vitess_license rename {_vendor/src => vendor}/github.com/ngaut/sync2/atomic.go (100%) create mode 100644 vendor/github.com/ngaut/sync2/atomic_test.go rename {_vendor/src => vendor}/github.com/ngaut/sync2/cond.go (100%) create mode 100644 vendor/github.com/ngaut/sync2/cond_test.go rename {_vendor/src => vendor}/github.com/ngaut/sync2/semaphore.go (100%) create mode 100644 vendor/github.com/ngaut/sync2/semaphore_test.go rename {_vendor/src => vendor}/github.com/ngaut/sync2/service_manager.go (100%) create mode 100644 vendor/github.com/ngaut/sync2/service_manager_test.go create mode 100644 vendor/github.com/ngaut/sync2/vitess_license create mode 100644 vendor/github.com/opentracing/opentracing-go/.gitignore create mode 100644 vendor/github.com/opentracing/opentracing-go/.travis.yml create mode 100644 vendor/github.com/opentracing/opentracing-go/CHANGELOG.md rename {_vendor/src => vendor}/github.com/opentracing/opentracing-go/LICENSE (100%) create mode 100644 vendor/github.com/opentracing/opentracing-go/Makefile create mode 100644 vendor/github.com/opentracing/opentracing-go/README.md rename {_vendor/src => vendor}/github.com/opentracing/opentracing-go/ext/tags.go (100%) create mode 100644 vendor/github.com/opentracing/opentracing-go/ext/tags_test.go rename {_vendor/src => vendor}/github.com/opentracing/opentracing-go/globaltracer.go (100%) rename {_vendor/src => vendor}/github.com/opentracing/opentracing-go/gocontext.go (100%) create mode 100644 vendor/github.com/opentracing/opentracing-go/gocontext_test.go rename {_vendor/src => vendor}/github.com/opentracing/opentracing-go/log/field.go (100%) create mode 100644 vendor/github.com/opentracing/opentracing-go/log/field_test.go rename {_vendor/src => vendor}/github.com/opentracing/opentracing-go/log/util.go (100%) rename {_vendor/src => vendor}/github.com/opentracing/opentracing-go/noop.go (100%) create mode 100644 vendor/github.com/opentracing/opentracing-go/options_test.go rename {_vendor/src => vendor}/github.com/opentracing/opentracing-go/propagation.go (100%) create mode 100644 vendor/github.com/opentracing/opentracing-go/propagation_test.go rename {_vendor/src => vendor}/github.com/opentracing/opentracing-go/span.go (100%) create mode 100644 vendor/github.com/opentracing/opentracing-go/testtracer_test.go rename {_vendor/src => vendor}/github.com/opentracing/opentracing-go/tracer.go (100%) create mode 100644 vendor/github.com/petar/GoLLRB/.gitignore create mode 100644 vendor/github.com/petar/GoLLRB/AUTHORS create mode 100644 vendor/github.com/petar/GoLLRB/LICENSE create mode 100644 vendor/github.com/petar/GoLLRB/README.md create mode 100644 vendor/github.com/petar/GoLLRB/llrb/avgvar.go create mode 100644 vendor/github.com/petar/GoLLRB/llrb/iterator.go create mode 100644 vendor/github.com/petar/GoLLRB/llrb/iterator_test.go create mode 100644 vendor/github.com/petar/GoLLRB/llrb/llrb-stats.go create mode 100644 vendor/github.com/petar/GoLLRB/llrb/llrb.go create mode 100644 vendor/github.com/petar/GoLLRB/llrb/llrb_test.go create mode 100644 vendor/github.com/petar/GoLLRB/llrb/util.go create mode 100644 vendor/github.com/pingcap/check/.gitignore create mode 100644 vendor/github.com/pingcap/check/README.md create mode 100644 vendor/github.com/pingcap/check/TODO rename {_vendor/src => vendor}/github.com/pingcap/check/benchmark.go (100%) create mode 100644 vendor/github.com/pingcap/check/benchmark_test.go create mode 100644 vendor/github.com/pingcap/check/bootstrap_test.go rename {_vendor/src => vendor}/github.com/pingcap/check/check.go (100%) create mode 100644 vendor/github.com/pingcap/check/check.v1_license create mode 100644 vendor/github.com/pingcap/check/check_test.go rename {_vendor/src => vendor}/github.com/pingcap/check/checkers.go (99%) rename {_vendor/src => vendor}/github.com/pingcap/check/checkers2.go (100%) create mode 100644 vendor/github.com/pingcap/check/checkers2_test.go create mode 100644 vendor/github.com/pingcap/check/checkers_test.go rename {_vendor/src => vendor}/github.com/pingcap/check/compare.go (100%) create mode 100644 vendor/github.com/pingcap/check/export_test.go create mode 100644 vendor/github.com/pingcap/check/fixture_test.go create mode 100644 vendor/github.com/pingcap/check/foundation_test.go create mode 100644 vendor/github.com/pingcap/check/godropbox_license rename {_vendor/src => vendor}/github.com/pingcap/check/helpers.go (100%) create mode 100644 vendor/github.com/pingcap/check/helpers_test.go rename {_vendor/src => vendor}/github.com/pingcap/check/printer.go (100%) create mode 100644 vendor/github.com/pingcap/check/printer_test.go rename {_vendor/src => vendor}/github.com/pingcap/check/run.go (100%) create mode 100644 vendor/github.com/pingcap/check/run_test.go create mode 100644 vendor/github.com/pingcap/goleveldb/.travis.yml rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/LICENSE (100%) create mode 100644 vendor/github.com/pingcap/goleveldb/README.md rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/batch.go (100%) create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/batch_test.go create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/bench_test.go create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/cache/bench_test.go rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/cache/cache.go (100%) create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/cache/cache_test.go rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/cache/lru.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/comparer.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/comparer/bytes_comparer.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/comparer/comparer.go (100%) create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/corrupt_test.go rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/db.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/db_compaction.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/db_iter.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/db_snapshot.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/db_state.go (100%) create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/db_test.go rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/db_transaction.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/db_util.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/db_write.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/doc.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/errors.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/errors/errors.go (100%) create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/external_test.go rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/filter.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/filter/bloom.go (100%) create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/filter/bloom_test.go rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/filter/filter.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/iterator/array_iter.go (100%) create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/iterator/array_iter_test.go rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/iterator/indexed_iter.go (100%) create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/iterator/indexed_iter_test.go rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/iterator/iter.go (100%) create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/iterator/iter_suite_test.go rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/iterator/merged_iter.go (100%) create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/iterator/merged_iter_test.go rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/journal/journal.go (100%) create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/journal/journal_test.go rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/key.go (100%) create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/key_test.go create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/leveldb_suite_test.go create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/memdb/bench_test.go rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/memdb/memdb.go (100%) create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/memdb/memdb_suite_test.go create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/memdb/memdb_test.go rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/opt/options.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/options.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/session.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/session_compaction.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/session_record.go (100%) create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/session_record_test.go rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/session_util.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/storage/file_storage.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/storage/file_storage_nacl.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/storage/file_storage_plan9.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/storage/file_storage_solaris.go (100%) create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/storage/file_storage_test.go rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/storage/file_storage_unix.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/storage/file_storage_windows.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/storage/mem_storage.go (100%) create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/storage/mem_storage_test.go rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/storage/storage.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/table.go (100%) create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/table/block_test.go rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/table/reader.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/table/table.go (100%) create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/table/table_suite_test.go create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/table/table_test.go rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/table/writer.go (100%) create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/testutil_test.go rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/util.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/util/buffer.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/util/buffer_pool.go (100%) create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/util/buffer_test.go rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/util/crc32.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/util/hash.go (100%) create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/util/hash_test.go rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/util/range.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/util/util.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/goleveldb/leveldb/version.go (100%) create mode 100644 vendor/github.com/pingcap/goleveldb/leveldb/version_test.go create mode 100644 vendor/github.com/pingcap/kvproto/.gitignore create mode 100644 vendor/github.com/pingcap/kvproto/Cargo.toml create mode 100644 vendor/github.com/pingcap/kvproto/Makefile create mode 100644 vendor/github.com/pingcap/kvproto/README.md create mode 100644 vendor/github.com/pingcap/kvproto/circle.yml create mode 100755 vendor/github.com/pingcap/kvproto/common.sh create mode 100755 vendor/github.com/pingcap/kvproto/generate_go.sh create mode 100755 vendor/github.com/pingcap/kvproto/generate_rust.sh create mode 100644 vendor/github.com/pingcap/kvproto/glide.lock create mode 100644 vendor/github.com/pingcap/kvproto/glide.yaml rename {_vendor/src => vendor}/github.com/pingcap/kvproto/pkg/coprocessor/coprocessor.pb.go (97%) rename {_vendor/src => vendor}/github.com/pingcap/kvproto/pkg/eraftpb/eraftpb.pb.go (98%) rename {_vendor/src => vendor}/github.com/pingcap/kvproto/pkg/errorpb/errorpb.pb.go (98%) rename {_vendor/src => vendor}/github.com/pingcap/kvproto/pkg/kvrpcpb/kvrpcpb.pb.go (99%) rename {_vendor/src => vendor}/github.com/pingcap/kvproto/pkg/metapb/metapb.pb.go (98%) rename {_vendor/src => vendor}/github.com/pingcap/kvproto/pkg/pdpb/pdpb.pb.go (99%) rename {_vendor/src => vendor}/github.com/pingcap/kvproto/pkg/raft_serverpb/raft_serverpb.pb.go (99%) rename {_vendor/src => vendor}/github.com/pingcap/kvproto/pkg/tikvpb/tikvpb.pb.go (99%) create mode 100644 vendor/github.com/pingcap/pd/.gitignore create mode 100644 vendor/github.com/pingcap/pd/.travis.yml create mode 100644 vendor/github.com/pingcap/pd/Dockerfile create mode 100644 vendor/github.com/pingcap/pd/Jenkinsfile rename {_vendor/src => vendor}/github.com/pingcap/pd/LICENSE (100%) create mode 100644 vendor/github.com/pingcap/pd/Makefile create mode 100644 vendor/github.com/pingcap/pd/README.md create mode 100644 vendor/github.com/pingcap/pd/circle.yml create mode 100644 vendor/github.com/pingcap/pd/glide.lock create mode 100644 vendor/github.com/pingcap/pd/glide.yaml rename {_vendor/src => vendor}/github.com/pingcap/pd/pd-client/client.go (100%) create mode 100644 vendor/github.com/pingcap/pd/pd-client/client_test.go create mode 100644 vendor/github.com/pingcap/pd/pd-client/leader_change_test.go rename {_vendor/src => vendor}/github.com/pingcap/pd/pd-client/metrics.go (100%) create mode 100644 vendor/github.com/pingcap/tipb/.gitignore create mode 100644 vendor/github.com/pingcap/tipb/Cargo.toml rename {_vendor/src => vendor}/github.com/pingcap/tipb/LICENSE (100%) create mode 100644 vendor/github.com/pingcap/tipb/Makefile create mode 100644 vendor/github.com/pingcap/tipb/README.md create mode 100755 vendor/github.com/pingcap/tipb/generate-binlog.sh create mode 100755 vendor/github.com/pingcap/tipb/generate-go.sh create mode 100755 vendor/github.com/pingcap/tipb/generate-mysqlx.sh create mode 100755 vendor/github.com/pingcap/tipb/generate-rust.sh rename {_vendor/src => vendor}/github.com/pingcap/tipb/go-binlog/binlog.pb.go (98%) rename {_vendor/src => vendor}/github.com/pingcap/tipb/go-binlog/cistern.pb.go (98%) rename {_vendor/src => vendor}/github.com/pingcap/tipb/go-binlog/pump.pb.go (98%) rename {_vendor/src => vendor}/github.com/pingcap/tipb/go-tipb/analyze.pb.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/tipb/go-tipb/executor.pb.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/tipb/go-tipb/expression.pb.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/tipb/go-tipb/schema.pb.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/tipb/go-tipb/select.pb.go (100%) rename {_vendor/src => vendor}/github.com/pingcap/tipb/sharedbytes/sharedbytes.go (100%) create mode 100644 vendor/github.com/pingcap/tipb/sharedbytes/sharedbytes_test.go create mode 100644 vendor/github.com/prometheus/client_golang/.gitignore create mode 100644 vendor/github.com/prometheus/client_golang/.travis.yml create mode 100644 vendor/github.com/prometheus/client_golang/AUTHORS.md create mode 100644 vendor/github.com/prometheus/client_golang/CHANGELOG.md create mode 100644 vendor/github.com/prometheus/client_golang/CONTRIBUTING.md rename {_vendor/src => vendor}/github.com/prometheus/client_golang/LICENSE (100%) rename {_vendor/src => vendor}/github.com/prometheus/client_golang/NOTICE (100%) create mode 100644 vendor/github.com/prometheus/client_golang/README.md create mode 100644 vendor/github.com/prometheus/client_golang/VERSION create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/.gitignore create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/README.md create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/benchmark_test.go rename {_vendor/src => vendor}/github.com/prometheus/client_golang/prometheus/collector.go (100%) rename {_vendor/src => vendor}/github.com/prometheus/client_golang/prometheus/counter.go (100%) create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/counter_test.go rename {_vendor/src => vendor}/github.com/prometheus/client_golang/prometheus/desc.go (100%) rename {_vendor/src => vendor}/github.com/prometheus/client_golang/prometheus/doc.go (100%) create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/example_clustermanager_test.go create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/examples_test.go rename {_vendor/src => vendor}/github.com/prometheus/client_golang/prometheus/expvar_collector.go (100%) create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/expvar_collector_test.go rename {_vendor/src => vendor}/github.com/prometheus/client_golang/prometheus/fnv.go (100%) rename {_vendor/src => vendor}/github.com/prometheus/client_golang/prometheus/gauge.go (100%) create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/gauge_test.go rename {_vendor/src => vendor}/github.com/prometheus/client_golang/prometheus/go_collector.go (100%) create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/go_collector_test.go rename {_vendor/src => vendor}/github.com/prometheus/client_golang/prometheus/histogram.go (100%) create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/histogram_test.go rename {_vendor/src => vendor}/github.com/prometheus/client_golang/prometheus/http.go (100%) create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/http_test.go rename {_vendor/src => vendor}/github.com/prometheus/client_golang/prometheus/metric.go (100%) create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/metric_test.go rename {_vendor/src => vendor}/github.com/prometheus/client_golang/prometheus/process_collector.go (100%) create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/process_collector_test.go create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/push/examples_test.go rename {_vendor/src => vendor}/github.com/prometheus/client_golang/prometheus/push/push.go (100%) create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/push/push_test.go rename {_vendor/src => vendor}/github.com/prometheus/client_golang/prometheus/registry.go (100%) create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/registry_test.go rename {_vendor/src => vendor}/github.com/prometheus/client_golang/prometheus/summary.go (100%) create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/summary_test.go rename {_vendor/src => vendor}/github.com/prometheus/client_golang/prometheus/untyped.go (100%) rename {_vendor/src => vendor}/github.com/prometheus/client_golang/prometheus/value.go (100%) rename {_vendor/src => vendor}/github.com/prometheus/client_golang/prometheus/vec.go (100%) create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/vec_test.go create mode 100644 vendor/github.com/prometheus/client_model/.gitignore create mode 100644 vendor/github.com/prometheus/client_model/AUTHORS.md create mode 100644 vendor/github.com/prometheus/client_model/CONTRIBUTING.md rename {_vendor/src => vendor}/github.com/prometheus/client_model/LICENSE (100%) create mode 100644 vendor/github.com/prometheus/client_model/Makefile rename {_vendor/src => vendor}/github.com/prometheus/client_model/NOTICE (100%) create mode 100644 vendor/github.com/prometheus/client_model/README.md rename {_vendor/src => vendor}/github.com/prometheus/client_model/go/metrics.pb.go (100%) create mode 100644 vendor/github.com/prometheus/client_model/metrics.proto create mode 100644 vendor/github.com/prometheus/client_model/pom.xml create mode 100644 vendor/github.com/prometheus/client_model/setup.py create mode 100644 vendor/github.com/prometheus/common/.travis.yml create mode 100644 vendor/github.com/prometheus/common/AUTHORS.md create mode 100644 vendor/github.com/prometheus/common/CONTRIBUTING.md rename {_vendor/src => vendor}/github.com/prometheus/common/LICENSE (100%) rename {_vendor/src => vendor}/github.com/prometheus/common/NOTICE (100%) create mode 100644 vendor/github.com/prometheus/common/README.md create mode 100644 vendor/github.com/prometheus/common/expfmt/bench_test.go rename {_vendor/src => vendor}/github.com/prometheus/common/expfmt/decode.go (100%) create mode 100644 vendor/github.com/prometheus/common/expfmt/decode_test.go rename {_vendor/src => vendor}/github.com/prometheus/common/expfmt/encode.go (100%) rename {_vendor/src => vendor}/github.com/prometheus/common/expfmt/expfmt.go (100%) rename {_vendor/src => vendor}/github.com/prometheus/common/expfmt/fuzz.go (100%) rename {_vendor/src => vendor}/github.com/prometheus/common/expfmt/text_create.go (100%) create mode 100644 vendor/github.com/prometheus/common/expfmt/text_create_test.go rename {_vendor/src => vendor}/github.com/prometheus/common/expfmt/text_parse.go (100%) create mode 100644 vendor/github.com/prometheus/common/expfmt/text_parse_test.go create mode 100644 vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/README.txt rename {_vendor/src => vendor}/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/autoneg.go (100%) create mode 100644 vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/autoneg_test.go rename {_vendor/src => vendor}/github.com/prometheus/common/model/alert.go (100%) create mode 100644 vendor/github.com/prometheus/common/model/alert_test.go rename {_vendor/src => vendor}/github.com/prometheus/common/model/fingerprinting.go (100%) rename {_vendor/src => vendor}/github.com/prometheus/common/model/fnv.go (100%) rename {_vendor/src => vendor}/github.com/prometheus/common/model/labels.go (100%) create mode 100644 vendor/github.com/prometheus/common/model/labels_test.go rename {_vendor/src => vendor}/github.com/prometheus/common/model/labelset.go (100%) rename {_vendor/src => vendor}/github.com/prometheus/common/model/metric.go (100%) create mode 100644 vendor/github.com/prometheus/common/model/metric_test.go rename {_vendor/src => vendor}/github.com/prometheus/common/model/model.go (100%) rename {_vendor/src => vendor}/github.com/prometheus/common/model/signature.go (100%) create mode 100644 vendor/github.com/prometheus/common/model/signature_test.go rename {_vendor/src => vendor}/github.com/prometheus/common/model/silence.go (100%) create mode 100644 vendor/github.com/prometheus/common/model/silence_test.go rename {_vendor/src => vendor}/github.com/prometheus/common/model/time.go (100%) create mode 100644 vendor/github.com/prometheus/common/model/time_test.go rename {_vendor/src => vendor}/github.com/prometheus/common/model/value.go (100%) create mode 100644 vendor/github.com/prometheus/common/model/value_test.go create mode 100644 vendor/github.com/prometheus/procfs/.travis.yml create mode 100644 vendor/github.com/prometheus/procfs/AUTHORS.md create mode 100644 vendor/github.com/prometheus/procfs/CONTRIBUTING.md rename {_vendor/src => vendor}/github.com/prometheus/procfs/LICENSE (100%) create mode 100644 vendor/github.com/prometheus/procfs/Makefile rename {_vendor/src => vendor}/github.com/prometheus/procfs/NOTICE (100%) create mode 100644 vendor/github.com/prometheus/procfs/README.md rename {_vendor/src => vendor}/github.com/prometheus/procfs/doc.go (100%) rename {_vendor/src => vendor}/github.com/prometheus/procfs/fs.go (100%) create mode 100644 vendor/github.com/prometheus/procfs/fs_test.go rename {_vendor/src => vendor}/github.com/prometheus/procfs/ipvs.go (100%) create mode 100644 vendor/github.com/prometheus/procfs/ipvs_test.go rename {_vendor/src => vendor}/github.com/prometheus/procfs/mdstat.go (100%) create mode 100644 vendor/github.com/prometheus/procfs/mdstat_test.go rename {_vendor/src => vendor}/github.com/prometheus/procfs/proc.go (100%) rename {_vendor/src => vendor}/github.com/prometheus/procfs/proc_io.go (100%) create mode 100644 vendor/github.com/prometheus/procfs/proc_io_test.go rename {_vendor/src => vendor}/github.com/prometheus/procfs/proc_limits.go (100%) create mode 100644 vendor/github.com/prometheus/procfs/proc_limits_test.go rename {_vendor/src => vendor}/github.com/prometheus/procfs/proc_stat.go (100%) create mode 100644 vendor/github.com/prometheus/procfs/proc_stat_test.go create mode 100644 vendor/github.com/prometheus/procfs/proc_test.go rename {_vendor/src => vendor}/github.com/prometheus/procfs/stat.go (100%) create mode 100644 vendor/github.com/prometheus/procfs/stat_test.go create mode 100644 vendor/github.com/spaolacci/murmur3/.gitignore rename {_vendor/src => vendor}/github.com/spaolacci/murmur3/LICENSE (100%) create mode 100644 vendor/github.com/spaolacci/murmur3/README.md rename {_vendor/src => vendor}/github.com/spaolacci/murmur3/murmur.go (100%) rename {_vendor/src => vendor}/github.com/spaolacci/murmur3/murmur128.go (100%) rename {_vendor/src => vendor}/github.com/spaolacci/murmur3/murmur32.go (100%) rename {_vendor/src => vendor}/github.com/spaolacci/murmur3/murmur64.go (100%) create mode 100644 vendor/github.com/spaolacci/murmur3/murmur_test.go create mode 100644 vendor/github.com/twinj/uuid/.gitignore create mode 100644 vendor/github.com/twinj/uuid/.travis.yml rename {_vendor/src => vendor}/github.com/twinj/uuid/LICENSE (100%) create mode 100644 vendor/github.com/twinj/uuid/README.md rename {_vendor/src => vendor}/github.com/twinj/uuid/array.go (100%) create mode 100644 vendor/github.com/twinj/uuid/array_test.go rename {_vendor/src => vendor}/github.com/twinj/uuid/rfc4122.go (100%) create mode 100644 vendor/github.com/twinj/uuid/rfc4122_test.go rename {_vendor/src => vendor}/github.com/twinj/uuid/saver.go (100%) create mode 100644 vendor/github.com/twinj/uuid/saver_test.go rename {_vendor/src => vendor}/github.com/twinj/uuid/state.go (100%) create mode 100644 vendor/github.com/twinj/uuid/state_test.go rename {_vendor/src => vendor}/github.com/twinj/uuid/struct.go (100%) create mode 100644 vendor/github.com/twinj/uuid/struct_test.go rename {_vendor/src => vendor}/github.com/twinj/uuid/timestamp.go (100%) create mode 100644 vendor/github.com/twinj/uuid/timestamp_test.go create mode 100644 vendor/github.com/twinj/uuid/uuid_test.go rename {_vendor/src => vendor}/github.com/twinj/uuid/uuids.go (100%) create mode 100644 vendor/github.com/twinj/uuid/uuids_test.go create mode 100644 vendor/github.com/uber/jaeger-client-go/.gitignore create mode 100644 vendor/github.com/uber/jaeger-client-go/.gitmodules create mode 100644 vendor/github.com/uber/jaeger-client-go/.travis.yml create mode 100644 vendor/github.com/uber/jaeger-client-go/CHANGELOG.md create mode 100644 vendor/github.com/uber/jaeger-client-go/CONTRIBUTING.md rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/LICENSE (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/Makefile create mode 100644 vendor/github.com/uber/jaeger-client-go/README.md rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/config/config.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/config/config_test.go create mode 100644 vendor/github.com/uber/jaeger-client-go/config/example_test.go rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/config/options.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/config/options_test.go rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/constants.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/constants_test.go rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/context.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/context_test.go rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/doc.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/glide.lock create mode 100644 vendor/github.com/uber/jaeger-client-go/glide.yaml rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/internal/spanlog/json.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/interop.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/jaeger_tag.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/jaeger_thrift_span.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/jaeger_thrift_span_test.go rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/log/logger.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/log/logger_test.go rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/logger.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/logger_test.go rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/metrics.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/metrics_test.go rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/observer.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/observer_test.go rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/propagation.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/propagation_test.go rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/reference.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/reporter.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/reporter_options.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/reporter_test.go create mode 100644 vendor/github.com/uber/jaeger-client-go/rpcmetrics/README.md rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/rpcmetrics/doc.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/rpcmetrics/endpoints.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/rpcmetrics/endpoints_test.go rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/rpcmetrics/metrics.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/rpcmetrics/metrics_test.go rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/rpcmetrics/normalizer.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/rpcmetrics/normalizer_test.go rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/rpcmetrics/observer.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/rpcmetrics/observer_test.go rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/sampler.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/sampler_options.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/sampler_test.go rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/span.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/span_test.go rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/thrift-gen/agent/agent.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/thrift-gen/agent/constants.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/thrift-gen/agent/ttypes.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/thrift-gen/jaeger/agent.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/thrift-gen/jaeger/constants.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/thrift-gen/jaeger/ttypes.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/thrift-gen/sampling/constants.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/thrift-gen/sampling/samplingmanager.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/thrift-gen/sampling/ttypes.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/thrift-gen/zipkincore/constants.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/thrift-gen/zipkincore/ttypes.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/thrift-gen/zipkincore/zipkincollector.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/thrift/.nocover rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/tracer.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/tracer_options.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/tracer_test.go rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/transport.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/transport_udp.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/transport_udp_test.go rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/utils/http_json.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/utils/http_json_test.go rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/utils/localip.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/utils/rand.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/utils/rate_limiter.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/utils/rate_limiter_test.go rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/utils/udp_client.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/utils/utils.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/utils/utils_test.go rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/zipkin.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/zipkin_test.go rename {_vendor/src => vendor}/github.com/uber/jaeger-client-go/zipkin_thrift_span.go (100%) create mode 100644 vendor/github.com/uber/jaeger-client-go/zipkin_thrift_span_test.go create mode 100644 vendor/github.com/uber/jaeger-lib/.gitignore create mode 100644 vendor/github.com/uber/jaeger-lib/.travis.yml create mode 100644 vendor/github.com/uber/jaeger-lib/CONTRIBUTING.md rename {_vendor/src => vendor}/github.com/uber/jaeger-lib/LICENSE (100%) create mode 100644 vendor/github.com/uber/jaeger-lib/Makefile create mode 100644 vendor/github.com/uber/jaeger-lib/README.md create mode 100644 vendor/github.com/uber/jaeger-lib/glide.lock create mode 100644 vendor/github.com/uber/jaeger-lib/glide.yaml rename {_vendor/src => vendor}/github.com/uber/jaeger-lib/metrics/counter.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-lib/metrics/factory.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-lib/metrics/gauge.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-lib/metrics/local.go (100%) create mode 100644 vendor/github.com/uber/jaeger-lib/metrics/local_test.go rename {_vendor/src => vendor}/github.com/uber/jaeger-lib/metrics/metrics.go (100%) create mode 100644 vendor/github.com/uber/jaeger-lib/metrics/metrics_test.go rename {_vendor/src => vendor}/github.com/uber/jaeger-lib/metrics/stopwatch.go (100%) rename {_vendor/src => vendor}/github.com/uber/jaeger-lib/metrics/timer.go (100%) create mode 100644 vendor/golang.org/x/net/.gitattributes create mode 100644 vendor/golang.org/x/net/.gitignore create mode 100644 vendor/golang.org/x/net/AUTHORS create mode 100644 vendor/golang.org/x/net/CONTRIBUTING.md create mode 100644 vendor/golang.org/x/net/CONTRIBUTORS rename {_vendor/src => vendor}/golang.org/x/net/LICENSE (100%) rename {_vendor/src => vendor}/golang.org/x/net/PATENTS (100%) create mode 100644 vendor/golang.org/x/net/README create mode 100644 vendor/golang.org/x/net/codereview.cfg rename {_vendor/src => vendor}/golang.org/x/net/context/context.go (100%) create mode 100644 vendor/golang.org/x/net/context/context_test.go rename {_vendor/src => vendor}/golang.org/x/net/context/go17.go (100%) rename {_vendor/src => vendor}/golang.org/x/net/context/pre_go17.go (100%) create mode 100644 vendor/golang.org/x/net/context/withtimeout_test.go create mode 100644 vendor/golang.org/x/net/http2/.gitignore create mode 100644 vendor/golang.org/x/net/http2/Dockerfile create mode 100644 vendor/golang.org/x/net/http2/Makefile create mode 100644 vendor/golang.org/x/net/http2/README rename {_vendor/src => vendor}/golang.org/x/net/http2/client_conn_pool.go (100%) rename {_vendor/src => vendor}/golang.org/x/net/http2/configure_transport.go (100%) rename {_vendor/src => vendor}/golang.org/x/net/http2/databuffer.go (100%) create mode 100644 vendor/golang.org/x/net/http2/databuffer_test.go rename {_vendor/src => vendor}/golang.org/x/net/http2/errors.go (100%) create mode 100644 vendor/golang.org/x/net/http2/errors_test.go rename {_vendor/src => vendor}/golang.org/x/net/http2/flow.go (100%) create mode 100644 vendor/golang.org/x/net/http2/flow_test.go rename {_vendor/src => vendor}/golang.org/x/net/http2/frame.go (100%) create mode 100644 vendor/golang.org/x/net/http2/frame_test.go rename {_vendor/src => vendor}/golang.org/x/net/http2/go16.go (100%) rename {_vendor/src => vendor}/golang.org/x/net/http2/go17.go (100%) rename {_vendor/src => vendor}/golang.org/x/net/http2/go17_not18.go (100%) rename {_vendor/src => vendor}/golang.org/x/net/http2/go18.go (100%) create mode 100644 vendor/golang.org/x/net/http2/go18_test.go rename {_vendor/src => vendor}/golang.org/x/net/http2/gotrack.go (100%) create mode 100644 vendor/golang.org/x/net/http2/gotrack_test.go rename {_vendor/src => vendor}/golang.org/x/net/http2/headermap.go (100%) rename {_vendor/src => vendor}/golang.org/x/net/http2/hpack/encode.go (100%) create mode 100644 vendor/golang.org/x/net/http2/hpack/encode_test.go rename {_vendor/src => vendor}/golang.org/x/net/http2/hpack/hpack.go (100%) create mode 100644 vendor/golang.org/x/net/http2/hpack/hpack_test.go rename {_vendor/src => vendor}/golang.org/x/net/http2/hpack/huffman.go (100%) rename {_vendor/src => vendor}/golang.org/x/net/http2/hpack/tables.go (100%) create mode 100644 vendor/golang.org/x/net/http2/hpack/tables_test.go rename {_vendor/src => vendor}/golang.org/x/net/http2/http2.go (100%) create mode 100644 vendor/golang.org/x/net/http2/http2_test.go rename {_vendor/src => vendor}/golang.org/x/net/http2/not_go16.go (100%) rename {_vendor/src => vendor}/golang.org/x/net/http2/not_go17.go (100%) rename {_vendor/src => vendor}/golang.org/x/net/http2/not_go18.go (100%) rename {_vendor/src => vendor}/golang.org/x/net/http2/pipe.go (100%) create mode 100644 vendor/golang.org/x/net/http2/pipe_test.go rename {_vendor/src => vendor}/golang.org/x/net/http2/server.go (100%) create mode 100644 vendor/golang.org/x/net/http2/server_push_test.go create mode 100644 vendor/golang.org/x/net/http2/server_test.go rename {_vendor/src => vendor}/golang.org/x/net/http2/transport.go (100%) create mode 100644 vendor/golang.org/x/net/http2/transport_test.go rename {_vendor/src => vendor}/golang.org/x/net/http2/write.go (100%) rename {_vendor/src => vendor}/golang.org/x/net/http2/writesched.go (100%) rename {_vendor/src => vendor}/golang.org/x/net/http2/writesched_priority.go (100%) create mode 100644 vendor/golang.org/x/net/http2/writesched_priority_test.go rename {_vendor/src => vendor}/golang.org/x/net/http2/writesched_random.go (100%) create mode 100644 vendor/golang.org/x/net/http2/writesched_random_test.go create mode 100644 vendor/golang.org/x/net/http2/writesched_test.go create mode 100644 vendor/golang.org/x/net/http2/z_spec_test.go create mode 100644 vendor/golang.org/x/net/idna/example_test.go rename {_vendor/src => vendor}/golang.org/x/net/idna/idna.go (100%) create mode 100644 vendor/golang.org/x/net/idna/idna_test.go rename {_vendor/src => vendor}/golang.org/x/net/idna/punycode.go (100%) create mode 100644 vendor/golang.org/x/net/idna/punycode_test.go rename {_vendor/src => vendor}/golang.org/x/net/idna/tables.go (100%) rename {_vendor/src => vendor}/golang.org/x/net/idna/trie.go (100%) rename {_vendor/src => vendor}/golang.org/x/net/idna/trieval.go (100%) rename {_vendor/src => vendor}/golang.org/x/net/internal/timeseries/timeseries.go (100%) create mode 100644 vendor/golang.org/x/net/internal/timeseries/timeseries_test.go rename {_vendor/src => vendor}/golang.org/x/net/lex/httplex/httplex.go (100%) create mode 100644 vendor/golang.org/x/net/lex/httplex/httplex_test.go rename {_vendor/src => vendor}/golang.org/x/net/trace/events.go (100%) rename {_vendor/src => vendor}/golang.org/x/net/trace/histogram.go (100%) create mode 100644 vendor/golang.org/x/net/trace/histogram_test.go rename {_vendor/src => vendor}/golang.org/x/net/trace/trace.go (100%) create mode 100644 vendor/golang.org/x/net/trace/trace_test.go create mode 100644 vendor/golang.org/x/sys/.gitattributes create mode 100644 vendor/golang.org/x/sys/.gitignore create mode 100644 vendor/golang.org/x/sys/AUTHORS create mode 100644 vendor/golang.org/x/sys/CONTRIBUTING.md create mode 100644 vendor/golang.org/x/sys/CONTRIBUTORS rename {_vendor/src => vendor}/golang.org/x/sys/LICENSE (100%) rename {_vendor/src => vendor}/golang.org/x/sys/PATENTS (100%) create mode 100644 vendor/golang.org/x/sys/README create mode 100644 vendor/golang.org/x/sys/codereview.cfg create mode 100644 vendor/golang.org/x/sys/unix/.gitignore rename {_vendor/src => vendor}/golang.org/x/sys/unix/asm.s (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/asm_darwin_386.s (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/asm_darwin_amd64.s (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/asm_darwin_arm.s (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/asm_darwin_arm64.s (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/asm_dragonfly_amd64.s (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/asm_freebsd_386.s (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/asm_freebsd_amd64.s (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/asm_freebsd_arm.s (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/asm_linux_386.s (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/asm_linux_amd64.s (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/asm_linux_arm.s (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/asm_linux_arm64.s (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/asm_linux_mips64x.s (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/asm_linux_ppc64x.s (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/asm_linux_s390x.s (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/asm_netbsd_386.s (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/asm_netbsd_amd64.s (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/asm_netbsd_arm.s (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/asm_openbsd_386.s (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/asm_openbsd_amd64.s (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/asm_solaris_amd64.s (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/bluetooth_linux.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/constants.go (100%) create mode 100644 vendor/golang.org/x/sys/unix/creds_test.go rename {_vendor/src => vendor}/golang.org/x/sys/unix/env_unix.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/env_unset.go (100%) create mode 100644 vendor/golang.org/x/sys/unix/export_test.go rename {_vendor/src => vendor}/golang.org/x/sys/unix/flock.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/flock_linux_32bit.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/gccgo.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/gccgo_c.c (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/gccgo_linux_amd64.go (100%) create mode 100755 vendor/golang.org/x/sys/unix/mkall.sh create mode 100755 vendor/golang.org/x/sys/unix/mkerrors.sh rename {_vendor/src => vendor}/golang.org/x/sys/unix/mkpost.go (100%) create mode 100755 vendor/golang.org/x/sys/unix/mksyscall.pl create mode 100755 vendor/golang.org/x/sys/unix/mksyscall_solaris.pl create mode 100755 vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl create mode 100755 vendor/golang.org/x/sys/unix/mksysnum_darwin.pl create mode 100755 vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl create mode 100755 vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl create mode 100755 vendor/golang.org/x/sys/unix/mksysnum_linux.pl create mode 100755 vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl create mode 100755 vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl create mode 100644 vendor/golang.org/x/sys/unix/mmap_unix_test.go rename {_vendor/src => vendor}/golang.org/x/sys/unix/race.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/race0.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/sockcmsg_linux.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/sockcmsg_unix.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/str.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_bsd.go (100%) create mode 100644 vendor/golang.org/x/sys/unix/syscall_bsd_test.go rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_darwin.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_darwin_386.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_darwin_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_darwin_arm.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_darwin_arm64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_dragonfly.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_dragonfly_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_freebsd.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_freebsd_386.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_freebsd_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_freebsd_arm.go (100%) create mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_test.go rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_linux.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_linux_386.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_linux_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_linux_arm.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_linux_arm64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_linux_mips64x.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_linux_ppc64x.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_linux_s390x.go (100%) create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_test.go rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_netbsd.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_netbsd_386.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_netbsd_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_netbsd_arm.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_no_getwd.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_openbsd.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_openbsd_386.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_openbsd_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_solaris.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_solaris_amd64.go (100%) create mode 100644 vendor/golang.org/x/sys/unix/syscall_test.go rename {_vendor/src => vendor}/golang.org/x/sys/unix/syscall_unix.go (100%) create mode 100644 vendor/golang.org/x/sys/unix/syscall_unix_test.go rename {_vendor/src => vendor}/golang.org/x/sys/unix/types_darwin.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/types_dragonfly.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/types_freebsd.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/types_linux.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/types_netbsd.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/types_openbsd.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/types_solaris.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zerrors_darwin_386.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zerrors_darwin_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zerrors_darwin_arm.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zerrors_darwin_arm64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zerrors_freebsd_386.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zerrors_freebsd_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zerrors_freebsd_arm.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zerrors_linux_386.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zerrors_linux_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zerrors_linux_arm.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zerrors_linux_arm64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zerrors_linux_mips64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zerrors_linux_mips64le.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zerrors_linux_ppc64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zerrors_linux_ppc64le.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zerrors_linux_s390x.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zerrors_netbsd_386.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zerrors_netbsd_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zerrors_netbsd_arm.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zerrors_openbsd_386.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zerrors_openbsd_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zerrors_solaris_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsyscall_darwin_386.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsyscall_darwin_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsyscall_darwin_arm.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsyscall_darwin_arm64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsyscall_freebsd_386.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsyscall_freebsd_arm.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsyscall_linux_386.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsyscall_linux_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsyscall_linux_arm.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsyscall_linux_arm64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsyscall_linux_mips64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsyscall_linux_mips64le.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsyscall_linux_ppc64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsyscall_linux_s390x.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsyscall_netbsd_386.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsyscall_netbsd_arm.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsyscall_openbsd_386.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsyscall_solaris_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsysctl_openbsd.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsysnum_darwin_386.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsysnum_darwin_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsysnum_darwin_arm.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsysnum_darwin_arm64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsysnum_freebsd_386.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsysnum_freebsd_arm.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsysnum_linux_386.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsysnum_linux_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsysnum_linux_arm.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsysnum_linux_arm64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsysnum_linux_mips64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsysnum_linux_mips64le.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsysnum_linux_ppc64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsysnum_linux_s390x.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsysnum_netbsd_386.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsysnum_netbsd_arm.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsysnum_openbsd_386.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/zsysnum_solaris_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/ztypes_darwin_386.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/ztypes_darwin_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/ztypes_darwin_arm.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/ztypes_darwin_arm64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/ztypes_freebsd_386.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/ztypes_freebsd_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/ztypes_freebsd_arm.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/ztypes_linux_386.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/ztypes_linux_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/ztypes_linux_arm.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/ztypes_linux_arm64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/ztypes_linux_mips64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/ztypes_linux_mips64le.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/ztypes_linux_ppc64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/ztypes_linux_ppc64le.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/ztypes_linux_s390x.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/ztypes_netbsd_386.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/ztypes_netbsd_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/ztypes_netbsd_arm.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/ztypes_openbsd_386.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/ztypes_openbsd_amd64.go (100%) rename {_vendor/src => vendor}/golang.org/x/sys/unix/ztypes_solaris_amd64.go (100%) create mode 100644 vendor/golang.org/x/text/.gitattributes create mode 100644 vendor/golang.org/x/text/.gitignore create mode 100644 vendor/golang.org/x/text/AUTHORS create mode 100644 vendor/golang.org/x/text/CONTRIBUTING.md create mode 100644 vendor/golang.org/x/text/CONTRIBUTORS rename {_vendor/src => vendor}/golang.org/x/text/LICENSE (100%) rename {_vendor/src => vendor}/golang.org/x/text/PATENTS (100%) create mode 100644 vendor/golang.org/x/text/README create mode 100644 vendor/golang.org/x/text/codereview.cfg create mode 100644 vendor/golang.org/x/text/doc.go rename {_vendor/src => vendor}/golang.org/x/text/encoding/charmap/charmap.go (100%) create mode 100644 vendor/golang.org/x/text/encoding/charmap/charmap_test.go rename {_vendor/src => vendor}/golang.org/x/text/encoding/charmap/maketables.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/encoding/charmap/tables.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/encoding/encoding.go (100%) create mode 100644 vendor/golang.org/x/text/encoding/encoding_test.go create mode 100644 vendor/golang.org/x/text/encoding/example_test.go rename {_vendor/src => vendor}/golang.org/x/text/encoding/internal/identifier/gen.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/encoding/internal/identifier/identifier.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/encoding/internal/identifier/mib.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/encoding/internal/internal.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/encoding/japanese/all.go (100%) create mode 100644 vendor/golang.org/x/text/encoding/japanese/all_test.go rename {_vendor/src => vendor}/golang.org/x/text/encoding/japanese/eucjp.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/encoding/japanese/iso2022jp.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/encoding/japanese/maketables.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/encoding/japanese/shiftjis.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/encoding/japanese/tables.go (100%) create mode 100644 vendor/golang.org/x/text/encoding/korean/all_test.go rename {_vendor/src => vendor}/golang.org/x/text/encoding/korean/euckr.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/encoding/korean/maketables.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/encoding/korean/tables.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/encoding/simplifiedchinese/all.go (100%) create mode 100644 vendor/golang.org/x/text/encoding/simplifiedchinese/all_test.go rename {_vendor/src => vendor}/golang.org/x/text/encoding/simplifiedchinese/gbk.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/encoding/simplifiedchinese/hzgb2312.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/encoding/simplifiedchinese/maketables.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/encoding/simplifiedchinese/tables.go (100%) create mode 100644 vendor/golang.org/x/text/encoding/traditionalchinese/all_test.go rename {_vendor/src => vendor}/golang.org/x/text/encoding/traditionalchinese/big5.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/encoding/traditionalchinese/maketables.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/encoding/traditionalchinese/tables.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/encoding/unicode/override.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/encoding/unicode/unicode.go (100%) create mode 100644 vendor/golang.org/x/text/encoding/unicode/unicode_test.go create mode 100644 vendor/golang.org/x/text/gen.go create mode 100644 vendor/golang.org/x/text/internal/gen.go create mode 100644 vendor/golang.org/x/text/internal/gen/code.go create mode 100644 vendor/golang.org/x/text/internal/gen/gen.go create mode 100644 vendor/golang.org/x/text/internal/gen_test.go create mode 100644 vendor/golang.org/x/text/internal/internal.go create mode 100644 vendor/golang.org/x/text/internal/internal_test.go create mode 100644 vendor/golang.org/x/text/internal/match.go create mode 100644 vendor/golang.org/x/text/internal/match_test.go create mode 100644 vendor/golang.org/x/text/internal/tables.go create mode 100644 vendor/golang.org/x/text/internal/triegen/compact.go create mode 100644 vendor/golang.org/x/text/internal/triegen/data_test.go create mode 100644 vendor/golang.org/x/text/internal/triegen/example_compact_test.go create mode 100644 vendor/golang.org/x/text/internal/triegen/example_test.go create mode 100644 vendor/golang.org/x/text/internal/triegen/gen_test.go create mode 100644 vendor/golang.org/x/text/internal/triegen/print.go create mode 100644 vendor/golang.org/x/text/internal/triegen/triegen.go create mode 100644 vendor/golang.org/x/text/internal/ucd/example_test.go create mode 100644 vendor/golang.org/x/text/internal/ucd/ucd.go create mode 100644 vendor/golang.org/x/text/internal/ucd/ucd_test.go rename {_vendor/src => vendor}/golang.org/x/text/internal/utf8internal/utf8internal.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/runes/cond.go (100%) create mode 100644 vendor/golang.org/x/text/runes/cond_test.go create mode 100644 vendor/golang.org/x/text/runes/example_test.go rename {_vendor/src => vendor}/golang.org/x/text/runes/runes.go (100%) create mode 100644 vendor/golang.org/x/text/runes/runes_test.go create mode 100644 vendor/golang.org/x/text/secure/bidirule/bench_test.go rename {_vendor/src => vendor}/golang.org/x/text/secure/bidirule/bidirule.go (100%) create mode 100644 vendor/golang.org/x/text/secure/bidirule/bidirule_test.go create mode 100644 vendor/golang.org/x/text/secure/doc.go create mode 100644 vendor/golang.org/x/text/transform/examples_test.go rename {_vendor/src => vendor}/golang.org/x/text/transform/transform.go (100%) create mode 100644 vendor/golang.org/x/text/transform/transform_test.go rename {_vendor/src => vendor}/golang.org/x/text/unicode/bidi/bidi.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/unicode/bidi/bracket.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/unicode/bidi/core.go (100%) create mode 100644 vendor/golang.org/x/text/unicode/bidi/core_test.go rename {_vendor/src => vendor}/golang.org/x/text/unicode/bidi/gen.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/unicode/bidi/gen_ranges.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/unicode/bidi/gen_trieval.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/unicode/bidi/prop.go (100%) create mode 100644 vendor/golang.org/x/text/unicode/bidi/ranges_test.go rename {_vendor/src => vendor}/golang.org/x/text/unicode/bidi/tables.go (100%) create mode 100644 vendor/golang.org/x/text/unicode/bidi/tables_test.go rename {_vendor/src => vendor}/golang.org/x/text/unicode/bidi/trieval.go (100%) create mode 100644 vendor/golang.org/x/text/unicode/cldr/base.go create mode 100644 vendor/golang.org/x/text/unicode/cldr/cldr.go create mode 100644 vendor/golang.org/x/text/unicode/cldr/cldr_test.go create mode 100644 vendor/golang.org/x/text/unicode/cldr/collate.go create mode 100644 vendor/golang.org/x/text/unicode/cldr/collate_test.go create mode 100644 vendor/golang.org/x/text/unicode/cldr/data_test.go create mode 100644 vendor/golang.org/x/text/unicode/cldr/decode.go create mode 100644 vendor/golang.org/x/text/unicode/cldr/examples_test.go create mode 100644 vendor/golang.org/x/text/unicode/cldr/makexml.go create mode 100644 vendor/golang.org/x/text/unicode/cldr/resolve.go create mode 100644 vendor/golang.org/x/text/unicode/cldr/resolve_test.go create mode 100644 vendor/golang.org/x/text/unicode/cldr/slice.go create mode 100644 vendor/golang.org/x/text/unicode/cldr/slice_test.go create mode 100644 vendor/golang.org/x/text/unicode/cldr/xml.go create mode 100644 vendor/golang.org/x/text/unicode/doc.go rename {_vendor/src => vendor}/golang.org/x/text/unicode/norm/composition.go (100%) create mode 100644 vendor/golang.org/x/text/unicode/norm/composition_test.go create mode 100644 vendor/golang.org/x/text/unicode/norm/example_iter_test.go create mode 100644 vendor/golang.org/x/text/unicode/norm/example_test.go rename {_vendor/src => vendor}/golang.org/x/text/unicode/norm/forminfo.go (100%) create mode 100644 vendor/golang.org/x/text/unicode/norm/forminfo_test.go rename {_vendor/src => vendor}/golang.org/x/text/unicode/norm/input.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/unicode/norm/iter.go (100%) create mode 100644 vendor/golang.org/x/text/unicode/norm/iter_test.go rename {_vendor/src => vendor}/golang.org/x/text/unicode/norm/maketables.go (100%) create mode 100644 vendor/golang.org/x/text/unicode/norm/norm_test.go rename {_vendor/src => vendor}/golang.org/x/text/unicode/norm/normalize.go (100%) create mode 100644 vendor/golang.org/x/text/unicode/norm/normalize_test.go rename {_vendor/src => vendor}/golang.org/x/text/unicode/norm/readwriter.go (100%) create mode 100644 vendor/golang.org/x/text/unicode/norm/readwriter_test.go rename {_vendor/src => vendor}/golang.org/x/text/unicode/norm/tables.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/unicode/norm/transform.go (100%) create mode 100644 vendor/golang.org/x/text/unicode/norm/transform_test.go rename {_vendor/src => vendor}/golang.org/x/text/unicode/norm/trie.go (100%) rename {_vendor/src => vendor}/golang.org/x/text/unicode/norm/triegen.go (100%) create mode 100644 vendor/golang.org/x/text/unicode/norm/ucd_test.go create mode 100644 vendor/golang.org/x/text/unicode/rangetable/gen.go create mode 100644 vendor/golang.org/x/text/unicode/rangetable/merge.go create mode 100644 vendor/golang.org/x/text/unicode/rangetable/merge_test.go create mode 100644 vendor/golang.org/x/text/unicode/rangetable/rangetable.go create mode 100644 vendor/golang.org/x/text/unicode/rangetable/rangetable_test.go create mode 100644 vendor/golang.org/x/text/unicode/rangetable/tables.go create mode 100644 vendor/google.golang.org/genproto/.travis.yml create mode 100644 vendor/google.golang.org/genproto/CONTRIBUTING.md rename {_vendor/src => vendor}/google.golang.org/genproto/LICENSE (100%) create mode 100644 vendor/google.golang.org/genproto/README.md rename {_vendor/src => vendor}/google.golang.org/genproto/googleapis/rpc/status/status.pb.go (100%) create mode 100644 vendor/google.golang.org/genproto/regen.go create mode 100755 vendor/google.golang.org/genproto/regen.sh create mode 100644 vendor/google.golang.org/grpc/.travis.yml create mode 100644 vendor/google.golang.org/grpc/CONTRIBUTING.md rename {_vendor/src => vendor}/google.golang.org/grpc/LICENSE (100%) create mode 100644 vendor/google.golang.org/grpc/Makefile rename {_vendor/src => vendor}/google.golang.org/grpc/PATENTS (100%) create mode 100644 vendor/google.golang.org/grpc/README.md rename {_vendor/src => vendor}/google.golang.org/grpc/backoff.go (100%) create mode 100644 vendor/google.golang.org/grpc/backoff_test.go rename {_vendor/src => vendor}/google.golang.org/grpc/balancer.go (100%) create mode 100644 vendor/google.golang.org/grpc/balancer_test.go rename {_vendor/src => vendor}/google.golang.org/grpc/call.go (100%) create mode 100644 vendor/google.golang.org/grpc/call_test.go rename {_vendor/src => vendor}/google.golang.org/grpc/clientconn.go (100%) create mode 100644 vendor/google.golang.org/grpc/clientconn_test.go rename {_vendor/src => vendor}/google.golang.org/grpc/codec.go (100%) create mode 100644 vendor/google.golang.org/grpc/codec_benchmark_test.go create mode 100644 vendor/google.golang.org/grpc/codec_test.go create mode 100755 vendor/google.golang.org/grpc/codegen.sh rename {_vendor/src => vendor}/google.golang.org/grpc/codes/code_string.go (100%) rename {_vendor/src => vendor}/google.golang.org/grpc/codes/codes.go (100%) create mode 100755 vendor/google.golang.org/grpc/coverage.sh rename {_vendor/src => vendor}/google.golang.org/grpc/credentials/credentials.go (100%) create mode 100644 vendor/google.golang.org/grpc/credentials/credentials_test.go rename {_vendor/src => vendor}/google.golang.org/grpc/credentials/credentials_util_go17.go (100%) rename {_vendor/src => vendor}/google.golang.org/grpc/credentials/credentials_util_go18.go (100%) rename {_vendor/src => vendor}/google.golang.org/grpc/credentials/credentials_util_pre_go17.go (100%) rename {_vendor/src => vendor}/google.golang.org/grpc/doc.go (100%) rename {_vendor/src => vendor}/google.golang.org/grpc/go16.go (100%) rename {_vendor/src => vendor}/google.golang.org/grpc/go17.go (100%) rename {_vendor/src => vendor}/google.golang.org/grpc/grpclb.go (100%) rename {_vendor/src => vendor}/google.golang.org/grpc/grpclb/grpc_lb_v1/grpclb.pb.go (100%) create mode 100644 vendor/google.golang.org/grpc/grpclb/grpc_lb_v1/grpclb.proto create mode 100644 vendor/google.golang.org/grpc/grpclb/grpclb_server_generated.go create mode 100644 vendor/google.golang.org/grpc/grpclb/grpclb_test.go rename {_vendor/src => vendor}/google.golang.org/grpc/grpclog/logger.go (100%) rename {_vendor/src => vendor}/google.golang.org/grpc/interceptor.go (100%) rename {_vendor/src => vendor}/google.golang.org/grpc/internal/internal.go (100%) rename {_vendor/src => vendor}/google.golang.org/grpc/keepalive/keepalive.go (100%) rename {_vendor/src => vendor}/google.golang.org/grpc/metadata/metadata.go (100%) create mode 100644 vendor/google.golang.org/grpc/metadata/metadata_test.go rename {_vendor/src => vendor}/google.golang.org/grpc/naming/naming.go (100%) rename {_vendor/src => vendor}/google.golang.org/grpc/peer/peer.go (100%) rename {_vendor/src => vendor}/google.golang.org/grpc/proxy.go (100%) create mode 100644 vendor/google.golang.org/grpc/proxy_test.go rename {_vendor/src => vendor}/google.golang.org/grpc/rpc_util.go (100%) create mode 100644 vendor/google.golang.org/grpc/rpc_util_test.go rename {_vendor/src => vendor}/google.golang.org/grpc/server.go (100%) create mode 100644 vendor/google.golang.org/grpc/server_test.go rename {_vendor/src => vendor}/google.golang.org/grpc/stats/handlers.go (100%) rename {_vendor/src => vendor}/google.golang.org/grpc/stats/stats.go (100%) create mode 100644 vendor/google.golang.org/grpc/stats/stats_test.go rename {_vendor/src => vendor}/google.golang.org/grpc/status/status.go (100%) create mode 100644 vendor/google.golang.org/grpc/status/status_test.go rename {_vendor/src => vendor}/google.golang.org/grpc/stream.go (100%) rename {_vendor/src => vendor}/google.golang.org/grpc/tap/tap.go (100%) rename {_vendor/src => vendor}/google.golang.org/grpc/trace.go (100%) rename {_vendor/src => vendor}/google.golang.org/grpc/transport/control.go (100%) rename {_vendor/src => vendor}/google.golang.org/grpc/transport/go16.go (100%) rename {_vendor/src => vendor}/google.golang.org/grpc/transport/go17.go (100%) rename {_vendor/src => vendor}/google.golang.org/grpc/transport/handler_server.go (100%) create mode 100644 vendor/google.golang.org/grpc/transport/handler_server_test.go rename {_vendor/src => vendor}/google.golang.org/grpc/transport/http2_client.go (100%) rename {_vendor/src => vendor}/google.golang.org/grpc/transport/http2_server.go (100%) rename {_vendor/src => vendor}/google.golang.org/grpc/transport/http_util.go (100%) create mode 100644 vendor/google.golang.org/grpc/transport/http_util_test.go rename {_vendor/src => vendor}/google.golang.org/grpc/transport/transport.go (100%) create mode 100644 vendor/google.golang.org/grpc/transport/transport_test.go create mode 100644 vendor/gopkg.in/natefinch/lumberjack.v2/.gitignore rename {_vendor/src => vendor}/gopkg.in/natefinch/lumberjack.v2/LICENSE (100%) create mode 100644 vendor/gopkg.in/natefinch/lumberjack.v2/README.md rename {_vendor/src => vendor}/gopkg.in/natefinch/lumberjack.v2/chown.go (100%) rename {_vendor/src => vendor}/gopkg.in/natefinch/lumberjack.v2/chown_linux.go (100%) create mode 100644 vendor/gopkg.in/natefinch/lumberjack.v2/example_test.go create mode 100644 vendor/gopkg.in/natefinch/lumberjack.v2/linux_test.go rename {_vendor/src => vendor}/gopkg.in/natefinch/lumberjack.v2/lumberjack.go (100%) create mode 100644 vendor/gopkg.in/natefinch/lumberjack.v2/lumberjack_test.go create mode 100644 vendor/gopkg.in/natefinch/lumberjack.v2/rotate_test.go create mode 100644 vendor/gopkg.in/natefinch/lumberjack.v2/testing_test.go diff --git a/Gopkg.lock b/Gopkg.lock new file mode 100644 index 0000000000000..4c008792fb92b --- /dev/null +++ b/Gopkg.lock @@ -0,0 +1,267 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + branch = "master" + name = "github.com/BurntSushi/toml" + packages = ["."] + revision = "a368813c5e648fee92e5f6c30e3944ff9d5e8895" + +[[projects]] + name = "github.com/Sirupsen/logrus" + packages = ["."] + revision = "ba1b36c82c5e05c4f912a88eab0dcd91a171688f" + version = "v0.11.5" + +[[projects]] + name = "github.com/apache/thrift" + packages = ["lib/go/thrift"] + revision = "b2a4d4ae21c789b689dd162deb819665567f481c" + version = "0.10.0" + +[[projects]] + name = "github.com/beorn7/perks" + packages = ["quantile"] + revision = "3ac7bf7a47d159a033b107610db8a1b6575507a4" + +[[projects]] + branch = "master" + name = "github.com/blacktear23/go-proxyprotocol" + packages = ["."] + revision = "62e368e1c4700c34b4b6f77afd49b215211574c2" + +[[projects]] + name = "github.com/codahale/hdrhistogram" + packages = ["."] + revision = "f8ad88b59a584afeee9d334eff879b104439117b" + +[[projects]] + name = "github.com/coreos/etcd" + packages = ["auth/authpb","clientv3","clientv3/concurrency","etcdserver/api/v3rpc/rpctypes","etcdserver/etcdserverpb","mvcc/mvccpb"] + revision = "9d43462d174c664f5edf313dec0de31e1ef4ed47" + version = "v3.2.6" + +[[projects]] + branch = "master" + name = "github.com/coreos/gofail" + packages = ["runtime"] + revision = "38defe9971eda62d1b1c6a69c00acf001d46ecab" + +[[projects]] + name = "github.com/cznic/golex" + packages = ["lex"] + revision = "da5a7153a51074477ecac5c45a7e5182a0c72448" + +[[projects]] + name = "github.com/cznic/mathutil" + packages = ["."] + revision = "78ad7f262603437f0ecfebc835d80094f89c8f54" + +[[projects]] + branch = "master" + name = "github.com/cznic/parser" + packages = ["yacc"] + revision = "31edd927e5b19d1c4a260c41a397e7f81d6694d9" + +[[projects]] + branch = "master" + name = "github.com/cznic/sortutil" + packages = ["."] + revision = "4c7342852e65c2088c981288f2c5610d10b9f7f4" + +[[projects]] + name = "github.com/cznic/strutil" + packages = ["."] + revision = "1eb03e3cc9d345307a45ec82bd3016cde4bd4464" + +[[projects]] + name = "github.com/cznic/y" + packages = ["."] + revision = "9fdf92d4aac058959f814606bb729ed50f5e4240" + +[[projects]] + name = "github.com/go-sql-driver/mysql" + packages = ["."] + revision = "3955978caca48c1658a4bb7a9c6a0f084e326af3" + +[[projects]] + name = "github.com/golang/protobuf" + packages = ["proto","ptypes/any"] + revision = "8ee79997227bf9b34611aee7946ae64735e6fd93" + +[[projects]] + name = "github.com/golang/snappy" + packages = ["."] + revision = "723cc1e459b8eea2dea4583200fd60757d40097a" + +[[projects]] + branch = "master" + name = "github.com/google/btree" + packages = ["."] + revision = "316fb6d3f031ae8f4d457c6c5186b9e3ded70435" + +[[projects]] + name = "github.com/gorilla/context" + packages = ["."] + revision = "1ea25387ff6f684839d82767c1733ff4d4d15d0a" + version = "v1.1" + +[[projects]] + name = "github.com/gorilla/mux" + packages = ["."] + revision = "599cba5e7b6137d46ddf58fb1765f5d928e69604" + +[[projects]] + name = "github.com/grpc-ecosystem/go-grpc-middleware" + packages = [".","tags","tracing/opentracing","util/metautils"] + revision = "82921fcf811d228d2fa202bc31238b356bf9f8d5" + +[[projects]] + name = "github.com/grpc-ecosystem/go-grpc-prometheus" + packages = ["."] + revision = "6b7015e65d366bf3f19b2b2a000a831940f0f7e0" + version = "v1.1" + +[[projects]] + name = "github.com/juju/errors" + packages = ["."] + revision = "b2c7a7da5b2995941048f60146e67702a292e468" + +[[projects]] + branch = "master" + name = "github.com/matttproud/golang_protobuf_extensions" + packages = ["pbutil"] + revision = "c12348ce28de40eed0136aa2b644d0ee0650e56c" + +[[projects]] + branch = "master" + name = "github.com/ngaut/pools" + packages = ["."] + revision = "6352e005618615ffaf1cb1c6622b8e91435751fe" + +[[projects]] + branch = "master" + name = "github.com/ngaut/sync2" + packages = ["."] + revision = "7a24ed77b2efb460c1468b7dc917821c66e80e55" + +[[projects]] + name = "github.com/opentracing/opentracing-go" + packages = [".","ext","log"] + revision = "1949ddbfd147afd4d964a9f00b24eb291e0e7c38" + version = "v1.0.2" + +[[projects]] + branch = "master" + name = "github.com/petar/GoLLRB" + packages = ["llrb"] + revision = "53be0d36a84c2a886ca057d34b6aa4468df9ccb4" + +[[projects]] + branch = "master" + name = "github.com/pingcap/check" + packages = ["."] + revision = "1c287c953996ab3a0bf535dba9d53d809d3dc0b6" + +[[projects]] + name = "github.com/pingcap/goleveldb" + packages = ["leveldb","leveldb/cache","leveldb/comparer","leveldb/errors","leveldb/filter","leveldb/iterator","leveldb/journal","leveldb/memdb","leveldb/opt","leveldb/storage","leveldb/table","leveldb/util"] + revision = "8d44bfdf1030639ae7130922c95df12d6d4da3b6" + +[[projects]] + branch = "master" + name = "github.com/pingcap/kvproto" + packages = ["pkg/coprocessor","pkg/eraftpb","pkg/errorpb","pkg/kvrpcpb","pkg/metapb","pkg/pdpb","pkg/raft_serverpb","pkg/tikvpb"] + revision = "d21ce07c35b9ea66436dc632210a01d927361ed4" + +[[projects]] + name = "github.com/pingcap/pd" + packages = ["pd-client"] + revision = "96db717124a5bd980e8a244af2db8952e04159d6" + +[[projects]] + name = "github.com/pingcap/tipb" + packages = ["go-binlog","go-tipb","sharedbytes"] + revision = "a497eca3b8920e192aae1a5af81e573f90e59a6b" + +[[projects]] + name = "github.com/prometheus/client_golang" + packages = ["prometheus","prometheus/push"] + revision = "c5b7fccd204277076155f10851dad72b76a49317" + version = "v0.8.0" + +[[projects]] + name = "github.com/prometheus/client_model" + packages = ["go"] + revision = "fa8ad6fec33561be4280a8f0514318c79d7f6cb6" + +[[projects]] + name = "github.com/prometheus/common" + packages = ["expfmt","internal/bitbucket.org/ww/goautoneg","model"] + revision = "4402f4e5ea79ec15f3c574773b6a5198fbea215f" + +[[projects]] + name = "github.com/prometheus/procfs" + packages = ["."] + revision = "abf152e5f3e97f2fafac028d2cc06c1feb87ffa5" + +[[projects]] + name = "github.com/spaolacci/murmur3" + packages = ["."] + revision = "0d12bf811670bf6a1a63828dfbd003eded177fce" + version = "v1.0" + +[[projects]] + name = "github.com/twinj/uuid" + packages = ["."] + revision = "70cac2bcd273ef6a371bb96cde363d28b68734c3" + +[[projects]] + name = "github.com/uber/jaeger-client-go" + packages = [".","config","internal/spanlog","log","rpcmetrics","thrift-gen/agent","thrift-gen/jaeger","thrift-gen/sampling","thrift-gen/zipkincore","utils"] + revision = "d021e646f5187d77b55592c3efee1a2810e895d7" + version = "v2.8.0" + +[[projects]] + name = "github.com/uber/jaeger-lib" + packages = ["metrics"] + revision = "3b2a9ad2a045881ab7a0f81d465be54c8292ee4f" + version = "v1.1.0" + +[[projects]] + name = "golang.org/x/net" + packages = ["context","http2","http2/hpack","idna","internal/timeseries","lex/httplex","trace"] + revision = "d1e1b351919c6738fdeb9893d5c998b161464f0c" + +[[projects]] + name = "golang.org/x/sys" + packages = ["unix"] + revision = "a646d33e2ee3172a661fc09bca23bb4889a41bc8" + +[[projects]] + name = "golang.org/x/text" + packages = ["encoding","encoding/charmap","encoding/internal","encoding/internal/identifier","encoding/japanese","encoding/korean","encoding/simplifiedchinese","encoding/traditionalchinese","encoding/unicode","internal/gen","internal/triegen","internal/ucd","internal/utf8internal","runes","secure/bidirule","transform","unicode/bidi","unicode/cldr","unicode/norm","unicode/rangetable"] + revision = "4ee4af566555f5fbe026368b75596286a312663a" + +[[projects]] + name = "google.golang.org/genproto" + packages = ["googleapis/rpc/status"] + revision = "6b7d9516179cd47f4714cfeb0103ad1dede756c4" + +[[projects]] + name = "google.golang.org/grpc" + packages = [".","codes","credentials","grpclb/grpc_lb_v1","grpclog","internal","keepalive","metadata","naming","peer","stats","status","tap","transport"] + revision = "3419b42955675df23457629c75f58eb8dcd56954" + +[[projects]] + name = "gopkg.in/natefinch/lumberjack.v2" + packages = ["."] + revision = "dd45e6a67c53f673bb49ca8a001fd3a63ceb640e" + version = "v2.0" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "03f86a03269d270c19ee32afceabbe22bdc1ea8b196e902b4b29a3c7e3da6973" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml new file mode 100644 index 0000000000000..583091cf2f8e1 --- /dev/null +++ b/Gopkg.toml @@ -0,0 +1,89 @@ +# 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/BurntSushi/toml" + +[[constraint]] + name = "github.com/Sirupsen/logrus" + version = "0.11.5" + +[[constraint]] + branch = "master" + name = "github.com/blacktear23/go-proxyprotocol" + +[[constraint]] + name = "github.com/coreos/etcd" + version = "3.2.6" + +[[constraint]] + branch = "master" + name = "github.com/coreos/gofail" + +[[constraint]] + branch = "master" + name = "github.com/cznic/parser" + +[[constraint]] + branch = "master" + name = "github.com/cznic/sortutil" + +[[constraint]] + branch = "master" + name = "github.com/google/btree" + +[[constraint]] + name = "github.com/grpc-ecosystem/go-grpc-prometheus" + version = "1.1.0" + +[[constraint]] + branch = "master" + name = "github.com/ngaut/pools" + +[[constraint]] + name = "github.com/opentracing/opentracing-go" + version = "1.0.0" + +[[constraint]] + branch = "master" + name = "github.com/pingcap/check" + +[[constraint]] + branch = "master" + name = "github.com/pingcap/kvproto" + +[[constraint]] + name = "github.com/prometheus/client_golang" + version = "0.8.0" + +[[constraint]] + name = "github.com/spaolacci/murmur3" + version = "1.0.0" + +[[constraint]] + name = "github.com/uber/jaeger-client-go" + version = "2.8.0" + +[[constraint]] + name = "gopkg.in/natefinch/lumberjack.v2" + version = "2.0.0" diff --git a/Makefile b/Makefile index 5ccf0727964c9..8f74ac62f5cc0 100644 --- a/Makefile +++ b/Makefile @@ -8,13 +8,13 @@ ifeq "$(GOPATH)" "" endif CURDIR := $(shell pwd) -path_to_add := $(addsuffix /bin,$(subst :,/bin:,$(CURDIR)/_vendor:$(GOPATH))) +path_to_add := $(addsuffix /bin,$(subst :,/bin:,$(CURDIR)/vendor:$(GOPATH))) export PATH := $(path_to_add):$(PATH) GO := go -GOBUILD := GOPATH=$(CURDIR)/_vendor:$(GOPATH) CGO_ENABLED=0 $(GO) build $(BUILD_FLAG) -GOTEST := GOPATH=$(CURDIR)/_vendor:$(GOPATH) CGO_ENABLED=1 $(GO) test -p 3 -OVERALLS := GOPATH=$(CURDIR)/_vendor:$(GOPATH) CGO_ENABLED=1 overalls +GOBUILD := GOPATH=$(CURDIR)/vendor:$(GOPATH) CGO_ENABLED=0 $(GO) build $(BUILD_FLAG) +GOTEST := GOPATH=$(CURDIR)/vendor:$(GOPATH) CGO_ENABLED=1 $(GO) test -p 3 +OVERALLS := GOPATH=$(CURDIR)/vendor:$(GOPATH) CGO_ENABLED=1 overalls GOVERALLS := goveralls ARCH := "`uname -s`" @@ -90,7 +90,7 @@ goword: errcheck: go get github.com/kisielk/errcheck - @ GOPATH=$(CURDIR)/_vendor:$(GOPATH) errcheck -blank $(PACKAGES) | grep -v "_test\.go" | awk '{print} END{if(NR>0) {exit 1}}' + @ GOPATH=$(CURDIR)/vendor:$(GOPATH) errcheck -blank $(PACKAGES) | grep -v "_test\.go" | awk '{print} END{if(NR>0) {exit 1}}' clean: $(GO) clean -i ./... @@ -110,7 +110,7 @@ ifeq ("$(TRAVIS_COVERAGE)", "1") @export log_level=error; \ go get github.com/go-playground/overalls go get github.com/mattn/goveralls - $(OVERALLS) -project=github.com/pingcap/tidb -covermode=count -ignore='.git,_vendor' + $(OVERALLS) -project=github.com/pingcap/tidb -covermode=count -ignore='.git,vendor' $(GOVERALLS) -service=travis-ci -coverprofile=overalls.coverprofile else @echo "Running in native mode." @@ -135,7 +135,7 @@ tikv_integration_test: parserlib RACE_FLAG = ifeq ("$(WITH_RACE)", "1") RACE_FLAG = -race - GOBUILD = GOPATH=$(CURDIR)/_vendor:$(GOPATH) CGO_ENABLED=1 $(GO) build + GOBUILD = GOPATH=$(CURDIR)/vendor:$(GOPATH) CGO_ENABLED=1 $(GO) build endif server: parserlib @@ -157,8 +157,6 @@ benchdb: update: which glide >/dev/null || curl https://glide.sh/get | sh which glide-vc || go get -v -u github.com/sgotti/glide-vc - rm -r vendor && mv _vendor/src vendor || true - rm -rf _vendor ifdef PKG glide get -s -v --skip-test ${PKG} else @@ -166,8 +164,8 @@ else endif @echo "removing test files" glide vc --only-code --no-tests - mkdir -p _vendor - mv vendor _vendor/src + mkdir -p vendor + mv vendor vendor/src checklist: cat checklist.md diff --git a/_vendor/src/github.com/grpc-ecosystem/go-grpc-middleware/tags/context.go b/_vendor/src/github.com/grpc-ecosystem/go-grpc-middleware/tags/context.go deleted file mode 100644 index 15a1c0b65bcce..0000000000000 --- a/_vendor/src/github.com/grpc-ecosystem/go-grpc-middleware/tags/context.go +++ /dev/null @@ -1,49 +0,0 @@ -package grpc_ctxtags - -import "context" - -type ctxMarker struct{} - -var ( - // ctxMarkerKey is the Context value marker used by *all* logging middleware. - // The logging middleware object must interf - ctxMarkerKey = &ctxMarker{} -) - -// Tags is the struct used for storing request tags between Context calls. -// This object is *not* thread safe, and should be handled only in the context of the request. -type Tags struct { - values map[string]interface{} -} - -// Set sets the given key in the metadata tags. -func (t *Tags) Set(key string, value interface{}) *Tags { - t.values[key] = value - return t -} - -// Has checks if the given key exists. -func (t *Tags) Has(key string) bool { - _, ok := t.values[key] - return ok -} - -// Values returns a map of key to values. -// Do not modify the underlying map, please use Set instead. -func (t *Tags) Values() map[string]interface{} { - return t.values -} - -// Extracts returns a pre-existing Tags object in the Context. -// If the context wasn't set in a tag interceptor, a no-op Tag storage is returned that will *not* be propagated in context. -func Extract(ctx context.Context) *Tags { - t, ok := ctx.Value(ctxMarkerKey).(*Tags) - if !ok { - return &Tags{values: make(map[string]interface{})} - } - return t -} - -func setInContext(ctx context.Context, tags *Tags) context.Context { - return context.WithValue(ctx, ctxMarkerKey, tags) -} diff --git a/_vendor/src/github.com/grpc-ecosystem/go-grpc-middleware/tags/doc.go b/_vendor/src/github.com/grpc-ecosystem/go-grpc-middleware/tags/doc.go deleted file mode 100644 index 4e2912fd4f768..0000000000000 --- a/_vendor/src/github.com/grpc-ecosystem/go-grpc-middleware/tags/doc.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2017 Michal Witkowski. All Rights Reserved. -// See LICENSE for licensing terms. - -/* -`grpc_ctxtags` adds a Tag object to the context that can be used by other middleware to add context about a request. - -Request Context Tags - -Tags describe information about the request, and can be set and used by other middleware, or handlers. Tags are used -for logging and tracing of requests. Tags are populated both upwards, *and* downwards in the interceptor-handler stack. - -You can automatically extract tags (in `grpc.request.`) from request payloads. - -For unary and server-streaming methods, pass in the `WithFieldExtractor` option. For client-streams and bidirectional-streams, you can -use `WithFieldExtractorForInitialReq` which will extract the tags from the first message passed from client to server. -Note the tags will not be modified for subsequent requests, so this option only makes sense when the initial message -establishes the meta-data for the stream. - -If a user doesn't use the interceptors that initialize the `Tags` object, all operations following from an `Extract(ctx)` -will be no-ops. This is to ensure that code doesn't panic if the interceptors weren't used. - -Tags fields are typed, and shallow and should follow the OpenTracing semantics convention: -https://github.com/opentracing/specification/blob/master/semantic_conventions.md -*/ -package grpc_ctxtags diff --git a/_vendor/src/github.com/grpc-ecosystem/go-grpc-middleware/tags/fieldextractor.go b/_vendor/src/github.com/grpc-ecosystem/go-grpc-middleware/tags/fieldextractor.go deleted file mode 100644 index 1d7c1a7fa2fa1..0000000000000 --- a/_vendor/src/github.com/grpc-ecosystem/go-grpc-middleware/tags/fieldextractor.go +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2017 Michal Witkowski. All Rights Reserved. -// See LICENSE for licensing terms. - -package grpc_ctxtags - -import ( - "reflect" -) - -// RequestFieldExtractorFunc is a user-provided function that extracts field information from a gRPC request. -// It is called from tags middleware on arrival of unary request or a server-stream request. -// Keys and values will be added to the context tags of the request. If there are no fields, you should return a nil. -type RequestFieldExtractorFunc func(fullMethod string, req interface{}) map[string]interface{} - -type requestFieldsExtractor interface { - // ExtractRequestFields is a method declared on a Protobuf message that extracts fields from the interface. - // The values from the extracted fields should be set in the appendToMap, in order to avoid allocations. - ExtractRequestFields(appendToMap map[string]interface{}) -} - -// CodeGenRequestFieldExtractor is a function that relies on code-generated functions that export log fields from requests. -// These are usually coming from a protoc-plugin that generates additional information based on custom field options. -func CodeGenRequestFieldExtractor(fullMethod string, req interface{}) map[string]interface{} { - if ext, ok := req.(requestFieldsExtractor); ok { - retMap := make(map[string]interface{}) - ext.ExtractRequestFields(retMap) - if len(retMap) == 0 { - return nil - } - return retMap - } - return nil -} - -// TagedRequestFiledExtractor is a function that relies on Go struct tags to export log fields from requests. -// These are usualy coming from a protoc-plugin, such as Gogo protobuf. -// -// message Metadata { -// repeated string tags = 1 [ (gogoproto.moretags) = "log_field:\"meta_tags\"" ]; -// } -// -// The tagName is configurable using the tagName variable. Here it would be "log_field". -func TagBasedRequestFieldExtractor(tagName string) RequestFieldExtractorFunc { - return func(fullMethod string, req interface{}) map[string]interface{} { - retMap := make(map[string]interface{}) - reflectMessageTags(req, retMap, tagName) - if len(retMap) == 0 { - return nil - } - return retMap - } -} - -func reflectMessageTags(msg interface{}, existingMap map[string]interface{}, tagName string) { - v := reflect.ValueOf(msg) - // Only deal with pointers to structs. - if v.Kind() != reflect.Ptr || v.Elem().Kind() != reflect.Struct { - return - } - // Deref the pointer get to the struct. - v = v.Elem() - t := v.Type() - for i := 0; i < v.NumField(); i++ { - field := v.Field(i) - kind := field.Kind() - // Only recurse down direct pointers, which should only be to nested structs. - if kind == reflect.Ptr { - reflectMessageTags(field.Interface(), existingMap, tagName) - } - // In case of arrays/splices (repeated fields) go down to the concrete type. - if kind == reflect.Array || kind == reflect.Slice { - if field.Len() == 0 { - continue - } - kind = field.Index(0).Kind() - } - // Only be interested in - if (kind >= reflect.Bool && kind <= reflect.Float64) || kind == reflect.String { - if tag := t.Field(i).Tag.Get(tagName); tag != "" { - existingMap[tag] = field.Interface() - } - } - } - return -} diff --git a/_vendor/src/github.com/grpc-ecosystem/go-grpc-middleware/tags/interceptors.go b/_vendor/src/github.com/grpc-ecosystem/go-grpc-middleware/tags/interceptors.go deleted file mode 100644 index 5f62551478522..0000000000000 --- a/_vendor/src/github.com/grpc-ecosystem/go-grpc-middleware/tags/interceptors.go +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2017 Michal Witkowski. All Rights Reserved. -// See LICENSE for licensing terms. - -package grpc_ctxtags - -import ( - "github.com/grpc-ecosystem/go-grpc-middleware" - "golang.org/x/net/context" - "google.golang.org/grpc" - "google.golang.org/grpc/peer" -) - -// UnaryServerInterceptor returns a new unary server interceptors that sets the values for request tags. -func UnaryServerInterceptor(opts ...Option) grpc.UnaryServerInterceptor { - o := evaluateOptions(opts) - return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { - newCtx := newTagsForCtx(ctx) - if o.requestFieldsFunc != nil { - setRequestFieldTags(newCtx, o.requestFieldsFunc, info.FullMethod, req) - } - return handler(newCtx, req) - } -} - -// StreamServerInterceptor returns a new streaming server interceptor that sets the values for request tags. -func StreamServerInterceptor(opts ...Option) grpc.StreamServerInterceptor { - o := evaluateOptions(opts) - return func(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error { - newCtx := newTagsForCtx(stream.Context()) - if o.requestFieldsFunc == nil { - // Short-circuit, don't do the expensive bit of allocating a wrappedStream. - wrappedStream := grpc_middleware.WrapServerStream(stream) - wrappedStream.WrappedContext = newCtx - return handler(srv, wrappedStream) - } - wrapped := &wrappedStream{stream, info, o, newCtx, true} - err := handler(srv, wrapped) - return err - } -} - -// wrappedStream is a thin wrapper around grpc.ServerStream that allows modifying context and extracts log fields from the initial message. -type wrappedStream struct { - grpc.ServerStream - info *grpc.StreamServerInfo - opts *options - // WrappedContext is the wrapper's own Context. You can assign it. - WrappedContext context.Context - initial bool -} - -// Context returns the wrapper's WrappedContext, overwriting the nested grpc.ServerStream.Context() -func (w *wrappedStream) Context() context.Context { - return w.WrappedContext -} - -func (w *wrappedStream) RecvMsg(m interface{}) error { - err := w.ServerStream.RecvMsg(m) - // We only do log fields extraction on the single-reqest of a server-side stream. - if !w.info.IsClientStream || w.opts.requestFieldsFromInitial && w.initial { - w.initial = false - - setRequestFieldTags(w.Context(), w.opts.requestFieldsFunc, w.info.FullMethod, m) - } - return err -} - -func newTagsForCtx(ctx context.Context) context.Context { - t := Extract(ctx) // will allocate a new one if it didn't exist. - if peer, ok := peer.FromContext(ctx); ok { - t.Set("peer.address", peer.Addr) - } - return setInContext(ctx, t) -} - -func setRequestFieldTags(ctx context.Context, f RequestFieldExtractorFunc, fullMethodName string, req interface{}) { - if valMap := f(fullMethodName, req); valMap != nil { - t := Extract(ctx) - for k, v := range valMap { - t.Set("grpc.request."+k, v) - } - } -} diff --git a/_vendor/src/github.com/grpc-ecosystem/go-grpc-middleware/tags/options.go b/_vendor/src/github.com/grpc-ecosystem/go-grpc-middleware/tags/options.go deleted file mode 100644 index 952775f88d405..0000000000000 --- a/_vendor/src/github.com/grpc-ecosystem/go-grpc-middleware/tags/options.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2017 Michal Witkowski. All Rights Reserved. -// See LICENSE for licensing terms. - -package grpc_ctxtags - -var ( - defaultOptions = &options{ - requestFieldsFunc: nil, - } -) - -type options struct { - requestFieldsFunc RequestFieldExtractorFunc - requestFieldsFromInitial bool -} - -func evaluateOptions(opts []Option) *options { - optCopy := &options{} - *optCopy = *defaultOptions - for _, o := range opts { - o(optCopy) - } - return optCopy -} - -type Option func(*options) - -// WithFieldExtractor customizes the function for extracting log fields from protobuf messages, for -// unary and server-streamed methods only. -func WithFieldExtractor(f RequestFieldExtractorFunc) Option { - return func(o *options) { - o.requestFieldsFunc = f - } -} - -// WithFieldExtractorForInitialReq customizes the function for extracting log fields from protobuf messages, -// for all unary and streaming methods. For client-streams and bidirectional-streams, the tags will be -// extracted from the first message from the client. -func WithFieldExtractorForInitialReq(f RequestFieldExtractorFunc) Option { - return func(o *options) { - o.requestFieldsFunc = f - o.requestFieldsFromInitial = true - } -} diff --git a/_vendor/src/github.com/pingcap/mysqlx-driver/LICENSE b/_vendor/src/github.com/pingcap/mysqlx-driver/LICENSE deleted file mode 100644 index a612ad9813b00..0000000000000 --- a/_vendor/src/github.com/pingcap/mysqlx-driver/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/_vendor/src/github.com/pingcap/mysqlx-driver/appengine.go b/_vendor/src/github.com/pingcap/mysqlx-driver/appengine.go deleted file mode 100644 index 565614eef7f33..0000000000000 --- a/_vendor/src/github.com/pingcap/mysqlx-driver/appengine.go +++ /dev/null @@ -1,19 +0,0 @@ -// Go MySQL Driver - A MySQL-Driver for Go's database/sql package -// -// Copyright 2013 The Go-MySQL-Driver Authors. 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/. - -// +build appengine - -package mysql - -import ( - "appengine/cloudsql" -) - -func init() { - RegisterDial("cloudsql", cloudsql.Dial) -} diff --git a/_vendor/src/github.com/pingcap/mysqlx-driver/buffer.go b/_vendor/src/github.com/pingcap/mysqlx-driver/buffer.go deleted file mode 100644 index e5a8517ef90b4..0000000000000 --- a/_vendor/src/github.com/pingcap/mysqlx-driver/buffer.go +++ /dev/null @@ -1,99 +0,0 @@ -// Go MySQL Driver - A MySQL-Driver for Go's database/sql package -// -// Copyright 2013 The Go-MySQL-Driver Authors. 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 mysql - -import ( - "io" - - "github.com/juju/errors" -) - -const defaultBufSize = 4096 - -// A buffer which is used for both reading and writing. -// This is possible since communication on each connection is synchronous. -// In other words, we can't write and read simultaneously on the same connection. -// The buffer is similar to bufio.Reader / Writer but zero-copy-ish -// Also highly optimized for this particular use case. -type buffer struct { - buf []byte - rd io.Reader - idx int - length int -} - -func newBuffer(rd io.Reader) buffer { - var b [defaultBufSize]byte - return buffer{ - buf: b[:], - rd: rd, - } -} - -// fill reads into the buffer until at least _need_ bytes are in it -func (b *buffer) fill(need int) error { - n := b.length - - // move existing data to the beginning - if n > 0 && b.idx > 0 { - copy(b.buf[0:n], b.buf[b.idx:]) - } - - // grow buffer if necessary - // TODO: let the buffer shrink again at some point - // Maybe keep the org buf slice and swap back? - if need > len(b.buf) { - // Round up to the next multiple of the default size - newBuf := make([]byte, ((need/defaultBufSize)+1)*defaultBufSize) - copy(newBuf, b.buf) - b.buf = newBuf - } - - b.idx = 0 - - for { - nn, err := b.rd.Read(b.buf[n:]) - n += nn - - switch err { - case nil: - if n < need { - continue - } - b.length = n - return nil - - case io.EOF: - if n >= need { - b.length = n - return nil - } - return io.ErrUnexpectedEOF - - default: - return errors.Trace(err) - } - } -} - -// returns next N bytes from buffer. -// The returned slice is only guaranteed to be valid until the next read -func (b *buffer) readNext(need int) ([]byte, error) { - if b.length < need { - // refill - if err := b.fill(need); err != nil { - return nil, errors.Trace(err) - } - } - - offset := b.idx - b.idx += need - b.length -= need - return b.buf[offset:b.idx], nil -} diff --git a/_vendor/src/github.com/pingcap/mysqlx-driver/capability.go b/_vendor/src/github.com/pingcap/mysqlx-driver/capability.go deleted file mode 100644 index 4c124e3c9c024..0000000000000 --- a/_vendor/src/github.com/pingcap/mysqlx-driver/capability.go +++ /dev/null @@ -1,130 +0,0 @@ -package mysql - -import ( - "github.com/juju/errors" -) - -// Capabilities are indexed by name and can be one of 7 protobuf types (including nesting...). -// - see: mysqlx_datatypes.proto 'Type' -// So rather complex and messy even if in reality most combinations won't be used. -// - currently handled combinations are: -// - scalar string -// - scalar bool -// - array of string - -type capabilityType uint8 - -const ( - // CapabilityString is a string - CapabilityString capabilityType = iota - // CapabilityBool is a boolean - CapabilityBool -) - -// ugly! -type capability struct { - capabilityType capabilityType - capabilityBool bool - capabilityString string -} - -func (c *capability) Type() string { - var t string - if c != nil { - switch c.capabilityType { - case CapabilityBool: - t = "bool" - case CapabilityString: - t = "string" - } - } - return t -} - -func (c *capability) String() string { - if c != nil && c.capabilityType == CapabilityString { - return c.capabilityString - } - return "" -} - -func (c *capability) Bool() bool { - if c != nil && c.capabilityType == CapabilityBool { - return c.capabilityBool - } - return false -} - -// Values contains an array of capabilities -type Values []capability - -// ServerCapabilities is a named map of capability values -type ServerCapabilities map[string]Values - -// newServerCapabilities returns a structure containing the named capabilities of the server -func newServerCapabilities() ServerCapabilities { - return make(map[string]Values) -} - -// Exists returns true if the named capability exists -func (sc ServerCapabilities) Exists(name string) bool { - if sc == nil { - return false - } - _, found := sc[name] - - return found -} - -// Values returns the named Values -func (sc ServerCapabilities) Values(name string) Values { - if sc == nil { - return nil - } - - // get the values - values, found := sc[name] - // not necessary to do this explicitly? - if !found { - return nil - } - return values -} - -// AddScalarString adds the given string value to the named capability -func (sc ServerCapabilities) AddScalarString(name string, value string) error { - if sc == nil { - return errors.Errorf("ServerCapabilities.AddScalarString() on nil value") - } - values := sc.Values(name) - values = append(values, capability{capabilityType: CapabilityString, capabilityString: value}) - sc[name] = values - - return nil -} - -// AddScalarBool adds the given boolean value to the named capability -func (sc ServerCapabilities) AddScalarBool(name string, value bool) error { - if sc == nil { - return errors.Errorf("ServerCapabilities.AddScalarBool() on nil value") - } - values := sc.Values(name) - values = append(values, capability{capabilityType: CapabilityBool, capabilityBool: value}) - sc[name] = values - - return nil -} - -// AddArrayString adds the given array of strings to the named capability -func (sc ServerCapabilities) AddArrayString(name string, values []string) error { - if sc == nil { - return errors.Errorf("ServerCapabilities.AddArrayString() on nil value") - } - for i := range values { - if err := sc.AddScalarString(name, values[i]); err != nil { - return errors.Trace(err) - } - } - - return nil -} diff --git a/_vendor/src/github.com/pingcap/mysqlx-driver/collations.go b/_vendor/src/github.com/pingcap/mysqlx-driver/collations.go deleted file mode 100644 index 6c1d613d5b821..0000000000000 --- a/_vendor/src/github.com/pingcap/mysqlx-driver/collations.go +++ /dev/null @@ -1,250 +0,0 @@ -// Go MySQL Driver - A MySQL-Driver for Go's database/sql package -// -// Copyright 2014 The Go-MySQL-Driver Authors. 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 mysql - -const defaultCollation byte = 33 // utf8_general_ci - -// A list of available collations mapped to the internal ID. -// To update this map use the following MySQL query: -// SELECT COLLATION_NAME, ID FROM information_schema.COLLATIONS -var collations = map[string]byte{ - "big5_chinese_ci": 1, - "latin2_czech_cs": 2, - "dec8_swedish_ci": 3, - "cp850_general_ci": 4, - "latin1_german1_ci": 5, - "hp8_english_ci": 6, - "koi8r_general_ci": 7, - "latin1_swedish_ci": 8, - "latin2_general_ci": 9, - "swe7_swedish_ci": 10, - "ascii_general_ci": 11, - "ujis_japanese_ci": 12, - "sjis_japanese_ci": 13, - "cp1251_bulgarian_ci": 14, - "latin1_danish_ci": 15, - "hebrew_general_ci": 16, - "tis620_thai_ci": 18, - "euckr_korean_ci": 19, - "latin7_estonian_cs": 20, - "latin2_hungarian_ci": 21, - "koi8u_general_ci": 22, - "cp1251_ukrainian_ci": 23, - "gb2312_chinese_ci": 24, - "greek_general_ci": 25, - "cp1250_general_ci": 26, - "latin2_croatian_ci": 27, - "gbk_chinese_ci": 28, - "cp1257_lithuanian_ci": 29, - "latin5_turkish_ci": 30, - "latin1_german2_ci": 31, - "armscii8_general_ci": 32, - "utf8_general_ci": 33, - "cp1250_czech_cs": 34, - "ucs2_general_ci": 35, - "cp866_general_ci": 36, - "keybcs2_general_ci": 37, - "macce_general_ci": 38, - "macroman_general_ci": 39, - "cp852_general_ci": 40, - "latin7_general_ci": 41, - "latin7_general_cs": 42, - "macce_bin": 43, - "cp1250_croatian_ci": 44, - "utf8mb4_general_ci": 45, - "utf8mb4_bin": 46, - "latin1_bin": 47, - "latin1_general_ci": 48, - "latin1_general_cs": 49, - "cp1251_bin": 50, - "cp1251_general_ci": 51, - "cp1251_general_cs": 52, - "macroman_bin": 53, - "utf16_general_ci": 54, - "utf16_bin": 55, - "utf16le_general_ci": 56, - "cp1256_general_ci": 57, - "cp1257_bin": 58, - "cp1257_general_ci": 59, - "utf32_general_ci": 60, - "utf32_bin": 61, - "utf16le_bin": 62, - "binary": 63, - "armscii8_bin": 64, - "ascii_bin": 65, - "cp1250_bin": 66, - "cp1256_bin": 67, - "cp866_bin": 68, - "dec8_bin": 69, - "greek_bin": 70, - "hebrew_bin": 71, - "hp8_bin": 72, - "keybcs2_bin": 73, - "koi8r_bin": 74, - "koi8u_bin": 75, - "latin2_bin": 77, - "latin5_bin": 78, - "latin7_bin": 79, - "cp850_bin": 80, - "cp852_bin": 81, - "swe7_bin": 82, - "utf8_bin": 83, - "big5_bin": 84, - "euckr_bin": 85, - "gb2312_bin": 86, - "gbk_bin": 87, - "sjis_bin": 88, - "tis620_bin": 89, - "ucs2_bin": 90, - "ujis_bin": 91, - "geostd8_general_ci": 92, - "geostd8_bin": 93, - "latin1_spanish_ci": 94, - "cp932_japanese_ci": 95, - "cp932_bin": 96, - "eucjpms_japanese_ci": 97, - "eucjpms_bin": 98, - "cp1250_polish_ci": 99, - "utf16_unicode_ci": 101, - "utf16_icelandic_ci": 102, - "utf16_latvian_ci": 103, - "utf16_romanian_ci": 104, - "utf16_slovenian_ci": 105, - "utf16_polish_ci": 106, - "utf16_estonian_ci": 107, - "utf16_spanish_ci": 108, - "utf16_swedish_ci": 109, - "utf16_turkish_ci": 110, - "utf16_czech_ci": 111, - "utf16_danish_ci": 112, - "utf16_lithuanian_ci": 113, - "utf16_slovak_ci": 114, - "utf16_spanish2_ci": 115, - "utf16_roman_ci": 116, - "utf16_persian_ci": 117, - "utf16_esperanto_ci": 118, - "utf16_hungarian_ci": 119, - "utf16_sinhala_ci": 120, - "utf16_german2_ci": 121, - "utf16_croatian_ci": 122, - "utf16_unicode_520_ci": 123, - "utf16_vietnamese_ci": 124, - "ucs2_unicode_ci": 128, - "ucs2_icelandic_ci": 129, - "ucs2_latvian_ci": 130, - "ucs2_romanian_ci": 131, - "ucs2_slovenian_ci": 132, - "ucs2_polish_ci": 133, - "ucs2_estonian_ci": 134, - "ucs2_spanish_ci": 135, - "ucs2_swedish_ci": 136, - "ucs2_turkish_ci": 137, - "ucs2_czech_ci": 138, - "ucs2_danish_ci": 139, - "ucs2_lithuanian_ci": 140, - "ucs2_slovak_ci": 141, - "ucs2_spanish2_ci": 142, - "ucs2_roman_ci": 143, - "ucs2_persian_ci": 144, - "ucs2_esperanto_ci": 145, - "ucs2_hungarian_ci": 146, - "ucs2_sinhala_ci": 147, - "ucs2_german2_ci": 148, - "ucs2_croatian_ci": 149, - "ucs2_unicode_520_ci": 150, - "ucs2_vietnamese_ci": 151, - "ucs2_general_mysql500_ci": 159, - "utf32_unicode_ci": 160, - "utf32_icelandic_ci": 161, - "utf32_latvian_ci": 162, - "utf32_romanian_ci": 163, - "utf32_slovenian_ci": 164, - "utf32_polish_ci": 165, - "utf32_estonian_ci": 166, - "utf32_spanish_ci": 167, - "utf32_swedish_ci": 168, - "utf32_turkish_ci": 169, - "utf32_czech_ci": 170, - "utf32_danish_ci": 171, - "utf32_lithuanian_ci": 172, - "utf32_slovak_ci": 173, - "utf32_spanish2_ci": 174, - "utf32_roman_ci": 175, - "utf32_persian_ci": 176, - "utf32_esperanto_ci": 177, - "utf32_hungarian_ci": 178, - "utf32_sinhala_ci": 179, - "utf32_german2_ci": 180, - "utf32_croatian_ci": 181, - "utf32_unicode_520_ci": 182, - "utf32_vietnamese_ci": 183, - "utf8_unicode_ci": 192, - "utf8_icelandic_ci": 193, - "utf8_latvian_ci": 194, - "utf8_romanian_ci": 195, - "utf8_slovenian_ci": 196, - "utf8_polish_ci": 197, - "utf8_estonian_ci": 198, - "utf8_spanish_ci": 199, - "utf8_swedish_ci": 200, - "utf8_turkish_ci": 201, - "utf8_czech_ci": 202, - "utf8_danish_ci": 203, - "utf8_lithuanian_ci": 204, - "utf8_slovak_ci": 205, - "utf8_spanish2_ci": 206, - "utf8_roman_ci": 207, - "utf8_persian_ci": 208, - "utf8_esperanto_ci": 209, - "utf8_hungarian_ci": 210, - "utf8_sinhala_ci": 211, - "utf8_german2_ci": 212, - "utf8_croatian_ci": 213, - "utf8_unicode_520_ci": 214, - "utf8_vietnamese_ci": 215, - "utf8_general_mysql500_ci": 223, - "utf8mb4_unicode_ci": 224, - "utf8mb4_icelandic_ci": 225, - "utf8mb4_latvian_ci": 226, - "utf8mb4_romanian_ci": 227, - "utf8mb4_slovenian_ci": 228, - "utf8mb4_polish_ci": 229, - "utf8mb4_estonian_ci": 230, - "utf8mb4_spanish_ci": 231, - "utf8mb4_swedish_ci": 232, - "utf8mb4_turkish_ci": 233, - "utf8mb4_czech_ci": 234, - "utf8mb4_danish_ci": 235, - "utf8mb4_lithuanian_ci": 236, - "utf8mb4_slovak_ci": 237, - "utf8mb4_spanish2_ci": 238, - "utf8mb4_roman_ci": 239, - "utf8mb4_persian_ci": 240, - "utf8mb4_esperanto_ci": 241, - "utf8mb4_hungarian_ci": 242, - "utf8mb4_sinhala_ci": 243, - "utf8mb4_german2_ci": 244, - "utf8mb4_croatian_ci": 245, - "utf8mb4_unicode_520_ci": 246, - "utf8mb4_vietnamese_ci": 247, -} - -// A blacklist of collations which is unsafe to interpolate parameters. -// These multibyte encodings may contains 0x5c (`\`) in their trailing bytes. -var unsafeCollations = map[byte]bool{ - 1: true, // big5_chinese_ci - 13: true, // sjis_japanese_ci - 28: true, // gbk_chinese_ci - 84: true, // big5_bin - 86: true, // gb2312_bin - 87: true, // gbk_bin - 88: true, // sjis_bin - 95: true, // cp932_japanese_ci - 96: true, // cp932_bin -} diff --git a/_vendor/src/github.com/pingcap/mysqlx-driver/config.go b/_vendor/src/github.com/pingcap/mysqlx-driver/config.go deleted file mode 100644 index 082529ac99d05..0000000000000 --- a/_vendor/src/github.com/pingcap/mysqlx-driver/config.go +++ /dev/null @@ -1,36 +0,0 @@ -// A Go driver for the MySQL X protocol for Go's database/sql package -// Based heavily on: -// Go MySQL Driver - A MySQL-Driver for Go's database/sql package -// -// Copyright 2014 The Go-MySQL-Driver Authors. All rights reserved. -// Copyright 2016 Simon J Mudd. -// -// 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 mysql - -import ( - "crypto/tls" - "time" -) - -type config struct { - user string - passwd string - net string - addr string - dbname string - params map[string]string - loc *time.Location - tls *tls.Config - timeout time.Duration - collation uint8 - allowAllFiles bool - allowOldPasswords bool - allowCleartextPasswords bool - columnsWithAlias bool - interpolateParams bool - useXProtocol bool // use X protocol rather than native protocol -} diff --git a/_vendor/src/github.com/pingcap/mysqlx-driver/connection.go b/_vendor/src/github.com/pingcap/mysqlx-driver/connection.go deleted file mode 100644 index 919d12a289e1b..0000000000000 --- a/_vendor/src/github.com/pingcap/mysqlx-driver/connection.go +++ /dev/null @@ -1,397 +0,0 @@ -// A Go driver for the MySQL X protocol for Go's database/sql package -// Based heavily on: -// Go MySQL Driver - A MySQL-Driver for Go's database/sql package -// -// Copyright 2012 The Go-MySQL-Driver Authors. All rights reserved. -// Copyright 2016 Simon J Mudd. -// -// 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 mysql - -import ( - "database/sql/driver" - "fmt" - "net" - "strings" - - log "github.com/Sirupsen/logrus" - "github.com/golang/protobuf/proto" - "github.com/juju/errors" - "github.com/pingcap/tipb/go-mysqlx" - "github.com/pingcap/tipb/go-mysqlx/Datatypes" - "github.com/pingcap/tipb/go-mysqlx/Resultset" - "github.com/pingcap/tipb/go-mysqlx/Sql" -) - -type mysqlXConn struct { - buf buffer // raw bytes pulled in from network - pb *netProtobuf // holds a possible protobuf message that still needs processing - netConn net.Conn - affectedRows uint64 - insertID uint64 - cfg *xconfig - maxPacketAllowed int - maxWriteSize int - parseTime bool - strict bool - state queryState - capabilities ServerCapabilities - systemVariable []byte -} - -func (mc *mysqlXConn) capabilityTestUnknownCapability() error { - name := "randomCapability" - return mc.setScalarBoolCapability(name, true) -} - -// second stage of the open once the driver has been selecteed -func (mc *mysqlXConn) Open2() (driver.Conn, error) { - var err error - // Connect to Server - if dial, ok := dials[mc.cfg.net]; ok { - mc.netConn, err = dial(mc.cfg.addr) - } else { - nd := net.Dialer{Timeout: mc.cfg.timeout} - mc.netConn, err = nd.Dial(mc.cfg.net, mc.cfg.addr) - } - if err != nil { - return nil, errors.Trace(err) - } - - // Enable TCP Keepalives on TCP connections - if tc, ok := mc.netConn.(*net.TCPConn); ok { - if err = tc.SetKeepAlive(true); err != nil { - // Don't send COM_QUIT before handshake. - if err = mc.netConn.Close(); err != nil { - return nil, errors.Trace(err) - } - mc.netConn = nil - return nil, errors.Trace(err) - } - } - - mc.buf = newBuffer(mc.netConn) - - // could/should be optional for performance? e.g. dsn has get_capabilities=0 - if err = mc.getCapabilities(); err != nil { - return nil, errors.Trace(err) - } - - if !mc.capabilities.Exists("authentication.mechanisms") { - return nil, errors.Errorf("mysqlXConn.Open2: did not find capability: authentication.mechanisms") - } - - // Current known capabilities: as of 5.7.14 - // "tls" (scalar string) only visible if TLS is configured - // "authentication.mechanisms" (array string) - // "doc.formats" (scalar string) - // "node_type" (scalar string) - // "plugin.version" (scalar string) - // "client.pwd_expire_ok" (scalar bool) - - // Check and use the first one we can. SHOULD prioritise. - values := mc.capabilities.Values("authentication.mechanisms") - - found := false - for i := range values { - if values[i].String() == "MYSQL41" { - found = true - if err = mc.AuthenticateMySQL41(); err != nil { - return nil, errors.Trace(err) - } - break - } - } - if !found { - return nil, errors.Errorf("mysqlXConn.Open2: could not find authentication.mechanism I can deal with. Found: %+v", values) - } - - // // Get max allowed packet size - // maxap, err := mc.getSystemVar("mysqlx_max_allowed_packet") // NOT THE SAME AS max_allowed_packet !! - // if err != nil { - // mc.Close() - // return nil, err - // } - // mc.maxPacketAllowed = stringToInt(maxap) - 1 - // if mc.maxPacketAllowed < maxPacketSize { - // mc.maxWriteSize = mc.maxPacketAllowed - // } - - // Handle DSN Params - err = mc.handleParams() - if err != nil { - if err = mc.Close(); err != nil { - return nil, errors.Trace(err) - } - return nil, errors.Trace(err) - } - - return mc, nil -} - -// Gets the value of the given MySQL System Variable -// FIXME FIXME FIXME -// - Note this is broken as we need to send a normal SQL statement to get the values. -// - Currently returning a constant to the client which is of course wrong. -// FIXME FIXME FIXME -func (mc *mysqlXConn) getSystemVar(name string) ([]byte, error) { - - // Required steps are: - // - Send command "SELECT @@"+name) - // - check the values - // - return them - - if name == "mysqlx_max_allowed_packet" { - // hard-coded: should not be FIXME FIXME - response := "1048576" - return []byte(response), nil - } - - return nil, errors.Errorf("mysqlXConn.getSystemVar(%s) not implemented", name) -} - -// Handles parameters set in DSN after the connection is established -func (mc *mysqlXConn) handleParams() (err error) { - for param, val := range mc.cfg.params { - switch param { - // Charset - case "charset": - // is this a code bug in upstream go-sql-drivers/mysql ? - // not quite sure why we might want to set more than one charset here. - charsets := strings.Split(val, ",") - for i := range charsets { - // ignore errors here - a charset may not exist - err = mc.exec("SET NAMES "+charsets[i], nil) - if err == nil { - break - } - } - if err != nil { - return - } - - // time.Time parsing - case "parseTime": - var isBool bool - mc.parseTime, isBool = readBool(val) - if !isBool { - return errors.New("Invalid Bool value: " + val) - } - - // Strict mode - case "strict": - var isBool bool - mc.strict, isBool = readBool(val) - if !isBool { - return errors.New("Invalid Bool value: " + val) - } - - // Compression - case "compress": - err = errors.New("Compression not implemented yet") - return - - // TLS - case "tls": - // FIXME FIXME FIXME - // - // not sure about order and handling of TLS - // - do we try to go into TLS mode first? - // - do we go into TLS mode at the point that we process the parameter options? - // - do we go into TLS mode at the end of processing parameters, having remembered that we want to use TLS mode? - // - it may make sense to go into TLS mode early but that changes logic etc. - // - // FIXME FIXME FIXME - - // check if the server has advertised tls capabilities - if !mc.capabilities.Exists("tls") { - return errors.New("Server does not support TLS") - } - tls := mc.capabilities.Values("tls") - if len(tls) == 1 { - return errors.Errorf("server tls capability returns unexpected result: len(tls) = %d, expecting 1", len(tls)) - } - tlsType := tls[0].Type() - if tlsType != "bool" { - return errors.Errorf("server tls capability type unexpected: %s, expecting bool", tlsType) - } - tlsValue := tls[0].Bool() - - // Setup or check the magic TLS config here - // - should have been done by the app before - - // Tell the server we want to go in TLS mode. - if err = mc.setScalarBoolCapability("tls", tlsValue); err != nil { - return errors.Trace(err) - } - // wait for OK back and if we get it then we go into TLS mode - - // System Vars - default: - err = mc.exec("SET "+param+"="+val+"", nil) - if err != nil { - return - } - } - } - return -} - -// Internal function to execute commands when we don't expect a resultset -// e.g. for sending commands. -func (mc *mysqlXConn) exec(query string, args []driver.Value) error { - - // Should be able to use normal "query logic" here - rows, err := mc.Query(query, args) - if err != nil { - return errors.Trace(err) - } - - // close the rows and handle any response packets received - return rows.Close() -} - -// methods needed to make things work -func (mc *mysqlXConn) Begin() (driver.Tx, error) { - log.Info("Use begin.") - return nil, errors.Errorf("cannot use 'begin', mysqlXConn does not support transaction") -} - -// close the connection -func (mc *mysqlXConn) Close() error { - log.Info("Closing connection.") - if mc.netConn == nil { - return nil - } - - // we don't handle in mc that we are dealing with a query. If we are we need to drain the input. - - // send this message - if err := mc.writeClose(); err != nil { - return errors.Trace(err) - } - - // wait for Ok or Error, and ignore others - var err error - var pb *netProtobuf - done := false - for !done { - pb, err = mc.readMsg() - if err != nil { - return errors.Trace(err) - } - - switch Mysqlx.ServerMessages_Type(pb.msgType) { - case Mysqlx.ServerMessages_OK: - // show any message - ok := new(Mysqlx.Ok) - if err = proto.Unmarshal(pb.payload, ok); err != nil { - return errors.Trace(err) - } - done = true - case Mysqlx.ServerMessages_ERROR: - return errors.Trace(err) - case Mysqlx.ServerMessages_NOTICE: - // process the notice message - if err = mc.processNotice("mysqlXConn.Close()"); err != nil { - return errors.Trace(err) - } - } - } - - if err = mc.netConn.Close(); err != nil { - return errors.Trace(err) - } - mc.netConn = nil - return nil -} - -func (mc *mysqlXConn) Prepare(query string) (driver.Stmt, error) { - log.Infof("Query: %d", query) - return nil, errors.Errorf("Prepare statement '%s' error. mysqlXConn dose not support prepare.", query) -} - -func (mc *mysqlXConn) Exec(query string, args []driver.Value) (driver.Result, error) { - log.Infof("Query: %d", query) - mc.affectedRows = 0 - mc.insertID = 0 - if err := mc.exec(query, args); err != nil { - return nil, errors.Trace(err) - } - return &mysqlResult{ - affectedRows: int64(mc.affectedRows), - insertID: int64(mc.insertID), - }, nil -} - -// Query is the public interface to making a query via database/sql -func (mc *mysqlXConn) Query(query string, args []driver.Value) (driver.Rows, error) { - log.Infof("Query: %d", query) - if mc.netConn == nil { - return nil, driver.ErrBadConn - } - - nameSpace := "sql" - var stmtArgs []*Mysqlx_Datatypes.Any - if len(args) > 0 { - str, ok := args[0].(string) - if ok { - nameSpace = str - } - for i := 1; i < len(args); i++ { - var any Mysqlx_Datatypes.Any - switch v := args[i].(type) { - case string: - any = setString([]byte(v)) - case int: - any = setUint(uint64(v)) - default: - continue - } - stmtArgs = append(stmtArgs, &any) - } - } - - stmtExecute := &Mysqlx_Sql.StmtExecute{ - Namespace: &nameSpace, - Stmt: []byte(query), - Args: stmtArgs, - } - - // write a StmtExecute packet with the given query to the network - // - we DO NOT process the result as this will be done later. - if err := mc.writeStmtExecute(stmtExecute); err != nil { - return nil, errors.Trace(err) - } - - // return the iterator - return &mysqlXRows{ - columns: nil, // be explicit about expectations - err: nil, // be explicit about expectations - mc: mc, - state: queryStateWaitingColumnMetaData, - }, nil -} - -func printableColumnMetaData(pb *netProtobuf) string { - p := new(Mysqlx_Resultset.ColumnMetaData) - if err := proto.Unmarshal(pb.payload, p); err != nil { - log.Fatalf("error unmarshaling ColumnMetaData p: %v", err) - } - - return fmt.Sprintf("Type: %v, Name: %q, OriginalName: %q, Table: %q, Schema: %q, Catalog: %q, Collation: %v, FractionalDigits: %v, Length: %v, Flags: %v, ContentType: %v", - p.GetType(), - string(p.GetName()), - string(p.GetOriginalName()), - string(p.GetTable()), - string(p.GetSchema()), - string(p.GetCatalog()), - p.GetCollation(), - p.GetFractionalDigits(), - p.GetLength(), - p.GetFlags(), - p.GetContentType()) -} diff --git a/_vendor/src/github.com/pingcap/mysqlx-driver/const.go b/_vendor/src/github.com/pingcap/mysqlx-driver/const.go deleted file mode 100644 index 275d0d4db088c..0000000000000 --- a/_vendor/src/github.com/pingcap/mysqlx-driver/const.go +++ /dev/null @@ -1,157 +0,0 @@ -// A Go driver for the MySQL X protocol for Go's database/sql package -// Based heavily on: -// Go MySQL Driver - A MySQL-Driver for Go's database/sql package -// -// Copyright 2012 The Go-MySQL-Driver Authors. All rights reserved. -// Copyright 2016 Simon J Mudd. -// -// 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 mysql - -const ( - maxPacketSize = 1<<32 - 1 // adjusted for X protocol - minPacketSize = 1 // adjusted for X protocol, see http://bugs.mysql.com/82862 - timeFormat = "2006-01-02 15:04:05.999999" -) - -// MySQL constants documentation: -// http://dev.mysql.com/doc/internals/en/client-server-protocol.html -// https://dev.mysql.com/doc/internals/en/capability-flags.html#packet-Protocol::CapabilityFlags -type clientFlag uint32 - -const ( - clientLongPassword clientFlag = 1 << iota - clientFoundRows - clientLongFlag - clientConnectWithDB - clientNoSchema - clientCompress - clientODBC - clientLocalFiles - clientIgnoreSpace - clientProtocol41 - clientInteractive - clientSSL - clientIgnoreSIGPIPE - clientTransactions - clientReserved - clientSecureConn - clientMultiStatements - clientMultiResults - clientPSMultiResults - clientPluginAuth - clientConnectAttrs - clientPluginAuthLenEncClientData - clientCanHandleExpiredPasswords - clientSessionTrack - clientDeprecateEOF -) - -const ( - comQuit byte = iota + 1 - comInitDB - comQuery - comFieldList - comCreateDB - comDropDB - comRefresh - comShutdown - comStatistics - comProcessInfo - comConnect - comProcessKill - comDebug - comPing - comTime - comDelayedInsert - comChangeUser - comBinlogDump - comTableDump - comConnectOut - comRegisterSlave - comStmtPrepare - comStmtExecute - comStmtSendLongData - comStmtClose - comStmtReset - comSetOption - comStmtFetch -) - -// https://dev.mysql.com/doc/internals/en/com-query-response.html#packet-Protocol::ColumnType -const ( - fieldTypeDecimal byte = iota - fieldTypeTiny - fieldTypeShort - fieldTypeLong - fieldTypeFloat - fieldTypeDouble - fieldTypeNULL - fieldTypeTimestamp - fieldTypeLongLong - fieldTypeInt24 - fieldTypeDate - fieldTypeTime - fieldTypeDateTime - fieldTypeYear - fieldTypeNewDate - fieldTypeVarChar - fieldTypeBit -) -const ( - fieldTypeNewDecimal byte = iota + 0xf6 - fieldTypeEnum - fieldTypeSet - fieldTypeTinyBLOB - fieldTypeMediumBLOB - fieldTypeLongBLOB - fieldTypeBLOB - fieldTypeVarString - fieldTypeString - fieldTypeGeometry -) - -type fieldFlag uint16 - -const ( - flagNotNULL fieldFlag = 1 << iota - flagPriKey - flagUniqueKey - flagMultipleKey - flagBLOB - flagUnsigned - flagZeroFill - flagBinary - flagEnum - flagAutoIncrement - flagTimestamp - flagSet - flagUnknown1 - flagUnknown2 - flagUnknown3 - flagUnknown4 -) - -// http://dev.mysql.com/doc/internals/en/status-flags.html -type statusFlag uint16 - -const ( - statusInTrans statusFlag = 1 << iota - statusInAutocommit - statusReserved // Not in documentation - statusMoreResultsExists - statusNoGoodIndexUsed - statusNoIndexUsed - statusCursorExists - statusLastRowSent - statusDbDropped - statusNoBackslashEscapes - statusMetadataChanged - statusQueryWasSlow - statusPsOutParams - statusInTransReadonly - statusSessionStateChanged -) diff --git a/_vendor/src/github.com/pingcap/mysqlx-driver/convert.go b/_vendor/src/github.com/pingcap/mysqlx-driver/convert.go deleted file mode 100644 index 2b22645b6c2c7..0000000000000 --- a/_vendor/src/github.com/pingcap/mysqlx-driver/convert.go +++ /dev/null @@ -1,110 +0,0 @@ -// Go driver for MySQL X Protocol -// -// Copyright 2016 Simon J Mudd. -// -// 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/. -// -// MySQL X protocol authentication using MYSQL41 method - -package mysql - -import ( - "database/sql/driver" - "encoding/binary" - "math" - - "github.com/golang/protobuf/proto" - "github.com/juju/errors" - "github.com/pingcap/tipb/go-mysqlx/Resultset" -) - -// decodeZigzag64 reads a zigzag-encoded 64-bit integer -// from the Buffer. -// This is the format used for the sint64 protocol buffer type. -func decodeZigzag64(x uint64) int64 { - x = (x >> 1) ^ uint64((int64(x&1)<<63)>>63) - return int64(x) -} - -// MySQL signed int to int64 -func mysqlSintToInt(data []byte) (signed int64, e error) { - myint, num := proto.DecodeVarint(data) - if num == 0 { - e = errors.Errorf("Unable to decode '%x' as varint", data) - } - signed = decodeZigzag64(myint) - return signed, e -} - -// MySQL unsigned signed int to uint64 -func mysqlUintToUint(data []byte) (unsigned uint64, e error) { - unsigned, num := proto.DecodeVarint(data) - if num == 0 { - e = errors.Errorf("Unable to decode '% x' as varint. unsigned: %+v", data, unsigned) - } - return unsigned, e -} - -// MySQL float to float32 -func mysqlFloatToFloat32(data []byte) (float32, error) { - f := math.Float32frombits(binary.LittleEndian.Uint32(data[:])) - return f, nil -} - -// MySQL double to float64 -func mysqlDoubleToFloat64(data []byte) (float64, error) { - f := math.Float64frombits(binary.LittleEndian.Uint64(data[:])) - return f, nil -} - -// MySQL char/binary. The trailing \x00 needs to be removed. -func mysqlBytesToBytes(data []byte) ([]byte, error) { - // 012345 - // ABCDEF\x00 (len 7) - dest := data[0 : len(data)-1] // not copying to avoid overhead (is this ok?), just using a shorter slice - return dest, nil -} - -// for handling stuff we haven't done yet. Should become obsolete as I finish the code... -func noConversion(typeName string, data []byte) ([]byte, error) { - dest := data - return dest[0 : len(data)-1], nil // chop off last character -} - -// Handle the conversion from the MysQL type to the driver type -func convertColumnData(column *Mysqlx_Resultset.ColumnMetaData, data []byte) (dest driver.Value, e error) { - - // We don't expect data to be nil. Probably a bug? - if data == nil { - return nil, errors.Errorf("convertColumnData: data == nil. Unexpected. Returning dest = nil") - } - // An empty slice implies NULL - if len(data) == 0 { - return nil, nil - } - - // If we get this far we have non NULL values. - switch column.GetType() { - case Mysqlx_Resultset.ColumnMetaData_SINT: - return mysqlSintToInt(data) - case Mysqlx_Resultset.ColumnMetaData_UINT: - return mysqlUintToUint(data) - case Mysqlx_Resultset.ColumnMetaData_DOUBLE: - return mysqlDoubleToFloat64(data) - case Mysqlx_Resultset.ColumnMetaData_BYTES: - return mysqlBytesToBytes(data) - case Mysqlx_Resultset.ColumnMetaData_FLOAT: - return mysqlFloatToFloat32(data) - // ColumnMetaData_BYTES ColumnMetaData_FieldType = 7 - // ColumnMetaData_TIME ColumnMetaData_FieldType = 10 - // ColumnMetaData_DATETIME ColumnMetaData_FieldType = 12 - // ColumnMetaData_SET ColumnMetaData_FieldType = 15 - // ColumnMetaData_ENUM ColumnMetaData_FieldType = 16 - // ColumnMetaData_BIT ColumnMetaData_FieldType = 17 - // ColumnMetaData_DECIMAL ColumnMetaData_FieldType = 18 - default: - return noConversion("BYTES", data) - } -} diff --git a/_vendor/src/github.com/pingcap/mysqlx-driver/datatypes.go b/_vendor/src/github.com/pingcap/mysqlx-driver/datatypes.go deleted file mode 100644 index 711f3ec5048f0..0000000000000 --- a/_vendor/src/github.com/pingcap/mysqlx-driver/datatypes.go +++ /dev/null @@ -1,69 +0,0 @@ -// Go driver for MySQL X Protocol -// -// Copyright 2016 Simon J Mudd. -// -// 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/. -// -// MySQL X protocol authentication using MYSQL41 method - -package mysql - -// This file holds information about the XPROTOCOL datatypes - -import ( - "fmt" - "strings" - - log "github.com/Sirupsen/logrus" - "github.com/pingcap/tipb/go-mysqlx/Datatypes" -) - -func printableScalar(s *Mysqlx_Datatypes.Scalar) string { - t := s.GetType() - switch t { - case Mysqlx_Datatypes.Scalar_V_STRING: - v := s.GetVString() - return fmt.Sprintf("%s: value: %q (collation: %d)", t.String(), string(v.Value), v.GetCollation()) - case Mysqlx_Datatypes.Scalar_V_BOOL: - b := s.GetVBool() - return fmt.Sprintf("%s: value: %v", t.String(), b) - default: - return fmt.Sprintf("UNKNOWN SCALAR: %s", t.String()) - } -} - -// recursive ... -func printableArray(s *Mysqlx_Datatypes.Array) string { - results := []string{} - for i := range s.GetValue() { - results = append(results, printableDatatype(s.GetValue()[i])) - } - return strings.Join(results, ", ") -} - -func printableObj(d *Mysqlx_Datatypes.Object) string { - results := []string{} - for i := range d.GetFld() { - results = append(results, d.GetFld()[i].String()) // should later split to k/v pairs - } - return strings.Join(results, ", ") -} - -func printableDatatype(d *Mysqlx_Datatypes.Any) string { - // figure out the type and show it. - t := d.GetType() - s := fmt.Sprintf("Type: %+v", t) - switch t { - case Mysqlx_Datatypes.Any_SCALAR: - s = fmt.Sprintf("Scalar: %s", printableScalar(d.GetScalar())) - case Mysqlx_Datatypes.Any_OBJECT: - s = fmt.Sprintf("Object: %s", printableObj(d.GetObj())) - case Mysqlx_Datatypes.Any_ARRAY: - s = fmt.Sprintf("Array: %s", printableArray(d.GetArray())) - default: - log.Fatalf("Unexpected datatype %+v", t) - } - return s -} diff --git a/_vendor/src/github.com/pingcap/mysqlx-driver/driver.go b/_vendor/src/github.com/pingcap/mysqlx-driver/driver.go deleted file mode 100644 index bc00aed876a63..0000000000000 --- a/_vendor/src/github.com/pingcap/mysqlx-driver/driver.go +++ /dev/null @@ -1,64 +0,0 @@ -// Go driver for MySQL X Protocol -// -// Copyright 2016 Simon J Mudd. -// -// 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/. -// -// MySQL X protocol authentication using MYSQL41 method - -package mysql - -import ( - "database/sql" - "database/sql/driver" - "net" - - log "github.com/Sirupsen/logrus" - "github.com/juju/errors" -) - -// XDriver is exported to make the driver directly accessible. -// In general the driver is used via the database/sql package. -type XDriver struct{} - -// DialFunc is a function which can be used to establish the network connection. -// Custom dial functions must be registered with RegisterDial -type DialFunc func(addr string) (net.Conn, error) - -var dials map[string]DialFunc - -// RegisterDial registers a custom dial function. It can then be used by the -// network address mynet(addr), where mynet is the registered new network. -// addr is passed as a parameter to the dial function. -func RegisterDial(net string, dial DialFunc) { - if dials == nil { - dials = make(map[string]DialFunc) - } - dials[net] = dial -} - -// Open implements database driver Open() -func (d XDriver) Open(dsn string) (driver.Conn, error) { - log.Infof("Opening dsn: %s", dsn) - var err error - cfg, err := parseDSN(dsn) - if err != nil { - return nil, errors.Trace(err) - } - cfg.useXProtocol = true // force X protocol as this driver was called explicitly - - // New mysqlConn - mc := &mysqlXConn{ - capabilities: newServerCapabilities(), - cfg: newXconfigFromConfig(cfg), - maxPacketAllowed: maxPacketSize, - maxWriteSize: maxPacketSize - 1, - } - return mc.Open2() -} - -func init() { - sql.Register("mysql/xprotocol", &XDriver{}) -} diff --git a/_vendor/src/github.com/pingcap/mysqlx-driver/errors.go b/_vendor/src/github.com/pingcap/mysqlx-driver/errors.go deleted file mode 100644 index fa9c92a2aed79..0000000000000 --- a/_vendor/src/github.com/pingcap/mysqlx-driver/errors.go +++ /dev/null @@ -1,28 +0,0 @@ -// Go MySQL Driver - A MySQL-Driver for Go's database/sql package -// -// Copyright 2013 The Go-MySQL-Driver Authors. 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 mysql - -import ( - "github.com/juju/errors" -) - -// Various errors the driver might return. Can change between driver versions. -var ( - ErrInvalidConn = errors.New("Invalid Connection") - ErrMalformPkt = errors.New("Malformed Packet") - ErrNoTLS = errors.New("TLS encryption requested but server does not support TLS") - ErrOldPassword = errors.New("This user requires old password authentication. If you still want to use it, please add 'allowOldPasswords=1' to your DSN. See also https://github.com/go-sql-driver/mysql/wiki/old_passwords") - ErrCleartextPassword = errors.New("This user requires clear text authentication. If you still want to use it, please add 'allowCleartextPasswords=1' to your DSN") - ErrUnknownPlugin = errors.New("The authentication plugin is not supported") - ErrOldProtocol = errors.New("MySQL-Server does not support required Protocol 41+") - ErrPktSync = errors.New("Commands out of sync. You can't run this command now") - ErrPktSyncMul = errors.New("Commands out of sync. Did you run multiple statements at once?") - ErrPktTooLarge = errors.New("Packet for query is too large. You can change this value on the server by adjusting the 'max_allowed_packet' variable") - ErrBusyBuffer = errors.New("Busy buffer") -) diff --git a/_vendor/src/github.com/pingcap/mysqlx-driver/mysql41.go b/_vendor/src/github.com/pingcap/mysqlx-driver/mysql41.go deleted file mode 100644 index c1886c44472b6..0000000000000 --- a/_vendor/src/github.com/pingcap/mysqlx-driver/mysql41.go +++ /dev/null @@ -1,110 +0,0 @@ -// Go driver for MySQL X Protocol -// -// Copyright 2016 Simon J Mudd. -// -// 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/. -// -// MySQL X protocol authentication using MYSQL41 method - -package mysql - -import ( - "crypto/sha1" - "fmt" - "io" - - log "github.com/Sirupsen/logrus" - "github.com/juju/errors" -) - -// MySQL41 manages the MySQL41 authentication protocol -type MySQL41 struct { - dbname string - name string - username string - password string -} - -// NewMySQL41 returns a pointer to an initialised MySQL41 struct -func NewMySQL41(dbname, username, password string) *MySQL41 { - if username == "" { - return nil - } - m := MySQL41{ - name: "MYSQL41", - username: username, - password: password, - dbname: dbname, - } - return &m -} - -// generate the input of some bytes and return the SHA1 sum -func mysha1(someBytes []byte) []byte { - s1 := sha1.Sum(someBytes) - // convert from [20]byte to slice - return s1[:] -} - -func xor(buf1, buf2 []byte) []byte { - if len(buf1) != len(buf2) { - log.Fatal("xor: length of both buffers has to be identical") - } - res := make([]byte, len(buf1)) - for i := range buf1 { - res[i] = buf1[i] ^ buf2[i] - } - return res -} - -// Name returns the name of the authentication method -func (p *MySQL41) Name() string { - return p.name -} - -// GetInitialAuthData returns any initial authentication data -func (p *MySQL41) GetInitialAuthData() []byte { - return nil -} - -func (p *MySQL41) scramble(scramble []byte) []byte { - buf1 := mysha1([]byte(p.password)) - buf2 := mysha1(buf1) - - s := sha1.New() - if _, err := io.WriteString(s, string(scramble)); err != nil { - panic(err) - } - if _, err := io.WriteString(s, string(buf2)); err != nil { - panic(err) - } - tmpBuffer := s.Sum(nil) - - return xor(buf1, tmpBuffer) -} - -// GetNextAuthData returns data db + name + encrypted hash -func (p *MySQL41) GetNextAuthData(serverData []byte) ([]byte, error) { - if len(serverData) != 20 { - return nil, errors.Errorf("Scramble buffer had invalid length - expected 20 bytes, got %d", len(serverData)) - } - - // docs are not clear but this is where you prepend the dbname - retval := p.dbname + "\x00" + p.username + "\x00" // gives us len(username) + 2 - - // return the string as needed (no password) - if len(p.password) == 0 { - return []byte(retval), nil - } - - pass := p.scramble(serverData) - - retval += "*" - for i := range pass { - retval += fmt.Sprintf("%02x", byte(pass[i])) - } - - return []byte(retval), nil -} diff --git a/_vendor/src/github.com/pingcap/mysqlx-driver/protocol.go b/_vendor/src/github.com/pingcap/mysqlx-driver/protocol.go deleted file mode 100644 index e474963b58964..0000000000000 --- a/_vendor/src/github.com/pingcap/mysqlx-driver/protocol.go +++ /dev/null @@ -1,672 +0,0 @@ -// Go driver for MySQL X Protocol -// Based heavily on Go MySQL Driver - A MySQL-Driver for Go's database/sql package -// -// Copyright 2012 The Go-MySQL-Driver Authors. All rights reserved. -// Copyright 2016 Simon J Mudd. -// -// 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 mysql - -import ( - "database/sql/driver" - "fmt" - - log "github.com/Sirupsen/logrus" - "github.com/golang/protobuf/proto" - "github.com/juju/errors" - "github.com/pingcap/tipb/go-mysqlx" - "github.com/pingcap/tipb/go-mysqlx/Connection" - "github.com/pingcap/tipb/go-mysqlx/Datatypes" - "github.com/pingcap/tipb/go-mysqlx/Notice" - "github.com/pingcap/tipb/go-mysqlx/Session" - "github.com/pingcap/tipb/go-mysqlx/Sql" -) - -var ( - // this seems not to be defined in the protobuf specification - mysqlxNoticeTypeName = map[uint32]string{ - 1: "Warning", - 2: "SessionVariableChanged", - 3: "SessionStateChanged", - } -) - -// netProtobuf holds the protobuf message type and the network bytes from a protobuf message -// - see docs at .... -type netProtobuf struct { - msgType int - payload []byte -} - -// Read a raw netProtobuf packet from the network and return a pointer to the structure -func (mc *mysqlXConn) readMsg() (*netProtobuf, error) { - // Read packet header - data, err := mc.buf.readNext(4) - if err != nil { - if err = mc.Close(); err != nil { - return nil, errors.Trace(err) - } - return nil, driver.ErrBadConn - } - - // Packet Length [32 bit] - pktLen := int(uint32(data[0]) | uint32(data[1])<<8 | uint32(data[2])<<16 | uint32(data[3])<<24) - - if pktLen < minPacketSize { - if err = mc.Close(); err != nil { - return nil, errors.Trace(err) - } - return nil, driver.ErrBadConn - } - - // Read body which is 1-byte msg type and 0+ bytes payload - data, err = mc.buf.readNext(pktLen) - if err != nil { - if err := mc.Close(); err != nil { - return nil, errors.Trace(err) - } - return nil, driver.ErrBadConn - } - - pb := &netProtobuf{ - msgType: int(data[0]), - } - if len(data) > 1 { - pb.payload = data[1:] - } - - return pb, nil -} - -// Write packet buffer 'data' -func (mc *mysqlXConn) writeProtobufPacket(pb *netProtobuf) error { - if pb == nil || pb.msgType > 255 { - if err := mc.Close(); err != nil { - return errors.Trace(err) - } - return ErrMalformPkt - } - - pktLen := len(pb.payload) + 1 - - if pktLen > mc.maxPacketAllowed { - return ErrPktTooLarge - } - - // setup initial header - data := make([]byte, 5) - - var size int - data[0] = byte(pktLen) - data[1] = byte(pktLen >> 8) - data[2] = byte(pktLen >> 16) - data[3] = byte(pktLen >> 24) - data[4] = byte(pb.msgType) - size = pktLen - 1 - - // Write header - n, err := mc.netConn.Write(data) - if err != nil { - return errors.Trace(err) - } else if n != 5 { - return errors.Errorf("Expect write 5 bytes but write %d bytes", n) - } - - // Write payload - n, err = mc.netConn.Write(pb.payload) - if err != nil { - return errors.Trace(err) - } else if n != size { - return errors.Errorf("Expect write %d bytes but write %d bytes", size, n) - } - return nil -} - -/****************************************************************************** -* Initialisation Process * -******************************************************************************/ - -// helper function - check this is a a scalar type -func isScalar(value *Mysqlx_Datatypes.Any) bool { - return value != nil && *value.Type == Mysqlx_Datatypes.Any_SCALAR -} - -// helper function - check this is a scalar VString -func isScalarString(value *Mysqlx_Datatypes.Any) bool { - return value != nil && *value.Type == Mysqlx_Datatypes.Any_SCALAR && *value.Scalar.Type == Mysqlx_Datatypes.Scalar_V_STRING -} - -// helper function - check this is a a scalar VBool -func isScalarBool(value *Mysqlx_Datatypes.Any) bool { - return value != nil && *value.Type == Mysqlx_Datatypes.Any_SCALAR && *value.Scalar.Type == Mysqlx_Datatypes.Scalar_V_BOOL -} - -// helper function - return the scalar VString as a string -func scalarString(value *Mysqlx_Datatypes.Any) string { - if !isScalarString(value) { - return "" - } - return string(value.Scalar.VString.Value) -} - -// helper function - return the scalar VBool as a bool -func scalarBool(value *Mysqlx_Datatypes.Any) bool { - if !isScalarBool(value) { - return false - } - return bool(*value.Scalar.VBool) -} - -// helper function - check this is an array of VString -func isArrayString(value *Mysqlx_Datatypes.Any) bool { - if value == nil { - return false - } - if value.GetType() != Mysqlx_Datatypes.Any_ARRAY { - return false - } - for i := range value.GetArray().GetValue() { - if value.GetArray().GetValue()[i].GetType() != Mysqlx_Datatypes.Any_SCALAR { - return false - } - if value.GetArray().GetValue()[i].GetScalar().GetType() != Mysqlx_Datatypes.Scalar_V_STRING { - return false - } - } - - return true -} - -// helper function - return the array of scalar VString as a []string -func arrayString(value *Mysqlx_Datatypes.Any) []string { - if !isArrayString(value) { - return nil - } - values := []string{} - - for i := range value.GetArray().GetValue() { - values = append(values, scalarString(value.GetArray().GetValue()[i])) - } - - return values -} - -// Request the getCapabilities -// see: http://..... -func (mc *mysqlXConn) getCapabilities() error { - - if err := mc.writeConnCapabilitiesGet(); err != nil { - return errors.Trace(err) - } - - var pb *netProtobuf - var err error - done := false - // wait for the answer CONN_CAPABILITIES, but handle ERROR or NOTICE - for !done { - if pb, err = mc.readMsg(); err != nil { - return err - } - if pb == nil { - return errors.Errorf("getCapabilities() pb = nil (not expected to happen ever)") - } - - switch Mysqlx.ServerMessages_Type(pb.msgType) { - case Mysqlx.ServerMessages_ERROR: - return errors.Errorf("getCapabilities returned: %+v", errorMsg(pb.payload)) - case Mysqlx.ServerMessages_CONN_CAPABILITIES: - done = true - case Mysqlx.ServerMessages_NOTICE: // we don't expect a notice here so just print it. - mc.pb = pb // hack though maybe should always use mc - // process the notice message - if err := mc.processNotice("getCapabilities"); err != nil { - return errors.Trace(err) - } - } - } - - if pb == nil { - return errors.Errorf("BUG: Empty pb") - } - if pb.payload == nil { - return errors.Errorf("BUG: Empty pb.payload") - } - - // get the capabilities info - capabilities := &Mysqlx_Connection.Capabilities{} - if err := proto.Unmarshal(pb.payload, capabilities); err != nil { - return errors.Trace(err) - } - - for i := range capabilities.GetCapabilities() { - name := capabilities.GetCapabilities()[i].GetName() - value := capabilities.GetCapabilities()[i].GetValue() - if isScalar(value) { - if isScalarString(value) { - scalar := scalarString(value) - if err := mc.capabilities.AddScalarString(name, scalar); err != nil { - return errors.Trace(err) - } - } else if isScalarBool(value) { - scalar := scalarBool(value) - if err := mc.capabilities.AddScalarBool(name, scalar); err != nil { - return errors.Trace(err) - } - } - } else if isArrayString(value) { - values := arrayString(value) - if err := mc.capabilities.AddArrayString(name, values); err != nil { - return errors.Trace(err) - } - } - } - return nil -} - -// return a new boolean scalar of the given type -func newBoolScalar(value bool) *Mysqlx_Datatypes.Scalar { - vBool := new(Mysqlx_Datatypes.Scalar_Type) - *vBool = Mysqlx_Datatypes.Scalar_V_BOOL - - _value := new(bool) - *_value = value - - // generate the value we want to use - return &Mysqlx_Datatypes.Scalar{ - Type: vBool, - VBool: _value, - } -} - -// return a datatype any of type scalar -func newAnyScalar(anyType Mysqlx_Datatypes.Any_Type, scalar *Mysqlx_Datatypes.Scalar) *Mysqlx_Datatypes.Any { - someType := new(Mysqlx_Datatypes.Any_Type) - *someType = anyType - - return &Mysqlx_Datatypes.Any{ - Type: someType, - Scalar: scalar, - } -} - -// set a boolean scalar capability (tls probably) -func (mc *mysqlXConn) setScalarBoolCapability(name string, value bool) error { - - // Wow this is long-winded and harder than I'd expect (even - // for a trivial setup like this) - // - definitely need some helper routines above the basic stuff that Go provides. - // - and good we don't need to free up all this stuff - // ourselves afterwards and can leave it to Go's garbage - // collector. - - any := newAnyScalar(Mysqlx_Datatypes.Any_SCALAR, newBoolScalar(value)) - - // setup capability structure from what we've just created - capability := &Mysqlx_Connection.Capability{ - Name: proto.String(name), - Value: any, - } - - var capabilitiesArray []*Mysqlx_Connection.Capability - capabilitiesArray = append(capabilitiesArray, capability) - - capabilities := &Mysqlx_Connection.Capabilities{ - Capabilities: capabilitiesArray, - } - - // setup CapabilitiesSet structure from what we've just created - capabilitiesSet := &Mysqlx_Connection.CapabilitiesSet{ - Capabilities: capabilities, - } - - var err error - pb := new(netProtobuf) - pb.msgType = int(Mysqlx.ClientMessages_CON_CAPABILITIES_SET) - if pb.payload, err = proto.Marshal(capabilitiesSet); err != nil { - return errors.Trace(err) - } - - // Send the message - if err = mc.writeProtobufPacket(pb); err != nil { - return errors.Trace(err) - } - - // wait for the answer (I expect it to be OK / ERROR) - done := false - // wait for the answer OK, ERROR or NOTICE - for !done { - if pb, err = mc.readMsg(); err != nil { - return err - } - if pb == nil { - return errors.Errorf("setScalarBoolCapability() pb = nil (not expected to happen ever)") - } - - switch Mysqlx.ServerMessages_Type(pb.msgType) { - case Mysqlx.ServerMessages_OK: - return nil - case Mysqlx.ServerMessages_ERROR: - return errors.Errorf("setScalarBoolCapability failed: %v", mc.processErrorMsg()) - case Mysqlx.ServerMessages_NOTICE: - // we don't expect a notice here so just print it. - mc.pb = pb // should use just mc.pb ?? - if err := mc.processNotice("setScalarBoolCapability"); err != nil { - return errors.Trace(err) - } - } - } - - if pb == nil { - return errors.Errorf("BUG: Empty pb") - } - if pb.payload == nil { - return errors.Errorf("BUG: Empty pb.payload") - } - - return nil -} - -// generate an error based on the Mysql.Error message -func errorText(e *Mysqlx.Error) error { - if e == nil { - return errors.Errorf("errorText: ERROR e == nil") - } - return errors.Errorf("%v: %04d [%s] %s", e.Severity, *(e.Code), *(e.SqlState), *(e.Msg)) -} - -// return an error message type as an error -// - pb MUST BE a protobuf message of type Error -func (pb *netProtobuf) errorMsg() error { - if pb == nil { - return errors.Errorf("errorMsg: ERROR pb == nil") - } - if pb.msgType != int(Mysqlx.ServerMessages_ERROR) { - return errors.Errorf("errorMsg: ERROR msgType = %d, expecting ERROR (%d)", pb.msgType, Mysqlx.ServerMessages_ERROR) - } - e := new(Mysqlx.Error) - if err := proto.Unmarshal(pb.payload, e); err != nil { - return errors.Trace(err) - } - return errorText(e) -} - -// return an error message type as an error -// - input is a protobuf message of type Error -func errorMsg(data []byte) error { - e := new(Mysqlx.Error) - if err := proto.Unmarshal(data, e); err != nil { - return errors.Trace(err) - } - return errorText(e) -} - -func printAuthenticateOk(data []byte) { - ok := &Mysqlx_Session.AuthenticateOk{} - if err := proto.Unmarshal(data, ok); err != nil { - log.Fatal("unmarshaling error with AuthenticateOk: ", err) - } -} - -func (mc *mysqlXConn) processNotice(where string) error { - if mc == nil { - return errors.Errorf("mysqlXConn.processNotice(%q): mc == nil", where) - } - if mc.pb == nil { - return errors.Errorf("mysqlXConn.processNotice(%q): mc.pb == nil", where) - } - - f := new(Mysqlx_Notice.Frame) - if err := proto.Unmarshal(mc.pb.payload, f); err != nil { - log.Fatalf("error unmarshaling Notice f: %v", err) - } - - switch f.GetType() { - case 1: // warning - w := new(Mysqlx_Notice.Warning) - if err := proto.Unmarshal(f.Payload, w); err != nil { - return errors.Trace(err) - } - case 2: // session variable change - s := new(Mysqlx_Notice.SessionVariableChanged) - if err := proto.Unmarshal(f.Payload, s); err != nil { - return errors.Trace(err) - } - case 3: // SessionStateChanged - s := new(Mysqlx_Notice.SessionStateChanged) - if err := proto.Unmarshal(f.Payload, s); err != nil { - return errors.Trace(err) - } - } - mc.pb = nil // reset message (as now processed) - return nil -} - -func (mc *mysqlXConn) writeConnCapabilitiesGet() error { - pb := new(netProtobuf) - pb.msgType = int(Mysqlx.ClientMessages_CON_CAPABILITIES_GET) - // EMPTY PAYLOAD - return mc.writeProtobufPacket(pb) -} - -func (mc *mysqlXConn) writeSessAuthenticateStart(m *Mysqlx_Session.AuthenticateStart) error { - var err error - - pb := new(netProtobuf) - pb.msgType = int(Mysqlx.ClientMessages_SESS_AUTHENTICATE_START) - pb.payload, err = proto.Marshal(m) - if err != nil { - return errors.Trace(err) - } - return mc.writeProtobufPacket(pb) -} - -func (mc *mysqlXConn) writeSessAuthenticateContinue(m *Mysqlx_Session.AuthenticateContinue) error { - var err error - - pb := new(netProtobuf) - pb.msgType = int(Mysqlx.ClientMessages_SESS_AUTHENTICATE_CONTINUE) - pb.payload, err = proto.Marshal(m) - if err != nil { - return errors.Trace(err) - } - return mc.writeProtobufPacket(pb) -} - -func readSessAuthenticateContinue(pb *netProtobuf) *Mysqlx_Session.AuthenticateContinue { - authenticateContinue := &Mysqlx_Session.AuthenticateContinue{} - if err := proto.Unmarshal(pb.payload, authenticateContinue); err != nil { - log.Fatal("unmarshaling error with authenticateContinue: ", err) - } - - return authenticateContinue -} - -// AuthenticateMySQL41 uses MYSQL41 authentication method -func (mc *mysqlXConn) AuthenticateMySQL41() error { - // ------------------------------------------------------------------------ - // C -> S SESS_AUTHENTICATE_START - // ------------------------------------------------------------------------ - authInfo := NewMySQL41(mc.cfg.dbname, mc.cfg.user, mc.cfg.passwd) // copy me into AuthData: ... (and adjust) - - // create the protobuf message (AuthenticateStart) - msg := &Mysqlx_Session.AuthenticateStart{ - MechName: proto.String("MYSQL41"), - AuthData: []byte(authInfo.GetInitialAuthData()), - } - if err := mc.writeSessAuthenticateStart(msg); err != nil { - return errors.Trace(err) - } - - // ------------------------------------------------------------------------ - // S -> C SESS_AUTHENTICATE_CONTINUE - // ------------------------------------------------------------------------ - - // wait for the answer - pb, err := mc.readMsg() - if err != nil { - return err - } - - if Mysqlx.ServerMessages_Type(pb.msgType) != Mysqlx.ServerMessages_SESS_AUTHENTICATE_CONTINUE { - return errors.Errorf("Got unexpected message type back: %s, expecting: %s", - printableMsgTypeIn(Mysqlx.ServerMessages_Type(pb.msgType)), - printableMsgTypeIn(Mysqlx.ServerMessages_SESS_AUTHENTICATE_CONTINUE)) - } - - authenticateContinue := readSessAuthenticateContinue(pb) - authData := []byte(authenticateContinue.GetAuthData()) - if len(authData) != 20 { - return errors.Errorf("Received %d bytes from server, expecting: 20", len(authData)) - } - - // ------------------------------------------------------------------------ - // C -> S SESS_AUTHENTICATE_CONTINUE with scrambled password - // ------------------------------------------------------------------------ - { - authenticateContinue := &Mysqlx_Session.AuthenticateContinue{} - response, err := authInfo.GetNextAuthData(authData) - if err != nil { - return errors.Trace(err) - } - authenticateContinue.AuthData = []byte(response) - - if err := mc.writeSessAuthenticateContinue(authenticateContinue); err != nil { - return errors.Trace(err) - } - } - - // ------------------------------------------------------------------------ - // S -> C SESS_AUTHENTICATE_OK / ERROR / NOTICE - // ------------------------------------------------------------------------ - if err := mc.waitingForAuthenticateOk(); err != nil { - return errors.Trace(err) - } - - printAuthenticateOk(mc.pb.payload) - mc.pb = nil // treat the incoming message as processsed - return nil // supposedly we have done the right thing -} - -// waitingForAuthenticateOk is expecting to receive SESS_AUTHENTICATE_OK indicating success. -// We may get an error (of the form: 1045 [HY000] Invalid user or password which needs -// to be passed to the caller so that the connection is closed. -func (mc *mysqlXConn) waitingForAuthenticateOk() error { - var err error - done := false - for !done { - mc.pb, err = mc.readMsg() - if err != nil { - return errors.Trace(err) - } - - switch Mysqlx.ServerMessages_Type(mc.pb.msgType) { - case Mysqlx.ServerMessages_SESS_AUTHENTICATE_OK: - done = true /* fall through */ - case Mysqlx.ServerMessages_ERROR: - return errorMsg(mc.pb.payload) - case Mysqlx.ServerMessages_NOTICE: - // Not currently documented (explicitly) but we always get this type of message prior to SESS_AUTHENTICATE_OK - if err := mc.processNotice("waitingForAuthenticateOk"); err != nil { - return errors.Trace(err) - } - default: - log.Fatalf("mysqlXConn.waitingfor_SESS_AUTHENTICATE_OK: Received unexpected message type: %s, expecting: %s", - printableMsgTypeIn(Mysqlx.ServerMessages_Type(mc.pb.msgType)), - printableMsgTypeIn(Mysqlx.ServerMessages_OK)) - } - } - return nil -} - -func printableMsgTypeIn(i Mysqlx.ServerMessages_Type) string { - return fmt.Sprintf("%d [%s]", i, Mysqlx.ServerMessages_Type_name[int32(i)]) -} - -func printableMsgTypeOut(i Mysqlx.ClientMessages_Type) string { - return fmt.Sprintf("%d [%s]", i, Mysqlx.ClientMessages_Type_name[int32(i)]) -} - -// FIXME - there must be a protobuf function I can call - FIXME - -func noticeTypeToName(t uint32) string { - if name, found := mysqlxNoticeTypeName[t]; found { - return name - } - return "?" -} - -// Gets the value of the given MySQL System Variable -// The returned byte slice is only valid until the next read -func getSystemVarXProtocol(name string, mc *mysqlXConn) ([]byte, error) { - return nil, nil -} - -// write a StmtExecute packet with the given query -func (mc *mysqlXConn) writeStmtExecute(stmtExecute *Mysqlx_Sql.StmtExecute) error { - var err error - - pb := new(netProtobuf) - pb.msgType = int(Mysqlx.ClientMessages_SQL_STMT_EXECUTE) - pb.payload, err = proto.Marshal(stmtExecute) - - if err != nil { - log.Fatalf("Failed to marshall message: %+v: %v", stmtExecute, err) - } - - err = mc.writeProtobufPacket(pb) - if err != nil { - return errors.Trace(err) - } - return nil -} - -// Send a close message - no data to send so don't expose the protobuf info -func (mc *mysqlXConn) writeClose() error { - payload, err := proto.Marshal(new(Mysqlx_Session.Close)) - if err != nil { - return errors.Trace(err) - } - pb := &netProtobuf{ - msgType: int(Mysqlx.ClientMessages_SESS_CLOSE), - payload: payload, - } - - err = mc.writeProtobufPacket(pb) - if err != nil { - return errors.Trace(err) - } - return nil -} - -// show the error msg and eat it up -func (mc *mysqlXConn) processErrorMsg() error { - if mc == nil { - return errors.Errorf("processErrorMsg mc == nil") - } - if mc.pb == nil { - return errors.Errorf("processErrorMsg mc.pb == nil") - } - if mc.pb.payload == nil { - return errors.Errorf("processErrorMsg mc.pb.payload == nil") - } - e := new(Mysqlx.Error) - if err := proto.Unmarshal(mc.pb.payload, e); err != nil { - return errors.Trace(err) - } - mc.pb = nil - return nil -} - -// is this data printable? -func isPrintable(b []byte) bool { - p := true - for i := range b { - if b[i] < 32 || b[i] > 126 { - return false - } - } - return p -} diff --git a/_vendor/src/github.com/pingcap/mysqlx-driver/result.go b/_vendor/src/github.com/pingcap/mysqlx-driver/result.go deleted file mode 100644 index 0a68aa9dfe348..0000000000000 --- a/_vendor/src/github.com/pingcap/mysqlx-driver/result.go +++ /dev/null @@ -1,24 +0,0 @@ -// Go MySQL Driver - A MySQL-Driver for Go's database/sql package -// -// Copyright 2012 The Go-MySQL-Driver Authors. 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 mysql - -type mysqlResult struct { - affectedRows int64 - insertID int64 -} - -// LastInsertId should return the last MySQL insert id -func (res *mysqlResult) LastInsertId() (int64, error) { - return res.insertID, nil -} - -// RowsAffected indicate how many rows were affected by the command -func (res *mysqlResult) RowsAffected() (int64, error) { - return res.affectedRows, nil -} diff --git a/_vendor/src/github.com/pingcap/mysqlx-driver/rows.go b/_vendor/src/github.com/pingcap/mysqlx-driver/rows.go deleted file mode 100644 index 21686d86ad0f2..0000000000000 --- a/_vendor/src/github.com/pingcap/mysqlx-driver/rows.go +++ /dev/null @@ -1,268 +0,0 @@ -// Go driver for MySQL X Protocol -// Based heavily on Go MySQL Driver - A MySQL-Driver for Go's database/sql package -// -// Copyright 2012 The Go-MySQL-Driver Authors. All rights reserved. -// Copyright 2016 Simon J Mudd. -// -// 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 mysql - -import ( - "database/sql/driver" - "io" - - log "github.com/Sirupsen/logrus" - "github.com/golang/protobuf/proto" - "github.com/juju/errors" - "github.com/pingcap/tipb/go-mysqlx" - "github.com/pingcap/tipb/go-mysqlx/Resultset" -) - -type mysqlXRows struct { - columns [](*Mysqlx_Resultset.ColumnMetaData) // holds column metadata (if present) for a row - mc *mysqlXConn - state queryState - err error // provides the error received from a query (if present) -} - -// readMsgIfNecessary reads in a message only if we don't have one already -func (rows *mysqlXRows) readMsgIfNecessary() error { - // safety checks (which maybe can removed later - if rows == nil { - return errors.Errorf("mysqlXRows.readMsgIfNecessary: rows == nil") - } - if rows.mc == nil { - return errors.Errorf("mysqlXRows.readMsgIfNecessary: rows.mc == nil") - } - // if we already have a protobuf message then no need to read a new one - if rows.mc.pb != nil { - return nil - } - - var err error - rows.mc.pb, err = rows.mc.readMsg() - if err != nil { - err = errors.Trace(err) - - rows.err = err - rows.state = queryStateError - } - return err -} - -// Columns returns the column meta data of a row and may need to -// read in some of the metadata messages from the network. -func (rows *mysqlXRows) Columns() []string { - if err := rows.collectColumnMetaData(); err != nil { - panic(err) - } - columns := make([]string, len(rows.columns)) - for i := range rows.columns { - // FIXME: handle: if rows.mc.cfg.columnsWithAlias { .... - columns[i] = string(rows.columns[i].GetName()) - } - return columns -} - -// we have finished with the iterator -// - given Close can be called at any time we may have pending -// messages in the queue which need skipping so we really need -// to keep the state of where we are. -func (rows *mysqlXRows) Close() error { - // safety checks - if rows == nil { - return nil // to avoid breakage. Fix the calling code later - } - if rows.mc == nil { - return nil // no connection information - } - if rows.mc.netConn == nil { - return ErrInvalidConn - } - - // We may have "query packets" which have not yet been - // processed. If so just let them through but ignore them. - for rows.state != queryStateDone && rows.state != queryStateError { - if err := rows.readMsgIfNecessary(); err != nil { - break - } - - // Finish if we get an error or if the mssage type is EXECUTE_OK or ERROR - switch Mysqlx.ServerMessages_Type(rows.mc.pb.msgType) { - case Mysqlx.ServerMessages_ERROR: - if err := rows.mc.processErrorMsg(); err != nil { - return errors.Trace(err) - } - rows.state = queryStateError - case Mysqlx.ServerMessages_SQL_STMT_EXECUTE_OK: - rows.state = queryStateDone - case Mysqlx.ServerMessages_NOTICE: - if err := rows.mc.processNotice("mysqlXRows.Close"); err != nil { - return errors.Trace(err) - } - } - rows.mc.pb = nil - } - - // clean up - rows.columns = nil - rows.mc.pb = nil - rows.mc = nil - rows.state = queryStateStart - - return nil -} - -// add the column information to the row -func (rows *mysqlXRows) addColumnMetaData() error { - if rows == nil { - return errors.Errorf("mysqlXrows.addColumnMetaData: rows == nil") - } - - column := new(Mysqlx_Resultset.ColumnMetaData) - if err := proto.Unmarshal(rows.mc.pb.payload, column); err != nil { - return errors.Trace(err) - } - - rows.columns = append(rows.columns, column) - rows.mc.pb = nil - - return nil -} - -// process a single row (in rows.mc.pb) and return if there was an error -func processRow(rows *mysqlXRows, dest []driver.Value) error { - var err error - - myRow := new(Mysqlx_Resultset.Row) - if err = proto.Unmarshal(rows.mc.pb.payload, myRow); err != nil { - return errors.Trace(err) - } - rows.mc.pb = nil // consume the message - - // copy over data converting each type to a dest type - for i := range dest { - if dest[i], err = convertColumnData(rows.columns[i], myRow.GetField()[i]); err != nil { - return errors.Trace(err) - } - } - return nil // no error -} - -// Read a row of data from the connection until no more and then return io.EOF to indicate we have finished -func (rows *mysqlXRows) Next(dest []driver.Value) error { - // safety checks - if rows == nil { - log.Fatal("mysqlXRows.Next: rows == nil") - } - if rows.mc == nil { - log.Fatal("mysqlXRows.Next: rows.mc == nil") - } - - // Finished? Don't continue - if rows.state.Finished() { - return io.EOF - } - - // Have we read the column data yet? If not read it. - if rows.state == queryStateWaitingColumnMetaData { - if err := rows.collectColumnMetaData(); err != nil { - return errors.Trace(err) - } - } - - // clean this logic up into a smaller more readable loop - done := false - for !done { - - switch rows.state { - case queryStateWaitingRow: - // pull in a message if needed - if err := rows.readMsgIfNecessary(); err != nil { - log.Fatalf("DEBUG: mysqlXRow.Next: failed to read data if necessary") - } - - // check if it's a Row message! - switch Mysqlx.ServerMessages_Type(rows.mc.pb.msgType) { - case Mysqlx.ServerMessages_RESULTSET_ROW: - if err := processRow(rows, dest); err != nil { - return errors.Trace(err) - } - done = true - case Mysqlx.ServerMessages_NOTICE: - if err := rows.mc.processNotice("mysqlXRows.Next"); err != nil { - return errors.Trace(err) - } - case Mysqlx.ServerMessages_RESULTSET_FETCH_DONE: - rows.state = queryStateWaitingExecuteOk - // done = true SKIP to next message - rows.mc.pb = nil - case Mysqlx.ServerMessages_ERROR: - // should treat each message - rows.state = queryStateDone - done = true - rows.mc.pb = nil - default: - log.Fatalf("mysqlXRowx.Next received unexpected message type: %s", printableMsgTypeIn(Mysqlx.ServerMessages_Type(rows.mc.pb.msgType))) - } - case queryStateDone, queryStateWaitingExecuteOk: - return io.EOF - default: - log.Fatalf("mysqlXRows.Next: called in unexpected state: %v", rows.state.String()) - // otherwise assume everything is fine - } - } - - return nil -} - -// Expectation here is to receive one of -// - RESULTSET_COLUMN_META_DATA (expected) -// - NOTICE (may happen, not expected) -// - RESULTSET_ROW (expected, changes state) -func (rows *mysqlXRows) collectColumnMetaData() error { - if rows == nil { - return errors.Errorf("BUG: mysqlXRows.collectColumnMetaData: rows == nil") - } - - for !rows.state.Finished() && rows.state != queryStateWaitingRow { - if err := rows.readMsgIfNecessary(); err != nil { - return errors.Errorf("DEBUG: mysqlXRows.collectColumnMetaData: failed to read data if necessary") - } - - switch Mysqlx.ServerMessages_Type(rows.mc.pb.msgType) { - case Mysqlx.ServerMessages_RESULTSET_COLUMN_META_DATA: - if err := rows.addColumnMetaData(); err != nil { - return errors.Trace(err) - } - case Mysqlx.ServerMessages_RESULTSET_ROW: - rows.state = queryStateWaitingRow - case Mysqlx.ServerMessages_NOTICE: - // don't really expect a notice but process it - if err := rows.mc.processNotice("mysqlxRows.collectColumnMetaData"); err != nil { - return errors.Trace(err) - } - case Mysqlx.ServerMessages_ERROR: - if err := rows.mc.processErrorMsg(); err != nil { - return errors.Trace(err) - } - rows.state = queryStateError - case Mysqlx.ServerMessages_RESULTSET_FETCH_DONE: - rows.state = queryStateWaitingExecuteOk - rows.mc.pb = nil - case Mysqlx.ServerMessages_SQL_STMT_EXECUTE_OK: - rows.state = queryStateDone - rows.mc.pb = nil - default: - e := errors.Errorf("mysqlXRows.collectColumnMetaData: received unexpected message type: %s", - printableMsgTypeIn(Mysqlx.ServerMessages_Type(rows.mc.pb.msgType))) - rows.state = queryStateError - rows.mc.pb = nil - return e - } - } - return nil -} diff --git a/_vendor/src/github.com/pingcap/mysqlx-driver/state.go b/_vendor/src/github.com/pingcap/mysqlx-driver/state.go deleted file mode 100644 index 53acf3d8c2daa..0000000000000 --- a/_vendor/src/github.com/pingcap/mysqlx-driver/state.go +++ /dev/null @@ -1,91 +0,0 @@ -// Go driver for MySQL X Protocol -// -// Copyright 2016 Simon J Mudd. -// -// 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 mysql - -/* - -states are as shown below: - -* if we get an error message (where we expect) we act on it and don't consider it an error -* if we get another type of error we immediately abort after reporting the problem. - -queryStateStart - | - | +-------[B/N]------+ - | | | - V V | -queryStateWaitingForColumnMetaData ------[E/*]-----+ - | | - [C] +-------[C/N]------+ | - | | | | - V V | V -queryStateWaitingRow --------------------[E/*]---->| - | | - [F] +--------[N]-------+ | - | | | | - V V | V -queryStateWaitingExecuteOk --------------[E/*]---->| - | | - V V -queryStateDone queryStateError - -Events: -[S] Write SQL_STMT_EXECUTE -[B] Receive RESULTSET_COLUMN_META_DATA -[C] Receive RESULTSET_ROW -[E] Receive ERROR -[F] Receive RESULTSET_FETCH_DONE -[N] Receive NOTICE - - -*/ - -type queryState int - -const ( - queryStateStart queryState = iota // not started yet - queryStateWaitingColumnMetaData // query sent waiting for some data - queryStateWaitingRow // query sent waiting for row data - queryStateWaitingExecuteOk // query sent waiting for execute ok - queryStateDone // query complete (could be error) - queryStateError // error of some sort - queryStateUnknown // unknown state -) - -var queryStateName map[queryState]string - -func init() { - queryStateName = map[queryState]string{ - queryStateStart: "Start", - queryStateWaitingColumnMetaData: "Waiting for Column Metadata", - queryStateWaitingRow: "Waiting for Row", - queryStateWaitingExecuteOk: "Waiting for Execute Ok", - queryStateDone: "Completed", - queryStateError: "Error", - queryStateUnknown: "Unnown", - } -} - -// return the string version of the state -func (q *queryState) String() string { - if q == nil { - return queryStateName[queryStateUnknown] - } - return queryStateName[*q] -} - -// Finished means we're not waiting for anything whether due to an error or due to completing the state changes -func (q *queryState) Finished() bool { - return q != nil && (*q == queryStateDone || *q == queryStateError) -} - -// CollectingColumnMetaData returns true if we're still collecting column meta data. -func (q *queryState) CollectingColumnMetaData() bool { - return !q.Finished() && *q != queryStateWaitingRow -} diff --git a/_vendor/src/github.com/pingcap/mysqlx-driver/utils.go b/_vendor/src/github.com/pingcap/mysqlx-driver/utils.go deleted file mode 100644 index 6965e223bb9e3..0000000000000 --- a/_vendor/src/github.com/pingcap/mysqlx-driver/utils.go +++ /dev/null @@ -1,997 +0,0 @@ -// Go MySQL Driver - A MySQL-Driver for Go's database/sql package -// -// Copyright 2012 The Go-MySQL-Driver Authors. 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 mysql - -import ( - "crypto/sha1" - "crypto/tls" - "database/sql/driver" - "encoding/binary" - "io" - "net" - "net/url" - "strings" - "time" - - "github.com/juju/errors" - "github.com/pingcap/tipb/go-mysqlx/Datatypes" -) - -var ( - tlsConfigRegister map[string]*tls.Config // Register for custom tls.Configs - errInvalidDSNUnescaped = errors.New("Invalid DSN: Did you forget to escape a param value?") - errInvalidDSNAddr = errors.New("Invalid DSN: Network Address not terminated (missing closing brace)") - errInvalidDSNNoSlash = errors.New("Invalid DSN: Missing the slash separating the database name") - errInvalidDSNUnsafeCollation = errors.New("Invalid DSN: interpolateParams can be used with ascii, latin1, utf8 and utf8mb4 charset") -) - -func init() { - tlsConfigRegister = make(map[string]*tls.Config) -} - -// RegisterTLSConfig registers a custom tls.Config to be used with sql.Open. -// Use the key as a value in the DSN where tls=value. -// -// rootCertPool := x509.NewCertPool() -// pem, err := ioutil.ReadFile("/path/ca-cert.pem") -// if err != nil { -// log.Fatal(err) -// } -// if ok := rootCertPool.AppendCertsFromPEM(pem); !ok { -// log.Fatal("Failed to append PEM.") -// } -// clientCert := make([]tls.Certificate, 0, 1) -// certs, err := tls.LoadX509KeyPair("/path/client-cert.pem", "/path/client-key.pem") -// if err != nil { -// log.Fatal(err) -// } -// clientCert = append(clientCert, certs) -// mysql.RegisterTLSConfig("custom", &tls.Config{ -// RootCAs: rootCertPool, -// Certificates: clientCert, -// }) -// db, err := sql.Open("mysql", "user@tcp(localhost:3306)/test?tls=custom") -// -func RegisterTLSConfig(key string, config *tls.Config) error { - if _, isBool := readBool(key); isBool || strings.ToLower(key) == "skip-verify" { - return errors.Errorf("Key '%s' is reserved", key) - } - - tlsConfigRegister[key] = config - return nil -} - -// DeregisterTLSConfig removes the tls.Config associated with key. -func DeregisterTLSConfig(key string) { - delete(tlsConfigRegister, key) -} - -// parseDSN parses the DSN string to a config -func parseDSN(dsn string) (cfg *config, err error) { - // New config with some default values - cfg = &config{ - loc: time.UTC, - collation: defaultCollation, - } - - // [user[:password]@][net[(addr)]]/dbname[?param1=value1¶mN=valueN] - // Find the last '/' (since the password or the net addr might contain a '/') - foundSlash := false - for i := len(dsn) - 1; i >= 0; i-- { - if dsn[i] == '/' { - foundSlash = true - var j, k int - - // left part is empty if i <= 0 - if i > 0 { - // [username[:password]@][protocol[(address)]] - // Find the last '@' in dsn[:i] - for j = i; j >= 0; j-- { - if dsn[j] == '@' { - // username[:password] - // Find the first ':' in dsn[:j] - for k = 0; k < j; k++ { - if dsn[k] == ':' { - cfg.passwd = dsn[k+1 : j] - break - } - } - cfg.user = dsn[:k] - - break - } - } - - // [protocol[(address)]] - // Find the first '(' in dsn[j+1:i] - for k = j + 1; k < i; k++ { - if dsn[k] == '(' { - // dsn[i-1] must be == ')' if an address is specified - if dsn[i-1] != ')' { - if strings.ContainsRune(dsn[k+1:i], ')') { - return nil, errInvalidDSNUnescaped - } - return nil, errInvalidDSNAddr - } - cfg.addr = dsn[k+1 : i-1] - break - } - } - cfg.net = dsn[j+1 : k] - } - - // dbname[?param1=value1&...¶mN=valueN] - // Find the first '?' in dsn[i+1:] - for j = i + 1; j < len(dsn); j++ { - if dsn[j] == '?' { - if err = parseDSNParams(cfg, dsn[j+1:]); err != nil { - return - } - break - } - } - cfg.dbname = dsn[i+1 : j] - - break - } - } - - if !foundSlash && len(dsn) > 0 { - return nil, errInvalidDSNNoSlash - } - - if cfg.interpolateParams && unsafeCollations[cfg.collation] { - return nil, errInvalidDSNUnsafeCollation - } - - // Set default network if empty - if cfg.net == "" { - cfg.net = "tcp" - } - - // Set default address if empty - if cfg.addr == "" { - switch cfg.net { - case "tcp": - if cfg.useXProtocol { - cfg.addr = "127.0.0.1:33060" // Xprotocol default port 33060 - } else { - cfg.addr = "127.0.0.1:3306" - } - case "unix": - cfg.addr = "/tmp/mysql.sock" - default: - return nil, errors.New("Default addr for network '" + cfg.net + "' unknown") - } - } - - return -} - -// parseDSNParams parses the DSN "query string" -// Values must be url.QueryEscape'ed -func parseDSNParams(cfg *config, params string) (err error) { - for _, v := range strings.Split(params, "&") { - param := strings.SplitN(v, "=", 2) - if len(param) != 2 { - continue - } - - // cfg params - switch value := param[1]; param[0] { - - // Enable client side placeholder substitution - case "interpolateParams": - var isBool bool - cfg.interpolateParams, isBool = readBool(value) - if !isBool { - return errors.Errorf("Invalid Bool value: %s", value) - } - - // Disable INFILE whitelist / enable all files - case "allowAllFiles": - var isBool bool - cfg.allowAllFiles, isBool = readBool(value) - if !isBool { - return errors.Errorf("Invalid Bool value: %s", value) - } - - // Use cleartext authentication mode (MySQL 5.5.10+) - case "allowCleartextPasswords": - var isBool bool - cfg.allowCleartextPasswords, isBool = readBool(value) - if !isBool { - return errors.Errorf("Invalid Bool value: %s", value) - } - - // Collation - case "collation": - collation, ok := collations[value] - if !ok { - // Note possibility for false negatives: - // could be triggered although the collation is valid if the - // collations map does not contain entries the server supports. - err = errors.New("unknown collation") - return - } - cfg.collation = collation - break - - case "columnsWithAlias": - var isBool bool - cfg.columnsWithAlias, isBool = readBool(value) - if !isBool { - return errors.Errorf("Invalid Bool value: %s", value) - } - - // Time Location - case "loc": - if value, err = url.QueryUnescape(value); err != nil { - return - } - cfg.loc, err = time.LoadLocation(value) - if err != nil { - return - } - - // Dial Timeout - case "timeout": - cfg.timeout, err = time.ParseDuration(value) - if err != nil { - return - } - - // TLS-Encryption - case "tls": - boolValue, isBool := readBool(value) - if isBool { - if boolValue { - cfg.tls = &tls.Config{} - } - } else { - if strings.ToLower(value) == "skip-verify" { - cfg.tls = &tls.Config{InsecureSkipVerify: true} - } else if tlsConfig, ok := tlsConfigRegister[value]; ok { - if len(tlsConfig.ServerName) == 0 && !tlsConfig.InsecureSkipVerify { - host, _, err1 := net.SplitHostPort(cfg.addr) - if err1 == nil { - tlsConfig.ServerName = host - } - } - - cfg.tls = tlsConfig - } else { - return errors.Errorf("Invalid value / unknown config name: %s", value) - } - } - - // xprotocol usage? - case "xprotocol": - var isBool bool - if cfg.useXProtocol, isBool = readBool(value); !isBool { - return errors.Errorf("Invalid Bool value: %s", value) - } - default: - // lazy init - if cfg.params == nil { - cfg.params = make(map[string]string) - } - if cfg.params[param[0]], err = url.QueryUnescape(value); err != nil { - return - } - } - } - return -} - -// Returns the bool value of the input. -// The 2nd return value indicates if the input was a valid bool value -func readBool(input string) (value bool, valid bool) { - switch input { - case "1", "true", "TRUE", "True": - return true, true - case "0", "false", "FALSE", "False": - return false, true - } - // Not a valid bool value - return -} - -/****************************************************************************** -* Authentication * -******************************************************************************/ - -// Encrypt password using 4.1+ method -func scramblePassword(scramble, password []byte) []byte { - if len(password) == 0 { - return nil - } - - // stage1Hash = SHA1(password) - crypt := sha1.New() - if _, err := crypt.Write(password); err != nil { - panic(err) - } - stage1 := crypt.Sum(nil) - - // scrambleHash = SHA1(scramble + SHA1(stage1Hash)) - // inner Hash - crypt.Reset() - if _, err := crypt.Write(stage1); err != nil { - panic(err) - } - hash := crypt.Sum(nil) - - // outer Hash - crypt.Reset() - if _, err := crypt.Write(scramble); err != nil { - panic(err) - } - if _, err := crypt.Write(hash); err != nil { - panic(err) - } - scramble = crypt.Sum(nil) - - // token = scrambleHash XOR stage1Hash - for i := range scramble { - scramble[i] ^= stage1[i] - } - return scramble -} - -// Encrypt password using pre 4.1 (old password) method -// https://github.com/atcurtis/mariadb/blob/master/mysys/my_rnd.c -type myRnd struct { - seed1, seed2 uint32 -} - -const myRndMaxVal = 0x3FFFFFFF - -// Pseudo random number generator -func newMyRnd(seed1, seed2 uint32) *myRnd { - return &myRnd{ - seed1: seed1 % myRndMaxVal, - seed2: seed2 % myRndMaxVal, - } -} - -// Tested to be equivalent to MariaDB's floating point variant -// http://play.golang.org/p/QHvhd4qved -// http://play.golang.org/p/RG0q4ElWDx -func (r *myRnd) NextByte() byte { - r.seed1 = (r.seed1*3 + r.seed2) % myRndMaxVal - r.seed2 = (r.seed1 + r.seed2 + 33) % myRndMaxVal - - return byte(uint64(r.seed1) * 31 / myRndMaxVal) -} - -// Generate binary hash from byte string using insecure pre 4.1 method -func pwHash(password []byte) (result [2]uint32) { - var add uint32 = 7 - var tmp uint32 - - result[0] = 1345345333 - result[1] = 0x12345671 - - for _, c := range password { - // skip spaces and tabs in password - if c == ' ' || c == '\t' { - continue - } - - tmp = uint32(c) - result[0] ^= (((result[0] & 63) + add) * tmp) + (result[0] << 8) - result[1] += (result[1] << 8) ^ result[0] - add += tmp - } - - // Remove sign bit (1<<31)-1) - result[0] &= 0x7FFFFFFF - result[1] &= 0x7FFFFFFF - - return -} - -// Encrypt password using insecure pre 4.1 method -func scrambleOldPassword(scramble, password []byte) []byte { - if len(password) == 0 { - return nil - } - - scramble = scramble[:8] - - hashPw := pwHash(password) - hashSc := pwHash(scramble) - - r := newMyRnd(hashPw[0]^hashSc[0], hashPw[1]^hashSc[1]) - - var out [8]byte - for i := range out { - out[i] = r.NextByte() + 64 - } - - mask := r.NextByte() - for i := range out { - out[i] ^= mask - } - - return out[:] -} - -/****************************************************************************** -* Time related utils * -******************************************************************************/ - -// NullTime represents a time.Time that may be NULL. -// NullTime implements the Scanner interface so -// it can be used as a scan destination: -// -// var nt NullTime -// err := db.QueryRow("SELECT time FROM foo WHERE id=?", id).Scan(&nt) -// ... -// if nt.Valid { -// // use nt.Time -// } else { -// // NULL value -// } -// -// This NullTime implementation is not driver-specific -type NullTime struct { - Time time.Time - Valid bool // Valid is true if Time is not NULL -} - -// Scan implements the Scanner interface. -// The value type must be time.Time or string / []byte (formatted time-string), -// otherwise Scan fails. -func (nt *NullTime) Scan(value interface{}) (err error) { - if value == nil { - nt.Time, nt.Valid = time.Time{}, false - return - } - - switch v := value.(type) { - case time.Time: - nt.Time, nt.Valid = v, true - return - case []byte: - nt.Time, err = parseDateTime(string(v), time.UTC) - nt.Valid = (err == nil) - return - case string: - nt.Time, err = parseDateTime(v, time.UTC) - nt.Valid = (err == nil) - return - } - - nt.Valid = false - return errors.Errorf("Can't convert %T to time.Time", value) -} - -// Value implements the driver Valuer interface. -func (nt NullTime) Value() (driver.Value, error) { - if !nt.Valid { - return nil, nil - } - return nt.Time, nil -} - -func parseDateTime(str string, loc *time.Location) (t time.Time, err error) { - base := "0000-00-00 00:00:00.0000000" - switch len(str) { - case 10, 19, 21, 22, 23, 24, 25, 26: // up to "YYYY-MM-DD HH:MM:SS.MMMMMM" - if str == base[:len(str)] { - return - } - t, err = time.Parse(timeFormat[:len(str)], str) - default: - err = errors.Errorf("Invalid Time-String: %s", str) - return - } - - // Adjust location - if err == nil && loc != time.UTC { - y, mo, d := t.Date() - h, mi, s := t.Clock() - t, err = time.Date(y, mo, d, h, mi, s, t.Nanosecond(), loc), nil - } - return -} - -func parseBinaryDateTime(num uint64, data []byte, loc *time.Location) (driver.Value, error) { - switch num { - case 0: - return time.Time{}, nil - case 4: - return time.Date( - int(binary.LittleEndian.Uint16(data[:2])), // year - time.Month(data[2]), // month - int(data[3]), // day - 0, 0, 0, 0, - loc, - ), nil - case 7: - return time.Date( - int(binary.LittleEndian.Uint16(data[:2])), // year - time.Month(data[2]), // month - int(data[3]), // day - int(data[4]), // hour - int(data[5]), // minutes - int(data[6]), // seconds - 0, - loc, - ), nil - case 11: - return time.Date( - int(binary.LittleEndian.Uint16(data[:2])), // year - time.Month(data[2]), // month - int(data[3]), // day - int(data[4]), // hour - int(data[5]), // minutes - int(data[6]), // seconds - int(binary.LittleEndian.Uint32(data[7:11]))*1000, // nanoseconds - loc, - ), nil - } - return nil, errors.Errorf("Invalid DATETIME-packet length %d", num) -} - -// zeroDateTime is used in formatBinaryDateTime to avoid an allocation -// if the DATE or DATETIME has the zero value. -// It must never be changed. -// The current behavior depends on database/sql copying the result. -var zeroDateTime = []byte("0000-00-00 00:00:00.000000") - -const digits01 = "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" -const digits10 = "0000000000111111111122222222223333333333444444444455555555556666666666777777777788888888889999999999" - -func formatBinaryDateTime(src []byte, length uint8, justTime bool) (driver.Value, error) { - // length expects the deterministic length of the zero value, - // negative time and 100+ hours are automatically added if needed - if len(src) == 0 { - if justTime { - return zeroDateTime[11 : 11+length], nil - } - return zeroDateTime[:length], nil - } - var dst []byte // return value - var pt, p1, p2, p3 byte // current digit pair - var zOffs byte // offset of value in zeroDateTime - if justTime { - switch length { - case - 8, // time (can be up to 10 when negative and 100+ hours) - 10, 11, 12, 13, 14, 15: // time with fractional seconds - default: - return nil, errors.Errorf("illegal TIME length %d", length) - } - switch len(src) { - case 8, 12: - default: - return nil, errors.Errorf("Invalid TIME-packet length %d", len(src)) - } - // +2 to enable negative time and 100+ hours - dst = make([]byte, 0, length+2) - if src[0] == 1 { - dst = append(dst, '-') - } - if src[1] != 0 { - hour := uint16(src[1])*24 + uint16(src[5]) - pt = byte(hour / 100) - p1 = byte(hour - 100*uint16(pt)) - dst = append(dst, digits01[pt]) - } else { - p1 = src[5] - } - zOffs = 11 - src = src[6:] - } else { - switch length { - case 10, 19, 21, 22, 23, 24, 25, 26: - default: - t := "DATE" - if length > 10 { - t += "TIME" - } - return nil, errors.Errorf("illegal %s length %d", t, length) - } - switch len(src) { - case 4, 7, 11: - default: - t := "DATE" - if length > 10 { - t += "TIME" - } - return nil, errors.Errorf("illegal %s-packet length %d", t, len(src)) - } - dst = make([]byte, 0, length) - // start with the date - year := binary.LittleEndian.Uint16(src[:2]) - pt = byte(year / 100) - p1 = byte(year - 100*uint16(pt)) - p2, p3 = src[2], src[3] - dst = append(dst, - digits10[pt], digits01[pt], - digits10[p1], digits01[p1], '-', - digits10[p2], digits01[p2], '-', - digits10[p3], digits01[p3], - ) - if length == 10 { - return dst, nil - } - if len(src) == 4 { - return append(dst, zeroDateTime[10:length]...), nil - } - dst = append(dst, ' ') - p1 = src[4] // hour - src = src[5:] - } - // p1 is 2-digit hour, src is after hour - p2, p3 = src[0], src[1] - dst = append(dst, - digits10[p1], digits01[p1], ':', - digits10[p2], digits01[p2], ':', - digits10[p3], digits01[p3], - ) - if length <= byte(len(dst)) { - return dst, nil - } - src = src[2:] - if len(src) == 0 { - return append(dst, zeroDateTime[19:zOffs+length]...), nil - } - microsecs := binary.LittleEndian.Uint32(src[:4]) - p1 = byte(microsecs / 10000) - microsecs -= 10000 * uint32(p1) - p2 = byte(microsecs / 100) - microsecs -= 100 * uint32(p2) - p3 = byte(microsecs) - switch decimals := zOffs + length - 20; decimals { - default: - return append(dst, '.', - digits10[p1], digits01[p1], - digits10[p2], digits01[p2], - digits10[p3], digits01[p3], - ), nil - case 1: - return append(dst, '.', - digits10[p1], - ), nil - case 2: - return append(dst, '.', - digits10[p1], digits01[p1], - ), nil - case 3: - return append(dst, '.', - digits10[p1], digits01[p1], - digits10[p2], - ), nil - case 4: - return append(dst, '.', - digits10[p1], digits01[p1], - digits10[p2], digits01[p2], - ), nil - case 5: - return append(dst, '.', - digits10[p1], digits01[p1], - digits10[p2], digits01[p2], - digits10[p3], - ), nil - } -} - -/****************************************************************************** -* Convert from and to bytes * -******************************************************************************/ - -func uint64ToBytes(n uint64) []byte { - return []byte{ - byte(n), - byte(n >> 8), - byte(n >> 16), - byte(n >> 24), - byte(n >> 32), - byte(n >> 40), - byte(n >> 48), - byte(n >> 56), - } -} - -func uint64ToString(n uint64) []byte { - var a [20]byte - i := 20 - - // U+0030 = 0 - // ... - // U+0039 = 9 - - var q uint64 - for n >= 10 { - i-- - q = n / 10 - a[i] = uint8(n-q*10) + 0x30 - n = q - } - - i-- - a[i] = uint8(n) + 0x30 - - return a[i:] -} - -// treats string value as unsigned integer representation -func stringToInt(b []byte) int { - val := 0 - for i := range b { - val *= 10 - val += int(b[i] - 0x30) - } - return val -} - -// returns the string read as a bytes slice, wheter the value is NULL, -// the number of bytes read and an error, in case the string is longer than -// the input slice -func readLengthEncodedString(b []byte) ([]byte, bool, int, error) { - // Get length - num, isNull, n := readLengthEncodedInteger(b) - if num < 1 { - return b[n:n], isNull, n, nil - } - - n += int(num) - - // Check data length - if len(b) >= n { - return b[n-int(num) : n], false, n, nil - } - return nil, false, n, io.EOF -} - -// returns the number of bytes skipped and an error, in case the string is -// longer than the input slice -func skipLengthEncodedString(b []byte) (int, error) { - // Get length - num, _, n := readLengthEncodedInteger(b) - if num < 1 { - return n, nil - } - - n += int(num) - - // Check data length - if len(b) >= n { - return n, nil - } - return n, io.EOF -} - -// returns the number read, whether the value is NULL and the number of bytes read -func readLengthEncodedInteger(b []byte) (uint64, bool, int) { - // See issue #349 - if len(b) == 0 { - return 0, true, 1 - } - switch b[0] { - - // 251: NULL - case 0xfb: - return 0, true, 1 - - // 252: value of following 2 - case 0xfc: - return uint64(b[1]) | uint64(b[2])<<8, false, 3 - - // 253: value of following 3 - case 0xfd: - return uint64(b[1]) | uint64(b[2])<<8 | uint64(b[3])<<16, false, 4 - - // 254: value of following 8 - case 0xfe: - return uint64(b[1]) | uint64(b[2])<<8 | uint64(b[3])<<16 | - uint64(b[4])<<24 | uint64(b[5])<<32 | uint64(b[6])<<40 | - uint64(b[7])<<48 | uint64(b[8])<<56, - false, 9 - } - - // 0-250: value of first byte - return uint64(b[0]), false, 1 -} - -// encodes a uint64 value and appends it to the given bytes slice -func appendLengthEncodedInteger(b []byte, n uint64) []byte { - switch { - case n <= 250: - return append(b, byte(n)) - - case n <= 0xffff: - return append(b, 0xfc, byte(n), byte(n>>8)) - - case n <= 0xffffff: - return append(b, 0xfd, byte(n), byte(n>>8), byte(n>>16)) - } - return append(b, 0xfe, byte(n), byte(n>>8), byte(n>>16), byte(n>>24), - byte(n>>32), byte(n>>40), byte(n>>48), byte(n>>56)) -} - -// reserveBuffer checks cap(buf) and expand buffer to len(buf) + appendSize. -// If cap(buf) is not enough, reallocate new buffer. -func reserveBuffer(buf []byte, appendSize int) []byte { - newSize := len(buf) + appendSize - if cap(buf) < newSize { - // Grow buffer exponentially - newBuf := make([]byte, len(buf)*2+appendSize) - copy(newBuf, buf) - buf = newBuf - } - return buf[:newSize] -} - -// escapeBytesBackslash escapes []byte with backslashes (\) -// This escapes the contents of a string (provided as []byte) by adding backslashes before special -// characters, and turning others into specific escape sequences, such as -// turning newlines into \n and null bytes into \0. -// https://github.com/mysql/mysql-server/blob/mysql-5.7.5/mysys/charset.c#L823-L932 -func escapeBytesBackslash(buf, v []byte) []byte { - pos := len(buf) - buf = reserveBuffer(buf, len(v)*2) - - for _, c := range v { - switch c { - case '\x00': - buf[pos] = '\\' - buf[pos+1] = '0' - pos += 2 - case '\n': - buf[pos] = '\\' - buf[pos+1] = 'n' - pos += 2 - case '\r': - buf[pos] = '\\' - buf[pos+1] = 'r' - pos += 2 - case '\x1a': - buf[pos] = '\\' - buf[pos+1] = 'Z' - pos += 2 - case '\'': - buf[pos] = '\\' - buf[pos+1] = '\'' - pos += 2 - case '"': - buf[pos] = '\\' - buf[pos+1] = '"' - pos += 2 - case '\\': - buf[pos] = '\\' - buf[pos+1] = '\\' - pos += 2 - default: - buf[pos] = c - pos++ - } - } - - return buf[:pos] -} - -// escapeStringBackslash is similar to escapeBytesBackslash but for string. -func escapeStringBackslash(buf []byte, v string) []byte { - pos := len(buf) - buf = reserveBuffer(buf, len(v)*2) - - for i := 0; i < len(v); i++ { - c := v[i] - switch c { - case '\x00': - buf[pos] = '\\' - buf[pos+1] = '0' - pos += 2 - case '\n': - buf[pos] = '\\' - buf[pos+1] = 'n' - pos += 2 - case '\r': - buf[pos] = '\\' - buf[pos+1] = 'r' - pos += 2 - case '\x1a': - buf[pos] = '\\' - buf[pos+1] = 'Z' - pos += 2 - case '\'': - buf[pos] = '\\' - buf[pos+1] = '\'' - pos += 2 - case '"': - buf[pos] = '\\' - buf[pos+1] = '"' - pos += 2 - case '\\': - buf[pos] = '\\' - buf[pos+1] = '\\' - pos += 2 - default: - buf[pos] = c - pos++ - } - } - - return buf[:pos] -} - -// escapeBytesQuotes escapes apostrophes in []byte by doubling them up. -// This escapes the contents of a string by doubling up any apostrophes that -// it contains. This is used when the NO_BACKSLASH_ESCAPES SQL_MODE is in -// effect on the server. -// https://github.com/mysql/mysql-server/blob/mysql-5.7.5/mysys/charset.c#L963-L1038 -func escapeBytesQuotes(buf, v []byte) []byte { - pos := len(buf) - buf = reserveBuffer(buf, len(v)*2) - - for _, c := range v { - if c == '\'' { - buf[pos] = '\'' - buf[pos+1] = '\'' - pos += 2 - } else { - buf[pos] = c - pos++ - } - } - - return buf[:pos] -} - -// escapeStringQuotes is similar to escapeBytesQuotes but for string. -func escapeStringQuotes(buf []byte, v string) []byte { - pos := len(buf) - buf = reserveBuffer(buf, len(v)*2) - - for i := 0; i < len(v); i++ { - c := v[i] - if c == '\'' { - buf[pos] = '\'' - buf[pos+1] = '\'' - pos += 2 - } else { - buf[pos] = c - pos++ - } - } - - return buf[:pos] -} - -func scalar2Any(scalar Mysqlx_Datatypes.Scalar) Mysqlx_Datatypes.Any { - any := Mysqlx_Datatypes.Any{ - Type: Mysqlx_Datatypes.Any_SCALAR.Enum(), - Scalar: &scalar, - } - return any -} - -func setString(data []byte) Mysqlx_Datatypes.Any { - str := Mysqlx_Datatypes.Scalar_String{ - Value: data, - } - sca := Mysqlx_Datatypes.Scalar{ - Type: Mysqlx_Datatypes.Scalar_V_STRING.Enum(), - VString: &str, - } - return scalar2Any(sca) -} - -func setUint(data uint64) Mysqlx_Datatypes.Any { - sca := Mysqlx_Datatypes.Scalar{ - Type: Mysqlx_Datatypes.Scalar_V_UINT.Enum(), - VUnsignedInt: &data, - } - return scalar2Any(sca) -} diff --git a/_vendor/src/github.com/pingcap/mysqlx-driver/xconfig.go b/_vendor/src/github.com/pingcap/mysqlx-driver/xconfig.go deleted file mode 100644 index a15c8b497bf3e..0000000000000 --- a/_vendor/src/github.com/pingcap/mysqlx-driver/xconfig.go +++ /dev/null @@ -1,46 +0,0 @@ -package mysql - -import ( - "crypto/tls" - "time" -) - -type xconfig struct { - user string - passwd string - net string - addr string - dbname string - params map[string]string - loc *time.Location - tls *tls.Config - timeout time.Duration - collation uint8 - allowAllFiles bool - allowCleartextPasswords bool - columnsWithAlias bool - interpolateParams bool - useXProtocol bool // use X protocol rather than native protocol - useGetCapabilities bool // for X protocol, do we send a GetCapabilities message to query server capabilities? default: true -} - -// newXconfigFromConfig return a new x config. -func newXconfigFromConfig(cfg *config) *xconfig { - return &xconfig{ - user: cfg.user, - passwd: cfg.passwd, - net: cfg.net, - addr: cfg.addr, - dbname: cfg.dbname, - params: cfg.params, - loc: cfg.loc, - tls: cfg.tls, - timeout: cfg.timeout, - collation: cfg.collation, - allowAllFiles: cfg.allowAllFiles, - allowCleartextPasswords: cfg.allowCleartextPasswords, - columnsWithAlias: cfg.columnsWithAlias, - interpolateParams: cfg.interpolateParams, - useXProtocol: true, - } -} diff --git a/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Connection/mysqlx_connection.pb.go b/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Connection/mysqlx_connection.pb.go deleted file mode 100644 index c3acc65ff80b5..0000000000000 --- a/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Connection/mysqlx_connection.pb.go +++ /dev/null @@ -1,923 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/pingcap/tipb/go-mysqlx/Connection/mysqlx_connection.proto - -/* - Package Mysqlx_Connection is a generated protocol buffer package. - - It is generated from these files: - github.com/pingcap/tipb/go-mysqlx/Connection/mysqlx_connection.proto - - It has these top-level messages: - Capability - Capabilities - CapabilitiesGet - CapabilitiesSet - Close -*/ -package Mysqlx_Connection - -import ( - "fmt" - - proto "github.com/golang/protobuf/proto" - - math "math" - - Mysqlx_Datatypes "github.com/pingcap/tipb/go-mysqlx/Datatypes" - - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - - io "io" -) - -// 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 - -// a Capability -// -// a tuple of a ``name`` and a :protobuf:msg:`Mysqlx.Datatypes::Any` -type Capability struct { - Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` - Value *Mysqlx_Datatypes.Any `protobuf:"bytes,2,req,name=value" json:"value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Capability) Reset() { *m = Capability{} } -func (m *Capability) String() string { return proto.CompactTextString(m) } -func (*Capability) ProtoMessage() {} -func (*Capability) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxConnection, []int{0} } - -func (m *Capability) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *Capability) GetValue() *Mysqlx_Datatypes.Any { - if m != nil { - return m.Value - } - return nil -} - -// Capabilities -type Capabilities struct { - Capabilities []*Capability `protobuf:"bytes,1,rep,name=capabilities" json:"capabilities,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Capabilities) Reset() { *m = Capabilities{} } -func (m *Capabilities) String() string { return proto.CompactTextString(m) } -func (*Capabilities) ProtoMessage() {} -func (*Capabilities) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxConnection, []int{1} } - -func (m *Capabilities) GetCapabilities() []*Capability { - if m != nil { - return m.Capabilities - } - return nil -} - -// get supported connection capabilities and their current state -// -// :returns: :protobuf:msg:`Mysqlx.Connection::Capabilities` or :protobuf:msg:`Mysqlx::Error` -// -type CapabilitiesGet struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *CapabilitiesGet) Reset() { *m = CapabilitiesGet{} } -func (m *CapabilitiesGet) String() string { return proto.CompactTextString(m) } -func (*CapabilitiesGet) ProtoMessage() {} -func (*CapabilitiesGet) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxConnection, []int{2} } - -// sets connection capabilities atomically -// -// only provided values are changed, other values are left unchanged. -// If any of the changes fails, all changes are discarded. -// -// :precond: active sessions == 0 -// :returns: :protobuf:msg:`Mysqlx::Ok` or :protobuf:msg:`Mysqlx::Error` -type CapabilitiesSet struct { - Capabilities *Capabilities `protobuf:"bytes,1,req,name=capabilities" json:"capabilities,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CapabilitiesSet) Reset() { *m = CapabilitiesSet{} } -func (m *CapabilitiesSet) String() string { return proto.CompactTextString(m) } -func (*CapabilitiesSet) ProtoMessage() {} -func (*CapabilitiesSet) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxConnection, []int{3} } - -func (m *CapabilitiesSet) GetCapabilities() *Capabilities { - if m != nil { - return m.Capabilities - } - return nil -} - -// announce to the server that the client wants to close the connection -// -// it discards any session state of the server -// -// :Returns: :protobuf:msg:`Mysqlx::Ok` -type Close struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *Close) Reset() { *m = Close{} } -func (m *Close) String() string { return proto.CompactTextString(m) } -func (*Close) ProtoMessage() {} -func (*Close) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxConnection, []int{4} } - -func init() { - proto.RegisterType((*Capability)(nil), "Mysqlx.Connection.Capability") - proto.RegisterType((*Capabilities)(nil), "Mysqlx.Connection.Capabilities") - proto.RegisterType((*CapabilitiesGet)(nil), "Mysqlx.Connection.CapabilitiesGet") - proto.RegisterType((*CapabilitiesSet)(nil), "Mysqlx.Connection.CapabilitiesSet") - proto.RegisterType((*Close)(nil), "Mysqlx.Connection.Close") -} -func (m *Capability) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Capability) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Name == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxConnection(dAtA, i, uint64(len(*m.Name))) - i += copy(dAtA[i:], *m.Name) - } - if m.Value == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0x12 - i++ - i = encodeVarintMysqlxConnection(dAtA, i, uint64(m.Value.Size())) - n1, err := m.Value.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Capabilities) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Capabilities) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Capabilities) > 0 { - for _, msg := range m.Capabilities { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxConnection(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CapabilitiesGet) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CapabilitiesGet) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CapabilitiesSet) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CapabilitiesSet) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Capabilities == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxConnection(dAtA, i, uint64(m.Capabilities.Size())) - n2, err := m.Capabilities.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Close) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Close) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64MysqlxConnection(dAtA []byte, offset int, v uint64) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - dAtA[offset+4] = uint8(v >> 32) - dAtA[offset+5] = uint8(v >> 40) - dAtA[offset+6] = uint8(v >> 48) - dAtA[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32MysqlxConnection(dAtA []byte, offset int, v uint32) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintMysqlxConnection(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *Capability) Size() (n int) { - var l int - _ = l - if m.Name != nil { - l = len(*m.Name) - n += 1 + l + sovMysqlxConnection(uint64(l)) - } - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovMysqlxConnection(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Capabilities) Size() (n int) { - var l int - _ = l - if len(m.Capabilities) > 0 { - for _, e := range m.Capabilities { - l = e.Size() - n += 1 + l + sovMysqlxConnection(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CapabilitiesGet) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CapabilitiesSet) Size() (n int) { - var l int - _ = l - if m.Capabilities != nil { - l = m.Capabilities.Size() - n += 1 + l + sovMysqlxConnection(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Close) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMysqlxConnection(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozMysqlxConnection(x uint64) (n int) { - return sovMysqlxConnection(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Capability) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxConnection - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Capability: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Capability: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxConnection - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlxConnection - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Name = &s - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxConnection - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxConnection - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = &Mysqlx_Datatypes.Any{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - hasFields[0] |= uint64(0x00000002) - default: - iNdEx = preIndex - skippy, err := skipMysqlxConnection(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxConnection - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - if hasFields[0]&uint64(0x00000002) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Capabilities) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxConnection - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Capabilities: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Capabilities: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Capabilities", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxConnection - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxConnection - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Capabilities = append(m.Capabilities, &Capability{}) - if err := m.Capabilities[len(m.Capabilities)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxConnection(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxConnection - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CapabilitiesGet) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxConnection - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CapabilitiesGet: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CapabilitiesGet: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipMysqlxConnection(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxConnection - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CapabilitiesSet) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxConnection - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CapabilitiesSet: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CapabilitiesSet: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Capabilities", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxConnection - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxConnection - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Capabilities == nil { - m.Capabilities = &Capabilities{} - } - if err := m.Capabilities.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - default: - iNdEx = preIndex - skippy, err := skipMysqlxConnection(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxConnection - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Close) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxConnection - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Close: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Close: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipMysqlxConnection(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxConnection - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMysqlxConnection(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxConnection - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxConnection - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxConnection - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthMysqlxConnection - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxConnection - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipMysqlxConnection(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthMysqlxConnection = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMysqlxConnection = fmt.Errorf("proto: integer overflow") -) - -func init() { - proto.RegisterFile("github.com/pingcap/tipb/go-mysqlx/Connection/mysqlx_connection.proto", fileDescriptorMysqlxConnection) -} - -var fileDescriptorMysqlxConnection = []byte{ - // 255 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xd2, 0xf4, 0xad, 0x2c, 0x2e, - 0xcc, 0xa9, 0xd0, 0x77, 0xce, 0xcf, 0xcb, 0x4b, 0x4d, 0x2e, 0xc9, 0xcc, 0xcf, 0xd3, 0xcf, 0x05, - 0x8b, 0xc4, 0x27, 0xc3, 0x45, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x04, 0x21, 0x4a, 0xf5, - 0x10, 0x4a, 0xa5, 0xd4, 0xa1, 0xba, 0x5d, 0x12, 0x4b, 0x12, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0x61, - 0x9a, 0x53, 0x60, 0x02, 0x10, 0xbd, 0x4a, 0xbe, 0x5c, 0x5c, 0xce, 0x89, 0x05, 0x89, 0x49, 0x99, - 0x39, 0x99, 0x25, 0x95, 0x42, 0x42, 0x5c, 0x2c, 0x79, 0x89, 0xb9, 0xa9, 0x12, 0x8c, 0x0a, 0x4c, - 0x1a, 0x9c, 0x41, 0x60, 0xb6, 0x90, 0x36, 0x17, 0x6b, 0x59, 0x62, 0x4e, 0x69, 0xaa, 0x04, 0x93, - 0x02, 0x93, 0x06, 0xb7, 0x91, 0xa8, 0x1e, 0xd4, 0x36, 0xb8, 0xd1, 0x7a, 0x8e, 0x79, 0x95, 0x41, - 0x10, 0x35, 0x4a, 0x81, 0x5c, 0x3c, 0x70, 0xe3, 0x32, 0x53, 0x8b, 0x85, 0x1c, 0xb9, 0x78, 0x92, - 0x91, 0xf8, 0x12, 0x8c, 0x0a, 0xcc, 0x1a, 0xdc, 0x46, 0xb2, 0x7a, 0x18, 0x2e, 0xd6, 0x43, 0xb8, - 0x22, 0x08, 0x45, 0x8b, 0x92, 0x20, 0x17, 0x3f, 0xb2, 0x91, 0xee, 0xa9, 0x25, 0x4a, 0x61, 0xa8, - 0x42, 0xc1, 0xa9, 0x25, 0x42, 0xce, 0x18, 0x16, 0x81, 0x1c, 0x2b, 0x8f, 0xcf, 0xa2, 0xcc, 0xd4, - 0x62, 0x34, 0xab, 0xd8, 0xb9, 0x58, 0x9d, 0x73, 0xf2, 0x8b, 0x53, 0x9d, 0xf4, 0x4e, 0x3c, 0x92, - 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x19, 0x8f, 0xe5, 0x18, 0xb8, 0x64, - 0x92, 0xf3, 0x73, 0xf5, 0xc0, 0x61, 0xa8, 0x97, 0x9c, 0x05, 0x61, 0x54, 0x40, 0x82, 0x30, 0xa9, - 0x34, 0x0d, 0x10, 0x00, 0x00, 0xff, 0xff, 0x5b, 0xc3, 0xc4, 0x23, 0xad, 0x01, 0x00, 0x00, -} diff --git a/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Crud/mysqlx_crud.pb.go b/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Crud/mysqlx_crud.pb.go deleted file mode 100644 index 72e59a21aa69b..0000000000000 --- a/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Crud/mysqlx_crud.pb.go +++ /dev/null @@ -1,4902 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/pingcap/tipb/go-mysqlx/Crud/mysqlx_crud.proto - -/* - Package Mysqlx_Crud is a generated protocol buffer package. - - Basic CRUD operations - - It is generated from these files: - github.com/pingcap/tipb/go-mysqlx/Crud/mysqlx_crud.proto - - It has these top-level messages: - Column - Projection - Collection - Limit - Order - UpdateOperation - Find - Insert - Update - Delete - CreateView - ModifyView - DropView -*/ -package Mysqlx_Crud - -import ( - "fmt" - - proto "github.com/golang/protobuf/proto" - - math "math" - - Mysqlx_Expr "github.com/pingcap/tipb/go-mysqlx/Expr" - - Mysqlx_Datatypes "github.com/pingcap/tipb/go-mysqlx/Datatypes" - - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - - io "io" -) - -// 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 - -// DataModel to use for filters, names, ... -type DataModel int32 - -const ( - DataModel_DOCUMENT DataModel = 1 - DataModel_TABLE DataModel = 2 -) - -var DataModel_name = map[int32]string{ - 1: "DOCUMENT", - 2: "TABLE", -} -var DataModel_value = map[string]int32{ - "DOCUMENT": 1, - "TABLE": 2, -} - -func (x DataModel) Enum() *DataModel { - p := new(DataModel) - *p = x - return p -} -func (x DataModel) String() string { - return proto.EnumName(DataModel_name, int32(x)) -} -func (x *DataModel) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(DataModel_value, data, "DataModel") - if err != nil { - return err - } - *x = DataModel(value) - return nil -} -func (DataModel) EnumDescriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{0} } - -// ViewAlgorithm defines how MySQL Server processes the view -type ViewAlgorithm int32 - -const ( - ViewAlgorithm_UNDEFINED ViewAlgorithm = 1 - ViewAlgorithm_MERGE ViewAlgorithm = 2 - ViewAlgorithm_TEMPTABLE ViewAlgorithm = 3 -) - -var ViewAlgorithm_name = map[int32]string{ - 1: "UNDEFINED", - 2: "MERGE", - 3: "TEMPTABLE", -} -var ViewAlgorithm_value = map[string]int32{ - "UNDEFINED": 1, - "MERGE": 2, - "TEMPTABLE": 3, -} - -func (x ViewAlgorithm) Enum() *ViewAlgorithm { - p := new(ViewAlgorithm) - *p = x - return p -} -func (x ViewAlgorithm) String() string { - return proto.EnumName(ViewAlgorithm_name, int32(x)) -} -func (x *ViewAlgorithm) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(ViewAlgorithm_value, data, "ViewAlgorithm") - if err != nil { - return err - } - *x = ViewAlgorithm(value) - return nil -} -func (ViewAlgorithm) EnumDescriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{1} } - -// ViewSqlSecurity defines the security context in which the view is going to be -// executed, this means that VIEW can be executed with current user permissions or -// with permissions of the uses who defined the VIEW -type ViewSqlSecurity int32 - -const ( - ViewSqlSecurity_INVOKER ViewSqlSecurity = 1 - ViewSqlSecurity_DEFINER ViewSqlSecurity = 2 -) - -var ViewSqlSecurity_name = map[int32]string{ - 1: "INVOKER", - 2: "DEFINER", -} -var ViewSqlSecurity_value = map[string]int32{ - "INVOKER": 1, - "DEFINER": 2, -} - -func (x ViewSqlSecurity) Enum() *ViewSqlSecurity { - p := new(ViewSqlSecurity) - *p = x - return p -} -func (x ViewSqlSecurity) String() string { - return proto.EnumName(ViewSqlSecurity_name, int32(x)) -} -func (x *ViewSqlSecurity) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(ViewSqlSecurity_value, data, "ViewSqlSecurity") - if err != nil { - return err - } - *x = ViewSqlSecurity(value) - return nil -} -func (ViewSqlSecurity) EnumDescriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{2} } - -// ViewCheckOption limits the write operations done on a `VIEW` -// (`INSERT`, `UPDATE`, `DELETE`) to rows in which the `WHERE` clause is `TRUE` -type ViewCheckOption int32 - -const ( - ViewCheckOption_LOCAL ViewCheckOption = 1 - ViewCheckOption_CASCADED ViewCheckOption = 2 -) - -var ViewCheckOption_name = map[int32]string{ - 1: "LOCAL", - 2: "CASCADED", -} -var ViewCheckOption_value = map[string]int32{ - "LOCAL": 1, - "CASCADED": 2, -} - -func (x ViewCheckOption) Enum() *ViewCheckOption { - p := new(ViewCheckOption) - *p = x - return p -} -func (x ViewCheckOption) String() string { - return proto.EnumName(ViewCheckOption_name, int32(x)) -} -func (x *ViewCheckOption) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(ViewCheckOption_value, data, "ViewCheckOption") - if err != nil { - return err - } - *x = ViewCheckOption(value) - return nil -} -func (ViewCheckOption) EnumDescriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{3} } - -type Order_Direction int32 - -const ( - Order_ASC Order_Direction = 1 - Order_DESC Order_Direction = 2 -) - -var Order_Direction_name = map[int32]string{ - 1: "ASC", - 2: "DESC", -} -var Order_Direction_value = map[string]int32{ - "ASC": 1, - "DESC": 2, -} - -func (x Order_Direction) Enum() *Order_Direction { - p := new(Order_Direction) - *p = x - return p -} -func (x Order_Direction) String() string { - return proto.EnumName(Order_Direction_name, int32(x)) -} -func (x *Order_Direction) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Order_Direction_value, data, "Order_Direction") - if err != nil { - return err - } - *x = Order_Direction(value) - return nil -} -func (Order_Direction) EnumDescriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{4, 0} } - -type UpdateOperation_UpdateType int32 - -const ( - UpdateOperation_SET UpdateOperation_UpdateType = 1 - UpdateOperation_ITEM_REMOVE UpdateOperation_UpdateType = 2 - UpdateOperation_ITEM_SET UpdateOperation_UpdateType = 3 - UpdateOperation_ITEM_REPLACE UpdateOperation_UpdateType = 4 - UpdateOperation_ITEM_MERGE UpdateOperation_UpdateType = 5 - UpdateOperation_ARRAY_INSERT UpdateOperation_UpdateType = 6 - UpdateOperation_ARRAY_APPEND UpdateOperation_UpdateType = 7 -) - -var UpdateOperation_UpdateType_name = map[int32]string{ - 1: "SET", - 2: "ITEM_REMOVE", - 3: "ITEM_SET", - 4: "ITEM_REPLACE", - 5: "ITEM_MERGE", - 6: "ARRAY_INSERT", - 7: "ARRAY_APPEND", -} -var UpdateOperation_UpdateType_value = map[string]int32{ - "SET": 1, - "ITEM_REMOVE": 2, - "ITEM_SET": 3, - "ITEM_REPLACE": 4, - "ITEM_MERGE": 5, - "ARRAY_INSERT": 6, - "ARRAY_APPEND": 7, -} - -func (x UpdateOperation_UpdateType) Enum() *UpdateOperation_UpdateType { - p := new(UpdateOperation_UpdateType) - *p = x - return p -} -func (x UpdateOperation_UpdateType) String() string { - return proto.EnumName(UpdateOperation_UpdateType_name, int32(x)) -} -func (x *UpdateOperation_UpdateType) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(UpdateOperation_UpdateType_value, data, "UpdateOperation_UpdateType") - if err != nil { - return err - } - *x = UpdateOperation_UpdateType(value) - return nil -} -func (UpdateOperation_UpdateType) EnumDescriptor() ([]byte, []int) { - return fileDescriptorMysqlxCrud, []int{5, 0} -} - -// column definition -type Column struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Alias *string `protobuf:"bytes,2,opt,name=alias" json:"alias,omitempty"` - DocumentPath []*Mysqlx_Expr.DocumentPathItem `protobuf:"bytes,3,rep,name=document_path,json=documentPath" json:"document_path,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Column) Reset() { *m = Column{} } -func (m *Column) String() string { return proto.CompactTextString(m) } -func (*Column) ProtoMessage() {} -func (*Column) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{0} } - -func (m *Column) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *Column) GetAlias() string { - if m != nil && m.Alias != nil { - return *m.Alias - } - return "" -} - -func (m *Column) GetDocumentPath() []*Mysqlx_Expr.DocumentPathItem { - if m != nil { - return m.DocumentPath - } - return nil -} - -// a projection -// -// :param source: the expression identifying an element from the source data -// which can include a column identifier or any expression -// :param alias: optional alias. Required for DOCUMENTs (clients may use -// the source string as default) -type Projection struct { - Source *Mysqlx_Expr.Expr `protobuf:"bytes,1,req,name=source" json:"source,omitempty"` - Alias *string `protobuf:"bytes,2,opt,name=alias" json:"alias,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Projection) Reset() { *m = Projection{} } -func (m *Projection) String() string { return proto.CompactTextString(m) } -func (*Projection) ProtoMessage() {} -func (*Projection) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{1} } - -func (m *Projection) GetSource() *Mysqlx_Expr.Expr { - if m != nil { - return m.Source - } - return nil -} - -func (m *Projection) GetAlias() string { - if m != nil && m.Alias != nil { - return *m.Alias - } - return "" -} - -// collection -type Collection struct { - Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` - Schema *string `protobuf:"bytes,2,opt,name=schema" json:"schema,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Collection) Reset() { *m = Collection{} } -func (m *Collection) String() string { return proto.CompactTextString(m) } -func (*Collection) ProtoMessage() {} -func (*Collection) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{2} } - -func (m *Collection) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *Collection) GetSchema() string { - if m != nil && m.Schema != nil { - return *m.Schema - } - return "" -} - -// limit -// -// :param row_count: maximum rows to filter -// :param offset: maximum rows to skip before applying the row_count -type Limit struct { - RowCount *uint64 `protobuf:"varint,1,req,name=row_count,json=rowCount" json:"row_count,omitempty"` - Offset *uint64 `protobuf:"varint,2,opt,name=offset" json:"offset,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Limit) Reset() { *m = Limit{} } -func (m *Limit) String() string { return proto.CompactTextString(m) } -func (*Limit) ProtoMessage() {} -func (*Limit) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{3} } - -func (m *Limit) GetRowCount() uint64 { - if m != nil && m.RowCount != nil { - return *m.RowCount - } - return 0 -} - -func (m *Limit) GetOffset() uint64 { - if m != nil && m.Offset != nil { - return *m.Offset - } - return 0 -} - -// sort order -type Order struct { - Expr *Mysqlx_Expr.Expr `protobuf:"bytes,1,req,name=expr" json:"expr,omitempty"` - Direction *Order_Direction `protobuf:"varint,2,opt,name=direction,enum=Mysqlx.Crud.Order_Direction,def=1" json:"direction,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Order) Reset() { *m = Order{} } -func (m *Order) String() string { return proto.CompactTextString(m) } -func (*Order) ProtoMessage() {} -func (*Order) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{4} } - -const Default_Order_Direction Order_Direction = Order_ASC - -func (m *Order) GetExpr() *Mysqlx_Expr.Expr { - if m != nil { - return m.Expr - } - return nil -} - -func (m *Order) GetDirection() Order_Direction { - if m != nil && m.Direction != nil { - return *m.Direction - } - return Default_Order_Direction -} - -// update operations -// -// :param source: specification of the value to be updated -// if data_model is TABLE, a column name may be specified and also a document path, if the column has type JSON -// if data_model is DOCUMENT, only document paths are allowed -// in both cases, schema and table must be not set -// :param operation: the type of operation to be performed -// :param value: an expression to be computed as the new value for the operation -type UpdateOperation struct { - Source *Mysqlx_Expr.ColumnIdentifier `protobuf:"bytes,1,req,name=source" json:"source,omitempty"` - Operation *UpdateOperation_UpdateType `protobuf:"varint,2,req,name=operation,enum=Mysqlx.Crud.UpdateOperation_UpdateType" json:"operation,omitempty"` - Value *Mysqlx_Expr.Expr `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *UpdateOperation) Reset() { *m = UpdateOperation{} } -func (m *UpdateOperation) String() string { return proto.CompactTextString(m) } -func (*UpdateOperation) ProtoMessage() {} -func (*UpdateOperation) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{5} } - -func (m *UpdateOperation) GetSource() *Mysqlx_Expr.ColumnIdentifier { - if m != nil { - return m.Source - } - return nil -} - -func (m *UpdateOperation) GetOperation() UpdateOperation_UpdateType { - if m != nil && m.Operation != nil { - return *m.Operation - } - return UpdateOperation_SET -} - -func (m *UpdateOperation) GetValue() *Mysqlx_Expr.Expr { - if m != nil { - return m.Value - } - return nil -} - -// Find Documents/Rows in a Collection/Table -// -// .. uml:: -// -// client -> server: Find -// ... one or more Resultset ... -// -// :param collection: collection to insert into -// :param data_model: datamodel that the operations refer to -// :param projection: list of column projections that shall be returned -// :param args: values for parameters used in filter expression -// :param criteria: filter criteria -// :param limit: numbers of rows that shall be skipped and returned -// :param order: sort-order in which the rows/document shall be returned in -// :param grouping: column expression list for aggregation (GROUP BY) -// :param grouping_criteria: filter criteria for aggregated groups -// :Returns: :protobuf:msg:`Mysqlx.Resultset::` -type Find struct { - Collection *Collection `protobuf:"bytes,2,req,name=collection" json:"collection,omitempty"` - DataModel *DataModel `protobuf:"varint,3,opt,name=data_model,json=dataModel,enum=Mysqlx.Crud.DataModel" json:"data_model,omitempty"` - Projection []*Projection `protobuf:"bytes,4,rep,name=projection" json:"projection,omitempty"` - Criteria *Mysqlx_Expr.Expr `protobuf:"bytes,5,opt,name=criteria" json:"criteria,omitempty"` - Args []*Mysqlx_Datatypes.Scalar `protobuf:"bytes,11,rep,name=args" json:"args,omitempty"` - Limit *Limit `protobuf:"bytes,6,opt,name=limit" json:"limit,omitempty"` - Order []*Order `protobuf:"bytes,7,rep,name=order" json:"order,omitempty"` - Grouping []*Mysqlx_Expr.Expr `protobuf:"bytes,8,rep,name=grouping" json:"grouping,omitempty"` - GroupingCriteria *Mysqlx_Expr.Expr `protobuf:"bytes,9,opt,name=grouping_criteria,json=groupingCriteria" json:"grouping_criteria,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Find) Reset() { *m = Find{} } -func (m *Find) String() string { return proto.CompactTextString(m) } -func (*Find) ProtoMessage() {} -func (*Find) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{6} } - -func (m *Find) GetCollection() *Collection { - if m != nil { - return m.Collection - } - return nil -} - -func (m *Find) GetDataModel() DataModel { - if m != nil && m.DataModel != nil { - return *m.DataModel - } - return DataModel_DOCUMENT -} - -func (m *Find) GetProjection() []*Projection { - if m != nil { - return m.Projection - } - return nil -} - -func (m *Find) GetCriteria() *Mysqlx_Expr.Expr { - if m != nil { - return m.Criteria - } - return nil -} - -func (m *Find) GetArgs() []*Mysqlx_Datatypes.Scalar { - if m != nil { - return m.Args - } - return nil -} - -func (m *Find) GetLimit() *Limit { - if m != nil { - return m.Limit - } - return nil -} - -func (m *Find) GetOrder() []*Order { - if m != nil { - return m.Order - } - return nil -} - -func (m *Find) GetGrouping() []*Mysqlx_Expr.Expr { - if m != nil { - return m.Grouping - } - return nil -} - -func (m *Find) GetGroupingCriteria() *Mysqlx_Expr.Expr { - if m != nil { - return m.GroupingCriteria - } - return nil -} - -// Insert documents/rows into a collection/table -// -// :param collection: collection to insert into -// :param data_model: datamodel that the operations refer to -// :param projection: name of the columns to insert data into (empty if data_model is DOCUMENT) -// :param row: set of rows to insert into the collection/table (a single expression with a JSON document literal or an OBJECT expression) -// :param args: values for parameters used in row expressions -// :Returns: :protobuf:msg:`Mysqlx.Resultset::` -type Insert struct { - Collection *Collection `protobuf:"bytes,1,req,name=collection" json:"collection,omitempty"` - DataModel *DataModel `protobuf:"varint,2,opt,name=data_model,json=dataModel,enum=Mysqlx.Crud.DataModel" json:"data_model,omitempty"` - Projection []*Column `protobuf:"bytes,3,rep,name=projection" json:"projection,omitempty"` - Row []*Insert_TypedRow `protobuf:"bytes,4,rep,name=row" json:"row,omitempty"` - Args []*Mysqlx_Datatypes.Scalar `protobuf:"bytes,5,rep,name=args" json:"args,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Insert) Reset() { *m = Insert{} } -func (m *Insert) String() string { return proto.CompactTextString(m) } -func (*Insert) ProtoMessage() {} -func (*Insert) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{7} } - -func (m *Insert) GetCollection() *Collection { - if m != nil { - return m.Collection - } - return nil -} - -func (m *Insert) GetDataModel() DataModel { - if m != nil && m.DataModel != nil { - return *m.DataModel - } - return DataModel_DOCUMENT -} - -func (m *Insert) GetProjection() []*Column { - if m != nil { - return m.Projection - } - return nil -} - -func (m *Insert) GetRow() []*Insert_TypedRow { - if m != nil { - return m.Row - } - return nil -} - -func (m *Insert) GetArgs() []*Mysqlx_Datatypes.Scalar { - if m != nil { - return m.Args - } - return nil -} - -type Insert_TypedRow struct { - Field []*Mysqlx_Expr.Expr `protobuf:"bytes,1,rep,name=field" json:"field,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Insert_TypedRow) Reset() { *m = Insert_TypedRow{} } -func (m *Insert_TypedRow) String() string { return proto.CompactTextString(m) } -func (*Insert_TypedRow) ProtoMessage() {} -func (*Insert_TypedRow) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{7, 0} } - -func (m *Insert_TypedRow) GetField() []*Mysqlx_Expr.Expr { - if m != nil { - return m.Field - } - return nil -} - -// Update documents/rows in a collection/table -// -// :param collection: collection to change -// :param data_model: datamodel that the operations refer to -// :param criteria: filter expression to match rows that the operations will apply on -// :param args: values for parameters used in filter expression -// :param limit: limits the number of rows to match -// :param order: specifies order of matched rows -// :param operation: list of operations to be applied. Valid operations will depend on the data_model. -// :Returns: :protobuf:msg:`Mysqlx.Resultset::` -type Update struct { - Collection *Collection `protobuf:"bytes,2,req,name=collection" json:"collection,omitempty"` - DataModel *DataModel `protobuf:"varint,3,opt,name=data_model,json=dataModel,enum=Mysqlx.Crud.DataModel" json:"data_model,omitempty"` - Criteria *Mysqlx_Expr.Expr `protobuf:"bytes,4,opt,name=criteria" json:"criteria,omitempty"` - Args []*Mysqlx_Datatypes.Scalar `protobuf:"bytes,8,rep,name=args" json:"args,omitempty"` - Limit *Limit `protobuf:"bytes,5,opt,name=limit" json:"limit,omitempty"` - Order []*Order `protobuf:"bytes,6,rep,name=order" json:"order,omitempty"` - Operation []*UpdateOperation `protobuf:"bytes,7,rep,name=operation" json:"operation,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Update) Reset() { *m = Update{} } -func (m *Update) String() string { return proto.CompactTextString(m) } -func (*Update) ProtoMessage() {} -func (*Update) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{8} } - -func (m *Update) GetCollection() *Collection { - if m != nil { - return m.Collection - } - return nil -} - -func (m *Update) GetDataModel() DataModel { - if m != nil && m.DataModel != nil { - return *m.DataModel - } - return DataModel_DOCUMENT -} - -func (m *Update) GetCriteria() *Mysqlx_Expr.Expr { - if m != nil { - return m.Criteria - } - return nil -} - -func (m *Update) GetArgs() []*Mysqlx_Datatypes.Scalar { - if m != nil { - return m.Args - } - return nil -} - -func (m *Update) GetLimit() *Limit { - if m != nil { - return m.Limit - } - return nil -} - -func (m *Update) GetOrder() []*Order { - if m != nil { - return m.Order - } - return nil -} - -func (m *Update) GetOperation() []*UpdateOperation { - if m != nil { - return m.Operation - } - return nil -} - -// Delete documents/rows from a Collection/Table -// -// :param collection: collection to change -// :param data_model: datamodel that the operations refer to -// :param criteria: filter expression to match rows that the operations will apply on -// :param args: values for parameters used in filter expression -// :param limit: limits the number of rows to match -// :param order: specifies order of matched rows -// :Returns: :protobuf:msg:`Mysqlx.Resultset::` -type Delete struct { - Collection *Collection `protobuf:"bytes,1,req,name=collection" json:"collection,omitempty"` - DataModel *DataModel `protobuf:"varint,2,opt,name=data_model,json=dataModel,enum=Mysqlx.Crud.DataModel" json:"data_model,omitempty"` - Criteria *Mysqlx_Expr.Expr `protobuf:"bytes,3,opt,name=criteria" json:"criteria,omitempty"` - Args []*Mysqlx_Datatypes.Scalar `protobuf:"bytes,6,rep,name=args" json:"args,omitempty"` - Limit *Limit `protobuf:"bytes,4,opt,name=limit" json:"limit,omitempty"` - Order []*Order `protobuf:"bytes,5,rep,name=order" json:"order,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Delete) Reset() { *m = Delete{} } -func (m *Delete) String() string { return proto.CompactTextString(m) } -func (*Delete) ProtoMessage() {} -func (*Delete) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{9} } - -func (m *Delete) GetCollection() *Collection { - if m != nil { - return m.Collection - } - return nil -} - -func (m *Delete) GetDataModel() DataModel { - if m != nil && m.DataModel != nil { - return *m.DataModel - } - return DataModel_DOCUMENT -} - -func (m *Delete) GetCriteria() *Mysqlx_Expr.Expr { - if m != nil { - return m.Criteria - } - return nil -} - -func (m *Delete) GetArgs() []*Mysqlx_Datatypes.Scalar { - if m != nil { - return m.Args - } - return nil -} - -func (m *Delete) GetLimit() *Limit { - if m != nil { - return m.Limit - } - return nil -} - -func (m *Delete) GetOrder() []*Order { - if m != nil { - return m.Order - } - return nil -} - -type CreateView struct { - Collection *Collection `protobuf:"bytes,1,req,name=collection" json:"collection,omitempty"` - Definer *string `protobuf:"bytes,2,opt,name=definer" json:"definer,omitempty"` - Algorithm *ViewAlgorithm `protobuf:"varint,3,opt,name=algorithm,enum=Mysqlx.Crud.ViewAlgorithm,def=1" json:"algorithm,omitempty"` - Security *ViewSqlSecurity `protobuf:"varint,4,opt,name=security,enum=Mysqlx.Crud.ViewSqlSecurity,def=2" json:"security,omitempty"` - Check *ViewCheckOption `protobuf:"varint,5,opt,name=check,enum=Mysqlx.Crud.ViewCheckOption" json:"check,omitempty"` - Column []string `protobuf:"bytes,6,rep,name=column" json:"column,omitempty"` - Stmt *Find `protobuf:"bytes,7,req,name=stmt" json:"stmt,omitempty"` - ReplaceExisting *bool `protobuf:"varint,8,opt,name=replace_existing,json=replaceExisting,def=0" json:"replace_existing,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CreateView) Reset() { *m = CreateView{} } -func (m *CreateView) String() string { return proto.CompactTextString(m) } -func (*CreateView) ProtoMessage() {} -func (*CreateView) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{10} } - -const Default_CreateView_Algorithm ViewAlgorithm = ViewAlgorithm_UNDEFINED -const Default_CreateView_Security ViewSqlSecurity = ViewSqlSecurity_DEFINER -const Default_CreateView_ReplaceExisting bool = false - -func (m *CreateView) GetCollection() *Collection { - if m != nil { - return m.Collection - } - return nil -} - -func (m *CreateView) GetDefiner() string { - if m != nil && m.Definer != nil { - return *m.Definer - } - return "" -} - -func (m *CreateView) GetAlgorithm() ViewAlgorithm { - if m != nil && m.Algorithm != nil { - return *m.Algorithm - } - return Default_CreateView_Algorithm -} - -func (m *CreateView) GetSecurity() ViewSqlSecurity { - if m != nil && m.Security != nil { - return *m.Security - } - return Default_CreateView_Security -} - -func (m *CreateView) GetCheck() ViewCheckOption { - if m != nil && m.Check != nil { - return *m.Check - } - return ViewCheckOption_LOCAL -} - -func (m *CreateView) GetColumn() []string { - if m != nil { - return m.Column - } - return nil -} - -func (m *CreateView) GetStmt() *Find { - if m != nil { - return m.Stmt - } - return nil -} - -func (m *CreateView) GetReplaceExisting() bool { - if m != nil && m.ReplaceExisting != nil { - return *m.ReplaceExisting - } - return Default_CreateView_ReplaceExisting -} - -type ModifyView struct { - Collection *Collection `protobuf:"bytes,1,req,name=collection" json:"collection,omitempty"` - Definer *string `protobuf:"bytes,2,opt,name=definer" json:"definer,omitempty"` - Algorithm *ViewAlgorithm `protobuf:"varint,3,opt,name=algorithm,enum=Mysqlx.Crud.ViewAlgorithm" json:"algorithm,omitempty"` - Security *ViewSqlSecurity `protobuf:"varint,4,opt,name=security,enum=Mysqlx.Crud.ViewSqlSecurity" json:"security,omitempty"` - Check *ViewCheckOption `protobuf:"varint,5,opt,name=check,enum=Mysqlx.Crud.ViewCheckOption" json:"check,omitempty"` - Column []string `protobuf:"bytes,6,rep,name=column" json:"column,omitempty"` - Stmt *Find `protobuf:"bytes,7,opt,name=stmt" json:"stmt,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ModifyView) Reset() { *m = ModifyView{} } -func (m *ModifyView) String() string { return proto.CompactTextString(m) } -func (*ModifyView) ProtoMessage() {} -func (*ModifyView) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{11} } - -func (m *ModifyView) GetCollection() *Collection { - if m != nil { - return m.Collection - } - return nil -} - -func (m *ModifyView) GetDefiner() string { - if m != nil && m.Definer != nil { - return *m.Definer - } - return "" -} - -func (m *ModifyView) GetAlgorithm() ViewAlgorithm { - if m != nil && m.Algorithm != nil { - return *m.Algorithm - } - return ViewAlgorithm_UNDEFINED -} - -func (m *ModifyView) GetSecurity() ViewSqlSecurity { - if m != nil && m.Security != nil { - return *m.Security - } - return ViewSqlSecurity_INVOKER -} - -func (m *ModifyView) GetCheck() ViewCheckOption { - if m != nil && m.Check != nil { - return *m.Check - } - return ViewCheckOption_LOCAL -} - -func (m *ModifyView) GetColumn() []string { - if m != nil { - return m.Column - } - return nil -} - -func (m *ModifyView) GetStmt() *Find { - if m != nil { - return m.Stmt - } - return nil -} - -type DropView struct { - Collection *Collection `protobuf:"bytes,1,req,name=collection" json:"collection,omitempty"` - IfExists *bool `protobuf:"varint,2,opt,name=if_exists,json=ifExists,def=0" json:"if_exists,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DropView) Reset() { *m = DropView{} } -func (m *DropView) String() string { return proto.CompactTextString(m) } -func (*DropView) ProtoMessage() {} -func (*DropView) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxCrud, []int{12} } - -const Default_DropView_IfExists bool = false - -func (m *DropView) GetCollection() *Collection { - if m != nil { - return m.Collection - } - return nil -} - -func (m *DropView) GetIfExists() bool { - if m != nil && m.IfExists != nil { - return *m.IfExists - } - return Default_DropView_IfExists -} - -func init() { - proto.RegisterType((*Column)(nil), "Mysqlx.Crud.Column") - proto.RegisterType((*Projection)(nil), "Mysqlx.Crud.Projection") - proto.RegisterType((*Collection)(nil), "Mysqlx.Crud.Collection") - proto.RegisterType((*Limit)(nil), "Mysqlx.Crud.Limit") - proto.RegisterType((*Order)(nil), "Mysqlx.Crud.Order") - proto.RegisterType((*UpdateOperation)(nil), "Mysqlx.Crud.UpdateOperation") - proto.RegisterType((*Find)(nil), "Mysqlx.Crud.Find") - proto.RegisterType((*Insert)(nil), "Mysqlx.Crud.Insert") - proto.RegisterType((*Insert_TypedRow)(nil), "Mysqlx.Crud.Insert.TypedRow") - proto.RegisterType((*Update)(nil), "Mysqlx.Crud.Update") - proto.RegisterType((*Delete)(nil), "Mysqlx.Crud.Delete") - proto.RegisterType((*CreateView)(nil), "Mysqlx.Crud.CreateView") - proto.RegisterType((*ModifyView)(nil), "Mysqlx.Crud.ModifyView") - proto.RegisterType((*DropView)(nil), "Mysqlx.Crud.DropView") - proto.RegisterEnum("Mysqlx.Crud.DataModel", DataModel_name, DataModel_value) - proto.RegisterEnum("Mysqlx.Crud.ViewAlgorithm", ViewAlgorithm_name, ViewAlgorithm_value) - proto.RegisterEnum("Mysqlx.Crud.ViewSqlSecurity", ViewSqlSecurity_name, ViewSqlSecurity_value) - proto.RegisterEnum("Mysqlx.Crud.ViewCheckOption", ViewCheckOption_name, ViewCheckOption_value) - proto.RegisterEnum("Mysqlx.Crud.Order_Direction", Order_Direction_name, Order_Direction_value) - proto.RegisterEnum("Mysqlx.Crud.UpdateOperation_UpdateType", UpdateOperation_UpdateType_name, UpdateOperation_UpdateType_value) -} -func (m *Column) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Column) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Name != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(len(*m.Name))) - i += copy(dAtA[i:], *m.Name) - } - if m.Alias != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(len(*m.Alias))) - i += copy(dAtA[i:], *m.Alias) - } - if len(m.DocumentPath) > 0 { - for _, msg := range m.DocumentPath { - dAtA[i] = 0x1a - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Projection) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Projection) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Source == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(m.Source.Size())) - n1, err := m.Source.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.Alias != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(len(*m.Alias))) - i += copy(dAtA[i:], *m.Alias) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Collection) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Collection) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Name == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(len(*m.Name))) - i += copy(dAtA[i:], *m.Name) - } - if m.Schema != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(len(*m.Schema))) - i += copy(dAtA[i:], *m.Schema) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Limit) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Limit) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.RowCount == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0x8 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(*m.RowCount)) - } - if m.Offset != nil { - dAtA[i] = 0x10 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(*m.Offset)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Order) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Order) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Expr == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(m.Expr.Size())) - n2, err := m.Expr.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.Direction != nil { - dAtA[i] = 0x10 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(*m.Direction)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *UpdateOperation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UpdateOperation) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Source == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(m.Source.Size())) - n3, err := m.Source.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.Operation == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0x10 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(*m.Operation)) - } - if m.Value != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(m.Value.Size())) - n4, err := m.Value.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Find) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Find) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Collection == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0x12 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(m.Collection.Size())) - n5, err := m.Collection.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.DataModel != nil { - dAtA[i] = 0x18 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(*m.DataModel)) - } - if len(m.Projection) > 0 { - for _, msg := range m.Projection { - dAtA[i] = 0x22 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Criteria != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(m.Criteria.Size())) - n6, err := m.Criteria.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - if m.Limit != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(m.Limit.Size())) - n7, err := m.Limit.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - if len(m.Order) > 0 { - for _, msg := range m.Order { - dAtA[i] = 0x3a - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Grouping) > 0 { - for _, msg := range m.Grouping { - dAtA[i] = 0x42 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.GroupingCriteria != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(m.GroupingCriteria.Size())) - n8, err := m.GroupingCriteria.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - if len(m.Args) > 0 { - for _, msg := range m.Args { - dAtA[i] = 0x5a - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Insert) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Insert) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Collection == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(m.Collection.Size())) - n9, err := m.Collection.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 - } - if m.DataModel != nil { - dAtA[i] = 0x10 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(*m.DataModel)) - } - if len(m.Projection) > 0 { - for _, msg := range m.Projection { - dAtA[i] = 0x1a - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Row) > 0 { - for _, msg := range m.Row { - dAtA[i] = 0x22 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Args) > 0 { - for _, msg := range m.Args { - dAtA[i] = 0x2a - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Insert_TypedRow) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Insert_TypedRow) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field) > 0 { - for _, msg := range m.Field { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Update) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Update) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Collection == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0x12 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(m.Collection.Size())) - n10, err := m.Collection.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n10 - } - if m.DataModel != nil { - dAtA[i] = 0x18 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(*m.DataModel)) - } - if m.Criteria != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(m.Criteria.Size())) - n11, err := m.Criteria.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n11 - } - if m.Limit != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(m.Limit.Size())) - n12, err := m.Limit.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n12 - } - if len(m.Order) > 0 { - for _, msg := range m.Order { - dAtA[i] = 0x32 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Operation) > 0 { - for _, msg := range m.Operation { - dAtA[i] = 0x3a - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Args) > 0 { - for _, msg := range m.Args { - dAtA[i] = 0x42 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Delete) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Delete) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Collection == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(m.Collection.Size())) - n13, err := m.Collection.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n13 - } - if m.DataModel != nil { - dAtA[i] = 0x10 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(*m.DataModel)) - } - if m.Criteria != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(m.Criteria.Size())) - n14, err := m.Criteria.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n14 - } - if m.Limit != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(m.Limit.Size())) - n15, err := m.Limit.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n15 - } - if len(m.Order) > 0 { - for _, msg := range m.Order { - dAtA[i] = 0x2a - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Args) > 0 { - for _, msg := range m.Args { - dAtA[i] = 0x32 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CreateView) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CreateView) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Collection == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(m.Collection.Size())) - n16, err := m.Collection.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n16 - } - if m.Definer != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(len(*m.Definer))) - i += copy(dAtA[i:], *m.Definer) - } - if m.Algorithm != nil { - dAtA[i] = 0x18 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(*m.Algorithm)) - } - if m.Security != nil { - dAtA[i] = 0x20 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(*m.Security)) - } - if m.Check != nil { - dAtA[i] = 0x28 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(*m.Check)) - } - if len(m.Column) > 0 { - for _, s := range m.Column { - dAtA[i] = 0x32 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if m.Stmt == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0x3a - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(m.Stmt.Size())) - n17, err := m.Stmt.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n17 - } - if m.ReplaceExisting != nil { - dAtA[i] = 0x40 - i++ - if *m.ReplaceExisting { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ModifyView) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ModifyView) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Collection == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(m.Collection.Size())) - n18, err := m.Collection.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n18 - } - if m.Definer != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(len(*m.Definer))) - i += copy(dAtA[i:], *m.Definer) - } - if m.Algorithm != nil { - dAtA[i] = 0x18 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(*m.Algorithm)) - } - if m.Security != nil { - dAtA[i] = 0x20 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(*m.Security)) - } - if m.Check != nil { - dAtA[i] = 0x28 - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(*m.Check)) - } - if len(m.Column) > 0 { - for _, s := range m.Column { - dAtA[i] = 0x32 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if m.Stmt != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(m.Stmt.Size())) - n19, err := m.Stmt.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n19 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DropView) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DropView) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Collection == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxCrud(dAtA, i, uint64(m.Collection.Size())) - n20, err := m.Collection.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n20 - } - if m.IfExists != nil { - dAtA[i] = 0x10 - i++ - if *m.IfExists { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64MysqlxCrud(dAtA []byte, offset int, v uint64) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - dAtA[offset+4] = uint8(v >> 32) - dAtA[offset+5] = uint8(v >> 40) - dAtA[offset+6] = uint8(v >> 48) - dAtA[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32MysqlxCrud(dAtA []byte, offset int, v uint32) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintMysqlxCrud(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *Column) Size() (n int) { - var l int - _ = l - if m.Name != nil { - l = len(*m.Name) - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if m.Alias != nil { - l = len(*m.Alias) - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if len(m.DocumentPath) > 0 { - for _, e := range m.DocumentPath { - l = e.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Projection) Size() (n int) { - var l int - _ = l - if m.Source != nil { - l = m.Source.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if m.Alias != nil { - l = len(*m.Alias) - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Collection) Size() (n int) { - var l int - _ = l - if m.Name != nil { - l = len(*m.Name) - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if m.Schema != nil { - l = len(*m.Schema) - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Limit) Size() (n int) { - var l int - _ = l - if m.RowCount != nil { - n += 1 + sovMysqlxCrud(uint64(*m.RowCount)) - } - if m.Offset != nil { - n += 1 + sovMysqlxCrud(uint64(*m.Offset)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Order) Size() (n int) { - var l int - _ = l - if m.Expr != nil { - l = m.Expr.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if m.Direction != nil { - n += 1 + sovMysqlxCrud(uint64(*m.Direction)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UpdateOperation) Size() (n int) { - var l int - _ = l - if m.Source != nil { - l = m.Source.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if m.Operation != nil { - n += 1 + sovMysqlxCrud(uint64(*m.Operation)) - } - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Find) Size() (n int) { - var l int - _ = l - if m.Collection != nil { - l = m.Collection.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if m.DataModel != nil { - n += 1 + sovMysqlxCrud(uint64(*m.DataModel)) - } - if len(m.Projection) > 0 { - for _, e := range m.Projection { - l = e.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - } - if m.Criteria != nil { - l = m.Criteria.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if m.Limit != nil { - l = m.Limit.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if len(m.Order) > 0 { - for _, e := range m.Order { - l = e.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - } - if len(m.Grouping) > 0 { - for _, e := range m.Grouping { - l = e.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - } - if m.GroupingCriteria != nil { - l = m.GroupingCriteria.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if len(m.Args) > 0 { - for _, e := range m.Args { - l = e.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Insert) Size() (n int) { - var l int - _ = l - if m.Collection != nil { - l = m.Collection.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if m.DataModel != nil { - n += 1 + sovMysqlxCrud(uint64(*m.DataModel)) - } - if len(m.Projection) > 0 { - for _, e := range m.Projection { - l = e.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - } - if len(m.Row) > 0 { - for _, e := range m.Row { - l = e.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - } - if len(m.Args) > 0 { - for _, e := range m.Args { - l = e.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Insert_TypedRow) Size() (n int) { - var l int - _ = l - if len(m.Field) > 0 { - for _, e := range m.Field { - l = e.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Update) Size() (n int) { - var l int - _ = l - if m.Collection != nil { - l = m.Collection.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if m.DataModel != nil { - n += 1 + sovMysqlxCrud(uint64(*m.DataModel)) - } - if m.Criteria != nil { - l = m.Criteria.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if m.Limit != nil { - l = m.Limit.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if len(m.Order) > 0 { - for _, e := range m.Order { - l = e.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - } - if len(m.Operation) > 0 { - for _, e := range m.Operation { - l = e.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - } - if len(m.Args) > 0 { - for _, e := range m.Args { - l = e.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Delete) Size() (n int) { - var l int - _ = l - if m.Collection != nil { - l = m.Collection.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if m.DataModel != nil { - n += 1 + sovMysqlxCrud(uint64(*m.DataModel)) - } - if m.Criteria != nil { - l = m.Criteria.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if m.Limit != nil { - l = m.Limit.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if len(m.Order) > 0 { - for _, e := range m.Order { - l = e.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - } - if len(m.Args) > 0 { - for _, e := range m.Args { - l = e.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CreateView) Size() (n int) { - var l int - _ = l - if m.Collection != nil { - l = m.Collection.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if m.Definer != nil { - l = len(*m.Definer) - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if m.Algorithm != nil { - n += 1 + sovMysqlxCrud(uint64(*m.Algorithm)) - } - if m.Security != nil { - n += 1 + sovMysqlxCrud(uint64(*m.Security)) - } - if m.Check != nil { - n += 1 + sovMysqlxCrud(uint64(*m.Check)) - } - if len(m.Column) > 0 { - for _, s := range m.Column { - l = len(s) - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - } - if m.Stmt != nil { - l = m.Stmt.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if m.ReplaceExisting != nil { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ModifyView) Size() (n int) { - var l int - _ = l - if m.Collection != nil { - l = m.Collection.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if m.Definer != nil { - l = len(*m.Definer) - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if m.Algorithm != nil { - n += 1 + sovMysqlxCrud(uint64(*m.Algorithm)) - } - if m.Security != nil { - n += 1 + sovMysqlxCrud(uint64(*m.Security)) - } - if m.Check != nil { - n += 1 + sovMysqlxCrud(uint64(*m.Check)) - } - if len(m.Column) > 0 { - for _, s := range m.Column { - l = len(s) - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - } - if m.Stmt != nil { - l = m.Stmt.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DropView) Size() (n int) { - var l int - _ = l - if m.Collection != nil { - l = m.Collection.Size() - n += 1 + l + sovMysqlxCrud(uint64(l)) - } - if m.IfExists != nil { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMysqlxCrud(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozMysqlxCrud(x uint64) (n int) { - return sovMysqlxCrud(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Column) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Column: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Column: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Name = &s - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Alias", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Alias = &s - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DocumentPath", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DocumentPath = append(m.DocumentPath, &Mysqlx_Expr.DocumentPathItem{}) - if err := m.DocumentPath[len(m.DocumentPath)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxCrud(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxCrud - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Projection) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Projection: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Projection: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Source == nil { - m.Source = &Mysqlx_Expr.Expr{} - } - if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Alias", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Alias = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxCrud(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxCrud - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Collection) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Collection: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Collection: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Name = &s - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Schema = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxCrud(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxCrud - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Limit) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Limit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Limit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RowCount", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.RowCount = &v - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Offset = &v - default: - iNdEx = preIndex - skippy, err := skipMysqlxCrud(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxCrud - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Order) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Order: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Order: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Expr", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Expr == nil { - m.Expr = &Mysqlx_Expr.Expr{} - } - if err := m.Expr.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Direction", wireType) - } - var v Order_Direction - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (Order_Direction(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Direction = &v - default: - iNdEx = preIndex - skippy, err := skipMysqlxCrud(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxCrud - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UpdateOperation) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UpdateOperation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UpdateOperation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Source == nil { - m.Source = &Mysqlx_Expr.ColumnIdentifier{} - } - if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Operation", wireType) - } - var v UpdateOperation_UpdateType - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (UpdateOperation_UpdateType(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Operation = &v - hasFields[0] |= uint64(0x00000002) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = &Mysqlx_Expr.Expr{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxCrud(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxCrud - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - if hasFields[0]&uint64(0x00000002) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Find) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Find: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Find: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Collection", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Collection == nil { - m.Collection = &Collection{} - } - if err := m.Collection.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DataModel", wireType) - } - var v DataModel - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (DataModel(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.DataModel = &v - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Projection", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Projection = append(m.Projection, &Projection{}) - if err := m.Projection[len(m.Projection)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Criteria", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Criteria == nil { - m.Criteria = &Mysqlx_Expr.Expr{} - } - if err := m.Criteria.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Limit == nil { - m.Limit = &Limit{} - } - if err := m.Limit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Order = append(m.Order, &Order{}) - if err := m.Order[len(m.Order)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Grouping", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Grouping = append(m.Grouping, &Mysqlx_Expr.Expr{}) - if err := m.Grouping[len(m.Grouping)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupingCriteria", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GroupingCriteria == nil { - m.GroupingCriteria = &Mysqlx_Expr.Expr{} - } - if err := m.GroupingCriteria.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Args = append(m.Args, &Mysqlx_Datatypes.Scalar{}) - if err := m.Args[len(m.Args)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxCrud(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxCrud - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Insert) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Insert: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Insert: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Collection", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Collection == nil { - m.Collection = &Collection{} - } - if err := m.Collection.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DataModel", wireType) - } - var v DataModel - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (DataModel(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.DataModel = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Projection", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Projection = append(m.Projection, &Column{}) - if err := m.Projection[len(m.Projection)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Row", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Row = append(m.Row, &Insert_TypedRow{}) - if err := m.Row[len(m.Row)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Args = append(m.Args, &Mysqlx_Datatypes.Scalar{}) - if err := m.Args[len(m.Args)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxCrud(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxCrud - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Insert_TypedRow) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TypedRow: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TypedRow: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field = append(m.Field, &Mysqlx_Expr.Expr{}) - if err := m.Field[len(m.Field)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxCrud(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxCrud - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Update) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Update: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Update: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Collection", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Collection == nil { - m.Collection = &Collection{} - } - if err := m.Collection.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DataModel", wireType) - } - var v DataModel - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (DataModel(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.DataModel = &v - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Criteria", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Criteria == nil { - m.Criteria = &Mysqlx_Expr.Expr{} - } - if err := m.Criteria.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Limit == nil { - m.Limit = &Limit{} - } - if err := m.Limit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Order = append(m.Order, &Order{}) - if err := m.Order[len(m.Order)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Operation", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Operation = append(m.Operation, &UpdateOperation{}) - if err := m.Operation[len(m.Operation)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Args = append(m.Args, &Mysqlx_Datatypes.Scalar{}) - if err := m.Args[len(m.Args)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxCrud(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxCrud - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Delete) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Delete: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Delete: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Collection", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Collection == nil { - m.Collection = &Collection{} - } - if err := m.Collection.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DataModel", wireType) - } - var v DataModel - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (DataModel(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.DataModel = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Criteria", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Criteria == nil { - m.Criteria = &Mysqlx_Expr.Expr{} - } - if err := m.Criteria.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Limit == nil { - m.Limit = &Limit{} - } - if err := m.Limit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Order = append(m.Order, &Order{}) - if err := m.Order[len(m.Order)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Args = append(m.Args, &Mysqlx_Datatypes.Scalar{}) - if err := m.Args[len(m.Args)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxCrud(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxCrud - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CreateView) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CreateView: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CreateView: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Collection", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Collection == nil { - m.Collection = &Collection{} - } - if err := m.Collection.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Definer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Definer = &s - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Algorithm", wireType) - } - var v ViewAlgorithm - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (ViewAlgorithm(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Algorithm = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Security", wireType) - } - var v ViewSqlSecurity - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (ViewSqlSecurity(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Security = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Check", wireType) - } - var v ViewCheckOption - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (ViewCheckOption(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Check = &v - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Column", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Column = append(m.Column, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stmt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Stmt == nil { - m.Stmt = &Find{} - } - if err := m.Stmt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - hasFields[0] |= uint64(0x00000002) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ReplaceExisting", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.ReplaceExisting = &b - default: - iNdEx = preIndex - skippy, err := skipMysqlxCrud(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxCrud - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - if hasFields[0]&uint64(0x00000002) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ModifyView) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ModifyView: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ModifyView: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Collection", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Collection == nil { - m.Collection = &Collection{} - } - if err := m.Collection.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Definer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Definer = &s - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Algorithm", wireType) - } - var v ViewAlgorithm - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (ViewAlgorithm(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Algorithm = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Security", wireType) - } - var v ViewSqlSecurity - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (ViewSqlSecurity(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Security = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Check", wireType) - } - var v ViewCheckOption - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (ViewCheckOption(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Check = &v - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Column", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Column = append(m.Column, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stmt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Stmt == nil { - m.Stmt = &Find{} - } - if err := m.Stmt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxCrud(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxCrud - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DropView) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DropView: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DropView: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Collection", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxCrud - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Collection == nil { - m.Collection = &Collection{} - } - if err := m.Collection.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IfExists", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.IfExists = &b - default: - iNdEx = preIndex - skippy, err := skipMysqlxCrud(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxCrud - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMysqlxCrud(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthMysqlxCrud - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxCrud - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipMysqlxCrud(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthMysqlxCrud = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMysqlxCrud = fmt.Errorf("proto: integer overflow") -) - -func init() { - proto.RegisterFile("github.com/pingcap/tipb/go-mysqlx/Crud/mysqlx_crud.proto", fileDescriptorMysqlxCrud) -} - -var fileDescriptorMysqlxCrud = []byte{ - // 1187 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xbc, 0x57, 0xdd, 0x8e, 0xdb, 0xc4, - 0x17, 0xff, 0xdb, 0x89, 0x93, 0xf8, 0xa4, 0xdd, 0x75, 0xe7, 0x8f, 0x8a, 0xb5, 0xb4, 0xab, 0x95, - 0x05, 0x6a, 0x58, 0xc0, 0x45, 0xa9, 0x2a, 0x56, 0x2b, 0x04, 0x4a, 0x6d, 0x17, 0x45, 0x6c, 0x3e, - 0x34, 0x49, 0x2b, 0x71, 0x15, 0x19, 0x7b, 0xb2, 0xeb, 0x62, 0xc7, 0xee, 0xd8, 0xe9, 0xee, 0xf2, - 0x0c, 0x48, 0xdc, 0xf2, 0x0a, 0xdc, 0xf3, 0x00, 0x5c, 0x21, 0xee, 0xe0, 0x11, 0x50, 0x11, 0xef, - 0x81, 0x66, 0xc6, 0x4e, 0xe2, 0x74, 0x97, 0x66, 0x8b, 0x96, 0x9b, 0x68, 0x66, 0xce, 0xef, 0x9c, - 0x39, 0xe7, 0x77, 0x3e, 0x32, 0x86, 0xbb, 0xbd, 0xf3, 0xf4, 0x79, 0x78, 0x76, 0xdf, 0xa2, 0x73, - 0xff, 0x7e, 0xc4, 0xd7, 0x13, 0x8f, 0xce, 0x7d, 0x33, 0xa1, 0x71, 0x16, 0xa3, 0xa6, 0x10, 0x9b, - 0x4c, 0xbc, 0x53, 0x60, 0x9d, 0xb3, 0x84, 0x16, 0x58, 0x72, 0x96, 0x50, 0x81, 0xdd, 0xb9, 0x97, - 0x8b, 0x6d, 0x37, 0x73, 0xb3, 0xf3, 0x84, 0xa4, 0x05, 0xc6, 0x2f, 0x0e, 0x04, 0xd0, 0x78, 0x01, - 0x35, 0x2b, 0x0e, 0xe7, 0xd1, 0x0c, 0x21, 0xa8, 0xce, 0xdc, 0x88, 0xe8, 0xd2, 0x9e, 0xd4, 0x52, - 0x31, 0x5f, 0xa3, 0xb7, 0x40, 0x71, 0xc3, 0xc0, 0x4d, 0x75, 0x99, 0x1f, 0x8a, 0x0d, 0x7a, 0x04, - 0x37, 0xfd, 0xd8, 0x9b, 0x47, 0x64, 0x96, 0x4d, 0x12, 0x37, 0x3b, 0xd1, 0x2b, 0x7b, 0x95, 0x56, - 0xb3, 0x7d, 0xd7, 0xcc, 0x1d, 0x64, 0x3e, 0x99, 0x76, 0x8e, 0x18, 0xba, 0xd9, 0x49, 0x37, 0x23, - 0x11, 0xbe, 0xe1, 0xaf, 0x9c, 0x18, 0x3d, 0x80, 0x21, 0x8d, 0x9f, 0x11, 0x2f, 0x0b, 0xe2, 0x19, - 0x7a, 0x1f, 0x6a, 0x69, 0x3c, 0xa7, 0x1e, 0xbb, 0x5d, 0x6e, 0x35, 0xdb, 0xb7, 0x4a, 0xa6, 0xd8, - 0x0f, 0xce, 0x01, 0x17, 0xbb, 0x64, 0x1c, 0x00, 0x58, 0x71, 0x18, 0xe6, 0xe6, 0x96, 0xa1, 0xc8, - 0x8b, 0x50, 0x6e, 0x43, 0x2d, 0xf5, 0x4e, 0x48, 0xe4, 0xe6, 0x8a, 0xf9, 0xce, 0xf8, 0x14, 0x94, - 0xa3, 0x20, 0x0a, 0x32, 0xf4, 0x0e, 0xa8, 0x34, 0x3e, 0x9d, 0x78, 0xf1, 0x7c, 0x96, 0x71, 0xcd, - 0x2a, 0x6e, 0xd0, 0xf8, 0xd4, 0x62, 0x7b, 0xa6, 0x1d, 0x4f, 0xa7, 0x29, 0xc9, 0xb8, 0x76, 0x15, - 0xe7, 0x3b, 0xe3, 0x7b, 0x09, 0x94, 0x01, 0xf5, 0x09, 0x45, 0xef, 0x41, 0x95, 0xf1, 0x7f, 0x79, - 0x00, 0x5c, 0x8c, 0x3e, 0x07, 0xd5, 0x0f, 0xa8, 0xf0, 0x93, 0xdb, 0xda, 0x6a, 0xdf, 0x31, 0x57, - 0x12, 0x6b, 0x72, 0x6b, 0xa6, 0x5d, 0x60, 0x0e, 0x2b, 0x9d, 0x91, 0x85, 0x97, 0x3a, 0xc6, 0x2e, - 0xa8, 0x0b, 0x21, 0xaa, 0x03, 0x13, 0x6b, 0x12, 0x6a, 0x40, 0xd5, 0x76, 0x46, 0x96, 0x26, 0x1b, - 0x3f, 0xc9, 0xb0, 0xfd, 0x24, 0xf1, 0xdd, 0x8c, 0x0c, 0x12, 0x42, 0x5d, 0x0e, 0x7b, 0xb8, 0x46, - 0x6f, 0x39, 0x53, 0x22, 0xff, 0x5d, 0x9f, 0xcc, 0xb2, 0x60, 0x1a, 0x90, 0x25, 0xd5, 0x0e, 0xa8, - 0x71, 0x61, 0x43, 0x97, 0xf7, 0xe4, 0xd6, 0x56, 0xfb, 0x5e, 0xc9, 0xd7, 0xb5, 0x7b, 0xf2, 0xfd, - 0xf8, 0x3c, 0x21, 0x78, 0xa9, 0x89, 0xee, 0x81, 0xf2, 0xc2, 0x0d, 0xe7, 0x44, 0xaf, 0xec, 0x49, - 0x17, 0x53, 0x23, 0xe4, 0xc6, 0xb7, 0x00, 0x4b, 0x0b, 0x2c, 0xb6, 0x91, 0x33, 0xd6, 0x24, 0xb4, - 0x0d, 0xcd, 0xee, 0xd8, 0xe9, 0x4d, 0xb0, 0xd3, 0x1b, 0x3c, 0x75, 0x34, 0x19, 0xdd, 0x80, 0x06, - 0x3f, 0x60, 0xe2, 0x0a, 0xd2, 0xe0, 0x46, 0x2e, 0x1e, 0x1e, 0x75, 0x2c, 0x47, 0xab, 0xa2, 0x2d, - 0x00, 0x7e, 0xd2, 0x73, 0xf0, 0x17, 0x8e, 0xa6, 0x30, 0x44, 0x07, 0xe3, 0xce, 0x57, 0x93, 0x6e, - 0x7f, 0xe4, 0xe0, 0xb1, 0x56, 0x5b, 0x9e, 0x74, 0x86, 0x43, 0xa7, 0x6f, 0x6b, 0x75, 0xe3, 0xb7, - 0x0a, 0x54, 0x1f, 0x07, 0x33, 0x1f, 0x7d, 0x02, 0xe0, 0x2d, 0x2a, 0x89, 0x47, 0xdd, 0x6c, 0xbf, - 0x5d, 0x8a, 0x7a, 0x59, 0x68, 0x78, 0x05, 0x8a, 0x1e, 0x02, 0xb0, 0xe6, 0x9a, 0x44, 0xb1, 0x4f, - 0x42, 0x1e, 0xeb, 0x56, 0xfb, 0x76, 0x49, 0x91, 0x35, 0x63, 0x8f, 0x49, 0xb1, 0xea, 0x17, 0x4b, - 0x76, 0x5f, 0xb2, 0x68, 0x04, 0xbd, 0xca, 0x3b, 0xa9, 0x7c, 0xdf, 0xb2, 0x4f, 0xf0, 0x0a, 0x14, - 0x7d, 0x04, 0x0d, 0x8f, 0x06, 0x19, 0xa1, 0x81, 0xab, 0x2b, 0x97, 0x31, 0xbb, 0x80, 0xa0, 0x16, - 0x28, 0x21, 0xab, 0x73, 0xbd, 0xc6, 0xb1, 0xa8, 0x74, 0x05, 0xef, 0x00, 0x2c, 0x00, 0x0c, 0x19, - 0xb3, 0x22, 0xd4, 0xeb, 0xdc, 0x19, 0xf4, 0x6a, 0x79, 0x62, 0x01, 0x60, 0x2e, 0x1c, 0xd3, 0x78, - 0x9e, 0x04, 0xb3, 0x63, 0xbd, 0xc1, 0xc1, 0x17, 0xb9, 0x50, 0x40, 0xd0, 0x67, 0x70, 0xab, 0x58, - 0x4f, 0x16, 0xae, 0xab, 0x97, 0xb9, 0xae, 0x15, 0x58, 0xab, 0x08, 0xe1, 0x43, 0xa8, 0xba, 0xf4, - 0x38, 0xd5, 0x9b, 0xfc, 0x2a, 0xbd, 0x50, 0x59, 0xcc, 0x38, 0x73, 0xe4, 0xb9, 0xa1, 0x4b, 0x31, - 0x47, 0x19, 0x3f, 0xcb, 0x50, 0xeb, 0xce, 0x52, 0x42, 0xb3, 0xb5, 0x9c, 0x4a, 0x6f, 0x9a, 0x53, - 0x79, 0xd3, 0x9c, 0x3e, 0x28, 0xe5, 0x54, 0x4c, 0xc7, 0xff, 0xaf, 0xdf, 0x37, 0x8f, 0xca, 0xf9, - 0x34, 0xa1, 0x42, 0xe3, 0xd3, 0xbc, 0x02, 0xca, 0x33, 0x41, 0x84, 0x61, 0xb2, 0xb6, 0xf0, 0x71, - 0x7c, 0x8a, 0x19, 0x70, 0xc1, 0x86, 0xb2, 0x09, 0x1b, 0x3b, 0x0f, 0xa0, 0x51, 0xa8, 0xb3, 0x86, - 0x9c, 0x06, 0x24, 0xf4, 0x75, 0xe9, 0xb2, 0x9c, 0x09, 0xb9, 0xf1, 0x97, 0x0c, 0x35, 0xd1, 0x91, - 0xff, 0x79, 0x5b, 0xac, 0x56, 0x77, 0xf5, 0x0a, 0xd5, 0xad, 0x6c, 0x5c, 0xdd, 0xb5, 0xd7, 0x55, - 0xf7, 0xe1, 0xea, 0xf8, 0xab, 0x5f, 0x90, 0x96, 0xb5, 0xf1, 0xb7, 0x3a, 0xf3, 0x8a, 0xe4, 0x34, - 0x36, 0x2a, 0xd5, 0x1f, 0x65, 0xa8, 0xd9, 0x24, 0x24, 0xaf, 0xf0, 0x7c, 0xfd, 0xa5, 0xba, 0xca, - 0x73, 0xe5, 0x0a, 0x3c, 0x57, 0x37, 0xe6, 0x59, 0x79, 0x1d, 0xcf, 0x05, 0x57, 0xb5, 0x8d, 0xb8, - 0xfa, 0xae, 0x02, 0x60, 0x51, 0xe2, 0x66, 0xe4, 0x69, 0x40, 0x4e, 0xdf, 0x9c, 0x2f, 0x1d, 0xea, - 0x3e, 0x99, 0x06, 0x33, 0x42, 0xf3, 0x07, 0x41, 0xb1, 0x45, 0x16, 0xa8, 0x6e, 0x78, 0x1c, 0xd3, - 0x20, 0x3b, 0x89, 0xf2, 0x82, 0xdd, 0x29, 0x59, 0x64, 0x17, 0x77, 0x0a, 0xc4, 0xa1, 0xfa, 0xa4, - 0x6f, 0x3b, 0x8f, 0xbb, 0x7d, 0xc7, 0xc6, 0x4b, 0x3d, 0xd4, 0x81, 0x46, 0x4a, 0xbc, 0x39, 0x0d, - 0xb2, 0x73, 0xce, 0xd5, 0xfa, 0xdf, 0x3c, 0xb3, 0x31, 0x7a, 0x1e, 0x8e, 0x72, 0xcc, 0x61, 0x5d, - 0xd8, 0xc0, 0x78, 0xa1, 0x86, 0xda, 0xa0, 0x78, 0x27, 0xc4, 0xfb, 0x86, 0xd7, 0xf4, 0x45, 0xfa, - 0x16, 0x93, 0x0e, 0x12, 0x1e, 0x9a, 0x80, 0xb2, 0x77, 0x8a, 0xc7, 0x47, 0x0b, 0x67, 0x53, 0xc5, - 0xf9, 0x8e, 0xbd, 0x4e, 0xd2, 0x2c, 0xca, 0xf4, 0x7a, 0xf9, 0x75, 0xc2, 0x4d, 0xb1, 0xbf, 0x3d, - 0xcc, 0xc5, 0xe8, 0x63, 0xd0, 0x28, 0x49, 0x42, 0xd7, 0x23, 0x13, 0x72, 0x16, 0xa4, 0x99, 0x18, - 0xec, 0x52, 0xab, 0x71, 0xa8, 0x4c, 0xdd, 0x30, 0x25, 0x78, 0x3b, 0x17, 0x3b, 0xb9, 0xd4, 0xf8, - 0x45, 0x06, 0xe8, 0xc5, 0x7e, 0x30, 0x3d, 0xbf, 0xae, 0x74, 0x1c, 0x5c, 0x29, 0x1d, 0xab, 0x39, - 0x38, 0xb8, 0x5a, 0x0e, 0xae, 0x9d, 0x7a, 0xe9, 0x1f, 0xa8, 0x37, 0x8e, 0xa1, 0x61, 0xd3, 0x38, - 0xf9, 0x77, 0x2c, 0x1a, 0xa0, 0x06, 0x53, 0x91, 0x3a, 0xf1, 0x40, 0x5e, 0x24, 0xae, 0x11, 0x4c, - 0x79, 0xce, 0xd2, 0xfd, 0x77, 0x41, 0x5d, 0x4c, 0x02, 0xf6, 0x94, 0xb2, 0x07, 0xd6, 0x93, 0x9e, - 0xd3, 0x67, 0x2f, 0x2d, 0x15, 0x94, 0x71, 0xe7, 0xd1, 0x91, 0xa3, 0xc9, 0xfb, 0x07, 0x70, 0xb3, - 0xc4, 0x2b, 0xba, 0x09, 0xcb, 0x42, 0x17, 0x50, 0xf1, 0xbc, 0x92, 0x99, 0x64, 0xec, 0xf4, 0x86, - 0x42, 0xb3, 0xb2, 0xff, 0x01, 0x6c, 0xaf, 0x11, 0x8b, 0x9a, 0x50, 0xef, 0xf6, 0x9f, 0x0e, 0xbe, - 0x74, 0xb0, 0x26, 0xb1, 0x4d, 0x5e, 0xeb, 0x9a, 0xbc, 0xbf, 0x2f, 0xc0, 0x2b, 0x74, 0x32, 0xcb, - 0x47, 0x03, 0xab, 0x73, 0xa4, 0x49, 0xcc, 0x3b, 0xab, 0x33, 0xb2, 0x3a, 0xb6, 0x63, 0x6b, 0xf2, - 0x23, 0xf3, 0xd7, 0x97, 0xbb, 0xd2, 0xef, 0x2f, 0x77, 0xa5, 0x3f, 0x5e, 0xee, 0x4a, 0x3f, 0xfc, - 0xb9, 0xfb, 0x3f, 0xb8, 0xe3, 0xc5, 0x91, 0xc9, 0x3f, 0x6c, 0x4c, 0xef, 0x99, 0x58, 0x9c, 0x89, - 0xef, 0x9a, 0xaf, 0xe7, 0xd3, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xc9, 0x16, 0xd6, 0xa6, 0x4f, - 0x0d, 0x00, 0x00, -} diff --git a/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Datatypes/mysqlx_datatypes.pb.go b/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Datatypes/mysqlx_datatypes.pb.go deleted file mode 100644 index 5df996592a85c..0000000000000 --- a/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Datatypes/mysqlx_datatypes.pb.go +++ /dev/null @@ -1,1928 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/pingcap/tipb/go-mysqlx/Datatypes/mysqlx_datatypes.proto - -/* - Package Mysqlx_Datatypes is a generated protocol buffer package. - - It is generated from these files: - github.com/pingcap/tipb/go-mysqlx/Datatypes/mysqlx_datatypes.proto - - It has these top-level messages: - Scalar - Object - Array - Any -*/ -package Mysqlx_Datatypes - -import ( - "fmt" - - proto "github.com/golang/protobuf/proto" - - math "math" - - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - - io "io" -) - -// 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 Scalar_Type int32 - -const ( - Scalar_V_SINT Scalar_Type = 1 - Scalar_V_UINT Scalar_Type = 2 - Scalar_V_NULL Scalar_Type = 3 - Scalar_V_OCTETS Scalar_Type = 4 - Scalar_V_DOUBLE Scalar_Type = 5 - Scalar_V_FLOAT Scalar_Type = 6 - Scalar_V_BOOL Scalar_Type = 7 - Scalar_V_STRING Scalar_Type = 8 -) - -var Scalar_Type_name = map[int32]string{ - 1: "V_SINT", - 2: "V_UINT", - 3: "V_NULL", - 4: "V_OCTETS", - 5: "V_DOUBLE", - 6: "V_FLOAT", - 7: "V_BOOL", - 8: "V_STRING", -} -var Scalar_Type_value = map[string]int32{ - "V_SINT": 1, - "V_UINT": 2, - "V_NULL": 3, - "V_OCTETS": 4, - "V_DOUBLE": 5, - "V_FLOAT": 6, - "V_BOOL": 7, - "V_STRING": 8, -} - -func (x Scalar_Type) Enum() *Scalar_Type { - p := new(Scalar_Type) - *p = x - return p -} -func (x Scalar_Type) String() string { - return proto.EnumName(Scalar_Type_name, int32(x)) -} -func (x *Scalar_Type) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Scalar_Type_value, data, "Scalar_Type") - if err != nil { - return err - } - *x = Scalar_Type(value) - return nil -} -func (Scalar_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorMysqlxDatatypes, []int{0, 0} } - -type Any_Type int32 - -const ( - Any_SCALAR Any_Type = 1 - Any_OBJECT Any_Type = 2 - Any_ARRAY Any_Type = 3 -) - -var Any_Type_name = map[int32]string{ - 1: "SCALAR", - 2: "OBJECT", - 3: "ARRAY", -} -var Any_Type_value = map[string]int32{ - "SCALAR": 1, - "OBJECT": 2, - "ARRAY": 3, -} - -func (x Any_Type) Enum() *Any_Type { - p := new(Any_Type) - *p = x - return p -} -func (x Any_Type) String() string { - return proto.EnumName(Any_Type_name, int32(x)) -} -func (x *Any_Type) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Any_Type_value, data, "Any_Type") - if err != nil { - return err - } - *x = Any_Type(value) - return nil -} -func (Any_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorMysqlxDatatypes, []int{3, 0} } - -// a scalar -type Scalar struct { - Type *Scalar_Type `protobuf:"varint,1,req,name=type,enum=Mysqlx.Datatypes.Scalar_Type" json:"type,omitempty"` - VSignedInt *int64 `protobuf:"zigzag64,2,opt,name=v_signed_int,json=vSignedInt" json:"v_signed_int,omitempty"` - VUnsignedInt *uint64 `protobuf:"varint,3,opt,name=v_unsigned_int,json=vUnsignedInt" json:"v_unsigned_int,omitempty"` - // 4 is unused, was Null which doesn't have a storage anymore - VOctets *Scalar_Octets `protobuf:"bytes,5,opt,name=v_octets,json=vOctets" json:"v_octets,omitempty"` - VDouble *float64 `protobuf:"fixed64,6,opt,name=v_double,json=vDouble" json:"v_double,omitempty"` - VFloat *float32 `protobuf:"fixed32,7,opt,name=v_float,json=vFloat" json:"v_float,omitempty"` - VBool *bool `protobuf:"varint,8,opt,name=v_bool,json=vBool" json:"v_bool,omitempty"` - VString *Scalar_String `protobuf:"bytes,9,opt,name=v_string,json=vString" json:"v_string,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Scalar) Reset() { *m = Scalar{} } -func (m *Scalar) String() string { return proto.CompactTextString(m) } -func (*Scalar) ProtoMessage() {} -func (*Scalar) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxDatatypes, []int{0} } - -func (m *Scalar) GetType() Scalar_Type { - if m != nil && m.Type != nil { - return *m.Type - } - return Scalar_V_SINT -} - -func (m *Scalar) GetVSignedInt() int64 { - if m != nil && m.VSignedInt != nil { - return *m.VSignedInt - } - return 0 -} - -func (m *Scalar) GetVUnsignedInt() uint64 { - if m != nil && m.VUnsignedInt != nil { - return *m.VUnsignedInt - } - return 0 -} - -func (m *Scalar) GetVOctets() *Scalar_Octets { - if m != nil { - return m.VOctets - } - return nil -} - -func (m *Scalar) GetVDouble() float64 { - if m != nil && m.VDouble != nil { - return *m.VDouble - } - return 0 -} - -func (m *Scalar) GetVFloat() float32 { - if m != nil && m.VFloat != nil { - return *m.VFloat - } - return 0 -} - -func (m *Scalar) GetVBool() bool { - if m != nil && m.VBool != nil { - return *m.VBool - } - return false -} - -func (m *Scalar) GetVString() *Scalar_String { - if m != nil { - return m.VString - } - return nil -} - -// a string with a charset/collation -type Scalar_String struct { - Value []byte `protobuf:"bytes,1,req,name=value" json:"value,omitempty"` - Collation *uint64 `protobuf:"varint,2,opt,name=collation" json:"collation,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Scalar_String) Reset() { *m = Scalar_String{} } -func (m *Scalar_String) String() string { return proto.CompactTextString(m) } -func (*Scalar_String) ProtoMessage() {} -func (*Scalar_String) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxDatatypes, []int{0, 0} } - -func (m *Scalar_String) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func (m *Scalar_String) GetCollation() uint64 { - if m != nil && m.Collation != nil { - return *m.Collation - } - return 0 -} - -// an opaque octet sequence, with an optional content_type -// See ``Mysqlx.Resultset.ColumnMetadata`` for list of known values. -type Scalar_Octets struct { - Value []byte `protobuf:"bytes,1,req,name=value" json:"value,omitempty"` - ContentType *uint32 `protobuf:"varint,2,opt,name=content_type,json=contentType" json:"content_type,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Scalar_Octets) Reset() { *m = Scalar_Octets{} } -func (m *Scalar_Octets) String() string { return proto.CompactTextString(m) } -func (*Scalar_Octets) ProtoMessage() {} -func (*Scalar_Octets) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxDatatypes, []int{0, 1} } - -func (m *Scalar_Octets) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func (m *Scalar_Octets) GetContentType() uint32 { - if m != nil && m.ContentType != nil { - return *m.ContentType - } - return 0 -} - -// a object -type Object struct { - Fld []*Object_ObjectField `protobuf:"bytes,1,rep,name=fld" json:"fld,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Object) Reset() { *m = Object{} } -func (m *Object) String() string { return proto.CompactTextString(m) } -func (*Object) ProtoMessage() {} -func (*Object) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxDatatypes, []int{1} } - -func (m *Object) GetFld() []*Object_ObjectField { - if m != nil { - return m.Fld - } - return nil -} - -type Object_ObjectField struct { - Key *string `protobuf:"bytes,1,req,name=key" json:"key,omitempty"` - Value *Any `protobuf:"bytes,2,req,name=value" json:"value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Object_ObjectField) Reset() { *m = Object_ObjectField{} } -func (m *Object_ObjectField) String() string { return proto.CompactTextString(m) } -func (*Object_ObjectField) ProtoMessage() {} -func (*Object_ObjectField) Descriptor() ([]byte, []int) { - return fileDescriptorMysqlxDatatypes, []int{1, 0} -} - -func (m *Object_ObjectField) GetKey() string { - if m != nil && m.Key != nil { - return *m.Key - } - return "" -} - -func (m *Object_ObjectField) GetValue() *Any { - if m != nil { - return m.Value - } - return nil -} - -// a Array -type Array struct { - Value []*Any `protobuf:"bytes,1,rep,name=value" json:"value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Array) Reset() { *m = Array{} } -func (m *Array) String() string { return proto.CompactTextString(m) } -func (*Array) ProtoMessage() {} -func (*Array) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxDatatypes, []int{2} } - -func (m *Array) GetValue() []*Any { - if m != nil { - return m.Value - } - return nil -} - -// a helper to allow all field types -type Any struct { - Type *Any_Type `protobuf:"varint,1,req,name=type,enum=Mysqlx.Datatypes.Any_Type" json:"type,omitempty"` - Scalar *Scalar `protobuf:"bytes,2,opt,name=scalar" json:"scalar,omitempty"` - Obj *Object `protobuf:"bytes,3,opt,name=obj" json:"obj,omitempty"` - Array *Array `protobuf:"bytes,4,opt,name=array" json:"array,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Any) Reset() { *m = Any{} } -func (m *Any) String() string { return proto.CompactTextString(m) } -func (*Any) ProtoMessage() {} -func (*Any) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxDatatypes, []int{3} } - -func (m *Any) GetType() Any_Type { - if m != nil && m.Type != nil { - return *m.Type - } - return Any_SCALAR -} - -func (m *Any) GetScalar() *Scalar { - if m != nil { - return m.Scalar - } - return nil -} - -func (m *Any) GetObj() *Object { - if m != nil { - return m.Obj - } - return nil -} - -func (m *Any) GetArray() *Array { - if m != nil { - return m.Array - } - return nil -} - -func init() { - proto.RegisterType((*Scalar)(nil), "Mysqlx.Datatypes.Scalar") - proto.RegisterType((*Scalar_String)(nil), "Mysqlx.Datatypes.Scalar.String") - proto.RegisterType((*Scalar_Octets)(nil), "Mysqlx.Datatypes.Scalar.Octets") - proto.RegisterType((*Object)(nil), "Mysqlx.Datatypes.Object") - proto.RegisterType((*Object_ObjectField)(nil), "Mysqlx.Datatypes.Object.ObjectField") - proto.RegisterType((*Array)(nil), "Mysqlx.Datatypes.Array") - proto.RegisterType((*Any)(nil), "Mysqlx.Datatypes.Any") - proto.RegisterEnum("Mysqlx.Datatypes.Scalar_Type", Scalar_Type_name, Scalar_Type_value) - proto.RegisterEnum("Mysqlx.Datatypes.Any_Type", Any_Type_name, Any_Type_value) -} -func (m *Scalar) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Scalar) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Type == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0x8 - i++ - i = encodeVarintMysqlxDatatypes(dAtA, i, uint64(*m.Type)) - } - if m.VSignedInt != nil { - dAtA[i] = 0x10 - i++ - i = encodeVarintMysqlxDatatypes(dAtA, i, uint64((uint64(*m.VSignedInt)<<1)^uint64((*m.VSignedInt>>63)))) - } - if m.VUnsignedInt != nil { - dAtA[i] = 0x18 - i++ - i = encodeVarintMysqlxDatatypes(dAtA, i, uint64(*m.VUnsignedInt)) - } - if m.VOctets != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintMysqlxDatatypes(dAtA, i, uint64(m.VOctets.Size())) - n1, err := m.VOctets.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.VDouble != nil { - dAtA[i] = 0x31 - i++ - i = encodeFixed64MysqlxDatatypes(dAtA, i, uint64(math.Float64bits(float64(*m.VDouble)))) - } - if m.VFloat != nil { - dAtA[i] = 0x3d - i++ - i = encodeFixed32MysqlxDatatypes(dAtA, i, uint32(math.Float32bits(float32(*m.VFloat)))) - } - if m.VBool != nil { - dAtA[i] = 0x40 - i++ - if *m.VBool { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.VString != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintMysqlxDatatypes(dAtA, i, uint64(m.VString.Size())) - n2, err := m.VString.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Scalar_String) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Scalar_String) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Value == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxDatatypes(dAtA, i, uint64(len(m.Value))) - i += copy(dAtA[i:], m.Value) - } - if m.Collation != nil { - dAtA[i] = 0x10 - i++ - i = encodeVarintMysqlxDatatypes(dAtA, i, uint64(*m.Collation)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Scalar_Octets) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Scalar_Octets) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Value == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxDatatypes(dAtA, i, uint64(len(m.Value))) - i += copy(dAtA[i:], m.Value) - } - if m.ContentType != nil { - dAtA[i] = 0x10 - i++ - i = encodeVarintMysqlxDatatypes(dAtA, i, uint64(*m.ContentType)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Object) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Object) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Fld) > 0 { - for _, msg := range m.Fld { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxDatatypes(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Object_ObjectField) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Object_ObjectField) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Key == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxDatatypes(dAtA, i, uint64(len(*m.Key))) - i += copy(dAtA[i:], *m.Key) - } - if m.Value == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0x12 - i++ - i = encodeVarintMysqlxDatatypes(dAtA, i, uint64(m.Value.Size())) - n3, err := m.Value.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Array) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Array) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Value) > 0 { - for _, msg := range m.Value { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxDatatypes(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Any) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Any) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Type == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0x8 - i++ - i = encodeVarintMysqlxDatatypes(dAtA, i, uint64(*m.Type)) - } - if m.Scalar != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMysqlxDatatypes(dAtA, i, uint64(m.Scalar.Size())) - n4, err := m.Scalar.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.Obj != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintMysqlxDatatypes(dAtA, i, uint64(m.Obj.Size())) - n5, err := m.Obj.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.Array != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintMysqlxDatatypes(dAtA, i, uint64(m.Array.Size())) - n6, err := m.Array.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64MysqlxDatatypes(dAtA []byte, offset int, v uint64) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - dAtA[offset+4] = uint8(v >> 32) - dAtA[offset+5] = uint8(v >> 40) - dAtA[offset+6] = uint8(v >> 48) - dAtA[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32MysqlxDatatypes(dAtA []byte, offset int, v uint32) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintMysqlxDatatypes(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *Scalar) Size() (n int) { - var l int - _ = l - if m.Type != nil { - n += 1 + sovMysqlxDatatypes(uint64(*m.Type)) - } - if m.VSignedInt != nil { - n += 1 + sozMysqlxDatatypes(uint64(*m.VSignedInt)) - } - if m.VUnsignedInt != nil { - n += 1 + sovMysqlxDatatypes(uint64(*m.VUnsignedInt)) - } - if m.VOctets != nil { - l = m.VOctets.Size() - n += 1 + l + sovMysqlxDatatypes(uint64(l)) - } - if m.VDouble != nil { - n += 9 - } - if m.VFloat != nil { - n += 5 - } - if m.VBool != nil { - n += 2 - } - if m.VString != nil { - l = m.VString.Size() - n += 1 + l + sovMysqlxDatatypes(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Scalar_String) Size() (n int) { - var l int - _ = l - if m.Value != nil { - l = len(m.Value) - n += 1 + l + sovMysqlxDatatypes(uint64(l)) - } - if m.Collation != nil { - n += 1 + sovMysqlxDatatypes(uint64(*m.Collation)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Scalar_Octets) Size() (n int) { - var l int - _ = l - if m.Value != nil { - l = len(m.Value) - n += 1 + l + sovMysqlxDatatypes(uint64(l)) - } - if m.ContentType != nil { - n += 1 + sovMysqlxDatatypes(uint64(*m.ContentType)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Object) Size() (n int) { - var l int - _ = l - if len(m.Fld) > 0 { - for _, e := range m.Fld { - l = e.Size() - n += 1 + l + sovMysqlxDatatypes(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Object_ObjectField) Size() (n int) { - var l int - _ = l - if m.Key != nil { - l = len(*m.Key) - n += 1 + l + sovMysqlxDatatypes(uint64(l)) - } - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovMysqlxDatatypes(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Array) Size() (n int) { - var l int - _ = l - if len(m.Value) > 0 { - for _, e := range m.Value { - l = e.Size() - n += 1 + l + sovMysqlxDatatypes(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Any) Size() (n int) { - var l int - _ = l - if m.Type != nil { - n += 1 + sovMysqlxDatatypes(uint64(*m.Type)) - } - if m.Scalar != nil { - l = m.Scalar.Size() - n += 1 + l + sovMysqlxDatatypes(uint64(l)) - } - if m.Obj != nil { - l = m.Obj.Size() - n += 1 + l + sovMysqlxDatatypes(uint64(l)) - } - if m.Array != nil { - l = m.Array.Size() - n += 1 + l + sovMysqlxDatatypes(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMysqlxDatatypes(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozMysqlxDatatypes(x uint64) (n int) { - return sovMysqlxDatatypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Scalar) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Scalar: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Scalar: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var v Scalar_Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (Scalar_Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Type = &v - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VSignedInt", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) - v2 := int64(v) - m.VSignedInt = &v2 - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VUnsignedInt", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.VUnsignedInt = &v - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VOctets", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxDatatypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.VOctets == nil { - m.VOctets = &Scalar_Octets{} - } - if err := m.VOctets.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field VDouble", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 8 - v = uint64(dAtA[iNdEx-8]) - v |= uint64(dAtA[iNdEx-7]) << 8 - v |= uint64(dAtA[iNdEx-6]) << 16 - v |= uint64(dAtA[iNdEx-5]) << 24 - v |= uint64(dAtA[iNdEx-4]) << 32 - v |= uint64(dAtA[iNdEx-3]) << 40 - v |= uint64(dAtA[iNdEx-2]) << 48 - v |= uint64(dAtA[iNdEx-1]) << 56 - v2 := float64(math.Float64frombits(v)) - m.VDouble = &v2 - case 7: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field VFloat", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - iNdEx += 4 - v = uint32(dAtA[iNdEx-4]) - v |= uint32(dAtA[iNdEx-3]) << 8 - v |= uint32(dAtA[iNdEx-2]) << 16 - v |= uint32(dAtA[iNdEx-1]) << 24 - v2 := float32(math.Float32frombits(v)) - m.VFloat = &v2 - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VBool", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.VBool = &b - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VString", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxDatatypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.VString == nil { - m.VString = &Scalar_String{} - } - if err := m.VString.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxDatatypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxDatatypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Scalar_String) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: String: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: String: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMysqlxDatatypes - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Collation", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Collation = &v - default: - iNdEx = preIndex - skippy, err := skipMysqlxDatatypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxDatatypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Scalar_Octets) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Octets: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Octets: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMysqlxDatatypes - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ContentType", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.ContentType = &v - default: - iNdEx = preIndex - skippy, err := skipMysqlxDatatypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxDatatypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Object) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Object: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Object: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fld", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxDatatypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Fld = append(m.Fld, &Object_ObjectField{}) - if err := m.Fld[len(m.Fld)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxDatatypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxDatatypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Object_ObjectField) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ObjectField: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ObjectField: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlxDatatypes - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Key = &s - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxDatatypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = &Any{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - hasFields[0] |= uint64(0x00000002) - default: - iNdEx = preIndex - skippy, err := skipMysqlxDatatypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxDatatypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - if hasFields[0]&uint64(0x00000002) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Array) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Array: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Array: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxDatatypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value, &Any{}) - if err := m.Value[len(m.Value)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxDatatypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxDatatypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Any) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Any: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Any: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var v Any_Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (Any_Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Type = &v - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scalar", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxDatatypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Scalar == nil { - m.Scalar = &Scalar{} - } - if err := m.Scalar.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Obj", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxDatatypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Obj == nil { - m.Obj = &Object{} - } - if err := m.Obj.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Array", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxDatatypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Array == nil { - m.Array = &Array{} - } - if err := m.Array.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxDatatypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxDatatypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMysqlxDatatypes(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthMysqlxDatatypes - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxDatatypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipMysqlxDatatypes(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthMysqlxDatatypes = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMysqlxDatatypes = fmt.Errorf("proto: integer overflow") -) - -func init() { - proto.RegisterFile("github.com/pingcap/tipb/go-mysqlx/Datatypes/mysqlx_datatypes.proto", fileDescriptorMysqlxDatatypes) -} - -var fileDescriptorMysqlxDatatypes = []byte{ - // 616 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x84, 0x94, 0xcd, 0x6e, 0xd3, 0x4a, - 0x14, 0xc7, 0xef, 0xc4, 0x5f, 0xc9, 0x71, 0x6e, 0x65, 0x8d, 0x6e, 0x55, 0xdf, 0xa8, 0x04, 0x13, - 0x55, 0xc2, 0x80, 0x70, 0x21, 0x42, 0x2c, 0x10, 0x1b, 0xa7, 0x1f, 0xa8, 0xc8, 0xd4, 0xd2, 0x38, - 0xa9, 0xc4, 0xca, 0x72, 0x1c, 0xb7, 0x4a, 0x71, 0x3d, 0x25, 0x99, 0x8c, 0x9a, 0x97, 0x60, 0xcd, - 0x93, 0xf0, 0x0c, 0x2c, 0x79, 0x04, 0x54, 0xd6, 0xbc, 0x03, 0x9a, 0x99, 0x94, 0x06, 0x9a, 0xc2, - 0xca, 0xff, 0xf3, 0xcf, 0xef, 0x4c, 0xce, 0x9c, 0x73, 0x34, 0x70, 0xff, 0xcd, 0x7c, 0xfa, 0xbe, - 0xbc, 0xd8, 0xde, 0xcd, 0x58, 0xc6, 0xe6, 0xe7, 0xc5, 0x74, 0xfb, 0x4c, 0x1a, 0xe9, 0xe8, 0xca, - 0x08, 0xce, 0x27, 0x94, 0x51, 0xec, 0x28, 0x30, 0xf8, 0x09, 0x76, 0x3e, 0xe9, 0x60, 0x26, 0x79, - 0x56, 0x66, 0x13, 0xfc, 0x14, 0x74, 0xe1, 0xb9, 0xc8, 0xab, 0xf9, 0x6b, 0xdd, 0x3b, 0xc1, 0xef, - 0x6c, 0xa0, 0xb8, 0xa0, 0x3f, 0x3f, 0x2f, 0x88, 0x44, 0xb1, 0x07, 0x4d, 0x9e, 0x4e, 0xc7, 0x27, - 0x55, 0x31, 0x4a, 0xc7, 0x15, 0x73, 0x6b, 0x1e, 0xf2, 0x31, 0x01, 0x9e, 0x48, 0xeb, 0xa0, 0x62, - 0x78, 0x0b, 0xd6, 0x78, 0x3a, 0xab, 0x96, 0x18, 0xcd, 0x43, 0xbe, 0x4e, 0x9a, 0x7c, 0xb0, 0x30, - 0x05, 0xf5, 0x02, 0xea, 0x3c, 0xa5, 0x39, 0x2b, 0xd8, 0xd4, 0x35, 0x3c, 0xe4, 0xdb, 0xdd, 0xbb, - 0xb7, 0xfe, 0x7d, 0x2c, 0x31, 0x62, 0x71, 0x25, 0xf0, 0xff, 0x22, 0x77, 0x44, 0x67, 0xc3, 0xb2, - 0x70, 0x4d, 0x0f, 0xf9, 0x88, 0x58, 0x7c, 0x57, 0x86, 0x78, 0x03, 0x2c, 0x9e, 0x1e, 0x97, 0x34, - 0x63, 0xae, 0xe5, 0x21, 0xbf, 0x46, 0x4c, 0xbe, 0x2f, 0x22, 0xbc, 0x0e, 0x26, 0x4f, 0x87, 0x94, - 0x96, 0x6e, 0xdd, 0x43, 0x7e, 0x9d, 0x18, 0xbc, 0x47, 0x69, 0xa9, 0xca, 0x98, 0xb2, 0xc9, 0xb8, - 0x3a, 0x71, 0x1b, 0x7f, 0x29, 0x23, 0x91, 0x18, 0xb1, 0xb8, 0x12, 0xad, 0x97, 0x60, 0x2a, 0x85, - 0xff, 0x03, 0x83, 0x67, 0xe5, 0x4c, 0x35, 0xb2, 0x49, 0x54, 0x80, 0x37, 0xa1, 0x91, 0xd3, 0xb2, - 0xcc, 0xd8, 0x98, 0x56, 0xb2, 0x4f, 0x3a, 0xb9, 0x36, 0x5a, 0x21, 0x98, 0x8b, 0xeb, 0xac, 0xce, - 0xbe, 0x07, 0xcd, 0x9c, 0x56, 0xac, 0xa8, 0x58, 0x2a, 0x67, 0x24, 0x0e, 0xf8, 0x97, 0xd8, 0x0b, - 0x4f, 0x4c, 0xa4, 0x73, 0x06, 0xba, 0xf8, 0x62, 0x00, 0xf3, 0x28, 0x4d, 0x0e, 0x0e, 0xfb, 0x0e, - 0x52, 0x7a, 0x20, 0x74, 0x4d, 0xe9, 0xc3, 0x41, 0x14, 0x39, 0x1a, 0x6e, 0x42, 0xfd, 0x28, 0x8d, - 0x77, 0xfa, 0x7b, 0xfd, 0xc4, 0xd1, 0x55, 0xb4, 0x1b, 0x0f, 0x7a, 0xd1, 0x9e, 0x63, 0x60, 0x1b, - 0xac, 0xa3, 0x74, 0x3f, 0x8a, 0xc3, 0xbe, 0x63, 0xaa, 0xa4, 0x5e, 0x1c, 0x47, 0x8e, 0xa5, 0xb0, - 0xa4, 0x4f, 0x0e, 0x0e, 0x5f, 0x39, 0xf5, 0xce, 0x07, 0x04, 0x66, 0x3c, 0x3c, 0x2d, 0x72, 0x86, - 0x9f, 0x83, 0x76, 0x5c, 0x8e, 0x5c, 0xe4, 0x69, 0xbe, 0xdd, 0xdd, 0xba, 0xd9, 0x31, 0x85, 0x2d, - 0x3e, 0xfb, 0xe3, 0xa2, 0x1c, 0x11, 0x91, 0xd0, 0x8a, 0xc0, 0x5e, 0xf2, 0xb0, 0x03, 0xda, 0xbb, - 0x62, 0x2e, 0xef, 0xdd, 0x20, 0x42, 0xe2, 0x47, 0x57, 0xbd, 0xa8, 0x79, 0x35, 0xdf, 0xee, 0xae, - 0xdf, 0x3c, 0x3a, 0xac, 0xe6, 0x8b, 0x16, 0x75, 0x9e, 0x81, 0x11, 0x4e, 0x26, 0xd9, 0x52, 0x96, - 0x2a, 0xe8, 0xcf, 0x59, 0xdf, 0x11, 0x68, 0x61, 0x35, 0xc7, 0xc1, 0x2f, 0xcb, 0xdf, 0x5a, 0x99, - 0xb3, 0xbc, 0xf9, 0x4f, 0xc0, 0x9c, 0xca, 0x45, 0x90, 0xa3, 0xb0, 0xbb, 0xee, 0x6d, 0x8b, 0x42, - 0x16, 0x1c, 0x7e, 0x08, 0x1a, 0x1d, 0x9e, 0xca, 0xf5, 0x5f, 0x89, 0xab, 0x56, 0x10, 0x01, 0xe1, - 0xc7, 0x60, 0x64, 0xe2, 0x2e, 0xae, 0x2e, 0xe9, 0x8d, 0x15, 0xe5, 0x88, 0x9f, 0x89, 0xa2, 0x3a, - 0x0f, 0xae, 0x47, 0x9f, 0xec, 0x84, 0x51, 0x48, 0xd4, 0xe8, 0xe3, 0xde, 0xeb, 0xbd, 0x1d, 0x31, - 0xfa, 0x06, 0x18, 0x21, 0x21, 0xe1, 0x5b, 0x47, 0xeb, 0x05, 0x9f, 0x2f, 0xdb, 0xe8, 0xcb, 0x65, - 0x1b, 0x7d, 0xbd, 0x6c, 0xa3, 0x8f, 0xdf, 0xda, 0xff, 0xc0, 0x66, 0x4e, 0xcf, 0x02, 0xf9, 0x5e, - 0x04, 0xf9, 0xa9, 0x12, 0x17, 0xea, 0xb9, 0x18, 0xce, 0x8e, 0x7f, 0x04, 0x00, 0x00, 0xff, 0xff, - 0x15, 0x19, 0x37, 0x53, 0x5b, 0x04, 0x00, 0x00, -} diff --git a/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Expect/mysqlx_expect.pb.go b/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Expect/mysqlx_expect.pb.go deleted file mode 100644 index 44d85ac830724..0000000000000 --- a/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Expect/mysqlx_expect.pb.go +++ /dev/null @@ -1,807 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/pingcap/tipb/go-mysqlx/Expect/mysqlx_expect.proto - -/* - Package Mysqlx_Expect is a generated protocol buffer package. - - Expect operations - - It is generated from these files: - github.com/pingcap/tipb/go-mysqlx/Expect/mysqlx_expect.proto - - It has these top-level messages: - Open - Close -*/ -package Mysqlx_Expect - -import ( - "fmt" - - proto "github.com/golang/protobuf/proto" - - math "math" - - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - - io "io" -) - -// 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 Open_CtxOperation int32 - -const ( - // copy the operations from the parent Expect-block - Open_EXPECT_CTX_COPY_PREV Open_CtxOperation = 0 - // start with a empty set of operations - Open_EXPECT_CTX_EMPTY Open_CtxOperation = 1 -) - -var Open_CtxOperation_name = map[int32]string{ - 0: "EXPECT_CTX_COPY_PREV", - 1: "EXPECT_CTX_EMPTY", -} -var Open_CtxOperation_value = map[string]int32{ - "EXPECT_CTX_COPY_PREV": 0, - "EXPECT_CTX_EMPTY": 1, -} - -func (x Open_CtxOperation) Enum() *Open_CtxOperation { - p := new(Open_CtxOperation) - *p = x - return p -} -func (x Open_CtxOperation) String() string { - return proto.EnumName(Open_CtxOperation_name, int32(x)) -} -func (x *Open_CtxOperation) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Open_CtxOperation_value, data, "Open_CtxOperation") - if err != nil { - return err - } - *x = Open_CtxOperation(value) - return nil -} -func (Open_CtxOperation) EnumDescriptor() ([]byte, []int) { - return fileDescriptorMysqlxExpect, []int{0, 0} -} - -type Open_Condition_ConditionOperation int32 - -const ( - // set the condition - // - // set, if not set - // overwrite, if set - Open_Condition_EXPECT_OP_SET Open_Condition_ConditionOperation = 0 - // unset the condition - Open_Condition_EXPECT_OP_UNSET Open_Condition_ConditionOperation = 1 -) - -var Open_Condition_ConditionOperation_name = map[int32]string{ - 0: "EXPECT_OP_SET", - 1: "EXPECT_OP_UNSET", -} -var Open_Condition_ConditionOperation_value = map[string]int32{ - "EXPECT_OP_SET": 0, - "EXPECT_OP_UNSET": 1, -} - -func (x Open_Condition_ConditionOperation) Enum() *Open_Condition_ConditionOperation { - p := new(Open_Condition_ConditionOperation) - *p = x - return p -} -func (x Open_Condition_ConditionOperation) String() string { - return proto.EnumName(Open_Condition_ConditionOperation_name, int32(x)) -} -func (x *Open_Condition_ConditionOperation) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Open_Condition_ConditionOperation_value, data, "Open_Condition_ConditionOperation") - if err != nil { - return err - } - *x = Open_Condition_ConditionOperation(value) - return nil -} -func (Open_Condition_ConditionOperation) EnumDescriptor() ([]byte, []int) { - return fileDescriptorMysqlxExpect, []int{0, 0, 0} -} - -// open an Expect block and set/unset the conditions that have to be fulfilled -// -// if any of the conditions fail, all enclosed messages will fail with -// a Mysqlx.Error message. -// -// :returns: :protobuf:msg:`Mysqlx::Ok` on success, :protobuf:msg:`Mysqlx::Error` on error -// -type Open struct { - Op *Open_CtxOperation `protobuf:"varint,1,opt,name=op,enum=Mysqlx.Expect.Open_CtxOperation,def=0" json:"op,omitempty"` - Cond []*Open_Condition `protobuf:"bytes,2,rep,name=cond" json:"cond,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Open) Reset() { *m = Open{} } -func (m *Open) String() string { return proto.CompactTextString(m) } -func (*Open) ProtoMessage() {} -func (*Open) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxExpect, []int{0} } - -const Default_Open_Op Open_CtxOperation = Open_EXPECT_CTX_COPY_PREV - -func (m *Open) GetOp() Open_CtxOperation { - if m != nil && m.Op != nil { - return *m.Op - } - return Default_Open_Op -} - -func (m *Open) GetCond() []*Open_Condition { - if m != nil { - return m.Cond - } - return nil -} - -type Open_Condition struct { - ConditionKey *uint32 `protobuf:"varint,1,req,name=condition_key,json=conditionKey" json:"condition_key,omitempty"` - ConditionValue []byte `protobuf:"bytes,2,opt,name=condition_value,json=conditionValue" json:"condition_value,omitempty"` - Op *Open_Condition_ConditionOperation `protobuf:"varint,3,opt,name=op,enum=Mysqlx.Expect.Open_Condition_ConditionOperation,def=0" json:"op,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Open_Condition) Reset() { *m = Open_Condition{} } -func (m *Open_Condition) String() string { return proto.CompactTextString(m) } -func (*Open_Condition) ProtoMessage() {} -func (*Open_Condition) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxExpect, []int{0, 0} } - -const Default_Open_Condition_Op Open_Condition_ConditionOperation = Open_Condition_EXPECT_OP_SET - -func (m *Open_Condition) GetConditionKey() uint32 { - if m != nil && m.ConditionKey != nil { - return *m.ConditionKey - } - return 0 -} - -func (m *Open_Condition) GetConditionValue() []byte { - if m != nil { - return m.ConditionValue - } - return nil -} - -func (m *Open_Condition) GetOp() Open_Condition_ConditionOperation { - if m != nil && m.Op != nil { - return *m.Op - } - return Default_Open_Condition_Op -} - -// close a Expect block -// -// closing a Expect block restores the state of the previous Expect block -// for the following messages -// -// :returns: :protobuf:msg:`Mysqlx::Ok` on success, :protobuf:msg:`Mysqlx::Error` on error -type Close struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *Close) Reset() { *m = Close{} } -func (m *Close) String() string { return proto.CompactTextString(m) } -func (*Close) ProtoMessage() {} -func (*Close) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxExpect, []int{1} } - -func init() { - proto.RegisterType((*Open)(nil), "Mysqlx.Expect.Open") - proto.RegisterType((*Open_Condition)(nil), "Mysqlx.Expect.Open.Condition") - proto.RegisterType((*Close)(nil), "Mysqlx.Expect.Close") - proto.RegisterEnum("Mysqlx.Expect.Open_CtxOperation", Open_CtxOperation_name, Open_CtxOperation_value) - proto.RegisterEnum("Mysqlx.Expect.Open_Condition_ConditionOperation", Open_Condition_ConditionOperation_name, Open_Condition_ConditionOperation_value) -} -func (m *Open) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Open) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Op != nil { - dAtA[i] = 0x8 - i++ - i = encodeVarintMysqlxExpect(dAtA, i, uint64(*m.Op)) - } - if len(m.Cond) > 0 { - for _, msg := range m.Cond { - dAtA[i] = 0x12 - i++ - i = encodeVarintMysqlxExpect(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Open_Condition) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Open_Condition) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.ConditionKey == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0x8 - i++ - i = encodeVarintMysqlxExpect(dAtA, i, uint64(*m.ConditionKey)) - } - if m.ConditionValue != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMysqlxExpect(dAtA, i, uint64(len(m.ConditionValue))) - i += copy(dAtA[i:], m.ConditionValue) - } - if m.Op != nil { - dAtA[i] = 0x18 - i++ - i = encodeVarintMysqlxExpect(dAtA, i, uint64(*m.Op)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Close) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Close) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64MysqlxExpect(dAtA []byte, offset int, v uint64) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - dAtA[offset+4] = uint8(v >> 32) - dAtA[offset+5] = uint8(v >> 40) - dAtA[offset+6] = uint8(v >> 48) - dAtA[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32MysqlxExpect(dAtA []byte, offset int, v uint32) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintMysqlxExpect(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *Open) Size() (n int) { - var l int - _ = l - if m.Op != nil { - n += 1 + sovMysqlxExpect(uint64(*m.Op)) - } - if len(m.Cond) > 0 { - for _, e := range m.Cond { - l = e.Size() - n += 1 + l + sovMysqlxExpect(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Open_Condition) Size() (n int) { - var l int - _ = l - if m.ConditionKey != nil { - n += 1 + sovMysqlxExpect(uint64(*m.ConditionKey)) - } - if m.ConditionValue != nil { - l = len(m.ConditionValue) - n += 1 + l + sovMysqlxExpect(uint64(l)) - } - if m.Op != nil { - n += 1 + sovMysqlxExpect(uint64(*m.Op)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Close) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMysqlxExpect(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozMysqlxExpect(x uint64) (n int) { - return sovMysqlxExpect(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Open) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpect - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Open: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Open: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Op", wireType) - } - var v Open_CtxOperation - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpect - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (Open_CtxOperation(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Op = &v - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cond", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpect - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxExpect - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Cond = append(m.Cond, &Open_Condition{}) - if err := m.Cond[len(m.Cond)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxExpect(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxExpect - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Open_Condition) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpect - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Condition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Condition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ConditionKey", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpect - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.ConditionKey = &v - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConditionValue", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpect - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMysqlxExpect - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConditionValue = append(m.ConditionValue[:0], dAtA[iNdEx:postIndex]...) - if m.ConditionValue == nil { - m.ConditionValue = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Op", wireType) - } - var v Open_Condition_ConditionOperation - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpect - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (Open_Condition_ConditionOperation(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Op = &v - default: - iNdEx = preIndex - skippy, err := skipMysqlxExpect(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxExpect - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Close) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpect - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Close: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Close: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipMysqlxExpect(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxExpect - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMysqlxExpect(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxExpect - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxExpect - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxExpect - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthMysqlxExpect - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxExpect - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipMysqlxExpect(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthMysqlxExpect = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMysqlxExpect = fmt.Errorf("proto: integer overflow") -) - -func init() { - proto.RegisterFile("github.com/pingcap/tipb/go-mysqlx/Expect/mysqlx_expect.proto", fileDescriptorMysqlxExpect) -} - -var fileDescriptorMysqlxExpect = []byte{ - // 335 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x52, 0xf4, 0xad, 0x2c, 0x2e, - 0xcc, 0xa9, 0xd0, 0x77, 0xad, 0x28, 0x48, 0x4d, 0x2e, 0xd1, 0xcf, 0x05, 0xf3, 0xe2, 0x53, 0xc1, - 0x3c, 0xbd, 0x82, 0xa2, 0xfc, 0x92, 0x7c, 0x21, 0x5e, 0x88, 0x12, 0x3d, 0x88, 0x12, 0xa5, 0x35, - 0xcc, 0x5c, 0x2c, 0xfe, 0x05, 0xa9, 0x79, 0x42, 0x6e, 0x5c, 0x4c, 0xf9, 0x05, 0x12, 0x8c, 0x0a, - 0x8c, 0x1a, 0x7c, 0x46, 0x0a, 0x7a, 0x28, 0x8a, 0xf4, 0x40, 0x0a, 0xf4, 0x9c, 0x4b, 0x2a, 0xfc, - 0x0b, 0x52, 0x8b, 0x12, 0x4b, 0x32, 0xf3, 0xf3, 0xac, 0x44, 0x5c, 0x23, 0x02, 0x5c, 0x9d, 0x43, - 0xe2, 0x9d, 0x43, 0x22, 0xe2, 0x9d, 0xfd, 0x03, 0x22, 0xe3, 0x03, 0x82, 0x5c, 0xc3, 0x82, 0x98, - 0xf2, 0x0b, 0x84, 0x0c, 0xb9, 0x58, 0x92, 0xf3, 0xf3, 0x52, 0x24, 0x98, 0x14, 0x98, 0x35, 0xb8, - 0x8d, 0x64, 0xb1, 0x9a, 0x94, 0x9f, 0x97, 0x92, 0x09, 0x32, 0x26, 0x08, 0xac, 0x54, 0xea, 0x05, - 0x23, 0x17, 0x27, 0x5c, 0x4c, 0x48, 0x99, 0x8b, 0x37, 0x19, 0xc6, 0x89, 0xcf, 0x4e, 0xad, 0x94, - 0x60, 0x54, 0x60, 0xd2, 0xe0, 0x0d, 0xe2, 0x81, 0x0b, 0x7a, 0xa7, 0x56, 0x0a, 0xa9, 0x73, 0xf1, - 0x23, 0x14, 0x95, 0x25, 0xe6, 0x94, 0xa6, 0x4a, 0x30, 0x29, 0x30, 0x6a, 0xf0, 0x04, 0xf1, 0xc1, - 0x85, 0xc3, 0x40, 0xa2, 0x42, 0xfe, 0x60, 0x6f, 0x31, 0x83, 0xbd, 0x65, 0x80, 0xd7, 0x31, 0x08, - 0x16, 0xc2, 0x9b, 0xbc, 0x50, 0x6f, 0xfa, 0x07, 0xc4, 0x07, 0xbb, 0x86, 0x80, 0xfc, 0xa7, 0x64, - 0xc3, 0x25, 0x84, 0xa9, 0x50, 0x48, 0x90, 0x0b, 0x55, 0xa9, 0x00, 0x83, 0x90, 0x30, 0x17, 0x3f, - 0x42, 0x28, 0xd4, 0x0f, 0x24, 0xc8, 0xa8, 0x64, 0xc7, 0xc5, 0x83, 0x1c, 0x8e, 0x42, 0x12, 0x5c, - 0x58, 0x43, 0x52, 0x80, 0x41, 0x48, 0x84, 0x4b, 0x00, 0x49, 0xc6, 0xd5, 0x37, 0x20, 0x24, 0x52, - 0x80, 0x51, 0x89, 0x9d, 0x8b, 0xd5, 0x39, 0x27, 0xbf, 0x38, 0xd5, 0x49, 0xef, 0xc4, 0x23, 0x39, - 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf1, 0x58, 0x8e, 0x81, 0x4b, 0x26, - 0x39, 0x3f, 0x57, 0x0f, 0x1c, 0xe3, 0x7a, 0xc9, 0x59, 0x10, 0x46, 0x05, 0x24, 0xce, 0x93, 0x4a, - 0xd3, 0x00, 0x01, 0x00, 0x00, 0xff, 0xff, 0x37, 0x7c, 0x25, 0xf1, 0x1a, 0x02, 0x00, 0x00, -} diff --git a/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Expr/mysqlx_expr.pb.go b/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Expr/mysqlx_expr.pb.go deleted file mode 100644 index 52e04c9308984..0000000000000 --- a/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Expr/mysqlx_expr.pb.go +++ /dev/null @@ -1,2669 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/pingcap/tipb/go-mysqlx/Expr/mysqlx_expr.proto - -/* - Package Mysqlx_Expr is a generated protocol buffer package. - - Expression syntax - - expr is the fundamental structure in various places - of the SQL language: - - * ``SELECT AS ...`` - * ``WHERE `` - - The structures can be used to: - - * build an Item-tree in the MySQL Server - * generate SQL from it - * use as filter condition in CRUD's Find(), Update() and Delete() calls. - - It is generated from these files: - github.com/pingcap/tipb/go-mysqlx/Expr/mysqlx_expr.proto - - It has these top-level messages: - Expr - Identifier - DocumentPathItem - ColumnIdentifier - FunctionCall - Operator - Object - Array -*/ -package Mysqlx_Expr - -import ( - "fmt" - - proto "github.com/golang/protobuf/proto" - - math "math" - - Mysqlx_Datatypes "github.com/pingcap/tipb/go-mysqlx/Datatypes" - - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - - io "io" -) - -// 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 Expr_Type int32 - -const ( - Expr_IDENT Expr_Type = 1 - Expr_LITERAL Expr_Type = 2 - Expr_VARIABLE Expr_Type = 3 - Expr_FUNC_CALL Expr_Type = 4 - Expr_OPERATOR Expr_Type = 5 - Expr_PLACEHOLDER Expr_Type = 6 - Expr_OBJECT Expr_Type = 7 - Expr_ARRAY Expr_Type = 8 -) - -var Expr_Type_name = map[int32]string{ - 1: "IDENT", - 2: "LITERAL", - 3: "VARIABLE", - 4: "FUNC_CALL", - 5: "OPERATOR", - 6: "PLACEHOLDER", - 7: "OBJECT", - 8: "ARRAY", -} -var Expr_Type_value = map[string]int32{ - "IDENT": 1, - "LITERAL": 2, - "VARIABLE": 3, - "FUNC_CALL": 4, - "OPERATOR": 5, - "PLACEHOLDER": 6, - "OBJECT": 7, - "ARRAY": 8, -} - -func (x Expr_Type) Enum() *Expr_Type { - p := new(Expr_Type) - *p = x - return p -} -func (x Expr_Type) String() string { - return proto.EnumName(Expr_Type_name, int32(x)) -} -func (x *Expr_Type) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Expr_Type_value, data, "Expr_Type") - if err != nil { - return err - } - *x = Expr_Type(value) - return nil -} -func (Expr_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorMysqlxExpr, []int{0, 0} } - -type DocumentPathItem_Type int32 - -const ( - DocumentPathItem_MEMBER DocumentPathItem_Type = 1 - DocumentPathItem_MEMBER_ASTERISK DocumentPathItem_Type = 2 - DocumentPathItem_ARRAY_INDEX DocumentPathItem_Type = 3 - DocumentPathItem_ARRAY_INDEX_ASTERISK DocumentPathItem_Type = 4 - DocumentPathItem_DOUBLE_ASTERISK DocumentPathItem_Type = 5 -) - -var DocumentPathItem_Type_name = map[int32]string{ - 1: "MEMBER", - 2: "MEMBER_ASTERISK", - 3: "ARRAY_INDEX", - 4: "ARRAY_INDEX_ASTERISK", - 5: "DOUBLE_ASTERISK", -} -var DocumentPathItem_Type_value = map[string]int32{ - "MEMBER": 1, - "MEMBER_ASTERISK": 2, - "ARRAY_INDEX": 3, - "ARRAY_INDEX_ASTERISK": 4, - "DOUBLE_ASTERISK": 5, -} - -func (x DocumentPathItem_Type) Enum() *DocumentPathItem_Type { - p := new(DocumentPathItem_Type) - *p = x - return p -} -func (x DocumentPathItem_Type) String() string { - return proto.EnumName(DocumentPathItem_Type_name, int32(x)) -} -func (x *DocumentPathItem_Type) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(DocumentPathItem_Type_value, data, "DocumentPathItem_Type") - if err != nil { - return err - } - *x = DocumentPathItem_Type(value) - return nil -} -func (DocumentPathItem_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptorMysqlxExpr, []int{2, 0} -} - -// Expressions -// -// the "root" of the expression tree -// -// .. productionlist:: -// expr: `operator` | -// : `identifier` | -// : `function_call` | -// : variable | -// : `literal` | -// : placeholder -// -// If expression type is PLACEHOLDER then it refers to the value of a parameter -// specified when executing a statement (see `args` field of `StmtExecute` command). -// Field `position` (which must be present for such an expression) gives 0-based -// position of the parameter in the parameter list. -// -type Expr struct { - Type *Expr_Type `protobuf:"varint,1,req,name=type,enum=Mysqlx.Expr.Expr_Type" json:"type,omitempty"` - Identifier *ColumnIdentifier `protobuf:"bytes,2,opt,name=identifier" json:"identifier,omitempty"` - Variable *string `protobuf:"bytes,3,opt,name=variable" json:"variable,omitempty"` - Literal *Mysqlx_Datatypes.Scalar `protobuf:"bytes,4,opt,name=literal" json:"literal,omitempty"` - FunctionCall *FunctionCall `protobuf:"bytes,5,opt,name=function_call,json=functionCall" json:"function_call,omitempty"` - Operator *Operator `protobuf:"bytes,6,opt,name=operator" json:"operator,omitempty"` - Position *uint32 `protobuf:"varint,7,opt,name=position" json:"position,omitempty"` - Object *Object `protobuf:"bytes,8,opt,name=object" json:"object,omitempty"` - Array *Array `protobuf:"bytes,9,opt,name=array" json:"array,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Expr) Reset() { *m = Expr{} } -func (m *Expr) String() string { return proto.CompactTextString(m) } -func (*Expr) ProtoMessage() {} -func (*Expr) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxExpr, []int{0} } - -func (m *Expr) GetType() Expr_Type { - if m != nil && m.Type != nil { - return *m.Type - } - return Expr_IDENT -} - -func (m *Expr) GetIdentifier() *ColumnIdentifier { - if m != nil { - return m.Identifier - } - return nil -} - -func (m *Expr) GetVariable() string { - if m != nil && m.Variable != nil { - return *m.Variable - } - return "" -} - -func (m *Expr) GetLiteral() *Mysqlx_Datatypes.Scalar { - if m != nil { - return m.Literal - } - return nil -} - -func (m *Expr) GetFunctionCall() *FunctionCall { - if m != nil { - return m.FunctionCall - } - return nil -} - -func (m *Expr) GetOperator() *Operator { - if m != nil { - return m.Operator - } - return nil -} - -func (m *Expr) GetPosition() uint32 { - if m != nil && m.Position != nil { - return *m.Position - } - return 0 -} - -func (m *Expr) GetObject() *Object { - if m != nil { - return m.Object - } - return nil -} - -func (m *Expr) GetArray() *Array { - if m != nil { - return m.Array - } - return nil -} - -// identifier: name, schame.name -// -// .. productionlist:: -// identifier: string "." string | -// : string -type Identifier struct { - Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` - SchemaName *string `protobuf:"bytes,2,opt,name=schema_name,json=schemaName" json:"schema_name,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Identifier) Reset() { *m = Identifier{} } -func (m *Identifier) String() string { return proto.CompactTextString(m) } -func (*Identifier) ProtoMessage() {} -func (*Identifier) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxExpr, []int{1} } - -func (m *Identifier) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *Identifier) GetSchemaName() string { - if m != nil && m.SchemaName != nil { - return *m.SchemaName - } - return "" -} - -// DocumentPathItem -// -// .. productionlist:: -// document_path: path_item | path_item document_path -// path_item : member | array_index | "**" -// member : "." string | "." "*" -// array_index : "[" number "]" | "[" "*" "]" -// -type DocumentPathItem struct { - Type *DocumentPathItem_Type `protobuf:"varint,1,req,name=type,enum=Mysqlx.Expr.DocumentPathItem_Type" json:"type,omitempty"` - Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` - Index *uint32 `protobuf:"varint,3,opt,name=index" json:"index,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DocumentPathItem) Reset() { *m = DocumentPathItem{} } -func (m *DocumentPathItem) String() string { return proto.CompactTextString(m) } -func (*DocumentPathItem) ProtoMessage() {} -func (*DocumentPathItem) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxExpr, []int{2} } - -func (m *DocumentPathItem) GetType() DocumentPathItem_Type { - if m != nil && m.Type != nil { - return *m.Type - } - return DocumentPathItem_MEMBER -} - -func (m *DocumentPathItem) GetValue() string { - if m != nil && m.Value != nil { - return *m.Value - } - return "" -} - -func (m *DocumentPathItem) GetIndex() uint32 { - if m != nil && m.Index != nil { - return *m.Index - } - return 0 -} - -// col_identifier (table): col@doc_path, tbl.col@doc_path col, tbl.col, schema.tbl.col -// col_identifier (document): doc_path -// -// .. productionlist:: -// col_identifier: string "." string "." string | -// : string "." string | -// : string | -// : string "." string "." string "@" document_path | -// : string "." string "@" document_path | -// : string "@" document_path | -// : document_path -// document_path: member | arrayLocation | doubleAsterisk -// member = "." string | "." "*" -// arrayLocation = "[" index "]" | "[" "*" "]" -// doubleAsterisk = "**" -// -type ColumnIdentifier struct { - DocumentPath []*DocumentPathItem `protobuf:"bytes,1,rep,name=document_path,json=documentPath" json:"document_path,omitempty"` - Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` - TableName *string `protobuf:"bytes,3,opt,name=table_name,json=tableName" json:"table_name,omitempty"` - SchemaName *string `protobuf:"bytes,4,opt,name=schema_name,json=schemaName" json:"schema_name,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ColumnIdentifier) Reset() { *m = ColumnIdentifier{} } -func (m *ColumnIdentifier) String() string { return proto.CompactTextString(m) } -func (*ColumnIdentifier) ProtoMessage() {} -func (*ColumnIdentifier) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxExpr, []int{3} } - -func (m *ColumnIdentifier) GetDocumentPath() []*DocumentPathItem { - if m != nil { - return m.DocumentPath - } - return nil -} - -func (m *ColumnIdentifier) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *ColumnIdentifier) GetTableName() string { - if m != nil && m.TableName != nil { - return *m.TableName - } - return "" -} - -func (m *ColumnIdentifier) GetSchemaName() string { - if m != nil && m.SchemaName != nil { - return *m.SchemaName - } - return "" -} - -// function call: ``func(a, b, "1", 3)`` -// -// .. productionlist:: -// function_call: `identifier` "(" [ `expr` ["," `expr` ]* ] ")" -type FunctionCall struct { - Name *Identifier `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` - Param []*Expr `protobuf:"bytes,2,rep,name=param" json:"param,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *FunctionCall) Reset() { *m = FunctionCall{} } -func (m *FunctionCall) String() string { return proto.CompactTextString(m) } -func (*FunctionCall) ProtoMessage() {} -func (*FunctionCall) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxExpr, []int{4} } - -func (m *FunctionCall) GetName() *Identifier { - if m != nil { - return m.Name - } - return nil -} - -func (m *FunctionCall) GetParam() []*Expr { - if m != nil { - return m.Param - } - return nil -} - -// operator: ``<<(a, b)`` -// -// .. note:: -// -// Non-authoritative list of operators implemented (case sensitive): -// -// Nullary -// * ``*`` -// * ``default`` -// -// Unary -// * ``!`` -// * ``sign_plus`` -// * ``sign_minus`` -// * ``~`` -// -// Binary -// * ``&&`` -// * ``||`` -// * ``xor`` -// * ``==`` -// * ``!=`` -// * ``>`` -// * ``>=`` -// * ``<`` -// * ``<=`` -// * ``&`` -// * ``|`` -// * ``^`` -// * ``<<`` -// * ``>>`` -// * ``+`` -// * ``-`` -// * ``*`` -// * ``/`` -// * ``div`` -// * ``%`` -// * ``is`` -// * ``is_not`` -// * ``regexp`` -// * ``not_regexp`` -// * ``like`` -// * ``not_like`` -// * ``cast`` -// -// Using special representation, with more than 2 params -// * ``in`` (param[0] IN (param[1], param[2], ...)) -// * ``not_in`` (param[0] NOT IN (param[1], param[2], ...)) -// -// Ternary -// * ``between`` -// * ``between_not`` -// * ``date_add`` -// * ``date_sub`` -// -// Units for date_add/date_sub -// * ``MICROSECOND`` -// * ``SECOND`` -// * ``MINUTE`` -// * ``HOUR`` -// * ``DAY`` -// * ``WEEK`` -// * ``MONTH`` -// * ``QUARTER`` -// * ``YEAR`` -// * ``SECOND_MICROSECOND`` -// * ``MINUTE_MICROSECOND`` -// * ``MINUTE_SECOND`` -// * ``HOUR_MICROSECOND`` -// * ``HOUR_SECOND`` -// * ``HOUR_MINUTE`` -// * ``DAY_MICROSECOND`` -// * ``DAY_SECOND`` -// * ``DAY_MINUTE`` -// * ``DAY_HOUR`` -// -// Types for cast -// * ``BINARY[(N)]`` -// * ``CHAR[(N)]`` -// * ``DATE`` -// * ``DATETIME`` -// * ``DECIMAL[(M[,D])]`` -// * ``JSON`` -// * ``SIGNED [INTEGER]`` -// * ``TIME`` -// * ``UNSIGNED [INTEGER]`` -// -// .. productionlist:: -// operator: `name` "(" [ `expr` ["," `expr` ]* ] ")" -type Operator struct { - Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` - Param []*Expr `protobuf:"bytes,2,rep,name=param" json:"param,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Operator) Reset() { *m = Operator{} } -func (m *Operator) String() string { return proto.CompactTextString(m) } -func (*Operator) ProtoMessage() {} -func (*Operator) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxExpr, []int{5} } - -func (m *Operator) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *Operator) GetParam() []*Expr { - if m != nil { - return m.Param - } - return nil -} - -// an object (with expression values) -type Object struct { - Fld []*Object_ObjectField `protobuf:"bytes,1,rep,name=fld" json:"fld,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Object) Reset() { *m = Object{} } -func (m *Object) String() string { return proto.CompactTextString(m) } -func (*Object) ProtoMessage() {} -func (*Object) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxExpr, []int{6} } - -func (m *Object) GetFld() []*Object_ObjectField { - if m != nil { - return m.Fld - } - return nil -} - -type Object_ObjectField struct { - Key *string `protobuf:"bytes,1,req,name=key" json:"key,omitempty"` - Value *Expr `protobuf:"bytes,2,req,name=value" json:"value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Object_ObjectField) Reset() { *m = Object_ObjectField{} } -func (m *Object_ObjectField) String() string { return proto.CompactTextString(m) } -func (*Object_ObjectField) ProtoMessage() {} -func (*Object_ObjectField) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxExpr, []int{6, 0} } - -func (m *Object_ObjectField) GetKey() string { - if m != nil && m.Key != nil { - return *m.Key - } - return "" -} - -func (m *Object_ObjectField) GetValue() *Expr { - if m != nil { - return m.Value - } - return nil -} - -// a Array of expressions -type Array struct { - Value []*Expr `protobuf:"bytes,1,rep,name=value" json:"value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Array) Reset() { *m = Array{} } -func (m *Array) String() string { return proto.CompactTextString(m) } -func (*Array) ProtoMessage() {} -func (*Array) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxExpr, []int{7} } - -func (m *Array) GetValue() []*Expr { - if m != nil { - return m.Value - } - return nil -} - -func init() { - proto.RegisterType((*Expr)(nil), "Mysqlx.Expr.Expr") - proto.RegisterType((*Identifier)(nil), "Mysqlx.Expr.Identifier") - proto.RegisterType((*DocumentPathItem)(nil), "Mysqlx.Expr.DocumentPathItem") - proto.RegisterType((*ColumnIdentifier)(nil), "Mysqlx.Expr.ColumnIdentifier") - proto.RegisterType((*FunctionCall)(nil), "Mysqlx.Expr.FunctionCall") - proto.RegisterType((*Operator)(nil), "Mysqlx.Expr.Operator") - proto.RegisterType((*Object)(nil), "Mysqlx.Expr.Object") - proto.RegisterType((*Object_ObjectField)(nil), "Mysqlx.Expr.Object.ObjectField") - proto.RegisterType((*Array)(nil), "Mysqlx.Expr.Array") - proto.RegisterEnum("Mysqlx.Expr.Expr_Type", Expr_Type_name, Expr_Type_value) - proto.RegisterEnum("Mysqlx.Expr.DocumentPathItem_Type", DocumentPathItem_Type_name, DocumentPathItem_Type_value) -} -func (m *Expr) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Expr) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Type == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0x8 - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(*m.Type)) - } - if m.Identifier != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(m.Identifier.Size())) - n1, err := m.Identifier.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.Variable != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(len(*m.Variable))) - i += copy(dAtA[i:], *m.Variable) - } - if m.Literal != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(m.Literal.Size())) - n2, err := m.Literal.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.FunctionCall != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(m.FunctionCall.Size())) - n3, err := m.FunctionCall.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.Operator != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(m.Operator.Size())) - n4, err := m.Operator.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.Position != nil { - dAtA[i] = 0x38 - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(*m.Position)) - } - if m.Object != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(m.Object.Size())) - n5, err := m.Object.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.Array != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(m.Array.Size())) - n6, err := m.Array.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Identifier) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Identifier) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Name == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(len(*m.Name))) - i += copy(dAtA[i:], *m.Name) - } - if m.SchemaName != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(len(*m.SchemaName))) - i += copy(dAtA[i:], *m.SchemaName) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *DocumentPathItem) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DocumentPathItem) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Type == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0x8 - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(*m.Type)) - } - if m.Value != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(len(*m.Value))) - i += copy(dAtA[i:], *m.Value) - } - if m.Index != nil { - dAtA[i] = 0x18 - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(*m.Index)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ColumnIdentifier) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ColumnIdentifier) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.DocumentPath) > 0 { - for _, msg := range m.DocumentPath { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Name != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(len(*m.Name))) - i += copy(dAtA[i:], *m.Name) - } - if m.TableName != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(len(*m.TableName))) - i += copy(dAtA[i:], *m.TableName) - } - if m.SchemaName != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(len(*m.SchemaName))) - i += copy(dAtA[i:], *m.SchemaName) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *FunctionCall) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FunctionCall) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Name == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(m.Name.Size())) - n7, err := m.Name.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - if len(m.Param) > 0 { - for _, msg := range m.Param { - dAtA[i] = 0x12 - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Operator) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Operator) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Name == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(len(*m.Name))) - i += copy(dAtA[i:], *m.Name) - } - if len(m.Param) > 0 { - for _, msg := range m.Param { - dAtA[i] = 0x12 - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Object) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Object) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Fld) > 0 { - for _, msg := range m.Fld { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Object_ObjectField) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Object_ObjectField) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Key == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(len(*m.Key))) - i += copy(dAtA[i:], *m.Key) - } - if m.Value == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0x12 - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(m.Value.Size())) - n8, err := m.Value.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Array) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Array) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Value) > 0 { - for _, msg := range m.Value { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxExpr(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64MysqlxExpr(dAtA []byte, offset int, v uint64) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - dAtA[offset+4] = uint8(v >> 32) - dAtA[offset+5] = uint8(v >> 40) - dAtA[offset+6] = uint8(v >> 48) - dAtA[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32MysqlxExpr(dAtA []byte, offset int, v uint32) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintMysqlxExpr(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *Expr) Size() (n int) { - var l int - _ = l - if m.Type != nil { - n += 1 + sovMysqlxExpr(uint64(*m.Type)) - } - if m.Identifier != nil { - l = m.Identifier.Size() - n += 1 + l + sovMysqlxExpr(uint64(l)) - } - if m.Variable != nil { - l = len(*m.Variable) - n += 1 + l + sovMysqlxExpr(uint64(l)) - } - if m.Literal != nil { - l = m.Literal.Size() - n += 1 + l + sovMysqlxExpr(uint64(l)) - } - if m.FunctionCall != nil { - l = m.FunctionCall.Size() - n += 1 + l + sovMysqlxExpr(uint64(l)) - } - if m.Operator != nil { - l = m.Operator.Size() - n += 1 + l + sovMysqlxExpr(uint64(l)) - } - if m.Position != nil { - n += 1 + sovMysqlxExpr(uint64(*m.Position)) - } - if m.Object != nil { - l = m.Object.Size() - n += 1 + l + sovMysqlxExpr(uint64(l)) - } - if m.Array != nil { - l = m.Array.Size() - n += 1 + l + sovMysqlxExpr(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Identifier) Size() (n int) { - var l int - _ = l - if m.Name != nil { - l = len(*m.Name) - n += 1 + l + sovMysqlxExpr(uint64(l)) - } - if m.SchemaName != nil { - l = len(*m.SchemaName) - n += 1 + l + sovMysqlxExpr(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *DocumentPathItem) Size() (n int) { - var l int - _ = l - if m.Type != nil { - n += 1 + sovMysqlxExpr(uint64(*m.Type)) - } - if m.Value != nil { - l = len(*m.Value) - n += 1 + l + sovMysqlxExpr(uint64(l)) - } - if m.Index != nil { - n += 1 + sovMysqlxExpr(uint64(*m.Index)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ColumnIdentifier) Size() (n int) { - var l int - _ = l - if len(m.DocumentPath) > 0 { - for _, e := range m.DocumentPath { - l = e.Size() - n += 1 + l + sovMysqlxExpr(uint64(l)) - } - } - if m.Name != nil { - l = len(*m.Name) - n += 1 + l + sovMysqlxExpr(uint64(l)) - } - if m.TableName != nil { - l = len(*m.TableName) - n += 1 + l + sovMysqlxExpr(uint64(l)) - } - if m.SchemaName != nil { - l = len(*m.SchemaName) - n += 1 + l + sovMysqlxExpr(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *FunctionCall) Size() (n int) { - var l int - _ = l - if m.Name != nil { - l = m.Name.Size() - n += 1 + l + sovMysqlxExpr(uint64(l)) - } - if len(m.Param) > 0 { - for _, e := range m.Param { - l = e.Size() - n += 1 + l + sovMysqlxExpr(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Operator) Size() (n int) { - var l int - _ = l - if m.Name != nil { - l = len(*m.Name) - n += 1 + l + sovMysqlxExpr(uint64(l)) - } - if len(m.Param) > 0 { - for _, e := range m.Param { - l = e.Size() - n += 1 + l + sovMysqlxExpr(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Object) Size() (n int) { - var l int - _ = l - if len(m.Fld) > 0 { - for _, e := range m.Fld { - l = e.Size() - n += 1 + l + sovMysqlxExpr(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Object_ObjectField) Size() (n int) { - var l int - _ = l - if m.Key != nil { - l = len(*m.Key) - n += 1 + l + sovMysqlxExpr(uint64(l)) - } - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovMysqlxExpr(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Array) Size() (n int) { - var l int - _ = l - if len(m.Value) > 0 { - for _, e := range m.Value { - l = e.Size() - n += 1 + l + sovMysqlxExpr(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMysqlxExpr(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozMysqlxExpr(x uint64) (n int) { - return sovMysqlxExpr(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Expr) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Expr: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Expr: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var v Expr_Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (Expr_Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Type = &v - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxExpr - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Identifier == nil { - m.Identifier = &ColumnIdentifier{} - } - if err := m.Identifier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Variable", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlxExpr - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Variable = &s - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Literal", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxExpr - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Literal == nil { - m.Literal = &Mysqlx_Datatypes.Scalar{} - } - if err := m.Literal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FunctionCall", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxExpr - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FunctionCall == nil { - m.FunctionCall = &FunctionCall{} - } - if err := m.FunctionCall.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxExpr - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Operator == nil { - m.Operator = &Operator{} - } - if err := m.Operator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Position = &v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxExpr - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Object == nil { - m.Object = &Object{} - } - if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Array", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxExpr - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Array == nil { - m.Array = &Array{} - } - if err := m.Array.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxExpr(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxExpr - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Identifier) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Identifier: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Identifier: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlxExpr - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Name = &s - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlxExpr - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.SchemaName = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxExpr(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxExpr - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DocumentPathItem) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DocumentPathItem: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DocumentPathItem: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var v DocumentPathItem_Type - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (DocumentPathItem_Type(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Type = &v - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlxExpr - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Value = &s - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Index = &v - default: - iNdEx = preIndex - skippy, err := skipMysqlxExpr(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxExpr - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ColumnIdentifier) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ColumnIdentifier: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ColumnIdentifier: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DocumentPath", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxExpr - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DocumentPath = append(m.DocumentPath, &DocumentPathItem{}) - if err := m.DocumentPath[len(m.DocumentPath)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlxExpr - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Name = &s - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TableName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlxExpr - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.TableName = &s - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlxExpr - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.SchemaName = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxExpr(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxExpr - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FunctionCall) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FunctionCall: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FunctionCall: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxExpr - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Name == nil { - m.Name = &Identifier{} - } - if err := m.Name.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Param", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxExpr - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Param = append(m.Param, &Expr{}) - if err := m.Param[len(m.Param)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxExpr(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxExpr - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Operator) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Operator: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Operator: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlxExpr - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Name = &s - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Param", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxExpr - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Param = append(m.Param, &Expr{}) - if err := m.Param[len(m.Param)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxExpr(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxExpr - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Object) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Object: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Object: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fld", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxExpr - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Fld = append(m.Fld, &Object_ObjectField{}) - if err := m.Fld[len(m.Fld)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxExpr(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxExpr - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Object_ObjectField) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ObjectField: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ObjectField: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlxExpr - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Key = &s - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxExpr - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = &Expr{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - hasFields[0] |= uint64(0x00000002) - default: - iNdEx = preIndex - skippy, err := skipMysqlxExpr(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxExpr - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - if hasFields[0]&uint64(0x00000002) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Array) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Array: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Array: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxExpr - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value, &Expr{}) - if err := m.Value[len(m.Value)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxExpr(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxExpr - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMysqlxExpr(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthMysqlxExpr - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxExpr - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipMysqlxExpr(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthMysqlxExpr = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMysqlxExpr = fmt.Errorf("proto: integer overflow") -) - -func init() { - proto.RegisterFile("github.com/pingcap/tipb/go-mysqlx/Expr/mysqlx_expr.proto", fileDescriptorMysqlxExpr) -} - -var fileDescriptorMysqlxExpr = []byte{ - // 752 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x8c, 0x54, 0xdd, 0x72, 0xda, 0x46, - 0x14, 0xae, 0x40, 0xe2, 0xe7, 0x00, 0xb5, 0xba, 0x76, 0x5b, 0xd5, 0x53, 0x63, 0x46, 0x37, 0x66, - 0xea, 0x19, 0x5c, 0x73, 0xd1, 0xbb, 0x76, 0x46, 0x80, 0x5c, 0xd3, 0xca, 0xe0, 0x59, 0xe3, 0x4c, - 0x72, 0xc5, 0xac, 0xa5, 0x25, 0x96, 0x23, 0x21, 0x59, 0x08, 0x0f, 0x3c, 0x40, 0xde, 0x21, 0x93, - 0x47, 0xc8, 0x93, 0xe4, 0x32, 0x6f, 0x90, 0x8c, 0xf3, 0x22, 0x99, 0xdd, 0x15, 0x20, 0xf9, 0x67, - 0x26, 0x37, 0xb0, 0x7b, 0xbe, 0xef, 0x3b, 0x3a, 0xbf, 0x0b, 0x7b, 0x67, 0xcb, 0xd9, 0xad, 0xb7, - 0x38, 0x32, 0x17, 0x61, 0x74, 0xe4, 0xf3, 0xf3, 0x98, 0x2e, 0xc2, 0xa8, 0x15, 0x46, 0x41, 0x1c, - 0xa0, 0x8a, 0x80, 0x5b, 0x0c, 0xde, 0x3d, 0x48, 0xb8, 0x3d, 0x12, 0x93, 0x78, 0x19, 0xd2, 0xd9, - 0x4a, 0xe0, 0xac, 0x0c, 0x42, 0xa5, 0xbf, 0x97, 0x41, 0x66, 0x0a, 0xf4, 0x07, 0xc8, 0xcc, 0xae, - 0x49, 0x8d, 0x5c, 0xf3, 0xc7, 0xf6, 0x2f, 0xad, 0x94, 0x37, 0xf1, 0x33, 0x5a, 0x86, 0x14, 0x73, - 0x0e, 0xfa, 0x1b, 0xc0, 0x75, 0xe8, 0x34, 0x76, 0x27, 0x2e, 0x8d, 0xb4, 0x5c, 0x43, 0x6a, 0x56, - 0xda, 0x7b, 0x19, 0x45, 0x37, 0xf0, 0xe6, 0xfe, 0xb4, 0xbf, 0x26, 0xe1, 0x94, 0x00, 0xed, 0x42, - 0xe9, 0x8e, 0x44, 0x2e, 0xb9, 0xf2, 0xa8, 0x96, 0x6f, 0x48, 0xcd, 0x32, 0x5e, 0xdf, 0x51, 0x1b, - 0x8a, 0x9e, 0x1b, 0xd3, 0x88, 0x78, 0x9a, 0xcc, 0xfd, 0x6a, 0x2b, 0xbf, 0xeb, 0x54, 0x5a, 0x17, - 0x36, 0xf1, 0x48, 0x84, 0x57, 0x44, 0xf4, 0x0f, 0xd4, 0x26, 0xf3, 0xa9, 0x1d, 0xbb, 0xc1, 0x74, - 0x6c, 0x13, 0xcf, 0xd3, 0x14, 0xae, 0xfc, 0x2d, 0x13, 0xd1, 0x49, 0xc2, 0xe8, 0x12, 0xcf, 0xc3, - 0xd5, 0x49, 0xea, 0x86, 0x8e, 0xa1, 0x14, 0x84, 0x34, 0x22, 0x71, 0x10, 0x69, 0x05, 0x2e, 0xfd, - 0x39, 0x23, 0x1d, 0x26, 0x20, 0x5e, 0xd3, 0x58, 0x0a, 0x61, 0x30, 0x73, 0x99, 0x0b, 0xad, 0xd8, - 0x90, 0x9a, 0x35, 0xbc, 0xbe, 0xa3, 0x43, 0x28, 0x04, 0x57, 0x37, 0xd4, 0x8e, 0xb5, 0x12, 0x77, - 0xb6, 0x9d, 0x75, 0xc6, 0x21, 0x9c, 0x50, 0x50, 0x13, 0x14, 0x12, 0x45, 0x64, 0xa9, 0x95, 0x39, - 0x17, 0x65, 0xb8, 0x06, 0x43, 0xb0, 0x20, 0xe8, 0xb7, 0x20, 0xb3, 0x16, 0xa0, 0x32, 0x28, 0xfd, - 0x9e, 0x39, 0x18, 0xa9, 0x12, 0xaa, 0x40, 0xd1, 0xea, 0x8f, 0x4c, 0x6c, 0x58, 0x6a, 0x0e, 0x55, - 0xa1, 0xf4, 0xc2, 0xc0, 0x7d, 0xa3, 0x63, 0x99, 0x6a, 0x1e, 0xd5, 0xa0, 0x7c, 0x72, 0x39, 0xe8, - 0x8e, 0xbb, 0x86, 0x65, 0xa9, 0x32, 0x03, 0x87, 0xe7, 0x26, 0x36, 0x46, 0x43, 0xac, 0x2a, 0x68, - 0x0b, 0x2a, 0xe7, 0x96, 0xd1, 0x35, 0x4f, 0x87, 0x56, 0xcf, 0xc4, 0x6a, 0x01, 0x01, 0x14, 0x86, - 0x9d, 0xff, 0xcc, 0xee, 0x48, 0x2d, 0x32, 0xff, 0x06, 0xc6, 0xc6, 0x2b, 0xb5, 0xa4, 0x1b, 0x00, - 0x9b, 0x16, 0x22, 0x04, 0xf2, 0x94, 0xf8, 0x62, 0x42, 0xca, 0x98, 0x9f, 0xd1, 0x3e, 0x54, 0x66, - 0xf6, 0x35, 0xf5, 0xc9, 0x98, 0x43, 0x39, 0xde, 0x4d, 0x10, 0xa6, 0x01, 0xf1, 0xa9, 0xfe, 0x59, - 0x02, 0xb5, 0x17, 0xd8, 0x73, 0x9f, 0x4e, 0xe3, 0x73, 0x12, 0x5f, 0xf7, 0x63, 0xea, 0xa3, 0xbf, - 0x32, 0xb3, 0xa6, 0x67, 0x72, 0x7e, 0x48, 0x4e, 0xcf, 0xdd, 0x0e, 0x28, 0x77, 0xc4, 0x9b, 0xaf, - 0xbe, 0x23, 0x2e, 0xcc, 0xea, 0x4e, 0x1d, 0xba, 0xe0, 0xb3, 0x54, 0xc3, 0xe2, 0xa2, 0xbf, 0x4e, - 0xca, 0x05, 0x50, 0x38, 0x33, 0xcf, 0x3a, 0x26, 0x56, 0x25, 0xb4, 0x0d, 0x5b, 0xe2, 0x3c, 0x36, - 0x2e, 0x46, 0x26, 0xee, 0x5f, 0xfc, 0xaf, 0xe6, 0x58, 0x31, 0x78, 0xbe, 0xe3, 0xfe, 0xa0, 0x67, - 0xbe, 0x54, 0xf3, 0x48, 0x83, 0x9d, 0x94, 0x61, 0x43, 0x95, 0x99, 0xbe, 0x37, 0xbc, 0xec, 0x58, - 0xe6, 0xc6, 0xa8, 0xe8, 0x1f, 0x24, 0x50, 0x1f, 0x8e, 0x3b, 0xea, 0x40, 0xcd, 0x49, 0x12, 0x19, - 0x87, 0x24, 0xbe, 0xd6, 0xa4, 0x46, 0xfe, 0xd1, 0x92, 0x3c, 0x4c, 0x15, 0x57, 0x9d, 0x94, 0x65, - 0x5d, 0x6f, 0x91, 0xac, 0xa8, 0xf7, 0x1e, 0x40, 0xcc, 0xf6, 0x44, 0x94, 0x5b, 0x2c, 0x4f, 0x99, - 0x5b, 0x06, 0x4f, 0xb4, 0x43, 0x7e, 0xd4, 0x0e, 0x07, 0xaa, 0xe9, 0x45, 0x40, 0x87, 0xa9, 0x9e, - 0x56, 0xda, 0xbf, 0x66, 0xc2, 0x4b, 0x6d, 0xaf, 0xf8, 0xf8, 0x01, 0x28, 0x21, 0x89, 0x88, 0xaf, - 0xe5, 0x78, 0x32, 0x3f, 0x3d, 0x7a, 0x23, 0xb0, 0xc0, 0xf5, 0x7f, 0xa1, 0xb4, 0xda, 0x99, 0x27, - 0xa7, 0xe6, 0xbb, 0x1d, 0xbd, 0x95, 0xa0, 0x20, 0x16, 0x06, 0x1d, 0x43, 0x7e, 0xe2, 0x39, 0x49, - 0x1d, 0xf7, 0x9f, 0x58, 0xa9, 0xe4, 0xef, 0xc4, 0xa5, 0x9e, 0x83, 0x19, 0x77, 0xf7, 0x14, 0x2a, - 0x29, 0x1b, 0x52, 0x21, 0xff, 0x86, 0x2e, 0x93, 0x40, 0xd8, 0x91, 0xc5, 0xb1, 0x9a, 0xa7, 0xdc, - 0x33, 0x71, 0x70, 0x5c, 0xff, 0x13, 0x14, 0xbe, 0x8b, 0x1b, 0x85, 0xf4, 0x6c, 0xe4, 0x1c, 0xef, - 0xb4, 0x3e, 0xde, 0xd7, 0xa5, 0x4f, 0xf7, 0x75, 0xe9, 0xcb, 0x7d, 0x5d, 0x7a, 0xf7, 0xb5, 0xfe, - 0x03, 0xfc, 0x6e, 0x07, 0x7e, 0x8b, 0xbf, 0xc2, 0x2d, 0xfb, 0x46, 0x1c, 0x16, 0xe2, 0x11, 0xbe, - 0x9a, 0x4f, 0xbe, 0x05, 0x00, 0x00, 0xff, 0xff, 0x35, 0x4f, 0xc9, 0xba, 0xdd, 0x05, 0x00, 0x00, -} diff --git a/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Notice/mysqlx_notice.pb.go b/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Notice/mysqlx_notice.pb.go deleted file mode 100644 index d822054cbdbac..0000000000000 --- a/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Notice/mysqlx_notice.pb.go +++ /dev/null @@ -1,1281 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/pingcap/tipb/go-mysqlx/Notice/mysqlx_notice.proto - -/* - Package Mysqlx_Notice is a generated protocol buffer package. - - Notices - - A notice - - * is sent from the server to the client - * may be global or relate to the current message sequence - - It is generated from these files: - github.com/pingcap/tipb/go-mysqlx/Notice/mysqlx_notice.proto - - It has these top-level messages: - Frame - Warning - SessionVariableChanged - SessionStateChanged -*/ -package Mysqlx_Notice - -import ( - "fmt" - - proto "github.com/golang/protobuf/proto" - - math "math" - - Mysqlx_Datatypes "github.com/pingcap/tipb/go-mysqlx/Datatypes" - - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - - io "io" -) - -// 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 Frame_Scope int32 - -const ( - Frame_GLOBAL Frame_Scope = 1 - Frame_LOCAL Frame_Scope = 2 -) - -var Frame_Scope_name = map[int32]string{ - 1: "GLOBAL", - 2: "LOCAL", -} -var Frame_Scope_value = map[string]int32{ - "GLOBAL": 1, - "LOCAL": 2, -} - -func (x Frame_Scope) Enum() *Frame_Scope { - p := new(Frame_Scope) - *p = x - return p -} -func (x Frame_Scope) String() string { - return proto.EnumName(Frame_Scope_name, int32(x)) -} -func (x *Frame_Scope) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Frame_Scope_value, data, "Frame_Scope") - if err != nil { - return err - } - *x = Frame_Scope(value) - return nil -} -func (Frame_Scope) EnumDescriptor() ([]byte, []int) { return fileDescriptorMysqlxNotice, []int{0, 0} } - -type Warning_Level int32 - -const ( - Warning_NOTE Warning_Level = 1 - Warning_WARNING Warning_Level = 2 - Warning_ERROR Warning_Level = 3 -) - -var Warning_Level_name = map[int32]string{ - 1: "NOTE", - 2: "WARNING", - 3: "ERROR", -} -var Warning_Level_value = map[string]int32{ - "NOTE": 1, - "WARNING": 2, - "ERROR": 3, -} - -func (x Warning_Level) Enum() *Warning_Level { - p := new(Warning_Level) - *p = x - return p -} -func (x Warning_Level) String() string { - return proto.EnumName(Warning_Level_name, int32(x)) -} -func (x *Warning_Level) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Warning_Level_value, data, "Warning_Level") - if err != nil { - return err - } - *x = Warning_Level(value) - return nil -} -func (Warning_Level) EnumDescriptor() ([]byte, []int) { return fileDescriptorMysqlxNotice, []int{1, 0} } - -type SessionStateChanged_Parameter int32 - -const ( - SessionStateChanged_CURRENT_SCHEMA SessionStateChanged_Parameter = 1 - SessionStateChanged_ACCOUNT_EXPIRED SessionStateChanged_Parameter = 2 - SessionStateChanged_GENERATED_INSERT_ID SessionStateChanged_Parameter = 3 - SessionStateChanged_ROWS_AFFECTED SessionStateChanged_Parameter = 4 - SessionStateChanged_ROWS_FOUND SessionStateChanged_Parameter = 5 - SessionStateChanged_ROWS_MATCHED SessionStateChanged_Parameter = 6 - SessionStateChanged_TRX_COMMITTED SessionStateChanged_Parameter = 7 - SessionStateChanged_TRX_ROLLEDBACK SessionStateChanged_Parameter = 9 - SessionStateChanged_PRODUCED_MESSAGE SessionStateChanged_Parameter = 10 - SessionStateChanged_CLIENT_ID_ASSIGNED SessionStateChanged_Parameter = 11 -) - -var SessionStateChanged_Parameter_name = map[int32]string{ - 1: "CURRENT_SCHEMA", - 2: "ACCOUNT_EXPIRED", - 3: "GENERATED_INSERT_ID", - 4: "ROWS_AFFECTED", - 5: "ROWS_FOUND", - 6: "ROWS_MATCHED", - 7: "TRX_COMMITTED", - 9: "TRX_ROLLEDBACK", - 10: "PRODUCED_MESSAGE", - 11: "CLIENT_ID_ASSIGNED", -} -var SessionStateChanged_Parameter_value = map[string]int32{ - "CURRENT_SCHEMA": 1, - "ACCOUNT_EXPIRED": 2, - "GENERATED_INSERT_ID": 3, - "ROWS_AFFECTED": 4, - "ROWS_FOUND": 5, - "ROWS_MATCHED": 6, - "TRX_COMMITTED": 7, - "TRX_ROLLEDBACK": 9, - "PRODUCED_MESSAGE": 10, - "CLIENT_ID_ASSIGNED": 11, -} - -func (x SessionStateChanged_Parameter) Enum() *SessionStateChanged_Parameter { - p := new(SessionStateChanged_Parameter) - *p = x - return p -} -func (x SessionStateChanged_Parameter) String() string { - return proto.EnumName(SessionStateChanged_Parameter_name, int32(x)) -} -func (x *SessionStateChanged_Parameter) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(SessionStateChanged_Parameter_value, data, "SessionStateChanged_Parameter") - if err != nil { - return err - } - *x = SessionStateChanged_Parameter(value) - return nil -} -func (SessionStateChanged_Parameter) EnumDescriptor() ([]byte, []int) { - return fileDescriptorMysqlxNotice, []int{3, 0} -} - -// Common Frame for all Notices -// -// ===================================================== ===== -// .type value -// ===================================================== ===== -// :protobuf:msg:`Mysqlx.Notice::Warning` 1 -// :protobuf:msg:`Mysqlx.Notice::SessionVariableChanged` 2 -// :protobuf:msg:`Mysqlx.Notice::SessionStateChanged` 3 -// ===================================================== ===== -// -// :param type: the type of the payload -// :param payload: the payload of the notification -// :param scope: global or local notification -// -type Frame struct { - Type *uint32 `protobuf:"varint,1,req,name=type" json:"type,omitempty"` - Scope *Frame_Scope `protobuf:"varint,2,opt,name=scope,enum=Mysqlx.Notice.Frame_Scope,def=1" json:"scope,omitempty"` - Payload []byte `protobuf:"bytes,3,opt,name=payload" json:"payload,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Frame) Reset() { *m = Frame{} } -func (m *Frame) String() string { return proto.CompactTextString(m) } -func (*Frame) ProtoMessage() {} -func (*Frame) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxNotice, []int{0} } - -const Default_Frame_Scope Frame_Scope = Frame_GLOBAL - -func (m *Frame) GetType() uint32 { - if m != nil && m.Type != nil { - return *m.Type - } - return 0 -} - -func (m *Frame) GetScope() Frame_Scope { - if m != nil && m.Scope != nil { - return *m.Scope - } - return Default_Frame_Scope -} - -func (m *Frame) GetPayload() []byte { - if m != nil { - return m.Payload - } - return nil -} - -// Server-side warnings and notes -// -// ``.scope`` == ``local`` -// ``.level``, ``.code`` and ``.msg`` map the content of -// -// .. code-block:: sql -// -// SHOW WARNINGS -// -// ``.scope`` == ``global`` -// (undefined) will be used for global, unstructured messages like: -// -// * server is shutting down -// * a node disconnected from group -// * schema or table dropped -// -// ========================================== ======================= -// :protobuf:msg:`Mysqlx.Notice::Frame` field value -// ========================================== ======================= -// ``.type`` 1 -// ``.scope`` ``local`` or ``global`` -// ========================================== ======================= -// -// :param level: warning level: Note or Warning -// :param code: warning code -// :param msg: warning message -type Warning struct { - Level *Warning_Level `protobuf:"varint,1,opt,name=level,enum=Mysqlx.Notice.Warning_Level,def=2" json:"level,omitempty"` - Code *uint32 `protobuf:"varint,2,req,name=code" json:"code,omitempty"` - Msg *string `protobuf:"bytes,3,req,name=msg" json:"msg,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Warning) Reset() { *m = Warning{} } -func (m *Warning) String() string { return proto.CompactTextString(m) } -func (*Warning) ProtoMessage() {} -func (*Warning) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxNotice, []int{1} } - -const Default_Warning_Level Warning_Level = Warning_WARNING - -func (m *Warning) GetLevel() Warning_Level { - if m != nil && m.Level != nil { - return *m.Level - } - return Default_Warning_Level -} - -func (m *Warning) GetCode() uint32 { - if m != nil && m.Code != nil { - return *m.Code - } - return 0 -} - -func (m *Warning) GetMsg() string { - if m != nil && m.Msg != nil { - return *m.Msg - } - return "" -} - -// Notify clients about changes to the current session variables -// -// Every change to a variable that is accessable through: -// -// .. code-block:: sql -// -// SHOW SESSION VARIABLES -// -// ========================================== ========= -// :protobuf:msg:`Mysqlx.Notice::Frame` field value -// ========================================== ========= -// ``.type`` 2 -// ``.scope`` ``local`` -// ========================================== ========= -// -// :param namespace: namespace that param belongs to -// :param param: name of the variable -// :param value: the changed value of param -type SessionVariableChanged struct { - Param *string `protobuf:"bytes,1,req,name=param" json:"param,omitempty"` - Value *Mysqlx_Datatypes.Scalar `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *SessionVariableChanged) Reset() { *m = SessionVariableChanged{} } -func (m *SessionVariableChanged) String() string { return proto.CompactTextString(m) } -func (*SessionVariableChanged) ProtoMessage() {} -func (*SessionVariableChanged) Descriptor() ([]byte, []int) { - return fileDescriptorMysqlxNotice, []int{2} -} - -func (m *SessionVariableChanged) GetParam() string { - if m != nil && m.Param != nil { - return *m.Param - } - return "" -} - -func (m *SessionVariableChanged) GetValue() *Mysqlx_Datatypes.Scalar { - if m != nil { - return m.Value - } - return nil -} - -// Notify clients about changes to the internal session state -// -// ========================================== ========= -// :protobuf:msg:`Mysqlx.Notice::Frame` field value -// ========================================== ========= -// ``.type`` 3 -// ``.scope`` ``local`` -// ========================================== ========= -// -// :param param: parameter key -// :param value: updated value -type SessionStateChanged struct { - Param *SessionStateChanged_Parameter `protobuf:"varint,1,req,name=param,enum=Mysqlx.Notice.SessionStateChanged_Parameter" json:"param,omitempty"` - Value *Mysqlx_Datatypes.Scalar `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *SessionStateChanged) Reset() { *m = SessionStateChanged{} } -func (m *SessionStateChanged) String() string { return proto.CompactTextString(m) } -func (*SessionStateChanged) ProtoMessage() {} -func (*SessionStateChanged) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxNotice, []int{3} } - -func (m *SessionStateChanged) GetParam() SessionStateChanged_Parameter { - if m != nil && m.Param != nil { - return *m.Param - } - return SessionStateChanged_CURRENT_SCHEMA -} - -func (m *SessionStateChanged) GetValue() *Mysqlx_Datatypes.Scalar { - if m != nil { - return m.Value - } - return nil -} - -func init() { - proto.RegisterType((*Frame)(nil), "Mysqlx.Notice.Frame") - proto.RegisterType((*Warning)(nil), "Mysqlx.Notice.Warning") - proto.RegisterType((*SessionVariableChanged)(nil), "Mysqlx.Notice.SessionVariableChanged") - proto.RegisterType((*SessionStateChanged)(nil), "Mysqlx.Notice.SessionStateChanged") - proto.RegisterEnum("Mysqlx.Notice.Frame_Scope", Frame_Scope_name, Frame_Scope_value) - proto.RegisterEnum("Mysqlx.Notice.Warning_Level", Warning_Level_name, Warning_Level_value) - proto.RegisterEnum("Mysqlx.Notice.SessionStateChanged_Parameter", SessionStateChanged_Parameter_name, SessionStateChanged_Parameter_value) -} -func (m *Frame) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Frame) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Type == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0x8 - i++ - i = encodeVarintMysqlxNotice(dAtA, i, uint64(*m.Type)) - } - if m.Scope != nil { - dAtA[i] = 0x10 - i++ - i = encodeVarintMysqlxNotice(dAtA, i, uint64(*m.Scope)) - } - if m.Payload != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintMysqlxNotice(dAtA, i, uint64(len(m.Payload))) - i += copy(dAtA[i:], m.Payload) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Warning) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Warning) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Level != nil { - dAtA[i] = 0x8 - i++ - i = encodeVarintMysqlxNotice(dAtA, i, uint64(*m.Level)) - } - if m.Code == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0x10 - i++ - i = encodeVarintMysqlxNotice(dAtA, i, uint64(*m.Code)) - } - if m.Msg == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0x1a - i++ - i = encodeVarintMysqlxNotice(dAtA, i, uint64(len(*m.Msg))) - i += copy(dAtA[i:], *m.Msg) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *SessionVariableChanged) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SessionVariableChanged) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Param == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxNotice(dAtA, i, uint64(len(*m.Param))) - i += copy(dAtA[i:], *m.Param) - } - if m.Value != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMysqlxNotice(dAtA, i, uint64(m.Value.Size())) - n1, err := m.Value.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *SessionStateChanged) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SessionStateChanged) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Param == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0x8 - i++ - i = encodeVarintMysqlxNotice(dAtA, i, uint64(*m.Param)) - } - if m.Value != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMysqlxNotice(dAtA, i, uint64(m.Value.Size())) - n2, err := m.Value.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64MysqlxNotice(dAtA []byte, offset int, v uint64) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - dAtA[offset+4] = uint8(v >> 32) - dAtA[offset+5] = uint8(v >> 40) - dAtA[offset+6] = uint8(v >> 48) - dAtA[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32MysqlxNotice(dAtA []byte, offset int, v uint32) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintMysqlxNotice(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *Frame) Size() (n int) { - var l int - _ = l - if m.Type != nil { - n += 1 + sovMysqlxNotice(uint64(*m.Type)) - } - if m.Scope != nil { - n += 1 + sovMysqlxNotice(uint64(*m.Scope)) - } - if m.Payload != nil { - l = len(m.Payload) - n += 1 + l + sovMysqlxNotice(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Warning) Size() (n int) { - var l int - _ = l - if m.Level != nil { - n += 1 + sovMysqlxNotice(uint64(*m.Level)) - } - if m.Code != nil { - n += 1 + sovMysqlxNotice(uint64(*m.Code)) - } - if m.Msg != nil { - l = len(*m.Msg) - n += 1 + l + sovMysqlxNotice(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SessionVariableChanged) Size() (n int) { - var l int - _ = l - if m.Param != nil { - l = len(*m.Param) - n += 1 + l + sovMysqlxNotice(uint64(l)) - } - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovMysqlxNotice(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *SessionStateChanged) Size() (n int) { - var l int - _ = l - if m.Param != nil { - n += 1 + sovMysqlxNotice(uint64(*m.Param)) - } - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovMysqlxNotice(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMysqlxNotice(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozMysqlxNotice(x uint64) (n int) { - return sovMysqlxNotice(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Frame) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxNotice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Frame: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Frame: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxNotice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Type = &v - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) - } - var v Frame_Scope - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxNotice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (Frame_Scope(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Scope = &v - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxNotice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMysqlxNotice - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxNotice(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxNotice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Warning) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxNotice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Warning: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Warning: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) - } - var v Warning_Level - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxNotice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (Warning_Level(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Level = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxNotice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Code = &v - hasFields[0] |= uint64(0x00000001) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxNotice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlxNotice - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Msg = &s - iNdEx = postIndex - hasFields[0] |= uint64(0x00000002) - default: - iNdEx = preIndex - skippy, err := skipMysqlxNotice(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxNotice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - if hasFields[0]&uint64(0x00000002) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SessionVariableChanged) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxNotice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SessionVariableChanged: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SessionVariableChanged: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Param", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxNotice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlxNotice - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Param = &s - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxNotice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxNotice - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = &Mysqlx_Datatypes.Scalar{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxNotice(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxNotice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SessionStateChanged) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxNotice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SessionStateChanged: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SessionStateChanged: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Param", wireType) - } - var v SessionStateChanged_Parameter - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxNotice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (SessionStateChanged_Parameter(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Param = &v - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxNotice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxNotice - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = &Mysqlx_Datatypes.Scalar{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxNotice(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxNotice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMysqlxNotice(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxNotice - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxNotice - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxNotice - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthMysqlxNotice - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxNotice - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipMysqlxNotice(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthMysqlxNotice = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMysqlxNotice = fmt.Errorf("proto: integer overflow") -) - -func init() { - proto.RegisterFile("github.com/pingcap/tipb/go-mysqlx/Notice/mysqlx_notice.proto", fileDescriptorMysqlxNotice) -} - -var fileDescriptorMysqlxNotice = []byte{ - // 574 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x93, 0x41, 0x6f, 0xd3, 0x30, - 0x14, 0xc7, 0x71, 0xba, 0xac, 0xf4, 0x6d, 0x2b, 0xc6, 0x9b, 0x46, 0x34, 0x4d, 0x55, 0xe9, 0x85, - 0x22, 0xa1, 0x4c, 0xda, 0x09, 0x8d, 0x53, 0x6a, 0xbb, 0x5d, 0x44, 0x9a, 0x4c, 0x4e, 0xca, 0x76, - 0x22, 0xf2, 0xda, 0x30, 0x8a, 0xd2, 0xa6, 0x24, 0xd9, 0xb4, 0x7d, 0x0a, 0x8e, 0xf0, 0x91, 0x38, - 0x72, 0xe3, 0x8a, 0xb6, 0x2f, 0x82, 0xec, 0xb4, 0x13, 0x4c, 0x9c, 0xb8, 0xbd, 0xbf, 0xf3, 0xff, - 0xbd, 0xf7, 0xf7, 0x8b, 0x0c, 0xcf, 0x87, 0x37, 0xc5, 0xe7, 0xf4, 0xfa, 0xc0, 0xcf, 0xca, 0xe9, - 0x38, 0x39, 0x98, 0x69, 0x15, 0xcf, 0xb5, 0xb2, 0x17, 0x79, 0x56, 0x66, 0x64, 0xab, 0xb2, 0xd8, - 0x95, 0x65, 0xef, 0xc5, 0x92, 0x60, 0xb2, 0x94, 0xe5, 0xcd, 0x22, 0x29, 0x56, 0xd0, 0x64, 0x75, - 0x50, 0x71, 0x9d, 0x2f, 0x08, 0xcc, 0x7e, 0x2e, 0x67, 0x09, 0x21, 0xb0, 0xa6, 0x3e, 0x58, 0xa8, - 0x6d, 0x74, 0xb7, 0x84, 0xae, 0xc9, 0x6b, 0x30, 0x8b, 0x71, 0xb6, 0x48, 0x2c, 0xa3, 0x8d, 0xba, - 0xcd, 0xc3, 0x3d, 0xfb, 0xaf, 0x29, 0xb6, 0x06, 0xed, 0x50, 0x39, 0x8e, 0xd6, 0x07, 0x5e, 0xd0, - 0x73, 0x3c, 0x51, 0x01, 0xc4, 0x82, 0xfa, 0x42, 0xde, 0xa4, 0x99, 0x9c, 0x58, 0xb5, 0x36, 0xea, - 0x6e, 0x8a, 0x95, 0xec, 0xb4, 0xc0, 0xd4, 0x04, 0x01, 0x58, 0x32, 0x18, 0x91, 0x06, 0x98, 0x5e, - 0x40, 0x1d, 0x0f, 0x1b, 0x9d, 0xaf, 0x08, 0xea, 0xa7, 0x32, 0x9f, 0x4f, 0xe7, 0x17, 0xe4, 0x0d, - 0x98, 0x69, 0x72, 0x95, 0xa4, 0x16, 0xd2, 0xf3, 0xf7, 0x1f, 0xcc, 0x5f, 0xda, 0x6c, 0x4f, 0x79, - 0x8e, 0xea, 0xa7, 0x8e, 0xf0, 0x5d, 0x7f, 0x20, 0x2a, 0x46, 0x5d, 0x68, 0x9c, 0x4d, 0x54, 0x76, - 0x7d, 0x21, 0x55, 0x13, 0x0c, 0xb5, 0x59, 0x71, 0x61, 0xd5, 0xda, 0x46, 0xb7, 0x21, 0x54, 0xd9, - 0x79, 0x09, 0xa6, 0xc6, 0xc9, 0x63, 0x58, 0xf3, 0x83, 0x88, 0x63, 0x44, 0x36, 0x60, 0xd5, 0x0a, - 0x1b, 0x2a, 0x19, 0x17, 0x22, 0x10, 0xb8, 0xd6, 0x79, 0x0f, 0xbb, 0x61, 0x52, 0x14, 0xd3, 0x6c, - 0xfe, 0x4e, 0xe6, 0x53, 0x79, 0x9e, 0x26, 0xf4, 0xa3, 0x9c, 0x5f, 0x24, 0x13, 0xb2, 0x03, 0xe6, - 0x42, 0xe6, 0x72, 0xa6, 0x97, 0xd7, 0x10, 0x95, 0x20, 0x36, 0x98, 0x57, 0x32, 0xbd, 0xac, 0xb6, - 0xb7, 0x71, 0x68, 0xad, 0xd2, 0xdf, 0xff, 0x14, 0x3b, 0x1c, 0xcb, 0x54, 0xe6, 0xa2, 0xb2, 0x75, - 0xee, 0x0c, 0xd8, 0x5e, 0x0e, 0x08, 0x4b, 0x59, 0xde, 0x77, 0xef, 0xfd, 0xd9, 0xbd, 0x79, 0xf8, - 0xea, 0xc1, 0x16, 0xfe, 0x81, 0xd8, 0x27, 0xca, 0x9f, 0x94, 0x49, 0xfe, 0xbf, 0x59, 0x7e, 0x22, - 0x68, 0xdc, 0x37, 0x21, 0x04, 0x9a, 0x74, 0x24, 0x04, 0xf7, 0xa3, 0x38, 0xa4, 0xc7, 0x7c, 0xe8, - 0x60, 0x44, 0xb6, 0xe1, 0x89, 0x43, 0x69, 0x30, 0xf2, 0xa3, 0x98, 0x9f, 0x9d, 0xb8, 0x82, 0x33, - 0x6c, 0x90, 0x67, 0xb0, 0x3d, 0xe0, 0x3e, 0x17, 0x4e, 0xc4, 0x59, 0xec, 0xfa, 0x21, 0x17, 0x51, - 0xec, 0x32, 0x5c, 0x23, 0x4f, 0x61, 0x4b, 0x04, 0xa7, 0x61, 0xec, 0xf4, 0xfb, 0x9c, 0x46, 0x9c, - 0xe1, 0x35, 0xd2, 0x04, 0xd0, 0x47, 0xfd, 0x60, 0xe4, 0x33, 0x6c, 0x12, 0x0c, 0x9b, 0x5a, 0x0f, - 0x9d, 0x88, 0x1e, 0x73, 0x86, 0xd7, 0x15, 0x14, 0x89, 0xb3, 0x98, 0x06, 0xc3, 0xa1, 0x1b, 0x29, - 0xa8, 0xae, 0x92, 0xa8, 0x23, 0x11, 0x78, 0x1e, 0x67, 0x3d, 0x87, 0xbe, 0xc5, 0x0d, 0xb2, 0x03, - 0xf8, 0x44, 0x04, 0x6c, 0x44, 0x39, 0x8b, 0x87, 0x3c, 0x0c, 0x9d, 0x01, 0xc7, 0x40, 0x76, 0x81, - 0x50, 0xcf, 0x55, 0x91, 0x5d, 0x16, 0x3b, 0x61, 0xe8, 0x0e, 0x7c, 0xce, 0xf0, 0x46, 0xcf, 0xfe, - 0x7e, 0xdb, 0x42, 0x3f, 0x6e, 0x5b, 0xe8, 0xd7, 0x6d, 0x0b, 0x7d, 0xbb, 0x6b, 0x3d, 0x82, 0xfd, - 0x71, 0x36, 0xb3, 0xf5, 0xfb, 0xb0, 0xc7, 0x9f, 0xaa, 0xe2, 0xba, 0x7a, 0x1e, 0xe7, 0x97, 0x1f, - 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0xcb, 0x90, 0x2d, 0x0e, 0x7d, 0x03, 0x00, 0x00, -} diff --git a/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Resultset/mysqlx_resultset.pb.go b/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Resultset/mysqlx_resultset.pb.go deleted file mode 100644 index c0c9d2acd534b..0000000000000 --- a/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Resultset/mysqlx_resultset.pb.go +++ /dev/null @@ -1,1650 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/pingcap/tipb/go-mysqlx/Resultset/mysqlx_resultset.proto - -/* - Package Mysqlx_Resultset is a generated protocol buffer package. - - It is generated from these files: - github.com/pingcap/tipb/go-mysqlx/Resultset/mysqlx_resultset.proto - - It has these top-level messages: - FetchDoneMoreOutParams - FetchDoneMoreResultsets - FetchDone - ColumnMetaData - Row -*/ -package Mysqlx_Resultset - -import ( - "fmt" - - proto "github.com/golang/protobuf/proto" - - math "math" - - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - - io "io" -) - -// 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 ColumnMetaData_FieldType int32 - -const ( - ColumnMetaData_SINT ColumnMetaData_FieldType = 1 - ColumnMetaData_UINT ColumnMetaData_FieldType = 2 - ColumnMetaData_DOUBLE ColumnMetaData_FieldType = 5 - ColumnMetaData_FLOAT ColumnMetaData_FieldType = 6 - ColumnMetaData_BYTES ColumnMetaData_FieldType = 7 - ColumnMetaData_TIME ColumnMetaData_FieldType = 10 - ColumnMetaData_DATETIME ColumnMetaData_FieldType = 12 - ColumnMetaData_SET ColumnMetaData_FieldType = 15 - ColumnMetaData_ENUM ColumnMetaData_FieldType = 16 - ColumnMetaData_BIT ColumnMetaData_FieldType = 17 - ColumnMetaData_DECIMAL ColumnMetaData_FieldType = 18 -) - -var ColumnMetaData_FieldType_name = map[int32]string{ - 1: "SINT", - 2: "UINT", - 5: "DOUBLE", - 6: "FLOAT", - 7: "BYTES", - 10: "TIME", - 12: "DATETIME", - 15: "SET", - 16: "ENUM", - 17: "BIT", - 18: "DECIMAL", -} -var ColumnMetaData_FieldType_value = map[string]int32{ - "SINT": 1, - "UINT": 2, - "DOUBLE": 5, - "FLOAT": 6, - "BYTES": 7, - "TIME": 10, - "DATETIME": 12, - "SET": 15, - "ENUM": 16, - "BIT": 17, - "DECIMAL": 18, -} - -func (x ColumnMetaData_FieldType) Enum() *ColumnMetaData_FieldType { - p := new(ColumnMetaData_FieldType) - *p = x - return p -} -func (x ColumnMetaData_FieldType) String() string { - return proto.EnumName(ColumnMetaData_FieldType_name, int32(x)) -} -func (x *ColumnMetaData_FieldType) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(ColumnMetaData_FieldType_value, data, "ColumnMetaData_FieldType") - if err != nil { - return err - } - *x = ColumnMetaData_FieldType(value) - return nil -} -func (ColumnMetaData_FieldType) EnumDescriptor() ([]byte, []int) { - return fileDescriptorMysqlxResultset, []int{3, 0} -} - -// resultsets are finished, OUT paramset is next -type FetchDoneMoreOutParams struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *FetchDoneMoreOutParams) Reset() { *m = FetchDoneMoreOutParams{} } -func (m *FetchDoneMoreOutParams) String() string { return proto.CompactTextString(m) } -func (*FetchDoneMoreOutParams) ProtoMessage() {} -func (*FetchDoneMoreOutParams) Descriptor() ([]byte, []int) { - return fileDescriptorMysqlxResultset, []int{0} -} - -// resultset and out-params are finished, but more resultsets available -type FetchDoneMoreResultsets struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *FetchDoneMoreResultsets) Reset() { *m = FetchDoneMoreResultsets{} } -func (m *FetchDoneMoreResultsets) String() string { return proto.CompactTextString(m) } -func (*FetchDoneMoreResultsets) ProtoMessage() {} -func (*FetchDoneMoreResultsets) Descriptor() ([]byte, []int) { - return fileDescriptorMysqlxResultset, []int{1} -} - -// all resultsets are finished -type FetchDone struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *FetchDone) Reset() { *m = FetchDone{} } -func (m *FetchDone) String() string { return proto.CompactTextString(m) } -func (*FetchDone) ProtoMessage() {} -func (*FetchDone) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxResultset, []int{2} } - -// meta data of a Column -// -// .. note:: the encoding used for the different ``bytes`` fields in the meta data is externally -// controlled. -// .. seealso:: https://dev.mysql.com/doc/refman/5.0/en/charset-connection.html -// -// .. note:: -// The server may not set the ``original_{table|name}`` fields if they are equal to the plain -// ``{table|name}`` field. -// -// A client has to reconstruct it like:: -// -// if .original_name is empty and .name is not empty: -// .original_name = .name -// -// if .original_table is empty and .table is not empty: -// .original_table = .table -// -// .. note:: -// ``compact metadata format`` can be requested by the client. In that case only ``.type`` is set and -// all other fields are empty. -// -// -// :param type: -// .. table:: Expected Datatype of Mysqlx.Resultset.Row per SQL Type for non NULL values -// -// ================= ============ ======= ========== ====== ======== -// SQL Type .type .length .frac_dig .flags .charset -// ================= ============ ======= ========== ====== ======== -// TINY SINT x -// TINY UNSIGNED UINT x x -// SHORT SINT x -// SHORT UNSIGNED UINT x x -// INT24 SINT x -// INT24 UNSIGNED UINT x x -// INT SINT x -// INT UNSIGNED UINT x x -// LONGLONG SINT x -// LONGLONG UNSIGNED UINT x x -// DOUBLE DOUBLE x x x -// FLOAT FLOAT x x x -// DECIMAL DECIMAL x x x -// VARCHAR,CHAR,... BYTES x x x -// GEOMETRY BYTES -// TIME TIME x -// DATE DATETIME x -// DATETIME DATETIME x -// YEAR UINT x x -// TIMESTAMP DATETIME x -// SET SET x -// ENUM ENUM x -// NULL BYTES -// BIT BIT x -// ================= ============ ======= ========== ====== ======== -// -// .. note:: the SQL "NULL" value is sent as an empty field value in :protobuf:msg:`Mysqlx.Resultset::Row` -// .. seealso:: protobuf encoding of primitive datatypes are decribed in https://developers.google.com/protocol-buffers/docs/encoding -// -// SINT -// -// ``.length`` -// maximum number of displayable decimal digits (including minus sign) of the type -// -// .. note:: -// valid range is 0-255, but usually you'll see 1-20 -// -// =============== == -// SQL Type max digits per type -// =============== == -// TINY SIGNED 4 -// SHORT SIGNED 6 -// INT24 SIGNED 8 -// INT SIGNED 11 -// LONGLONG SIGNED 20 -// =============== == -// -// .. seealso:: definition of ``M`` in https://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html -// -// ``value`` -// variable length encoded signed 64 integer -// -// UINT -// -// ``.flags & 1`` (zerofill) -// the client has to left pad with 0's up to .length -// -// ``.length`` -// maximum number of displayable decimal digits of the type -// -// .. note:: -// valid range is 0-255, but usually you'll see 1-20 -// -// ================= == -// SQL Type max digits per type -// ================= == -// TINY UNSIGNED 3 -// SHORT UNSIGNED 5 -// INT24 UNSIGNED 8 -// INT UNSIGNED 10 -// LONGLONG UNSIGNED 20 -// ================= == -// -// .. seealso:: definition of ``M`` in https://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html -// -// ``value`` -// variable length encoded unsigned 64 integer -// -// BIT -// -// ``.length`` -// maximum number of displayable binary digits -// -// .. note:: valid range for M of the ``BIT`` type is 1 - 64 -// .. seealso:: https://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html -// -// ``value`` -// variable length encoded unsigned 64 integer -// -// DOUBLE -// -// ``.length`` -// maximum number of displayable decimal digits (including the decimal point and ``.fractional_digits``) -// -// ``.fractional_digits`` -// maximum number of displayable decimal digits following the decimal point -// -// ``value`` -// encoded as Protobuf's 'double' -// -// FLOAT -// -// ``.length`` -// maximum number of displayable decimal digits (including the decimal point and ``.fractional_digits``) -// -// ``.fractional_digits`` -// maximum number of displayable decimal digits following the decimal point -// -// ``value`` -// encoded as Protobuf's 'float' -// -// BYTES, ENUM -// BYTES is used for all opaque byte strings that may have a charset -// -// * TINYBLOB, BLOB, MEDIUMBLOB, LONGBLOB -// * TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT -// * VARCHAR, VARBINARY -// * CHAR, BINARY -// * ENUM -// -// ``.length`` -// the maximum length of characters of the underlying type -// -// ``.flags & 1`` (rightpad) -// if the length of the field is less than ``.length``, the receiver is -// supposed to add padding characters to the right end of the string. -// If the ``.charset`` is "binary", the padding character is ``0x00``, -// otherwise it is a space character as defined by that character set. -// -// ============= ======= ======== ======= -// SQL Type .length .charset .flags -// ============= ======= ======== ======= -// TINYBLOB 256 binary -// BLOB 65535 binary -// VARCHAR(32) 32 utf8 -// VARBINARY(32) 32 utf8_bin -// BINARY(32) 32 binary rightpad -// CHAR(32) 32 utf8 rightpad -// ============= ======= ======== ======= -// -// ``value`` -// sequence of bytes with added one extra '\0' byte at the end. To obtain the -// original string, the extra '\0' should be removed. -// .. note:: the length of the string can be acquired with protobuf's field length() method -// length of sequence-of-bytes = length-of-field - 1 -// .. note:: the extra byte allows to distinguish between a NULL and empty byte sequence -// -// TIME -// A time value. -// -// ``value`` -// the following bytes sequence: -// -// ``| negate [ | hour | [ | minutes | [ | seconds | [ | useconds | ]]]]`` -// -// * negate - one byte, should be one of: 0x00 for "+", 0x01 for "-" -// * hour - optional variable length encoded unsigned64 value for the hour -// * minutes - optional variable length encoded unsigned64 value for the minutes -// * seconds - optional variable length encoded unsigned64 value for the seconds -// * useconds - optional variable length encoded unsigned64 value for the microseconds -// -// .. seealso:: protobuf encoding in https://developers.google.com/protocol-buffers/docs/encoding -// .. note:: hour, minutes, seconds, useconds are optional if all the values to the right are 0 -// -// Example: 0x00 -> +00:00:00.000000 -// -// DATETIME -// A date or date and time value. -// -// ``value`` -// a sequence of variants, arranged as follows: -// -// ``| year | month | day | [ | hour | [ | minutes | [ | seconds | [ | useconds | ]]]]`` -// -// * year - variable length encoded unsigned64 value for the year -// * month - variable length encoded unsigned64 value for the month -// * day - variable length encoded unsigned64 value for the day -// * hour - optional variable length encoded unsigned64 value for the hour -// * minutes - optional variable length encoded unsigned64 value for the minutes -// * seconds - optional variable length encoded unsigned64 value for the seconds -// * useconds - optional variable length encoded unsigned64 value for the microseconds -// -// .. note:: hour, minutes, seconds, useconds are optional if all the values to the right are 0 -// -// ``.flags & 1`` (timestamp) -// -// ============= ======= -// SQL Type .flags -// ============= ======= -// DATETIME -// TIMESTAMP 1 -// -// DECIMAL -// An arbitrary length number. The number is encoded as a single byte -// indicating the position of the decimal point followed by the Packed BCD -// encoded number. Packed BCD is used to simplify conversion to and -// from strings and other native arbitrary precision math datatypes. -// .. seealso:: packed BCD in https://en.wikipedia.org/wiki/Binary-coded_decimal -// -// ``.length`` -// maximum number of displayable decimal digits (*excluding* the decimal point and sign, but including ``.fractional_digits``) -// -// .. note:: should be in the range of 1 - 65 -// -// ``.fractional_digits`` -// is the decimal digits to display out of length -// -// .. note:: should be in the range of 0 - 30 -// -// ``value`` -// the following bytes sequence: -// -// ``| scale | BCD | sign | [0x0] |`` -// -// * scale - 8bit scale value (number of decimal digit after the '.') -// * BCD - BCD encoded digits (4 bits for each digit) -// * sign - sign encoded on 4 bits (0xc = "+", 0xd = "-") -// * 0x0 - last 4bits if length(digits) % 2 == 0 -// -// Example: x04 0x12 0x34 0x01 0xd0 -> -12.3401 -// -// SET -// A list of strings representing a SET of values. -// -// ``value`` -// A sequence of 0 or more of protobuf's bytes (length prepended octets) or one of -// the special sequences with a predefined meaning listed below. -// -// Example (length of the bytes array shown in brackets): -// * ``[0]`` - the NULL value -// * ``[1] 0x00`` - a set containing a blank string '' -// * ``[1] 0x01`` - this would be an invalid value, but is to be treated as the empty set -// * ``[2] 0x01 0x00`` - a set with a single item, which is the '\0' character -// * ``[8] 0x03 F O O 0x03 B A R`` - a set with 2 items: FOO,BAR -// -// -// :param name: name of the column -// :param original_name: name of the column before an alias was applied -// :param table: name of the table the column orginates from -// :param original_table: name of the table the column orginates from before an alias was applied -// :param schema: schema the column originates from -// :param catalog: -// catalog the schema originates from -// -// .. note:: -// as there is current no support for catalogs in MySQL, don't expect this field to be set. -// In the MySQL C/S protocol the field had the value ``def`` all the time. -// -// :param fractional_digits: displayed factional decimal digits for floating point and fixed point numbers -// :param length: maximum count of displayable characters of .type -// :param flags: -// ``.type`` specific flags -// -// ======= ====== =========== -// type value description -// ======= ====== =========== -// UINT 0x0001 zerofill -// DOUBLE 0x0001 unsigned -// FLOAT 0x0001 unsigned -// DECIMAL 0x0001 unsigned -// BYTES 0x0001 rightpad -// ======= ====== =========== -// -// ====== ================ -// value description -// ====== ================ -// 0x0010 NOT_NULL -// 0x0020 PRIMARY_KEY -// 0x0040 UNIQUE_KEY -// 0x0080 MULTIPLE_KEY -// 0x0100 AUTO_INCREMENT -// ====== ================ -// -// default: 0 -// :param content_type: -// a hint about the higher-level encoding of a BYTES field -// -// ====== ====== =========== -// type value description -// ====== ====== =========== -// BYTES 0x0001 GEOMETRY (WKB encoding) -// BYTES 0x0002 JSON (text encoding) -// BYTES 0x0003 XML (text encoding) -// ====== ====== =========== -// -// .. note:: -// this list isn't comprehensive. As guideline: the field's value is expected -// to pass a validator check on client and server if this field is set. -// If the server adds more internal datatypes that rely on BLOB storage -// like image manipulation, seeking into complex types in BLOBs, ... more -// types will be added. -// -type ColumnMetaData struct { - // datatype of the field in a row - Type *ColumnMetaData_FieldType `protobuf:"varint,1,req,name=type,enum=Mysqlx.Resultset.ColumnMetaData_FieldType" json:"type,omitempty"` - Name []byte `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` - OriginalName []byte `protobuf:"bytes,3,opt,name=original_name,json=originalName" json:"original_name,omitempty"` - Table []byte `protobuf:"bytes,4,opt,name=table" json:"table,omitempty"` - OriginalTable []byte `protobuf:"bytes,5,opt,name=original_table,json=originalTable" json:"original_table,omitempty"` - Schema []byte `protobuf:"bytes,6,opt,name=schema" json:"schema,omitempty"` - Catalog []byte `protobuf:"bytes,7,opt,name=catalog" json:"catalog,omitempty"` - Collation *uint64 `protobuf:"varint,8,opt,name=collation" json:"collation,omitempty"` - FractionalDigits *uint32 `protobuf:"varint,9,opt,name=fractional_digits,json=fractionalDigits" json:"fractional_digits,omitempty"` - Length *uint32 `protobuf:"varint,10,opt,name=length" json:"length,omitempty"` - Flags *uint32 `protobuf:"varint,11,opt,name=flags" json:"flags,omitempty"` - ContentType *uint32 `protobuf:"varint,12,opt,name=content_type,json=contentType" json:"content_type,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ColumnMetaData) Reset() { *m = ColumnMetaData{} } -func (m *ColumnMetaData) String() string { return proto.CompactTextString(m) } -func (*ColumnMetaData) ProtoMessage() {} -func (*ColumnMetaData) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxResultset, []int{3} } - -func (m *ColumnMetaData) GetType() ColumnMetaData_FieldType { - if m != nil && m.Type != nil { - return *m.Type - } - return ColumnMetaData_SINT -} - -func (m *ColumnMetaData) GetName() []byte { - if m != nil { - return m.Name - } - return nil -} - -func (m *ColumnMetaData) GetOriginalName() []byte { - if m != nil { - return m.OriginalName - } - return nil -} - -func (m *ColumnMetaData) GetTable() []byte { - if m != nil { - return m.Table - } - return nil -} - -func (m *ColumnMetaData) GetOriginalTable() []byte { - if m != nil { - return m.OriginalTable - } - return nil -} - -func (m *ColumnMetaData) GetSchema() []byte { - if m != nil { - return m.Schema - } - return nil -} - -func (m *ColumnMetaData) GetCatalog() []byte { - if m != nil { - return m.Catalog - } - return nil -} - -func (m *ColumnMetaData) GetCollation() uint64 { - if m != nil && m.Collation != nil { - return *m.Collation - } - return 0 -} - -func (m *ColumnMetaData) GetFractionalDigits() uint32 { - if m != nil && m.FractionalDigits != nil { - return *m.FractionalDigits - } - return 0 -} - -func (m *ColumnMetaData) GetLength() uint32 { - if m != nil && m.Length != nil { - return *m.Length - } - return 0 -} - -func (m *ColumnMetaData) GetFlags() uint32 { - if m != nil && m.Flags != nil { - return *m.Flags - } - return 0 -} - -func (m *ColumnMetaData) GetContentType() uint32 { - if m != nil && m.ContentType != nil { - return *m.ContentType - } - return 0 -} - -// Row in a Resultset -// -// a row is represented as a list of fields encoded as byte blobs. -// Blob of size 0 represents the NULL value. Otherwise, if it contains at least -// one byte, it encodes a non-null value of the field using encoding appropriate for the -// type of the value given by ``ColumnMetadata``, as specified -// in the :protobuf:msg:`Mysqlx.Resultset::ColumnMetaData` description. -// -type Row struct { - Field [][]byte `protobuf:"bytes,1,rep,name=field" json:"field,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Row) Reset() { *m = Row{} } -func (m *Row) String() string { return proto.CompactTextString(m) } -func (*Row) ProtoMessage() {} -func (*Row) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxResultset, []int{4} } - -func (m *Row) GetField() [][]byte { - if m != nil { - return m.Field - } - return nil -} - -func init() { - proto.RegisterType((*FetchDoneMoreOutParams)(nil), "Mysqlx.Resultset.FetchDoneMoreOutParams") - proto.RegisterType((*FetchDoneMoreResultsets)(nil), "Mysqlx.Resultset.FetchDoneMoreResultsets") - proto.RegisterType((*FetchDone)(nil), "Mysqlx.Resultset.FetchDone") - proto.RegisterType((*ColumnMetaData)(nil), "Mysqlx.Resultset.ColumnMetaData") - proto.RegisterType((*Row)(nil), "Mysqlx.Resultset.Row") - proto.RegisterEnum("Mysqlx.Resultset.ColumnMetaData_FieldType", ColumnMetaData_FieldType_name, ColumnMetaData_FieldType_value) -} -func (m *FetchDoneMoreOutParams) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FetchDoneMoreOutParams) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *FetchDoneMoreResultsets) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FetchDoneMoreResultsets) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *FetchDone) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FetchDone) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ColumnMetaData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ColumnMetaData) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Type == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0x8 - i++ - i = encodeVarintMysqlxResultset(dAtA, i, uint64(*m.Type)) - } - if m.Name != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMysqlxResultset(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.OriginalName != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintMysqlxResultset(dAtA, i, uint64(len(m.OriginalName))) - i += copy(dAtA[i:], m.OriginalName) - } - if m.Table != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintMysqlxResultset(dAtA, i, uint64(len(m.Table))) - i += copy(dAtA[i:], m.Table) - } - if m.OriginalTable != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintMysqlxResultset(dAtA, i, uint64(len(m.OriginalTable))) - i += copy(dAtA[i:], m.OriginalTable) - } - if m.Schema != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintMysqlxResultset(dAtA, i, uint64(len(m.Schema))) - i += copy(dAtA[i:], m.Schema) - } - if m.Catalog != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintMysqlxResultset(dAtA, i, uint64(len(m.Catalog))) - i += copy(dAtA[i:], m.Catalog) - } - if m.Collation != nil { - dAtA[i] = 0x40 - i++ - i = encodeVarintMysqlxResultset(dAtA, i, uint64(*m.Collation)) - } - if m.FractionalDigits != nil { - dAtA[i] = 0x48 - i++ - i = encodeVarintMysqlxResultset(dAtA, i, uint64(*m.FractionalDigits)) - } - if m.Length != nil { - dAtA[i] = 0x50 - i++ - i = encodeVarintMysqlxResultset(dAtA, i, uint64(*m.Length)) - } - if m.Flags != nil { - dAtA[i] = 0x58 - i++ - i = encodeVarintMysqlxResultset(dAtA, i, uint64(*m.Flags)) - } - if m.ContentType != nil { - dAtA[i] = 0x60 - i++ - i = encodeVarintMysqlxResultset(dAtA, i, uint64(*m.ContentType)) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Row) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Row) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field) > 0 { - for _, b := range m.Field { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxResultset(dAtA, i, uint64(len(b))) - i += copy(dAtA[i:], b) - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64MysqlxResultset(dAtA []byte, offset int, v uint64) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - dAtA[offset+4] = uint8(v >> 32) - dAtA[offset+5] = uint8(v >> 40) - dAtA[offset+6] = uint8(v >> 48) - dAtA[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32MysqlxResultset(dAtA []byte, offset int, v uint32) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintMysqlxResultset(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *FetchDoneMoreOutParams) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *FetchDoneMoreResultsets) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *FetchDone) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ColumnMetaData) Size() (n int) { - var l int - _ = l - if m.Type != nil { - n += 1 + sovMysqlxResultset(uint64(*m.Type)) - } - if m.Name != nil { - l = len(m.Name) - n += 1 + l + sovMysqlxResultset(uint64(l)) - } - if m.OriginalName != nil { - l = len(m.OriginalName) - n += 1 + l + sovMysqlxResultset(uint64(l)) - } - if m.Table != nil { - l = len(m.Table) - n += 1 + l + sovMysqlxResultset(uint64(l)) - } - if m.OriginalTable != nil { - l = len(m.OriginalTable) - n += 1 + l + sovMysqlxResultset(uint64(l)) - } - if m.Schema != nil { - l = len(m.Schema) - n += 1 + l + sovMysqlxResultset(uint64(l)) - } - if m.Catalog != nil { - l = len(m.Catalog) - n += 1 + l + sovMysqlxResultset(uint64(l)) - } - if m.Collation != nil { - n += 1 + sovMysqlxResultset(uint64(*m.Collation)) - } - if m.FractionalDigits != nil { - n += 1 + sovMysqlxResultset(uint64(*m.FractionalDigits)) - } - if m.Length != nil { - n += 1 + sovMysqlxResultset(uint64(*m.Length)) - } - if m.Flags != nil { - n += 1 + sovMysqlxResultset(uint64(*m.Flags)) - } - if m.ContentType != nil { - n += 1 + sovMysqlxResultset(uint64(*m.ContentType)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Row) Size() (n int) { - var l int - _ = l - if len(m.Field) > 0 { - for _, b := range m.Field { - l = len(b) - n += 1 + l + sovMysqlxResultset(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMysqlxResultset(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozMysqlxResultset(x uint64) (n int) { - return sovMysqlxResultset(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *FetchDoneMoreOutParams) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxResultset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FetchDoneMoreOutParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FetchDoneMoreOutParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipMysqlxResultset(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxResultset - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FetchDoneMoreResultsets) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxResultset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FetchDoneMoreResultsets: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FetchDoneMoreResultsets: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipMysqlxResultset(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxResultset - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FetchDone) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxResultset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FetchDone: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FetchDone: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipMysqlxResultset(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxResultset - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ColumnMetaData) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxResultset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ColumnMetaData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ColumnMetaData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var v ColumnMetaData_FieldType - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxResultset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (ColumnMetaData_FieldType(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Type = &v - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxResultset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMysqlxResultset - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = append(m.Name[:0], dAtA[iNdEx:postIndex]...) - if m.Name == nil { - m.Name = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginalName", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxResultset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMysqlxResultset - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OriginalName = append(m.OriginalName[:0], dAtA[iNdEx:postIndex]...) - if m.OriginalName == nil { - m.OriginalName = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxResultset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMysqlxResultset - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Table = append(m.Table[:0], dAtA[iNdEx:postIndex]...) - if m.Table == nil { - m.Table = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginalTable", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxResultset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMysqlxResultset - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OriginalTable = append(m.OriginalTable[:0], dAtA[iNdEx:postIndex]...) - if m.OriginalTable == nil { - m.OriginalTable = []byte{} - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxResultset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMysqlxResultset - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Schema = append(m.Schema[:0], dAtA[iNdEx:postIndex]...) - if m.Schema == nil { - m.Schema = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Catalog", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxResultset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMysqlxResultset - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Catalog = append(m.Catalog[:0], dAtA[iNdEx:postIndex]...) - if m.Catalog == nil { - m.Catalog = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Collation", wireType) - } - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxResultset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Collation = &v - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FractionalDigits", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxResultset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FractionalDigits = &v - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Length", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxResultset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Length = &v - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxResultset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Flags = &v - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ContentType", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxResultset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.ContentType = &v - default: - iNdEx = preIndex - skippy, err := skipMysqlxResultset(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxResultset - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Row) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxResultset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Row: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Row: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxResultset - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMysqlxResultset - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Field = append(m.Field, make([]byte, postIndex-iNdEx)) - copy(m.Field[len(m.Field)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxResultset(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxResultset - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMysqlxResultset(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxResultset - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxResultset - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxResultset - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthMysqlxResultset - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxResultset - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipMysqlxResultset(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthMysqlxResultset = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMysqlxResultset = fmt.Errorf("proto: integer overflow") -) - -func init() { - proto.RegisterFile("github.com/pingcap/tipb/go-mysqlx/Resultset/mysqlx_resultset.proto", fileDescriptorMysqlxResultset) -} - -var fileDescriptorMysqlxResultset = []byte{ - // 487 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x5c, 0x92, 0xdf, 0x8e, 0xd2, 0x40, - 0x18, 0xc5, 0xed, 0x52, 0xfe, 0x7d, 0x74, 0x71, 0x76, 0x62, 0xd6, 0x31, 0x6e, 0x08, 0xd6, 0x18, - 0x89, 0x26, 0xdd, 0xc4, 0x07, 0x30, 0x81, 0x6d, 0x49, 0x48, 0x28, 0x98, 0x52, 0x2e, 0xbc, 0x22, - 0xb3, 0xdd, 0xa1, 0xd4, 0x4c, 0x3b, 0xd8, 0x0e, 0x71, 0xb9, 0xf5, 0x29, 0xf4, 0x8d, 0xbc, 0xf4, - 0x11, 0x0c, 0xbe, 0x88, 0x99, 0x29, 0x74, 0xb3, 0xde, 0x9d, 0x73, 0x7e, 0xe7, 0x63, 0x98, 0xaf, - 0x03, 0x6f, 0xfd, 0x7d, 0xf1, 0x95, 0xdf, 0x5f, 0x07, 0xac, 0xd8, 0x71, 0x59, 0x30, 0x79, 0x9d, - 0xea, 0x60, 0x95, 0x9f, 0x02, 0x67, 0x9b, 0x0b, 0x29, 0x30, 0x2a, 0x8b, 0x4e, 0x55, 0xb4, 0x09, - 0x5c, 0x8e, 0x99, 0x8c, 0x36, 0xae, 0xc8, 0x98, 0x2f, 0x72, 0x36, 0xdf, 0xc9, 0x4f, 0x34, 0xa7, - 0x69, 0x61, 0xbf, 0x80, 0xe7, 0x8f, 0x48, 0x35, 0x53, 0xd8, 0x1d, 0x68, 0x57, 0xc8, 0xfe, 0x69, - 0x42, 0xf7, 0x46, 0xf0, 0x5d, 0x9a, 0xf9, 0x4c, 0x52, 0x97, 0x4a, 0x8a, 0x3f, 0x82, 0x29, 0xf7, - 0x5b, 0x46, 0x8c, 0xfe, 0xd9, 0xa0, 0xfb, 0xe1, 0x9d, 0xf3, 0xff, 0xa9, 0xce, 0xe3, 0xbe, 0x33, - 0x4e, 0x18, 0xbf, 0x0b, 0xf7, 0x5b, 0x16, 0xe8, 0x39, 0x8c, 0xc1, 0xcc, 0x68, 0xca, 0xc8, 0x59, - 0xdf, 0x18, 0x58, 0x81, 0xd6, 0xf8, 0x35, 0x9c, 0x8b, 0x3c, 0x89, 0x93, 0x8c, 0xf2, 0x95, 0x86, - 0x35, 0x0d, 0xad, 0x53, 0x38, 0x53, 0xa5, 0x67, 0x50, 0x97, 0xf4, 0x96, 0x33, 0x62, 0x6a, 0x58, - 0x1a, 0xfc, 0x06, 0xba, 0xd5, 0x68, 0x89, 0xeb, 0x1a, 0x57, 0x3f, 0x18, 0xea, 0xda, 0x25, 0x34, - 0x8a, 0x68, 0xc3, 0x52, 0x4a, 0x1a, 0x1a, 0x1f, 0x1d, 0x26, 0xd0, 0x8c, 0xa8, 0xa4, 0x5c, 0xc4, - 0xa4, 0xa9, 0xc1, 0xc9, 0xe2, 0x2b, 0x68, 0x47, 0x82, 0x73, 0x2a, 0x13, 0x91, 0x91, 0x56, 0xdf, - 0x18, 0x98, 0xc1, 0x43, 0x80, 0xdf, 0xc3, 0xc5, 0x3a, 0xa7, 0x91, 0xd2, 0x94, 0xaf, 0xee, 0x92, - 0x38, 0x91, 0x05, 0x69, 0xf7, 0x8d, 0xc1, 0x79, 0x80, 0x1e, 0x80, 0xab, 0x73, 0x75, 0x38, 0x67, - 0x59, 0x2c, 0x37, 0x04, 0x74, 0xe3, 0xe8, 0xd4, 0x8d, 0xd6, 0x9c, 0xc6, 0x05, 0xe9, 0xe8, 0xb8, - 0x34, 0xf8, 0x15, 0x58, 0x91, 0xc8, 0x24, 0xcb, 0xe4, 0x4a, 0x2f, 0xda, 0xd2, 0xb0, 0x73, 0xcc, - 0xd4, 0x26, 0xed, 0xef, 0x06, 0xb4, 0xab, 0xbd, 0xe2, 0x16, 0x98, 0x8b, 0xc9, 0x2c, 0x44, 0x86, - 0x52, 0x4b, 0xa5, 0xce, 0x30, 0x40, 0xc3, 0x9d, 0x2f, 0x47, 0x53, 0x0f, 0xd5, 0x71, 0x1b, 0xea, - 0xe3, 0xe9, 0x7c, 0x18, 0xa2, 0x86, 0x92, 0xa3, 0xcf, 0xa1, 0xb7, 0x40, 0x4d, 0xd5, 0x0d, 0x27, - 0xbe, 0x87, 0x00, 0x5b, 0xd0, 0x72, 0x87, 0xa1, 0xa7, 0x9d, 0x85, 0x9b, 0x50, 0x5b, 0x78, 0x21, - 0x7a, 0xaa, 0x0a, 0xde, 0x6c, 0xe9, 0x23, 0xa4, 0xa2, 0xd1, 0x24, 0x44, 0x17, 0xb8, 0x03, 0x4d, - 0xd7, 0xbb, 0x99, 0xf8, 0xc3, 0x29, 0xc2, 0xf6, 0x4b, 0xa8, 0x05, 0xe2, 0x9b, 0xbe, 0x84, 0xfa, - 0x2b, 0xc4, 0xe8, 0xd7, 0xd4, 0x67, 0xd1, 0x66, 0xe4, 0xfc, 0x3a, 0xf4, 0x8c, 0xdf, 0x87, 0x9e, - 0xf1, 0xe7, 0xd0, 0x33, 0x7e, 0xfc, 0xed, 0x3d, 0x81, 0xab, 0x48, 0xa4, 0x8e, 0x7e, 0xba, 0x4e, - 0xf4, 0xa5, 0x14, 0xf7, 0xe5, 0xcb, 0xbd, 0xdd, 0xad, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xb6, - 0x6d, 0xea, 0xb7, 0xe6, 0x02, 0x00, 0x00, -} diff --git a/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Session/mysqlx_session.pb.go b/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Session/mysqlx_session.pb.go deleted file mode 100644 index 80ca9b6b65519..0000000000000 --- a/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Session/mysqlx_session.pb.go +++ /dev/null @@ -1,971 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/pingcap/tipb/go-mysqlx/Session/mysqlx_session.proto - -/* -Package Mysqlx_Session is a generated protocol buffer package. - -Messages to manage Sessions - -.. uml:: - - == session start == - Client -> Server: AuthenticateStart - opt - Server --> Client: AuthenticateContinue - Client --> Server: AuthenticateContinue - end - alt - Server --> Client: AuthenticateOk - else - Server --> Client: Error - end - ... - == session reset == - Client -> Server: Reset - Server --> Client: Ok - == session end == - Client -> Server: Close - Server --> Client: Ok - - -It is generated from these files: - github.com/pingcap/tipb/go-mysqlx/Session/mysqlx_session.proto - -It has these top-level messages: - AuthenticateStart - AuthenticateContinue - AuthenticateOk - Reset - Close -*/ -package Mysqlx_Session - -import ( - "fmt" - - proto "github.com/golang/protobuf/proto" - - math "math" - - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - - io "io" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -// the initial message send from the client to the server to start the -// authentication proccess -// -// :param mech_name: authentication mechanism name -// :param auth_data: authentication data -// :param initial_response: initial response -// :Returns: :protobuf:msg:`Mysqlx.Session::AuthenticateContinue` -type AuthenticateStart struct { - MechName *string `protobuf:"bytes,1,req,name=mech_name,json=mechName" json:"mech_name,omitempty"` - AuthData []byte `protobuf:"bytes,2,opt,name=auth_data,json=authData" json:"auth_data,omitempty"` - InitialResponse []byte `protobuf:"bytes,3,opt,name=initial_response,json=initialResponse" json:"initial_response,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AuthenticateStart) Reset() { *m = AuthenticateStart{} } -func (m *AuthenticateStart) String() string { return proto.CompactTextString(m) } -func (*AuthenticateStart) ProtoMessage() {} -func (*AuthenticateStart) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxSession, []int{0} } - -func (m *AuthenticateStart) GetMechName() string { - if m != nil && m.MechName != nil { - return *m.MechName - } - return "" -} - -func (m *AuthenticateStart) GetAuthData() []byte { - if m != nil { - return m.AuthData - } - return nil -} - -func (m *AuthenticateStart) GetInitialResponse() []byte { - if m != nil { - return m.InitialResponse - } - return nil -} - -// send by client or server after a :protobuf:msg:`Mysqlx.Session::AuthenticateStart` to -// exchange more auth data -// -// :param auth_data: authentication data -// :Returns: :protobuf:msg:`Mysqlx.Session::AuthenticateContinue` -type AuthenticateContinue struct { - AuthData []byte `protobuf:"bytes,1,req,name=auth_data,json=authData" json:"auth_data,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AuthenticateContinue) Reset() { *m = AuthenticateContinue{} } -func (m *AuthenticateContinue) String() string { return proto.CompactTextString(m) } -func (*AuthenticateContinue) ProtoMessage() {} -func (*AuthenticateContinue) Descriptor() ([]byte, []int) { - return fileDescriptorMysqlxSession, []int{1} -} - -func (m *AuthenticateContinue) GetAuthData() []byte { - if m != nil { - return m.AuthData - } - return nil -} - -// sent by the server after successful authentication -// -// :param auth_data: authentication data -type AuthenticateOk struct { - AuthData []byte `protobuf:"bytes,1,opt,name=auth_data,json=authData" json:"auth_data,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AuthenticateOk) Reset() { *m = AuthenticateOk{} } -func (m *AuthenticateOk) String() string { return proto.CompactTextString(m) } -func (*AuthenticateOk) ProtoMessage() {} -func (*AuthenticateOk) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxSession, []int{2} } - -func (m *AuthenticateOk) GetAuthData() []byte { - if m != nil { - return m.AuthData - } - return nil -} - -// reset the current session -// -// :Returns: :protobuf:msg:`Mysqlx::Ok` -type Reset struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *Reset) Reset() { *m = Reset{} } -func (m *Reset) String() string { return proto.CompactTextString(m) } -func (*Reset) ProtoMessage() {} -func (*Reset) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxSession, []int{3} } - -// close the current session -// -// :Returns: :protobuf:msg:`Mysqlx::Ok` -type Close struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *Close) Reset() { *m = Close{} } -func (m *Close) String() string { return proto.CompactTextString(m) } -func (*Close) ProtoMessage() {} -func (*Close) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxSession, []int{4} } - -func init() { - proto.RegisterType((*AuthenticateStart)(nil), "Mysqlx.Session.AuthenticateStart") - proto.RegisterType((*AuthenticateContinue)(nil), "Mysqlx.Session.AuthenticateContinue") - proto.RegisterType((*AuthenticateOk)(nil), "Mysqlx.Session.AuthenticateOk") - proto.RegisterType((*Reset)(nil), "Mysqlx.Session.Reset") - proto.RegisterType((*Close)(nil), "Mysqlx.Session.Close") -} -func (m *AuthenticateStart) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthenticateStart) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.MechName == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxSession(dAtA, i, uint64(len(*m.MechName))) - i += copy(dAtA[i:], *m.MechName) - } - if m.AuthData != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMysqlxSession(dAtA, i, uint64(len(m.AuthData))) - i += copy(dAtA[i:], m.AuthData) - } - if m.InitialResponse != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintMysqlxSession(dAtA, i, uint64(len(m.InitialResponse))) - i += copy(dAtA[i:], m.InitialResponse) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AuthenticateContinue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthenticateContinue) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.AuthData == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxSession(dAtA, i, uint64(len(m.AuthData))) - i += copy(dAtA[i:], m.AuthData) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AuthenticateOk) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AuthenticateOk) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.AuthData != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxSession(dAtA, i, uint64(len(m.AuthData))) - i += copy(dAtA[i:], m.AuthData) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Reset) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Reset) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Close) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Close) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64MysqlxSession(dAtA []byte, offset int, v uint64) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - dAtA[offset+4] = uint8(v >> 32) - dAtA[offset+5] = uint8(v >> 40) - dAtA[offset+6] = uint8(v >> 48) - dAtA[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32MysqlxSession(dAtA []byte, offset int, v uint32) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintMysqlxSession(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *AuthenticateStart) Size() (n int) { - var l int - _ = l - if m.MechName != nil { - l = len(*m.MechName) - n += 1 + l + sovMysqlxSession(uint64(l)) - } - if m.AuthData != nil { - l = len(m.AuthData) - n += 1 + l + sovMysqlxSession(uint64(l)) - } - if m.InitialResponse != nil { - l = len(m.InitialResponse) - n += 1 + l + sovMysqlxSession(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthenticateContinue) Size() (n int) { - var l int - _ = l - if m.AuthData != nil { - l = len(m.AuthData) - n += 1 + l + sovMysqlxSession(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AuthenticateOk) Size() (n int) { - var l int - _ = l - if m.AuthData != nil { - l = len(m.AuthData) - n += 1 + l + sovMysqlxSession(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Reset) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Close) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMysqlxSession(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozMysqlxSession(x uint64) (n int) { - return sovMysqlxSession(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *AuthenticateStart) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxSession - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthenticateStart: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthenticateStart: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MechName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxSession - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlxSession - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.MechName = &s - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthData", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxSession - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMysqlxSession - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AuthData = append(m.AuthData[:0], dAtA[iNdEx:postIndex]...) - if m.AuthData == nil { - m.AuthData = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InitialResponse", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxSession - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMysqlxSession - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InitialResponse = append(m.InitialResponse[:0], dAtA[iNdEx:postIndex]...) - if m.InitialResponse == nil { - m.InitialResponse = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxSession(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxSession - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthenticateContinue) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxSession - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthenticateContinue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthenticateContinue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthData", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxSession - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMysqlxSession - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AuthData = append(m.AuthData[:0], dAtA[iNdEx:postIndex]...) - if m.AuthData == nil { - m.AuthData = []byte{} - } - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - default: - iNdEx = preIndex - skippy, err := skipMysqlxSession(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxSession - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AuthenticateOk) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxSession - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AuthenticateOk: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AuthenticateOk: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthData", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxSession - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMysqlxSession - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AuthData = append(m.AuthData[:0], dAtA[iNdEx:postIndex]...) - if m.AuthData == nil { - m.AuthData = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlxSession(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxSession - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Reset) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxSession - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Reset: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Reset: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipMysqlxSession(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxSession - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Close) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxSession - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Close: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Close: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipMysqlxSession(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxSession - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMysqlxSession(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxSession - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxSession - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxSession - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthMysqlxSession - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxSession - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipMysqlxSession(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthMysqlxSession = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMysqlxSession = fmt.Errorf("proto: integer overflow") -) - -func init() { - proto.RegisterFile("github.com/pingcap/tipb/go-mysqlx/Session/mysqlx_session.proto", fileDescriptorMysqlxSession) -} - -var fileDescriptorMysqlxSession = []byte{ - // 250 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x52, 0xf6, 0xad, 0x2c, 0x2e, - 0xcc, 0xa9, 0xd0, 0x0f, 0x4e, 0x2d, 0x2e, 0xce, 0xcc, 0xcf, 0xd3, 0xcf, 0x05, 0x73, 0xe3, 0x8b, - 0x21, 0x5c, 0xbd, 0x82, 0xa2, 0xfc, 0x92, 0x7c, 0x21, 0x3e, 0x88, 0x22, 0x3d, 0xa8, 0x22, 0xa5, - 0x0a, 0x2e, 0x41, 0xc7, 0xd2, 0x92, 0x8c, 0xd4, 0xbc, 0x92, 0xcc, 0xe4, 0xc4, 0x92, 0xd4, 0xe0, - 0x92, 0xc4, 0xa2, 0x12, 0x21, 0x69, 0x2e, 0xce, 0xdc, 0xd4, 0xe4, 0x8c, 0xf8, 0xbc, 0xc4, 0xdc, - 0x54, 0x09, 0x46, 0x05, 0x26, 0x0d, 0xce, 0x20, 0x0e, 0x90, 0x80, 0x5f, 0x62, 0x6e, 0x2a, 0x48, - 0x32, 0xb1, 0xb4, 0x24, 0x23, 0x3e, 0x25, 0xb1, 0x24, 0x51, 0x82, 0x49, 0x81, 0x51, 0x83, 0x27, - 0x88, 0x03, 0x24, 0xe0, 0x92, 0x58, 0x92, 0x28, 0xa4, 0xc9, 0x25, 0x90, 0x99, 0x97, 0x59, 0x92, - 0x99, 0x98, 0x13, 0x5f, 0x94, 0x5a, 0x5c, 0x90, 0x9f, 0x57, 0x9c, 0x2a, 0xc1, 0x0c, 0x56, 0xc3, - 0x0f, 0x15, 0x0f, 0x82, 0x0a, 0x2b, 0x19, 0x73, 0x89, 0x20, 0xdb, 0xec, 0x9c, 0x9f, 0x57, 0x92, - 0x99, 0x57, 0x8a, 0x66, 0x3e, 0xc8, 0x72, 0x24, 0xf3, 0x95, 0x74, 0xb9, 0xf8, 0x90, 0x35, 0xf9, - 0x67, 0xa3, 0x2b, 0x47, 0x71, 0x8e, 0x12, 0x3b, 0x17, 0x6b, 0x50, 0x6a, 0x71, 0x6a, 0x09, 0x88, - 0xe1, 0x9c, 0x93, 0x5f, 0x9c, 0xea, 0xa4, 0x77, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, - 0x0f, 0x1e, 0xc9, 0x31, 0xce, 0x78, 0x2c, 0xc7, 0xc0, 0x25, 0x93, 0x9c, 0x9f, 0xab, 0x07, 0x0e, - 0x2b, 0xbd, 0xe4, 0x2c, 0x08, 0xa3, 0x02, 0x12, 0x58, 0x49, 0xa5, 0x69, 0x80, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x35, 0x4f, 0x12, 0x2a, 0x55, 0x01, 0x00, 0x00, -} diff --git a/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Sql/mysqlx_sql.pb.go b/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Sql/mysqlx_sql.pb.go deleted file mode 100644 index ca1f5476da129..0000000000000 --- a/_vendor/src/github.com/pingcap/tipb/go-mysqlx/Sql/mysqlx_sql.pb.go +++ /dev/null @@ -1,619 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/pingcap/tipb/go-mysqlx/Sql/mysqlx_sql.proto - -/* - Package Mysqlx_Sql is a generated protocol buffer package. - - Messages of the MySQL Package - - It is generated from these files: - github.com/pingcap/tipb/go-mysqlx/Sql/mysqlx_sql.proto - - It has these top-level messages: - StmtExecute - StmtExecuteOk -*/ -package Mysqlx_Sql - -import ( - "fmt" - - proto "github.com/golang/protobuf/proto" - - math "math" - - Mysqlx_Datatypes "github.com/pingcap/tipb/go-mysqlx/Datatypes" - - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - - io "io" -) - -// 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 - -// execute a statement in the given namespace -// -// .. uml:: -// -// client -> server: StmtExecute -// ... zero or more Resultsets ... -// server --> client: StmtExecuteOk -// -// Notices: -// This message may generate a notice containing WARNINGs generated by its execution. -// This message may generate a notice containing INFO messages generated by its execution. -// -// :param namespace: namespace of the statement to be executed -// :param stmt: statement that shall be executed. -// :param args: values for wildcard replacements -// :param compact_metadata: send only type information for :protobuf:msg:`Mysqlx.Resultset::ColumnMetadata`, skipping names and others -// :returns: -// * zero or one :protobuf:msg:`Mysqlx.Resultset::` followed by :protobuf:msg:`Mysqlx.Sql::StmtExecuteOk` -type StmtExecute struct { - Namespace *string `protobuf:"bytes,3,opt,name=namespace,def=sql" json:"namespace,omitempty"` - Stmt []byte `protobuf:"bytes,1,req,name=stmt" json:"stmt,omitempty"` - Args []*Mysqlx_Datatypes.Any `protobuf:"bytes,2,rep,name=args" json:"args,omitempty"` - CompactMetadata *bool `protobuf:"varint,4,opt,name=compact_metadata,json=compactMetadata,def=0" json:"compact_metadata,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *StmtExecute) Reset() { *m = StmtExecute{} } -func (m *StmtExecute) String() string { return proto.CompactTextString(m) } -func (*StmtExecute) ProtoMessage() {} -func (*StmtExecute) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxSql, []int{0} } - -const Default_StmtExecute_Namespace string = "sql" -const Default_StmtExecute_CompactMetadata bool = false - -func (m *StmtExecute) GetNamespace() string { - if m != nil && m.Namespace != nil { - return *m.Namespace - } - return Default_StmtExecute_Namespace -} - -func (m *StmtExecute) GetStmt() []byte { - if m != nil { - return m.Stmt - } - return nil -} - -func (m *StmtExecute) GetArgs() []*Mysqlx_Datatypes.Any { - if m != nil { - return m.Args - } - return nil -} - -func (m *StmtExecute) GetCompactMetadata() bool { - if m != nil && m.CompactMetadata != nil { - return *m.CompactMetadata - } - return Default_StmtExecute_CompactMetadata -} - -// statement executed successful -type StmtExecuteOk struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *StmtExecuteOk) Reset() { *m = StmtExecuteOk{} } -func (m *StmtExecuteOk) String() string { return proto.CompactTextString(m) } -func (*StmtExecuteOk) ProtoMessage() {} -func (*StmtExecuteOk) Descriptor() ([]byte, []int) { return fileDescriptorMysqlxSql, []int{1} } - -func init() { - proto.RegisterType((*StmtExecute)(nil), "Mysqlx.Sql.StmtExecute") - proto.RegisterType((*StmtExecuteOk)(nil), "Mysqlx.Sql.StmtExecuteOk") -} -func (m *StmtExecute) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StmtExecute) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Stmt == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlxSql(dAtA, i, uint64(len(m.Stmt))) - i += copy(dAtA[i:], m.Stmt) - } - if len(m.Args) > 0 { - for _, msg := range m.Args { - dAtA[i] = 0x12 - i++ - i = encodeVarintMysqlxSql(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Namespace != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintMysqlxSql(dAtA, i, uint64(len(*m.Namespace))) - i += copy(dAtA[i:], *m.Namespace) - } - if m.CompactMetadata != nil { - dAtA[i] = 0x20 - i++ - if *m.CompactMetadata { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *StmtExecuteOk) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StmtExecuteOk) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64MysqlxSql(dAtA []byte, offset int, v uint64) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - dAtA[offset+4] = uint8(v >> 32) - dAtA[offset+5] = uint8(v >> 40) - dAtA[offset+6] = uint8(v >> 48) - dAtA[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32MysqlxSql(dAtA []byte, offset int, v uint32) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintMysqlxSql(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *StmtExecute) Size() (n int) { - var l int - _ = l - if m.Stmt != nil { - l = len(m.Stmt) - n += 1 + l + sovMysqlxSql(uint64(l)) - } - if len(m.Args) > 0 { - for _, e := range m.Args { - l = e.Size() - n += 1 + l + sovMysqlxSql(uint64(l)) - } - } - if m.Namespace != nil { - l = len(*m.Namespace) - n += 1 + l + sovMysqlxSql(uint64(l)) - } - if m.CompactMetadata != nil { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *StmtExecuteOk) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMysqlxSql(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozMysqlxSql(x uint64) (n int) { - return sovMysqlxSql(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *StmtExecute) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxSql - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StmtExecute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StmtExecute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stmt", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxSql - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMysqlxSql - } - postIndex := iNdEx + byteLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Stmt = append(m.Stmt[:0], dAtA[iNdEx:postIndex]...) - if m.Stmt == nil { - m.Stmt = []byte{} - } - iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxSql - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMysqlxSql - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Args = append(m.Args, &Mysqlx_Datatypes.Any{}) - if err := m.Args[len(m.Args)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxSql - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlxSql - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Namespace = &s - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CompactMetadata", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxSql - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.CompactMetadata = &b - default: - iNdEx = preIndex - skippy, err := skipMysqlxSql(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxSql - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StmtExecuteOk) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlxSql - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StmtExecuteOk: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StmtExecuteOk: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipMysqlxSql(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlxSql - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMysqlxSql(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxSql - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxSql - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxSql - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthMysqlxSql - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlxSql - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipMysqlxSql(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthMysqlxSql = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMysqlxSql = fmt.Errorf("proto: integer overflow") -) - -func init() { - proto.RegisterFile("github.com/pingcap/tipb/go-mysqlx/Sql/mysqlx_sql.proto", fileDescriptorMysqlxSql) -} - -var fileDescriptorMysqlxSql = []byte{ - // 250 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x92, 0xf6, 0xad, 0x2c, 0x2e, - 0xcc, 0xa9, 0xd0, 0x0f, 0x2e, 0xcc, 0xd1, 0xcf, 0x05, 0x33, 0xe3, 0x8b, 0x0b, 0x73, 0xf4, 0x0a, - 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0xb8, 0x20, 0x92, 0x7a, 0xc1, 0x85, 0x39, 0x52, 0xea, 0x50, 0x85, - 0x2e, 0x89, 0x25, 0x89, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x30, 0xe5, 0x29, 0x30, 0x01, 0x88, 0x26, - 0xa5, 0x85, 0x8c, 0x5c, 0xdc, 0xc1, 0x25, 0xb9, 0x25, 0xae, 0x15, 0xa9, 0xc9, 0xa5, 0x25, 0xa9, - 0x42, 0x42, 0x5c, 0x2c, 0xc5, 0x25, 0xb9, 0x25, 0x12, 0x8c, 0x0a, 0x4c, 0x1a, 0x3c, 0x41, 0x60, - 0xb6, 0x90, 0x26, 0x17, 0x4b, 0x62, 0x51, 0x7a, 0xb1, 0x04, 0x93, 0x02, 0xb3, 0x06, 0xb7, 0x91, - 0xa8, 0x1e, 0xd4, 0x1e, 0xb8, 0xd9, 0x7a, 0x8e, 0x79, 0x95, 0x41, 0x60, 0x25, 0x42, 0x8a, 0x5c, - 0x9c, 0x79, 0x89, 0xb9, 0xa9, 0xc5, 0x05, 0x89, 0xc9, 0xa9, 0x12, 0xcc, 0x0a, 0x8c, 0x1a, 0x9c, - 0x56, 0xcc, 0xc5, 0x85, 0x39, 0x41, 0x08, 0x51, 0x21, 0x03, 0x2e, 0x81, 0xe4, 0xfc, 0xdc, 0x82, - 0xc4, 0xe4, 0x92, 0xf8, 0xdc, 0xd4, 0x92, 0x44, 0x90, 0x83, 0x24, 0x58, 0x14, 0x18, 0x35, 0x38, - 0xac, 0x58, 0xd3, 0x12, 0x73, 0x8a, 0x53, 0x83, 0xf8, 0xa1, 0xd2, 0xbe, 0x50, 0x59, 0x25, 0x7e, - 0x2e, 0x5e, 0x24, 0x27, 0xfa, 0x67, 0x3b, 0xe9, 0x9d, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, - 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x33, 0x1e, 0xcb, 0x31, 0x70, 0xc9, 0x24, 0xe7, 0xe7, 0xea, 0x81, - 0xbd, 0xa8, 0x97, 0x9c, 0x05, 0x61, 0x54, 0x40, 0x7c, 0x98, 0x54, 0x9a, 0x06, 0x08, 0x00, 0x00, - 0xff, 0xff, 0x69, 0x0b, 0x10, 0xa9, 0x37, 0x01, 0x00, 0x00, -} diff --git a/_vendor/src/github.com/pingcap/tipb/go-mysqlx/mysqlx.pb.go b/_vendor/src/github.com/pingcap/tipb/go-mysqlx/mysqlx.pb.go deleted file mode 100644 index 8d097e71a399c..0000000000000 --- a/_vendor/src/github.com/pingcap/tipb/go-mysqlx/mysqlx.pb.go +++ /dev/null @@ -1,1045 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/pingcap/tipb/go-mysqlx/mysqlx.proto - -/* - Package Mysqlx is a generated protocol buffer package. - - It is generated from these files: - github.com/pingcap/tipb/go-mysqlx/mysqlx.proto - - It has these top-level messages: - ClientMessages - ServerMessages - Ok - Error -*/ -package Mysqlx - -import ( - "fmt" - - proto "github.com/golang/protobuf/proto" - - math "math" - - github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" - - io "io" -) - -// 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 ClientMessages_Type int32 - -const ( - ClientMessages_CON_CAPABILITIES_GET ClientMessages_Type = 1 - ClientMessages_CON_CAPABILITIES_SET ClientMessages_Type = 2 - ClientMessages_CON_CLOSE ClientMessages_Type = 3 - ClientMessages_SESS_AUTHENTICATE_START ClientMessages_Type = 4 - ClientMessages_SESS_AUTHENTICATE_CONTINUE ClientMessages_Type = 5 - ClientMessages_SESS_RESET ClientMessages_Type = 6 - ClientMessages_SESS_CLOSE ClientMessages_Type = 7 - ClientMessages_SQL_STMT_EXECUTE ClientMessages_Type = 12 - ClientMessages_CRUD_FIND ClientMessages_Type = 17 - ClientMessages_CRUD_INSERT ClientMessages_Type = 18 - ClientMessages_CRUD_UPDATE ClientMessages_Type = 19 - ClientMessages_CRUD_DELETE ClientMessages_Type = 20 - ClientMessages_EXPECT_OPEN ClientMessages_Type = 24 - ClientMessages_EXPECT_CLOSE ClientMessages_Type = 25 - ClientMessages_CRUD_CREATE_VIEW ClientMessages_Type = 30 - ClientMessages_CRUD_MODIFY_VIEW ClientMessages_Type = 31 - ClientMessages_CRUD_DROP_VIEW ClientMessages_Type = 32 -) - -var ClientMessages_Type_name = map[int32]string{ - 1: "CON_CAPABILITIES_GET", - 2: "CON_CAPABILITIES_SET", - 3: "CON_CLOSE", - 4: "SESS_AUTHENTICATE_START", - 5: "SESS_AUTHENTICATE_CONTINUE", - 6: "SESS_RESET", - 7: "SESS_CLOSE", - 12: "SQL_STMT_EXECUTE", - 17: "CRUD_FIND", - 18: "CRUD_INSERT", - 19: "CRUD_UPDATE", - 20: "CRUD_DELETE", - 24: "EXPECT_OPEN", - 25: "EXPECT_CLOSE", - 30: "CRUD_CREATE_VIEW", - 31: "CRUD_MODIFY_VIEW", - 32: "CRUD_DROP_VIEW", -} -var ClientMessages_Type_value = map[string]int32{ - "CON_CAPABILITIES_GET": 1, - "CON_CAPABILITIES_SET": 2, - "CON_CLOSE": 3, - "SESS_AUTHENTICATE_START": 4, - "SESS_AUTHENTICATE_CONTINUE": 5, - "SESS_RESET": 6, - "SESS_CLOSE": 7, - "SQL_STMT_EXECUTE": 12, - "CRUD_FIND": 17, - "CRUD_INSERT": 18, - "CRUD_UPDATE": 19, - "CRUD_DELETE": 20, - "EXPECT_OPEN": 24, - "EXPECT_CLOSE": 25, - "CRUD_CREATE_VIEW": 30, - "CRUD_MODIFY_VIEW": 31, - "CRUD_DROP_VIEW": 32, -} - -func (x ClientMessages_Type) Enum() *ClientMessages_Type { - p := new(ClientMessages_Type) - *p = x - return p -} -func (x ClientMessages_Type) String() string { - return proto.EnumName(ClientMessages_Type_name, int32(x)) -} -func (x *ClientMessages_Type) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(ClientMessages_Type_value, data, "ClientMessages_Type") - if err != nil { - return err - } - *x = ClientMessages_Type(value) - return nil -} -func (ClientMessages_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorMysqlx, []int{0, 0} } - -type ServerMessages_Type int32 - -const ( - ServerMessages_OK ServerMessages_Type = 0 - ServerMessages_ERROR ServerMessages_Type = 1 - ServerMessages_CONN_CAPABILITIES ServerMessages_Type = 2 - ServerMessages_SESS_AUTHENTICATE_CONTINUE ServerMessages_Type = 3 - ServerMessages_SESS_AUTHENTICATE_OK ServerMessages_Type = 4 - // NOTICE has to stay at 11 forever - ServerMessages_NOTICE ServerMessages_Type = 11 - ServerMessages_RESULTSET_COLUMN_META_DATA ServerMessages_Type = 12 - ServerMessages_RESULTSET_ROW ServerMessages_Type = 13 - ServerMessages_RESULTSET_FETCH_DONE ServerMessages_Type = 14 - ServerMessages_RESULTSET_FETCH_SUSPENDED ServerMessages_Type = 15 - ServerMessages_RESULTSET_FETCH_DONE_MORE_RESULTSETS ServerMessages_Type = 16 - ServerMessages_SQL_STMT_EXECUTE_OK ServerMessages_Type = 17 - ServerMessages_RESULTSET_FETCH_DONE_MORE_OUT_PARAMS ServerMessages_Type = 18 -) - -var ServerMessages_Type_name = map[int32]string{ - 0: "OK", - 1: "ERROR", - 2: "CONN_CAPABILITIES", - 3: "SESS_AUTHENTICATE_CONTINUE", - 4: "SESS_AUTHENTICATE_OK", - 11: "NOTICE", - 12: "RESULTSET_COLUMN_META_DATA", - 13: "RESULTSET_ROW", - 14: "RESULTSET_FETCH_DONE", - 15: "RESULTSET_FETCH_SUSPENDED", - 16: "RESULTSET_FETCH_DONE_MORE_RESULTSETS", - 17: "SQL_STMT_EXECUTE_OK", - 18: "RESULTSET_FETCH_DONE_MORE_OUT_PARAMS", -} -var ServerMessages_Type_value = map[string]int32{ - "OK": 0, - "ERROR": 1, - "CONN_CAPABILITIES": 2, - "SESS_AUTHENTICATE_CONTINUE": 3, - "SESS_AUTHENTICATE_OK": 4, - "NOTICE": 11, - "RESULTSET_COLUMN_META_DATA": 12, - "RESULTSET_ROW": 13, - "RESULTSET_FETCH_DONE": 14, - "RESULTSET_FETCH_SUSPENDED": 15, - "RESULTSET_FETCH_DONE_MORE_RESULTSETS": 16, - "SQL_STMT_EXECUTE_OK": 17, - "RESULTSET_FETCH_DONE_MORE_OUT_PARAMS": 18, -} - -func (x ServerMessages_Type) Enum() *ServerMessages_Type { - p := new(ServerMessages_Type) - *p = x - return p -} -func (x ServerMessages_Type) String() string { - return proto.EnumName(ServerMessages_Type_name, int32(x)) -} -func (x *ServerMessages_Type) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(ServerMessages_Type_value, data, "ServerMessages_Type") - if err != nil { - return err - } - *x = ServerMessages_Type(value) - return nil -} -func (ServerMessages_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorMysqlx, []int{1, 0} } - -type Error_Severity int32 - -const ( - Error_ERROR Error_Severity = 0 - Error_FATAL Error_Severity = 1 -) - -var Error_Severity_name = map[int32]string{ - 0: "ERROR", - 1: "FATAL", -} -var Error_Severity_value = map[string]int32{ - "ERROR": 0, - "FATAL": 1, -} - -func (x Error_Severity) Enum() *Error_Severity { - p := new(Error_Severity) - *p = x - return p -} -func (x Error_Severity) String() string { - return proto.EnumName(Error_Severity_name, int32(x)) -} -func (x *Error_Severity) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Error_Severity_value, data, "Error_Severity") - if err != nil { - return err - } - *x = Error_Severity(value) - return nil -} -func (Error_Severity) EnumDescriptor() ([]byte, []int) { return fileDescriptorMysqlx, []int{3, 0} } - -// IDs of messages that can be sent from client to the server -// -// .. note:: -// this message is never sent on the wire. It is only used to let ``protoc`` -// -// * generate constants -// * check for uniqueness -type ClientMessages struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *ClientMessages) Reset() { *m = ClientMessages{} } -func (m *ClientMessages) String() string { return proto.CompactTextString(m) } -func (*ClientMessages) ProtoMessage() {} -func (*ClientMessages) Descriptor() ([]byte, []int) { return fileDescriptorMysqlx, []int{0} } - -// IDs of messages that can be sent from server to client -// -// .. note:: -// this message is never sent on the wire. It is only used to let ``protoc`` -// -// * generate constants -// * check for uniqueness -type ServerMessages struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *ServerMessages) Reset() { *m = ServerMessages{} } -func (m *ServerMessages) String() string { return proto.CompactTextString(m) } -func (*ServerMessages) ProtoMessage() {} -func (*ServerMessages) Descriptor() ([]byte, []int) { return fileDescriptorMysqlx, []int{1} } - -// generic Ok message -type Ok struct { - Msg *string `protobuf:"bytes,1,opt,name=msg" json:"msg,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Ok) Reset() { *m = Ok{} } -func (m *Ok) String() string { return proto.CompactTextString(m) } -func (*Ok) ProtoMessage() {} -func (*Ok) Descriptor() ([]byte, []int) { return fileDescriptorMysqlx, []int{2} } - -func (m *Ok) GetMsg() string { - if m != nil && m.Msg != nil { - return *m.Msg - } - return "" -} - -// generic Error message -// -// A ``severity`` of ``ERROR`` indicates the current message sequence is -// aborted for the given error and the session is ready for more. -// -// In case of a ``FATAL`` error message the client should not expect -// the server to continue handling any further messages and should -// close the connection. -// -// :param severity: severity of the error message -// :param code: error-code -// :param sql_state: SQL state -// :param msg: human readable error message -type Error struct { - Severity *Error_Severity `protobuf:"varint,1,opt,name=severity,enum=Mysqlx.Error_Severity,def=0" json:"severity,omitempty"` - Code *uint32 `protobuf:"varint,2,req,name=code" json:"code,omitempty"` - SqlState *string `protobuf:"bytes,4,req,name=sql_state,json=sqlState" json:"sql_state,omitempty"` - Msg *string `protobuf:"bytes,3,req,name=msg" json:"msg,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Error) Reset() { *m = Error{} } -func (m *Error) String() string { return proto.CompactTextString(m) } -func (*Error) ProtoMessage() {} -func (*Error) Descriptor() ([]byte, []int) { return fileDescriptorMysqlx, []int{3} } - -const Default_Error_Severity Error_Severity = Error_ERROR - -func (m *Error) GetSeverity() Error_Severity { - if m != nil && m.Severity != nil { - return *m.Severity - } - return Default_Error_Severity -} - -func (m *Error) GetCode() uint32 { - if m != nil && m.Code != nil { - return *m.Code - } - return 0 -} - -func (m *Error) GetSqlState() string { - if m != nil && m.SqlState != nil { - return *m.SqlState - } - return "" -} - -func (m *Error) GetMsg() string { - if m != nil && m.Msg != nil { - return *m.Msg - } - return "" -} - -func init() { - proto.RegisterType((*ClientMessages)(nil), "Mysqlx.ClientMessages") - proto.RegisterType((*ServerMessages)(nil), "Mysqlx.ServerMessages") - proto.RegisterType((*Ok)(nil), "Mysqlx.Ok") - proto.RegisterType((*Error)(nil), "Mysqlx.Error") - proto.RegisterEnum("Mysqlx.ClientMessages_Type", ClientMessages_Type_name, ClientMessages_Type_value) - proto.RegisterEnum("Mysqlx.ServerMessages_Type", ServerMessages_Type_name, ServerMessages_Type_value) - proto.RegisterEnum("Mysqlx.Error_Severity", Error_Severity_name, Error_Severity_value) -} -func (m *ClientMessages) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClientMessages) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ServerMessages) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ServerMessages) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Ok) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Ok) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Msg != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintMysqlx(dAtA, i, uint64(len(*m.Msg))) - i += copy(dAtA[i:], *m.Msg) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *Error) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Error) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Severity != nil { - dAtA[i] = 0x8 - i++ - i = encodeVarintMysqlx(dAtA, i, uint64(*m.Severity)) - } - if m.Code == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0x10 - i++ - i = encodeVarintMysqlx(dAtA, i, uint64(*m.Code)) - } - if m.Msg == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0x1a - i++ - i = encodeVarintMysqlx(dAtA, i, uint64(len(*m.Msg))) - i += copy(dAtA[i:], *m.Msg) - } - if m.SqlState == nil { - return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError) - } else { - dAtA[i] = 0x22 - i++ - i = encodeVarintMysqlx(dAtA, i, uint64(len(*m.SqlState))) - i += copy(dAtA[i:], *m.SqlState) - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func encodeFixed64Mysqlx(dAtA []byte, offset int, v uint64) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - dAtA[offset+4] = uint8(v >> 32) - dAtA[offset+5] = uint8(v >> 40) - dAtA[offset+6] = uint8(v >> 48) - dAtA[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Mysqlx(dAtA []byte, offset int, v uint32) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - return offset + 4 -} -func encodeVarintMysqlx(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return offset + 1 -} -func (m *ClientMessages) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ServerMessages) Size() (n int) { - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Ok) Size() (n int) { - var l int - _ = l - if m.Msg != nil { - l = len(*m.Msg) - n += 1 + l + sovMysqlx(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Error) Size() (n int) { - var l int - _ = l - if m.Severity != nil { - n += 1 + sovMysqlx(uint64(*m.Severity)) - } - if m.Code != nil { - n += 1 + sovMysqlx(uint64(*m.Code)) - } - if m.Msg != nil { - l = len(*m.Msg) - n += 1 + l + sovMysqlx(uint64(l)) - } - if m.SqlState != nil { - l = len(*m.SqlState) - n += 1 + l + sovMysqlx(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMysqlx(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozMysqlx(x uint64) (n int) { - return sovMysqlx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ClientMessages) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClientMessages: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClientMessages: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipMysqlx(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ServerMessages) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ServerMessages: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ServerMessages: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipMysqlx(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Ok) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Ok: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Ok: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlx - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Msg = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMysqlx(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Error) Unmarshal(dAtA []byte) error { - var hasFields [1]uint64 - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Error: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Severity", wireType) - } - var v Error_Severity - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (Error_Severity(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Severity = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Code = &v - hasFields[0] |= uint64(0x00000001) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlx - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Msg = &s - iNdEx = postIndex - hasFields[0] |= uint64(0x00000002) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SqlState", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMysqlx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMysqlx - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.SqlState = &s - iNdEx = postIndex - hasFields[0] |= uint64(0x00000004) - default: - iNdEx = preIndex - skippy, err := skipMysqlx(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMysqlx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - if hasFields[0]&uint64(0x00000001) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - if hasFields[0]&uint64(0x00000002) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - if hasFields[0]&uint64(0x00000004) == 0 { - return new(github_com_golang_protobuf_proto.RequiredNotSetError) - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMysqlx(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - return iNdEx, nil - case 1: - iNdEx += 8 - return iNdEx, nil - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - iNdEx += length - if length < 0 { - return 0, ErrInvalidLengthMysqlx - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMysqlx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - innerWire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - innerWireType := int(innerWire & 0x7) - if innerWireType == 4 { - break - } - next, err := skipMysqlx(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - } - return iNdEx, nil - case 4: - return iNdEx, nil - case 5: - iNdEx += 4 - return iNdEx, nil - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - } - panic("unreachable") -} - -var ( - ErrInvalidLengthMysqlx = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMysqlx = fmt.Errorf("proto: integer overflow") -) - -func init() { - proto.RegisterFile("github.com/pingcap/tipb/go-mysqlx/mysqlx.proto", fileDescriptorMysqlx) -} - -var fileDescriptorMysqlx = []byte{ - // 593 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x84, 0x93, 0xd1, 0x52, 0xd3, 0x5c, - 0x10, 0xc7, 0x49, 0x5a, 0xfa, 0xd1, 0x85, 0x96, 0xed, 0x81, 0x0f, 0x8a, 0x68, 0xed, 0x74, 0xbc, - 0xe0, 0x2a, 0xce, 0x78, 0xa7, 0x77, 0x21, 0xd9, 0x4a, 0x86, 0x24, 0x27, 0x9e, 0x73, 0x22, 0x78, - 0x75, 0x06, 0x31, 0x32, 0x68, 0xb1, 0x90, 0x54, 0x46, 0xde, 0xc4, 0x37, 0xf0, 0x55, 0xbc, 0xd3, - 0x47, 0xd0, 0xfa, 0x0a, 0x3e, 0x80, 0x93, 0x04, 0x52, 0x05, 0x46, 0xaf, 0x92, 0xfd, 0xfd, 0xf7, - 0xfc, 0x77, 0x67, 0x77, 0x16, 0x56, 0x82, 0x8b, 0xec, 0x6c, 0xf4, 0xe1, 0xe1, 0x49, 0xf1, 0xb1, - 0x4e, 0xd3, 0xf1, 0x64, 0xcc, 0x1a, 0x25, 0x1c, 0xfc, 0x34, 0xa1, 0xed, 0x8c, 0x8e, 0x93, 0x77, - 0x93, 0x20, 0xc9, 0xb2, 0x83, 0xa3, 0x24, 0x1b, 0x7c, 0x37, 0xa1, 0xae, 0x2e, 0x4e, 0x13, 0xd6, - 0x85, 0x55, 0x87, 0x87, 0xda, 0xb1, 0x23, 0x7b, 0xdb, 0xf3, 0x3d, 0xe5, 0x91, 0xd4, 0x4f, 0x49, - 0xa1, 0x71, 0xab, 0x22, 0x49, 0xa1, 0xc9, 0x5a, 0xd0, 0x2c, 0x14, 0x9f, 0x4b, 0xc2, 0x1a, 0xdb, - 0x84, 0x75, 0x49, 0x52, 0x6a, 0x3b, 0x56, 0x3b, 0x14, 0x2a, 0xcf, 0xb1, 0x15, 0x69, 0xa9, 0x6c, - 0xa1, 0xb0, 0xce, 0x7a, 0x70, 0xe7, 0xa6, 0xe8, 0xf0, 0x50, 0x79, 0x61, 0x4c, 0x38, 0xcf, 0xda, - 0x00, 0x85, 0x2e, 0x28, 0xf7, 0x6e, 0x54, 0x71, 0x69, 0xfe, 0x1f, 0x5b, 0x05, 0x94, 0xcf, 0x7c, - 0x2d, 0x55, 0xa0, 0x34, 0xed, 0x93, 0x13, 0x2b, 0xc2, 0xa5, 0xa2, 0x03, 0x11, 0xbb, 0x7a, 0xe8, - 0x85, 0x2e, 0x76, 0xd8, 0x32, 0x2c, 0x16, 0xa1, 0x17, 0x4a, 0x12, 0x0a, 0x59, 0x05, 0xe2, 0xc8, - 0xb5, 0x15, 0xe1, 0x4a, 0x05, 0x5c, 0xf2, 0x49, 0x11, 0xae, 0xe6, 0x80, 0xf6, 0x23, 0x72, 0x94, - 0xe6, 0x11, 0x85, 0xd8, 0x65, 0x08, 0x4b, 0x97, 0xa0, 0x2c, 0xbd, 0x91, 0x97, 0x2e, 0xde, 0x38, - 0x82, 0xf2, 0xa6, 0x9f, 0x7b, 0xb4, 0x87, 0xbd, 0x8a, 0x06, 0xdc, 0xf5, 0x86, 0x2f, 0x4a, 0x7a, - 0x9f, 0x31, 0x68, 0x97, 0xfe, 0x82, 0x47, 0x25, 0xeb, 0x0f, 0xa6, 0x26, 0xb4, 0x65, 0x92, 0x9e, - 0x27, 0x69, 0x35, 0xf6, 0x2f, 0x57, 0x63, 0x6f, 0x80, 0xc9, 0x77, 0x71, 0x8e, 0x35, 0x61, 0x9e, - 0x84, 0xe0, 0x02, 0x0d, 0xf6, 0x3f, 0x74, 0x1c, 0x1e, 0xfe, 0x39, 0x70, 0x34, 0xff, 0x31, 0xc0, - 0x5a, 0xbe, 0xa6, 0x9b, 0x3a, 0xdf, 0xc5, 0x3a, 0x03, 0x68, 0x84, 0x5c, 0x79, 0x0e, 0xe1, 0x62, - 0xee, 0x22, 0x48, 0xc6, 0xbe, 0x92, 0xa4, 0xb4, 0xc3, 0xfd, 0x38, 0x08, 0x75, 0x40, 0xca, 0xd6, - 0xae, 0xad, 0x6c, 0x5c, 0x62, 0x1d, 0x68, 0xcd, 0x74, 0xc1, 0xf7, 0xb0, 0x95, 0x1b, 0xcf, 0xd0, - 0x90, 0x94, 0xb3, 0xa3, 0x5d, 0x1e, 0x12, 0xb6, 0xd9, 0x3d, 0xd8, 0xb8, 0xae, 0xc8, 0x58, 0x46, - 0x14, 0xba, 0xe4, 0xe2, 0x32, 0xdb, 0x82, 0x07, 0xb7, 0x3d, 0xd4, 0x01, 0x17, 0xa4, 0x2b, 0x45, - 0x22, 0xb2, 0x75, 0x58, 0xb9, 0xbe, 0xdc, 0xbc, 0xf5, 0xce, 0xdf, 0x2d, 0x78, 0xac, 0x74, 0x64, - 0x0b, 0x3b, 0x90, 0xc8, 0x06, 0x6b, 0x60, 0xf2, 0xb7, 0x0c, 0xa1, 0x76, 0x92, 0x1d, 0x75, 0x8d, - 0xbe, 0xb1, 0xd5, 0x14, 0xf9, 0xef, 0xe0, 0x93, 0x01, 0xf3, 0x94, 0xa6, 0xe3, 0x94, 0x3d, 0x86, - 0x85, 0x2c, 0x39, 0x4f, 0xd2, 0xe3, 0xc9, 0x45, 0x91, 0xd0, 0x7e, 0xb4, 0x66, 0x95, 0x87, 0x61, - 0x15, 0x09, 0x96, 0xbc, 0x54, 0x9f, 0x94, 0xab, 0x10, 0x55, 0x3a, 0x63, 0x50, 0x3f, 0x1c, 0xbf, - 0x4a, 0xba, 0x66, 0xdf, 0xdc, 0x6a, 0x89, 0xe2, 0xff, 0xaa, 0x54, 0xad, 0x6f, 0x5e, 0x96, 0x62, - 0x9b, 0xd0, 0xcc, 0xce, 0x46, 0x3a, 0x9b, 0x1c, 0x4c, 0x92, 0x6e, 0xbd, 0xe0, 0x0b, 0xd9, 0xd9, - 0x48, 0xe6, 0xf1, 0xa0, 0x0f, 0x0b, 0x57, 0xfe, 0xb3, 0x65, 0x17, 0x7b, 0x1f, 0xda, 0xca, 0xf6, - 0xd1, 0xd8, 0xb6, 0x3e, 0x4f, 0x7b, 0xc6, 0xd7, 0x69, 0xcf, 0xf8, 0x36, 0xed, 0x19, 0x1f, 0x7f, - 0xf4, 0xe6, 0xe0, 0xee, 0xe1, 0xf8, 0xc4, 0x2a, 0x2e, 0xd9, 0x3a, 0x7c, 0x63, 0xfd, 0x7e, 0xd2, - 0x2f, 0xdf, 0xbf, 0xfe, 0x15, 0x00, 0x00, 0xff, 0xff, 0x03, 0xb4, 0x38, 0x6c, 0xeb, 0x03, 0x00, - 0x00, -} diff --git a/vendor/github.com/BurntSushi/toml/.gitignore b/vendor/github.com/BurntSushi/toml/.gitignore new file mode 100644 index 0000000000000..0cd3800377d4d --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/.gitignore @@ -0,0 +1,5 @@ +TAGS +tags +.*.swp +tomlcheck/tomlcheck +toml.test diff --git a/vendor/github.com/BurntSushi/toml/.travis.yml b/vendor/github.com/BurntSushi/toml/.travis.yml new file mode 100644 index 0000000000000..8b8afc4f0e00d --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/.travis.yml @@ -0,0 +1,15 @@ +language: go +go: + - 1.1 + - 1.2 + - 1.3 + - 1.4 + - 1.5 + - 1.6 + - tip +install: + - go install ./... + - go get github.com/BurntSushi/toml-test +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 new file mode 100644 index 0000000000000..6efcfd0ce55ef --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/COMPATIBLE @@ -0,0 +1,3 @@ +Compatible with TOML version +[v0.4.0](https://github.com/toml-lang/toml/blob/v0.4.0/versions/en/toml-v0.4.0.md) + diff --git a/_vendor/src/github.com/BurntSushi/toml/COPYING b/vendor/github.com/BurntSushi/toml/COPYING similarity index 100% rename from _vendor/src/github.com/BurntSushi/toml/COPYING rename to vendor/github.com/BurntSushi/toml/COPYING diff --git a/vendor/github.com/BurntSushi/toml/Makefile b/vendor/github.com/BurntSushi/toml/Makefile new file mode 100644 index 0000000000000..3600848d331ab --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/Makefile @@ -0,0 +1,19 @@ +install: + go install ./... + +test: install + go test -v + toml-test toml-test-decoder + toml-test -encoder toml-test-encoder + +fmt: + gofmt -w *.go */*.go + colcheck *.go */*.go + +tags: + find ./ -name '*.go' -print0 | xargs -0 gotags > TAGS + +push: + git push origin master + git push github master + diff --git a/vendor/github.com/BurntSushi/toml/README.md b/vendor/github.com/BurntSushi/toml/README.md new file mode 100644 index 0000000000000..7c1b37ecc7a02 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/README.md @@ -0,0 +1,218 @@ +## 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` +packages. This package also supports the `encoding.TextUnmarshaler` and +`encoding.TextMarshaler` interfaces so that you can define custom data +representations. (There is an example of this below.) + +Spec: https://github.com/toml-lang/toml + +Compatible with TOML version +[v0.4.0](https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md) + +Documentation: https://godoc.org/github.com/BurntSushi/toml + +Installation: + +```bash +go get github.com/BurntSushi/toml +``` + +Try the toml validator: + +```bash +go get github.com/BurntSushi/toml/cmd/tomlv +tomlv some-toml-file.toml +``` + +[![Build Status](https://travis-ci.org/BurntSushi/toml.svg?branch=master)](https://travis-ci.org/BurntSushi/toml) [![GoDoc](https://godoc.org/github.com/BurntSushi/toml?status.svg)](https://godoc.org/github.com/BurntSushi/toml) + +### Testing + +This package passes all tests in +[toml-test](https://github.com/BurntSushi/toml-test) for both the decoder +and the encoder. + +### Examples + +This package works similarly to how the Go standard library handles `XML` +and `JSON`. Namely, data is loaded into Go values via reflection. + +For the simplest example, consider some TOML file as just a list of keys +and values: + +```toml +Age = 25 +Cats = [ "Cauchy", "Plato" ] +Pi = 3.14 +Perfection = [ 6, 28, 496, 8128 ] +DOB = 1987-07-05T05:45:00Z +``` + +Which could be defined in Go as: + +```go +type Config struct { + Age int + Cats []string + Pi float64 + Perfection []int + DOB time.Time // requires `import time` +} +``` + +And then decoded with: + +```go +var conf Config +if _, err := toml.Decode(tomlData, &conf); err != nil { + // handle error +} +``` + +You can also use struct tags if your struct field name doesn't map to a TOML +key value directly: + +```toml +some_key_NAME = "wat" +``` + +```go +type TOML struct { + ObscureKey string `toml:"some_key_NAME"` +} +``` + +### Using the `encoding.TextUnmarshaler` interface + +Here's an example that automatically parses duration strings into +`time.Duration` values: + +```toml +[[song]] +name = "Thunder Road" +duration = "4m49s" + +[[song]] +name = "Stairway to Heaven" +duration = "8m03s" +``` + +Which can be decoded with: + +```go +type song struct { + Name string + Duration duration +} +type songs struct { + Song []song +} +var favorites songs +if _, err := toml.Decode(blob, &favorites); err != nil { + log.Fatal(err) +} + +for _, s := range favorites.Song { + fmt.Printf("%s (%s)\n", s.Name, s.Duration) +} +``` + +And you'll also need a `duration` type that satisfies the +`encoding.TextUnmarshaler` interface: + +```go +type duration struct { + time.Duration +} + +func (d *duration) UnmarshalText(text []byte) error { + var err error + d.Duration, err = time.ParseDuration(string(text)) + return err +} +``` + +### More complex usage + +Here's an example of how to load the example from the official spec page: + +```toml +# This is a TOML document. Boom. + +title = "TOML Example" + +[owner] +name = "Tom Preston-Werner" +organization = "GitHub" +bio = "GitHub Cofounder & CEO\nLikes tater tots and beer." +dob = 1979-05-27T07:32:00Z # First class dates? Why not? + +[database] +server = "192.168.1.1" +ports = [ 8001, 8001, 8002 ] +connection_max = 5000 +enabled = true + +[servers] + + # You can indent as you please. Tabs or spaces. TOML don't care. + [servers.alpha] + ip = "10.0.0.1" + dc = "eqdc10" + + [servers.beta] + ip = "10.0.0.2" + dc = "eqdc10" + +[clients] +data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it + +# Line breaks are OK when inside arrays +hosts = [ + "alpha", + "omega" +] +``` + +And the corresponding Go types are: + +```go +type tomlConfig struct { + Title string + Owner ownerInfo + DB database `toml:"database"` + Servers map[string]server + Clients clients +} + +type ownerInfo struct { + Name string + Org string `toml:"organization"` + Bio string + DOB time.Time +} + +type database struct { + Server string + Ports []int + ConnMax int `toml:"connection_max"` + Enabled bool +} + +type server struct { + IP string + DC string +} + +type clients struct { + Data [][]interface{} + Hosts []string +} +``` + +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/src/github.com/BurntSushi/toml/decode.go b/vendor/github.com/BurntSushi/toml/decode.go similarity index 100% rename from _vendor/src/github.com/BurntSushi/toml/decode.go rename to vendor/github.com/BurntSushi/toml/decode.go diff --git a/_vendor/src/github.com/BurntSushi/toml/decode_meta.go b/vendor/github.com/BurntSushi/toml/decode_meta.go similarity index 100% rename from _vendor/src/github.com/BurntSushi/toml/decode_meta.go rename to vendor/github.com/BurntSushi/toml/decode_meta.go diff --git a/vendor/github.com/BurntSushi/toml/decode_test.go b/vendor/github.com/BurntSushi/toml/decode_test.go new file mode 100644 index 0000000000000..95bc987f0c74d --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/decode_test.go @@ -0,0 +1,1461 @@ +package toml + +import ( + "fmt" + "log" + "math" + "reflect" + "strings" + "testing" + "time" +) + +func TestDecodeSimple(t *testing.T) { + var testSimple = ` +age = 250 +andrew = "gallant" +kait = "brady" +now = 1987-07-05T05:45:00Z +nowEast = 2017-06-22T16:15:21+08:00 +nowWest = 2017-06-22T02:14:36-06:00 +yesOrNo = true +pi = 3.14 +colors = [ + ["red", "green", "blue"], + ["cyan", "magenta", "yellow", "black"], +] + +[My.Cats] +plato = "cat 1" +cauchy = "cat 2" +` + + type cats struct { + Plato string + Cauchy string + } + type simple struct { + Age int + Colors [][]string + Pi float64 + YesOrNo bool + Now time.Time + NowEast time.Time + NowWest time.Time + Andrew string + Kait string + My map[string]cats + } + + var val simple + _, err := Decode(testSimple, &val) + if err != nil { + t.Fatal(err) + } + + now, err := time.Parse("2006-01-02T15:04:05", "1987-07-05T05:45:00") + if err != nil { + panic(err) + } + nowEast, err := time.Parse("2006-01-02T15:04:05-07:00", "2017-06-22T16:15:21+08:00") + if err != nil { + panic(err) + } + nowWest, err := time.Parse("2006-01-02T15:04:05-07:00", "2017-06-22T02:14:36-06:00") + if err != nil { + panic(err) + } + var answer = simple{ + Age: 250, + Andrew: "gallant", + Kait: "brady", + Now: now, + NowEast: nowEast, + NowWest: nowWest, + YesOrNo: true, + Pi: 3.14, + Colors: [][]string{ + {"red", "green", "blue"}, + {"cyan", "magenta", "yellow", "black"}, + }, + My: map[string]cats{ + "Cats": {Plato: "cat 1", Cauchy: "cat 2"}, + }, + } + if !reflect.DeepEqual(val, answer) { + t.Fatalf("Expected\n-----\n%#v\n-----\nbut got\n-----\n%#v\n", + answer, val) + } +} + +func TestDecodeEmbedded(t *testing.T) { + type Dog struct{ Name string } + type Age int + type cat struct{ Name string } + + for _, test := range []struct { + label string + input string + decodeInto interface{} + wantDecoded interface{} + }{ + { + label: "embedded struct", + input: `Name = "milton"`, + decodeInto: &struct{ Dog }{}, + wantDecoded: &struct{ Dog }{Dog{"milton"}}, + }, + { + label: "embedded non-nil pointer to struct", + input: `Name = "milton"`, + decodeInto: &struct{ *Dog }{}, + wantDecoded: &struct{ *Dog }{&Dog{"milton"}}, + }, + { + label: "embedded nil pointer to struct", + input: ``, + decodeInto: &struct{ *Dog }{}, + wantDecoded: &struct{ *Dog }{nil}, + }, + { + 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}, + }, + } { + _, 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", + 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]] +name = "Born to Run" + + [[albums.songs]] + name = "Jungleland" + + [[albums.songs]] + name = "Meeting Across the River" + +[[albums]] +name = "Born in the USA" + + [[albums.songs]] + name = "Glory Days" + + [[albums.songs]] + name = "Dancing in the Dark" +` + + type Song struct { + Name string + } + + type Album struct { + Name string + Songs []Song + } + + type Music struct { + Albums []Album + } + + expected := Music{[]Album{ + {"Born to Run", []Song{{"Jungleland"}, {"Meeting Across the River"}}}, + {"Born in the USA", []Song{{"Glory Days"}, {"Dancing in the Dark"}}}, + }} + var got Music + if _, err := Decode(tomlTableArrays, &got); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(expected, got) { + t.Fatalf("\n%#v\n!=\n%#v\n", expected, got) + } +} + +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. +// Probably still missing demonstrations of some ugly corner cases regarding +// case insensitive matching and multiple fields. +func TestCase(t *testing.T) { + var caseToml = ` +tOpString = "string" +tOpInt = 1 +tOpFloat = 1.1 +tOpBool = true +tOpdate = 2006-01-02T15:04:05Z +tOparray = [ "array" ] +Match = "i should be in Match only" +MatcH = "i should be in MatcH only" +once = "just once" +[nEst.eD] +nEstedString = "another string" +` + + type InsensitiveEd struct { + NestedString string + } + + type InsensitiveNest struct { + Ed InsensitiveEd + } + + type Insensitive struct { + TopString string + TopInt int + TopFloat float64 + TopBool bool + TopDate time.Time + TopArray []string + Match string + MatcH string + Once string + OncE string + Nest InsensitiveNest + } + + tme, err := time.Parse(time.RFC3339, time.RFC3339[:len(time.RFC3339)-5]) + if err != nil { + panic(err) + } + expected := Insensitive{ + TopString: "string", + TopInt: 1, + TopFloat: 1.1, + TopBool: true, + TopDate: tme, + TopArray: []string{"array"}, + MatcH: "i should be in MatcH only", + Match: "i should be in Match only", + Once: "just once", + OncE: "", + Nest: InsensitiveNest{ + Ed: InsensitiveEd{NestedString: "another string"}, + }, + } + var got Insensitive + if _, err := Decode(caseToml, &got); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(expected, got) { + t.Fatalf("\n%#v\n!=\n%#v\n", expected, got) + } +} + +func TestPointers(t *testing.T) { + type Object struct { + Type string + Description string + } + + type Dict struct { + NamedObject map[string]*Object + BaseObject *Object + Strptr *string + Strptrs []*string + } + s1, s2, s3 := "blah", "abc", "def" + expected := &Dict{ + Strptr: &s1, + Strptrs: []*string{&s2, &s3}, + NamedObject: map[string]*Object{ + "foo": {"FOO", "fooooo!!!"}, + "bar": {"BAR", "ba-ba-ba-ba-barrrr!!!"}, + }, + BaseObject: &Object{"BASE", "da base"}, + } + + ex1 := ` +Strptr = "blah" +Strptrs = ["abc", "def"] + +[NamedObject.foo] +Type = "FOO" +Description = "fooooo!!!" + +[NamedObject.bar] +Type = "BAR" +Description = "ba-ba-ba-ba-barrrr!!!" + +[BaseObject] +Type = "BASE" +Description = "da base" +` + dict := new(Dict) + _, err := Decode(ex1, dict) + if err != nil { + t.Errorf("Decode error: %v", err) + } + if !reflect.DeepEqual(expected, dict) { + t.Fatalf("\n%#v\n!=\n%#v\n", expected, dict) + } +} + +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 +} + +func TestDecodeSimpleArray(t *testing.T) { + var s1 sphere + if _, err := Decode(`center = [0.0, 1.5, 0.0]`, &s1); err != nil { + t.Fatal(err) + } +} + +func TestDecodeArrayWrongSize(t *testing.T) { + var s1 sphere + if _, err := Decode(`center = [0.1, 2.3]`, &s1); err == nil { + t.Fatal("Expected array type mismatch error") + } +} + +func TestDecodeLargeIntoSmallInt(t *testing.T) { + type table struct { + Value int8 + } + var tab table + if _, err := Decode(`value = 500`, &tab); err == nil { + t.Fatal("Expected integer out-of-bounds error.") + } +} + +func TestDecodeSizedInts(t *testing.T) { + type table struct { + U8 uint8 + U16 uint16 + U32 uint32 + U64 uint64 + U uint + I8 int8 + I16 int16 + I32 int32 + I64 int64 + I int + } + answer := table{1, 1, 1, 1, 1, -1, -1, -1, -1, -1} + toml := ` + u8 = 1 + u16 = 1 + u32 = 1 + u64 = 1 + u = 1 + i8 = -1 + i16 = -1 + i32 = -1 + i64 = -1 + i = -1 + ` + var tab table + if _, err := Decode(toml, &tab); err != nil { + t.Fatal(err.Error()) + } + if answer != tab { + t.Fatalf("Expected %#v but got %#v", answer, tab) + } +} + +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 = ` +[dishes.hamboogie] +name = "Hamboogie with fries" +price = 10.99 + +[[dishes.hamboogie.ingredients]] +name = "Bread Bun" + +[[dishes.hamboogie.ingredients]] +name = "Lettuce" + +[[dishes.hamboogie.ingredients]] +name = "Real Beef Patty" + +[[dishes.hamboogie.ingredients]] +name = "Tomato" + +[dishes.eggsalad] +name = "Egg Salad with rice" +price = 3.99 + +[[dishes.eggsalad.ingredients]] +name = "Egg" + +[[dishes.eggsalad.ingredients]] +name = "Mayo" + +[[dishes.eggsalad.ingredients]] +name = "Rice" +` + m := &menu{} + if _, err := Decode(tomlBlob, m); err != nil { + t.Fatal(err) + } + + if len(m.Dishes) != 2 { + t.Log("two dishes should be loaded with UnmarshalTOML()") + t.Errorf("expected %d but got %d", 2, len(m.Dishes)) + } + + eggSalad := m.Dishes["eggsalad"] + if _, ok := interface{}(eggSalad).(dish); !ok { + t.Errorf("expected a dish") + } + + if eggSalad.Name != "Egg Salad with rice" { + t.Errorf("expected the dish to be named 'Egg Salad with rice'") + } + + if len(eggSalad.Ingredients) != 3 { + t.Log("dish should be loaded with UnmarshalTOML()") + t.Errorf("expected %d but got %d", 3, len(eggSalad.Ingredients)) + } + + found := false + for _, i := range eggSalad.Ingredients { + if i.Name == "Rice" { + found = true + break + } + } + if !found { + t.Error("Rice was not loaded in UnmarshalTOML()") + } + + // test on a value - must be passed as * + o := menu{} + if _, err := Decode(tomlBlob, &o); err != nil { + 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 +} + +func (m *menu) UnmarshalTOML(p interface{}) error { + m.Dishes = make(map[string]dish) + data, _ := p.(map[string]interface{}) + dishes := data["dishes"].(map[string]interface{}) + for n, v := range dishes { + if d, ok := v.(map[string]interface{}); ok { + nd := dish{} + nd.UnmarshalTOML(d) + m.Dishes[n] = nd + } else { + return fmt.Errorf("not a dish") + } + } + return nil +} + +type dish struct { + Name string + Price float32 + Ingredients []ingredient +} + +func (d *dish) UnmarshalTOML(p interface{}) error { + data, _ := p.(map[string]interface{}) + d.Name, _ = data["name"].(string) + d.Price, _ = data["price"].(float32) + ingredients, _ := data["ingredients"].([]map[string]interface{}) + for _, e := range ingredients { + n, _ := interface{}(e).(map[string]interface{}) + name, _ := n["name"].(string) + i := ingredient{name} + d.Ingredients = append(d.Ingredients, i) + } + return nil +} + +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 + + var tomlBlob = ` +ranking = ["Springsteen", "J Geils"] + +[bands.Springsteen] +started = 1973 +albums = ["Greetings", "WIESS", "Born to Run", "Darkness"] + +[bands."J Geils"] +started = 1970 +albums = ["The J. Geils Band", "Full House", "Blow Your Face Out"] +` + + type band struct { + Started int + Albums []string + } + type classics struct { + Ranking []string + Bands map[string]Primitive + } + + // Do the initial decode. Reflection is delayed on Primitive values. + var music classics + if md, err = Decode(tomlBlob, &music); err != nil { + log.Fatal(err) + } + + // MetaData still includes information on Primitive values. + fmt.Printf("Is `bands.Springsteen` defined? %v\n", + md.IsDefined("bands", "Springsteen")) + + // Decode primitive data into Go values. + for _, artist := range music.Ranking { + // A band is a primitive value, so we need to decode it to get a + // real `band` value. + primValue := music.Bands[artist] + + var aBand band + if err = md.PrimitiveDecode(primValue, &aBand); err != nil { + log.Fatal(err) + } + fmt.Printf("%s started in %d.\n", artist, aBand.Started) + } + // Check to see if there were any fields left undecoded. + // Note that this won't be empty before decoding the Primitive value! + fmt.Printf("Undecoded: %q\n", md.Undecoded()) + + // Output: + // Is `bands.Springsteen` defined? true + // Springsteen started in 1973. + // J Geils started in 1970. + // Undecoded: [] +} + +func ExampleDecode() { + var tomlBlob = ` +# Some comments. +[alpha] +ip = "10.0.0.1" + + [alpha.config] + Ports = [ 8001, 8002 ] + Location = "Toronto" + Created = 1987-07-05T05:45:00Z + +[beta] +ip = "10.0.0.2" + + [beta.config] + Ports = [ 9001, 9002 ] + Location = "New Jersey" + Created = 1887-01-05T05:55:00Z +` + + type serverConfig struct { + Ports []int + Location string + Created time.Time + } + + type server struct { + IP string `toml:"ip,omitempty"` + Config serverConfig `toml:"config"` + } + + type servers map[string]server + + var config servers + if _, err := Decode(tomlBlob, &config); err != nil { + log.Fatal(err) + } + + for _, name := range []string{"alpha", "beta"} { + s := config[name] + fmt.Printf("Server: %s (ip: %s) in %s created on %s\n", + name, s.IP, s.Config.Location, + s.Config.Created.Format("2006-01-02")) + fmt.Printf("Ports: %v\n", s.Config.Ports) + } + + // Output: + // Server: alpha (ip: 10.0.0.1) in Toronto created on 1987-07-05 + // Ports: [8001 8002] + // Server: beta (ip: 10.0.0.2) in New Jersey created on 1887-01-05 + // Ports: [9001 9002] +} + +type duration struct { + time.Duration +} + +func (d *duration) UnmarshalText(text []byte) error { + var err error + d.Duration, err = time.ParseDuration(string(text)) + return err +} + +// Example Unmarshaler shows how to decode TOML strings into your own +// custom data type. +func Example_unmarshaler() { + blob := ` +[[song]] +name = "Thunder Road" +duration = "4m49s" + +[[song]] +name = "Stairway to Heaven" +duration = "8m03s" +` + type song struct { + Name string + Duration duration + } + type songs struct { + Song []song + } + var favorites songs + if _, err := Decode(blob, &favorites); err != nil { + log.Fatal(err) + } + + // Code to implement the TextUnmarshaler interface for `duration`: + // + // type duration struct { + // time.Duration + // } + // + // func (d *duration) UnmarshalText(text []byte) error { + // var err error + // d.Duration, err = time.ParseDuration(string(text)) + // return err + // } + + for _, s := range favorites.Song { + fmt.Printf("%s (%s)\n", s.Name, s.Duration) + } + // Output: + // Thunder Road (4m49s) + // Stairway to Heaven (8m3s) +} + +// Example StrictDecoding shows how to detect whether there are keys in the +// TOML document that weren't decoded into the value given. This is useful +// for returning an error to the user if they've included extraneous fields +// in their configuration. +func Example_strictDecoding() { + var blob = ` +key1 = "value1" +key2 = "value2" +key3 = "value3" +` + type config struct { + Key1 string + Key3 string + } + + var conf config + md, err := Decode(blob, &conf) + if err != nil { + log.Fatal(err) + } + fmt.Printf("Undecoded keys: %q\n", md.Undecoded()) + // Output: + // Undecoded keys: ["key2"] +} + +// Example UnmarshalTOML shows how to implement a struct type that knows how to +// unmarshal itself. The struct must take full responsibility for mapping the +// values passed into the struct. The method may be used with interfaces in a +// struct in cases where the actual type is not known until the data is +// examined. +func Example_unmarshalTOML() { + + var blob = ` +[[parts]] +type = "valve" +id = "valve-1" +size = 1.2 +rating = 4 + +[[parts]] +type = "valve" +id = "valve-2" +size = 2.1 +rating = 5 + +[[parts]] +type = "pipe" +id = "pipe-1" +length = 2.1 +diameter = 12 + +[[parts]] +type = "cable" +id = "cable-1" +length = 12 +rating = 3.1 +` + o := &order{} + err := Unmarshal([]byte(blob), o) + if err != nil { + log.Fatal(err) + } + + fmt.Println(len(o.parts)) + + for _, part := range o.parts { + fmt.Println(part.Name()) + } + + // Code to implement UmarshalJSON. + + // type order struct { + // // NOTE `order.parts` is a private slice of type `part` which is an + // // interface and may only be loaded from toml using the + // // UnmarshalTOML() method of the Umarshaler interface. + // parts parts + // } + + // 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 preferred e.g. + // // + // // func AsMap(v interface{}) (map[string]interface{}, error) { + // // return v.(map[string]interface{}) + // // } + // // + // // resulting in: + // // d, _ := AsMap(data) + // // + + // d, _ := data.(map[string]interface{}) + // parts, _ := d["parts"].([]map[string]interface{}) + + // for _, p := range parts { + + // typ, _ := p["type"].(string) + // id, _ := p["id"].(string) + + // // detect the type of part and handle each case + // switch p["type"] { + // case "valve": + + // size := float32(p["size"].(float64)) + // rating := int(p["rating"].(int64)) + + // valve := &valve{ + // Type: typ, + // ID: id, + // Size: size, + // Rating: rating, + // } + + // o.parts = append(o.parts, valve) + + // case "pipe": + + // length := float32(p["length"].(float64)) + // diameter := int(p["diameter"].(int64)) + + // pipe := &pipe{ + // Type: typ, + // ID: id, + // Length: length, + // Diameter: diameter, + // } + + // o.parts = append(o.parts, pipe) + + // case "cable": + + // length := int(p["length"].(int64)) + // rating := float32(p["rating"].(float64)) + + // cable := &cable{ + // Type: typ, + // ID: id, + // Length: length, + // Rating: rating, + // } + + // o.parts = append(o.parts, cable) + + // } + // } + + // return nil + // } + + // type parts []part + + // type part interface { + // Name() string + // } + + // type valve struct { + // Type string + // ID string + // Size float32 + // Rating int + // } + + // func (v *valve) Name() string { + // return fmt.Sprintf("VALVE: %s", v.ID) + // } + + // type pipe struct { + // Type string + // ID string + // Length float32 + // Diameter int + // } + + // func (p *pipe) Name() string { + // return fmt.Sprintf("PIPE: %s", p.ID) + // } + + // type cable struct { + // Type string + // ID string + // Length int + // Rating float32 + // } + + // func (c *cable) Name() string { + // return fmt.Sprintf("CABLE: %s", c.ID) + // } + + // Output: + // 4 + // VALVE: valve-1 + // VALVE: valve-2 + // PIPE: pipe-1 + // CABLE: cable-1 + +} + +type order struct { + // NOTE `order.parts` is a private slice of type `part` which is an + // interface and may only be loaded from toml using the UnmarshalTOML() + // method of the Umarshaler interface. + parts parts +} + +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 preferred e.g. + // + // func AsMap(v interface{}) (map[string]interface{}, error) { + // return v.(map[string]interface{}) + // } + // + // resulting in: + // d, _ := AsMap(data) + // + + d, _ := data.(map[string]interface{}) + parts, _ := d["parts"].([]map[string]interface{}) + + for _, p := range parts { + + typ, _ := p["type"].(string) + id, _ := p["id"].(string) + + // detect the type of part and handle each case + switch p["type"] { + case "valve": + + size := float32(p["size"].(float64)) + rating := int(p["rating"].(int64)) + + valve := &valve{ + Type: typ, + ID: id, + Size: size, + Rating: rating, + } + + o.parts = append(o.parts, valve) + + case "pipe": + + length := float32(p["length"].(float64)) + diameter := int(p["diameter"].(int64)) + + pipe := &pipe{ + Type: typ, + ID: id, + Length: length, + Diameter: diameter, + } + + o.parts = append(o.parts, pipe) + + case "cable": + + length := int(p["length"].(int64)) + rating := float32(p["rating"].(float64)) + + cable := &cable{ + Type: typ, + ID: id, + Length: length, + Rating: rating, + } + + o.parts = append(o.parts, cable) + + } + } + + return nil +} + +type parts []part + +type part interface { + Name() string +} + +type valve struct { + Type string + ID string + Size float32 + Rating int +} + +func (v *valve) Name() string { + return fmt.Sprintf("VALVE: %s", v.ID) +} + +type pipe struct { + Type string + ID string + Length float32 + Diameter int +} + +func (p *pipe) Name() string { + return fmt.Sprintf("PIPE: %s", p.ID) +} + +type cable struct { + Type string + ID string + Length int + Rating float32 +} + +func (c *cable) Name() string { + return fmt.Sprintf("CABLE: %s", c.ID) +} diff --git a/_vendor/src/github.com/BurntSushi/toml/doc.go b/vendor/github.com/BurntSushi/toml/doc.go similarity index 100% rename from _vendor/src/github.com/BurntSushi/toml/doc.go rename to vendor/github.com/BurntSushi/toml/doc.go diff --git a/_vendor/src/github.com/BurntSushi/toml/encode.go b/vendor/github.com/BurntSushi/toml/encode.go similarity index 100% rename from _vendor/src/github.com/BurntSushi/toml/encode.go rename to vendor/github.com/BurntSushi/toml/encode.go diff --git a/vendor/github.com/BurntSushi/toml/encode_test.go b/vendor/github.com/BurntSushi/toml/encode_test.go new file mode 100644 index 0000000000000..673b7b0093ca7 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/encode_test.go @@ -0,0 +1,615 @@ +package toml + +import ( + "bytes" + "fmt" + "log" + "net" + "testing" + "time" +) + +func TestEncodeRoundTrip(t *testing.T) { + type Config struct { + Age int + Cats []string + Pi float64 + Perfection []int + DOB time.Time + Ipaddress net.IP + } + + var inputs = Config{ + 13, + []string{"one", "two", "three"}, + 3.145, + []int{11, 2, 3, 4}, + time.Now(), + net.ParseIP("192.168.59.254"), + } + + var firstBuffer bytes.Buffer + e := NewEncoder(&firstBuffer) + err := e.Encode(inputs) + if err != nil { + t.Fatal(err) + } + var outputs Config + if _, err := Decode(firstBuffer.String(), &outputs); err != nil { + t.Logf("Could not decode:\n-----\n%s\n-----\n", + firstBuffer.String()) + t.Fatal(err) + } + + // could test each value individually, but I'm lazy + var secondBuffer bytes.Buffer + e2 := NewEncoder(&secondBuffer) + err = e2.Encode(outputs) + if err != nil { + t.Fatal(err) + } + if firstBuffer.String() != secondBuffer.String() { + t.Error( + firstBuffer.String(), + "\n\n is not identical to\n\n", + secondBuffer.String()) + } +} + +// XXX(burntsushi) +// I think these tests probably should be removed. They are good, but they +// ought to be obsolete by toml-test. +func TestEncode(t *testing.T) { + type Embedded struct { + Int int `toml:"_int"` + } + type NonStruct int + + date := time.Date(2014, 5, 11, 20, 30, 40, 0, time.FixedZone("IST", 3600)) + dateStr := "2014-05-11T19:30:40Z" + + tests := map[string]struct { + input interface{} + wantOutput string + wantError error + }{ + "bool field": { + input: struct { + BoolTrue bool + BoolFalse bool + }{true, false}, + wantOutput: "BoolTrue = true\nBoolFalse = false\n", + }, + "int fields": { + input: struct { + Int int + Int8 int8 + Int16 int16 + Int32 int32 + Int64 int64 + }{1, 2, 3, 4, 5}, + wantOutput: "Int = 1\nInt8 = 2\nInt16 = 3\nInt32 = 4\nInt64 = 5\n", + }, + "uint fields": { + input: struct { + Uint uint + Uint8 uint8 + Uint16 uint16 + Uint32 uint32 + Uint64 uint64 + }{1, 2, 3, 4, 5}, + wantOutput: "Uint = 1\nUint8 = 2\nUint16 = 3\nUint32 = 4" + + "\nUint64 = 5\n", + }, + "float fields": { + input: struct { + Float32 float32 + Float64 float64 + }{1.5, 2.5}, + wantOutput: "Float32 = 1.5\nFloat64 = 2.5\n", + }, + "string field": { + input: struct{ String string }{"foo"}, + wantOutput: "String = \"foo\"\n", + }, + "string field and unexported field": { + input: struct { + String string + unexported int + }{"foo", 0}, + wantOutput: "String = \"foo\"\n", + }, + "datetime field in UTC": { + input: struct{ Date time.Time }{date}, + wantOutput: fmt.Sprintf("Date = %s\n", dateStr), + }, + "datetime field as primitive": { + // Using a map here to fail if isStructOrMap() returns true for + // time.Time. + input: map[string]interface{}{ + "Date": date, + "Int": 1, + }, + wantOutput: fmt.Sprintf("Date = %s\nInt = 1\n", dateStr), + }, + "array fields": { + input: struct { + IntArray0 [0]int + IntArray3 [3]int + }{[0]int{}, [3]int{1, 2, 3}}, + wantOutput: "IntArray0 = []\nIntArray3 = [1, 2, 3]\n", + }, + "slice fields": { + input: struct{ IntSliceNil, IntSlice0, IntSlice3 []int }{ + nil, []int{}, []int{1, 2, 3}, + }, + wantOutput: "IntSlice0 = []\nIntSlice3 = [1, 2, 3]\n", + }, + "datetime slices": { + input: struct{ DatetimeSlice []time.Time }{ + []time.Time{date, date}, + }, + wantOutput: fmt.Sprintf("DatetimeSlice = [%s, %s]\n", + dateStr, dateStr), + }, + "nested arrays and slices": { + input: struct { + SliceOfArrays [][2]int + ArrayOfSlices [2][]int + SliceOfArraysOfSlices [][2][]int + ArrayOfSlicesOfArrays [2][][2]int + SliceOfMixedArrays [][2]interface{} + ArrayOfMixedSlices [2][]interface{} + }{ + [][2]int{{1, 2}, {3, 4}}, + [2][]int{{1, 2}, {3, 4}}, + [][2][]int{ + { + {1, 2}, {3, 4}, + }, + { + {5, 6}, {7, 8}, + }, + }, + [2][][2]int{ + { + {1, 2}, {3, 4}, + }, + { + {5, 6}, {7, 8}, + }, + }, + [][2]interface{}{ + {1, 2}, {"a", "b"}, + }, + [2][]interface{}{ + {1, 2}, {"a", "b"}, + }, + }, + wantOutput: `SliceOfArrays = [[1, 2], [3, 4]] +ArrayOfSlices = [[1, 2], [3, 4]] +SliceOfArraysOfSlices = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]] +ArrayOfSlicesOfArrays = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]] +SliceOfMixedArrays = [[1, 2], ["a", "b"]] +ArrayOfMixedSlices = [[1, 2], ["a", "b"]] +`, + }, + "empty slice": { + input: struct{ Empty []interface{} }{[]interface{}{}}, + wantOutput: "Empty = []\n", + }, + "(error) slice with element type mismatch (string and integer)": { + input: struct{ Mixed []interface{} }{[]interface{}{1, "a"}}, + wantError: errArrayMixedElementTypes, + }, + "(error) slice with element type mismatch (integer and float)": { + input: struct{ Mixed []interface{} }{[]interface{}{1, 2.5}}, + wantError: errArrayMixedElementTypes, + }, + "slice with elems of differing Go types, same TOML types": { + input: struct { + MixedInts []interface{} + MixedFloats []interface{} + }{ + []interface{}{ + int(1), int8(2), int16(3), int32(4), int64(5), + uint(1), uint8(2), uint16(3), uint32(4), uint64(5), + }, + []interface{}{float32(1.5), float64(2.5)}, + }, + wantOutput: "MixedInts = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5]\n" + + "MixedFloats = [1.5, 2.5]\n", + }, + "(error) slice w/ element type mismatch (one is nested array)": { + input: struct{ Mixed []interface{} }{ + []interface{}{1, []interface{}{2}}, + }, + wantError: errArrayMixedElementTypes, + }, + "(error) slice with 1 nil element": { + input: struct{ NilElement1 []interface{} }{[]interface{}{nil}}, + wantError: errArrayNilElement, + }, + "(error) slice with 1 nil element (and other non-nil elements)": { + input: struct{ NilElement []interface{} }{ + []interface{}{1, nil}, + }, + wantError: errArrayNilElement, + }, + "simple map": { + input: map[string]int{"a": 1, "b": 2}, + wantOutput: "a = 1\nb = 2\n", + }, + "map with interface{} value type": { + input: map[string]interface{}{"a": 1, "b": "c"}, + wantOutput: "a = 1\nb = \"c\"\n", + }, + "map with interface{} value type, some of which are structs": { + input: map[string]interface{}{ + "a": struct{ Int int }{2}, + "b": 1, + }, + wantOutput: "b = 1\n\n[a]\n Int = 2\n", + }, + "nested map": { + input: map[string]map[string]int{ + "a": {"b": 1}, + "c": {"d": 2}, + }, + wantOutput: "[a]\n b = 1\n\n[c]\n d = 2\n", + }, + "nested struct": { + input: struct{ Struct struct{ Int int } }{ + struct{ Int int }{1}, + }, + wantOutput: "[Struct]\n Int = 1\n", + }, + "nested struct and non-struct field": { + input: struct { + Struct struct{ Int int } + Bool bool + }{struct{ Int int }{1}, true}, + wantOutput: "Bool = true\n\n[Struct]\n Int = 1\n", + }, + "2 nested structs": { + input: struct{ Struct1, Struct2 struct{ Int int } }{ + struct{ Int int }{1}, struct{ Int int }{2}, + }, + wantOutput: "[Struct1]\n Int = 1\n\n[Struct2]\n Int = 2\n", + }, + "deeply nested structs": { + input: struct { + Struct1, Struct2 struct{ Struct3 *struct{ Int int } } + }{ + struct{ Struct3 *struct{ Int int } }{&struct{ Int int }{1}}, + struct{ Struct3 *struct{ Int int } }{nil}, + }, + wantOutput: "[Struct1]\n [Struct1.Struct3]\n Int = 1" + + "\n\n[Struct2]\n", + }, + "nested struct with nil struct elem": { + input: struct { + Struct struct{ Inner *struct{ Int int } } + }{ + struct{ Inner *struct{ Int int } }{nil}, + }, + wantOutput: "[Struct]\n", + }, + "nested struct with no fields": { + input: struct { + Struct struct{ Inner struct{} } + }{ + struct{ Inner struct{} }{struct{}{}}, + }, + wantOutput: "[Struct]\n [Struct.Inner]\n", + }, + "struct with tags": { + input: struct { + Struct struct { + Int int `toml:"_int"` + } `toml:"_struct"` + Bool bool `toml:"_bool"` + }{ + struct { + Int int `toml:"_int"` + }{1}, true, + }, + wantOutput: "_bool = true\n\n[_struct]\n _int = 1\n", + }, + "embedded struct": { + input: struct{ Embedded }{Embedded{1}}, + wantOutput: "_int = 1\n", + }, + "embedded *struct": { + input: struct{ *Embedded }{&Embedded{1}}, + wantOutput: "_int = 1\n", + }, + "nested embedded struct": { + input: struct { + Struct struct{ Embedded } `toml:"_struct"` + }{struct{ Embedded }{Embedded{1}}}, + wantOutput: "[_struct]\n _int = 1\n", + }, + "nested embedded *struct": { + input: struct { + Struct struct{ *Embedded } `toml:"_struct"` + }{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"` + }{ + []*struct{ Int int }{{1}, {3}}, + }, + wantOutput: "[[struct]]\n Int = 1\n\n[[struct]]\n Int = 3\n", + }, + "array of tables order": { + input: map[string]interface{}{ + "map": map[string]interface{}{ + "zero": 5, + "arr": []map[string]int{ + { + "friend": 5, + }, + }, + }, + }, + wantOutput: "[map]\n zero = 5\n\n [[map.arr]]\n friend = 5\n", + }, + "(error) top-level slice": { + input: []struct{ Int int }{{1}, {2}, {3}}, + wantError: errNoKey, + }, + "(error) slice of slice": { + input: struct { + Slices [][]struct{ Int int } + }{ + [][]struct{ Int int }{{{1}}, {{2}}, {{3}}}, + }, + wantError: errArrayNoTable, + }, + "(error) map no string key": { + input: map[int]string{1: ""}, + wantError: errNonString, + }, + "(error) empty key name": { + input: map[string]int{"": 1}, + wantError: errAnything, + }, + "(error) empty map name": { + input: map[string]interface{}{ + "": map[string]int{"v": 1}, + }, + wantError: errAnything, + }, + } + for label, test := range tests { + encodeExpected(t, label, test.input, test.wantOutput, test.wantError) + } +} + +func TestEncodeNestedTableArrays(t *testing.T) { + type song struct { + Name string `toml:"name"` + } + type album struct { + Name string `toml:"name"` + Songs []song `toml:"songs"` + } + type springsteen struct { + Albums []album `toml:"albums"` + } + value := springsteen{ + []album{ + {"Born to Run", + []song{{"Jungleland"}, {"Meeting Across the River"}}}, + {"Born in the USA", + []song{{"Glory Days"}, {"Dancing in the Dark"}}}, + }, + } + expected := `[[albums]] + name = "Born to Run" + + [[albums.songs]] + name = "Jungleland" + + [[albums.songs]] + name = "Meeting Across the River" + +[[albums]] + name = "Born in the USA" + + [[albums.songs]] + name = "Glory Days" + + [[albums.songs]] + name = "Dancing in the Dark" +` + encodeExpected(t, "nested table arrays", value, expected, nil) +} + +func TestEncodeArrayHashWithNormalHashOrder(t *testing.T) { + type Alpha struct { + V int + } + type Beta struct { + V int + } + type Conf struct { + V int + A Alpha + B []Beta + } + + val := Conf{ + V: 1, + A: Alpha{2}, + B: []Beta{{3}}, + } + expected := "V = 1\n\n[A]\n V = 2\n\n[[B]]\n V = 3\n" + encodeExpected(t, "array hash with normal hash order", val, expected, nil) +} + +func TestEncodeWithOmitEmpty(t *testing.T) { + type simple struct { + 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"` + } + + 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) { + type simple struct { + Number int `toml:"number,omitzero"` + Real float64 `toml:"real,omitzero"` + Unsigned uint `toml:"unsigned,omitzero"` + } + + value := simple{0, 0.0, uint(0)} + expected := "" + + encodeExpected(t, "simple with omitzero, all zero", value, expected, nil) + + value.Number = 10 + value.Real = 20 + value.Unsigned = 5 + expected = `number = 10 +real = 20.0 +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, +) { + var buf bytes.Buffer + enc := NewEncoder(&buf) + err := enc.Encode(val) + if err != wantErr { + if wantErr != nil { + if wantErr == errAnything && err != nil { + return + } + t.Errorf("%s: want Encode error %v, got %v", label, wantErr, err) + } else { + t.Errorf("%s: Encode failed: %s", label, err) + } + } + if err != nil { + return + } + if got := buf.String(); wantStr != got { + t.Errorf("%s: want\n-----\n%q\n-----\nbut got\n-----\n%q\n-----\n", + label, wantStr, got) + } +} + +func ExampleEncoder_Encode() { + date, _ := time.Parse(time.RFC822, "14 Mar 10 18:00 UTC") + var config = map[string]interface{}{ + "date": date, + "counts": []int{1, 1, 2, 3, 5, 8}, + "hash": map[string]string{ + "key1": "val1", + "key2": "val2", + }, + } + buf := new(bytes.Buffer) + if err := NewEncoder(buf).Encode(config); err != nil { + log.Fatal(err) + } + fmt.Println(buf.String()) + + // Output: + // counts = [1, 1, 2, 3, 5, 8] + // date = 2010-03-14T18:00:00Z + // + // [hash] + // key1 = "val1" + // key2 = "val2" +} diff --git a/_vendor/src/github.com/BurntSushi/toml/encoding_types.go b/vendor/github.com/BurntSushi/toml/encoding_types.go similarity index 100% rename from _vendor/src/github.com/BurntSushi/toml/encoding_types.go rename to vendor/github.com/BurntSushi/toml/encoding_types.go diff --git a/_vendor/src/github.com/BurntSushi/toml/encoding_types_1.1.go b/vendor/github.com/BurntSushi/toml/encoding_types_1.1.go similarity index 100% rename from _vendor/src/github.com/BurntSushi/toml/encoding_types_1.1.go rename to vendor/github.com/BurntSushi/toml/encoding_types_1.1.go diff --git a/_vendor/src/github.com/BurntSushi/toml/lex.go b/vendor/github.com/BurntSushi/toml/lex.go similarity index 100% rename from _vendor/src/github.com/BurntSushi/toml/lex.go rename to vendor/github.com/BurntSushi/toml/lex.go diff --git a/_vendor/src/github.com/BurntSushi/toml/parse.go b/vendor/github.com/BurntSushi/toml/parse.go similarity index 100% rename from _vendor/src/github.com/BurntSushi/toml/parse.go rename to vendor/github.com/BurntSushi/toml/parse.go diff --git a/vendor/github.com/BurntSushi/toml/session.vim b/vendor/github.com/BurntSushi/toml/session.vim new file mode 100644 index 0000000000000..562164be06030 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/session.vim @@ -0,0 +1 @@ +au BufWritePost *.go silent!make tags > /dev/null 2>&1 diff --git a/_vendor/src/github.com/BurntSushi/toml/type_check.go b/vendor/github.com/BurntSushi/toml/type_check.go similarity index 100% rename from _vendor/src/github.com/BurntSushi/toml/type_check.go rename to vendor/github.com/BurntSushi/toml/type_check.go diff --git a/_vendor/src/github.com/BurntSushi/toml/type_fields.go b/vendor/github.com/BurntSushi/toml/type_fields.go similarity index 100% rename from _vendor/src/github.com/BurntSushi/toml/type_fields.go rename to vendor/github.com/BurntSushi/toml/type_fields.go diff --git a/vendor/github.com/Sirupsen/logrus/.gitignore b/vendor/github.com/Sirupsen/logrus/.gitignore new file mode 100644 index 0000000000000..66be63a00578a --- /dev/null +++ b/vendor/github.com/Sirupsen/logrus/.gitignore @@ -0,0 +1 @@ +logrus diff --git a/vendor/github.com/Sirupsen/logrus/.travis.yml b/vendor/github.com/Sirupsen/logrus/.travis.yml new file mode 100644 index 0000000000000..804c569438568 --- /dev/null +++ b/vendor/github.com/Sirupsen/logrus/.travis.yml @@ -0,0 +1,8 @@ +language: go +go: + - 1.6 + - 1.7 + - tip +install: + - go get -t ./... +script: GOMAXPROCS=4 GORACE="halt_on_error=1" go test -race -v ./... diff --git a/vendor/github.com/Sirupsen/logrus/CHANGELOG.md b/vendor/github.com/Sirupsen/logrus/CHANGELOG.md new file mode 100644 index 0000000000000..747e4d89a2c08 --- /dev/null +++ b/vendor/github.com/Sirupsen/logrus/CHANGELOG.md @@ -0,0 +1,94 @@ +# 0.11.5 + +* feature: add writer and writerlevel to entry (#372) + +# 0.11.4 + +* bug: fix undefined variable on solaris (#493) + +# 0.11.3 + +* formatter: configure quoting of empty values (#484) +* formatter: configure quoting character (default is `"`) (#484) +* bug: fix not importing io correctly in non-linux environments (#481) + +# 0.11.2 + +* bug: fix windows terminal detection (#476) + +# 0.11.1 + +* bug: fix tty detection with custom out (#471) + +# 0.11.0 + +* performance: Use bufferpool to allocate (#370) +* terminal: terminal detection for app-engine (#343) +* feature: exit handler (#375) + +# 0.10.0 + +* feature: Add a test hook (#180) +* feature: `ParseLevel` is now case-insensitive (#326) +* feature: `FieldLogger` interface that generalizes `Logger` and `Entry` (#308) +* performance: avoid re-allocations on `WithFields` (#335) + +# 0.9.0 + +* logrus/text_formatter: don't emit empty msg +* logrus/hooks/airbrake: move out of main repository +* logrus/hooks/sentry: move out of main repository +* logrus/hooks/papertrail: move out of main repository +* logrus/hooks/bugsnag: move out of main repository +* logrus/core: run tests with `-race` +* logrus/core: detect TTY based on `stderr` +* logrus/core: support `WithError` on logger +* logrus/core: Solaris support + +# 0.8.7 + +* logrus/core: fix possible race (#216) +* logrus/doc: small typo fixes and doc improvements + + +# 0.8.6 + +* hooks/raven: allow passing an initialized client + +# 0.8.5 + +* logrus/core: revert #208 + +# 0.8.4 + +* formatter/text: fix data race (#218) + +# 0.8.3 + +* logrus/core: fix entry log level (#208) +* logrus/core: improve performance of text formatter by 40% +* logrus/core: expose `LevelHooks` type +* logrus/core: add support for DragonflyBSD and NetBSD +* formatter/text: print structs more verbosely + +# 0.8.2 + +* logrus: fix more Fatal family functions + +# 0.8.1 + +* logrus: fix not exiting on `Fatalf` and `Fatalln` + +# 0.8.0 + +* logrus: defaults to stderr instead of stdout +* hooks/sentry: add special field for `*http.Request` +* formatter/text: ignore Windows for colors + +# 0.7.3 + +* formatter/\*: allow configuration of timestamp layout + +# 0.7.2 + +* formatter/text: Add configuration option for time format (#158) diff --git a/_vendor/src/github.com/Sirupsen/logrus/LICENSE b/vendor/github.com/Sirupsen/logrus/LICENSE similarity index 100% rename from _vendor/src/github.com/Sirupsen/logrus/LICENSE rename to vendor/github.com/Sirupsen/logrus/LICENSE diff --git a/vendor/github.com/Sirupsen/logrus/README.md b/vendor/github.com/Sirupsen/logrus/README.md new file mode 100644 index 0000000000000..640cf61f6f5b3 --- /dev/null +++ b/vendor/github.com/Sirupsen/logrus/README.md @@ -0,0 +1,476 @@ +# Logrus :walrus: [![Build Status](https://travis-ci.org/Sirupsen/logrus.svg?branch=master)](https://travis-ci.org/Sirupsen/logrus) [![GoDoc](https://godoc.org/github.com/Sirupsen/logrus?status.svg)](https://godoc.org/github.com/Sirupsen/logrus) + +**Seeing weird case-sensitive problems?** See [this +issue](https://github.com/sirupsen/logrus/issues/451#issuecomment-264332021). +This change has been reverted. I apologize for causing this. I greatly +underestimated the impact this would have. Logrus strives for stability and +backwards compatibility and failed to provide that. + +Logrus is a structured logger for Go (golang), completely API compatible with +the standard library logger. [Godoc][godoc]. **Please note the Logrus API is not +yet stable (pre 1.0). Logrus itself is completely stable and has been used in +many large deployments. The core API is unlikely to change much but please +version control your Logrus to make sure you aren't fetching latest `master` on +every build.** + +Nicely color-coded in development (when a TTY is attached, otherwise just +plain text): + +![Colored](http://i.imgur.com/PY7qMwd.png) + +With `log.SetFormatter(&log.JSONFormatter{})`, for easy parsing by logstash +or Splunk: + +```json +{"animal":"walrus","level":"info","msg":"A group of walrus emerges from the +ocean","size":10,"time":"2014-03-10 19:57:38.562264131 -0400 EDT"} + +{"level":"warning","msg":"The group's number increased tremendously!", +"number":122,"omg":true,"time":"2014-03-10 19:57:38.562471297 -0400 EDT"} + +{"animal":"walrus","level":"info","msg":"A giant walrus appears!", +"size":10,"time":"2014-03-10 19:57:38.562500591 -0400 EDT"} + +{"animal":"walrus","level":"info","msg":"Tremendously sized cow enters the ocean.", +"size":9,"time":"2014-03-10 19:57:38.562527896 -0400 EDT"} + +{"level":"fatal","msg":"The ice breaks!","number":100,"omg":true, +"time":"2014-03-10 19:57:38.562543128 -0400 EDT"} +``` + +With the default `log.SetFormatter(&log.TextFormatter{})` when a TTY is not +attached, the output is compatible with the +[logfmt](http://godoc.org/github.com/kr/logfmt) format: + +```text +time="2015-03-26T01:27:38-04:00" level=debug msg="Started observing beach" animal=walrus number=8 +time="2015-03-26T01:27:38-04:00" level=info msg="A group of walrus emerges from the ocean" animal=walrus size=10 +time="2015-03-26T01:27:38-04:00" level=warning msg="The group's number increased tremendously!" number=122 omg=true +time="2015-03-26T01:27:38-04:00" level=debug msg="Temperature changes" temperature=-4 +time="2015-03-26T01:27:38-04:00" level=panic msg="It's over 9000!" animal=orca size=9009 +time="2015-03-26T01:27:38-04:00" level=fatal msg="The ice breaks!" err=&{0x2082280c0 map[animal:orca size:9009] 2015-03-26 01:27:38.441574009 -0400 EDT panic It's over 9000!} number=100 omg=true +exit status 1 +``` + +#### Example + +The simplest way to use Logrus is simply the package-level exported logger: + +```go +package main + +import ( + log "github.com/Sirupsen/logrus" +) + +func main() { + log.WithFields(log.Fields{ + "animal": "walrus", + }).Info("A walrus appears") +} +``` + +Note that it's completely api-compatible with the stdlib logger, so you can +replace your `log` imports everywhere with `log "github.com/Sirupsen/logrus"` +and you'll now have the flexibility of Logrus. You can customize it all you +want: + +```go +package main + +import ( + "os" + log "github.com/Sirupsen/logrus" +) + +func init() { + // Log as JSON instead of the default ASCII formatter. + log.SetFormatter(&log.JSONFormatter{}) + + // Output to stdout instead of the default stderr + // Can be any io.Writer, see below for File example + log.SetOutput(os.Stdout) + + // Only log the warning severity or above. + log.SetLevel(log.WarnLevel) +} + +func main() { + log.WithFields(log.Fields{ + "animal": "walrus", + "size": 10, + }).Info("A group of walrus emerges from the ocean") + + log.WithFields(log.Fields{ + "omg": true, + "number": 122, + }).Warn("The group's number increased tremendously!") + + log.WithFields(log.Fields{ + "omg": true, + "number": 100, + }).Fatal("The ice breaks!") + + // A common pattern is to re-use fields between logging statements by re-using + // the logrus.Entry returned from WithFields() + contextLogger := log.WithFields(log.Fields{ + "common": "this is a common field", + "other": "I also should be logged always", + }) + + contextLogger.Info("I'll be logged with common and other field") + contextLogger.Info("Me too") +} +``` + +For more advanced usage such as logging to multiple locations from the same +application, you can also create an instance of the `logrus` Logger: + +```go +package main + +import ( + "github.com/Sirupsen/logrus" +) + +// Create a new instance of the logger. You can have any number of instances. +var log = logrus.New() + +func main() { + // The API for setting attributes is a little different than the package level + // exported logger. See Godoc. + log.Out = os.Stdout + + // You could set this to any `io.Writer` such as a file + // file, err := os.OpenFile("logrus.log", os.O_CREATE|os.O_WRONLY, 0666) + // if err == nil { + // log.Out = file + // } else { + // log.Info("Failed to log to file, using default stderr") + // } + + log.WithFields(logrus.Fields{ + "animal": "walrus", + "size": 10, + }).Info("A group of walrus emerges from the ocean") +} +``` + +#### Fields + +Logrus encourages careful, structured logging though logging fields instead of +long, unparseable error messages. For example, instead of: `log.Fatalf("Failed +to send event %s to topic %s with key %d")`, you should log the much more +discoverable: + +```go +log.WithFields(log.Fields{ + "event": event, + "topic": topic, + "key": key, +}).Fatal("Failed to send event") +``` + +We've found this API forces you to think about logging in a way that produces +much more useful logging messages. We've been in countless situations where just +a single added field to a log statement that was already there would've saved us +hours. The `WithFields` call is optional. + +In general, with Logrus using any of the `printf`-family functions should be +seen as a hint you should add a field, however, you can still use the +`printf`-family functions with Logrus. + +#### Default Fields + +Often it's helpful to have fields _always_ attached to log statements in an +application or parts of one. For example, you may want to always log the +`request_id` and `user_ip` in the context of a request. Instead of writing +`log.WithFields(log.Fields{"request_id": request_id, "user_ip": user_ip})` on +every line, you can create a `logrus.Entry` to pass around instead: + +```go +requestLogger := log.WithFields(log.Fields{"request_id": request_id, user_ip: user_ip}) +requestLogger.Info("something happened on that request") # will log request_id and user_ip +requestLogger.Warn("something not great happened") +``` + +#### Hooks + +You can add hooks for logging levels. For example to send errors to an exception +tracking service on `Error`, `Fatal` and `Panic`, info to StatsD or log to +multiple places simultaneously, e.g. syslog. + +Logrus comes with [built-in hooks](hooks/). Add those, or your custom hook, in +`init`: + +```go +import ( + log "github.com/Sirupsen/logrus" + "gopkg.in/gemnasium/logrus-airbrake-hook.v2" // the package is named "aibrake" + logrus_syslog "github.com/Sirupsen/logrus/hooks/syslog" + "log/syslog" +) + +func init() { + + // Use the Airbrake hook to report errors that have Error severity or above to + // an exception tracker. You can create custom hooks, see the Hooks section. + log.AddHook(airbrake.NewHook(123, "xyz", "production")) + + hook, err := logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") + if err != nil { + log.Error("Unable to connect to local syslog daemon") + } else { + log.AddHook(hook) + } +} +``` +Note: Syslog hook also support connecting to local syslog (Ex. "/dev/log" or "/var/run/syslog" or "/var/run/log"). For the detail, please check the [syslog hook README](hooks/syslog/README.md). + +| Hook | Description | +| ----- | ----------- | +| [Airbrake "legacy"](https://github.com/gemnasium/logrus-airbrake-legacy-hook) | Send errors to an exception tracking service compatible with the Airbrake API V2. Uses [`airbrake-go`](https://github.com/tobi/airbrake-go) behind the scenes. | +| [Airbrake](https://github.com/gemnasium/logrus-airbrake-hook) | Send errors to the Airbrake API V3. Uses the official [`gobrake`](https://github.com/airbrake/gobrake) behind the scenes. | +| [Amazon Kinesis](https://github.com/evalphobia/logrus_kinesis) | Hook for logging to [Amazon Kinesis](https://aws.amazon.com/kinesis/) | +| [Amqp-Hook](https://github.com/vladoatanasov/logrus_amqp) | Hook for logging to Amqp broker (Like RabbitMQ) | +| [Bugsnag](https://github.com/Shopify/logrus-bugsnag/blob/master/bugsnag.go) | Send errors to the Bugsnag exception tracking service. | +| [DeferPanic](https://github.com/deferpanic/dp-logrus) | Hook for logging to DeferPanic | +| [ElasticSearch](https://github.com/sohlich/elogrus) | Hook for logging to ElasticSearch| +| [Fluentd](https://github.com/evalphobia/logrus_fluent) | Hook for logging to fluentd | +| [Go-Slack](https://github.com/multiplay/go-slack) | Hook for logging to [Slack](https://slack.com) | +| [Graylog](https://github.com/gemnasium/logrus-graylog-hook) | Hook for logging to [Graylog](http://graylog2.org/) | +| [Hiprus](https://github.com/nubo/hiprus) | Send errors to a channel in hipchat. | +| [Honeybadger](https://github.com/agonzalezro/logrus_honeybadger) | Hook for sending exceptions to Honeybadger | +| [InfluxDB](https://github.com/Abramovic/logrus_influxdb) | Hook for logging to influxdb | +| [Influxus] (http://github.com/vlad-doru/influxus) | Hook for concurrently logging to [InfluxDB] (http://influxdata.com/) | +| [Journalhook](https://github.com/wercker/journalhook) | Hook for logging to `systemd-journald` | +| [KafkaLogrus](https://github.com/goibibo/KafkaLogrus) | Hook for logging to kafka | +| [LFShook](https://github.com/rifflock/lfshook) | Hook for logging to the local filesystem | +| [Logentries](https://github.com/jcftang/logentriesrus) | Hook for logging to [Logentries](https://logentries.com/) | +| [Logentrus](https://github.com/puddingfactory/logentrus) | Hook for logging to [Logentries](https://logentries.com/) | +| [Logmatic.io](https://github.com/logmatic/logmatic-go) | Hook for logging to [Logmatic.io](http://logmatic.io/) | +| [Logrusly](https://github.com/sebest/logrusly) | Send logs to [Loggly](https://www.loggly.com/) | +| [Logstash](https://github.com/bshuster-repo/logrus-logstash-hook) | Hook for logging to [Logstash](https://www.elastic.co/products/logstash) | +| [Mail](https://github.com/zbindenren/logrus_mail) | Hook for sending exceptions via mail | +| [Mongodb](https://github.com/weekface/mgorus) | Hook for logging to mongodb | +| [NATS-Hook](https://github.com/rybit/nats_logrus_hook) | Hook for logging to [NATS](https://nats.io) | +| [Octokit](https://github.com/dorajistyle/logrus-octokit-hook) | Hook for logging to github via octokit | +| [Papertrail](https://github.com/polds/logrus-papertrail-hook) | Send errors to the [Papertrail](https://papertrailapp.com) hosted logging service via UDP. | +| [PostgreSQL](https://github.com/gemnasium/logrus-postgresql-hook) | Send logs to [PostgreSQL](http://postgresql.org) | +| [Pushover](https://github.com/toorop/logrus_pushover) | Send error via [Pushover](https://pushover.net) | +| [Raygun](https://github.com/squirkle/logrus-raygun-hook) | Hook for logging to [Raygun.io](http://raygun.io/) | +| [Redis-Hook](https://github.com/rogierlommers/logrus-redis-hook) | Hook for logging to a ELK stack (through Redis) | +| [Rollrus](https://github.com/heroku/rollrus) | Hook for sending errors to rollbar | +| [Scribe](https://github.com/sagar8192/logrus-scribe-hook) | Hook for logging to [Scribe](https://github.com/facebookarchive/scribe)| +| [Sentry](https://github.com/evalphobia/logrus_sentry) | Send errors to the Sentry error logging and aggregation service. | +| [Slackrus](https://github.com/johntdyer/slackrus) | Hook for Slack chat. | +| [Stackdriver](https://github.com/knq/sdhook) | Hook for logging to [Google Stackdriver](https://cloud.google.com/logging/) | +| [Sumorus](https://github.com/doublefree/sumorus) | Hook for logging to [SumoLogic](https://www.sumologic.com/)| +| [Syslog](https://github.com/Sirupsen/logrus/blob/master/hooks/syslog/syslog.go) | Send errors to remote syslog server. Uses standard library `log/syslog` behind the scenes. | +| [TraceView](https://github.com/evalphobia/logrus_appneta) | Hook for logging to [AppNeta TraceView](https://www.appneta.com/products/traceview/) | +| [Typetalk](https://github.com/dragon3/logrus-typetalk-hook) | Hook for logging to [Typetalk](https://www.typetalk.in/) | +| [logz.io](https://github.com/ripcurld00d/logrus-logzio-hook) | Hook for logging to [logz.io](https://logz.io), a Log as a Service using Logstash | + +#### Level logging + +Logrus has six logging levels: Debug, Info, Warning, Error, Fatal and Panic. + +```go +log.Debug("Useful debugging information.") +log.Info("Something noteworthy happened!") +log.Warn("You should probably take a look at this.") +log.Error("Something failed but I'm not quitting.") +// Calls os.Exit(1) after logging +log.Fatal("Bye.") +// Calls panic() after logging +log.Panic("I'm bailing.") +``` + +You can set the logging level on a `Logger`, then it will only log entries with +that severity or anything above it: + +```go +// Will log anything that is info or above (warn, error, fatal, panic). Default. +log.SetLevel(log.InfoLevel) +``` + +It may be useful to set `log.Level = logrus.DebugLevel` in a debug or verbose +environment if your application has that. + +#### Entries + +Besides the fields added with `WithField` or `WithFields` some fields are +automatically added to all logging events: + +1. `time`. The timestamp when the entry was created. +2. `msg`. The logging message passed to `{Info,Warn,Error,Fatal,Panic}` after + the `AddFields` call. E.g. `Failed to send event.` +3. `level`. The logging level. E.g. `info`. + +#### Environments + +Logrus has no notion of environment. + +If you wish for hooks and formatters to only be used in specific environments, +you should handle that yourself. For example, if your application has a global +variable `Environment`, which is a string representation of the environment you +could do: + +```go +import ( + log "github.com/Sirupsen/logrus" +) + +init() { + // do something here to set environment depending on an environment variable + // or command-line flag + if Environment == "production" { + log.SetFormatter(&log.JSONFormatter{}) + } else { + // The TextFormatter is default, you don't actually have to do this. + log.SetFormatter(&log.TextFormatter{}) + } +} +``` + +This configuration is how `logrus` was intended to be used, but JSON in +production is mostly only useful if you do log aggregation with tools like +Splunk or Logstash. + +#### Formatters + +The built-in logging formatters are: + +* `logrus.TextFormatter`. Logs the event in colors if stdout is a tty, otherwise + without colors. + * *Note:* to force colored output when there is no TTY, set the `ForceColors` + field to `true`. To force no colored output even if there is a TTY set the + `DisableColors` field to `true`. For Windows, see + [github.com/mattn/go-colorable](https://github.com/mattn/go-colorable). + * All options are listed in the [generated docs](https://godoc.org/github.com/sirupsen/logrus#TextFormatter). +* `logrus.JSONFormatter`. Logs fields as JSON. + * All options are listed in the [generated docs](https://godoc.org/github.com/sirupsen/logrus#JSONFormatter). + +Third party logging formatters: + +* [`logstash`](https://github.com/bshuster-repo/logrus-logstash-hook). Logs fields as [Logstash](http://logstash.net) Events. +* [`prefixed`](https://github.com/x-cray/logrus-prefixed-formatter). Displays log entry source along with alternative layout. +* [`zalgo`](https://github.com/aybabtme/logzalgo). Invoking the P͉̫o̳̼̊w̖͈̰͎e̬͔̭͂r͚̼̹̲ ̫͓͉̳͈ō̠͕͖̚f̝͍̠ ͕̲̞͖͑Z̖̫̤̫ͪa͉̬͈̗l͖͎g̳̥o̰̥̅!̣͔̲̻͊̄ ̙̘̦̹̦. + +You can define your formatter by implementing the `Formatter` interface, +requiring a `Format` method. `Format` takes an `*Entry`. `entry.Data` is a +`Fields` type (`map[string]interface{}`) with all your fields as well as the +default ones (see Entries section above): + +```go +type MyJSONFormatter struct { +} + +log.SetFormatter(new(MyJSONFormatter)) + +func (f *MyJSONFormatter) Format(entry *Entry) ([]byte, error) { + // Note this doesn't include Time, Level and Message which are available on + // the Entry. Consult `godoc` on information about those fields or read the + // source of the official loggers. + serialized, err := json.Marshal(entry.Data) + if err != nil { + return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err) + } + return append(serialized, '\n'), nil +} +``` + +#### Logger as an `io.Writer` + +Logrus can be transformed into an `io.Writer`. That writer is the end of an `io.Pipe` and it is your responsibility to close it. + +```go +w := logger.Writer() +defer w.Close() + +srv := http.Server{ + // create a stdlib log.Logger that writes to + // logrus.Logger. + ErrorLog: log.New(w, "", 0), +} +``` + +Each line written to that writer will be printed the usual way, using formatters +and hooks. The level for those entries is `info`. + +This means that we can override the standard library logger easily: + +```go +logger := logrus.New() +logger.Formatter = &logrus.JSONFormatter{} + +// Use logrus for standard log output +// Note that `log` here references stdlib's log +// Not logrus imported under the name `log`. +log.SetOutput(logger.Writer()) +``` + +#### Rotation + +Log rotation is not provided with Logrus. Log rotation should be done by an +external program (like `logrotate(8)`) that can compress and delete old log +entries. It should not be a feature of the application-level logger. + +#### Tools + +| Tool | Description | +| ---- | ----------- | +|[Logrus Mate](https://github.com/gogap/logrus_mate)|Logrus mate is a tool for Logrus to manage loggers, you can initial logger's level, hook and formatter by config file, the logger will generated with different config at different environment.| +|[Logrus Viper Helper](https://github.com/heirko/go-contrib/tree/master/logrusHelper)|An Helper arround Logrus to wrap with spf13/Viper to load configuration with fangs! And to simplify Logrus configuration use some behavior of [Logrus Mate](https://github.com/gogap/logrus_mate). [sample](https://github.com/heirko/iris-contrib/blob/master/middleware/logrus-logger/example) | + +#### Testing + +Logrus has a built in facility for asserting the presence of log messages. This is implemented through the `test` hook and provides: + +* decorators for existing logger (`test.NewLocal` and `test.NewGlobal`) which basically just add the `test` hook +* a test logger (`test.NewNullLogger`) that just records log messages (and does not output any): + +```go +logger, hook := NewNullLogger() +logger.Error("Hello error") + +assert.Equal(1, len(hook.Entries)) +assert.Equal(logrus.ErrorLevel, hook.LastEntry().Level) +assert.Equal("Hello error", hook.LastEntry().Message) + +hook.Reset() +assert.Nil(hook.LastEntry()) +``` + +#### Fatal handlers + +Logrus can register one or more functions that will be called when any `fatal` +level message is logged. The registered handlers will be executed before +logrus performs a `os.Exit(1)`. This behavior may be helpful if callers need +to gracefully shutdown. Unlike a `panic("Something went wrong...")` call which can be intercepted with a deferred `recover` a call to `os.Exit(1)` can not be intercepted. + +``` +... +handler := func() { + // gracefully shutdown something... +} +logrus.RegisterExitHandler(handler) +... +``` + +#### Thread safety + +By default Logger is protected by mutex for concurrent writes, this mutex is invoked when calling hooks and writing logs. +If you are sure such locking is not needed, you can call logger.SetNoLock() to disable the locking. + +Situation when locking is not needed includes: + +* You have no hooks registered, or hooks calling is already thread-safe. + +* Writing to logger.Out is already thread-safe, for example: + + 1) logger.Out is protected by locks. + + 2) logger.Out is a os.File handler opened with `O_APPEND` flag, and every write is smaller than 4k. (This allow multi-thread/multi-process writing) + + (Refer to http://www.notthewizard.com/2014/06/17/are-files-appends-really-atomic/) diff --git a/_vendor/src/github.com/Sirupsen/logrus/alt_exit.go b/vendor/github.com/Sirupsen/logrus/alt_exit.go similarity index 100% rename from _vendor/src/github.com/Sirupsen/logrus/alt_exit.go rename to vendor/github.com/Sirupsen/logrus/alt_exit.go diff --git a/vendor/github.com/Sirupsen/logrus/alt_exit_test.go b/vendor/github.com/Sirupsen/logrus/alt_exit_test.go new file mode 100644 index 0000000000000..022b778303b76 --- /dev/null +++ b/vendor/github.com/Sirupsen/logrus/alt_exit_test.go @@ -0,0 +1,74 @@ +package logrus + +import ( + "io/ioutil" + "os/exec" + "testing" + "time" +) + +func TestRegister(t *testing.T) { + current := len(handlers) + RegisterExitHandler(func() {}) + if len(handlers) != current+1 { + t.Fatalf("can't add handler") + } +} + +func TestHandler(t *testing.T) { + gofile := "/tmp/testprog.go" + if err := ioutil.WriteFile(gofile, testprog, 0666); err != nil { + t.Fatalf("can't create go file") + } + + outfile := "/tmp/testprog.out" + arg := time.Now().UTC().String() + err := exec.Command("go", "run", gofile, outfile, arg).Run() + if err == nil { + t.Fatalf("completed normally, should have failed") + } + + data, err := ioutil.ReadFile(outfile) + if err != nil { + t.Fatalf("can't read output file %s", outfile) + } + + if string(data) != arg { + t.Fatalf("bad data") + } +} + +var testprog = []byte(` +// Test program for atexit, gets output file and data as arguments and writes +// data to output file in atexit handler. +package main + +import ( + "github.com/Sirupsen/logrus" + "flag" + "fmt" + "io/ioutil" +) + +var outfile = "" +var data = "" + +func handler() { + ioutil.WriteFile(outfile, []byte(data), 0666) +} + +func badHandler() { + n := 0 + fmt.Println(1/n) +} + +func main() { + flag.Parse() + outfile = flag.Arg(0) + data = flag.Arg(1) + + logrus.RegisterExitHandler(handler) + logrus.RegisterExitHandler(badHandler) + logrus.Fatal("Bye bye") +} +`) diff --git a/_vendor/src/github.com/Sirupsen/logrus/doc.go b/vendor/github.com/Sirupsen/logrus/doc.go similarity index 100% rename from _vendor/src/github.com/Sirupsen/logrus/doc.go rename to vendor/github.com/Sirupsen/logrus/doc.go diff --git a/_vendor/src/github.com/Sirupsen/logrus/entry.go b/vendor/github.com/Sirupsen/logrus/entry.go similarity index 100% rename from _vendor/src/github.com/Sirupsen/logrus/entry.go rename to vendor/github.com/Sirupsen/logrus/entry.go diff --git a/vendor/github.com/Sirupsen/logrus/entry_test.go b/vendor/github.com/Sirupsen/logrus/entry_test.go new file mode 100644 index 0000000000000..99c3b41d5f57f --- /dev/null +++ b/vendor/github.com/Sirupsen/logrus/entry_test.go @@ -0,0 +1,77 @@ +package logrus + +import ( + "bytes" + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestEntryWithError(t *testing.T) { + + assert := assert.New(t) + + defer func() { + ErrorKey = "error" + }() + + err := fmt.Errorf("kaboom at layer %d", 4711) + + assert.Equal(err, WithError(err).Data["error"]) + + logger := New() + logger.Out = &bytes.Buffer{} + entry := NewEntry(logger) + + assert.Equal(err, entry.WithError(err).Data["error"]) + + ErrorKey = "err" + + assert.Equal(err, entry.WithError(err).Data["err"]) + +} + +func TestEntryPanicln(t *testing.T) { + errBoom := fmt.Errorf("boom time") + + defer func() { + p := recover() + assert.NotNil(t, p) + + switch pVal := p.(type) { + case *Entry: + assert.Equal(t, "kaboom", pVal.Message) + assert.Equal(t, errBoom, pVal.Data["err"]) + default: + t.Fatalf("want type *Entry, got %T: %#v", pVal, pVal) + } + }() + + logger := New() + logger.Out = &bytes.Buffer{} + entry := NewEntry(logger) + entry.WithField("err", errBoom).Panicln("kaboom") +} + +func TestEntryPanicf(t *testing.T) { + errBoom := fmt.Errorf("boom again") + + defer func() { + p := recover() + assert.NotNil(t, p) + + switch pVal := p.(type) { + case *Entry: + assert.Equal(t, "kaboom true", pVal.Message) + assert.Equal(t, errBoom, pVal.Data["err"]) + default: + t.Fatalf("want type *Entry, got %T: %#v", pVal, pVal) + } + }() + + logger := New() + logger.Out = &bytes.Buffer{} + entry := NewEntry(logger) + entry.WithField("err", errBoom).Panicf("kaboom %v", true) +} diff --git a/_vendor/src/github.com/Sirupsen/logrus/exported.go b/vendor/github.com/Sirupsen/logrus/exported.go similarity index 100% rename from _vendor/src/github.com/Sirupsen/logrus/exported.go rename to vendor/github.com/Sirupsen/logrus/exported.go diff --git a/_vendor/src/github.com/Sirupsen/logrus/formatter.go b/vendor/github.com/Sirupsen/logrus/formatter.go similarity index 100% rename from _vendor/src/github.com/Sirupsen/logrus/formatter.go rename to vendor/github.com/Sirupsen/logrus/formatter.go diff --git a/vendor/github.com/Sirupsen/logrus/formatter_bench_test.go b/vendor/github.com/Sirupsen/logrus/formatter_bench_test.go new file mode 100644 index 0000000000000..d9481589f5f0e --- /dev/null +++ b/vendor/github.com/Sirupsen/logrus/formatter_bench_test.go @@ -0,0 +1,101 @@ +package logrus + +import ( + "fmt" + "testing" + "time" +) + +// smallFields is a small size data set for benchmarking +var smallFields = Fields{ + "foo": "bar", + "baz": "qux", + "one": "two", + "three": "four", +} + +// largeFields is a large size data set for benchmarking +var largeFields = Fields{ + "foo": "bar", + "baz": "qux", + "one": "two", + "three": "four", + "five": "six", + "seven": "eight", + "nine": "ten", + "eleven": "twelve", + "thirteen": "fourteen", + "fifteen": "sixteen", + "seventeen": "eighteen", + "nineteen": "twenty", + "a": "b", + "c": "d", + "e": "f", + "g": "h", + "i": "j", + "k": "l", + "m": "n", + "o": "p", + "q": "r", + "s": "t", + "u": "v", + "w": "x", + "y": "z", + "this": "will", + "make": "thirty", + "entries": "yeah", +} + +var errorFields = Fields{ + "foo": fmt.Errorf("bar"), + "baz": fmt.Errorf("qux"), +} + +func BenchmarkErrorTextFormatter(b *testing.B) { + doBenchmark(b, &TextFormatter{DisableColors: true}, errorFields) +} + +func BenchmarkSmallTextFormatter(b *testing.B) { + doBenchmark(b, &TextFormatter{DisableColors: true}, smallFields) +} + +func BenchmarkLargeTextFormatter(b *testing.B) { + doBenchmark(b, &TextFormatter{DisableColors: true}, largeFields) +} + +func BenchmarkSmallColoredTextFormatter(b *testing.B) { + doBenchmark(b, &TextFormatter{ForceColors: true}, smallFields) +} + +func BenchmarkLargeColoredTextFormatter(b *testing.B) { + doBenchmark(b, &TextFormatter{ForceColors: true}, largeFields) +} + +func BenchmarkSmallJSONFormatter(b *testing.B) { + doBenchmark(b, &JSONFormatter{}, smallFields) +} + +func BenchmarkLargeJSONFormatter(b *testing.B) { + doBenchmark(b, &JSONFormatter{}, largeFields) +} + +func doBenchmark(b *testing.B, formatter Formatter, fields Fields) { + logger := New() + + entry := &Entry{ + Time: time.Time{}, + Level: InfoLevel, + Message: "message", + Data: fields, + Logger: logger, + } + var d []byte + var err error + for i := 0; i < b.N; i++ { + d, err = formatter.Format(entry) + if err != nil { + b.Fatal(err) + } + b.SetBytes(int64(len(d))) + } +} diff --git a/vendor/github.com/Sirupsen/logrus/hook_test.go b/vendor/github.com/Sirupsen/logrus/hook_test.go new file mode 100644 index 0000000000000..13f34cb6f8150 --- /dev/null +++ b/vendor/github.com/Sirupsen/logrus/hook_test.go @@ -0,0 +1,122 @@ +package logrus + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +type TestHook struct { + Fired bool +} + +func (hook *TestHook) Fire(entry *Entry) error { + hook.Fired = true + return nil +} + +func (hook *TestHook) Levels() []Level { + return []Level{ + DebugLevel, + InfoLevel, + WarnLevel, + ErrorLevel, + FatalLevel, + PanicLevel, + } +} + +func TestHookFires(t *testing.T) { + hook := new(TestHook) + + LogAndAssertJSON(t, func(log *Logger) { + log.Hooks.Add(hook) + assert.Equal(t, hook.Fired, false) + + log.Print("test") + }, func(fields Fields) { + assert.Equal(t, hook.Fired, true) + }) +} + +type ModifyHook struct { +} + +func (hook *ModifyHook) Fire(entry *Entry) error { + entry.Data["wow"] = "whale" + return nil +} + +func (hook *ModifyHook) Levels() []Level { + return []Level{ + DebugLevel, + InfoLevel, + WarnLevel, + ErrorLevel, + FatalLevel, + PanicLevel, + } +} + +func TestHookCanModifyEntry(t *testing.T) { + hook := new(ModifyHook) + + LogAndAssertJSON(t, func(log *Logger) { + log.Hooks.Add(hook) + log.WithField("wow", "elephant").Print("test") + }, func(fields Fields) { + assert.Equal(t, fields["wow"], "whale") + }) +} + +func TestCanFireMultipleHooks(t *testing.T) { + hook1 := new(ModifyHook) + hook2 := new(TestHook) + + LogAndAssertJSON(t, func(log *Logger) { + log.Hooks.Add(hook1) + log.Hooks.Add(hook2) + + log.WithField("wow", "elephant").Print("test") + }, func(fields Fields) { + assert.Equal(t, fields["wow"], "whale") + assert.Equal(t, hook2.Fired, true) + }) +} + +type ErrorHook struct { + Fired bool +} + +func (hook *ErrorHook) Fire(entry *Entry) error { + hook.Fired = true + return nil +} + +func (hook *ErrorHook) Levels() []Level { + return []Level{ + ErrorLevel, + } +} + +func TestErrorHookShouldntFireOnInfo(t *testing.T) { + hook := new(ErrorHook) + + LogAndAssertJSON(t, func(log *Logger) { + log.Hooks.Add(hook) + log.Info("test") + }, func(fields Fields) { + assert.Equal(t, hook.Fired, false) + }) +} + +func TestErrorHookShouldFireOnError(t *testing.T) { + hook := new(ErrorHook) + + LogAndAssertJSON(t, func(log *Logger) { + log.Hooks.Add(hook) + log.Error("test") + }, func(fields Fields) { + assert.Equal(t, hook.Fired, true) + }) +} diff --git a/_vendor/src/github.com/Sirupsen/logrus/hooks.go b/vendor/github.com/Sirupsen/logrus/hooks.go similarity index 100% rename from _vendor/src/github.com/Sirupsen/logrus/hooks.go rename to vendor/github.com/Sirupsen/logrus/hooks.go diff --git a/_vendor/src/github.com/Sirupsen/logrus/json_formatter.go b/vendor/github.com/Sirupsen/logrus/json_formatter.go similarity index 100% rename from _vendor/src/github.com/Sirupsen/logrus/json_formatter.go rename to vendor/github.com/Sirupsen/logrus/json_formatter.go diff --git a/vendor/github.com/Sirupsen/logrus/json_formatter_test.go b/vendor/github.com/Sirupsen/logrus/json_formatter_test.go new file mode 100644 index 0000000000000..51093a79bad3c --- /dev/null +++ b/vendor/github.com/Sirupsen/logrus/json_formatter_test.go @@ -0,0 +1,199 @@ +package logrus + +import ( + "encoding/json" + "errors" + "strings" + "testing" +) + +func TestErrorNotLost(t *testing.T) { + formatter := &JSONFormatter{} + + b, err := formatter.Format(WithField("error", errors.New("wild walrus"))) + if err != nil { + t.Fatal("Unable to format entry: ", err) + } + + entry := make(map[string]interface{}) + err = json.Unmarshal(b, &entry) + if err != nil { + t.Fatal("Unable to unmarshal formatted entry: ", err) + } + + if entry["error"] != "wild walrus" { + t.Fatal("Error field not set") + } +} + +func TestErrorNotLostOnFieldNotNamedError(t *testing.T) { + formatter := &JSONFormatter{} + + b, err := formatter.Format(WithField("omg", errors.New("wild walrus"))) + if err != nil { + t.Fatal("Unable to format entry: ", err) + } + + entry := make(map[string]interface{}) + err = json.Unmarshal(b, &entry) + if err != nil { + t.Fatal("Unable to unmarshal formatted entry: ", err) + } + + if entry["omg"] != "wild walrus" { + t.Fatal("Error field not set") + } +} + +func TestFieldClashWithTime(t *testing.T) { + formatter := &JSONFormatter{} + + b, err := formatter.Format(WithField("time", "right now!")) + if err != nil { + t.Fatal("Unable to format entry: ", err) + } + + entry := make(map[string]interface{}) + err = json.Unmarshal(b, &entry) + if err != nil { + t.Fatal("Unable to unmarshal formatted entry: ", err) + } + + if entry["fields.time"] != "right now!" { + t.Fatal("fields.time not set to original time field") + } + + if entry["time"] != "0001-01-01T00:00:00Z" { + t.Fatal("time field not set to current time, was: ", entry["time"]) + } +} + +func TestFieldClashWithMsg(t *testing.T) { + formatter := &JSONFormatter{} + + b, err := formatter.Format(WithField("msg", "something")) + if err != nil { + t.Fatal("Unable to format entry: ", err) + } + + entry := make(map[string]interface{}) + err = json.Unmarshal(b, &entry) + if err != nil { + t.Fatal("Unable to unmarshal formatted entry: ", err) + } + + if entry["fields.msg"] != "something" { + t.Fatal("fields.msg not set to original msg field") + } +} + +func TestFieldClashWithLevel(t *testing.T) { + formatter := &JSONFormatter{} + + b, err := formatter.Format(WithField("level", "something")) + if err != nil { + t.Fatal("Unable to format entry: ", err) + } + + entry := make(map[string]interface{}) + err = json.Unmarshal(b, &entry) + if err != nil { + t.Fatal("Unable to unmarshal formatted entry: ", err) + } + + if entry["fields.level"] != "something" { + t.Fatal("fields.level not set to original level field") + } +} + +func TestJSONEntryEndsWithNewline(t *testing.T) { + formatter := &JSONFormatter{} + + b, err := formatter.Format(WithField("level", "something")) + if err != nil { + t.Fatal("Unable to format entry: ", err) + } + + if b[len(b)-1] != '\n' { + t.Fatal("Expected JSON log entry to end with a newline") + } +} + +func TestJSONMessageKey(t *testing.T) { + formatter := &JSONFormatter{ + FieldMap: FieldMap{ + FieldKeyMsg: "message", + }, + } + + b, err := formatter.Format(&Entry{Message: "oh hai"}) + if err != nil { + t.Fatal("Unable to format entry: ", err) + } + s := string(b) + if !(strings.Contains(s, "message") && strings.Contains(s, "oh hai")) { + t.Fatal("Expected JSON to format message key") + } +} + +func TestJSONLevelKey(t *testing.T) { + formatter := &JSONFormatter{ + FieldMap: FieldMap{ + FieldKeyLevel: "somelevel", + }, + } + + b, err := formatter.Format(WithField("level", "something")) + if err != nil { + t.Fatal("Unable to format entry: ", err) + } + s := string(b) + if !strings.Contains(s, "somelevel") { + t.Fatal("Expected JSON to format level key") + } +} + +func TestJSONTimeKey(t *testing.T) { + formatter := &JSONFormatter{ + FieldMap: FieldMap{ + FieldKeyTime: "timeywimey", + }, + } + + b, err := formatter.Format(WithField("level", "something")) + if err != nil { + t.Fatal("Unable to format entry: ", err) + } + s := string(b) + if !strings.Contains(s, "timeywimey") { + t.Fatal("Expected JSON to format time key") + } +} + +func TestJSONDisableTimestamp(t *testing.T) { + formatter := &JSONFormatter{ + DisableTimestamp: true, + } + + b, err := formatter.Format(WithField("level", "something")) + if err != nil { + t.Fatal("Unable to format entry: ", err) + } + s := string(b) + if strings.Contains(s, FieldKeyTime) { + t.Error("Did not prevent timestamp", s) + } +} + +func TestJSONEnableTimestamp(t *testing.T) { + formatter := &JSONFormatter{} + + b, err := formatter.Format(WithField("level", "something")) + if err != nil { + t.Fatal("Unable to format entry: ", err) + } + s := string(b) + if !strings.Contains(s, FieldKeyTime) { + t.Error("Timestamp not present", s) + } +} diff --git a/_vendor/src/github.com/Sirupsen/logrus/logger.go b/vendor/github.com/Sirupsen/logrus/logger.go similarity index 100% rename from _vendor/src/github.com/Sirupsen/logrus/logger.go rename to vendor/github.com/Sirupsen/logrus/logger.go diff --git a/vendor/github.com/Sirupsen/logrus/logger_bench_test.go b/vendor/github.com/Sirupsen/logrus/logger_bench_test.go new file mode 100644 index 0000000000000..dd23a3535ec96 --- /dev/null +++ b/vendor/github.com/Sirupsen/logrus/logger_bench_test.go @@ -0,0 +1,61 @@ +package logrus + +import ( + "os" + "testing" +) + +// smallFields is a small size data set for benchmarking +var loggerFields = Fields{ + "foo": "bar", + "baz": "qux", + "one": "two", + "three": "four", +} + +func BenchmarkDummyLogger(b *testing.B) { + nullf, err := os.OpenFile("/dev/null", os.O_WRONLY, 0666) + if err != nil { + b.Fatalf("%v", err) + } + defer nullf.Close() + doLoggerBenchmark(b, nullf, &TextFormatter{DisableColors: true}, smallFields) +} + +func BenchmarkDummyLoggerNoLock(b *testing.B) { + nullf, err := os.OpenFile("/dev/null", os.O_WRONLY|os.O_APPEND, 0666) + if err != nil { + b.Fatalf("%v", err) + } + defer nullf.Close() + doLoggerBenchmarkNoLock(b, nullf, &TextFormatter{DisableColors: true}, smallFields) +} + +func doLoggerBenchmark(b *testing.B, out *os.File, formatter Formatter, fields Fields) { + logger := Logger{ + Out: out, + Level: InfoLevel, + Formatter: formatter, + } + entry := logger.WithFields(fields) + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + entry.Info("aaa") + } + }) +} + +func doLoggerBenchmarkNoLock(b *testing.B, out *os.File, formatter Formatter, fields Fields) { + logger := Logger{ + Out: out, + Level: InfoLevel, + Formatter: formatter, + } + logger.SetNoLock() + entry := logger.WithFields(fields) + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + entry.Info("aaa") + } + }) +} diff --git a/_vendor/src/github.com/Sirupsen/logrus/logrus.go b/vendor/github.com/Sirupsen/logrus/logrus.go similarity index 100% rename from _vendor/src/github.com/Sirupsen/logrus/logrus.go rename to vendor/github.com/Sirupsen/logrus/logrus.go diff --git a/vendor/github.com/Sirupsen/logrus/logrus_test.go b/vendor/github.com/Sirupsen/logrus/logrus_test.go new file mode 100644 index 0000000000000..78cbc282595e3 --- /dev/null +++ b/vendor/github.com/Sirupsen/logrus/logrus_test.go @@ -0,0 +1,386 @@ +package logrus + +import ( + "bytes" + "encoding/json" + "strconv" + "strings" + "sync" + "testing" + + "github.com/stretchr/testify/assert" +) + +func LogAndAssertJSON(t *testing.T, log func(*Logger), assertions func(fields Fields)) { + var buffer bytes.Buffer + var fields Fields + + logger := New() + logger.Out = &buffer + logger.Formatter = new(JSONFormatter) + + log(logger) + + err := json.Unmarshal(buffer.Bytes(), &fields) + assert.Nil(t, err) + + assertions(fields) +} + +func LogAndAssertText(t *testing.T, log func(*Logger), assertions func(fields map[string]string)) { + var buffer bytes.Buffer + + logger := New() + logger.Out = &buffer + logger.Formatter = &TextFormatter{ + DisableColors: true, + } + + log(logger) + + fields := make(map[string]string) + for _, kv := range strings.Split(buffer.String(), " ") { + if !strings.Contains(kv, "=") { + continue + } + kvArr := strings.Split(kv, "=") + key := strings.TrimSpace(kvArr[0]) + val := kvArr[1] + if kvArr[1][0] == '"' { + var err error + val, err = strconv.Unquote(val) + assert.NoError(t, err) + } + fields[key] = val + } + assertions(fields) +} + +func TestPrint(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.Print("test") + }, func(fields Fields) { + assert.Equal(t, fields["msg"], "test") + assert.Equal(t, fields["level"], "info") + }) +} + +func TestInfo(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.Info("test") + }, func(fields Fields) { + assert.Equal(t, fields["msg"], "test") + assert.Equal(t, fields["level"], "info") + }) +} + +func TestWarn(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.Warn("test") + }, func(fields Fields) { + assert.Equal(t, fields["msg"], "test") + assert.Equal(t, fields["level"], "warning") + }) +} + +func TestInfolnShouldAddSpacesBetweenStrings(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.Infoln("test", "test") + }, func(fields Fields) { + assert.Equal(t, fields["msg"], "test test") + }) +} + +func TestInfolnShouldAddSpacesBetweenStringAndNonstring(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.Infoln("test", 10) + }, func(fields Fields) { + assert.Equal(t, fields["msg"], "test 10") + }) +} + +func TestInfolnShouldAddSpacesBetweenTwoNonStrings(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.Infoln(10, 10) + }, func(fields Fields) { + assert.Equal(t, fields["msg"], "10 10") + }) +} + +func TestInfoShouldAddSpacesBetweenTwoNonStrings(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.Infoln(10, 10) + }, func(fields Fields) { + assert.Equal(t, fields["msg"], "10 10") + }) +} + +func TestInfoShouldNotAddSpacesBetweenStringAndNonstring(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.Info("test", 10) + }, func(fields Fields) { + assert.Equal(t, fields["msg"], "test10") + }) +} + +func TestInfoShouldNotAddSpacesBetweenStrings(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.Info("test", "test") + }, func(fields Fields) { + assert.Equal(t, fields["msg"], "testtest") + }) +} + +func TestWithFieldsShouldAllowAssignments(t *testing.T) { + var buffer bytes.Buffer + var fields Fields + + logger := New() + logger.Out = &buffer + logger.Formatter = new(JSONFormatter) + + localLog := logger.WithFields(Fields{ + "key1": "value1", + }) + + localLog.WithField("key2", "value2").Info("test") + err := json.Unmarshal(buffer.Bytes(), &fields) + assert.Nil(t, err) + + assert.Equal(t, "value2", fields["key2"]) + assert.Equal(t, "value1", fields["key1"]) + + buffer = bytes.Buffer{} + fields = Fields{} + localLog.Info("test") + err = json.Unmarshal(buffer.Bytes(), &fields) + assert.Nil(t, err) + + _, ok := fields["key2"] + assert.Equal(t, false, ok) + assert.Equal(t, "value1", fields["key1"]) +} + +func TestUserSuppliedFieldDoesNotOverwriteDefaults(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.WithField("msg", "hello").Info("test") + }, func(fields Fields) { + assert.Equal(t, fields["msg"], "test") + }) +} + +func TestUserSuppliedMsgFieldHasPrefix(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.WithField("msg", "hello").Info("test") + }, func(fields Fields) { + assert.Equal(t, fields["msg"], "test") + assert.Equal(t, fields["fields.msg"], "hello") + }) +} + +func TestUserSuppliedTimeFieldHasPrefix(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.WithField("time", "hello").Info("test") + }, func(fields Fields) { + assert.Equal(t, fields["fields.time"], "hello") + }) +} + +func TestUserSuppliedLevelFieldHasPrefix(t *testing.T) { + LogAndAssertJSON(t, func(log *Logger) { + log.WithField("level", 1).Info("test") + }, func(fields Fields) { + assert.Equal(t, fields["level"], "info") + assert.Equal(t, fields["fields.level"], 1.0) // JSON has floats only + }) +} + +func TestDefaultFieldsAreNotPrefixed(t *testing.T) { + LogAndAssertText(t, func(log *Logger) { + ll := log.WithField("herp", "derp") + ll.Info("hello") + ll.Info("bye") + }, func(fields map[string]string) { + for _, fieldName := range []string{"fields.level", "fields.time", "fields.msg"} { + if _, ok := fields[fieldName]; ok { + t.Fatalf("should not have prefixed %q: %v", fieldName, fields) + } + } + }) +} + +func TestDoubleLoggingDoesntPrefixPreviousFields(t *testing.T) { + + var buffer bytes.Buffer + var fields Fields + + logger := New() + logger.Out = &buffer + logger.Formatter = new(JSONFormatter) + + llog := logger.WithField("context", "eating raw fish") + + llog.Info("looks delicious") + + err := json.Unmarshal(buffer.Bytes(), &fields) + assert.NoError(t, err, "should have decoded first message") + assert.Equal(t, len(fields), 4, "should only have msg/time/level/context fields") + assert.Equal(t, fields["msg"], "looks delicious") + assert.Equal(t, fields["context"], "eating raw fish") + + buffer.Reset() + + llog.Warn("omg it is!") + + err = json.Unmarshal(buffer.Bytes(), &fields) + assert.NoError(t, err, "should have decoded second message") + assert.Equal(t, len(fields), 4, "should only have msg/time/level/context fields") + assert.Equal(t, fields["msg"], "omg it is!") + assert.Equal(t, fields["context"], "eating raw fish") + assert.Nil(t, fields["fields.msg"], "should not have prefixed previous `msg` entry") + +} + +func TestConvertLevelToString(t *testing.T) { + assert.Equal(t, "debug", DebugLevel.String()) + assert.Equal(t, "info", InfoLevel.String()) + assert.Equal(t, "warning", WarnLevel.String()) + assert.Equal(t, "error", ErrorLevel.String()) + assert.Equal(t, "fatal", FatalLevel.String()) + assert.Equal(t, "panic", PanicLevel.String()) +} + +func TestParseLevel(t *testing.T) { + l, err := ParseLevel("panic") + assert.Nil(t, err) + assert.Equal(t, PanicLevel, l) + + l, err = ParseLevel("PANIC") + assert.Nil(t, err) + assert.Equal(t, PanicLevel, l) + + l, err = ParseLevel("fatal") + assert.Nil(t, err) + assert.Equal(t, FatalLevel, l) + + l, err = ParseLevel("FATAL") + assert.Nil(t, err) + assert.Equal(t, FatalLevel, l) + + l, err = ParseLevel("error") + assert.Nil(t, err) + assert.Equal(t, ErrorLevel, l) + + l, err = ParseLevel("ERROR") + assert.Nil(t, err) + assert.Equal(t, ErrorLevel, l) + + l, err = ParseLevel("warn") + assert.Nil(t, err) + assert.Equal(t, WarnLevel, l) + + l, err = ParseLevel("WARN") + assert.Nil(t, err) + assert.Equal(t, WarnLevel, l) + + l, err = ParseLevel("warning") + assert.Nil(t, err) + assert.Equal(t, WarnLevel, l) + + l, err = ParseLevel("WARNING") + assert.Nil(t, err) + assert.Equal(t, WarnLevel, l) + + l, err = ParseLevel("info") + assert.Nil(t, err) + assert.Equal(t, InfoLevel, l) + + l, err = ParseLevel("INFO") + assert.Nil(t, err) + assert.Equal(t, InfoLevel, l) + + l, err = ParseLevel("debug") + assert.Nil(t, err) + assert.Equal(t, DebugLevel, l) + + l, err = ParseLevel("DEBUG") + assert.Nil(t, err) + assert.Equal(t, DebugLevel, l) + + l, err = ParseLevel("invalid") + assert.Equal(t, "not a valid logrus Level: \"invalid\"", err.Error()) +} + +func TestGetSetLevelRace(t *testing.T) { + wg := sync.WaitGroup{} + for i := 0; i < 100; i++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + if i%2 == 0 { + SetLevel(InfoLevel) + } else { + GetLevel() + } + }(i) + + } + wg.Wait() +} + +func TestLoggingRace(t *testing.T) { + logger := New() + + var wg sync.WaitGroup + wg.Add(100) + + for i := 0; i < 100; i++ { + go func() { + logger.Info("info") + wg.Done() + }() + } + wg.Wait() +} + +// Compile test +func TestLogrusInterface(t *testing.T) { + var buffer bytes.Buffer + fn := func(l FieldLogger) { + b := l.WithField("key", "value") + b.Debug("Test") + } + // test logger + logger := New() + logger.Out = &buffer + fn(logger) + + // test Entry + e := logger.WithField("another", "value") + fn(e) +} + +// Implements io.Writer using channels for synchronization, so we can wait on +// the Entry.Writer goroutine to write in a non-racey way. This does assume that +// there is a single call to Logger.Out for each message. +type channelWriter chan []byte + +func (cw channelWriter) Write(p []byte) (int, error) { + cw <- p + return len(p), nil +} + +func TestEntryWriter(t *testing.T) { + cw := channelWriter(make(chan []byte, 1)) + log := New() + log.Out = cw + log.Formatter = new(JSONFormatter) + log.WithField("foo", "bar").WriterLevel(WarnLevel).Write([]byte("hello\n")) + + bs := <-cw + var fields Fields + err := json.Unmarshal(bs, &fields) + assert.Nil(t, err) + assert.Equal(t, fields["foo"], "bar") + assert.Equal(t, fields["level"], "warning") +} diff --git a/_vendor/src/github.com/Sirupsen/logrus/terminal_appengine.go b/vendor/github.com/Sirupsen/logrus/terminal_appengine.go similarity index 100% rename from _vendor/src/github.com/Sirupsen/logrus/terminal_appengine.go rename to vendor/github.com/Sirupsen/logrus/terminal_appengine.go diff --git a/_vendor/src/github.com/Sirupsen/logrus/terminal_bsd.go b/vendor/github.com/Sirupsen/logrus/terminal_bsd.go similarity index 100% rename from _vendor/src/github.com/Sirupsen/logrus/terminal_bsd.go rename to vendor/github.com/Sirupsen/logrus/terminal_bsd.go diff --git a/_vendor/src/github.com/Sirupsen/logrus/terminal_linux.go b/vendor/github.com/Sirupsen/logrus/terminal_linux.go similarity index 100% rename from _vendor/src/github.com/Sirupsen/logrus/terminal_linux.go rename to vendor/github.com/Sirupsen/logrus/terminal_linux.go diff --git a/_vendor/src/github.com/Sirupsen/logrus/terminal_notwindows.go b/vendor/github.com/Sirupsen/logrus/terminal_notwindows.go similarity index 100% rename from _vendor/src/github.com/Sirupsen/logrus/terminal_notwindows.go rename to vendor/github.com/Sirupsen/logrus/terminal_notwindows.go diff --git a/_vendor/src/github.com/Sirupsen/logrus/terminal_solaris.go b/vendor/github.com/Sirupsen/logrus/terminal_solaris.go similarity index 100% rename from _vendor/src/github.com/Sirupsen/logrus/terminal_solaris.go rename to vendor/github.com/Sirupsen/logrus/terminal_solaris.go diff --git a/_vendor/src/github.com/Sirupsen/logrus/terminal_windows.go b/vendor/github.com/Sirupsen/logrus/terminal_windows.go similarity index 100% rename from _vendor/src/github.com/Sirupsen/logrus/terminal_windows.go rename to vendor/github.com/Sirupsen/logrus/terminal_windows.go diff --git a/_vendor/src/github.com/Sirupsen/logrus/text_formatter.go b/vendor/github.com/Sirupsen/logrus/text_formatter.go similarity index 100% rename from _vendor/src/github.com/Sirupsen/logrus/text_formatter.go rename to vendor/github.com/Sirupsen/logrus/text_formatter.go diff --git a/vendor/github.com/Sirupsen/logrus/text_formatter_test.go b/vendor/github.com/Sirupsen/logrus/text_formatter_test.go new file mode 100644 index 0000000000000..9793b5f37df1f --- /dev/null +++ b/vendor/github.com/Sirupsen/logrus/text_formatter_test.go @@ -0,0 +1,87 @@ +package logrus + +import ( + "bytes" + "errors" + "strings" + "testing" + "time" +) + +func TestQuoting(t *testing.T) { + tf := &TextFormatter{DisableColors: true} + + checkQuoting := func(q bool, value interface{}) { + b, _ := tf.Format(WithField("test", value)) + idx := bytes.Index(b, ([]byte)("test=")) + cont := bytes.Contains(b[idx+5:], []byte(tf.QuoteCharacter)) + if cont != q { + if q { + t.Errorf("quoting expected for: %#v", value) + } else { + t.Errorf("quoting not expected for: %#v", value) + } + } + } + + checkQuoting(false, "") + checkQuoting(false, "abcd") + checkQuoting(false, "v1.0") + checkQuoting(false, "1234567890") + checkQuoting(true, "/foobar") + checkQuoting(true, "x y") + checkQuoting(true, "x,y") + checkQuoting(false, errors.New("invalid")) + checkQuoting(true, errors.New("invalid argument")) + + // Test for custom quote character. + tf.QuoteCharacter = "`" + checkQuoting(false, "") + checkQuoting(false, "abcd") + checkQuoting(true, "/foobar") + checkQuoting(true, errors.New("invalid argument")) + + // Test for multi-character quotes. + tf.QuoteCharacter = "§~±" + checkQuoting(false, "abcd") + checkQuoting(true, errors.New("invalid argument")) + + // Test for quoting empty fields. + tf.QuoteEmptyFields = true + checkQuoting(true, "") + checkQuoting(false, "abcd") + checkQuoting(true, errors.New("invalid argument")) +} + +func TestTimestampFormat(t *testing.T) { + checkTimeStr := func(format string) { + customFormatter := &TextFormatter{DisableColors: true, TimestampFormat: format} + customStr, _ := customFormatter.Format(WithField("test", "test")) + timeStart := bytes.Index(customStr, ([]byte)("time=")) + timeEnd := bytes.Index(customStr, ([]byte)("level=")) + timeStr := customStr[timeStart+5+len(customFormatter.QuoteCharacter) : timeEnd-1-len(customFormatter.QuoteCharacter)] + if format == "" { + format = time.RFC3339 + } + _, e := time.Parse(format, (string)(timeStr)) + if e != nil { + t.Errorf("time string \"%s\" did not match provided time format \"%s\": %s", timeStr, format, e) + } + } + + checkTimeStr("2006-01-02T15:04:05.000000000Z07:00") + checkTimeStr("Mon Jan _2 15:04:05 2006") + checkTimeStr("") +} + +func TestDisableTimestampWithColoredOutput(t *testing.T) { + tf := &TextFormatter{DisableTimestamp: true, ForceColors: true} + + b, _ := tf.Format(WithField("test", "test")) + if strings.Contains(string(b), "[0000]") { + t.Error("timestamp not expected when DisableTimestamp is true") + } +} + +// TODO add tests for sorting etc., this requires a parser for the text +// formatter output. diff --git a/_vendor/src/github.com/Sirupsen/logrus/writer.go b/vendor/github.com/Sirupsen/logrus/writer.go similarity index 100% rename from _vendor/src/github.com/Sirupsen/logrus/writer.go rename to vendor/github.com/Sirupsen/logrus/writer.go diff --git a/vendor/github.com/apache/thrift/.clang-format b/vendor/github.com/apache/thrift/.clang-format new file mode 100644 index 0000000000000..a62eef8576c14 --- /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 0000000000000..2d2ecd68da83a --- /dev/null +++ b/vendor/github.com/apache/thrift/.dockerignore @@ -0,0 +1 @@ +.git/ diff --git a/vendor/github.com/apache/thrift/.editorconfig b/vendor/github.com/apache/thrift/.editorconfig new file mode 100755 index 0000000000000..3611762c8a3d9 --- /dev/null +++ b/vendor/github.com/apache/thrift/.editorconfig @@ -0,0 +1,112 @@ +# +## 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. +## +# + +# EditorConfig: http://editorconfig.org +# see doc/coding_standards.md + +root = true + +[*] +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +# ActionScript +# [*.as] + +# C +# [*.c] + +# C++ +[*.cpp] +indent_style = space +indent_size = 2 + +# C-Sharp +# [*.cs] + +# D +# [*.d] + +# Erlang +# [*.erl] + +# Go-lang +[*.go] +indent_style = tab +indent_size = 8 + +# C header files +# [*.h] + +# Haskell +# [*.hs] + +# Haxe +# [*.hx] + +# Java +# [*.java] + +# Javascript +[*.js] +indent_style = space +indent_size = 2 + +# JSON +[*.json] +indent_style = space +indent_size = 2 + +# Lua +# [*.lua] + +[*.markdown] +indent_style = space +trim_trailing_whitespace = false + +[*.md] +indent_style = space +trim_trailing_whitespace = false + +# OCaml +# [*.ml] + +# Delphi Pascal +# [*.pas] + +# PHP +# [*.php] + +# Perl +# [*.pm] + +# Python +# [*.py] + +# Ruby +# [*.rb] + +# Typescript +# [*.ts] + +# XML +# [*.xml] diff --git a/vendor/github.com/apache/thrift/.gitattributes b/vendor/github.com/apache/thrift/.gitattributes new file mode 100644 index 0000000000000..176a458f94e0e --- /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 0000000000000..140c93b003fa7 --- /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/.travis.yml b/vendor/github.com/apache/thrift/.travis.yml new file mode 100644 index 0000000000000..81a88c3ce0da7 --- /dev/null +++ b/vendor/github.com/apache/thrift/.travis.yml @@ -0,0 +1,199 @@ +# +# 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. +# + +# build Apache Thrift on Travis CI - https://travis-ci.org/ + +sudo: required +dist: trusty + +services: + - docker + +install: + - (travis_wait ./build/docker/check_unmodified.sh $DISTRO && touch .unmodified) || true + - if [ ! -f .unmodified ]; then travis_retry travis_wait docker build -q -t thrift-build:$DISTRO build/docker/$DISTRO; fi + +script: + - docker run --net=host -e BUILD_LIBS="$BUILD_LIBS" $BUILD_ENV -v $(pwd):/thrift/src -it thrift-build:$DISTRO build/docker/scripts/$SCRIPT $BUILD_ARG + +env: + global: + - TEST_NAME="" + - SCRIPT="cmake.sh" + - BUILD_ARG="" + - BUILD_ENV="-e CC=clang -e CXX=clang++" + - DISTRO=ubuntu + - BUILD_LIBS="CPP C_GLIB HASKELL JAVA PYTHON TESTING TUTORIALS" # only meaningful for CMake builds + + matrix: + - TEST_NAME="Cross Language Tests (Binary and Header Protocols)" + SCRIPT="cross-test.sh" + BUILD_ARG="-'(binary|header)'" + BUILD_ENV="-e CC=clang -e CXX=clang++ -e THRIFT_CROSSTEST_CONCURRENCY=4" + + - TEST_NAME="Cross Language Tests (Debian) (Binary and Header Protocols)" + SCRIPT="cross-test.sh" + BUILD_ARG="-'(binary|header)'" + BUILD_ENV="-e CC=clang -e CXX=clang++ -e THRIFT_CROSSTEST_CONCURRENCY=4" + DISTRO=debian + + - TEST_NAME="Cross Language Tests (Compact and JSON Protocols)" + SCRIPT="cross-test.sh" + BUILD_ARG="-'(compact|json)'" + BUILD_ENV="-e CC=clang -e CXX=clang++ -e THRIFT_CROSSTEST_CONCURRENCY=4" + + - TEST_NAME="Cross Language Tests (Debian) (Compact and JSON Protocols)" + SCRIPT="cross-test.sh" + BUILD_ARG="-'(compact|json)'" + BUILD_ENV="-e CC=clang -e CXX=clang++ -e THRIFT_CROSSTEST_CONCURRENCY=4" + DISTRO=debian + + # TODO: Remove them once migrated to CMake + # Autotools builds + - TEST_NAME="C C++ C# D Erlang Haxe Go (automake)" + SCRIPT="autotools.sh" + BUILD_ARG="--without-dart --without-haskell --without-java --without-lua --without-nodejs --without-perl --without-php --without-php_extension --without-python --without-ruby" + + - TEST_NAME="C C++ - GCC (automake)" + SCRIPT="autotools.sh" + BUILD_ARG="--without-csharp --without-java --without-erlang --without-nodejs --without-lua --without-python --without-perl --without-php --without-php_extension --without-dart --without-ruby --without-haskell --without-go --without-haxe --without-d" + BUILD_ENV="-e CC=gcc -e CXX=g++" + + - TEST_NAME="Java Lua PHP Ruby Dart (automake)" + SCRIPT="autotools.sh" + BUILD_ARG="--without-cpp --without-haskell --without-c_glib --without-csharp --without-d --without-erlang --without-go --without-haxe --without-nodejs --without-python --without-perl" + + # These are flaky (due to cabal and npm network/server failures) and also have lengthy output + - TEST_NAME="Haskell Node.js Python Perl (automake)" + SCRIPT="autotools.sh" + BUILD_ARG="--without-cpp --without-c_glib --without-csharp --without-d --without-dart --without-erlang --without-go --without-haxe --without-java --without-lua --without-php --without-php_extension --without-ruby" + + # CMake build + - TEST_NAME="All" + + - TEST_NAME="All (Debian)" + DISTRO=debian + + - TEST_NAME="C C++ - GCC" + BUILD_LIBS="CPP C_GLIB TESTING TUTORIALS" + BUILD_ARG="-DWITH_PYTHON=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF" + BUILD_ENV="-e CC=gcc -e CXX=g++" + + - TEST_NAME="C++ (Boost Thread)" + BUILD_LIBS="CPP TESTING TUTORIALS" + BUILD_ARG="-DWITH_BOOSTTHREADS=ON -DWITH_PYTHON=OFF -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF" + + - TEST_NAME="C++ (Boost Thread - GCC)" + BUILD_LIBS="CPP TESTING TUTORIALS" + BUILD_ARG="-DWITH_BOOSTTHREADS=ON -DWITH_PYTHON=OFF -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF" + BUILD_ENV="-e CC=gcc -e CXX=g++" + + - TEST_NAME="C++ (Std Thread)" + BUILD_LIBS="CPP TESTING TUTORIALS" + BUILD_ARG="-DWITH_STDTHREADS=ON -DCMAKE_CXX_FLAGS='-std=c++11' -DWITH_PYTHON=OFF -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF" + + - TEST_NAME="C++ (Std Thread - GCC)" + BUILD_LIBS="CPP TESTING TUTORIALS" + BUILD_ARG="-DWITH_STDTHREADS=ON -DCMAKE_CXX_FLAGS='-std=c++11' -DWITH_PYTHON=OFF -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF" + BUILD_ENV="-e CC=gcc -e CXX=g++" + + - TEST_NAME="Compiler (mingw)" + BUILD_LIBS="" + BUILD_ARG="-DCMAKE_TOOLCHAIN_FILE=../build/cmake/mingw32-toolchain.cmake -DBUILD_COMPILER=ON -DBUILD_LIBRARIES=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF" + BUILD_ENV="" + + - TEST_NAME="All - GCC (CentOS)" + BUILD_ENV="-e CC=gcc -e CXX=g++" + DISTRO=centos + + - TEST_NAME="C C++ - Clang (CentOS)" + BUILD_LIBS="CPP C_GLIB TESTING TUTORIALS" + BUILD_ARG="-DWITH_PYTHON=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF" + DISTRO=centos + + - TEST_NAME="Python 2.6 (CentOS 6)" + BUILD_LIBS="PYTHON TESTING TUTORIALS" + BUILD_ARG="-DWITH_PYTHON=ON -DWITH_CPP=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF" + BUILD_ENV="-e CC=gcc -e CXX=g++" + DISTRO=centos6 + + # Distribution + - TEST_NAME="make dist" + SCRIPT="make-dist.sh" + BUILD_ENV="-e CC=gcc -e CXX=g++" + + - TEST_NAME="Debian Packages" + SCRIPT="dpkg.sh" + BUILD_ENV="-e CC=gcc -e CXX=g++" + + - TEST_NAME="make dist (Debian)" + SCRIPT="make-dist.sh" + BUILD_ENV="-e CC=gcc -e CXX=g++" + DISTRO=debian + + - TEST_NAME="Debian Packages (Debian)" + SCRIPT="dpkg.sh" + BUILD_ENV="-e CC=gcc -e CXX=g++" + DISTRO=debian + +matrix: + include: + # QA jobs for code analytics and metrics + # + # C/C++ static code analysis with cppcheck + # add --error-exitcode=1 to --enable=all as soon as everything is fixed + # + # Python code style check with flake8 + # + # search for TODO etc within source tree + # some statistics about the code base + # some info about the build machine + - env: TEST_NAME="cppcheck, flake8, TODO FIXME HACK, LoC and system info" + install: + - travis_retry sudo apt-get update + - travis_retry sudo apt-get install -ym cppcheck sloccount python-flake8 + script: + # Compiler cppcheck (All) + - cppcheck --force --quiet --inline-suppr --enable=all -j2 compiler/cpp/src + # C++ cppcheck (All) + - cppcheck --force --quiet --inline-suppr --enable=all -j2 lib/cpp/src lib/cpp/test test/cpp tutorial/cpp + # C Glib cppcheck (All) + - cppcheck --force --quiet --inline-suppr --enable=all -j2 lib/c_glib/src lib/c_glib/test test/c_glib/src tutorial/c_glib + # Silent error checks + - cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 compiler/cpp/src + - cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 lib/cpp/src lib/cpp/test test/cpp tutorial/cpp + - cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 lib/c_glib/src lib/c_glib/test test/c_glib/src tutorial/c_glib + # Python code style + - flake8 --ignore=E501 lib/py + - flake8 tutorial/py + - flake8 --ignore=E501 test/py + - flake8 test/py.twisted + - flake8 test/py.tornado + - flake8 --ignore=E501 test/test.py + - flake8 --ignore=E501 test/crossrunner + - flake8 test/features + # TODO etc + - grep -r TODO * + - grep -r FIXME * + - grep -r HACK * + # LoC + - sloccount . + # System Info + - dpkg -l + - uname -a diff --git a/vendor/github.com/apache/thrift/CHANGES b/vendor/github.com/apache/thrift/CHANGES new file mode 100644 index 0000000000000..7b674d6f65862 --- /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 0000000000000..93ed8d2ac58e9 --- /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 0000000000000..316da9a00de83 --- /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 0000000000000..0d7ad2175e353 --- /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/src/github.com/apache/thrift/LICENSE b/vendor/github.com/apache/thrift/LICENSE similarity index 100% rename from _vendor/src/github.com/apache/thrift/LICENSE rename to vendor/github.com/apache/thrift/LICENSE diff --git a/vendor/github.com/apache/thrift/Makefile.am b/vendor/github.com/apache/thrift/Makefile.am new file mode 100755 index 0000000000000..ed58265acefc4 --- /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/src/github.com/apache/thrift/NOTICE b/vendor/github.com/apache/thrift/NOTICE similarity index 100% rename from _vendor/src/github.com/apache/thrift/NOTICE rename to vendor/github.com/apache/thrift/NOTICE diff --git a/vendor/github.com/apache/thrift/README.md b/vendor/github.com/apache/thrift/README.md new file mode 100644 index 0000000000000..07cd32f09824b --- /dev/null +++ b/vendor/github.com/apache/thrift/README.md @@ -0,0 +1,166 @@ +Apache Thrift +============= + ++[![Build Status](https://travis-ci.org/apache/thrift.svg?branch=master)](https://travis-ci.org/apache/thrift) +- +[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/e2qks7enyp9gw7ma?svg=true)](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 0000000000000..2ead0e93df379 --- /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/appveyor.yml b/vendor/github.com/apache/thrift/appveyor.yml new file mode 100755 index 0000000000000..03ee29543584e --- /dev/null +++ b/vendor/github.com/apache/thrift/appveyor.yml @@ -0,0 +1,93 @@ +# 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. +# + +# build Apache Thrift on AppVeyor - https://ci.appveyor.com + +shallow_clone: true +clone_depth: 10 + +version: '{build}' +os: +# - Windows Server 2012 R2 +- Visual Studio 2015 + +environment: + BOOST_ROOT: C:\Libraries\boost_1_59_0 + BOOST_LIBRARYDIR: C:\Libraries\boost_1_59_0\lib64-msvc-14.0 + # Unfurtunately, this version needs manual update because old versions are quickly deleted. + ANT_VERSION: 1.9.7 + +install: +- '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64' +- cd \ + # Zlib +- appveyor DownloadFile https://github.com/madler/zlib/archive/v1.2.8.tar.gz +- 7z x v1.2.8.tar.gz -so | 7z x -si -ttar > nul +- cd zlib-1.2.8 +- cmake -G "Visual Studio 14 2015 Win64" . +- cmake --build . --config release +- cd .. + # OpenSSL +- C:\Python35-x64\python %APPVEYOR_BUILD_FOLDER%\build\appveyor\download_openssl.py +- ps: Start-Process "Win64OpenSSL.exe" -ArgumentList "/silent /verysilent /sp- /suppressmsgboxes" -Wait + # Libevent +- appveyor DownloadFile https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz +- 7z x libevent-2.0.22-stable.tar.gz -so | 7z x -si -ttar > nul +- cd libevent-2.0.22-stable +- nmake -f Makefile.nmake +- mkdir lib +- move *.lib lib\ +- move WIN32-Code\event2\* include\event2\ +- move *.h include\ +- cd .. +- appveyor-retry cinst -y winflexbison +- appveyor DownloadFile http://www.us.apache.org/dist/ant/binaries/apache-ant-%ANT_VERSION%-bin.zip +- 7z x apache-ant-%ANT_VERSION%-bin.zip > nul +- cd %APPVEYOR_BUILD_FOLDER% +# TODO: Enable Haskell build +# - cinst HaskellPlatform -version 2014.2.0.0 + + +build_script: +- set PATH=C:\ProgramData\chocolatey\bin;C:\apache-ant-%ANT_VERSION%\bin;%PATH% +- set JAVA_HOME=C:\Program Files\Java\jdk1.7.0 +- set PATH=%JAVA_HOME%\bin;%PATH% +# - set PATH=%PATH%;C:\Program Files (x86)\Haskell Platform\2014.2.0.0\bin +# - set PATH=%PATH%;C:\Program Files (x86)\Haskell Platform\2014.2.0.0\lib\extralibs\bin +- set PATH=C:\Python27-x64\scripts;C:\Python27-x64;%PATH% +- pip install ipaddress backports.ssl_match_hostname tornado twisted +- mkdir cmake-build +- cd cmake-build +- cmake -G "Visual Studio 14 2015 Win64" -DWITH_SHARED_LIB=OFF -DLIBEVENT_ROOT=C:\libevent-2.0.22-stable -DZLIB_INCLUDE_DIR=C:\zlib-1.2.8 -DZLIB_LIBRARY=C:\zlib-1.2.8\release\zlibstatic.lib -DBOOST_ROOT="%BOOST_ROOT%" -DBOOST_LIBRARYDIR="%BOOST_LIBRARYDIR%" .. +- findstr /b /e BUILD_COMPILER:BOOL=ON CMakeCache.txt +- findstr /b /e BUILD_CPP:BOOL=ON CMakeCache.txt +- findstr /b /e BUILD_JAVA:BOOL=ON CMakeCache.txt +- findstr /b /e BUILD_PYTHON:BOOL=ON CMakeCache.txt +# - findstr /b /e BUILD_C_GLIB:BOOL=ON CMakeCache.txt +# - findstr /b /e BUILD_HASKELL:BOOL=ON CMakeCache.txt +- findstr /b /e BUILD_TESTING:BOOL=ON CMakeCache.txt +# - cmake --build . +- cmake --build . --config Release +# TODO: Fix cpack +# - cpack +# TODO: Run more tests +# CTest fails to invoke ant seemingly due to "ant.bat" v.s. "ant" (shell script) conflict. +# Currently, everything that involves OpenSSL seems to hang forever on our Appveyor setup. +# Also a few C++ tests hang (on Appveyor or on Windows in general). +- ctest -C Release --timeout 600 -VV -E "(StressTestNonBlocking|PythonTestSSLSocket|python_test$|^Java)" +# TODO make it perfect ;-r diff --git a/vendor/github.com/apache/thrift/bootstrap.sh b/vendor/github.com/apache/thrift/bootstrap.sh new file mode 100755 index 0000000000000..52ecda47b3ada --- /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 0000000000000..9ec59fcb5dc62 --- /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 0000000000000..f110721ac9f59 --- /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 0000000000000..d937bc7ac2155 --- /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 0000000000000..0972abfc9d984 --- /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 0000000000000..14a8d6638d562 --- /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 0000000000000..5f17fca882d42 --- /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 0000000000000..ff946ea8d0cfd --- /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 0000000000000..7440474c325c1 --- /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 0000000000000..fa0390bb57747 --- /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/src/github.com/apache/thrift/lib/go/thrift/application_exception.go b/vendor/github.com/apache/thrift/lib/go/thrift/application_exception.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/application_exception.go rename to vendor/github.com/apache/thrift/lib/go/thrift/application_exception.go diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/application_exception_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/application_exception_test.go new file mode 100644 index 0000000000000..7010f868f1892 --- /dev/null +++ b/vendor/github.com/apache/thrift/lib/go/thrift/application_exception_test.go @@ -0,0 +1,41 @@ +/* + * 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. + */ + +package thrift + +import ( + "testing" +) + +func TestTApplicationException(t *testing.T) { + exc := NewTApplicationException(UNKNOWN_APPLICATION_EXCEPTION, "") + if exc.Error() != "" { + t.Fatalf("Expected empty string for exception but found '%s'", exc.Error()) + } + if exc.TypeId() != UNKNOWN_APPLICATION_EXCEPTION { + t.Fatalf("Expected type UNKNOWN for exception but found '%s'", exc.TypeId()) + } + exc = NewTApplicationException(WRONG_METHOD_NAME, "junk_method") + if exc.Error() != "junk_method" { + t.Fatalf("Expected 'junk_method' for exception but found '%s'", exc.Error()) + } + if exc.TypeId() != WRONG_METHOD_NAME { + t.Fatalf("Expected type WRONG_METHOD_NAME for exception but found '%s'", exc.TypeId()) + } +} diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/binary_protocol.go b/vendor/github.com/apache/thrift/lib/go/thrift/binary_protocol.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/binary_protocol.go rename to vendor/github.com/apache/thrift/lib/go/thrift/binary_protocol.go diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/binary_protocol_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/binary_protocol_test.go new file mode 100644 index 0000000000000..0462cc79deead --- /dev/null +++ b/vendor/github.com/apache/thrift/lib/go/thrift/binary_protocol_test.go @@ -0,0 +1,28 @@ +/* + * 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. + */ + +package thrift + +import ( + "testing" +) + +func TestReadWriteBinaryProtocol(t *testing.T) { + ReadWriteProtocolTest(t, NewTBinaryProtocolFactoryDefault()) +} diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/buffered_transport.go b/vendor/github.com/apache/thrift/lib/go/thrift/buffered_transport.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/buffered_transport.go rename to vendor/github.com/apache/thrift/lib/go/thrift/buffered_transport.go diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/buffered_transport_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/buffered_transport_test.go new file mode 100644 index 0000000000000..95ec0cbd2c012 --- /dev/null +++ b/vendor/github.com/apache/thrift/lib/go/thrift/buffered_transport_test.go @@ -0,0 +1,29 @@ +/* + * 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. + */ + +package thrift + +import ( + "testing" +) + +func TestBufferedTransport(t *testing.T) { + trans := NewTBufferedTransport(NewTMemoryBuffer(), 10240) + TransportTest(t, trans, trans) +} diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/compact_protocol.go b/vendor/github.com/apache/thrift/lib/go/thrift/compact_protocol.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/compact_protocol.go rename to vendor/github.com/apache/thrift/lib/go/thrift/compact_protocol.go diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/compact_protocol_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/compact_protocol_test.go new file mode 100644 index 0000000000000..72812f9cb0d28 --- /dev/null +++ b/vendor/github.com/apache/thrift/lib/go/thrift/compact_protocol_test.go @@ -0,0 +1,53 @@ +/* + * 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. + */ + +package thrift + +import ( + "bytes" + "testing" +) + +func TestReadWriteCompactProtocol(t *testing.T) { + ReadWriteProtocolTest(t, NewTCompactProtocolFactory()) + transports := []TTransport{ + NewTMemoryBuffer(), + NewStreamTransportRW(bytes.NewBuffer(make([]byte, 0, 16384))), + NewTFramedTransport(NewTMemoryBuffer()), + } + for _, trans := range transports { + p := NewTCompactProtocol(trans); + ReadWriteBool(t, p, trans); + p = NewTCompactProtocol(trans); + ReadWriteByte(t, p, trans); + p = NewTCompactProtocol(trans); + ReadWriteI16(t, p, trans); + p = NewTCompactProtocol(trans); + ReadWriteI32(t, p, trans); + p = NewTCompactProtocol(trans); + ReadWriteI64(t, p, trans); + p = NewTCompactProtocol(trans); + ReadWriteDouble(t, p, trans); + p = NewTCompactProtocol(trans); + ReadWriteString(t, p, trans); + p = NewTCompactProtocol(trans); + ReadWriteBinary(t, p, trans); + trans.Close(); + } +} diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/debug_protocol.go b/vendor/github.com/apache/thrift/lib/go/thrift/debug_protocol.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/debug_protocol.go rename to vendor/github.com/apache/thrift/lib/go/thrift/debug_protocol.go diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/deserializer.go b/vendor/github.com/apache/thrift/lib/go/thrift/deserializer.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/deserializer.go rename to vendor/github.com/apache/thrift/lib/go/thrift/deserializer.go diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/exception.go b/vendor/github.com/apache/thrift/lib/go/thrift/exception.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/exception.go rename to vendor/github.com/apache/thrift/lib/go/thrift/exception.go diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/exception_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/exception_test.go new file mode 100644 index 0000000000000..71f5e2c7e79e6 --- /dev/null +++ b/vendor/github.com/apache/thrift/lib/go/thrift/exception_test.go @@ -0,0 +1,69 @@ +/* + * 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. + */ + +package thrift + +import ( + "errors" + "testing" +) + +func TestPrependError(t *testing.T) { + err := NewTApplicationException(INTERNAL_ERROR, "original error") + err2, ok := PrependError("Prepend: ", err).(TApplicationException) + if !ok { + t.Fatal("Couldn't cast error TApplicationException") + } + if err2.Error() != "Prepend: original error" { + t.Fatal("Unexpected error string") + } + if err2.TypeId() != INTERNAL_ERROR { + t.Fatal("Unexpected type error") + } + + err3 := NewTProtocolExceptionWithType(INVALID_DATA, errors.New("original error")) + err4, ok := PrependError("Prepend: ", err3).(TProtocolException) + if !ok { + t.Fatal("Couldn't cast error TProtocolException") + } + if err4.Error() != "Prepend: original error" { + t.Fatal("Unexpected error string") + } + if err4.TypeId() != INVALID_DATA { + t.Fatal("Unexpected type error") + } + + err5 := NewTTransportException(TIMED_OUT, "original error") + err6, ok := PrependError("Prepend: ", err5).(TTransportException) + if !ok { + t.Fatal("Couldn't cast error TTransportException") + } + if err6.Error() != "Prepend: original error" { + t.Fatal("Unexpected error string") + } + if err6.TypeId() != TIMED_OUT { + t.Fatal("Unexpected type error") + } + + err7 := errors.New("original error") + err8 := PrependError("Prepend: ", err7) + if err8.Error() != "Prepend: original error" { + t.Fatal("Unexpected error string") + } +} diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/field.go b/vendor/github.com/apache/thrift/lib/go/thrift/field.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/field.go rename to vendor/github.com/apache/thrift/lib/go/thrift/field.go diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/framed_transport.go b/vendor/github.com/apache/thrift/lib/go/thrift/framed_transport.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/framed_transport.go rename to vendor/github.com/apache/thrift/lib/go/thrift/framed_transport.go diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/framed_transport_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/framed_transport_test.go new file mode 100644 index 0000000000000..8f683ef306251 --- /dev/null +++ b/vendor/github.com/apache/thrift/lib/go/thrift/framed_transport_test.go @@ -0,0 +1,29 @@ +/* + * 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. + */ + +package thrift + +import ( + "testing" +) + +func TestFramedTransport(t *testing.T) { + trans := NewTFramedTransport(NewTMemoryBuffer()) + TransportTest(t, trans, trans) +} diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/http_client.go b/vendor/github.com/apache/thrift/lib/go/thrift/http_client.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/http_client.go rename to vendor/github.com/apache/thrift/lib/go/thrift/http_client.go diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/http_client_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/http_client_test.go new file mode 100644 index 0000000000000..453680ace87b3 --- /dev/null +++ b/vendor/github.com/apache/thrift/lib/go/thrift/http_client_test.go @@ -0,0 +1,106 @@ +/* + * 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. + */ + +package thrift + +import ( + "net/http" + "testing" +) + +func TestHttpClient(t *testing.T) { + l, addr := HttpClientSetupForTest(t) + if l != nil { + defer l.Close() + } + trans, err := NewTHttpPostClient("http://" + addr.String()) + if err != nil { + l.Close() + t.Fatalf("Unable to connect to %s: %s", addr.String(), err) + } + TransportTest(t, trans, trans) +} + +func TestHttpClientHeaders(t *testing.T) { + l, addr := HttpClientSetupForTest(t) + if l != nil { + defer l.Close() + } + trans, err := NewTHttpPostClient("http://" + addr.String()) + if err != nil { + l.Close() + t.Fatalf("Unable to connect to %s: %s", addr.String(), err) + } + TransportHeaderTest(t, trans, trans) +} + +func TestHttpCustomClient(t *testing.T) { + l, addr := HttpClientSetupForTest(t) + if l != nil { + defer l.Close() + } + + httpTransport := &customHttpTransport{} + + trans, err := NewTHttpPostClientWithOptions("http://"+addr.String(), THttpClientOptions{ + Client: &http.Client{ + Transport: httpTransport, + }, + }) + if err != nil { + l.Close() + t.Fatalf("Unable to connect to %s: %s", addr.String(), err) + } + TransportHeaderTest(t, trans, trans) + + if !httpTransport.hit { + t.Fatalf("Custom client was not used") + } +} + +func TestHttpCustomClientPackageScope(t *testing.T) { + l, addr := HttpClientSetupForTest(t) + if l != nil { + defer l.Close() + } + httpTransport := &customHttpTransport{} + DefaultHttpClient = &http.Client{ + Transport: httpTransport, + } + + trans, err := NewTHttpPostClient("http://" + addr.String()) + if err != nil { + l.Close() + t.Fatalf("Unable to connect to %s: %s", addr.String(), err) + } + TransportHeaderTest(t, trans, trans) + + if !httpTransport.hit { + t.Fatalf("Custom client was not used") + } +} + +type customHttpTransport struct { + hit bool +} + +func (c *customHttpTransport) RoundTrip(req *http.Request) (*http.Response, error) { + c.hit = true + return http.DefaultTransport.RoundTrip(req) +} diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/http_transport.go b/vendor/github.com/apache/thrift/lib/go/thrift/http_transport.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/http_transport.go rename to vendor/github.com/apache/thrift/lib/go/thrift/http_transport.go diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/iostream_transport.go b/vendor/github.com/apache/thrift/lib/go/thrift/iostream_transport.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/iostream_transport.go rename to vendor/github.com/apache/thrift/lib/go/thrift/iostream_transport.go diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/iostream_transport_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/iostream_transport_test.go new file mode 100644 index 0000000000000..15a6116427d05 --- /dev/null +++ b/vendor/github.com/apache/thrift/lib/go/thrift/iostream_transport_test.go @@ -0,0 +1,52 @@ +/* + * 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. + */ + +package thrift + +import ( + "bytes" + "testing" +) + +func TestStreamTransport(t *testing.T) { + trans := NewStreamTransportRW(bytes.NewBuffer(make([]byte, 0, 1024))) + TransportTest(t, trans, trans) +} + +func TestStreamTransportOpenClose(t *testing.T) { + trans := NewStreamTransportRW(bytes.NewBuffer(make([]byte, 0, 1024))) + if !trans.IsOpen() { + t.Fatal("StreamTransport should be already open") + } + if trans.Open() == nil { + t.Fatal("StreamTransport should return error when open twice") + } + if trans.Close() != nil { + t.Fatal("StreamTransport should not return error when closing open transport") + } + if trans.IsOpen() { + t.Fatal("StreamTransport should not be open after close") + } + if trans.Close() == nil { + t.Fatal("StreamTransport should return error when closing a non open transport") + } + if trans.Open() == nil { + t.Fatal("StreamTransport should not be able to reopen") + } +} diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/json_protocol.go b/vendor/github.com/apache/thrift/lib/go/thrift/json_protocol.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/json_protocol.go rename to vendor/github.com/apache/thrift/lib/go/thrift/json_protocol.go diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/json_protocol_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/json_protocol_test.go new file mode 100644 index 0000000000000..7104ce3a02e78 --- /dev/null +++ b/vendor/github.com/apache/thrift/lib/go/thrift/json_protocol_test.go @@ -0,0 +1,649 @@ +/* + * 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. + */ + +package thrift + +import ( + "encoding/base64" + "encoding/json" + "fmt" + "math" + "strconv" + "testing" +) + +func TestWriteJSONProtocolBool(t *testing.T) { + thetype := "boolean" + trans := NewTMemoryBuffer() + p := NewTJSONProtocol(trans) + for _, value := range BOOL_VALUES { + if e := p.WriteBool(value); e != nil { + t.Fatalf("Unable to write %s value %v due to error: %s", thetype, value, e.Error()) + } + if e := p.Flush(); e != nil { + t.Fatalf("Unable to write %s value %v due to error flushing: %s", thetype, value, e.Error()) + } + s := trans.String() + expected := "" + if value { + expected = "1" + } else { + expected = "0" + } + if s != expected { + t.Fatalf("Bad value for %s %v: %s expected", thetype, value, s) + } + v := -1 + if err := json.Unmarshal([]byte(s), &v); err != nil || (v != 0) != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, v) + } + trans.Reset() + } + trans.Close() +} + +func TestReadJSONProtocolBool(t *testing.T) { + thetype := "boolean" + for _, value := range BOOL_VALUES { + trans := NewTMemoryBuffer() + p := NewTJSONProtocol(trans) + if value { + trans.Write([]byte{'1'}) // not JSON_TRUE + } else { + trans.Write([]byte{'0'}) // not JSON_FALSE + } + trans.Flush() + s := trans.String() + v, e := p.ReadBool() + if e != nil { + t.Fatalf("Unable to read %s value %v due to error: %s", thetype, value, e.Error()) + } + if v != value { + t.Fatalf("Bad value for %s value %v, wrote: %v, received: %v", thetype, value, s, v) + } + vv := -1 + if err := json.Unmarshal([]byte(s), &vv); err != nil || (vv != 0) != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, vv) + } + trans.Reset() + trans.Close() + } +} + +func TestWriteJSONProtocolByte(t *testing.T) { + thetype := "byte" + trans := NewTMemoryBuffer() + p := NewTJSONProtocol(trans) + for _, value := range BYTE_VALUES { + if e := p.WriteByte(value); e != nil { + t.Fatalf("Unable to write %s value %v due to error: %s", thetype, value, e.Error()) + } + if e := p.Flush(); e != nil { + t.Fatalf("Unable to write %s value %v due to error flushing: %s", thetype, value, e.Error()) + } + s := trans.String() + if s != fmt.Sprint(value) { + t.Fatalf("Bad value for %s %v: %s", thetype, value, s) + } + v := int8(0) + if err := json.Unmarshal([]byte(s), &v); err != nil || v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, v) + } + trans.Reset() + } + trans.Close() +} + +func TestReadJSONProtocolByte(t *testing.T) { + thetype := "byte" + for _, value := range BYTE_VALUES { + trans := NewTMemoryBuffer() + p := NewTJSONProtocol(trans) + trans.WriteString(strconv.Itoa(int(value))) + trans.Flush() + s := trans.String() + v, e := p.ReadByte() + if e != nil { + t.Fatalf("Unable to read %s value %v due to error: %s", thetype, value, e.Error()) + } + if v != value { + t.Fatalf("Bad value for %s value %v, wrote: %v, received: %v", thetype, value, s, v) + } + if err := json.Unmarshal([]byte(s), &v); err != nil || v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, v) + } + trans.Reset() + trans.Close() + } +} + +func TestWriteJSONProtocolI16(t *testing.T) { + thetype := "int16" + trans := NewTMemoryBuffer() + p := NewTJSONProtocol(trans) + for _, value := range INT16_VALUES { + if e := p.WriteI16(value); e != nil { + t.Fatalf("Unable to write %s value %v due to error: %s", thetype, value, e.Error()) + } + if e := p.Flush(); e != nil { + t.Fatalf("Unable to write %s value %v due to error flushing: %s", thetype, value, e.Error()) + } + s := trans.String() + if s != fmt.Sprint(value) { + t.Fatalf("Bad value for %s %v: %s", thetype, value, s) + } + v := int16(0) + if err := json.Unmarshal([]byte(s), &v); err != nil || v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, v) + } + trans.Reset() + } + trans.Close() +} + +func TestReadJSONProtocolI16(t *testing.T) { + thetype := "int16" + for _, value := range INT16_VALUES { + trans := NewTMemoryBuffer() + p := NewTJSONProtocol(trans) + trans.WriteString(strconv.Itoa(int(value))) + trans.Flush() + s := trans.String() + v, e := p.ReadI16() + if e != nil { + t.Fatalf("Unable to read %s value %v due to error: %s", thetype, value, e.Error()) + } + if v != value { + t.Fatalf("Bad value for %s value %v, wrote: %v, received: %v", thetype, value, s, v) + } + if err := json.Unmarshal([]byte(s), &v); err != nil || v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, v) + } + trans.Reset() + trans.Close() + } +} + +func TestWriteJSONProtocolI32(t *testing.T) { + thetype := "int32" + trans := NewTMemoryBuffer() + p := NewTJSONProtocol(trans) + for _, value := range INT32_VALUES { + if e := p.WriteI32(value); e != nil { + t.Fatalf("Unable to write %s value %v due to error: %s", thetype, value, e.Error()) + } + if e := p.Flush(); e != nil { + t.Fatalf("Unable to write %s value %v due to error flushing: %s", thetype, value, e.Error()) + } + s := trans.String() + if s != fmt.Sprint(value) { + t.Fatalf("Bad value for %s %v: %s", thetype, value, s) + } + v := int32(0) + if err := json.Unmarshal([]byte(s), &v); err != nil || v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, v) + } + trans.Reset() + } + trans.Close() +} + +func TestReadJSONProtocolI32(t *testing.T) { + thetype := "int32" + for _, value := range INT32_VALUES { + trans := NewTMemoryBuffer() + p := NewTJSONProtocol(trans) + trans.WriteString(strconv.Itoa(int(value))) + trans.Flush() + s := trans.String() + v, e := p.ReadI32() + if e != nil { + t.Fatalf("Unable to read %s value %v due to error: %s", thetype, value, e.Error()) + } + if v != value { + t.Fatalf("Bad value for %s value %v, wrote: %v, received: %v", thetype, value, s, v) + } + if err := json.Unmarshal([]byte(s), &v); err != nil || v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, v) + } + trans.Reset() + trans.Close() + } +} + +func TestWriteJSONProtocolI64(t *testing.T) { + thetype := "int64" + trans := NewTMemoryBuffer() + p := NewTJSONProtocol(trans) + for _, value := range INT64_VALUES { + if e := p.WriteI64(value); e != nil { + t.Fatalf("Unable to write %s value %v due to error: %s", thetype, value, e.Error()) + } + if e := p.Flush(); e != nil { + t.Fatalf("Unable to write %s value %v due to error flushing: %s", thetype, value, e.Error()) + } + s := trans.String() + if s != fmt.Sprint(value) { + t.Fatalf("Bad value for %s %v: %s", thetype, value, s) + } + v := int64(0) + if err := json.Unmarshal([]byte(s), &v); err != nil || v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, v) + } + trans.Reset() + } + trans.Close() +} + +func TestReadJSONProtocolI64(t *testing.T) { + thetype := "int64" + for _, value := range INT64_VALUES { + trans := NewTMemoryBuffer() + p := NewTJSONProtocol(trans) + trans.WriteString(strconv.FormatInt(value, 10)) + trans.Flush() + s := trans.String() + v, e := p.ReadI64() + if e != nil { + t.Fatalf("Unable to read %s value %v due to error: %s", thetype, value, e.Error()) + } + if v != value { + t.Fatalf("Bad value for %s value %v, wrote: %v, received: %v", thetype, value, s, v) + } + if err := json.Unmarshal([]byte(s), &v); err != nil || v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, v) + } + trans.Reset() + trans.Close() + } +} + +func TestWriteJSONProtocolDouble(t *testing.T) { + thetype := "double" + trans := NewTMemoryBuffer() + p := NewTJSONProtocol(trans) + for _, value := range DOUBLE_VALUES { + if e := p.WriteDouble(value); e != nil { + t.Fatalf("Unable to write %s value %v due to error: %s", thetype, value, e.Error()) + } + if e := p.Flush(); e != nil { + t.Fatalf("Unable to write %s value %v due to error flushing: %s", thetype, value, e.Error()) + } + s := trans.String() + if math.IsInf(value, 1) { + if s != jsonQuote(JSON_INFINITY) { + t.Fatalf("Bad value for %s %v, wrote: %v, expected: %v", thetype, value, s, jsonQuote(JSON_INFINITY)) + } + } else if math.IsInf(value, -1) { + if s != jsonQuote(JSON_NEGATIVE_INFINITY) { + t.Fatalf("Bad value for %s %v, wrote: %v, expected: %v", thetype, value, s, jsonQuote(JSON_NEGATIVE_INFINITY)) + } + } else if math.IsNaN(value) { + if s != jsonQuote(JSON_NAN) { + t.Fatalf("Bad value for %s %v, wrote: %v, expected: %v", thetype, value, s, jsonQuote(JSON_NAN)) + } + } else { + if s != fmt.Sprint(value) { + t.Fatalf("Bad value for %s %v: %s", thetype, value, s) + } + v := float64(0) + if err := json.Unmarshal([]byte(s), &v); err != nil || v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, v) + } + } + trans.Reset() + } + trans.Close() +} + +func TestReadJSONProtocolDouble(t *testing.T) { + thetype := "double" + for _, value := range DOUBLE_VALUES { + trans := NewTMemoryBuffer() + p := NewTJSONProtocol(trans) + n := NewNumericFromDouble(value) + trans.WriteString(n.String()) + trans.Flush() + s := trans.String() + v, e := p.ReadDouble() + if e != nil { + t.Fatalf("Unable to read %s value %v due to error: %s", thetype, value, e.Error()) + } + if math.IsInf(value, 1) { + if !math.IsInf(v, 1) { + t.Fatalf("Bad value for %s %v, wrote: %v, received: %v", thetype, value, s, v) + } + } else if math.IsInf(value, -1) { + if !math.IsInf(v, -1) { + t.Fatalf("Bad value for %s %v, wrote: %v, received: %v", thetype, value, s, v) + } + } else if math.IsNaN(value) { + if !math.IsNaN(v) { + t.Fatalf("Bad value for %s %v, wrote: %v, received: %v", thetype, value, s, v) + } + } else { + if v != value { + t.Fatalf("Bad value for %s value %v, wrote: %v, received: %v", thetype, value, s, v) + } + if err := json.Unmarshal([]byte(s), &v); err != nil || v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, v) + } + } + trans.Reset() + trans.Close() + } +} + +func TestWriteJSONProtocolString(t *testing.T) { + thetype := "string" + trans := NewTMemoryBuffer() + p := NewTJSONProtocol(trans) + for _, value := range STRING_VALUES { + if e := p.WriteString(value); e != nil { + t.Fatalf("Unable to write %s value %v due to error: %s", thetype, value, e.Error()) + } + if e := p.Flush(); e != nil { + t.Fatalf("Unable to write %s value %v due to error flushing: %s", thetype, value, e.Error()) + } + s := trans.String() + if s[0] != '"' || s[len(s)-1] != '"' { + t.Fatalf("Bad value for %s '%v', wrote '%v', expected: %v", thetype, value, s, fmt.Sprint("\"", value, "\"")) + } + v := new(string) + if err := json.Unmarshal([]byte(s), v); err != nil || *v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, *v) + } + trans.Reset() + } + trans.Close() +} + +func TestReadJSONProtocolString(t *testing.T) { + thetype := "string" + for _, value := range STRING_VALUES { + trans := NewTMemoryBuffer() + p := NewTJSONProtocol(trans) + trans.WriteString(jsonQuote(value)) + trans.Flush() + s := trans.String() + v, e := p.ReadString() + if e != nil { + t.Fatalf("Unable to read %s value %v due to error: %s", thetype, value, e.Error()) + } + if v != value { + t.Fatalf("Bad value for %s value %v, wrote: %v, received: %v", thetype, value, s, v) + } + v1 := new(string) + if err := json.Unmarshal([]byte(s), v1); err != nil || *v1 != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, *v1) + } + trans.Reset() + trans.Close() + } +} + +func TestWriteJSONProtocolBinary(t *testing.T) { + thetype := "binary" + value := protocol_bdata + b64value := make([]byte, base64.StdEncoding.EncodedLen(len(protocol_bdata))) + base64.StdEncoding.Encode(b64value, value) + b64String := string(b64value) + trans := NewTMemoryBuffer() + p := NewTJSONProtocol(trans) + if e := p.WriteBinary(value); e != nil { + t.Fatalf("Unable to write %s value %v due to error: %s", thetype, value, e.Error()) + } + if e := p.Flush(); e != nil { + t.Fatalf("Unable to write %s value %v due to error flushing: %s", thetype, value, e.Error()) + } + s := trans.String() + expectedString := fmt.Sprint("\"", b64String, "\"") + if s != expectedString { + t.Fatalf("Bad value for %s %v\n wrote: \"%v\"\nexpected: \"%v\"", thetype, value, s, expectedString) + } + v1, err := p.ReadBinary() + if err != nil { + t.Fatalf("Unable to read binary: %s", err.Error()) + } + if len(v1) != len(value) { + t.Fatalf("Invalid value for binary\nexpected: \"%v\"\n read: \"%v\"", value, v1) + } + for k, v := range value { + if v1[k] != v { + t.Fatalf("Invalid value for binary at %v\nexpected: \"%v\"\n read: \"%v\"", k, v, v1[k]) + } + } + trans.Close() +} + +func TestReadJSONProtocolBinary(t *testing.T) { + thetype := "binary" + value := protocol_bdata + b64value := make([]byte, base64.StdEncoding.EncodedLen(len(protocol_bdata))) + base64.StdEncoding.Encode(b64value, value) + b64String := string(b64value) + trans := NewTMemoryBuffer() + p := NewTJSONProtocol(trans) + trans.WriteString(jsonQuote(b64String)) + trans.Flush() + s := trans.String() + v, e := p.ReadBinary() + if e != nil { + t.Fatalf("Unable to read %s value %v due to error: %s", thetype, value, e.Error()) + } + if len(v) != len(value) { + t.Fatalf("Bad value for %s value length %v, wrote: %v, received length: %v", thetype, len(value), s, len(v)) + } + for i := 0; i < len(v); i++ { + if v[i] != value[i] { + t.Fatalf("Bad value for %s at index %d value %v, wrote: %v, received: %v", thetype, i, value[i], s, v[i]) + } + } + v1 := new(string) + if err := json.Unmarshal([]byte(s), v1); err != nil || *v1 != b64String { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, *v1) + } + trans.Reset() + trans.Close() +} + +func TestWriteJSONProtocolList(t *testing.T) { + thetype := "list" + trans := NewTMemoryBuffer() + p := NewTJSONProtocol(trans) + p.WriteListBegin(TType(DOUBLE), len(DOUBLE_VALUES)) + for _, value := range DOUBLE_VALUES { + if e := p.WriteDouble(value); e != nil { + t.Fatalf("Unable to write %s value %v due to error: %s", thetype, value, e.Error()) + } + } + p.WriteListEnd() + if e := p.Flush(); e != nil { + t.Fatalf("Unable to write %s due to error flushing: %s", thetype, e.Error()) + } + str := trans.String() + str1 := new([]interface{}) + err := json.Unmarshal([]byte(str), str1) + if err != nil { + t.Fatalf("Unable to decode %s, wrote: %s", thetype, str) + } + l := *str1 + if len(l) < 2 { + t.Fatalf("List must be at least of length two to include metadata") + } + if l[0] != "dbl" { + t.Fatal("Invalid type for list, expected: ", STRING, ", but was: ", l[0]) + } + if int(l[1].(float64)) != len(DOUBLE_VALUES) { + t.Fatal("Invalid length for list, expected: ", len(DOUBLE_VALUES), ", but was: ", l[1]) + } + for k, value := range DOUBLE_VALUES { + s := l[k+2] + if math.IsInf(value, 1) { + if s.(string) != JSON_INFINITY { + t.Fatalf("Bad value for %s at index %v %v, wrote: %q, expected: %q, originally wrote: %q", thetype, k, value, s, jsonQuote(JSON_INFINITY), str) + } + } else if math.IsInf(value, 0) { + if s.(string) != JSON_NEGATIVE_INFINITY { + t.Fatalf("Bad value for %s at index %v %v, wrote: %q, expected: %q, originally wrote: %q", thetype, k, value, s, jsonQuote(JSON_NEGATIVE_INFINITY), str) + } + } else if math.IsNaN(value) { + if s.(string) != JSON_NAN { + t.Fatalf("Bad value for %s at index %v %v, wrote: %q, expected: %q, originally wrote: %q", thetype, k, value, s, jsonQuote(JSON_NAN), str) + } + } else { + if s.(float64) != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s'", thetype, value, s) + } + } + trans.Reset() + } + trans.Close() +} + +func TestWriteJSONProtocolSet(t *testing.T) { + thetype := "set" + trans := NewTMemoryBuffer() + p := NewTJSONProtocol(trans) + p.WriteSetBegin(TType(DOUBLE), len(DOUBLE_VALUES)) + for _, value := range DOUBLE_VALUES { + if e := p.WriteDouble(value); e != nil { + t.Fatalf("Unable to write %s value %v due to error: %s", thetype, value, e.Error()) + } + } + p.WriteSetEnd() + if e := p.Flush(); e != nil { + t.Fatalf("Unable to write %s due to error flushing: %s", thetype, e.Error()) + } + str := trans.String() + str1 := new([]interface{}) + err := json.Unmarshal([]byte(str), str1) + if err != nil { + t.Fatalf("Unable to decode %s, wrote: %s", thetype, str) + } + l := *str1 + if len(l) < 2 { + t.Fatalf("Set must be at least of length two to include metadata") + } + if l[0] != "dbl" { + t.Fatal("Invalid type for set, expected: ", DOUBLE, ", but was: ", l[0]) + } + if int(l[1].(float64)) != len(DOUBLE_VALUES) { + t.Fatal("Invalid length for set, expected: ", len(DOUBLE_VALUES), ", but was: ", l[1]) + } + for k, value := range DOUBLE_VALUES { + s := l[k+2] + if math.IsInf(value, 1) { + if s.(string) != JSON_INFINITY { + t.Fatalf("Bad value for %s at index %v %v, wrote: %q, expected: %q, originally wrote: %q", thetype, k, value, s, jsonQuote(JSON_INFINITY), str) + } + } else if math.IsInf(value, 0) { + if s.(string) != JSON_NEGATIVE_INFINITY { + t.Fatalf("Bad value for %s at index %v %v, wrote: %q, expected: %q, originally wrote: %q", thetype, k, value, s, jsonQuote(JSON_NEGATIVE_INFINITY), str) + } + } else if math.IsNaN(value) { + if s.(string) != JSON_NAN { + t.Fatalf("Bad value for %s at index %v %v, wrote: %q, expected: %q, originally wrote: %q", thetype, k, value, s, jsonQuote(JSON_NAN), str) + } + } else { + if s.(float64) != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s'", thetype, value, s) + } + } + trans.Reset() + } + trans.Close() +} + +func TestWriteJSONProtocolMap(t *testing.T) { + thetype := "map" + trans := NewTMemoryBuffer() + p := NewTJSONProtocol(trans) + p.WriteMapBegin(TType(I32), TType(DOUBLE), len(DOUBLE_VALUES)) + for k, value := range DOUBLE_VALUES { + if e := p.WriteI32(int32(k)); e != nil { + t.Fatalf("Unable to write %s key int32 value %v due to error: %s", thetype, k, e.Error()) + } + if e := p.WriteDouble(value); e != nil { + t.Fatalf("Unable to write %s value float64 value %v due to error: %s", thetype, value, e.Error()) + } + } + p.WriteMapEnd() + if e := p.Flush(); e != nil { + t.Fatalf("Unable to write %s due to error flushing: %s", thetype, e.Error()) + } + str := trans.String() + if str[0] != '[' || str[len(str)-1] != ']' { + t.Fatalf("Bad value for %s, wrote: %q, in go: %q", thetype, str, DOUBLE_VALUES) + } + expectedKeyType, expectedValueType, expectedSize, err := p.ReadMapBegin() + if err != nil { + t.Fatalf("Error while reading map begin: %s", err.Error()) + } + if expectedKeyType != I32 { + t.Fatal("Expected map key type ", I32, ", but was ", expectedKeyType) + } + if expectedValueType != DOUBLE { + t.Fatal("Expected map value type ", DOUBLE, ", but was ", expectedValueType) + } + if expectedSize != len(DOUBLE_VALUES) { + t.Fatal("Expected map size of ", len(DOUBLE_VALUES), ", but was ", expectedSize) + } + for k, value := range DOUBLE_VALUES { + ik, err := p.ReadI32() + if err != nil { + t.Fatalf("Bad key for %s index %v, wrote: %v, expected: %v, error: %s", thetype, k, ik, string(k), err.Error()) + } + if int(ik) != k { + t.Fatalf("Bad key for %s index %v, wrote: %v, expected: %v", thetype, k, ik, k) + } + dv, err := p.ReadDouble() + if err != nil { + t.Fatalf("Bad value for %s index %v, wrote: %v, expected: %v, error: %s", thetype, k, dv, value, err.Error()) + } + s := strconv.FormatFloat(dv, 'g', 10, 64) + if math.IsInf(value, 1) { + if !math.IsInf(dv, 1) { + t.Fatalf("Bad value for %s at index %v %v, wrote: %v, expected: %v", thetype, k, value, s, jsonQuote(JSON_INFINITY)) + } + } else if math.IsInf(value, 0) { + if !math.IsInf(dv, 0) { + t.Fatalf("Bad value for %s at index %v %v, wrote: %v, expected: %v", thetype, k, value, s, jsonQuote(JSON_NEGATIVE_INFINITY)) + } + } else if math.IsNaN(value) { + if !math.IsNaN(dv) { + t.Fatalf("Bad value for %s at index %v %v, wrote: %v, expected: %v", thetype, k, value, s, jsonQuote(JSON_NAN)) + } + } else { + expected := strconv.FormatFloat(value, 'g', 10, 64) + if s != expected { + t.Fatalf("Bad value for %s at index %v %v, wrote: %v, expected %v", thetype, k, value, s, expected) + } + v := float64(0) + if err := json.Unmarshal([]byte(s), &v); err != nil || v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, v) + } + } + } + err = p.ReadMapEnd() + if err != nil { + t.Fatalf("Error while reading map end: %s", err.Error()) + } + trans.Close() +} diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/lowlevel_benchmarks_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/lowlevel_benchmarks_test.go new file mode 100644 index 0000000000000..a5094ae97ce2c --- /dev/null +++ b/vendor/github.com/apache/thrift/lib/go/thrift/lowlevel_benchmarks_test.go @@ -0,0 +1,396 @@ +/* + * 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. + */ + +package thrift + +import ( + "bytes" + "testing" +) + +var binaryProtoF = NewTBinaryProtocolFactoryDefault() +var compactProtoF = NewTCompactProtocolFactory() + +var buf = bytes.NewBuffer(make([]byte, 0, 1024)) + +var tfv = []TTransportFactory{ + NewTMemoryBufferTransportFactory(1024), + NewStreamTransportFactory(buf, buf, true), + NewTFramedTransportFactory(NewTMemoryBufferTransportFactory(1024)), +} + +func BenchmarkBinaryBool_0(b *testing.B) { + trans := tfv[0].GetTransport(nil) + p := binaryProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteBool(b, p, trans) + } +} + +func BenchmarkBinaryByte_0(b *testing.B) { + trans := tfv[0].GetTransport(nil) + p := binaryProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteByte(b, p, trans) + } +} + +func BenchmarkBinaryI16_0(b *testing.B) { + trans := tfv[0].GetTransport(nil) + p := binaryProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteI16(b, p, trans) + } +} + +func BenchmarkBinaryI32_0(b *testing.B) { + trans := tfv[0].GetTransport(nil) + p := binaryProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteI32(b, p, trans) + } +} +func BenchmarkBinaryI64_0(b *testing.B) { + trans := tfv[0].GetTransport(nil) + p := binaryProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteI64(b, p, trans) + } +} +func BenchmarkBinaryDouble_0(b *testing.B) { + trans := tfv[0].GetTransport(nil) + p := binaryProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteDouble(b, p, trans) + } +} +func BenchmarkBinaryString_0(b *testing.B) { + trans := tfv[0].GetTransport(nil) + p := binaryProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteString(b, p, trans) + } +} +func BenchmarkBinaryBinary_0(b *testing.B) { + trans := tfv[0].GetTransport(nil) + p := binaryProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteBinary(b, p, trans) + } +} + +func BenchmarkBinaryBool_1(b *testing.B) { + trans := tfv[1].GetTransport(nil) + p := binaryProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteBool(b, p, trans) + } +} + +func BenchmarkBinaryByte_1(b *testing.B) { + trans := tfv[1].GetTransport(nil) + p := binaryProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteByte(b, p, trans) + } +} + +func BenchmarkBinaryI16_1(b *testing.B) { + trans := tfv[1].GetTransport(nil) + p := binaryProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteI16(b, p, trans) + } +} + +func BenchmarkBinaryI32_1(b *testing.B) { + trans := tfv[1].GetTransport(nil) + p := binaryProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteI32(b, p, trans) + } +} +func BenchmarkBinaryI64_1(b *testing.B) { + trans := tfv[1].GetTransport(nil) + p := binaryProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteI64(b, p, trans) + } +} +func BenchmarkBinaryDouble_1(b *testing.B) { + trans := tfv[1].GetTransport(nil) + p := binaryProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteDouble(b, p, trans) + } +} +func BenchmarkBinaryString_1(b *testing.B) { + trans := tfv[1].GetTransport(nil) + p := binaryProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteString(b, p, trans) + } +} +func BenchmarkBinaryBinary_1(b *testing.B) { + trans := tfv[1].GetTransport(nil) + p := binaryProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteBinary(b, p, trans) + } +} + +func BenchmarkBinaryBool_2(b *testing.B) { + trans := tfv[2].GetTransport(nil) + p := binaryProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteBool(b, p, trans) + } +} + +func BenchmarkBinaryByte_2(b *testing.B) { + trans := tfv[2].GetTransport(nil) + p := binaryProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteByte(b, p, trans) + } +} + +func BenchmarkBinaryI16_2(b *testing.B) { + trans := tfv[2].GetTransport(nil) + p := binaryProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteI16(b, p, trans) + } +} + +func BenchmarkBinaryI32_2(b *testing.B) { + trans := tfv[2].GetTransport(nil) + p := binaryProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteI32(b, p, trans) + } +} +func BenchmarkBinaryI64_2(b *testing.B) { + trans := tfv[2].GetTransport(nil) + p := binaryProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteI64(b, p, trans) + } +} +func BenchmarkBinaryDouble_2(b *testing.B) { + trans := tfv[2].GetTransport(nil) + p := binaryProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteDouble(b, p, trans) + } +} +func BenchmarkBinaryString_2(b *testing.B) { + trans := tfv[2].GetTransport(nil) + p := binaryProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteString(b, p, trans) + } +} +func BenchmarkBinaryBinary_2(b *testing.B) { + trans := tfv[2].GetTransport(nil) + p := binaryProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteBinary(b, p, trans) + } +} + +func BenchmarkCompactBool_0(b *testing.B) { + trans := tfv[0].GetTransport(nil) + p := compactProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteBool(b, p, trans) + } +} + +func BenchmarkCompactByte_0(b *testing.B) { + trans := tfv[0].GetTransport(nil) + p := compactProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteByte(b, p, trans) + } +} + +func BenchmarkCompactI16_0(b *testing.B) { + trans := tfv[0].GetTransport(nil) + p := compactProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteI16(b, p, trans) + } +} + +func BenchmarkCompactI32_0(b *testing.B) { + trans := tfv[0].GetTransport(nil) + p := compactProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteI32(b, p, trans) + } +} +func BenchmarkCompactI64_0(b *testing.B) { + trans := tfv[0].GetTransport(nil) + p := compactProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteI64(b, p, trans) + } +} +func BenchmarkCompactDouble0(b *testing.B) { + trans := tfv[0].GetTransport(nil) + p := compactProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteDouble(b, p, trans) + } +} +func BenchmarkCompactString0(b *testing.B) { + trans := tfv[0].GetTransport(nil) + p := compactProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteString(b, p, trans) + } +} +func BenchmarkCompactBinary0(b *testing.B) { + trans := tfv[0].GetTransport(nil) + p := compactProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteBinary(b, p, trans) + } +} + +func BenchmarkCompactBool_1(b *testing.B) { + trans := tfv[1].GetTransport(nil) + p := compactProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteBool(b, p, trans) + } +} + +func BenchmarkCompactByte_1(b *testing.B) { + trans := tfv[1].GetTransport(nil) + p := compactProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteByte(b, p, trans) + } +} + +func BenchmarkCompactI16_1(b *testing.B) { + trans := tfv[1].GetTransport(nil) + p := compactProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteI16(b, p, trans) + } +} + +func BenchmarkCompactI32_1(b *testing.B) { + trans := tfv[1].GetTransport(nil) + p := compactProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteI32(b, p, trans) + } +} +func BenchmarkCompactI64_1(b *testing.B) { + trans := tfv[1].GetTransport(nil) + p := compactProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteI64(b, p, trans) + } +} +func BenchmarkCompactDouble1(b *testing.B) { + trans := tfv[1].GetTransport(nil) + p := compactProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteDouble(b, p, trans) + } +} +func BenchmarkCompactString1(b *testing.B) { + trans := tfv[1].GetTransport(nil) + p := compactProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteString(b, p, trans) + } +} +func BenchmarkCompactBinary1(b *testing.B) { + trans := tfv[1].GetTransport(nil) + p := compactProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteBinary(b, p, trans) + } +} + +func BenchmarkCompactBool_2(b *testing.B) { + trans := tfv[2].GetTransport(nil) + p := compactProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteBool(b, p, trans) + } +} + +func BenchmarkCompactByte_2(b *testing.B) { + trans := tfv[2].GetTransport(nil) + p := compactProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteByte(b, p, trans) + } +} + +func BenchmarkCompactI16_2(b *testing.B) { + trans := tfv[2].GetTransport(nil) + p := compactProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteI16(b, p, trans) + } +} + +func BenchmarkCompactI32_2(b *testing.B) { + trans := tfv[2].GetTransport(nil) + p := compactProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteI32(b, p, trans) + } +} +func BenchmarkCompactI64_2(b *testing.B) { + trans := tfv[2].GetTransport(nil) + p := compactProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteI64(b, p, trans) + } +} +func BenchmarkCompactDouble2(b *testing.B) { + trans := tfv[2].GetTransport(nil) + p := compactProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteDouble(b, p, trans) + } +} +func BenchmarkCompactString2(b *testing.B) { + trans := tfv[2].GetTransport(nil) + p := compactProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteString(b, p, trans) + } +} +func BenchmarkCompactBinary2(b *testing.B) { + trans := tfv[2].GetTransport(nil) + p := compactProtoF.GetProtocol(trans) + for i := 0; i < b.N; i++ { + ReadWriteBinary(b, p, trans) + } +} diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/memory_buffer.go b/vendor/github.com/apache/thrift/lib/go/thrift/memory_buffer.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/memory_buffer.go rename to vendor/github.com/apache/thrift/lib/go/thrift/memory_buffer.go diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/memory_buffer_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/memory_buffer_test.go new file mode 100644 index 0000000000000..af2e8bfe52224 --- /dev/null +++ b/vendor/github.com/apache/thrift/lib/go/thrift/memory_buffer_test.go @@ -0,0 +1,29 @@ +/* + * 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. + */ + +package thrift + +import ( + "testing" +) + +func TestMemoryBuffer(t *testing.T) { + trans := NewTMemoryBufferLen(1024) + TransportTest(t, trans, trans) +} diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/messagetype.go b/vendor/github.com/apache/thrift/lib/go/thrift/messagetype.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/messagetype.go rename to vendor/github.com/apache/thrift/lib/go/thrift/messagetype.go diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/multiplexed_protocol.go b/vendor/github.com/apache/thrift/lib/go/thrift/multiplexed_protocol.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/multiplexed_protocol.go rename to vendor/github.com/apache/thrift/lib/go/thrift/multiplexed_protocol.go diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/numeric.go b/vendor/github.com/apache/thrift/lib/go/thrift/numeric.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/numeric.go rename to vendor/github.com/apache/thrift/lib/go/thrift/numeric.go diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/pointerize.go b/vendor/github.com/apache/thrift/lib/go/thrift/pointerize.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/pointerize.go rename to vendor/github.com/apache/thrift/lib/go/thrift/pointerize.go diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/processor.go b/vendor/github.com/apache/thrift/lib/go/thrift/processor.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/processor.go rename to vendor/github.com/apache/thrift/lib/go/thrift/processor.go diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/processor_factory.go b/vendor/github.com/apache/thrift/lib/go/thrift/processor_factory.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/processor_factory.go rename to vendor/github.com/apache/thrift/lib/go/thrift/processor_factory.go diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/protocol.go b/vendor/github.com/apache/thrift/lib/go/thrift/protocol.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/protocol.go rename to vendor/github.com/apache/thrift/lib/go/thrift/protocol.go diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/protocol_exception.go b/vendor/github.com/apache/thrift/lib/go/thrift/protocol_exception.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/protocol_exception.go rename to vendor/github.com/apache/thrift/lib/go/thrift/protocol_exception.go diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/protocol_factory.go b/vendor/github.com/apache/thrift/lib/go/thrift/protocol_factory.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/protocol_factory.go rename to vendor/github.com/apache/thrift/lib/go/thrift/protocol_factory.go diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/protocol_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/protocol_test.go new file mode 100644 index 0000000000000..613eae6bc8846 --- /dev/null +++ b/vendor/github.com/apache/thrift/lib/go/thrift/protocol_test.go @@ -0,0 +1,479 @@ +/* + * 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. + */ + +package thrift + +import ( + "bytes" + "io/ioutil" + "math" + "net" + "net/http" + "testing" +) + +const PROTOCOL_BINARY_DATA_SIZE = 155 + +var ( + data string // test data for writing + protocol_bdata []byte // test data for writing; same as data + BOOL_VALUES []bool + BYTE_VALUES []int8 + INT16_VALUES []int16 + INT32_VALUES []int32 + INT64_VALUES []int64 + DOUBLE_VALUES []float64 + STRING_VALUES []string +) + +func init() { + protocol_bdata = make([]byte, PROTOCOL_BINARY_DATA_SIZE) + for i := 0; i < PROTOCOL_BINARY_DATA_SIZE; i++ { + protocol_bdata[i] = byte((i + 'a') % 255) + } + data = string(protocol_bdata) + BOOL_VALUES = []bool{false, true, false, false, true} + BYTE_VALUES = []int8{117, 0, 1, 32, 127, -128, -1} + INT16_VALUES = []int16{459, 0, 1, -1, -128, 127, 32767, -32768} + INT32_VALUES = []int32{459, 0, 1, -1, -128, 127, 32767, 2147483647, -2147483535} + INT64_VALUES = []int64{459, 0, 1, -1, -128, 127, 32767, 2147483647, -2147483535, 34359738481, -35184372088719, -9223372036854775808, 9223372036854775807} + DOUBLE_VALUES = []float64{459.3, 0.0, -1.0, 1.0, 0.5, 0.3333, 3.14159, 1.537e-38, 1.673e25, 6.02214179e23, -6.02214179e23, INFINITY.Float64(), NEGATIVE_INFINITY.Float64(), NAN.Float64()} + STRING_VALUES = []string{"", "a", "st[uf]f", "st,u:ff with spaces", "stuff\twith\nescape\\characters'...\"lots{of}fun"} +} + +type HTTPEchoServer struct{} +type HTTPHeaderEchoServer struct{} + +func (p *HTTPEchoServer) ServeHTTP(w http.ResponseWriter, req *http.Request) { + buf, err := ioutil.ReadAll(req.Body) + if err != nil { + w.WriteHeader(http.StatusBadRequest) + w.Write(buf) + } else { + w.WriteHeader(http.StatusOK) + w.Write(buf) + } +} + +func (p *HTTPHeaderEchoServer) ServeHTTP(w http.ResponseWriter, req *http.Request) { + buf, err := ioutil.ReadAll(req.Body) + if err != nil { + w.WriteHeader(http.StatusBadRequest) + w.Write(buf) + } else { + w.WriteHeader(http.StatusOK) + w.Write(buf) + } +} + +func HttpClientSetupForTest(t *testing.T) (net.Listener, net.Addr) { + addr, err := FindAvailableTCPServerPort(40000) + if err != nil { + t.Fatalf("Unable to find available tcp port addr: %s", err) + return nil, addr + } + l, err := net.Listen(addr.Network(), addr.String()) + if err != nil { + t.Fatalf("Unable to setup tcp listener on %s: %s", addr.String(), err) + return l, addr + } + go http.Serve(l, &HTTPEchoServer{}) + return l, addr +} + +func HttpClientSetupForHeaderTest(t *testing.T) (net.Listener, net.Addr) { + addr, err := FindAvailableTCPServerPort(40000) + if err != nil { + t.Fatalf("Unable to find available tcp port addr: %s", err) + return nil, addr + } + l, err := net.Listen(addr.Network(), addr.String()) + if err != nil { + t.Fatalf("Unable to setup tcp listener on %s: %s", addr.String(), err) + return l, addr + } + go http.Serve(l, &HTTPHeaderEchoServer{}) + return l, addr +} + +func ReadWriteProtocolTest(t *testing.T, protocolFactory TProtocolFactory) { + buf := bytes.NewBuffer(make([]byte, 0, 1024)) + l, addr := HttpClientSetupForTest(t) + defer l.Close() + transports := []TTransportFactory{ + NewTMemoryBufferTransportFactory(1024), + NewStreamTransportFactory(buf, buf, true), + NewTFramedTransportFactory(NewTMemoryBufferTransportFactory(1024)), + NewTHttpPostClientTransportFactory("http://" + addr.String()), + } + for _, tf := range transports { + trans := tf.GetTransport(nil) + p := protocolFactory.GetProtocol(trans) + ReadWriteBool(t, p, trans) + trans.Close() + } + for _, tf := range transports { + trans := tf.GetTransport(nil) + p := protocolFactory.GetProtocol(trans) + ReadWriteByte(t, p, trans) + trans.Close() + } + for _, tf := range transports { + trans := tf.GetTransport(nil) + p := protocolFactory.GetProtocol(trans) + ReadWriteI16(t, p, trans) + trans.Close() + } + for _, tf := range transports { + trans := tf.GetTransport(nil) + p := protocolFactory.GetProtocol(trans) + ReadWriteI32(t, p, trans) + trans.Close() + } + for _, tf := range transports { + trans := tf.GetTransport(nil) + p := protocolFactory.GetProtocol(trans) + ReadWriteI64(t, p, trans) + trans.Close() + } + for _, tf := range transports { + trans := tf.GetTransport(nil) + p := protocolFactory.GetProtocol(trans) + ReadWriteDouble(t, p, trans) + trans.Close() + } + for _, tf := range transports { + trans := tf.GetTransport(nil) + p := protocolFactory.GetProtocol(trans) + ReadWriteString(t, p, trans) + trans.Close() + } + for _, tf := range transports { + trans := tf.GetTransport(nil) + p := protocolFactory.GetProtocol(trans) + ReadWriteBinary(t, p, trans) + trans.Close() + } + for _, tf := range transports { + trans := tf.GetTransport(nil) + p := protocolFactory.GetProtocol(trans) + ReadWriteI64(t, p, trans) + ReadWriteDouble(t, p, trans) + ReadWriteBinary(t, p, trans) + ReadWriteByte(t, p, trans) + trans.Close() + } +} + +func ReadWriteBool(t testing.TB, p TProtocol, trans TTransport) { + thetype := TType(BOOL) + thelen := len(BOOL_VALUES) + err := p.WriteListBegin(thetype, thelen) + if err != nil { + t.Errorf("%s: %T %T %q Error writing list begin: %q", "ReadWriteBool", p, trans, err, thetype) + } + for k, v := range BOOL_VALUES { + err = p.WriteBool(v) + if err != nil { + t.Errorf("%s: %T %T %q Error writing bool in list at index %d: %q", "ReadWriteBool", p, trans, err, k, v) + } + } + p.WriteListEnd() + if err != nil { + t.Errorf("%s: %T %T %q Error writing list end: %q", "ReadWriteBool", p, trans, err, BOOL_VALUES) + } + p.Flush() + thetype2, thelen2, err := p.ReadListBegin() + if err != nil { + t.Errorf("%s: %T %T %q Error reading list: %q", "ReadWriteBool", p, trans, err, BOOL_VALUES) + } + _, ok := p.(*TSimpleJSONProtocol) + if !ok { + if thetype != thetype2 { + t.Errorf("%s: %T %T type %s != type %s", "ReadWriteBool", p, trans, thetype, thetype2) + } + if thelen != thelen2 { + t.Errorf("%s: %T %T len %s != len %s", "ReadWriteBool", p, trans, thelen, thelen2) + } + } + for k, v := range BOOL_VALUES { + value, err := p.ReadBool() + if err != nil { + t.Errorf("%s: %T %T %q Error reading bool at index %d: %q", "ReadWriteBool", p, trans, err, k, v) + } + if v != value { + t.Errorf("%s: index %d %q %q %q != %q", "ReadWriteBool", k, p, trans, v, value) + } + } + err = p.ReadListEnd() + if err != nil { + t.Errorf("%s: %T %T Unable to read list end: %q", "ReadWriteBool", p, trans, err) + } +} + +func ReadWriteByte(t testing.TB, p TProtocol, trans TTransport) { + thetype := TType(BYTE) + thelen := len(BYTE_VALUES) + err := p.WriteListBegin(thetype, thelen) + if err != nil { + t.Errorf("%s: %T %T %q Error writing list begin: %q", "ReadWriteByte", p, trans, err, thetype) + } + for k, v := range BYTE_VALUES { + err = p.WriteByte(v) + if err != nil { + t.Errorf("%s: %T %T %q Error writing byte in list at index %d: %q", "ReadWriteByte", p, trans, err, k, v) + } + } + err = p.WriteListEnd() + if err != nil { + t.Errorf("%s: %T %T %q Error writing list end: %q", "ReadWriteByte", p, trans, err, BYTE_VALUES) + } + err = p.Flush() + if err != nil { + t.Errorf("%s: %T %T %q Error flushing list of bytes: %q", "ReadWriteByte", p, trans, err, BYTE_VALUES) + } + thetype2, thelen2, err := p.ReadListBegin() + if err != nil { + t.Errorf("%s: %T %T %q Error reading list: %q", "ReadWriteByte", p, trans, err, BYTE_VALUES) + } + _, ok := p.(*TSimpleJSONProtocol) + if !ok { + if thetype != thetype2 { + t.Errorf("%s: %T %T type %s != type %s", "ReadWriteByte", p, trans, thetype, thetype2) + } + if thelen != thelen2 { + t.Errorf("%s: %T %T len %s != len %s", "ReadWriteByte", p, trans, thelen, thelen2) + } + } + for k, v := range BYTE_VALUES { + value, err := p.ReadByte() + if err != nil { + t.Errorf("%s: %T %T %q Error reading byte at index %d: %q", "ReadWriteByte", p, trans, err, k, v) + } + if v != value { + t.Errorf("%s: %T %T %d != %d", "ReadWriteByte", p, trans, v, value) + } + } + err = p.ReadListEnd() + if err != nil { + t.Errorf("%s: %T %T Unable to read list end: %q", "ReadWriteByte", p, trans, err) + } +} + +func ReadWriteI16(t testing.TB, p TProtocol, trans TTransport) { + thetype := TType(I16) + thelen := len(INT16_VALUES) + p.WriteListBegin(thetype, thelen) + for _, v := range INT16_VALUES { + p.WriteI16(v) + } + p.WriteListEnd() + p.Flush() + thetype2, thelen2, err := p.ReadListBegin() + if err != nil { + t.Errorf("%s: %T %T %q Error reading list: %q", "ReadWriteI16", p, trans, err, INT16_VALUES) + } + _, ok := p.(*TSimpleJSONProtocol) + if !ok { + if thetype != thetype2 { + t.Errorf("%s: %T %T type %s != type %s", "ReadWriteI16", p, trans, thetype, thetype2) + } + if thelen != thelen2 { + t.Errorf("%s: %T %T len %s != len %s", "ReadWriteI16", p, trans, thelen, thelen2) + } + } + for k, v := range INT16_VALUES { + value, err := p.ReadI16() + if err != nil { + t.Errorf("%s: %T %T %q Error reading int16 at index %d: %q", "ReadWriteI16", p, trans, err, k, v) + } + if v != value { + t.Errorf("%s: %T %T %d != %d", "ReadWriteI16", p, trans, v, value) + } + } + err = p.ReadListEnd() + if err != nil { + t.Errorf("%s: %T %T Unable to read list end: %q", "ReadWriteI16", p, trans, err) + } +} + +func ReadWriteI32(t testing.TB, p TProtocol, trans TTransport) { + thetype := TType(I32) + thelen := len(INT32_VALUES) + p.WriteListBegin(thetype, thelen) + for _, v := range INT32_VALUES { + p.WriteI32(v) + } + p.WriteListEnd() + p.Flush() + thetype2, thelen2, err := p.ReadListBegin() + if err != nil { + t.Errorf("%s: %T %T %q Error reading list: %q", "ReadWriteI32", p, trans, err, INT32_VALUES) + } + _, ok := p.(*TSimpleJSONProtocol) + if !ok { + if thetype != thetype2 { + t.Errorf("%s: %T %T type %s != type %s", "ReadWriteI32", p, trans, thetype, thetype2) + } + if thelen != thelen2 { + t.Errorf("%s: %T %T len %s != len %s", "ReadWriteI32", p, trans, thelen, thelen2) + } + } + for k, v := range INT32_VALUES { + value, err := p.ReadI32() + if err != nil { + t.Errorf("%s: %T %T %q Error reading int32 at index %d: %q", "ReadWriteI32", p, trans, err, k, v) + } + if v != value { + t.Errorf("%s: %T %T %d != %d", "ReadWriteI32", p, trans, v, value) + } + } + if err != nil { + t.Errorf("%s: %T %T Unable to read list end: %q", "ReadWriteI32", p, trans, err) + } +} + +func ReadWriteI64(t testing.TB, p TProtocol, trans TTransport) { + thetype := TType(I64) + thelen := len(INT64_VALUES) + p.WriteListBegin(thetype, thelen) + for _, v := range INT64_VALUES { + p.WriteI64(v) + } + p.WriteListEnd() + p.Flush() + thetype2, thelen2, err := p.ReadListBegin() + if err != nil { + t.Errorf("%s: %T %T %q Error reading list: %q", "ReadWriteI64", p, trans, err, INT64_VALUES) + } + _, ok := p.(*TSimpleJSONProtocol) + if !ok { + if thetype != thetype2 { + t.Errorf("%s: %T %T type %s != type %s", "ReadWriteI64", p, trans, thetype, thetype2) + } + if thelen != thelen2 { + t.Errorf("%s: %T %T len %s != len %s", "ReadWriteI64", p, trans, thelen, thelen2) + } + } + for k, v := range INT64_VALUES { + value, err := p.ReadI64() + if err != nil { + t.Errorf("%s: %T %T %q Error reading int64 at index %d: %q", "ReadWriteI64", p, trans, err, k, v) + } + if v != value { + t.Errorf("%s: %T %T %q != %q", "ReadWriteI64", p, trans, v, value) + } + } + if err != nil { + t.Errorf("%s: %T %T Unable to read list end: %q", "ReadWriteI64", p, trans, err) + } +} + +func ReadWriteDouble(t testing.TB, p TProtocol, trans TTransport) { + thetype := TType(DOUBLE) + thelen := len(DOUBLE_VALUES) + p.WriteListBegin(thetype, thelen) + for _, v := range DOUBLE_VALUES { + p.WriteDouble(v) + } + p.WriteListEnd() + p.Flush() + thetype2, thelen2, err := p.ReadListBegin() + if err != nil { + t.Errorf("%s: %T %T %q Error reading list: %q", "ReadWriteDouble", p, trans, err, DOUBLE_VALUES) + } + if thetype != thetype2 { + t.Errorf("%s: %T %T type %s != type %s", "ReadWriteDouble", p, trans, thetype, thetype2) + } + if thelen != thelen2 { + t.Errorf("%s: %T %T len %s != len %s", "ReadWriteDouble", p, trans, thelen, thelen2) + } + for k, v := range DOUBLE_VALUES { + value, err := p.ReadDouble() + if err != nil { + t.Errorf("%s: %T %T %q Error reading double at index %d: %q", "ReadWriteDouble", p, trans, err, k, v) + } + if math.IsNaN(v) { + if !math.IsNaN(value) { + t.Errorf("%s: %T %T math.IsNaN(%q) != math.IsNaN(%q)", "ReadWriteDouble", p, trans, v, value) + } + } else if v != value { + t.Errorf("%s: %T %T %v != %q", "ReadWriteDouble", p, trans, v, value) + } + } + err = p.ReadListEnd() + if err != nil { + t.Errorf("%s: %T %T Unable to read list end: %q", "ReadWriteDouble", p, trans, err) + } +} + +func ReadWriteString(t testing.TB, p TProtocol, trans TTransport) { + thetype := TType(STRING) + thelen := len(STRING_VALUES) + p.WriteListBegin(thetype, thelen) + for _, v := range STRING_VALUES { + p.WriteString(v) + } + p.WriteListEnd() + p.Flush() + thetype2, thelen2, err := p.ReadListBegin() + if err != nil { + t.Errorf("%s: %T %T %q Error reading list: %q", "ReadWriteString", p, trans, err, STRING_VALUES) + } + _, ok := p.(*TSimpleJSONProtocol) + if !ok { + if thetype != thetype2 { + t.Errorf("%s: %T %T type %s != type %s", "ReadWriteString", p, trans, thetype, thetype2) + } + if thelen != thelen2 { + t.Errorf("%s: %T %T len %s != len %s", "ReadWriteString", p, trans, thelen, thelen2) + } + } + for k, v := range STRING_VALUES { + value, err := p.ReadString() + if err != nil { + t.Errorf("%s: %T %T %q Error reading string at index %d: %q", "ReadWriteString", p, trans, err, k, v) + } + if v != value { + t.Errorf("%s: %T %T %d != %d", "ReadWriteString", p, trans, v, value) + } + } + if err != nil { + t.Errorf("%s: %T %T Unable to read list end: %q", "ReadWriteString", p, trans, err) + } +} + +func ReadWriteBinary(t testing.TB, p TProtocol, trans TTransport) { + v := protocol_bdata + p.WriteBinary(v) + p.Flush() + value, err := p.ReadBinary() + if err != nil { + t.Errorf("%s: %T %T Unable to read binary: %s", "ReadWriteBinary", p, trans, err.Error()) + } + if len(v) != len(value) { + t.Errorf("%s: %T %T len(v) != len(value)... %d != %d", "ReadWriteBinary", p, trans, len(v), len(value)) + } else { + for i := 0; i < len(v); i++ { + if v[i] != value[i] { + t.Errorf("%s: %T %T %s != %s", "ReadWriteBinary", p, trans, v, value) + } + } + } +} diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/rich_transport.go b/vendor/github.com/apache/thrift/lib/go/thrift/rich_transport.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/rich_transport.go rename to vendor/github.com/apache/thrift/lib/go/thrift/rich_transport.go diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/rich_transport_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/rich_transport_test.go new file mode 100644 index 0000000000000..41513f812b7f6 --- /dev/null +++ b/vendor/github.com/apache/thrift/lib/go/thrift/rich_transport_test.go @@ -0,0 +1,85 @@ +/* + * 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. + */ + +package thrift + +import ( + "bytes" + "errors" + "io" + "reflect" + "testing" +) + +func TestEnsureTransportsAreRich(t *testing.T) { + buf := bytes.NewBuffer(make([]byte, 0, 1024)) + + transports := []TTransportFactory{ + NewTMemoryBufferTransportFactory(1024), + NewStreamTransportFactory(buf, buf, true), + NewTFramedTransportFactory(NewTMemoryBufferTransportFactory(1024)), + NewTHttpPostClientTransportFactory("http://127.0.0.1"), + } + for _, tf := range transports { + trans := tf.GetTransport(nil) + _, ok := trans.(TRichTransport) + if !ok { + t.Errorf("Transport %s does not implement TRichTransport interface", reflect.ValueOf(trans)) + } + } +} + +// TestReadByte tests whether readByte handles error cases correctly. +func TestReadByte(t *testing.T) { + for i, test := range readByteTests { + v, err := readByte(test.r) + if v != test.v { + t.Fatalf("TestReadByte %d: value differs. Expected %d, got %d", i, test.v, test.r.v) + } + if err != test.err { + t.Fatalf("TestReadByte %d: error differs. Expected %s, got %s", i, test.err, test.r.err) + } + } +} + +var someError = errors.New("Some error") +var readByteTests = []struct { + r *mockReader + v byte + err error +}{ + {&mockReader{0, 55, io.EOF}, 0, io.EOF}, // reader sends EOF w/o data + {&mockReader{0, 55, someError}, 0, someError}, // reader sends some other error + {&mockReader{1, 55, nil}, 55, nil}, // reader sends data w/o error + {&mockReader{1, 55, io.EOF}, 55, nil}, // reader sends data with EOF + {&mockReader{1, 55, someError}, 55, someError}, // reader sends data withsome error +} + +type mockReader struct { + n int + v byte + err error +} + +func (r *mockReader) Read(p []byte) (n int, err error) { + if r.n > 0 { + p[0] = r.v + } + return r.n, r.err +} diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/serializer.go b/vendor/github.com/apache/thrift/lib/go/thrift/serializer.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/serializer.go rename to vendor/github.com/apache/thrift/lib/go/thrift/serializer.go diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/serializer_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/serializer_test.go new file mode 100644 index 0000000000000..06d27a16b7bb6 --- /dev/null +++ b/vendor/github.com/apache/thrift/lib/go/thrift/serializer_test.go @@ -0,0 +1,169 @@ +/* + * 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. + */ + +package thrift + +import ( + "errors" + "fmt" + "testing" +) + +type ProtocolFactory interface { + GetProtocol(t TTransport) TProtocol +} + +func compareStructs(m, m1 MyTestStruct) (bool, error) { + switch { + case m.On != m1.On: + return false, errors.New("Boolean not equal") + case m.B != m1.B: + return false, errors.New("Byte not equal") + case m.Int16 != m1.Int16: + return false, errors.New("Int16 not equal") + case m.Int32 != m1.Int32: + return false, errors.New("Int32 not equal") + case m.Int64 != m1.Int64: + return false, errors.New("Int64 not equal") + case m.D != m1.D: + return false, errors.New("Double not equal") + case m.St != m1.St: + return false, errors.New("String not equal") + + case len(m.Bin) != len(m1.Bin): + return false, errors.New("Binary size not equal") + case len(m.Bin) == len(m1.Bin): + for i := range m.Bin { + if m.Bin[i] != m1.Bin[i] { + return false, errors.New("Binary not equal") + } + } + case len(m.StringMap) != len(m1.StringMap): + return false, errors.New("StringMap size not equal") + case len(m.StringList) != len(m1.StringList): + return false, errors.New("StringList size not equal") + case len(m.StringSet) != len(m1.StringSet): + return false, errors.New("StringSet size not equal") + + case m.E != m1.E: + return false, errors.New("MyTestEnum not equal") + + default: + return true, nil + + } + return true, nil +} + +func ProtocolTest1(test *testing.T, pf ProtocolFactory) (bool, error) { + t := NewTSerializer() + t.Protocol = pf.GetProtocol(t.Transport) + var m = MyTestStruct{} + m.On = true + m.B = int8(0) + m.Int16 = 1 + m.Int32 = 2 + m.Int64 = 3 + m.D = 4.1 + m.St = "Test" + m.Bin = make([]byte, 10) + m.StringMap = make(map[string]string, 5) + m.StringList = make([]string, 5) + m.StringSet = make(map[string]struct{}, 5) + m.E = 2 + + s, err := t.WriteString(&m) + if err != nil { + return false, errors.New(fmt.Sprintf("Unable to Serialize struct\n\t %s", err)) + } + + t1 := NewTDeserializer() + t1.Protocol = pf.GetProtocol(t1.Transport) + var m1 = MyTestStruct{} + if err = t1.ReadString(&m1, s); err != nil { + return false, errors.New(fmt.Sprintf("Unable to Deserialize struct\n\t %s", err)) + + } + + return compareStructs(m, m1) + +} + +func ProtocolTest2(test *testing.T, pf ProtocolFactory) (bool, error) { + t := NewTSerializer() + t.Protocol = pf.GetProtocol(t.Transport) + var m = MyTestStruct{} + m.On = false + m.B = int8(0) + m.Int16 = 1 + m.Int32 = 2 + m.Int64 = 3 + m.D = 4.1 + m.St = "Test" + m.Bin = make([]byte, 10) + m.StringMap = make(map[string]string, 5) + m.StringList = make([]string, 5) + m.StringSet = make(map[string]struct{}, 5) + m.E = 2 + + s, err := t.WriteString(&m) + if err != nil { + return false, errors.New(fmt.Sprintf("Unable to Serialize struct\n\t %s", err)) + + } + + t1 := NewTDeserializer() + t1.Protocol = pf.GetProtocol(t1.Transport) + var m1 = MyTestStruct{} + if err = t1.ReadString(&m1, s); err != nil { + return false, errors.New(fmt.Sprintf("Unable to Deserialize struct\n\t %s", err)) + + } + + return compareStructs(m, m1) + +} + +func TestSerializer(t *testing.T) { + + var protocol_factories map[string]ProtocolFactory + protocol_factories = make(map[string]ProtocolFactory) + protocol_factories["Binary"] = NewTBinaryProtocolFactoryDefault() + protocol_factories["Compact"] = NewTCompactProtocolFactory() + //protocol_factories["SimpleJSON"] = NewTSimpleJSONProtocolFactory() - write only, can't be read back by design + protocol_factories["JSON"] = NewTJSONProtocolFactory() + + var tests map[string]func(*testing.T, ProtocolFactory) (bool, error) + tests = make(map[string]func(*testing.T, ProtocolFactory) (bool, error)) + tests["Test 1"] = ProtocolTest1 + tests["Test 2"] = ProtocolTest2 + //tests["Test 3"] = ProtocolTest3 // Example of how to add additional tests + + for name, pf := range protocol_factories { + + for test, f := range tests { + + if s, err := f(t, pf); !s || err != nil { + t.Errorf("%s Failed for %s protocol\n\t %s", test, name, err) + } + + } + } + +} diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/serializer_types_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/serializer_types_test.go new file mode 100644 index 0000000000000..38ab8d6d60052 --- /dev/null +++ b/vendor/github.com/apache/thrift/lib/go/thrift/serializer_types_test.go @@ -0,0 +1,633 @@ +/* + * 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. + */ + +package thrift + +// Autogenerated by Thrift Compiler (1.0.0-dev) +// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + +/* THE FOLLOWING THRIFT FILE WAS USED TO CREATE THIS + +enum MyTestEnum { + FIRST = 1, + SECOND = 2, + THIRD = 3, + FOURTH = 4, +} + +struct MyTestStruct { + 1: bool on, + 2: byte b, + 3: i16 int16, + 4: i32 int32, + 5: i64 int64, + 6: double d, + 7: string st, + 8: binary bin, + 9: map stringMap, + 10: list stringList, + 11: set stringSet, + 12: MyTestEnum e, +} +*/ + +import ( + "fmt" +) + +// (needed to ensure safety because of naive import list construction.) +var _ = ZERO +var _ = fmt.Printf + +var GoUnusedProtection__ int + +type MyTestEnum int64 + +const ( + MyTestEnum_FIRST MyTestEnum = 1 + MyTestEnum_SECOND MyTestEnum = 2 + MyTestEnum_THIRD MyTestEnum = 3 + MyTestEnum_FOURTH MyTestEnum = 4 +) + +func (p MyTestEnum) String() string { + switch p { + case MyTestEnum_FIRST: + return "FIRST" + case MyTestEnum_SECOND: + return "SECOND" + case MyTestEnum_THIRD: + return "THIRD" + case MyTestEnum_FOURTH: + return "FOURTH" + } + return "" +} + +func MyTestEnumFromString(s string) (MyTestEnum, error) { + switch s { + case "FIRST": + return MyTestEnum_FIRST, nil + case "SECOND": + return MyTestEnum_SECOND, nil + case "THIRD": + return MyTestEnum_THIRD, nil + case "FOURTH": + return MyTestEnum_FOURTH, nil + } + return MyTestEnum(0), fmt.Errorf("not a valid MyTestEnum string") +} + +func MyTestEnumPtr(v MyTestEnum) *MyTestEnum { return &v } + +type MyTestStruct struct { + On bool `thrift:"on,1" json:"on"` + B int8 `thrift:"b,2" json:"b"` + Int16 int16 `thrift:"int16,3" json:"int16"` + Int32 int32 `thrift:"int32,4" json:"int32"` + Int64 int64 `thrift:"int64,5" json:"int64"` + D float64 `thrift:"d,6" json:"d"` + St string `thrift:"st,7" json:"st"` + Bin []byte `thrift:"bin,8" json:"bin"` + StringMap map[string]string `thrift:"stringMap,9" json:"stringMap"` + StringList []string `thrift:"stringList,10" json:"stringList"` + StringSet map[string]struct{} `thrift:"stringSet,11" json:"stringSet"` + E MyTestEnum `thrift:"e,12" json:"e"` +} + +func NewMyTestStruct() *MyTestStruct { + return &MyTestStruct{} +} + +func (p *MyTestStruct) GetOn() bool { + return p.On +} + +func (p *MyTestStruct) GetB() int8 { + return p.B +} + +func (p *MyTestStruct) GetInt16() int16 { + return p.Int16 +} + +func (p *MyTestStruct) GetInt32() int32 { + return p.Int32 +} + +func (p *MyTestStruct) GetInt64() int64 { + return p.Int64 +} + +func (p *MyTestStruct) GetD() float64 { + return p.D +} + +func (p *MyTestStruct) GetSt() string { + return p.St +} + +func (p *MyTestStruct) GetBin() []byte { + return p.Bin +} + +func (p *MyTestStruct) GetStringMap() map[string]string { + return p.StringMap +} + +func (p *MyTestStruct) GetStringList() []string { + return p.StringList +} + +func (p *MyTestStruct) GetStringSet() map[string]struct{} { + return p.StringSet +} + +func (p *MyTestStruct) GetE() MyTestEnum { + return p.E +} +func (p *MyTestStruct) Read(iprot TProtocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return PrependError(fmt.Sprintf("%T read error: ", p), err) + } + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == STOP { + break + } + switch fieldId { + case 1: + if err := p.readField1(iprot); err != nil { + return err + } + case 2: + if err := p.readField2(iprot); err != nil { + return err + } + case 3: + if err := p.readField3(iprot); err != nil { + return err + } + case 4: + if err := p.readField4(iprot); err != nil { + return err + } + case 5: + if err := p.readField5(iprot); err != nil { + return err + } + case 6: + if err := p.readField6(iprot); err != nil { + return err + } + case 7: + if err := p.readField7(iprot); err != nil { + return err + } + case 8: + if err := p.readField8(iprot); err != nil { + return err + } + case 9: + if err := p.readField9(iprot); err != nil { + return err + } + case 10: + if err := p.readField10(iprot); err != nil { + return err + } + case 11: + if err := p.readField11(iprot); err != nil { + return err + } + case 12: + if err := p.readField12(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *MyTestStruct) readField1(iprot TProtocol) error { + if v, err := iprot.ReadBool(); err != nil { + return PrependError("error reading field 1: ", err) + } else { + p.On = v + } + return nil +} + +func (p *MyTestStruct) readField2(iprot TProtocol) error { + if v, err := iprot.ReadByte(); err != nil { + return PrependError("error reading field 2: ", err) + } else { + temp := int8(v) + p.B = temp + } + return nil +} + +func (p *MyTestStruct) readField3(iprot TProtocol) error { + if v, err := iprot.ReadI16(); err != nil { + return PrependError("error reading field 3: ", err) + } else { + p.Int16 = v + } + return nil +} + +func (p *MyTestStruct) readField4(iprot TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { + return PrependError("error reading field 4: ", err) + } else { + p.Int32 = v + } + return nil +} + +func (p *MyTestStruct) readField5(iprot TProtocol) error { + if v, err := iprot.ReadI64(); err != nil { + return PrependError("error reading field 5: ", err) + } else { + p.Int64 = v + } + return nil +} + +func (p *MyTestStruct) readField6(iprot TProtocol) error { + if v, err := iprot.ReadDouble(); err != nil { + return PrependError("error reading field 6: ", err) + } else { + p.D = v + } + return nil +} + +func (p *MyTestStruct) readField7(iprot TProtocol) error { + if v, err := iprot.ReadString(); err != nil { + return PrependError("error reading field 7: ", err) + } else { + p.St = v + } + return nil +} + +func (p *MyTestStruct) readField8(iprot TProtocol) error { + if v, err := iprot.ReadBinary(); err != nil { + return PrependError("error reading field 8: ", err) + } else { + p.Bin = v + } + return nil +} + +func (p *MyTestStruct) readField9(iprot TProtocol) error { + _, _, size, err := iprot.ReadMapBegin() + if err != nil { + return PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.StringMap = tMap + for i := 0; i < size; i++ { + var _key0 string + if v, err := iprot.ReadString(); err != nil { + return PrependError("error reading field 0: ", err) + } else { + _key0 = v + } + var _val1 string + if v, err := iprot.ReadString(); err != nil { + return PrependError("error reading field 0: ", err) + } else { + _val1 = v + } + p.StringMap[_key0] = _val1 + } + if err := iprot.ReadMapEnd(); err != nil { + return PrependError("error reading map end: ", err) + } + return nil +} + +func (p *MyTestStruct) readField10(iprot TProtocol) error { + _, size, err := iprot.ReadListBegin() + if err != nil { + return PrependError("error reading list begin: ", err) + } + tSlice := make([]string, 0, size) + p.StringList = tSlice + for i := 0; i < size; i++ { + var _elem2 string + if v, err := iprot.ReadString(); err != nil { + return PrependError("error reading field 0: ", err) + } else { + _elem2 = v + } + p.StringList = append(p.StringList, _elem2) + } + if err := iprot.ReadListEnd(); err != nil { + return PrependError("error reading list end: ", err) + } + return nil +} + +func (p *MyTestStruct) readField11(iprot TProtocol) error { + _, size, err := iprot.ReadSetBegin() + if err != nil { + return PrependError("error reading set begin: ", err) + } + tSet := make(map[string]struct{}, size) + p.StringSet = tSet + for i := 0; i < size; i++ { + var _elem3 string + if v, err := iprot.ReadString(); err != nil { + return PrependError("error reading field 0: ", err) + } else { + _elem3 = v + } + p.StringSet[_elem3] = struct{}{} + } + if err := iprot.ReadSetEnd(); err != nil { + return PrependError("error reading set end: ", err) + } + return nil +} + +func (p *MyTestStruct) readField12(iprot TProtocol) error { + if v, err := iprot.ReadI32(); err != nil { + return PrependError("error reading field 12: ", err) + } else { + temp := MyTestEnum(v) + p.E = temp + } + return nil +} + +func (p *MyTestStruct) Write(oprot TProtocol) error { + if err := oprot.WriteStructBegin("MyTestStruct"); err != nil { + return PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) + } + if err := p.writeField1(oprot); err != nil { + return err + } + if err := p.writeField2(oprot); err != nil { + return err + } + if err := p.writeField3(oprot); err != nil { + return err + } + if err := p.writeField4(oprot); err != nil { + return err + } + if err := p.writeField5(oprot); err != nil { + return err + } + if err := p.writeField6(oprot); err != nil { + return err + } + if err := p.writeField7(oprot); err != nil { + return err + } + if err := p.writeField8(oprot); err != nil { + return err + } + if err := p.writeField9(oprot); err != nil { + return err + } + if err := p.writeField10(oprot); err != nil { + return err + } + if err := p.writeField11(oprot); err != nil { + return err + } + if err := p.writeField12(oprot); err != nil { + return err + } + if err := oprot.WriteFieldStop(); err != nil { + return PrependError("write field stop error: ", err) + } + if err := oprot.WriteStructEnd(); err != nil { + return PrependError("write struct stop error: ", err) + } + return nil +} + +func (p *MyTestStruct) writeField1(oprot TProtocol) (err error) { + if err := oprot.WriteFieldBegin("on", BOOL, 1); err != nil { + return PrependError(fmt.Sprintf("%T write field begin error 1:on: ", p), err) + } + if err := oprot.WriteBool(bool(p.On)); err != nil { + return PrependError(fmt.Sprintf("%T.on (1) field write error: ", p), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return PrependError(fmt.Sprintf("%T write field end error 1:on: ", p), err) + } + return err +} + +func (p *MyTestStruct) writeField2(oprot TProtocol) (err error) { + if err := oprot.WriteFieldBegin("b", BYTE, 2); err != nil { + return PrependError(fmt.Sprintf("%T write field begin error 2:b: ", p), err) + } + if err := oprot.WriteByte(int8(p.B)); err != nil { + return PrependError(fmt.Sprintf("%T.b (2) field write error: ", p), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return PrependError(fmt.Sprintf("%T write field end error 2:b: ", p), err) + } + return err +} + +func (p *MyTestStruct) writeField3(oprot TProtocol) (err error) { + if err := oprot.WriteFieldBegin("int16", I16, 3); err != nil { + return PrependError(fmt.Sprintf("%T write field begin error 3:int16: ", p), err) + } + if err := oprot.WriteI16(int16(p.Int16)); err != nil { + return PrependError(fmt.Sprintf("%T.int16 (3) field write error: ", p), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return PrependError(fmt.Sprintf("%T write field end error 3:int16: ", p), err) + } + return err +} + +func (p *MyTestStruct) writeField4(oprot TProtocol) (err error) { + if err := oprot.WriteFieldBegin("int32", I32, 4); err != nil { + return PrependError(fmt.Sprintf("%T write field begin error 4:int32: ", p), err) + } + if err := oprot.WriteI32(int32(p.Int32)); err != nil { + return PrependError(fmt.Sprintf("%T.int32 (4) field write error: ", p), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return PrependError(fmt.Sprintf("%T write field end error 4:int32: ", p), err) + } + return err +} + +func (p *MyTestStruct) writeField5(oprot TProtocol) (err error) { + if err := oprot.WriteFieldBegin("int64", I64, 5); err != nil { + return PrependError(fmt.Sprintf("%T write field begin error 5:int64: ", p), err) + } + if err := oprot.WriteI64(int64(p.Int64)); err != nil { + return PrependError(fmt.Sprintf("%T.int64 (5) field write error: ", p), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return PrependError(fmt.Sprintf("%T write field end error 5:int64: ", p), err) + } + return err +} + +func (p *MyTestStruct) writeField6(oprot TProtocol) (err error) { + if err := oprot.WriteFieldBegin("d", DOUBLE, 6); err != nil { + return PrependError(fmt.Sprintf("%T write field begin error 6:d: ", p), err) + } + if err := oprot.WriteDouble(float64(p.D)); err != nil { + return PrependError(fmt.Sprintf("%T.d (6) field write error: ", p), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return PrependError(fmt.Sprintf("%T write field end error 6:d: ", p), err) + } + return err +} + +func (p *MyTestStruct) writeField7(oprot TProtocol) (err error) { + if err := oprot.WriteFieldBegin("st", STRING, 7); err != nil { + return PrependError(fmt.Sprintf("%T write field begin error 7:st: ", p), err) + } + if err := oprot.WriteString(string(p.St)); err != nil { + return PrependError(fmt.Sprintf("%T.st (7) field write error: ", p), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return PrependError(fmt.Sprintf("%T write field end error 7:st: ", p), err) + } + return err +} + +func (p *MyTestStruct) writeField8(oprot TProtocol) (err error) { + if err := oprot.WriteFieldBegin("bin", STRING, 8); err != nil { + return PrependError(fmt.Sprintf("%T write field begin error 8:bin: ", p), err) + } + if err := oprot.WriteBinary(p.Bin); err != nil { + return PrependError(fmt.Sprintf("%T.bin (8) field write error: ", p), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return PrependError(fmt.Sprintf("%T write field end error 8:bin: ", p), err) + } + return err +} + +func (p *MyTestStruct) writeField9(oprot TProtocol) (err error) { + if err := oprot.WriteFieldBegin("stringMap", MAP, 9); err != nil { + return PrependError(fmt.Sprintf("%T write field begin error 9:stringMap: ", p), err) + } + if err := oprot.WriteMapBegin(STRING, STRING, len(p.StringMap)); err != nil { + return PrependError("error writing map begin: ", err) + } + for k, v := range p.StringMap { + if err := oprot.WriteString(string(k)); err != nil { + return PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) + } + if err := oprot.WriteString(string(v)); err != nil { + return PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) + } + } + if err := oprot.WriteMapEnd(); err != nil { + return PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return PrependError(fmt.Sprintf("%T write field end error 9:stringMap: ", p), err) + } + return err +} + +func (p *MyTestStruct) writeField10(oprot TProtocol) (err error) { + if err := oprot.WriteFieldBegin("stringList", LIST, 10); err != nil { + return PrependError(fmt.Sprintf("%T write field begin error 10:stringList: ", p), err) + } + if err := oprot.WriteListBegin(STRING, len(p.StringList)); err != nil { + return PrependError("error writing list begin: ", err) + } + for _, v := range p.StringList { + if err := oprot.WriteString(string(v)); err != nil { + return PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) + } + } + if err := oprot.WriteListEnd(); err != nil { + return PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return PrependError(fmt.Sprintf("%T write field end error 10:stringList: ", p), err) + } + return err +} + +func (p *MyTestStruct) writeField11(oprot TProtocol) (err error) { + if err := oprot.WriteFieldBegin("stringSet", SET, 11); err != nil { + return PrependError(fmt.Sprintf("%T write field begin error 11:stringSet: ", p), err) + } + if err := oprot.WriteSetBegin(STRING, len(p.StringSet)); err != nil { + return PrependError("error writing set begin: ", err) + } + for v, _ := range p.StringSet { + if err := oprot.WriteString(string(v)); err != nil { + return PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) + } + } + if err := oprot.WriteSetEnd(); err != nil { + return PrependError("error writing set end: ", err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return PrependError(fmt.Sprintf("%T write field end error 11:stringSet: ", p), err) + } + return err +} + +func (p *MyTestStruct) writeField12(oprot TProtocol) (err error) { + if err := oprot.WriteFieldBegin("e", I32, 12); err != nil { + return PrependError(fmt.Sprintf("%T write field begin error 12:e: ", p), err) + } + if err := oprot.WriteI32(int32(p.E)); err != nil { + return PrependError(fmt.Sprintf("%T.e (12) field write error: ", p), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return PrependError(fmt.Sprintf("%T write field end error 12:e: ", p), err) + } + return err +} + +func (p *MyTestStruct) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("MyTestStruct(%+v)", *p) +} diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/server.go b/vendor/github.com/apache/thrift/lib/go/thrift/server.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/server.go rename to vendor/github.com/apache/thrift/lib/go/thrift/server.go diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/server_socket.go b/vendor/github.com/apache/thrift/lib/go/thrift/server_socket.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/server_socket.go rename to vendor/github.com/apache/thrift/lib/go/thrift/server_socket.go diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/server_socket_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/server_socket_test.go new file mode 100644 index 0000000000000..f08e8e900de76 --- /dev/null +++ b/vendor/github.com/apache/thrift/lib/go/thrift/server_socket_test.go @@ -0,0 +1,50 @@ +/* + * 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. + */ + +package thrift + +import ( + "fmt" + "testing" +) + +func TestSocketIsntListeningAfterInterrupt(t *testing.T) { + host := "127.0.0.1" + port := 9090 + addr := fmt.Sprintf("%s:%d", host, port) + + socket := CreateServerSocket(t, addr) + socket.Listen() + socket.Interrupt() + + newSocket := CreateServerSocket(t, addr) + err := newSocket.Listen() + defer newSocket.Interrupt() + if err != nil { + t.Fatalf("Failed to rebinds: %s", err) + } +} + +func CreateServerSocket(t *testing.T, addr string) *TServerSocket { + socket, err := NewTServerSocket(addr) + if err != nil { + t.Fatalf("Failed to create server socket: %s", err) + } + return socket +} diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/server_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/server_test.go new file mode 100644 index 0000000000000..ffaf457027d31 --- /dev/null +++ b/vendor/github.com/apache/thrift/lib/go/thrift/server_test.go @@ -0,0 +1,28 @@ +/* + * 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. + */ + +package thrift + +import ( + "testing" +) + +func TestNothing(t *testing.T) { + +} diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/server_transport.go b/vendor/github.com/apache/thrift/lib/go/thrift/server_transport.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/server_transport.go rename to vendor/github.com/apache/thrift/lib/go/thrift/server_transport.go diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/simple_json_protocol.go b/vendor/github.com/apache/thrift/lib/go/thrift/simple_json_protocol.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/simple_json_protocol.go rename to vendor/github.com/apache/thrift/lib/go/thrift/simple_json_protocol.go diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/simple_json_protocol_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/simple_json_protocol_test.go new file mode 100644 index 0000000000000..8f0dcc9dfe26d --- /dev/null +++ b/vendor/github.com/apache/thrift/lib/go/thrift/simple_json_protocol_test.go @@ -0,0 +1,715 @@ +/* + * 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. + */ + +package thrift + +import ( + "encoding/base64" + "encoding/json" + "fmt" + "math" + "strconv" + "strings" + "testing" +) + +func TestWriteSimpleJSONProtocolBool(t *testing.T) { + thetype := "boolean" + trans := NewTMemoryBuffer() + p := NewTSimpleJSONProtocol(trans) + for _, value := range BOOL_VALUES { + if e := p.WriteBool(value); e != nil { + t.Fatalf("Unable to write %s value %v due to error: %s", thetype, value, e.Error()) + } + if e := p.Flush(); e != nil { + t.Fatalf("Unable to write %s value %v due to error flushing: %s", thetype, value, e.Error()) + } + s := trans.String() + if s != fmt.Sprint(value) { + t.Fatalf("Bad value for %s %v: %s", thetype, value, s) + } + v := false + if err := json.Unmarshal([]byte(s), &v); err != nil || v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, v) + } + trans.Reset() + } + trans.Close() +} + +func TestReadSimpleJSONProtocolBool(t *testing.T) { + thetype := "boolean" + for _, value := range BOOL_VALUES { + trans := NewTMemoryBuffer() + p := NewTSimpleJSONProtocol(trans) + if value { + trans.Write(JSON_TRUE) + } else { + trans.Write(JSON_FALSE) + } + trans.Flush() + s := trans.String() + v, e := p.ReadBool() + if e != nil { + t.Fatalf("Unable to read %s value %v due to error: %s", thetype, value, e.Error()) + } + if v != value { + t.Fatalf("Bad value for %s value %v, wrote: %v, received: %v", thetype, value, s, v) + } + if err := json.Unmarshal([]byte(s), &v); err != nil || v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, v) + } + trans.Reset() + trans.Close() + } +} + +func TestWriteSimpleJSONProtocolByte(t *testing.T) { + thetype := "byte" + trans := NewTMemoryBuffer() + p := NewTSimpleJSONProtocol(trans) + for _, value := range BYTE_VALUES { + if e := p.WriteByte(value); e != nil { + t.Fatalf("Unable to write %s value %v due to error: %s", thetype, value, e.Error()) + } + if e := p.Flush(); e != nil { + t.Fatalf("Unable to write %s value %v due to error flushing: %s", thetype, value, e.Error()) + } + s := trans.String() + if s != fmt.Sprint(value) { + t.Fatalf("Bad value for %s %v: %s", thetype, value, s) + } + v := int8(0) + if err := json.Unmarshal([]byte(s), &v); err != nil || v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, v) + } + trans.Reset() + } + trans.Close() +} + +func TestReadSimpleJSONProtocolByte(t *testing.T) { + thetype := "byte" + for _, value := range BYTE_VALUES { + trans := NewTMemoryBuffer() + p := NewTSimpleJSONProtocol(trans) + trans.WriteString(strconv.Itoa(int(value))) + trans.Flush() + s := trans.String() + v, e := p.ReadByte() + if e != nil { + t.Fatalf("Unable to read %s value %v due to error: %s", thetype, value, e.Error()) + } + if v != value { + t.Fatalf("Bad value for %s value %v, wrote: %v, received: %v", thetype, value, s, v) + } + if err := json.Unmarshal([]byte(s), &v); err != nil || v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, v) + } + trans.Reset() + trans.Close() + } +} + +func TestWriteSimpleJSONProtocolI16(t *testing.T) { + thetype := "int16" + trans := NewTMemoryBuffer() + p := NewTSimpleJSONProtocol(trans) + for _, value := range INT16_VALUES { + if e := p.WriteI16(value); e != nil { + t.Fatalf("Unable to write %s value %v due to error: %s", thetype, value, e.Error()) + } + if e := p.Flush(); e != nil { + t.Fatalf("Unable to write %s value %v due to error flushing: %s", thetype, value, e.Error()) + } + s := trans.String() + if s != fmt.Sprint(value) { + t.Fatalf("Bad value for %s %v: %s", thetype, value, s) + } + v := int16(0) + if err := json.Unmarshal([]byte(s), &v); err != nil || v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, v) + } + trans.Reset() + } + trans.Close() +} + +func TestReadSimpleJSONProtocolI16(t *testing.T) { + thetype := "int16" + for _, value := range INT16_VALUES { + trans := NewTMemoryBuffer() + p := NewTSimpleJSONProtocol(trans) + trans.WriteString(strconv.Itoa(int(value))) + trans.Flush() + s := trans.String() + v, e := p.ReadI16() + if e != nil { + t.Fatalf("Unable to read %s value %v due to error: %s", thetype, value, e.Error()) + } + if v != value { + t.Fatalf("Bad value for %s value %v, wrote: %v, received: %v", thetype, value, s, v) + } + if err := json.Unmarshal([]byte(s), &v); err != nil || v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, v) + } + trans.Reset() + trans.Close() + } +} + +func TestWriteSimpleJSONProtocolI32(t *testing.T) { + thetype := "int32" + trans := NewTMemoryBuffer() + p := NewTSimpleJSONProtocol(trans) + for _, value := range INT32_VALUES { + if e := p.WriteI32(value); e != nil { + t.Fatalf("Unable to write %s value %v due to error: %s", thetype, value, e.Error()) + } + if e := p.Flush(); e != nil { + t.Fatalf("Unable to write %s value %v due to error flushing: %s", thetype, value, e.Error()) + } + s := trans.String() + if s != fmt.Sprint(value) { + t.Fatalf("Bad value for %s %v: %s", thetype, value, s) + } + v := int32(0) + if err := json.Unmarshal([]byte(s), &v); err != nil || v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, v) + } + trans.Reset() + } + trans.Close() +} + +func TestReadSimpleJSONProtocolI32(t *testing.T) { + thetype := "int32" + for _, value := range INT32_VALUES { + trans := NewTMemoryBuffer() + p := NewTSimpleJSONProtocol(trans) + trans.WriteString(strconv.Itoa(int(value))) + trans.Flush() + s := trans.String() + v, e := p.ReadI32() + if e != nil { + t.Fatalf("Unable to read %s value %v due to error: %s", thetype, value, e.Error()) + } + if v != value { + t.Fatalf("Bad value for %s value %v, wrote: %v, received: %v", thetype, value, s, v) + } + if err := json.Unmarshal([]byte(s), &v); err != nil || v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, v) + } + trans.Reset() + trans.Close() + } +} + +func TestReadSimpleJSONProtocolI32Null(t *testing.T) { + thetype := "int32" + value := "null" + + trans := NewTMemoryBuffer() + p := NewTSimpleJSONProtocol(trans) + trans.WriteString(value) + trans.Flush() + s := trans.String() + v, e := p.ReadI32() + + if e != nil { + t.Fatalf("Unable to read %s value %v due to error: %s", thetype, value, e.Error()) + } + if v != 0 { + t.Fatalf("Bad value for %s value %v, wrote: %v, received: %v", thetype, value, s, v) + } + trans.Reset() + trans.Close() +} + +func TestWriteSimpleJSONProtocolI64(t *testing.T) { + thetype := "int64" + trans := NewTMemoryBuffer() + p := NewTSimpleJSONProtocol(trans) + for _, value := range INT64_VALUES { + if e := p.WriteI64(value); e != nil { + t.Fatalf("Unable to write %s value %v due to error: %s", thetype, value, e.Error()) + } + if e := p.Flush(); e != nil { + t.Fatalf("Unable to write %s value %v due to error flushing: %s", thetype, value, e.Error()) + } + s := trans.String() + if s != fmt.Sprint(value) { + t.Fatalf("Bad value for %s %v: %s", thetype, value, s) + } + v := int64(0) + if err := json.Unmarshal([]byte(s), &v); err != nil || v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, v) + } + trans.Reset() + } + trans.Close() +} + +func TestReadSimpleJSONProtocolI64(t *testing.T) { + thetype := "int64" + for _, value := range INT64_VALUES { + trans := NewTMemoryBuffer() + p := NewTSimpleJSONProtocol(trans) + trans.WriteString(strconv.FormatInt(value, 10)) + trans.Flush() + s := trans.String() + v, e := p.ReadI64() + if e != nil { + t.Fatalf("Unable to read %s value %v due to error: %s", thetype, value, e.Error()) + } + if v != value { + t.Fatalf("Bad value for %s value %v, wrote: %v, received: %v", thetype, value, s, v) + } + if err := json.Unmarshal([]byte(s), &v); err != nil || v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, v) + } + trans.Reset() + trans.Close() + } +} + +func TestReadSimpleJSONProtocolI64Null(t *testing.T) { + thetype := "int32" + value := "null" + + trans := NewTMemoryBuffer() + p := NewTSimpleJSONProtocol(trans) + trans.WriteString(value) + trans.Flush() + s := trans.String() + v, e := p.ReadI64() + + if e != nil { + t.Fatalf("Unable to read %s value %v due to error: %s", thetype, value, e.Error()) + } + if v != 0 { + t.Fatalf("Bad value for %s value %v, wrote: %v, received: %v", thetype, value, s, v) + } + trans.Reset() + trans.Close() +} + +func TestWriteSimpleJSONProtocolDouble(t *testing.T) { + thetype := "double" + trans := NewTMemoryBuffer() + p := NewTSimpleJSONProtocol(trans) + for _, value := range DOUBLE_VALUES { + if e := p.WriteDouble(value); e != nil { + t.Fatalf("Unable to write %s value %v due to error: %s", thetype, value, e.Error()) + } + if e := p.Flush(); e != nil { + t.Fatalf("Unable to write %s value %v due to error flushing: %s", thetype, value, e.Error()) + } + s := trans.String() + if math.IsInf(value, 1) { + if s != jsonQuote(JSON_INFINITY) { + t.Fatalf("Bad value for %s %v, wrote: %v, expected: %v", thetype, value, s, jsonQuote(JSON_INFINITY)) + } + } else if math.IsInf(value, -1) { + if s != jsonQuote(JSON_NEGATIVE_INFINITY) { + t.Fatalf("Bad value for %s %v, wrote: %v, expected: %v", thetype, value, s, jsonQuote(JSON_NEGATIVE_INFINITY)) + } + } else if math.IsNaN(value) { + if s != jsonQuote(JSON_NAN) { + t.Fatalf("Bad value for %s %v, wrote: %v, expected: %v", thetype, value, s, jsonQuote(JSON_NAN)) + } + } else { + if s != fmt.Sprint(value) { + t.Fatalf("Bad value for %s %v: %s", thetype, value, s) + } + v := float64(0) + if err := json.Unmarshal([]byte(s), &v); err != nil || v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, v) + } + } + trans.Reset() + } + trans.Close() +} + +func TestReadSimpleJSONProtocolDouble(t *testing.T) { + thetype := "double" + for _, value := range DOUBLE_VALUES { + trans := NewTMemoryBuffer() + p := NewTSimpleJSONProtocol(trans) + n := NewNumericFromDouble(value) + trans.WriteString(n.String()) + trans.Flush() + s := trans.String() + v, e := p.ReadDouble() + if e != nil { + t.Fatalf("Unable to read %s value %v due to error: %s", thetype, value, e.Error()) + } + if math.IsInf(value, 1) { + if !math.IsInf(v, 1) { + t.Fatalf("Bad value for %s %v, wrote: %v, received: %v", thetype, value, s, v) + } + } else if math.IsInf(value, -1) { + if !math.IsInf(v, -1) { + t.Fatalf("Bad value for %s %v, wrote: %v, received: %v", thetype, value, s, v) + } + } else if math.IsNaN(value) { + if !math.IsNaN(v) { + t.Fatalf("Bad value for %s %v, wrote: %v, received: %v", thetype, value, s, v) + } + } else { + if v != value { + t.Fatalf("Bad value for %s value %v, wrote: %v, received: %v", thetype, value, s, v) + } + if err := json.Unmarshal([]byte(s), &v); err != nil || v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, v) + } + } + trans.Reset() + trans.Close() + } +} + +func TestWriteSimpleJSONProtocolString(t *testing.T) { + thetype := "string" + trans := NewTMemoryBuffer() + p := NewTSimpleJSONProtocol(trans) + for _, value := range STRING_VALUES { + if e := p.WriteString(value); e != nil { + t.Fatalf("Unable to write %s value %v due to error: %s", thetype, value, e.Error()) + } + if e := p.Flush(); e != nil { + t.Fatalf("Unable to write %s value %v due to error flushing: %s", thetype, value, e.Error()) + } + s := trans.String() + if s[0] != '"' || s[len(s)-1] != '"' { + t.Fatalf("Bad value for %s '%v', wrote '%v', expected: %v", thetype, value, s, fmt.Sprint("\"", value, "\"")) + } + v := new(string) + if err := json.Unmarshal([]byte(s), v); err != nil || *v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, *v) + } + trans.Reset() + } + trans.Close() +} + +func TestReadSimpleJSONProtocolString(t *testing.T) { + thetype := "string" + for _, value := range STRING_VALUES { + trans := NewTMemoryBuffer() + p := NewTSimpleJSONProtocol(trans) + trans.WriteString(jsonQuote(value)) + trans.Flush() + s := trans.String() + v, e := p.ReadString() + if e != nil { + t.Fatalf("Unable to read %s value %v due to error: %s", thetype, value, e.Error()) + } + if v != value { + t.Fatalf("Bad value for %s value %v, wrote: %v, received: %v", thetype, value, s, v) + } + v1 := new(string) + if err := json.Unmarshal([]byte(s), v1); err != nil || *v1 != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, *v1) + } + trans.Reset() + trans.Close() + } +} +func TestReadSimpleJSONProtocolStringNull(t *testing.T) { + thetype := "string" + value := "null" + + trans := NewTMemoryBuffer() + p := NewTSimpleJSONProtocol(trans) + trans.WriteString(value) + trans.Flush() + s := trans.String() + v, e := p.ReadString() + if e != nil { + t.Fatalf("Unable to read %s value %v due to error: %s", thetype, value, e.Error()) + } + if v != "" { + t.Fatalf("Bad value for %s value %v, wrote: %v, received: %v", thetype, value, s, v) + } + trans.Reset() + trans.Close() +} + +func TestWriteSimpleJSONProtocolBinary(t *testing.T) { + thetype := "binary" + value := protocol_bdata + b64value := make([]byte, base64.StdEncoding.EncodedLen(len(protocol_bdata))) + base64.StdEncoding.Encode(b64value, value) + b64String := string(b64value) + trans := NewTMemoryBuffer() + p := NewTSimpleJSONProtocol(trans) + if e := p.WriteBinary(value); e != nil { + t.Fatalf("Unable to write %s value %v due to error: %s", thetype, value, e.Error()) + } + if e := p.Flush(); e != nil { + t.Fatalf("Unable to write %s value %v due to error flushing: %s", thetype, value, e.Error()) + } + s := trans.String() + if s != fmt.Sprint("\"", b64String, "\"") { + t.Fatalf("Bad value for %s %v\n wrote: %v\nexpected: %v", thetype, value, s, "\""+b64String+"\"") + } + v1 := new(string) + if err := json.Unmarshal([]byte(s), v1); err != nil || *v1 != b64String { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, *v1) + } + trans.Close() +} + +func TestReadSimpleJSONProtocolBinary(t *testing.T) { + thetype := "binary" + value := protocol_bdata + b64value := make([]byte, base64.StdEncoding.EncodedLen(len(protocol_bdata))) + base64.StdEncoding.Encode(b64value, value) + b64String := string(b64value) + trans := NewTMemoryBuffer() + p := NewTSimpleJSONProtocol(trans) + trans.WriteString(jsonQuote(b64String)) + trans.Flush() + s := trans.String() + v, e := p.ReadBinary() + if e != nil { + t.Fatalf("Unable to read %s value %v due to error: %s", thetype, value, e.Error()) + } + if len(v) != len(value) { + t.Fatalf("Bad value for %s value length %v, wrote: %v, received length: %v", thetype, len(value), s, len(v)) + } + for i := 0; i < len(v); i++ { + if v[i] != value[i] { + t.Fatalf("Bad value for %s at index %d value %v, wrote: %v, received: %v", thetype, i, value[i], s, v[i]) + } + } + v1 := new(string) + if err := json.Unmarshal([]byte(s), v1); err != nil || *v1 != b64String { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, *v1) + } + trans.Reset() + trans.Close() +} + +func TestReadSimpleJSONProtocolBinaryNull(t *testing.T) { + thetype := "binary" + value := "null" + + trans := NewTMemoryBuffer() + p := NewTSimpleJSONProtocol(trans) + trans.WriteString(value) + trans.Flush() + s := trans.String() + b, e := p.ReadBinary() + v := string(b) + + if e != nil { + t.Fatalf("Unable to read %s value %v due to error: %s", thetype, value, e.Error()) + } + if v != "" { + t.Fatalf("Bad value for %s value %v, wrote: %v, received: %v", thetype, value, s, v) + } + trans.Reset() + trans.Close() +} + +func TestWriteSimpleJSONProtocolList(t *testing.T) { + thetype := "list" + trans := NewTMemoryBuffer() + p := NewTSimpleJSONProtocol(trans) + p.WriteListBegin(TType(DOUBLE), len(DOUBLE_VALUES)) + for _, value := range DOUBLE_VALUES { + if e := p.WriteDouble(value); e != nil { + t.Fatalf("Unable to write %s value %v due to error: %s", thetype, value, e.Error()) + } + } + p.WriteListEnd() + if e := p.Flush(); e != nil { + t.Fatalf("Unable to write %s due to error flushing: %s", thetype, e.Error()) + } + str := trans.String() + str1 := new([]interface{}) + err := json.Unmarshal([]byte(str), str1) + if err != nil { + t.Fatalf("Unable to decode %s, wrote: %s", thetype, str) + } + l := *str1 + if len(l) < 2 { + t.Fatalf("List must be at least of length two to include metadata") + } + if int(l[0].(float64)) != DOUBLE { + t.Fatal("Invalid type for list, expected: ", DOUBLE, ", but was: ", l[0]) + } + if int(l[1].(float64)) != len(DOUBLE_VALUES) { + t.Fatal("Invalid length for list, expected: ", len(DOUBLE_VALUES), ", but was: ", l[1]) + } + for k, value := range DOUBLE_VALUES { + s := l[k+2] + if math.IsInf(value, 1) { + if s.(string) != JSON_INFINITY { + t.Fatalf("Bad value for %s at index %v %v, wrote: %q, expected: %q, originally wrote: %q", thetype, k, value, s, jsonQuote(JSON_INFINITY), str) + } + } else if math.IsInf(value, 0) { + if s.(string) != JSON_NEGATIVE_INFINITY { + t.Fatalf("Bad value for %s at index %v %v, wrote: %q, expected: %q, originally wrote: %q", thetype, k, value, s, jsonQuote(JSON_NEGATIVE_INFINITY), str) + } + } else if math.IsNaN(value) { + if s.(string) != JSON_NAN { + t.Fatalf("Bad value for %s at index %v %v, wrote: %q, expected: %q, originally wrote: %q", thetype, k, value, s, jsonQuote(JSON_NAN), str) + } + } else { + if s.(float64) != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s'", thetype, value, s) + } + } + trans.Reset() + } + trans.Close() +} + +func TestWriteSimpleJSONProtocolSet(t *testing.T) { + thetype := "set" + trans := NewTMemoryBuffer() + p := NewTSimpleJSONProtocol(trans) + p.WriteSetBegin(TType(DOUBLE), len(DOUBLE_VALUES)) + for _, value := range DOUBLE_VALUES { + if e := p.WriteDouble(value); e != nil { + t.Fatalf("Unable to write %s value %v due to error: %s", thetype, value, e.Error()) + } + } + p.WriteSetEnd() + if e := p.Flush(); e != nil { + t.Fatalf("Unable to write %s due to error flushing: %s", thetype, e.Error()) + } + str := trans.String() + str1 := new([]interface{}) + err := json.Unmarshal([]byte(str), str1) + if err != nil { + t.Fatalf("Unable to decode %s, wrote: %s", thetype, str) + } + l := *str1 + if len(l) < 2 { + t.Fatalf("Set must be at least of length two to include metadata") + } + if int(l[0].(float64)) != DOUBLE { + t.Fatal("Invalid type for set, expected: ", DOUBLE, ", but was: ", l[0]) + } + if int(l[1].(float64)) != len(DOUBLE_VALUES) { + t.Fatal("Invalid length for set, expected: ", len(DOUBLE_VALUES), ", but was: ", l[1]) + } + for k, value := range DOUBLE_VALUES { + s := l[k+2] + if math.IsInf(value, 1) { + if s.(string) != JSON_INFINITY { + t.Fatalf("Bad value for %s at index %v %v, wrote: %q, expected: %q, originally wrote: %q", thetype, k, value, s, jsonQuote(JSON_INFINITY), str) + } + } else if math.IsInf(value, 0) { + if s.(string) != JSON_NEGATIVE_INFINITY { + t.Fatalf("Bad value for %s at index %v %v, wrote: %q, expected: %q, originally wrote: %q", thetype, k, value, s, jsonQuote(JSON_NEGATIVE_INFINITY), str) + } + } else if math.IsNaN(value) { + if s.(string) != JSON_NAN { + t.Fatalf("Bad value for %s at index %v %v, wrote: %q, expected: %q, originally wrote: %q", thetype, k, value, s, jsonQuote(JSON_NAN), str) + } + } else { + if s.(float64) != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s'", thetype, value, s) + } + } + trans.Reset() + } + trans.Close() +} + +func TestWriteSimpleJSONProtocolMap(t *testing.T) { + thetype := "map" + trans := NewTMemoryBuffer() + p := NewTSimpleJSONProtocol(trans) + p.WriteMapBegin(TType(I32), TType(DOUBLE), len(DOUBLE_VALUES)) + for k, value := range DOUBLE_VALUES { + if e := p.WriteI32(int32(k)); e != nil { + t.Fatalf("Unable to write %s key int32 value %v due to error: %s", thetype, k, e.Error()) + } + if e := p.WriteDouble(value); e != nil { + t.Fatalf("Unable to write %s value float64 value %v due to error: %s", thetype, value, e.Error()) + } + } + p.WriteMapEnd() + if e := p.Flush(); e != nil { + t.Fatalf("Unable to write %s due to error flushing: %s", thetype, e.Error()) + } + str := trans.String() + if str[0] != '[' || str[len(str)-1] != ']' { + t.Fatalf("Bad value for %s, wrote: %q, in go: %q", thetype, str, DOUBLE_VALUES) + } + l := strings.Split(str[1:len(str)-1], ",") + if len(l) < 3 { + t.Fatal("Expected list of at least length 3 for map for metadata, but was of length ", len(l)) + } + expectedKeyType, _ := strconv.Atoi(l[0]) + expectedValueType, _ := strconv.Atoi(l[1]) + expectedSize, _ := strconv.Atoi(l[2]) + if expectedKeyType != I32 { + t.Fatal("Expected map key type ", I32, ", but was ", l[0]) + } + if expectedValueType != DOUBLE { + t.Fatal("Expected map value type ", DOUBLE, ", but was ", l[1]) + } + if expectedSize != len(DOUBLE_VALUES) { + t.Fatal("Expected map size of ", len(DOUBLE_VALUES), ", but was ", l[2]) + } + for k, value := range DOUBLE_VALUES { + strk := l[k*2+3] + strv := l[k*2+4] + ik, err := strconv.Atoi(strk) + if err != nil { + t.Fatalf("Bad value for %s index %v, wrote: %v, expected: %v, error: %s", thetype, k, strk, string(k), err.Error()) + } + if ik != k { + t.Fatalf("Bad value for %s index %v, wrote: %v, expected: %v", thetype, k, strk, k) + } + s := strv + if math.IsInf(value, 1) { + if s != jsonQuote(JSON_INFINITY) { + t.Fatalf("Bad value for %s at index %v %v, wrote: %v, expected: %v", thetype, k, value, s, jsonQuote(JSON_INFINITY)) + } + } else if math.IsInf(value, 0) { + if s != jsonQuote(JSON_NEGATIVE_INFINITY) { + t.Fatalf("Bad value for %s at index %v %v, wrote: %v, expected: %v", thetype, k, value, s, jsonQuote(JSON_NEGATIVE_INFINITY)) + } + } else if math.IsNaN(value) { + if s != jsonQuote(JSON_NAN) { + t.Fatalf("Bad value for %s at index %v %v, wrote: %v, expected: %v", thetype, k, value, s, jsonQuote(JSON_NAN)) + } + } else { + expected := strconv.FormatFloat(value, 'g', 10, 64) + if s != expected { + t.Fatalf("Bad value for %s at index %v %v, wrote: %v, expected %v", thetype, k, value, s, expected) + } + v := float64(0) + if err := json.Unmarshal([]byte(s), &v); err != nil || v != value { + t.Fatalf("Bad json-decoded value for %s %v, wrote: '%s', expected: '%v'", thetype, value, s, v) + } + } + trans.Reset() + } + trans.Close() +} diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/simple_server.go b/vendor/github.com/apache/thrift/lib/go/thrift/simple_server.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/simple_server.go rename to vendor/github.com/apache/thrift/lib/go/thrift/simple_server.go diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/socket.go b/vendor/github.com/apache/thrift/lib/go/thrift/socket.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/socket.go rename to vendor/github.com/apache/thrift/lib/go/thrift/socket.go diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/ssl_server_socket.go b/vendor/github.com/apache/thrift/lib/go/thrift/ssl_server_socket.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/ssl_server_socket.go rename to vendor/github.com/apache/thrift/lib/go/thrift/ssl_server_socket.go diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/ssl_socket.go b/vendor/github.com/apache/thrift/lib/go/thrift/ssl_socket.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/ssl_socket.go rename to vendor/github.com/apache/thrift/lib/go/thrift/ssl_socket.go diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/transport.go b/vendor/github.com/apache/thrift/lib/go/thrift/transport.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/transport.go rename to vendor/github.com/apache/thrift/lib/go/thrift/transport.go diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/transport_exception.go b/vendor/github.com/apache/thrift/lib/go/thrift/transport_exception.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/transport_exception.go rename to vendor/github.com/apache/thrift/lib/go/thrift/transport_exception.go diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/transport_exception_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/transport_exception_test.go new file mode 100644 index 0000000000000..b44314f490d10 --- /dev/null +++ b/vendor/github.com/apache/thrift/lib/go/thrift/transport_exception_test.go @@ -0,0 +1,60 @@ +/* + * 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. + */ + +package thrift + +import ( + "fmt" + "io" + + "testing" +) + +type timeout struct{ timedout bool } + +func (t *timeout) Timeout() bool { + return t.timedout +} + +func (t *timeout) Error() string { + return fmt.Sprintf("Timeout: %v", t.timedout) +} + +func TestTExceptionTimeout(t *testing.T) { + timeout := &timeout{true} + exception := NewTTransportExceptionFromError(timeout) + if timeout.Error() != exception.Error() { + t.Fatalf("Error did not match: expected %q, got %q", timeout.Error(), exception.Error()) + } + + if exception.TypeId() != TIMED_OUT { + t.Fatalf("TypeId was not TIMED_OUT: expected %v, got %v", TIMED_OUT, exception.TypeId()) + } +} + +func TestTExceptionEOF(t *testing.T) { + exception := NewTTransportExceptionFromError(io.EOF) + if io.EOF.Error() != exception.Error() { + t.Fatalf("Error did not match: expected %q, got %q", io.EOF.Error(), exception.Error()) + } + + if exception.TypeId() != END_OF_FILE { + t.Fatalf("TypeId was not END_OF_FILE: expected %v, got %v", END_OF_FILE, exception.TypeId()) + } +} diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/transport_factory.go b/vendor/github.com/apache/thrift/lib/go/thrift/transport_factory.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/transport_factory.go rename to vendor/github.com/apache/thrift/lib/go/thrift/transport_factory.go diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/transport_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/transport_test.go new file mode 100644 index 0000000000000..864958a9da016 --- /dev/null +++ b/vendor/github.com/apache/thrift/lib/go/thrift/transport_test.go @@ -0,0 +1,176 @@ +/* + * 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. + */ + +package thrift + +import ( + "io" + "net" + "strconv" + "testing" +) + +const TRANSPORT_BINARY_DATA_SIZE = 4096 + +var ( + transport_bdata []byte // test data for writing; same as data + transport_header map[string]string +) + +func init() { + transport_bdata = make([]byte, TRANSPORT_BINARY_DATA_SIZE) + for i := 0; i < TRANSPORT_BINARY_DATA_SIZE; i++ { + transport_bdata[i] = byte((i + 'a') % 255) + } + transport_header = map[string]string{"key": "User-Agent", + "value": "Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1667.0 Safari/537.36"} +} + +func TransportTest(t *testing.T, writeTrans TTransport, readTrans TTransport) { + buf := make([]byte, TRANSPORT_BINARY_DATA_SIZE) + if !writeTrans.IsOpen() { + t.Fatalf("Transport %T not open: %s", writeTrans, writeTrans) + } + if !readTrans.IsOpen() { + t.Fatalf("Transport %T not open: %s", readTrans, readTrans) + } + _, err := writeTrans.Write(transport_bdata) + if err != nil { + t.Fatalf("Transport %T cannot write binary data of length %d: %s", writeTrans, len(transport_bdata), err) + } + err = writeTrans.Flush() + if err != nil { + t.Fatalf("Transport %T cannot flush write of binary data: %s", writeTrans, err) + } + n, err := io.ReadFull(readTrans, buf) + if err != nil { + t.Errorf("Transport %T cannot read binary data of length %d: %s", readTrans, TRANSPORT_BINARY_DATA_SIZE, err) + } + if n != TRANSPORT_BINARY_DATA_SIZE { + t.Errorf("Transport %T read only %d instead of %d bytes of binary data", readTrans, n, TRANSPORT_BINARY_DATA_SIZE) + } + for k, v := range buf { + if v != transport_bdata[k] { + t.Fatalf("Transport %T read %d instead of %d for index %d of binary data 2", readTrans, v, transport_bdata[k], k) + } + } + _, err = writeTrans.Write(transport_bdata) + if err != nil { + t.Fatalf("Transport %T cannot write binary data 2 of length %d: %s", writeTrans, len(transport_bdata), err) + } + err = writeTrans.Flush() + if err != nil { + t.Fatalf("Transport %T cannot flush write binary data 2: %s", writeTrans, err) + } + buf = make([]byte, TRANSPORT_BINARY_DATA_SIZE) + read := 1 + for n = 0; n < TRANSPORT_BINARY_DATA_SIZE && read != 0; { + read, err = readTrans.Read(buf[n:]) + if err != nil { + t.Errorf("Transport %T cannot read binary data 2 of total length %d from offset %d: %s", readTrans, TRANSPORT_BINARY_DATA_SIZE, n, err) + } + n += read + } + if n != TRANSPORT_BINARY_DATA_SIZE { + t.Errorf("Transport %T read only %d instead of %d bytes of binary data 2", readTrans, n, TRANSPORT_BINARY_DATA_SIZE) + } + for k, v := range buf { + if v != transport_bdata[k] { + t.Fatalf("Transport %T read %d instead of %d for index %d of binary data 2", readTrans, v, transport_bdata[k], k) + } + } +} + +func TransportHeaderTest(t *testing.T, writeTrans TTransport, readTrans TTransport) { + buf := make([]byte, TRANSPORT_BINARY_DATA_SIZE) + if !writeTrans.IsOpen() { + t.Fatalf("Transport %T not open: %s", writeTrans, writeTrans) + } + if !readTrans.IsOpen() { + t.Fatalf("Transport %T not open: %s", readTrans, readTrans) + } + // Need to assert type of TTransport to THttpClient to expose the Setter + httpWPostTrans := writeTrans.(*THttpClient) + httpWPostTrans.SetHeader(transport_header["key"], transport_header["value"]) + + _, err := writeTrans.Write(transport_bdata) + if err != nil { + t.Fatalf("Transport %T cannot write binary data of length %d: %s", writeTrans, len(transport_bdata), err) + } + err = writeTrans.Flush() + if err != nil { + t.Fatalf("Transport %T cannot flush write of binary data: %s", writeTrans, err) + } + // Need to assert type of TTransport to THttpClient to expose the Getter + httpRPostTrans := readTrans.(*THttpClient) + readHeader := httpRPostTrans.GetHeader(transport_header["key"]) + if err != nil { + t.Errorf("Transport %T cannot read HTTP Header Value", httpRPostTrans) + } + + if transport_header["value"] != readHeader { + t.Errorf("Expected HTTP Header Value %s, got %s", transport_header["value"], readHeader) + } + n, err := io.ReadFull(readTrans, buf) + if err != nil { + t.Errorf("Transport %T cannot read binary data of length %d: %s", readTrans, TRANSPORT_BINARY_DATA_SIZE, err) + } + if n != TRANSPORT_BINARY_DATA_SIZE { + t.Errorf("Transport %T read only %d instead of %d bytes of binary data", readTrans, n, TRANSPORT_BINARY_DATA_SIZE) + } + for k, v := range buf { + if v != transport_bdata[k] { + t.Fatalf("Transport %T read %d instead of %d for index %d of binary data 2", readTrans, v, transport_bdata[k], k) + } + } +} + +func CloseTransports(t *testing.T, readTrans TTransport, writeTrans TTransport) { + err := readTrans.Close() + if err != nil { + t.Errorf("Transport %T cannot close read transport: %s", readTrans, err) + } + if writeTrans != readTrans { + err = writeTrans.Close() + if err != nil { + t.Errorf("Transport %T cannot close write transport: %s", writeTrans, err) + } + } +} + +func FindAvailableTCPServerPort(startPort int) (net.Addr, error) { + for i := startPort; i < 65535; i++ { + s := "127.0.0.1:" + strconv.Itoa(i) + l, err := net.Listen("tcp", s) + if err == nil { + l.Close() + return net.ResolveTCPAddr("tcp", s) + } + } + return nil, NewTTransportException(UNKNOWN_TRANSPORT_EXCEPTION, "Could not find available server port") +} + +func valueInSlice(value string, slice []string) bool { + for _, v := range slice { + if value == v { + return true + } + } + return false +} diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/type.go b/vendor/github.com/apache/thrift/lib/go/thrift/type.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/type.go rename to vendor/github.com/apache/thrift/lib/go/thrift/type.go diff --git a/_vendor/src/github.com/apache/thrift/lib/go/thrift/zlib_transport.go b/vendor/github.com/apache/thrift/lib/go/thrift/zlib_transport.go similarity index 100% rename from _vendor/src/github.com/apache/thrift/lib/go/thrift/zlib_transport.go rename to vendor/github.com/apache/thrift/lib/go/thrift/zlib_transport.go diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/zlib_transport_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/zlib_transport_test.go new file mode 100644 index 0000000000000..f57610cbd2a0d --- /dev/null +++ b/vendor/github.com/apache/thrift/lib/go/thrift/zlib_transport_test.go @@ -0,0 +1,33 @@ +/* + * 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. + */ + +package thrift + +import ( + "compress/zlib" + "testing" +) + +func TestZlibTransport(t *testing.T) { + trans, err := NewTZlibTransport(NewTMemoryBuffer(), zlib.BestCompression) + if err != nil { + t.Fatal(err) + } + TransportTest(t, trans, trans) +} diff --git a/vendor/github.com/apache/thrift/package.json b/vendor/github.com/apache/thrift/package.json new file mode 100644 index 0000000000000..edfc3553ed5ce --- /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 0000000000000..6e6c5db90d1c4 --- /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/beorn7/perks/.gitignore b/vendor/github.com/beorn7/perks/.gitignore new file mode 100644 index 0000000000000..1bd9209aa195a --- /dev/null +++ b/vendor/github.com/beorn7/perks/.gitignore @@ -0,0 +1,2 @@ +*.test +*.prof diff --git a/_vendor/src/github.com/beorn7/perks/LICENSE b/vendor/github.com/beorn7/perks/LICENSE similarity index 100% rename from _vendor/src/github.com/beorn7/perks/LICENSE rename to vendor/github.com/beorn7/perks/LICENSE diff --git a/vendor/github.com/beorn7/perks/README.md b/vendor/github.com/beorn7/perks/README.md new file mode 100644 index 0000000000000..fc05777701ab7 --- /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/beorn7/perks/quantile/bench_test.go b/vendor/github.com/beorn7/perks/quantile/bench_test.go new file mode 100644 index 0000000000000..0bd0e4e775217 --- /dev/null +++ b/vendor/github.com/beorn7/perks/quantile/bench_test.go @@ -0,0 +1,63 @@ +package quantile + +import ( + "testing" +) + +func BenchmarkInsertTargeted(b *testing.B) { + b.ReportAllocs() + + s := NewTargeted(Targets) + b.ResetTimer() + for i := float64(0); i < float64(b.N); i++ { + s.Insert(i) + } +} + +func BenchmarkInsertTargetedSmallEpsilon(b *testing.B) { + s := NewTargeted(TargetsSmallEpsilon) + b.ResetTimer() + for i := float64(0); i < float64(b.N); i++ { + s.Insert(i) + } +} + +func BenchmarkInsertBiased(b *testing.B) { + s := NewLowBiased(0.01) + b.ResetTimer() + for i := float64(0); i < float64(b.N); i++ { + s.Insert(i) + } +} + +func BenchmarkInsertBiasedSmallEpsilon(b *testing.B) { + s := NewLowBiased(0.0001) + b.ResetTimer() + for i := float64(0); i < float64(b.N); i++ { + s.Insert(i) + } +} + +func BenchmarkQuery(b *testing.B) { + s := NewTargeted(Targets) + for i := float64(0); i < 1e6; i++ { + s.Insert(i) + } + b.ResetTimer() + n := float64(b.N) + for i := float64(0); i < n; i++ { + s.Query(i / n) + } +} + +func BenchmarkQuerySmallEpsilon(b *testing.B) { + s := NewTargeted(TargetsSmallEpsilon) + for i := float64(0); i < 1e6; i++ { + s.Insert(i) + } + b.ResetTimer() + n := float64(b.N) + for i := float64(0); i < n; i++ { + s.Query(i / n) + } +} diff --git a/vendor/github.com/beorn7/perks/quantile/example_test.go b/vendor/github.com/beorn7/perks/quantile/example_test.go new file mode 100644 index 0000000000000..ab3293aaf2a09 --- /dev/null +++ b/vendor/github.com/beorn7/perks/quantile/example_test.go @@ -0,0 +1,121 @@ +// +build go1.1 + +package quantile_test + +import ( + "bufio" + "fmt" + "log" + "os" + "strconv" + "time" + + "github.com/beorn7/perks/quantile" +) + +func Example_simple() { + ch := make(chan float64) + go sendFloats(ch) + + // Compute the 50th, 90th, and 99th percentile. + q := quantile.NewTargeted(map[float64]float64{ + 0.50: 0.005, + 0.90: 0.001, + 0.99: 0.0001, + }) + for v := range ch { + q.Insert(v) + } + + fmt.Println("perc50:", q.Query(0.50)) + fmt.Println("perc90:", q.Query(0.90)) + fmt.Println("perc99:", q.Query(0.99)) + fmt.Println("count:", q.Count()) + // Output: + // perc50: 5 + // perc90: 16 + // perc99: 223 + // count: 2388 +} + +func Example_mergeMultipleStreams() { + // Scenario: + // We have multiple database shards. On each shard, there is a process + // collecting query response times from the database logs and inserting + // them into a Stream (created via NewTargeted(0.90)), much like the + // Simple example. These processes expose a network interface for us to + // ask them to serialize and send us the results of their + // Stream.Samples so we may Merge and Query them. + // + // NOTES: + // * These sample sets are small, allowing us to get them + // across the network much faster than sending the entire list of data + // points. + // + // * For this to work correctly, we must supply the same quantiles + // a priori the process collecting the samples supplied to NewTargeted, + // even if we do not plan to query them all here. + ch := make(chan quantile.Samples) + getDBQuerySamples(ch) + q := quantile.NewTargeted(map[float64]float64{0.90: 0.001}) + for samples := range ch { + q.Merge(samples) + } + fmt.Println("perc90:", q.Query(0.90)) +} + +func Example_window() { + // Scenario: We want the 90th, 95th, and 99th percentiles for each + // minute. + + ch := make(chan float64) + go sendStreamValues(ch) + + tick := time.NewTicker(1 * time.Minute) + q := quantile.NewTargeted(map[float64]float64{ + 0.90: 0.001, + 0.95: 0.0005, + 0.99: 0.0001, + }) + for { + select { + case t := <-tick.C: + flushToDB(t, q.Samples()) + q.Reset() + case v := <-ch: + q.Insert(v) + } + } +} + +func sendStreamValues(ch chan float64) { + // Use your imagination +} + +func flushToDB(t time.Time, samples quantile.Samples) { + // Use your imagination +} + +// This is a stub for the above example. In reality this would hit the remote +// servers via http or something like it. +func getDBQuerySamples(ch chan quantile.Samples) {} + +func sendFloats(ch chan<- float64) { + f, err := os.Open("exampledata.txt") + if err != nil { + log.Fatal(err) + } + sc := bufio.NewScanner(f) + for sc.Scan() { + b := sc.Bytes() + v, err := strconv.ParseFloat(string(b), 64) + if err != nil { + log.Fatal(err) + } + ch <- v + } + if sc.Err() != nil { + log.Fatal(sc.Err()) + } + close(ch) +} diff --git a/vendor/github.com/beorn7/perks/quantile/exampledata.txt b/vendor/github.com/beorn7/perks/quantile/exampledata.txt new file mode 100644 index 0000000000000..1602287d7ce52 --- /dev/null +++ b/vendor/github.com/beorn7/perks/quantile/exampledata.txt @@ -0,0 +1,2388 @@ +8 +5 +26 +12 +5 +235 +13 +6 +28 +30 +3 +3 +3 +3 +5 +2 +33 +7 +2 +4 +7 +12 +14 +5 +8 +3 +10 +4 +5 +3 +6 +6 +209 +20 +3 +10 +14 +3 +4 +6 +8 +5 +11 +7 +3 +2 +3 +3 +212 +5 +222 +4 +10 +10 +5 +6 +3 +8 +3 +10 +254 +220 +2 +3 +5 +24 +5 +4 +222 +7 +3 +3 +223 +8 +15 +12 +14 +14 +3 +2 +2 +3 +13 +3 +11 +4 +4 +6 +5 +7 +13 +5 +3 +5 +2 +5 +3 +5 +2 +7 +15 +17 +14 +3 +6 +6 +3 +17 +5 +4 +7 +6 +4 +4 +8 +6 +8 +3 +9 +3 +6 +3 +4 +5 +3 +3 +660 +4 +6 +10 +3 +6 +3 +2 +5 +13 +2 +4 +4 +10 +4 +8 +4 +3 +7 +9 +9 +3 +10 +37 +3 +13 +4 +12 +3 +6 +10 +8 +5 +21 +2 +3 +8 +3 +2 +3 +3 +4 +12 +2 +4 +8 +8 +4 +3 +2 +20 +1 +6 +32 +2 +11 +6 +18 +3 +8 +11 +3 +212 +3 +4 +2 +6 +7 +12 +11 +3 +2 +16 +10 +6 +4 +6 +3 +2 +7 +3 +2 +2 +2 +2 +5 +6 +4 +3 +10 +3 +4 +6 +5 +3 +4 +4 +5 +6 +4 +3 +4 +4 +5 +7 +5 +5 +3 +2 +7 +2 +4 +12 +4 +5 +6 +2 +4 +4 +8 +4 +15 +13 +7 +16 +5 +3 +23 +5 +5 +7 +3 +2 +9 +8 +7 +5 +8 +11 +4 +10 +76 +4 +47 +4 +3 +2 +7 +4 +2 +3 +37 +10 +4 +2 +20 +5 +4 +4 +10 +10 +4 +3 +7 +23 +240 +7 +13 +5 +5 +3 +3 +2 +5 +4 +2 +8 +7 +19 +2 +23 +8 +7 +2 +5 +3 +8 +3 +8 +13 +5 +5 +5 +2 +3 +23 +4 +9 +8 +4 +3 +3 +5 +220 +2 +3 +4 +6 +14 +3 +53 +6 +2 +5 +18 +6 +3 +219 +6 +5 +2 +5 +3 +6 +5 +15 +4 +3 +17 +3 +2 +4 +7 +2 +3 +3 +4 +4 +3 +2 +664 +6 +3 +23 +5 +5 +16 +5 +8 +2 +4 +2 +24 +12 +3 +2 +3 +5 +8 +3 +5 +4 +3 +14 +3 +5 +8 +2 +3 +7 +9 +4 +2 +3 +6 +8 +4 +3 +4 +6 +5 +3 +3 +6 +3 +19 +4 +4 +6 +3 +6 +3 +5 +22 +5 +4 +4 +3 +8 +11 +4 +9 +7 +6 +13 +4 +4 +4 +6 +17 +9 +3 +3 +3 +4 +3 +221 +5 +11 +3 +4 +2 +12 +6 +3 +5 +7 +5 +7 +4 +9 +7 +14 +37 +19 +217 +16 +3 +5 +2 +2 +7 +19 +7 +6 +7 +4 +24 +5 +11 +4 +7 +7 +9 +13 +3 +4 +3 +6 +28 +4 +4 +5 +5 +2 +5 +6 +4 +4 +6 +10 +5 +4 +3 +2 +3 +3 +6 +5 +5 +4 +3 +2 +3 +7 +4 +6 +18 +16 +8 +16 +4 +5 +8 +6 +9 +13 +1545 +6 +215 +6 +5 +6 +3 +45 +31 +5 +2 +2 +4 +3 +3 +2 +5 +4 +3 +5 +7 +7 +4 +5 +8 +5 +4 +749 +2 +31 +9 +11 +2 +11 +5 +4 +4 +7 +9 +11 +4 +5 +4 +7 +3 +4 +6 +2 +15 +3 +4 +3 +4 +3 +5 +2 +13 +5 +5 +3 +3 +23 +4 +4 +5 +7 +4 +13 +2 +4 +3 +4 +2 +6 +2 +7 +3 +5 +5 +3 +29 +5 +4 +4 +3 +10 +2 +3 +79 +16 +6 +6 +7 +7 +3 +5 +5 +7 +4 +3 +7 +9 +5 +6 +5 +9 +6 +3 +6 +4 +17 +2 +10 +9 +3 +6 +2 +3 +21 +22 +5 +11 +4 +2 +17 +2 +224 +2 +14 +3 +4 +4 +2 +4 +4 +4 +4 +5 +3 +4 +4 +10 +2 +6 +3 +3 +5 +7 +2 +7 +5 +6 +3 +218 +2 +2 +5 +2 +6 +3 +5 +222 +14 +6 +33 +3 +2 +5 +3 +3 +3 +9 +5 +3 +3 +2 +7 +4 +3 +4 +3 +5 +6 +5 +26 +4 +13 +9 +7 +3 +221 +3 +3 +4 +4 +4 +4 +2 +18 +5 +3 +7 +9 +6 +8 +3 +10 +3 +11 +9 +5 +4 +17 +5 +5 +6 +6 +3 +2 +4 +12 +17 +6 +7 +218 +4 +2 +4 +10 +3 +5 +15 +3 +9 +4 +3 +3 +6 +29 +3 +3 +4 +5 +5 +3 +8 +5 +6 +6 +7 +5 +3 +5 +3 +29 +2 +31 +5 +15 +24 +16 +5 +207 +4 +3 +3 +2 +15 +4 +4 +13 +5 +5 +4 +6 +10 +2 +7 +8 +4 +6 +20 +5 +3 +4 +3 +12 +12 +5 +17 +7 +3 +3 +3 +6 +10 +3 +5 +25 +80 +4 +9 +3 +2 +11 +3 +3 +2 +3 +8 +7 +5 +5 +19 +5 +3 +3 +12 +11 +2 +6 +5 +5 +5 +3 +3 +3 +4 +209 +14 +3 +2 +5 +19 +4 +4 +3 +4 +14 +5 +6 +4 +13 +9 +7 +4 +7 +10 +2 +9 +5 +7 +2 +8 +4 +6 +5 +5 +222 +8 +7 +12 +5 +216 +3 +4 +4 +6 +3 +14 +8 +7 +13 +4 +3 +3 +3 +3 +17 +5 +4 +3 +33 +6 +6 +33 +7 +5 +3 +8 +7 +5 +2 +9 +4 +2 +233 +24 +7 +4 +8 +10 +3 +4 +15 +2 +16 +3 +3 +13 +12 +7 +5 +4 +207 +4 +2 +4 +27 +15 +2 +5 +2 +25 +6 +5 +5 +6 +13 +6 +18 +6 +4 +12 +225 +10 +7 +5 +2 +2 +11 +4 +14 +21 +8 +10 +3 +5 +4 +232 +2 +5 +5 +3 +7 +17 +11 +6 +6 +23 +4 +6 +3 +5 +4 +2 +17 +3 +6 +5 +8 +3 +2 +2 +14 +9 +4 +4 +2 +5 +5 +3 +7 +6 +12 +6 +10 +3 +6 +2 +2 +19 +5 +4 +4 +9 +2 +4 +13 +3 +5 +6 +3 +6 +5 +4 +9 +6 +3 +5 +7 +3 +6 +6 +4 +3 +10 +6 +3 +221 +3 +5 +3 +6 +4 +8 +5 +3 +6 +4 +4 +2 +54 +5 +6 +11 +3 +3 +4 +4 +4 +3 +7 +3 +11 +11 +7 +10 +6 +13 +223 +213 +15 +231 +7 +3 +7 +228 +2 +3 +4 +4 +5 +6 +7 +4 +13 +3 +4 +5 +3 +6 +4 +6 +7 +2 +4 +3 +4 +3 +3 +6 +3 +7 +3 +5 +18 +5 +6 +8 +10 +3 +3 +3 +2 +4 +2 +4 +4 +5 +6 +6 +4 +10 +13 +3 +12 +5 +12 +16 +8 +4 +19 +11 +2 +4 +5 +6 +8 +5 +6 +4 +18 +10 +4 +2 +216 +6 +6 +6 +2 +4 +12 +8 +3 +11 +5 +6 +14 +5 +3 +13 +4 +5 +4 +5 +3 +28 +6 +3 +7 +219 +3 +9 +7 +3 +10 +6 +3 +4 +19 +5 +7 +11 +6 +15 +19 +4 +13 +11 +3 +7 +5 +10 +2 +8 +11 +2 +6 +4 +6 +24 +6 +3 +3 +3 +3 +6 +18 +4 +11 +4 +2 +5 +10 +8 +3 +9 +5 +3 +4 +5 +6 +2 +5 +7 +4 +4 +14 +6 +4 +4 +5 +5 +7 +2 +4 +3 +7 +3 +3 +6 +4 +5 +4 +4 +4 +3 +3 +3 +3 +8 +14 +2 +3 +5 +3 +2 +4 +5 +3 +7 +3 +3 +18 +3 +4 +4 +5 +7 +3 +3 +3 +13 +5 +4 +8 +211 +5 +5 +3 +5 +2 +5 +4 +2 +655 +6 +3 +5 +11 +2 +5 +3 +12 +9 +15 +11 +5 +12 +217 +2 +6 +17 +3 +3 +207 +5 +5 +4 +5 +9 +3 +2 +8 +5 +4 +3 +2 +5 +12 +4 +14 +5 +4 +2 +13 +5 +8 +4 +225 +4 +3 +4 +5 +4 +3 +3 +6 +23 +9 +2 +6 +7 +233 +4 +4 +6 +18 +3 +4 +6 +3 +4 +4 +2 +3 +7 +4 +13 +227 +4 +3 +5 +4 +2 +12 +9 +17 +3 +7 +14 +6 +4 +5 +21 +4 +8 +9 +2 +9 +25 +16 +3 +6 +4 +7 +8 +5 +2 +3 +5 +4 +3 +3 +5 +3 +3 +3 +2 +3 +19 +2 +4 +3 +4 +2 +3 +4 +4 +2 +4 +3 +3 +3 +2 +6 +3 +17 +5 +6 +4 +3 +13 +5 +3 +3 +3 +4 +9 +4 +2 +14 +12 +4 +5 +24 +4 +3 +37 +12 +11 +21 +3 +4 +3 +13 +4 +2 +3 +15 +4 +11 +4 +4 +3 +8 +3 +4 +4 +12 +8 +5 +3 +3 +4 +2 +220 +3 +5 +223 +3 +3 +3 +10 +3 +15 +4 +241 +9 +7 +3 +6 +6 +23 +4 +13 +7 +3 +4 +7 +4 +9 +3 +3 +4 +10 +5 +5 +1 +5 +24 +2 +4 +5 +5 +6 +14 +3 +8 +2 +3 +5 +13 +13 +3 +5 +2 +3 +15 +3 +4 +2 +10 +4 +4 +4 +5 +5 +3 +5 +3 +4 +7 +4 +27 +3 +6 +4 +15 +3 +5 +6 +6 +5 +4 +8 +3 +9 +2 +6 +3 +4 +3 +7 +4 +18 +3 +11 +3 +3 +8 +9 +7 +24 +3 +219 +7 +10 +4 +5 +9 +12 +2 +5 +4 +4 +4 +3 +3 +19 +5 +8 +16 +8 +6 +22 +3 +23 +3 +242 +9 +4 +3 +3 +5 +7 +3 +3 +5 +8 +3 +7 +5 +14 +8 +10 +3 +4 +3 +7 +4 +6 +7 +4 +10 +4 +3 +11 +3 +7 +10 +3 +13 +6 +8 +12 +10 +5 +7 +9 +3 +4 +7 +7 +10 +8 +30 +9 +19 +4 +3 +19 +15 +4 +13 +3 +215 +223 +4 +7 +4 +8 +17 +16 +3 +7 +6 +5 +5 +4 +12 +3 +7 +4 +4 +13 +4 +5 +2 +5 +6 +5 +6 +6 +7 +10 +18 +23 +9 +3 +3 +6 +5 +2 +4 +2 +7 +3 +3 +2 +5 +5 +14 +10 +224 +6 +3 +4 +3 +7 +5 +9 +3 +6 +4 +2 +5 +11 +4 +3 +3 +2 +8 +4 +7 +4 +10 +7 +3 +3 +18 +18 +17 +3 +3 +3 +4 +5 +3 +3 +4 +12 +7 +3 +11 +13 +5 +4 +7 +13 +5 +4 +11 +3 +12 +3 +6 +4 +4 +21 +4 +6 +9 +5 +3 +10 +8 +4 +6 +4 +4 +6 +5 +4 +8 +6 +4 +6 +4 +4 +5 +9 +6 +3 +4 +2 +9 +3 +18 +2 +4 +3 +13 +3 +6 +6 +8 +7 +9 +3 +2 +16 +3 +4 +6 +3 +2 +33 +22 +14 +4 +9 +12 +4 +5 +6 +3 +23 +9 +4 +3 +5 +5 +3 +4 +5 +3 +5 +3 +10 +4 +5 +5 +8 +4 +4 +6 +8 +5 +4 +3 +4 +6 +3 +3 +3 +5 +9 +12 +6 +5 +9 +3 +5 +3 +2 +2 +2 +18 +3 +2 +21 +2 +5 +4 +6 +4 +5 +10 +3 +9 +3 +2 +10 +7 +3 +6 +6 +4 +4 +8 +12 +7 +3 +7 +3 +3 +9 +3 +4 +5 +4 +4 +5 +5 +10 +15 +4 +4 +14 +6 +227 +3 +14 +5 +216 +22 +5 +4 +2 +2 +6 +3 +4 +2 +9 +9 +4 +3 +28 +13 +11 +4 +5 +3 +3 +2 +3 +3 +5 +3 +4 +3 +5 +23 +26 +3 +4 +5 +6 +4 +6 +3 +5 +5 +3 +4 +3 +2 +2 +2 +7 +14 +3 +6 +7 +17 +2 +2 +15 +14 +16 +4 +6 +7 +13 +6 +4 +5 +6 +16 +3 +3 +28 +3 +6 +15 +3 +9 +2 +4 +6 +3 +3 +22 +4 +12 +6 +7 +2 +5 +4 +10 +3 +16 +6 +9 +2 +5 +12 +7 +5 +5 +5 +5 +2 +11 +9 +17 +4 +3 +11 +7 +3 +5 +15 +4 +3 +4 +211 +8 +7 +5 +4 +7 +6 +7 +6 +3 +6 +5 +6 +5 +3 +4 +4 +26 +4 +6 +10 +4 +4 +3 +2 +3 +3 +4 +5 +9 +3 +9 +4 +4 +5 +5 +8 +2 +4 +2 +3 +8 +4 +11 +19 +5 +8 +6 +3 +5 +6 +12 +3 +2 +4 +16 +12 +3 +4 +4 +8 +6 +5 +6 +6 +219 +8 +222 +6 +16 +3 +13 +19 +5 +4 +3 +11 +6 +10 +4 +7 +7 +12 +5 +3 +3 +5 +6 +10 +3 +8 +2 +5 +4 +7 +2 +4 +4 +2 +12 +9 +6 +4 +2 +40 +2 +4 +10 +4 +223 +4 +2 +20 +6 +7 +24 +5 +4 +5 +2 +20 +16 +6 +5 +13 +2 +3 +3 +19 +3 +2 +4 +5 +6 +7 +11 +12 +5 +6 +7 +7 +3 +5 +3 +5 +3 +14 +3 +4 +4 +2 +11 +1 +7 +3 +9 +6 +11 +12 +5 +8 +6 +221 +4 +2 +12 +4 +3 +15 +4 +5 +226 +7 +218 +7 +5 +4 +5 +18 +4 +5 +9 +4 +4 +2 +9 +18 +18 +9 +5 +6 +6 +3 +3 +7 +3 +5 +4 +4 +4 +12 +3 +6 +31 +5 +4 +7 +3 +6 +5 +6 +5 +11 +2 +2 +11 +11 +6 +7 +5 +8 +7 +10 +5 +23 +7 +4 +3 +5 +34 +2 +5 +23 +7 +3 +6 +8 +4 +4 +4 +2 +5 +3 +8 +5 +4 +8 +25 +2 +3 +17 +8 +3 +4 +8 +7 +3 +15 +6 +5 +7 +21 +9 +5 +6 +6 +5 +3 +2 +3 +10 +3 +6 +3 +14 +7 +4 +4 +8 +7 +8 +2 +6 +12 +4 +213 +6 +5 +21 +8 +2 +5 +23 +3 +11 +2 +3 +6 +25 +2 +3 +6 +7 +6 +6 +4 +4 +6 +3 +17 +9 +7 +6 +4 +3 +10 +7 +2 +3 +3 +3 +11 +8 +3 +7 +6 +4 +14 +36 +3 +4 +3 +3 +22 +13 +21 +4 +2 +7 +4 +4 +17 +15 +3 +7 +11 +2 +4 +7 +6 +209 +6 +3 +2 +2 +24 +4 +9 +4 +3 +3 +3 +29 +2 +2 +4 +3 +3 +5 +4 +6 +3 +3 +2 +4 diff --git a/_vendor/src/github.com/beorn7/perks/quantile/stream.go b/vendor/github.com/beorn7/perks/quantile/stream.go similarity index 100% rename from _vendor/src/github.com/beorn7/perks/quantile/stream.go rename to vendor/github.com/beorn7/perks/quantile/stream.go diff --git a/vendor/github.com/beorn7/perks/quantile/stream_test.go b/vendor/github.com/beorn7/perks/quantile/stream_test.go new file mode 100644 index 0000000000000..4dba05449cb46 --- /dev/null +++ b/vendor/github.com/beorn7/perks/quantile/stream_test.go @@ -0,0 +1,188 @@ +package quantile + +import ( + "math" + "math/rand" + "sort" + "testing" +) + +var ( + Targets = map[float64]float64{ + 0.01: 0.001, + 0.10: 0.01, + 0.50: 0.05, + 0.90: 0.01, + 0.99: 0.001, + } + TargetsSmallEpsilon = map[float64]float64{ + 0.01: 0.0001, + 0.10: 0.001, + 0.50: 0.005, + 0.90: 0.001, + 0.99: 0.0001, + } + LowQuantiles = []float64{0.01, 0.1, 0.5} + HighQuantiles = []float64{0.99, 0.9, 0.5} +) + +const RelativeEpsilon = 0.01 + +func verifyPercsWithAbsoluteEpsilon(t *testing.T, a []float64, s *Stream) { + sort.Float64s(a) + for quantile, epsilon := range Targets { + n := float64(len(a)) + k := int(quantile * n) + lower := int((quantile - epsilon) * n) + if lower < 1 { + lower = 1 + } + upper := int(math.Ceil((quantile + epsilon) * n)) + if upper > len(a) { + upper = len(a) + } + w, min, max := a[k-1], a[lower-1], a[upper-1] + if g := s.Query(quantile); g < min || g > max { + t.Errorf("q=%f: want %v [%f,%f], got %v", quantile, w, min, max, g) + } + } +} + +func verifyLowPercsWithRelativeEpsilon(t *testing.T, a []float64, s *Stream) { + sort.Float64s(a) + for _, qu := range LowQuantiles { + n := float64(len(a)) + k := int(qu * n) + + lowerRank := int((1 - RelativeEpsilon) * qu * n) + upperRank := int(math.Ceil((1 + RelativeEpsilon) * qu * n)) + w, min, max := a[k-1], a[lowerRank-1], a[upperRank-1] + if g := s.Query(qu); g < min || g > max { + t.Errorf("q=%f: want %v [%f,%f], got %v", qu, w, min, max, g) + } + } +} + +func verifyHighPercsWithRelativeEpsilon(t *testing.T, a []float64, s *Stream) { + sort.Float64s(a) + for _, qu := range HighQuantiles { + n := float64(len(a)) + k := int(qu * n) + + lowerRank := int((1 - (1+RelativeEpsilon)*(1-qu)) * n) + upperRank := int(math.Ceil((1 - (1-RelativeEpsilon)*(1-qu)) * n)) + w, min, max := a[k-1], a[lowerRank-1], a[upperRank-1] + if g := s.Query(qu); g < min || g > max { + t.Errorf("q=%f: want %v [%f,%f], got %v", qu, w, min, max, g) + } + } +} + +func populateStream(s *Stream) []float64 { + a := make([]float64, 0, 1e5+100) + for i := 0; i < cap(a); i++ { + v := rand.NormFloat64() + // Add 5% asymmetric outliers. + if i%20 == 0 { + v = v*v + 1 + } + s.Insert(v) + a = append(a, v) + } + return a +} + +func TestTargetedQuery(t *testing.T) { + rand.Seed(42) + s := NewTargeted(Targets) + a := populateStream(s) + verifyPercsWithAbsoluteEpsilon(t, a, s) +} + +func TestLowBiasedQuery(t *testing.T) { + rand.Seed(42) + s := NewLowBiased(RelativeEpsilon) + a := populateStream(s) + verifyLowPercsWithRelativeEpsilon(t, a, s) +} + +func TestHighBiasedQuery(t *testing.T) { + rand.Seed(42) + s := NewHighBiased(RelativeEpsilon) + a := populateStream(s) + verifyHighPercsWithRelativeEpsilon(t, a, s) +} + +// BrokenTestTargetedMerge is broken, see Merge doc comment. +func BrokenTestTargetedMerge(t *testing.T) { + rand.Seed(42) + s1 := NewTargeted(Targets) + s2 := NewTargeted(Targets) + a := populateStream(s1) + a = append(a, populateStream(s2)...) + s1.Merge(s2.Samples()) + verifyPercsWithAbsoluteEpsilon(t, a, s1) +} + +// BrokenTestLowBiasedMerge is broken, see Merge doc comment. +func BrokenTestLowBiasedMerge(t *testing.T) { + rand.Seed(42) + s1 := NewLowBiased(RelativeEpsilon) + s2 := NewLowBiased(RelativeEpsilon) + a := populateStream(s1) + a = append(a, populateStream(s2)...) + s1.Merge(s2.Samples()) + verifyLowPercsWithRelativeEpsilon(t, a, s2) +} + +// BrokenTestHighBiasedMerge is broken, see Merge doc comment. +func BrokenTestHighBiasedMerge(t *testing.T) { + rand.Seed(42) + s1 := NewHighBiased(RelativeEpsilon) + s2 := NewHighBiased(RelativeEpsilon) + a := populateStream(s1) + a = append(a, populateStream(s2)...) + s1.Merge(s2.Samples()) + verifyHighPercsWithRelativeEpsilon(t, a, s2) +} + +func TestUncompressed(t *testing.T) { + q := NewTargeted(Targets) + for i := 100; i > 0; i-- { + q.Insert(float64(i)) + } + if g := q.Count(); g != 100 { + t.Errorf("want count 100, got %d", g) + } + // Before compression, Query should have 100% accuracy. + for quantile := range Targets { + w := quantile * 100 + if g := q.Query(quantile); g != w { + t.Errorf("want %f, got %f", w, g) + } + } +} + +func TestUncompressedSamples(t *testing.T) { + q := NewTargeted(map[float64]float64{0.99: 0.001}) + for i := 1; i <= 100; i++ { + q.Insert(float64(i)) + } + if g := q.Samples().Len(); g != 100 { + t.Errorf("want count 100, got %d", g) + } +} + +func TestUncompressedOne(t *testing.T) { + q := NewTargeted(map[float64]float64{0.99: 0.01}) + q.Insert(3.14) + if g := q.Query(0.90); g != 3.14 { + t.Error("want PI, got", g) + } +} + +func TestDefaults(t *testing.T) { + if g := NewTargeted(map[float64]float64{0.99: 0.001}).Query(0.99); g != 0 { + t.Errorf("want 0, got %f", g) + } +} diff --git a/vendor/github.com/blacktear23/go-proxyprotocol/.travis.yml b/vendor/github.com/blacktear23/go-proxyprotocol/.travis.yml new file mode 100644 index 0000000000000..67d2d12c8c25b --- /dev/null +++ b/vendor/github.com/blacktear23/go-proxyprotocol/.travis.yml @@ -0,0 +1,12 @@ +language: go + +go_import_path: github.com/blacktear23/go-proxyprotocol + +go: + - 1.9.x + +before_install: + - go get github.com/pingcap/check + +script: + - go test -cover diff --git a/_vendor/src/github.com/blacktear23/go-proxyprotocol/LICENSE b/vendor/github.com/blacktear23/go-proxyprotocol/LICENSE similarity index 100% rename from _vendor/src/github.com/blacktear23/go-proxyprotocol/LICENSE rename to vendor/github.com/blacktear23/go-proxyprotocol/LICENSE diff --git a/vendor/github.com/blacktear23/go-proxyprotocol/README.md b/vendor/github.com/blacktear23/go-proxyprotocol/README.md new file mode 100644 index 0000000000000..f1de3b4a449ed --- /dev/null +++ b/vendor/github.com/blacktear23/go-proxyprotocol/README.md @@ -0,0 +1,37 @@ +# go-proxyprotocol + +PROXY protocol implementation in Go. + +## Usage + +import + +```go +import ( + proxyprotocol "github.com/blacktear23/go-proxyprotocol" +) +``` + +basic usage + +```go +// Create listener +l, err := net.Listen("tcp", "...") + +// Wrap listener as PROXY protocol listener +ppl, err := proxyprotocol.NewListener(l, "*", 5) + +for { + conn, err := ppl.Accept() + if err != nil { + // PROXY protocol related errors can be output by log and + // continue accept next one. + if proxyprotocol.IsProxyProtocolError(err) { + log.Errorf("PROXY protocol error: %s", err.Error()) + continue + } + panic(err) + } + go processConn(conn) +} +``` diff --git a/_vendor/src/github.com/blacktear23/go-proxyprotocol/proxy_protocol.go b/vendor/github.com/blacktear23/go-proxyprotocol/proxy_protocol.go similarity index 100% rename from _vendor/src/github.com/blacktear23/go-proxyprotocol/proxy_protocol.go rename to vendor/github.com/blacktear23/go-proxyprotocol/proxy_protocol.go diff --git a/_vendor/src/github.com/blacktear23/go-proxyprotocol/proxy_protocol_test.go b/vendor/github.com/blacktear23/go-proxyprotocol/proxy_protocol_test.go similarity index 100% rename from _vendor/src/github.com/blacktear23/go-proxyprotocol/proxy_protocol_test.go rename to vendor/github.com/blacktear23/go-proxyprotocol/proxy_protocol_test.go diff --git a/vendor/github.com/codahale/hdrhistogram/.travis.yml b/vendor/github.com/codahale/hdrhistogram/.travis.yml new file mode 100644 index 0000000000000..7960fc95b865d --- /dev/null +++ b/vendor/github.com/codahale/hdrhistogram/.travis.yml @@ -0,0 +1,5 @@ +language: go +go: + - 1.5 + - 1.6 + - tip diff --git a/_vendor/src/github.com/codahale/hdrhistogram/LICENSE b/vendor/github.com/codahale/hdrhistogram/LICENSE similarity index 100% rename from _vendor/src/github.com/codahale/hdrhistogram/LICENSE rename to vendor/github.com/codahale/hdrhistogram/LICENSE diff --git a/vendor/github.com/codahale/hdrhistogram/README.md b/vendor/github.com/codahale/hdrhistogram/README.md new file mode 100644 index 0000000000000..614b197c3dd3a --- /dev/null +++ b/vendor/github.com/codahale/hdrhistogram/README.md @@ -0,0 +1,15 @@ +hdrhistogram +============ + +[![Build Status](https://travis-ci.org/codahale/hdrhistogram.png?branch=master)](https://travis-ci.org/codahale/hdrhistogram) + +A pure Go implementation of the [HDR Histogram](https://github.com/HdrHistogram/HdrHistogram). + +> A Histogram that supports recording and analyzing sampled data value counts +> across a configurable integer value range with configurable value precision +> within the range. Value precision is expressed as the number of significant +> digits in the value recording, and provides control over value quantization +> behavior across the value range and the subsequent value resolution at any +> given level. + +For documentation, check [godoc](http://godoc.org/github.com/codahale/hdrhistogram). diff --git a/_vendor/src/github.com/codahale/hdrhistogram/hdr.go b/vendor/github.com/codahale/hdrhistogram/hdr.go similarity index 100% rename from _vendor/src/github.com/codahale/hdrhistogram/hdr.go rename to vendor/github.com/codahale/hdrhistogram/hdr.go diff --git a/vendor/github.com/codahale/hdrhistogram/hdr_test.go b/vendor/github.com/codahale/hdrhistogram/hdr_test.go new file mode 100644 index 0000000000000..309f0ea896978 --- /dev/null +++ b/vendor/github.com/codahale/hdrhistogram/hdr_test.go @@ -0,0 +1,388 @@ +package hdrhistogram_test + +import ( + "math" + "reflect" + "testing" + + "github.com/codahale/hdrhistogram" +) + +func TestHighSigFig(t *testing.T) { + input := []int64{ + 459876, 669187, 711612, 816326, 931423, 1033197, 1131895, 2477317, + 3964974, 12718782, + } + + hist := hdrhistogram.New(459876, 12718782, 5) + for _, sample := range input { + hist.RecordValue(sample) + } + + if v, want := hist.ValueAtQuantile(50), int64(1048575); v != want { + t.Errorf("Median was %v, but expected %v", v, want) + } +} + +func TestValueAtQuantile(t *testing.T) { + h := hdrhistogram.New(1, 10000000, 3) + + for i := 0; i < 1000000; i++ { + if err := h.RecordValue(int64(i)); err != nil { + t.Fatal(err) + } + } + + data := []struct { + q float64 + v int64 + }{ + {q: 50, v: 500223}, + {q: 75, v: 750079}, + {q: 90, v: 900095}, + {q: 95, v: 950271}, + {q: 99, v: 990207}, + {q: 99.9, v: 999423}, + {q: 99.99, v: 999935}, + } + + for _, d := range data { + if v := h.ValueAtQuantile(d.q); v != d.v { + t.Errorf("P%v was %v, but expected %v", d.q, v, d.v) + } + } +} + +func TestMean(t *testing.T) { + h := hdrhistogram.New(1, 10000000, 3) + + for i := 0; i < 1000000; i++ { + if err := h.RecordValue(int64(i)); err != nil { + t.Fatal(err) + } + } + + if v, want := h.Mean(), 500000.013312; v != want { + t.Errorf("Mean was %v, but expected %v", v, want) + } +} + +func TestStdDev(t *testing.T) { + h := hdrhistogram.New(1, 10000000, 3) + + for i := 0; i < 1000000; i++ { + if err := h.RecordValue(int64(i)); err != nil { + t.Fatal(err) + } + } + + if v, want := h.StdDev(), 288675.1403682715; v != want { + t.Errorf("StdDev was %v, but expected %v", v, want) + } +} + +func TestTotalCount(t *testing.T) { + h := hdrhistogram.New(1, 10000000, 3) + + for i := 0; i < 1000000; i++ { + if err := h.RecordValue(int64(i)); err != nil { + t.Fatal(err) + } + if v, want := h.TotalCount(), int64(i+1); v != want { + t.Errorf("TotalCount was %v, but expected %v", v, want) + } + } +} + +func TestMax(t *testing.T) { + h := hdrhistogram.New(1, 10000000, 3) + + for i := 0; i < 1000000; i++ { + if err := h.RecordValue(int64(i)); err != nil { + t.Fatal(err) + } + } + + if v, want := h.Max(), int64(1000447); v != want { + t.Errorf("Max was %v, but expected %v", v, want) + } +} + +func TestReset(t *testing.T) { + h := hdrhistogram.New(1, 10000000, 3) + + for i := 0; i < 1000000; i++ { + if err := h.RecordValue(int64(i)); err != nil { + t.Fatal(err) + } + } + + h.Reset() + + if v, want := h.Max(), int64(0); v != want { + t.Errorf("Max was %v, but expected %v", v, want) + } +} + +func TestMerge(t *testing.T) { + h1 := hdrhistogram.New(1, 1000, 3) + h2 := hdrhistogram.New(1, 1000, 3) + + for i := 0; i < 100; i++ { + if err := h1.RecordValue(int64(i)); err != nil { + t.Fatal(err) + } + } + + for i := 100; i < 200; i++ { + if err := h2.RecordValue(int64(i)); err != nil { + t.Fatal(err) + } + } + + h1.Merge(h2) + + if v, want := h1.ValueAtQuantile(50), int64(99); v != want { + t.Errorf("Median was %v, but expected %v", v, want) + } +} + +func TestMin(t *testing.T) { + h := hdrhistogram.New(1, 10000000, 3) + + for i := 0; i < 1000000; i++ { + if err := h.RecordValue(int64(i)); err != nil { + t.Fatal(err) + } + } + + if v, want := h.Min(), int64(0); v != want { + t.Errorf("Min was %v, but expected %v", v, want) + } +} + +func TestByteSize(t *testing.T) { + h := hdrhistogram.New(1, 100000, 3) + + if v, want := h.ByteSize(), 65604; v != want { + t.Errorf("ByteSize was %v, but expected %d", v, want) + } +} + +func TestRecordCorrectedValue(t *testing.T) { + h := hdrhistogram.New(1, 100000, 3) + + if err := h.RecordCorrectedValue(10, 100); err != nil { + t.Fatal(err) + } + + if v, want := h.ValueAtQuantile(75), int64(10); v != want { + t.Errorf("Corrected value was %v, but expected %v", v, want) + } +} + +func TestRecordCorrectedValueStall(t *testing.T) { + h := hdrhistogram.New(1, 100000, 3) + + if err := h.RecordCorrectedValue(1000, 100); err != nil { + t.Fatal(err) + } + + if v, want := h.ValueAtQuantile(75), int64(800); v != want { + t.Errorf("Corrected value was %v, but expected %v", v, want) + } +} + +func TestCumulativeDistribution(t *testing.T) { + h := hdrhistogram.New(1, 100000000, 3) + + for i := 0; i < 1000000; i++ { + if err := h.RecordValue(int64(i)); err != nil { + t.Fatal(err) + } + } + + actual := h.CumulativeDistribution() + expected := []hdrhistogram.Bracket{ + hdrhistogram.Bracket{Quantile: 0, Count: 1, ValueAt: 0}, + hdrhistogram.Bracket{Quantile: 50, Count: 500224, ValueAt: 500223}, + hdrhistogram.Bracket{Quantile: 75, Count: 750080, ValueAt: 750079}, + hdrhistogram.Bracket{Quantile: 87.5, Count: 875008, ValueAt: 875007}, + hdrhistogram.Bracket{Quantile: 93.75, Count: 937984, ValueAt: 937983}, + hdrhistogram.Bracket{Quantile: 96.875, Count: 969216, ValueAt: 969215}, + hdrhistogram.Bracket{Quantile: 98.4375, Count: 984576, ValueAt: 984575}, + hdrhistogram.Bracket{Quantile: 99.21875, Count: 992256, ValueAt: 992255}, + hdrhistogram.Bracket{Quantile: 99.609375, Count: 996352, ValueAt: 996351}, + hdrhistogram.Bracket{Quantile: 99.8046875, Count: 998400, ValueAt: 998399}, + hdrhistogram.Bracket{Quantile: 99.90234375, Count: 999424, ValueAt: 999423}, + hdrhistogram.Bracket{Quantile: 99.951171875, Count: 999936, ValueAt: 999935}, + hdrhistogram.Bracket{Quantile: 99.9755859375, Count: 999936, ValueAt: 999935}, + hdrhistogram.Bracket{Quantile: 99.98779296875, Count: 999936, ValueAt: 999935}, + hdrhistogram.Bracket{Quantile: 99.993896484375, Count: 1000000, ValueAt: 1000447}, + hdrhistogram.Bracket{Quantile: 100, Count: 1000000, ValueAt: 1000447}, + } + + if !reflect.DeepEqual(actual, expected) { + t.Errorf("CF was %#v, but expected %#v", actual, expected) + } +} + +func TestDistribution(t *testing.T) { + h := hdrhistogram.New(8, 1024, 3) + + for i := 0; i < 1024; i++ { + if err := h.RecordValue(int64(i)); err != nil { + t.Fatal(err) + } + } + + actual := h.Distribution() + if len(actual) != 128 { + t.Errorf("Number of bars seen was %v, expected was 128", len(actual)) + } + for _, b := range actual { + if b.Count != 8 { + t.Errorf("Count per bar seen was %v, expected was 8", b.Count) + } + } +} + +func TestNaN(t *testing.T) { + h := hdrhistogram.New(1, 100000, 3) + if math.IsNaN(h.Mean()) { + t.Error("mean is NaN") + } + if math.IsNaN(h.StdDev()) { + t.Error("stddev is NaN") + } +} + +func TestSignificantFigures(t *testing.T) { + const sigFigs = 4 + h := hdrhistogram.New(1, 10, sigFigs) + if h.SignificantFigures() != sigFigs { + t.Errorf("Significant figures was %v, expected %d", h.SignificantFigures(), sigFigs) + } +} + +func TestLowestTrackableValue(t *testing.T) { + const minVal = 2 + h := hdrhistogram.New(minVal, 10, 3) + if h.LowestTrackableValue() != minVal { + t.Errorf("LowestTrackableValue figures was %v, expected %d", h.LowestTrackableValue(), minVal) + } +} + +func TestHighestTrackableValue(t *testing.T) { + const maxVal = 11 + h := hdrhistogram.New(1, maxVal, 3) + if h.HighestTrackableValue() != maxVal { + t.Errorf("HighestTrackableValue figures was %v, expected %d", h.HighestTrackableValue(), maxVal) + } +} + +func BenchmarkHistogramRecordValue(b *testing.B) { + h := hdrhistogram.New(1, 10000000, 3) + for i := 0; i < 1000000; i++ { + if err := h.RecordValue(int64(i)); err != nil { + b.Fatal(err) + } + } + b.ResetTimer() + b.ReportAllocs() + + for i := 0; i < b.N; i++ { + h.RecordValue(100) + } +} + +func BenchmarkNew(b *testing.B) { + b.ReportAllocs() + + for i := 0; i < b.N; i++ { + hdrhistogram.New(1, 120000, 3) // this could track 1ms-2min + } +} + +func TestUnitMagnitudeOverflow(t *testing.T) { + h := hdrhistogram.New(0, 200, 4) + if err := h.RecordValue(11); err != nil { + t.Fatal(err) + } +} + +func TestSubBucketMaskOverflow(t *testing.T) { + hist := hdrhistogram.New(2e7, 1e8, 5) + for _, sample := range [...]int64{1e8, 2e7, 3e7} { + hist.RecordValue(sample) + } + + for q, want := range map[float64]int64{ + 50: 33554431, + 83.33: 33554431, + 83.34: 100663295, + 99: 100663295, + } { + if got := hist.ValueAtQuantile(q); got != want { + t.Errorf("got %d for %fth percentile. want: %d", got, q, want) + } + } +} + +func TestExportImport(t *testing.T) { + min := int64(1) + max := int64(10000000) + sigfigs := 3 + h := hdrhistogram.New(min, max, sigfigs) + for i := 0; i < 1000000; i++ { + if err := h.RecordValue(int64(i)); err != nil { + t.Fatal(err) + } + } + + s := h.Export() + + if v := s.LowestTrackableValue; v != min { + t.Errorf("LowestTrackableValue was %v, but expected %v", v, min) + } + + if v := s.HighestTrackableValue; v != max { + t.Errorf("HighestTrackableValue was %v, but expected %v", v, max) + } + + if v := int(s.SignificantFigures); v != sigfigs { + t.Errorf("SignificantFigures was %v, but expected %v", v, sigfigs) + } + + if imported := hdrhistogram.Import(s); !imported.Equals(h) { + t.Error("Expected Histograms to be equivalent") + } + +} + +func TestEquals(t *testing.T) { + h1 := hdrhistogram.New(1, 10000000, 3) + for i := 0; i < 1000000; i++ { + if err := h1.RecordValue(int64(i)); err != nil { + t.Fatal(err) + } + } + + h2 := hdrhistogram.New(1, 10000000, 3) + for i := 0; i < 10000; i++ { + if err := h1.RecordValue(int64(i)); err != nil { + t.Fatal(err) + } + } + + if h1.Equals(h2) { + t.Error("Expected Histograms to not be equivalent") + } + + h1.Reset() + h2.Reset() + + if !h1.Equals(h2) { + t.Error("Expected Histograms to be equivalent") + } +} diff --git a/_vendor/src/github.com/codahale/hdrhistogram/window.go b/vendor/github.com/codahale/hdrhistogram/window.go similarity index 100% rename from _vendor/src/github.com/codahale/hdrhistogram/window.go rename to vendor/github.com/codahale/hdrhistogram/window.go diff --git a/vendor/github.com/codahale/hdrhistogram/window_test.go b/vendor/github.com/codahale/hdrhistogram/window_test.go new file mode 100644 index 0000000000000..7e787588af90e --- /dev/null +++ b/vendor/github.com/codahale/hdrhistogram/window_test.go @@ -0,0 +1,64 @@ +package hdrhistogram_test + +import ( + "testing" + + "github.com/codahale/hdrhistogram" +) + +func TestWindowedHistogram(t *testing.T) { + w := hdrhistogram.NewWindowed(2, 1, 1000, 3) + + for i := 0; i < 100; i++ { + w.Current.RecordValue(int64(i)) + } + w.Rotate() + + for i := 100; i < 200; i++ { + w.Current.RecordValue(int64(i)) + } + w.Rotate() + + for i := 200; i < 300; i++ { + w.Current.RecordValue(int64(i)) + } + + if v, want := w.Merge().ValueAtQuantile(50), int64(199); v != want { + t.Errorf("Median was %v, but expected %v", v, want) + } +} + +func BenchmarkWindowedHistogramRecordAndRotate(b *testing.B) { + w := hdrhistogram.NewWindowed(3, 1, 10000000, 3) + b.ReportAllocs() + b.ResetTimer() + + for i := 0; i < b.N; i++ { + if err := w.Current.RecordValue(100); err != nil { + b.Fatal(err) + } + + if i%100000 == 1 { + w.Rotate() + } + } +} + +func BenchmarkWindowedHistogramMerge(b *testing.B) { + w := hdrhistogram.NewWindowed(3, 1, 10000000, 3) + for i := 0; i < 10000000; i++ { + if err := w.Current.RecordValue(100); err != nil { + b.Fatal(err) + } + + if i%100000 == 1 { + w.Rotate() + } + } + b.ReportAllocs() + b.ResetTimer() + + for i := 0; i < b.N; i++ { + w.Merge() + } +} diff --git a/vendor/github.com/coreos/etcd/.dockerignore b/vendor/github.com/coreos/etcd/.dockerignore new file mode 100644 index 0000000000000..6b8710a711f3b --- /dev/null +++ b/vendor/github.com/coreos/etcd/.dockerignore @@ -0,0 +1 @@ +.git diff --git a/vendor/github.com/coreos/etcd/.gitignore b/vendor/github.com/coreos/etcd/.gitignore new file mode 100644 index 0000000000000..210be6fe97d55 --- /dev/null +++ b/vendor/github.com/coreos/etcd/.gitignore @@ -0,0 +1,15 @@ +/coverage +/gopath +/gopath.proto +/go-bindata +/machine* +/bin +.vagrant +*.etcd +/etcd +*.swp +/hack/insta-discovery/.env +*.test +tools/functional-tester/docker/bin +hack/tls-setup/certs +.idea diff --git a/vendor/github.com/coreos/etcd/.godir b/vendor/github.com/coreos/etcd/.godir new file mode 100644 index 0000000000000..00ff6aa802e28 --- /dev/null +++ b/vendor/github.com/coreos/etcd/.godir @@ -0,0 +1 @@ +github.com/coreos/etcd diff --git a/vendor/github.com/coreos/etcd/.header b/vendor/github.com/coreos/etcd/.header new file mode 100644 index 0000000000000..0446af6d87763 --- /dev/null +++ b/vendor/github.com/coreos/etcd/.header @@ -0,0 +1,13 @@ +// Copyright 2016 The etcd Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. diff --git a/vendor/github.com/coreos/etcd/.travis.yml b/vendor/github.com/coreos/etcd/.travis.yml new file mode 100644 index 0000000000000..fb8e9b83284f4 --- /dev/null +++ b/vendor/github.com/coreos/etcd/.travis.yml @@ -0,0 +1,83 @@ +dist: trusty +language: go +go_import_path: github.com/coreos/etcd +sudo: false + +go: + - 1.8.3 + - tip + +notifications: + on_success: never + on_failure: never + +env: + matrix: + - TARGET=amd64 + - TARGET=darwin-amd64 + - TARGET=windows-amd64 + - TARGET=arm64 + - TARGET=arm + - TARGET=386 + - TARGET=ppc64le + +matrix: + fast_finish: true + allow_failures: + - go: tip + exclude: + - go: tip + env: TARGET=darwin-amd64 + - go: tip + env: TARGET=windows-amd64 + - go: tip + env: TARGET=arm + - go: tip + env: TARGET=arm64 + - go: tip + env: TARGET=386 + - go: tip + env: TARGET=ppc64le + +addons: + apt: + sources: + - debian-sid + packages: + - libpcap-dev + - libaspell-dev + - libhunspell-dev + - shellcheck + +before_install: + - go get -v -u github.com/chzchzchz/goword + - go get -v -u github.com/coreos/license-bill-of-materials + - go get -v -u honnef.co/go/tools/cmd/gosimple + - go get -v -u honnef.co/go/tools/cmd/unused + - go get -v -u honnef.co/go/tools/cmd/staticcheck + - ./scripts/install-marker.sh amd64 + +# disable godep restore override +install: + - pushd cmd/etcd && go get -t -v ./... && popd + +script: + - > + case "${TARGET}" in + amd64) + GOARCH=amd64 ./test + ;; + darwin-amd64) + GO_BUILD_FLAGS="-a -v" GOPATH="" GOOS=darwin GOARCH=amd64 ./build + ;; + windows-amd64) + GO_BUILD_FLAGS="-a -v" GOPATH="" GOOS=windows GOARCH=amd64 ./build + ;; + 386) + GOARCH=386 PASSES="build unit" ./test + ;; + *) + # test building out of gopath + GO_BUILD_FLAGS="-a -v" GOPATH="" GOARCH="${TARGET}" ./build + ;; + esac diff --git a/vendor/github.com/coreos/etcd/CONTRIBUTING.md b/vendor/github.com/coreos/etcd/CONTRIBUTING.md new file mode 100644 index 0000000000000..635f73a3056d9 --- /dev/null +++ b/vendor/github.com/coreos/etcd/CONTRIBUTING.md @@ -0,0 +1,62 @@ +# How to contribute + +etcd is Apache 2.0 licensed and accepts contributions via GitHub pull requests. This document outlines some of the conventions on commit message formatting, contact points for developers, and other resources to help get contributions into etcd. + +# Email and chat + +- Email: [etcd-dev](https://groups.google.com/forum/?hl=en#!forum/etcd-dev) +- IRC: #[coreos](irc://irc.freenode.org:6667/#coreos) IRC channel on freenode.org + +## Getting started + +- Fork the repository on GitHub +- Read the README.md for build instructions + +## Reporting bugs and creating issues + +Reporting bugs is one of the best ways to contribute. However, a good bug report has some very specific qualities, so please read over our short document on [reporting bugs](https://github.com/coreos/etcd/blob/master/Documentation/reporting_bugs.md) before submitting a bug report. This document might contain links to known issues, another good reason to take a look there before reporting a bug. + +## Contribution flow + +This is a rough outline of what a contributor's workflow looks like: + +- Create a topic branch from where to base the contribution. This is usually master. +- Make commits of logical units. +- Make sure commit messages are in the proper format (see below). +- Push changes in a topic branch to a personal fork of the repository. +- Submit a pull request to coreos/etcd. +- The PR must receive a LGTM from two maintainers found in the MAINTAINERS file. + +Thanks for contributing! + +### Code style + +The coding style suggested by the Golang community is used in etcd. See the [style doc](https://github.com/golang/go/wiki/CodeReviewComments) for details. + +Please follow this style to make etcd easy to review, maintain and develop. + +### Format of the commit message + +We follow a rough convention for commit messages that is designed to answer two +questions: what changed and why. The subject line should feature the what and +the body of the commit should describe the why. + +``` +scripts: add the test-cluster command + +this uses tmux to setup a test cluster that can easily be killed and started for debugging. + +Fixes #38 +``` + +The format can be described more formally as follows: + +``` +: + + + +